changeset 905:2876c40108cd

[gaim-migrate @ 915] Patch for wmclass to add better support for Sawfish's window history/etc. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 14 Sep 2000 17:50:56 +0000
parents e1a7fc4482b9
children 7b976e5e1c3a
files ChangeLog src/about.c src/aim.c src/away.c src/buddy.c src/buddy_chat.c src/conversation.c src/dialogs.c src/oscar.c src/perl.c src/plugins.c src/prefs.c src/rvous.c src/ticker.c
diffstat 14 files changed, 43 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 14 17:40:48 2000 +0000
+++ b/ChangeLog	Thu Sep 14 17:50:56 2000 +0000
@@ -4,6 +4,7 @@
 	* Better chatroom logging
 	* Oscar works again. Pay no attention to Slashdot.
 	* gtkhtml handles background colours better.
+	* Better support for things like Sawfish
 
 version 0.10.0 (09/11/2000): 
 	* New Smiley Faces and Pixmaps added.
--- a/src/about.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/about.c	Thu Sep 14 17:50:56 2000 +0000
@@ -72,6 +72,7 @@
 	             
 		g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION);
 		gtk_window_set_title(GTK_WINDOW(about), abouttitle);
+                gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim" );
 		gtk_container_border_width(GTK_CONTAINER(about), 2);
 		gtk_widget_set_usize(about, 535, 430);
 
--- a/src/aim.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/aim.c	Thu Sep 14 17:50:56 2000 +0000
@@ -325,6 +325,11 @@
         }
        
 	mainwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+        /* Set the WM name and class */
+        gtk_window_set_wmclass(GTK_WINDOW(mainwindow), "login",
+                               "Gaim");
+        /* Disallow resizing */
+        gtk_window_set_policy(GTK_WINDOW(mainwindow), FALSE, FALSE, TRUE);
 	gtk_widget_realize(mainwindow);
 	signon   = gtk_button_new_with_label(_("Signon"));
 	cancel   = gtk_button_new_with_label(_("Cancel"));
@@ -458,8 +463,7 @@
 	gtk_container_add(GTK_CONTAINER(mainwindow),table );
 	
 	gtk_widget_show(table);
-	gtk_window_set_title(GTK_WINDOW(mainwindow),_("Gaim - Login"));
-
+        gtk_window_set_title(GTK_WINDOW(mainwindow),_("Gaim - Login"));
 
         gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), (general_options & OPT_GEN_REMEMBER_PASS));
 
--- a/src/away.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/away.c	Thu Sep 14 17:50:56 2000 +0000
@@ -93,6 +93,7 @@
 
 	if (!imaway) {
 		imaway = gtk_window_new(GTK_WINDOW_DIALOG);
+                gtk_window_set_wmclass(GTK_WINDOW(imaway), "imaway", "Gaim");
 		gtk_widget_realize(imaway);
 		aol_icon(imaway->window);
 		back = picture_button(imaway, _("I'm Back!"), join_xpm);
--- a/src/buddy.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/buddy.c	Thu Sep 14 17:50:56 2000 +0000
@@ -1781,6 +1781,8 @@
         blist = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 #endif
         
+        gtk_window_set_wmclass(GTK_WINDOW(blist), "buddy_list", "Gaim" );
+
 	gtk_widget_realize(blist);
         aol_icon(blist->window);
         
--- a/src/buddy_chat.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/buddy_chat.c	Thu Sep 14 17:50:56 2000 +0000
@@ -113,6 +113,8 @@
 
 	if (!joinchat) {
 		joinchat = gtk_window_new(GTK_WINDOW_DIALOG);
+                gtk_window_set_wmclass(GTK_WINDOW(joinchat), "joinchat",
+                                      "Gaim");
 		gtk_window_set_policy(GTK_WINDOW(joinchat), FALSE, FALSE, TRUE);
 		gtk_widget_realize(joinchat);
 		bbox = gtk_hbox_new(TRUE, 10);
@@ -527,6 +529,7 @@
 	
 	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 	b->window = win;
+        gtk_window_set_wmclass(GTK_WINDOW(win), "buddy_chat", "Gaim");
 
 	vpaned = gtk_vpaned_new();
 	hpaned = gtk_hpaned_new();
--- a/src/conversation.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/conversation.c	Thu Sep 14 17:50:56 2000 +0000
@@ -1638,6 +1638,7 @@
 	int dispstyle;
 	
 	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+        gtk_window_set_wmclass(GTK_WINDOW(win), "conversation", "Gaim");
 	gtk_window_set_policy(GTK_WINDOW(win), TRUE, TRUE, TRUE);
 
 	gtk_widget_realize(win);
--- a/src/dialogs.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/dialogs.c	Thu Sep 14 17:50:56 2000 +0000
@@ -404,6 +404,7 @@
         
         char *buf = g_malloc(128);
         w->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        gtk_window_set_wmclass(GTK_WINDOW(w->window), "warning", "Gaim");
 	gtk_window_set_policy(GTK_WINDOW(w->window), FALSE, FALSE, TRUE);
 	gtk_widget_show(w->window);
 	dialogwindows = g_list_prepend(dialogwindows, w->window);
@@ -695,6 +696,8 @@
         if (!imdialog) {
 
                 imdialog = gtk_window_new(GTK_WINDOW_DIALOG);
+		gtk_window_set_wmclass(GTK_WINDOW(imdialog), "imdialog",
+                                       "Gaim");
 		gtk_widget_set_usize(imdialog, 255, 105);
 		gtk_container_border_width(GTK_CONTAINER(imdialog), 5);
 		gtk_window_set_policy(GTK_WINDOW(imdialog), FALSE, FALSE, TRUE);
@@ -857,6 +860,7 @@
         struct addbuddy *a = g_new0(struct addbuddy, 1);
         
         a->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	gtk_window_set_wmclass(GTK_WINDOW(a->window), "add_group", "Gaim");
 	gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE);
 	gtk_widget_realize(a->window);
 	dialogwindows = g_list_prepend(dialogwindows, a->window);
@@ -930,6 +934,7 @@
         struct addbuddy *a = g_new0(struct addbuddy, 1);
         
         a->window = gtk_window_new(GTK_WINDOW_DIALOG);
+	gtk_window_set_wmclass(GTK_WINDOW(a->window), "add_buddy", "Gaim");
 	gtk_widget_set_usize(a->window, 480, 105);
 	gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE);
 	gtk_widget_realize(a->window);
@@ -1048,6 +1053,7 @@
         
         b->window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(b->window), "new_bp", "Gaim");
 	gtk_widget_show(b->window);
         dialogwindows = g_list_prepend(dialogwindows, b->window);
         bbox = gtk_hbox_new(TRUE, 10);
@@ -1180,6 +1186,7 @@
 	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_widget_set_usize(b->window, 300, 320);
 	gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(b->window), "set_dir", "Gaim");
 	gtk_widget_show(b->window);
 
 	dialogwindows = g_list_prepend(dialogwindows, b->window);
@@ -1369,6 +1376,7 @@
 	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_widget_set_usize(b->window, 325, 195);
 	gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(b->window), "change_passwd", "Gaim");
 	gtk_widget_show(b->window);
 
 	dialogwindows = g_list_prepend(dialogwindows, b->window);
@@ -1474,6 +1482,7 @@
 	struct set_info_dlg *b = g_new0(struct set_info_dlg, 1);
 
 	b->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        gtk_window_set_wmclass(GTK_WINDOW(b->window), "set_info", "Gaim");
 	dialogwindows = g_list_prepend(dialogwindows, b->window);
 	gtk_widget_show(b->window);
 
@@ -1985,6 +1994,7 @@
         b->window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_widget_set_usize(b->window, 350, 320);
 	gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(b->window), "find_info", "Gaim");
 	gtk_widget_show(b->window);
 
 	dialogwindows = g_list_prepend(dialogwindows, b->window);
@@ -2143,6 +2153,7 @@
         b->window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_widget_set_usize(b->window, 240, 110);
 	gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(b->window), "find_email", "Gaim");
 	gtk_widget_show(b->window);
         dialogwindows = g_list_prepend(dialogwindows, b->window); 
 
@@ -2240,6 +2251,8 @@
 	if (!c->link_dialog) {
 		struct linkdlg *b = g_new0(struct linkdlg, 1);
 		c->link_dialog = gtk_window_new(GTK_WINDOW_DIALOG);
+                gtk_window_set_wmclass(GTK_WINDOW(c->link_dialog),
+                                       "add_link", "Gaim");
 		dialogwindows = g_list_prepend(dialogwindows, c->link_dialog);
 
 		gtk_widget_set_usize(c->link_dialog, 270, 165);
@@ -2933,10 +2946,11 @@
 	/* Set up window */
 	ca->window = gtk_window_new(GTK_WINDOW_DIALOG);
  	gtk_widget_set_usize(ca->window, 275, 200); 
-	gtk_widget_show(ca->window);
 	gtk_container_border_width(GTK_CONTAINER(ca->window), 5);
 	gtk_window_set_policy(GTK_WINDOW(ca->window), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(ca->window), "away_mess", "Gaim");
 	gtk_window_set_title(GTK_WINDOW(ca->window), _("Gaim - New away message"));
+	gtk_widget_show(ca->window);
 	gtk_signal_connect(GTK_OBJECT(ca->window),"delete_event",
 		           GTK_SIGNAL_FUNC(destroy_dialog), ca->window);
 
@@ -3130,7 +3144,8 @@
 	win = c->window;
 		
 	dialog = gtk_window_new(GTK_WINDOW_DIALOG);
-	gtk_window_set_policy(GTK_WINDOW(dialog), 0, 0, 1);
+	gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(dialog), "smiley_dialog", "Gaim");
 
 	/* setup boxes */
 	vbox = gtk_vbox_new(TRUE, 5);
@@ -3225,6 +3240,7 @@
 
         aliasdlg = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_window_set_policy(GTK_WINDOW(aliasdlg), FALSE, FALSE, TRUE);
+	gtk_window_set_wmclass(GTK_WINDOW(aliasdlg), "alias_dialog", "Gaim");
 	gtk_widget_realize(aliasdlg);
 	dialogwindows = g_list_prepend(dialogwindows, aliasdlg);
 
--- a/src/oscar.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/oscar.c	Thu Sep 14 17:50:56 2000 +0000
@@ -626,6 +626,7 @@
 
 	window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_window_set_title(GTK_WINDOW(window), _("Accept Direct IM?"));
+	gtk_window_set_wmclass(GTK_WINDOW(window), "directim", "Gaim");
 	gtk_widget_realize(window);
 	aol_icon(window->window);
 	gtk_object_set_user_data(GTK_OBJECT(window), (void *)priv);
--- a/src/perl.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/perl.c	Thu Sep 14 17:50:56 2000 +0000
@@ -575,7 +575,8 @@
 	}
 
 	config = gtk_window_new(GTK_WINDOW_DIALOG);
-	gtk_window_set_policy(GTK_WINDOW(config), 0, 0, 1);
+	gtk_window_set_policy(GTK_WINDOW(config), TRUE, TRUE, FALSE);
+	gtk_window_set_wmclass(GTK_WINDOW(config), "perl_script", "Gaim");
 	gtk_window_set_title(GTK_WINDOW(config), "Gaim - Add Perl Script");
 	gtk_container_set_border_width(GTK_CONTAINER(config), 5);
 	gtk_signal_connect(GTK_OBJECT(config), "destroy", GTK_SIGNAL_FUNC(cfdes), 0);
--- a/src/plugins.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/plugins.c	Thu Sep 14 17:50:56 2000 +0000
@@ -262,6 +262,7 @@
 	if (plugwindow) return;
 
 	plugwindow = gtk_window_new(GTK_WINDOW_DIALOG);
+	gtk_window_set_wmclass(GTK_WINDOW(plugwindow), "plugins", "Gaim");
 	gtk_widget_realize(plugwindow);
 	aol_icon(plugwindow->window);
 	gtk_container_border_width(GTK_CONTAINER(plugwindow), 10);
--- a/src/prefs.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/prefs.c	Thu Sep 14 17:50:56 2000 +0000
@@ -1581,6 +1581,7 @@
 	}
 
 	prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim");
 	gtk_widget_realize(prefs);
 	aol_icon(prefs->window);
 	gtk_container_border_width(GTK_CONTAINER(prefs), 10);
@@ -1668,6 +1669,8 @@
 	box = gtk_hbox_new(FALSE,0);
 	dw->window = gtk_window_new(GTK_WINDOW_DIALOG);
 	gtk_window_set_title(GTK_WINDOW(dw->window), _("GAIM debug output window"));
+	gtk_window_set_wmclass(GTK_WINDOW(dw->window),
+                               "debug_out", "Gaim");
 	gtk_container_add(GTK_CONTAINER(dw->window), box);
 	dw->entry = gtk_text_new(NULL,NULL);
 	gtk_widget_set_usize(dw->entry, 500, 200);
--- a/src/rvous.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/rvous.c	Thu Sep 14 17:50:56 2000 +0000
@@ -630,6 +630,7 @@
 
         
         ft->window = gtk_window_new(GTK_WINDOW_DIALOG);
+        gtk_window_set_wmclass(GTK_WINDOW(ft->window), "accept_file", "Gaim");
 
         accept = gtk_button_new_with_label(_("Accept"));
         info = gtk_button_new_with_label(_("Info"));
--- a/src/ticker.c	Thu Sep 14 17:40:48 2000 +0000
+++ b/src/ticker.c	Thu Sep 14 17:50:56 2000 +0000
@@ -85,6 +85,8 @@
         gtk_signal_connect (GTK_OBJECT(tickerwindow), "destroy",
                 GTK_SIGNAL_FUNC (BuddyTickerDestroyWindow), "WM destroy");
         gtk_window_set_title (GTK_WINDOW(tickerwindow), "GAIM - Buddy Ticker");
+        gtk_window_set_wmclass (GTK_WINDOW(tickerwindow), 
+                                "ticker", "Gaim");
 
         ticker = gtk_ticker_new();
         gtk_ticker_set_spacing( GTK_TICKER( ticker ), 20 );