diff options
author | JP Rosevear <jpr@novell.com> | 2004-11-26 23:15:36 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-11-26 23:15:36 +0800 |
commit | ba0bc7dff09ade6b8014183c44c4c44b42ed1396 (patch) | |
tree | 0394c1dde4cb58e40b4694e0a486f5e37f147750 /widgets/misc/e-cell-renderer-combo.c | |
parent | f484ce17b3651e8d741e789621f59baef1652974 (diff) | |
download | gsoc2013-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-cell-renderer-combo.c')
-rw-r--r-- | widgets/misc/e-cell-renderer-combo.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/widgets/misc/e-cell-renderer-combo.c b/widgets/misc/e-cell-renderer-combo.c index 8ead96c4e8..562d940582 100644 --- a/widgets/misc/e-cell-renderer-combo.c +++ b/widgets/misc/e-cell-renderer-combo.c @@ -20,11 +20,13 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H #include <config.h> +#endif + #include <gtk/gtkcellrenderertext.h> #include <gtk/gtkarrow.h> #include <gtk/gtkbutton.h> -#include <gal/util/e-util.h> #include "e-combo-cell-editable.h" #include "e-cell-renderer-combo.h" @@ -40,7 +42,7 @@ struct _ECellRendererComboPriv { GList *list; }; -static GtkCellRendererTextClass *parent_class; +G_DEFINE_TYPE (ECellRendererCombo, e_cell_renderer_combo, GTK_TYPE_CELL_RENDERER_TEXT) static void ecrc_editing_done (GtkCellEditable *editable, ECellRendererCombo *cell) @@ -88,8 +90,8 @@ ecrc_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area GtkWidget *btn; GtkRequisition req; - if (GTK_CELL_RENDERER_CLASS (parent_class)->get_size) - GTK_CELL_RENDERER_CLASS (parent_class)->get_size (cell, widget, cell_area, x_offset, y_offset, width, height); + if (GTK_CELL_RENDERER_CLASS (e_cell_renderer_combo_parent_class)->get_size) + GTK_CELL_RENDERER_CLASS (e_cell_renderer_combo_parent_class)->get_size (cell, widget, cell_area, x_offset, y_offset, width, height); btn = gtk_button_new (); gtk_container_add (GTK_CONTAINER (btn), gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE)); @@ -141,24 +143,22 @@ ecrc_finalize (GObject *obj) g_free (cell->priv); - if (G_OBJECT_CLASS (parent_class)->finalize) - G_OBJECT_CLASS (parent_class)->finalize (obj); + if (G_OBJECT_CLASS (e_cell_renderer_combo_parent_class)->finalize) + G_OBJECT_CLASS (e_cell_renderer_combo_parent_class)->finalize (obj); } static void -ecrc_init (ECellRendererCombo *cell) +e_cell_renderer_combo_init (ECellRendererCombo *cell) { cell->priv = g_new0 (ECellRendererComboPriv, 1); } static void -ecrc_class_init (ECellRendererComboClass *class) +e_cell_renderer_combo_class_init (ECellRendererComboClass *class) { GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class); GObjectClass *obj_class = G_OBJECT_CLASS (class); - parent_class = GTK_CELL_RENDERER_TEXT_CLASS (g_type_class_peek_parent (class)); - obj_class->get_property = ecrc_get_prop; obj_class->set_property = ecrc_set_prop; obj_class->finalize = ecrc_finalize; @@ -170,8 +170,6 @@ ecrc_class_init (ECellRendererComboClass *class) g_param_spec_pointer ("list", "List", "List of items to popup.", G_PARAM_READWRITE)); } -E_MAKE_TYPE (e_cell_renderer_combo, "ECellRendererCombo", ECellRendererCombo, ecrc_class_init, ecrc_init, GTK_TYPE_CELL_RENDERER_TEXT) - GtkCellRenderer * e_cell_renderer_combo_new (void) { |