diff options
author | JP Rosevear <jpr@novell.com> | 2004-12-21 23:42:46 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-12-21 23:42:46 +0800 |
commit | a0da580e7e2355b6f6e084cbd968dd6176156082 (patch) | |
tree | d902eddfe5429b7d8dc2e0fa1055f136f880561f /shell/e-sidebar.c | |
parent | 8cb1b7cf11da0d32a087f3f580fb76f0eb2aa212 (diff) | |
download | gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.tar.gz gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.tar.zst gsoc2013-evolution-a0da580e7e2355b6f6e084cbd968dd6176156082.zip |
Convert to G_DEFINE_TYPE
2004-12-21 JP Rosevear <jpr@novell.com>
* e-corba-config-page.c: Convert to G_DEFINE_TYPE
* e-history.c: ditto
* e-shell-folder-title-bar.c: ditto
* e-shell-offline-handler.c: ditto
* e-shell-settings-dialog.c: ditto
* e-shell-window.c: ditto
* e-sidebar.c: ditto
* e-user-creatable-items-handler.c: ditto
* e-component-registry.c: ditto
* importer/evolution-importer-client.c: ditto
svn path=/trunk/; revision=28164
Diffstat (limited to 'shell/e-sidebar.c')
-rw-r--r-- | shell/e-sidebar.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c index e412736b0a..fc1ca4dd90 100644 --- a/shell/e-sidebar.c +++ b/shell/e-sidebar.c @@ -20,24 +20,20 @@ * Author: Ettore Perazzoli <ettore@ximian.com> */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif #include "e-sidebar.h" #include "e-shell-marshal.h" -#include <gal/util/e-util.h> - #include <gtk/gtkhbox.h> #include <gtk/gtkimage.h> #include <gtk/gtklabel.h> #include <gtk/gtktogglebutton.h> -#define PARENT_TYPE gtk_container_get_type () -static GtkContainerClass *parent_class = NULL; - - typedef struct { GtkWidget *button_widget; GtkWidget *label; @@ -63,6 +59,7 @@ enum { static unsigned int signals[NUM_SIGNALS] = { 0 }; +G_DEFINE_TYPE (ESidebar, e_sidebar, GTK_TYPE_CONTAINER) #define H_PADDING 6 #define V_PADDING 6 @@ -365,7 +362,7 @@ impl_dispose (GObject *object) g_slist_free (priv->buttons); priv->buttons = NULL; - (* G_OBJECT_CLASS (parent_class)->dispose) (object); + (* G_OBJECT_CLASS (e_sidebar_parent_class)->dispose) (object); } static void @@ -375,18 +372,18 @@ impl_finalize (GObject *object) g_free (priv); - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + (* G_OBJECT_CLASS (e_sidebar_parent_class)->finalize) (object); } /* Initialization. */ static void -class_init (ESidebarClass *class) +e_sidebar_class_init (ESidebarClass *klass) { - GtkContainerClass *container_class = GTK_CONTAINER_CLASS (class); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class); - GObjectClass *object_class = G_OBJECT_CLASS (class); + GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); container_class->forall = impl_forall; container_class->remove = impl_remove; @@ -397,9 +394,6 @@ class_init (ESidebarClass *class) object_class->dispose = impl_dispose; object_class->finalize = impl_finalize; - parent_class = g_type_class_peek_parent (class); - - signals[BUTTON_SELECTED] = g_signal_new ("button_selected", G_OBJECT_CLASS_TYPE (object_class), @@ -412,7 +406,7 @@ class_init (ESidebarClass *class) } static void -init (ESidebar *sidebar) +e_sidebar_init (ESidebar *sidebar) { ESidebarPrivate *priv; @@ -530,6 +524,3 @@ e_sidebar_set_mode (ESidebar *sidebar, ESidebarMode mode) gtk_widget_queue_resize (GTK_WIDGET (sidebar)); } - - -E_MAKE_TYPE (e_sidebar, "ESidebar", ESidebar, class_init, init, PARENT_TYPE) |