aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-scrolled.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-17 08:02:53 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-17 08:02:53 +0800
commit0bbe38655b71d4dd71277a1ecee246732f9fc2b1 (patch)
tree10655a0c2acb5f300986dfcfb90e5dbb3645d337 /widgets/table/e-table-scrolled.c
parentd8e4ebebc320c72ae93c88dc43d8ae220a94331d (diff)
downloadgsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.gz
gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.zst
gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.zip
GObject port work.
2002-11-16 Chris Toshok <toshok@ximian.com> * e-cell-checkbox.[ch]: GObject port work. * e-cell-combo.[ch]: same. * e-cell-date.[ch]: same. * e-cell-float.[ch]: same. * e-cell-number.[ch]: same. * e-cell-pixbuf.[ch]: same. * e-cell-popup.[ch]: same. * e-cell-progress.[ch]: same. * e-cell-size.[ch]: same. * e-cell-spin-button.[ch]: same. * e-cell-text.[ch]: same. * e-cell-toggle.[ch]: same. * e-cell-tree.[ch]: same. * e-cell-vbox.[ch]: same. * e-cell.[ch]: same. * e-table-col.c: same. * e-table-column.c: same. * e-table-config-field.[ch]: same. * e-table-config.c: same. * e-table-config.glade: same. * e-table-field-chooser-dialog.[ch]: same. * e-table-field-chooser-item.[ch]: same. * e-table-field-chooser.[ch]: same. * e-table-group-container.[ch]: same. * e-table-group-leaf.[ch]: same. * e-table-group.[ch]: same. * e-table-header-item.[ch]: same. * e-table-header-utils.[ch]: same. * e-table-header.c: same. * e-table-item.[ch]: same. * e-table-scrolled.[ch]: same. * e-table-utils.c: same. * e-table.[ch]: same. * e-tree-memory-callbacks.h: same. * e-tree-scrolled.[ch]: same. * e-tree-sorted-variable.c: same. * e-tree.[ch]: same. * test-check.c: same. * test-cols.c: same. * test-table.c: same. svn path=/trunk/; revision=18801
Diffstat (limited to 'widgets/table/e-table-scrolled.c')
-rw-r--r--widgets/table/e-table-scrolled.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c
index 080c685d6e..4731ee45bc 100644
--- a/widgets/table/e-table-scrolled.c
+++ b/widgets/table/e-table-scrolled.c
@@ -33,6 +33,7 @@
#include "e-table.h"
#include "e-table-scrolled.h"
+#include "gal/util/e-i18n.h"
#define COLUMN_HEADER_HEIGHT 16
@@ -41,8 +42,8 @@
static GtkObjectClass *parent_class;
enum {
- ARG_0,
- ARG_TABLE
+ PROP_0,
+ PROP_TABLE
};
static void
@@ -56,7 +57,7 @@ e_table_scrolled_init (GtkObject *object)
GTK_WIDGET_SET_FLAGS (ets, GTK_CAN_FOCUS);
- ets->table = gtk_type_new(e_table_get_type());
+ ets->table = g_object_new (E_TABLE_TYPE, NULL);
e_scroll_frame_set_policy (scroll_frame, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
e_scroll_frame_set_shadow_type (scroll_frame, GTK_SHADOW_IN);
@@ -161,16 +162,16 @@ e_table_scrolled_get_table (ETableScrolled *ets)
}
static void
-ets_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+ets_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
- ETableScrolled *ets = E_TABLE_SCROLLED (o);
-
- switch (arg_id){
- case ARG_TABLE:
- if (ets->table)
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(ets->table);
- else
- GTK_VALUE_OBJECT (*arg) = NULL;
+ ETableScrolled *ets = E_TABLE_SCROLLED (object);
+
+ switch (prop_id){
+ case PROP_TABLE:
+ g_value_set_object (value, ets->table);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
@@ -200,24 +201,28 @@ ets_focus (GtkWidget *container, GtkDirectionType direction)
static void
e_table_scrolled_class_init (ETableScrolledClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
- object_class = (GtkObjectClass *) class;
+ object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
container_class = (GtkContainerClass *) class;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
- object_class->get_arg = ets_get_arg;
+ object_class->get_property = ets_get_property;
widget_class->grab_focus = ets_grab_focus;
widget_class->focus = ets_focus;
- gtk_object_add_arg_type ("ETableScrolled::table", GTK_TYPE_OBJECT,
- GTK_ARG_READABLE, ARG_TABLE);
+ g_object_class_install_property (object_class, PROP_TABLE,
+ g_param_spec_object ("table",
+ _( "Table" ),
+ _( "Table" ),
+ E_TABLE_TYPE,
+ G_PARAM_READABLE));
}
E_MAKE_TYPE(e_table_scrolled, "ETableScrolled", ETableScrolled, e_table_scrolled_class_init, e_table_scrolled_init, PARENT_TYPE)