aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-fullscreen-popup.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-11 02:26:22 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-11 02:26:22 +0800
commita6753733856e098e2500487fee87620f72dea530 (patch)
tree1f5a7d8ae16bd2e3070bbdc31791eef96952a233 /src/ephy-fullscreen-popup.c
parent9a3e4ebc55e11c3b00b0e7464b11ecec121bc6f2 (diff)
downloadgsoc2013-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-fullscreen-popup.c')
-rw-r--r--src/ephy-fullscreen-popup.c49
1 files changed, 10 insertions, 39 deletions
diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c
index 800691a02..90018c205 100644
--- a/src/ephy-fullscreen-popup.c
+++ b/src/ephy-fullscreen-popup.c
@@ -65,9 +65,9 @@ enum
LAST_SIGNAL
};
-static guint signals[LAST_SIGNAL] = { 0 };
+static guint signals[LAST_SIGNAL];
-static GObjectClass *parent_class = NULL;
+G_DEFINE_TYPE (EphyFullscreenPopup, ephy_fullscreen_popup, GTK_TYPE_WINDOW)
static void
exit_button_clicked_cb (GtkWidget *button,
@@ -227,8 +227,9 @@ ephy_fullscreen_popup_constructor (GType type,
GtkWindow *window;
GtkWidget *hbox, *frame_hbox, *icon;
- object = parent_class->constructor (type, n_construct_properties,
- construct_params);
+ object = G_OBJECT_CLASS (ephy_fullscreen_popup_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_params);
window = GTK_WINDOW (object);
popup = EPHY_FULLSCREEN_POPUP (window);
@@ -296,7 +297,7 @@ ephy_fullscreen_popup_finalize (GObject *object)
g_signal_handlers_disconnect_matched (priv->window, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, popup);
- parent_class->finalize (object);
+ G_OBJECT_CLASS (ephy_fullscreen_popup_parent_class)->finalize (object);
}
static void
@@ -330,7 +331,7 @@ ephy_fullscreen_popup_show (GtkWidget *widget)
{
EphyFullscreenPopup *popup = EPHY_FULLSCREEN_POPUP (widget);
- GTK_WIDGET_CLASS (parent_class)->show (widget);
+ GTK_WIDGET_CLASS (ephy_fullscreen_popup_parent_class)->show (widget);
ephy_fullscreen_popup_update_spinner (popup);
}
@@ -340,7 +341,7 @@ ephy_fullscreen_popup_hide (GtkWidget *widget)
{
EphyFullscreenPopup *popup = EPHY_FULLSCREEN_POPUP (widget);
- GTK_WIDGET_CLASS (parent_class)->hide (widget);
+ GTK_WIDGET_CLASS (ephy_fullscreen_popup_parent_class)->hide (widget);
ephy_fullscreen_popup_update_spinner (popup);
}
@@ -351,7 +352,7 @@ ephy_fullscreen_popup_size_request (GtkWidget *widget,
{
EphyFullscreenPopup *popup = EPHY_FULLSCREEN_POPUP (widget);
- GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+ GTK_WIDGET_CLASS (ephy_fullscreen_popup_parent_class)->size_request (widget, requisition);
if (GTK_WIDGET_REALIZED (widget))
{
@@ -364,7 +365,7 @@ ephy_fullscreen_popup_realize (GtkWidget *widget)
{
EphyFullscreenPopup *popup = EPHY_FULLSCREEN_POPUP (widget);
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
+ GTK_WIDGET_CLASS (ephy_fullscreen_popup_parent_class)->realize (widget);
ephy_fullscreen_popup_update_position (popup);
}
@@ -375,8 +376,6 @@ ephy_fullscreen_popup_class_init (EphyFullscreenPopupClass *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->constructor = ephy_fullscreen_popup_constructor;
object_class->finalize = ephy_fullscreen_popup_finalize;
object_class->get_property = ephy_fullscreen_popup_get_property;
@@ -420,34 +419,6 @@ ephy_fullscreen_popup_class_init (EphyFullscreenPopupClass *klass)
g_type_class_add_private (object_class, sizeof (EphyFullscreenPopupPrivate));
}
-GType
-ephy_fullscreen_popup_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyFullscreenPopupClass),
- NULL,
- NULL,
- (GClassInitFunc) ephy_fullscreen_popup_class_init,
- NULL,
- NULL,
- sizeof (EphyFullscreenPopup),
- 0,
- (GInstanceInitFunc) ephy_fullscreen_popup_init
- };
-
- type = g_type_register_static (GTK_TYPE_WINDOW,
- "EphyFullscreenPopup",
- &our_info, 0);
- }
-
- return type;
-}
-
GtkWidget *
ephy_fullscreen_popup_new (EphyWindow *window)
{