[gnome-mud] Yet Another Patch.



Hey guys.

 - Removed some code not needed after changing to vbox
 - Got rid of the problem with the textbox and textentry both appearing after pressing tray icon
 - Signals for buttons.

- Paul
Index: mud-tray.c
===================================================================
RCS file: /cvs/gnome/gnome-mud/src/mud-tray.c,v
retrieving revision 1.2
diff -u -p -r1.2 mud-tray.c
--- mud-tray.c	5 Jan 2006 19:42:09 -0000	1.2
+++ mud-tray.c	31 Mar 2006 05:33:21 -0000
@@ -127,9 +127,9 @@ mud_tray_finalize (GObject *object)
 void mud_tray_window_toggle(GtkWidget *widget, MudTray *tray)
 {
         if (tray->priv->window_invisible == FALSE)
-                gtk_widget_hide_all(tray->priv->window);
+                gtk_widget_hide(tray->priv->window);
         else
-                gtk_widget_show_all(tray->priv->window);
+                gtk_widget_show(tray->priv->window);
         tray->priv->window_invisible = !tray->priv->window_invisible;
 }
 


Index: mud-window.c
===================================================================
RCS file: /cvs/gnome/gnome-mud/src/mud-window.c,v
retrieving revision 1.15
diff -u -p -r1.15 mud-window.c
--- mud-window.c	4 Feb 2006 15:57:14 -0000	1.15
+++ mud-window.c	31 Mar 2006 05:33:06 -0000
@@ -289,7 +289,6 @@ mud_window_mconnect_dialog(GtkWidget *wi
 static void
 mud_window_inputtoggle_cb(GtkWidget *widget, MudWindow *window)
 {
-	gint w, h;
 	
 	if(window->priv->toggleState)
 	{
@@ -297,10 +296,6 @@ mud_window_inputtoggle_cb(GtkWidget *wid
 		gtk_widget_hide(window->priv->textviewscroll);
 		gtk_widget_show(window->priv->textentry);
 
-		gtk_window_get_size(GTK_WINDOW(window->priv->window), &w, &h);
-	
-		gtk_paned_set_position(GTK_PANED(window->priv->mainvpane),h - 62);
-
 		window->priv->toggleState = 0;	
 	}
 	else
@@ -309,10 +304,6 @@ mud_window_inputtoggle_cb(GtkWidget *wid
 		gtk_widget_show(window->priv->textview);
 		gtk_widget_show(window->priv->textviewscroll);	
 
-		gtk_window_get_size(GTK_WINDOW(window->priv->window), &w, &h);
-	
-		gtk_paned_set_position(GTK_PANED(window->priv->mainvpane),h - 124);
-		
 		window->priv->toggleState = 1;
 	}
 }
@@ -333,9 +324,6 @@ mud_window_size_request(GtkWidget *widge
 	
 		gtk_image_set_from_pixbuf(GTK_IMAGE(window->priv->image), buf);
 	}
-	
-	if(!window->priv->toggleState)
-		gtk_paned_set_position(GTK_PANED(window->priv->mainvpane),h - 62);
 
 	return FALSE;
 }
@@ -511,8 +499,7 @@ static void
 mud_window_init (MudWindow *window)
 {
 	GladeXML *glade;
-	gint w, h;
-	
+
 	window->priv = g_new0(MudWindowPrivate, 1);
 
 	/* set members */
@@ -529,22 +516,22 @@ mud_window_init (MudWindow *window)
 	/* connect quit buttons */
 	g_signal_connect(window->priv->window, "destroy", G_CALLBACK(mud_window_close), window);
 	g_signal_connect(glade_xml_get_widget(glade, "menu_quit"), "activate", G_CALLBACK(mud_window_close), window);
-	//FIXME g_signal_connect(glade_xml_get_widget(glade, "toolbar_quit"), "clicked", G_CALLBACK(mud_window_close), window);
+	g_signal_connect(glade_xml_get_widget(glade, "toolbar_quit"), "clicked", G_CALLBACK(mud_window_close), window);
 
 	/* connect connect buttons */
 	g_signal_connect(glade_xml_get_widget(glade, "main_connect"), "activate", G_CALLBACK(mud_window_mconnect_dialog), window);
 	g_signal_connect(glade_xml_get_widget(glade, "menu_connect"), "activate", G_CALLBACK(mud_window_connect_dialog), window);
 	g_signal_connect(glade_xml_get_widget(glade, "menu_mudlist"), "activate",
 G_CALLBACK(mud_window_list_cb), window);
-	//FIXME g_signal_connect(glade_xml_get_widget(glade, "toolbar_connect"), "clicked", G_CALLBACK(mud_window_connect_dialog), window);
+	g_signal_connect(glade_xml_get_widget(glade, "toolbar_connect"), "clicked", G_CALLBACK(mud_window_connect_dialog), window);
 
 	/* connect disconnect buttons */
 	g_signal_connect(glade_xml_get_widget(glade, "menu_disconnect"), "activate", G_CALLBACK(mud_window_disconnect_cb), window);
-	//FIXME g_signal_connect(glade_xml_get_widget(glade, "toolbar_disconnect"), "clicked", G_CALLBACK(mud_window_disconnect_cb), window);
+	g_signal_connect(glade_xml_get_widget(glade, "toolbar_disconnect"), "clicked", G_CALLBACK(mud_window_disconnect_cb), window);
 
 	/* connect reconnect buttons */
 	g_signal_connect(glade_xml_get_widget(glade, "menu_reconnect"), "activate", G_CALLBACK(mud_window_reconnect_cb), window);
-	//FIXME g_signal_connect(glade_xml_get_widget(glade, "toolbar_reconnect"), "clicked", G_CALLBACK(mud_window_reconnect_cb), window);
+	g_signal_connect(glade_xml_get_widget(glade, "toolbar_reconnect"), "clicked", G_CALLBACK(mud_window_reconnect_cb), window);
 
 	/* connect close window button */
 	g_signal_connect(glade_xml_get_widget(glade, "menu_closewindow"), "activate", G_CALLBACK(mud_window_closewindow_cb), window);
@@ -575,9 +562,6 @@ G_CALLBACK(mud_window_list_cb), window);
 	g_signal_connect(window->priv->textentry, "activate", G_CALLBACK(mud_window_textentry_activate), window);
 
 	window->priv->mainvpane = glade_xml_get_widget(glade, "main_vpane");
-	gtk_window_get_size(GTK_WINDOW(window->priv->window), &w, &h);
-	
-	gtk_paned_set_position(GTK_PANED(window->priv->mainvpane),h - 62);
 	
 	window->priv->image = glade_xml_get_widget(glade, "image");
 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]