From: Martin Kretzschmar Date: Fri, 28 Jan 2005 13:17:22 +0000 (+0000) Subject: use G_DEFINE_TYPE-supplied ev_sidebar_thumbnails_parent_class variable, X-Git-Tag: EVINCE_0_1_3~24 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=0a2a397faf5fe1fb1ac869b4db10b11ef07d1f3b;p=evince.git use G_DEFINE_TYPE-supplied ev_sidebar_thumbnails_parent_class variable, * shell/ev-sidebar-thumbnails.c (ev_sidebar_thumbnails_destroy) (ev_sidebar_thumbnails_class_init): use G_DEFINE_TYPE-supplied ev_sidebar_thumbnails_parent_class variable, don't define another parent_class variable. * shell/ev-page-action.c (connect_proxy, ev_page_action_finalize) (ev_page_action_class_init): ditto. * pixbuf/pixbuf-document.c (pixbuf_document_finalize) (pixbuf_document_class_init): ditto. * backend/ev-link.c (ev_window_dispose, ev_link_class_init): ditto. --- diff --git a/ChangeLog b/ChangeLog index c858eb74..edd9cad7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2005-01-28 Martin Kretzschmar + * shell/ev-sidebar-thumbnails.c (ev_sidebar_thumbnails_destroy) + (ev_sidebar_thumbnails_class_init): use G_DEFINE_TYPE-supplied + ev_sidebar_thumbnails_parent_class variable, don't define another + parent_class variable. + + * shell/ev-page-action.c (connect_proxy, ev_page_action_finalize) + (ev_page_action_class_init): ditto. + + * pixbuf/pixbuf-document.c (pixbuf_document_finalize) + (pixbuf_document_class_init): ditto. + + * backend/ev-link.c (ev_window_dispose, ev_link_class_init): + ditto. + * .cvsignore: ignore various valgrind output files. 2005-01-27 Marco Pesenti Gritti diff --git a/backend/ev-link.c b/backend/ev-link.c index 14ef3a24..e01aa199 100644 --- a/backend/ev-link.c +++ b/backend/ev-link.c @@ -39,8 +39,6 @@ struct _EvLinkPrivate { int page; }; -static GObjectClass *parent_class = NULL; - G_DEFINE_TYPE (EvLink, ev_link, G_TYPE_OBJECT) #define EV_LINK_GET_PRIVATE(object) \ @@ -219,7 +217,7 @@ ev_window_dispose (GObject *object) priv->title = NULL; } - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (ev_link_parent_class)->dispose (object); } static void @@ -235,8 +233,6 @@ ev_link_class_init (EvLinkClass *ev_window_class) { GObjectClass *g_object_class; - parent_class = g_type_class_peek_parent (ev_window_class); - g_object_class = G_OBJECT_CLASS (ev_window_class); g_object_class->dispose = ev_window_dispose; g_object_class->set_property = ev_link_set_property; diff --git a/pixbuf/pixbuf-document.c b/pixbuf/pixbuf-document.c index 9e6958db..a3b06d97 100644 --- a/pixbuf/pixbuf-document.c +++ b/pixbuf/pixbuf-document.c @@ -53,8 +53,6 @@ G_DEFINE_TYPE_WITH_CODE (PixbufDocument, pixbuf_document, G_TYPE_OBJECT, pixbuf_document_document_thumbnails_iface_init) }); -static GObjectClass *parent_class; - static gboolean pixbuf_document_load (EvDocument *document, const char *uri, @@ -198,7 +196,7 @@ pixbuf_document_finalize (GObject *object) g_object_unref (pixbuf_document->pixbuf); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (pixbuf_document_parent_class)->finalize (object); } static void @@ -234,8 +232,6 @@ pixbuf_document_class_init (PixbufDocumentClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - gobject_class->finalize = pixbuf_document_finalize; gobject_class->get_property = pixbuf_document_get_property; gobject_class->set_property = pixbuf_document_set_property; diff --git a/shell/ev-page-action.c b/shell/ev-page-action.c index 29bae4ec..9e327077 100644 --- a/shell/ev-page-action.c +++ b/shell/ev-page-action.c @@ -54,8 +54,6 @@ enum static guint signals[LAST_SIGNAL] = { 0 }; -static GObjectClass *parent_class = NULL; - G_DEFINE_TYPE (EvPageAction, ev_page_action, GTK_TYPE_ACTION) #define EV_PAGE_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_PAGE_ACTION, EvPageActionPrivate)) @@ -158,7 +156,7 @@ connect_proxy (GtkAction *action, GtkWidget *proxy) proxy, 0); } - GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy); + GTK_ACTION_CLASS (ev_page_action_parent_class)->connect_proxy (action, proxy); } static void @@ -170,7 +168,7 @@ ev_page_action_init (EvPageAction *action) static void ev_page_action_finalize (GObject *object) { - parent_class->finalize (object); + G_OBJECT_CLASS (ev_page_action_parent_class)->finalize (object); } static void @@ -233,8 +231,6 @@ ev_page_action_class_init (EvPageActionClass *class) object_class->set_property = ev_page_action_set_property; object_class->get_property = ev_page_action_get_property; - parent_class = g_type_class_peek_parent (class); - action_class->toolbar_item_type = GTK_TYPE_TOOL_ITEM; action_class->create_tool_item = create_tool_item; action_class->connect_proxy = connect_proxy; diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 3d13b5ef..4d54d117 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -57,8 +57,6 @@ enum { NUM_COLUMNS }; -static GtkVBoxClass *parent_class; - G_DEFINE_TYPE (EvSidebarThumbnails, ev_sidebar_thumbnails, GTK_TYPE_VBOX); #define EV_SIDEBAR_THUMBNAILS_GET_PRIVATE(object) \ @@ -76,7 +74,7 @@ ev_sidebar_thumbnails_destroy (GtkObject *object) priv->idle_id = 0; } - GTK_OBJECT_CLASS (parent_class)->destroy (object); + GTK_OBJECT_CLASS (ev_sidebar_thumbnails_parent_class)->destroy (object); } static void @@ -88,8 +86,6 @@ ev_sidebar_thumbnails_class_init (EvSidebarThumbnailsClass *ev_sidebar_thumbnail g_object_class = G_OBJECT_CLASS (ev_sidebar_thumbnails_class); gtk_object_class = GTK_OBJECT_CLASS (ev_sidebar_thumbnails_class); - parent_class = g_type_class_peek_parent (ev_sidebar_thumbnails_class); - gtk_object_class->destroy = ev_sidebar_thumbnails_destroy; g_type_class_add_private (g_object_class, sizeof (EvSidebarThumbnailsPrivate));