diff options
author | Milan Crha <mcrha@redhat.com> | 2010-10-07 01:26:08 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-10-07 01:26:08 +0800 |
commit | 1c6f2d154e74f908e2c4a137de0233b5faf4f6b6 (patch) | |
tree | 77a33236e48ed59a7c7c65e8a1c91481dd09f3eb /filter | |
parent | 1b2fefb086c3e34089beb8b89b22d79005cc7725 (diff) | |
download | gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.gz gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.zst gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.zip |
Bug #631320 - GtkObject is gone in GTK3
Diffstat (limited to 'filter')
-rw-r--r-- | filter/e-filter-int.c | 4 | ||||
-rw-r--r-- | filter/e-filter-rule.c | 6 | ||||
-rw-r--r-- | filter/e-rule-editor.c | 14 |
3 files changed, 11 insertions, 13 deletions
diff --git a/filter/e-filter-int.c b/filter/e-filter-int.c index 68f8417423..871e595505 100644 --- a/filter/e-filter-int.c +++ b/filter/e-filter-int.c @@ -141,13 +141,13 @@ filter_int_get_widget (EFilterElement *element) { EFilterInt *filter_int = E_FILTER_INT (element); GtkWidget *widget; - GtkObject *adjustment; + GtkAdjustment *adjustment; adjustment = gtk_adjustment_new ( 0.0, (gfloat) filter_int->min, (gfloat) filter_int->max, 1.0, 1.0, 0); widget = gtk_spin_button_new ( - GTK_ADJUSTMENT (adjustment), + adjustment, filter_int->max > filter_int->min + 1000 ? 5.0 : 1.0, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE); diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c index ca9475a6af..bfcff8c8b9 100644 --- a/filter/e-filter-rule.c +++ b/filter/e-filter-rule.c @@ -649,7 +649,7 @@ filter_rule_get_widget (EFilterRule *rule, GtkWidget *add, *label, *name, *w; GtkWidget *combobox; GtkWidget *scrolledwindow; - GtkObject *hadj, *vadj; + GtkAdjustment *hadj, *vadj; GList *l; gchar *text; EFilterPart *part; @@ -807,8 +807,8 @@ filter_rule_get_widget (EFilterRule *rule, hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0); vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0); - scrolledwindow = gtk_scrolled_window_new ( - GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj)); + scrolledwindow = gtk_scrolled_window_new (hadj, vadj); + gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c index 94d182ebb0..68c005cc38 100644 --- a/filter/e-rule-editor.c +++ b/filter/e-rule-editor.c @@ -569,17 +569,18 @@ rule_editor_finalize (GObject *object) } static void -rule_editor_destroy (GtkObject *gtk_object) +rule_editor_dispose (GObject *object) { - ERuleEditor *editor = E_RULE_EDITOR (gtk_object); + ERuleEditor *editor = E_RULE_EDITOR (object); if (editor->dialog != NULL) { gtk_widget_destroy (GTK_WIDGET (editor->dialog)); editor->dialog = NULL; } - /* Chain up to parent's destroy() method. */ - GTK_OBJECT_CLASS (e_rule_editor_parent_class)->destroy (gtk_object); + /* Chain up to parent's dispose() method. */ + if (G_OBJECT_CLASS (e_rule_editor_parent_class)->dispose) + G_OBJECT_CLASS (e_rule_editor_parent_class)->dispose (object); } static void @@ -644,15 +645,12 @@ static void e_rule_editor_class_init (ERuleEditorClass *class) { GObjectClass *object_class; - GtkObjectClass *gtk_object_class; g_type_class_add_private (class, sizeof (ERuleEditorPrivate)); object_class = G_OBJECT_CLASS (class); object_class->finalize = rule_editor_finalize; - - gtk_object_class = GTK_OBJECT_CLASS (class); - gtk_object_class->destroy = rule_editor_destroy; + object_class->dispose = rule_editor_dispose; class->set_source = rule_editor_set_source; class->set_sensitive = rule_editor_set_sensitive; |