diff options
author | Manish Singh <yosh@gimp.org> | 2002-10-05 01:51:16 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 2002-10-05 01:51:16 +0000 |
commit | 8409ada92ff408f41c3014ffa6401ce97da0e5ed (patch) | |
tree | 8ad6ffbe5247c05db1fa3231e51b773319499e38 /gtk/gtkmenubar.c | |
parent | 2ffa58f11d0fdfdee4859f37dd69bcec21b34e41 (diff) | |
download | gtk+-8409ada92ff408f41c3014ffa6401ce97da0e5ed.tar.gz |
Deprecation cleanup
Fri Oct 4 18:40:50 2002 Manish Singh <yosh@gimp.org>
* gtkcheckmenuitem.[ch] gtkimagemenuitem.[ch] gtkmenu.[ch]
gtkmenubar.[ch] gtkmenuitem.[ch] gtkmenushell.[ch]
gtkradiomenuitem.[ch]: Deprecation cleanup
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 6f36f6c665..c76e55b8d1 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -35,7 +35,6 @@ #include "gtksettings.h" #include "gtkintl.h" #include "gtkwindow.h" -#include "gtksignal.h" #define BORDER_SPACING 0 @@ -57,26 +56,28 @@ static GtkShadowType get_shadow_type (GtkMenuBar *menubar); static GtkMenuShellClass *parent_class = NULL; -GtkType +GType gtk_menu_bar_get_type (void) { - static GtkType menu_bar_type = 0; + static GType menu_bar_type = 0; if (!menu_bar_type) { - static const GtkTypeInfo menu_bar_info = + static const GTypeInfo menu_bar_info = { - "GtkMenuBar", - sizeof (GtkMenuBar), sizeof (GtkMenuBarClass), - (GtkClassInitFunc) gtk_menu_bar_class_init, - (GtkObjectInitFunc) NULL, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_menu_bar_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkMenuBar), + 0, /* n_preallocs */ + NULL, /* instance_init */ }; - menu_bar_type = gtk_type_unique (gtk_menu_shell_get_type (), &menu_bar_info); + menu_bar_type = g_type_register_static (GTK_TYPE_MENU_SHELL, "GtkMenuBar", + &menu_bar_info, 0); } return menu_bar_type; @@ -168,7 +169,7 @@ gtk_menu_bar_class_init (GtkMenuBarClass *class) GtkWidget* gtk_menu_bar_new (void) { - return GTK_WIDGET (gtk_type_new (gtk_menu_bar_get_type ())); + return g_object_new (GTK_TYPE_MENU_BAR, NULL); } static void @@ -472,7 +473,7 @@ add_to_window (GtkWindow *window, if (!menubars) { - g_signal_connect (G_OBJECT (window), + g_signal_connect (window, "key_press_event", G_CALLBACK (window_key_press_handler), NULL); @@ -494,8 +495,8 @@ remove_from_window (GtkWindow *window, if (!menubars) { - g_signal_handlers_disconnect_by_func (G_OBJECT (window), - (gpointer) window_key_press_handler, + g_signal_handlers_disconnect_by_func (window, + window_key_press_handler, NULL); } |