summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mixgtk/mixgtk_wm.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/mixgtk/mixgtk_wm.c b/mixgtk/mixgtk_wm.c
index 76072a8..5d4f287 100644
--- a/mixgtk/mixgtk_wm.c
+++ b/mixgtk/mixgtk_wm.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk_wm.c :
* Implementation of the functions declared in mixgtk_wm.h
* ------------------------------------------------------------------
- * $Id: mixgtk_wm.c,v 1.7 2004/06/30 14:07:52 jao Exp $
+ * $Id: mixgtk_wm.c,v 1.8 2004/06/30 14:50:43 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
*
@@ -81,8 +81,8 @@ static void mixal_attach_ (void);
static void mixal_detach_ (void);
static void dev_attach_ (void);
static void dev_detach_ (void);
-static void on_nb_switch_ (GtkNotebook *notebook, GtkNotebookPage *page,
- guint page_num, gpointer user_data);
+static void on_nb_switch_ (GtkNotebook *notebook, GtkWidget *page,
+ guint page_num, gpointer user_data);
static window_info_t_ infos_[] = {
{MIXGTK_MIXVM_DIALOG, NULL, NULL, "detach_vm", "MIX.detach",
@@ -332,8 +332,6 @@ init_signals_ (void)
G_CALLBACK (on_attach_toggled), NULL);
}
- g_signal_connect (G_OBJECT (notebook_), "switch-page",
- G_CALLBACK (on_nb_switch_), NULL);
}
static void
@@ -508,6 +506,8 @@ mixal_attach_ (void)
(mixgtk_widget_factory_get (MIXGTK_MAIN, MIXGTK_WIDGET_STATUSBAR));
g_assert (stat);
+ g_signal_connect (G_OBJECT (notebook_), "switch-page",
+ G_CALLBACK (on_nb_switch_), NULL);
}
mixgtk_mixal_reparent (stat);
@@ -550,11 +550,10 @@ dev_detach_ (void)
}
static void
-on_nb_switch_ (GtkNotebook *notebook, GtkNotebookPage *page,
+on_nb_switch_ (GtkNotebook *notebook, GtkWidget *page,
guint page_num, gpointer user_data)
{
- if (!infos_[MIXGTK_MIXAL_WINDOW].detached
- && page != NULL
- && GTK_WIDGET (page) != infos_[MIXGTK_MIXAL_WINDOW].widget)
+ if (!(infos_[MIXGTK_MIXAL_WINDOW].detached)
+ && (page != infos_[MIXGTK_MIXAL_WINDOW].widget))
mixgtk_mixal_pop_status ();
}