diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-02-11 02:26:22 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-02-11 02:26:22 +0800 |
commit | a6753733856e098e2500487fee87620f72dea530 (patch) | |
tree | 1f5a7d8ae16bd2e3070bbdc31791eef96952a233 /src/ephy-history-window.c | |
parent | 9a3e4ebc55e11c3b00b0e7464b11ecec121bc6f2 (diff) | |
download | gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.gz gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.bz2 gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.lz gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.xz gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.tar.zst gsoc2013-epiphany-a6753733856e098e2500487fee87620f72dea530.zip |
Use G_DEFINE_TYPE* when possible in src/ (#515601)
svn path=/trunk/; revision=7927
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r-- | src/ephy-history-window.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 42164e5dd..9cbe36621 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -164,8 +164,6 @@ enum #define TIME_LAST_TWO_DAYS_STRING "last_two_days" #define TIME_LAST_THREE_DAYS_STRING "last_three_days" -static GObjectClass *parent_class = NULL; - static const GtkActionEntry ephy_history_ui_entries [] = { /* Toplevel */ { "File", NULL, N_("_File") }, @@ -590,33 +588,7 @@ cmd_view_columns (GtkAction *action, g_slist_free (svalues); } -GType -ephy_history_window_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (EphyHistoryWindowClass), - NULL, - NULL, - (GClassInitFunc) ephy_history_window_class_init, - NULL, - NULL, - sizeof (EphyHistoryWindow), - 0, - (GInstanceInitFunc) ephy_history_window_init - }; - - type = g_type_register_static (GTK_TYPE_WINDOW, - "EphyHistoryWindow", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EphyHistoryWindow, ephy_history_window, GTK_TYPE_WINDOW) static void ephy_history_window_show (GtkWidget *widget) @@ -625,7 +597,7 @@ ephy_history_window_show (GtkWidget *widget) gtk_widget_grab_focus (window->priv->search_entry); - GTK_WIDGET_CLASS (parent_class)->show (widget); + GTK_WIDGET_CLASS (ephy_history_window_parent_class)->show (widget); } static void @@ -634,8 +606,6 @@ ephy_history_window_class_init (EphyHistoryWindowClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->finalize = ephy_history_window_finalize; object_class->set_property = ephy_history_window_set_property; @@ -674,7 +644,7 @@ ephy_history_window_finalize (GObject *object) (gpointer *)window); } - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (ephy_history_window_parent_class)->finalize (object); } static void @@ -1649,5 +1619,5 @@ ephy_history_window_dispose (GObject *object) save_date_filter (editor); } - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (ephy_history_window_parent_class)->dispose (object); } |