summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-30 14:50:43 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2004-06-30 14:50:43 +0000
commitc4cf41f058dd9fade1e4372775d1e053f65b2a30 (patch)
tree98322059e2c2f005c0997d2c83b571d151293d92 /mixgtk
parenta54d7264214bf201549d7ee0a9038b990ef5611a (diff)
downloadmdk-c4cf41f058dd9fade1e4372775d1e053f65b2a30.tar.gz
mdk-c4cf41f058dd9fade1e4372775d1e053f65b2a30.tar.bz2
(on_nb_switch_): warning on null widget page fixed.
Diffstat (limited to 'mixgtk')
-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 ();
}