aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-dropdown-button.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-11-26 23:15:36 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-11-26 23:15:36 +0800
commitba0bc7dff09ade6b8014183c44c4c44b42ed1396 (patch)
tree0394c1dde4cb58e40b4694e0a486f5e37f147750 /widgets/misc/e-dropdown-button.c
parentf484ce17b3651e8d741e789621f59baef1652974 (diff)
downloadgsoc2013-evolution-ba0bc7dff09ade6b8014183c44c4c44b42ed1396.tar.gz
gsoc2013-evolution-ba0bc7dff09ade6b8014183c44c4c44b42ed1396.tar.zst
gsoc2013-evolution-ba0bc7dff09ade6b8014183c44c4c44b42ed1396.zip
test prog
2004-11-26 JP Rosevear <jpr@novell.com> * test-info-label.c: test prog * e-url-entry.c: get image directly from icon factory * e-combo-button.c: ditto; convert to G_DEFINE_TYPE * e-activity-handler.c: convert to G_DEFINE_TYPE * e-task-widget.c: ditto * e-task-bar.c: ditto * e-multi-config-dialog.c: ditto * e-dropdown-button.c: ditto * e-cell-renderer-combo.c: ditto * e-cell-date-edit.c: ditto * e-calendar.c: ditto * e-calendar-item.c: ditto * Makefile.am: don't build the title bar, build an info label test program svn path=/trunk/; revision=27999
Diffstat (limited to 'widgets/misc/e-dropdown-button.c')
-rw-r--r--widgets/misc/e-dropdown-button.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c
index 4a0327e7be..480e7d04c1 100644
--- a/widgets/misc/e-dropdown-button.c
+++ b/widgets/misc/e-dropdown-button.c
@@ -28,24 +28,19 @@
#include "e-dropdown-button.h"
-
#include <stdio.h>
#include <gtk/gtkarrow.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkwidget.h>
#include <libgnomeui/gnome-popup-menu.h>
-#include <gal/util/e-util.h>
-
struct _EDropdownButtonPrivate {
GtkAccelGroup *accel_group;
GtkWidget *menu;
};
-#define PARENT_TYPE gtk_toggle_button_get_type ()
-static GtkToggleButtonClass *parent_class = NULL;
+G_DEFINE_TYPE (EDropdownButton, e_dropdown_button, GTK_TYPE_TOGGLE_BUTTON)
-
/* Callback to position the pop-up menu. */
static void
@@ -109,8 +104,8 @@ impl_destroy (GtkObject *object)
g_free (priv);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GTK_OBJECT_CLASS (e_dropdown_button_parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (e_dropdown_button_parent_class)->destroy) (object);
}
@@ -122,8 +117,8 @@ impl_toggled (GtkToggleButton *toggle_button)
EDropdownButton *dropdown_button;
EDropdownButtonPrivate *priv;
- if (parent_class->toggled)
- parent_class->toggled (toggle_button);
+ if (GTK_TOGGLE_BUTTON_CLASS (e_dropdown_button_parent_class)->toggled)
+ GTK_TOGGLE_BUTTON_CLASS (e_dropdown_button_parent_class)->toggled (toggle_button);
dropdown_button = E_DROPDOWN_BUTTON (toggle_button);
priv = dropdown_button->priv;
@@ -139,7 +134,7 @@ impl_toggled (GtkToggleButton *toggle_button)
static void
-class_init (EDropdownButtonClass *klass)
+e_dropdown_button_class_init (EDropdownButtonClass *klass)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -151,13 +146,11 @@ class_init (EDropdownButtonClass *klass)
object_class->destroy = impl_destroy;
toggle_class->toggled = impl_toggled;
-
- parent_class = g_type_class_ref(PARENT_TYPE);
}
static void
-init (EDropdownButton *dropdown_button)
+e_dropdown_button_init (EDropdownButton *dropdown_button)
{
EDropdownButtonPrivate *priv;
@@ -245,5 +238,3 @@ e_dropdown_button_new (const char *label_text,
return widget;
}
-
-E_MAKE_TYPE (e_dropdown_button, "EDropdownButton", EDropdownButton, class_init, init, PARENT_TYPE)