Index: mud-window-mconnect.c =================================================================== RCS file: /cvs/gnome/gnome-mud/src/mud-window-mconnect.c,v retrieving revision 1.9 diff -u -r1.9 mud-window-mconnect.c --- mud-window-mconnect.c 5 Jan 2006 19:42:09 -0000 1.9 +++ mud-window-mconnect.c 31 Mar 2006 14:01:42 -0000 @@ -257,7 +257,7 @@ mconnect->priv->view = mud_connection_view_new("Default", mconnect->priv->SelHost, mconnect->priv->SelPort, mconnect->priv->winwidget, (GtkWidget *)mconnect->priv->tray); - mud_window_add_connection_view(mconnect->priv->window, mconnect->priv->view); + mud_window_add_connection_view(mconnect->priv->window, mconnect->priv->view, mconnect->priv->CurrSelMud); mud_connection_view_set_profile(mconnect->priv->view, get_profile((const gchar *)mud_profile_from_number(gtk_combo_box_get_active(GTK_COMBO_BOX(mconnect->priv->profileCombo))))); mud_window_profile_menu_set_active(mud_profile_from_number(gtk_combo_box_get_active(GTK_COMBO_BOX(mconnect->priv->profileCombo))),mconnect->priv->window);
Index: mud-window.h =================================================================== RCS file: /cvs/gnome/gnome-mud/src/mud-window.h,v retrieving revision 1.6 diff -u -r1.6 mud-window.h --- mud-window.h 5 Jan 2006 13:02:44 -0000 1.6 +++ mud-window.h 31 Mar 2006 13:58:24 -0000 @@ -32,7 +32,7 @@ GType mud_window_get_type (void) G_GNUC_CONST; MudWindow* mud_window_new (GConfClient *client); -void mud_window_add_connection_view(MudWindow *window, MudConnectionView *view); +void mud_window_add_connection_view(MudWindow *window, MudConnectionView *view, gchar *tabLbl); void mud_window_handle_plugins(MudWindow *window, gint id, gchar *data, gint dir); void mud_window_populate_profiles_menu(MudWindow *window); void mud_window_profile_menu_set_active(gchar *name, MudWindow *window);
Index: mud-window.c =================================================================== RCS file: /cvs/gnome/gnome-mud/src/mud-window.c,v retrieving revision 1.15 diff -u -r1.15 mud-window.c --- mud-window.c 4 Feb 2006 15:57:14 -0000 1.15 +++ mud-window.c 31 Mar 2006 13:58:16 -0000 @@ -82,11 +82,11 @@ } void -mud_window_add_connection_view(MudWindow *window, MudConnectionView *view) +mud_window_add_connection_view(MudWindow *window, MudConnectionView *view, gchar *tabLbl) { gint nr; MudViewEntry *entry; - + entry = g_new(MudViewEntry, 1); g_assert(window != NULL); @@ -98,7 +98,7 @@ window->priv->image = NULL; } - nr = gtk_notebook_append_page(GTK_NOTEBOOK(window->priv->notebook), mud_connection_view_get_viewport(view), NULL); + nr = gtk_notebook_append_page(GTK_NOTEBOOK(window->priv->notebook), mud_connection_view_get_viewport(view), gtk_label_new(tabLbl)); gtk_notebook_set_current_page(GTK_NOTEBOOK(window->priv->notebook), nr); mud_connection_view_set_id(view, nr); @@ -381,7 +381,7 @@ mud_tray_update_icon(window->priv->tray, offline); view = mud_connection_view_new("Default", host, iport, window->priv->window, (GtkWidget *)window->priv->tray); - mud_window_add_connection_view(window, view); + mud_window_add_connection_view(window, view, host); }
Index: mud-window.c =================================================================== RCS file: /cvs/gnome/gnome-mud/src/mud-window.c,v retrieving revision 1.15 diff -u -r1.15 mud-window.c --- mud-window.c 4 Feb 2006 15:57:14 -0000 1.15 +++ mud-window.c 31 Mar 2006 14:05:05 -0000 @@ -529,22 +529,22 @@ /* 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);
Index: mud-window.c =================================================================== RCS file: /cvs/gnome/gnome-mud/src/mud-window.c,v retrieving revision 1.15 diff -u -r1.15 mud-window.c --- mud-window.c 4 Feb 2006 15:57:14 -0000 1.15 +++ mud-window.c 31 Mar 2006 13:29:58 -0000 @@ -289,32 +289,20 @@ static void mud_window_inputtoggle_cb(GtkWidget *widget, MudWindow *window) { - gint w, h; if(window->priv->toggleState) { gtk_widget_hide(window->priv->textview); 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 { gtk_widget_hide(window->priv->textentry); 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; } + window->priv->toggleState = !window->priv->toggleState; } gboolean @@ -333,9 +321,6 @@ 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 +496,7 @@ mud_window_init (MudWindow *window) { GladeXML *glade; - gint w, h; - + window->priv = g_new0(MudWindowPrivate, 1); /* set members */ @@ -575,9 +559,6 @@ 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");
Attachment:
main.glade
Description: application/glade