From a3de8c93943a9955c76af2cd18826d9aabe89fd5 Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Mon, 6 Feb 2006 18:33:49 +0000 Subject: [PATCH] Fixed updating connect button --- gnoemoe/widgets/gm-app-view.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gnoemoe/widgets/gm-app-view.c b/gnoemoe/widgets/gm-app-view.c index 4317515..e491679 100644 --- a/gnoemoe/widgets/gm-app-view.c +++ b/gnoemoe/widgets/gm-app-view.c @@ -30,18 +30,8 @@ #include "mcp/gm-mcp-package.h" #include "gm-searchable.h" #include "gm-tray.h" - -//#include "if_world.h" -//#include "if_worlds_listing.h" -//#include "if_preferences.h" -//#include "if_mcpconsole.h" - #include "gm-pixbuf.h" #include "gm-support.h" -//#include "term.h" -//#include "world.h" -//#include "net.h" -//#include "main.h" void on_gm_app_view_entry_find_activate(GtkEntry *entry, GmAppView *view); void on_gm_app_view_entry_find_changed(GtkEditable *editable, @@ -1724,7 +1714,19 @@ on_gm_app_view_world_active_changed(GmWorld *world, GParamSpec *pspec, gtk_notebook_set_current_page(view->priv->notebook, gtk_notebook_page_num(view->priv->notebook, GTK_WIDGET(world_view))); + gm_app_view_update_title(view); + + switch (gm_world_state(world)) { + case GM_NET_STATE_CONNECTING: case GM_NET_STATE_CONNECTED: + gm_app_view_update_connect_button(view, TRUE); + break; + case GM_NET_STATE_DISCONNECTED: + gm_app_view_update_connect_button(view, FALSE); + break; + default: + break; + } } }