diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-08-17 00:36:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-17 00:36:46 +0800 |
commit | 2a8e2030e46b63a9cac0cd5d3017fd9d73a57407 (patch) | |
tree | 1528b2baf5a21317d55e1d2358e36ad45b11144f /filter | |
parent | 672adf12a0923437e90d08ab7925bd9329fcce0d (diff) | |
download | gsoc2013-evolution-2a8e2030e46b63a9cac0cd5d3017fd9d73a57407.tar.gz gsoc2013-evolution-2a8e2030e46b63a9cac0cd5d3017fd9d73a57407.tar.zst gsoc2013-evolution-2a8e2030e46b63a9cac0cd5d3017fd9d73a57407.zip |
Chip away at GSEAL compliance.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter-datespec.c | 4 | ||||
-rw-r--r-- | filter/filter-rule.c | 8 | ||||
-rw-r--r-- | filter/rule-context.c | 4 | ||||
-rw-r--r-- | filter/rule-editor.c | 17 |
4 files changed, 25 insertions, 8 deletions
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index 934434c619..fcfc877dc0 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -426,6 +426,7 @@ static void button_clicked (GtkButton *button, FilterDatespec *fds) { struct _FilterDatespecPrivate *p = PRIV(fds); + GtkWidget *content_area; GtkWidget *toplevel; GtkDialog *dialog; GladeXML *gui; @@ -458,7 +459,8 @@ button_clicked (GtkButton *button, FilterDatespec *fds) g_signal_connect (p->combobox_relative, "changed", G_CALLBACK (set_combobox_relative), fds); g_signal_connect (p->combobox_past_future, "changed", G_CALLBACK (set_combobox_past_future), fds); - gtk_box_pack_start ((GtkBox *) dialog->vbox, toplevel, TRUE, TRUE, 3); + content_area = gtk_dialog_get_content_area (dialog); + gtk_box_pack_start (GTK_BOX (content_area), toplevel, TRUE, TRUE, 3); if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) { get_values (fds); diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 354d276fe8..7d28881fb4 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -807,8 +807,12 @@ more_parts (GtkWidget *button, struct _rule_data *data) GtkAdjustment *adjustment; adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (w)); - if (adjustment) - gtk_adjustment_set_value (adjustment, adjustment->upper); + if (adjustment) { + gdouble upper; + + upper = gtk_adjustment_get_upper (adjustment); + gtk_adjustment_set_value (adjustment, upper); + } } } diff --git a/filter/rule-context.c b/filter/rule-context.c index 84cf2e4e92..b6e7df47de 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -711,6 +711,7 @@ rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const gchar *title, { GtkDialog *dialog; GtkWidget *widget; + GtkWidget *content_area; d(printf("add rule gui '%s'\n", rule->name)); @@ -731,7 +732,8 @@ rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const gchar *title, gtk_window_set_default_size((GtkWindow *) dialog, 600, 400); gtk_window_set_resizable((GtkWindow *) dialog, TRUE); - gtk_box_pack_start((GtkBox *) dialog->vbox, widget, TRUE, TRUE, 0); + content_area = gtk_dialog_get_content_area (dialog); + gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0); g_object_set_data_full((GObject *) dialog, "rule", rule, g_object_unref); if (path) diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 59006f7597..7a9335990f 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -363,6 +363,7 @@ static void rule_add (GtkWidget *widget, RuleEditor *re) { GtkWidget *rules; + GtkWidget *content_area; if (re->edit != NULL) return; @@ -384,7 +385,8 @@ rule_add (GtkWidget *widget, RuleEditor *re) gtk_window_set_transient_for ((GtkWindow *) re->dialog, (GtkWindow *) re); gtk_container_set_border_width ((GtkContainer *) re->dialog, 6); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 3); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (re->dialog)); + gtk_box_pack_start (GTK_BOX (content_area), rules, TRUE, TRUE, 3); g_signal_connect (re->dialog, "response", G_CALLBACK (add_editor_response), re); g_object_weak_ref ((GObject *) re->dialog, (GWeakNotify) editor_destroy, re); @@ -442,6 +444,7 @@ static void rule_edit (GtkWidget *widget, RuleEditor *re) { GtkWidget *rules; + GtkWidget *content_area; update_selected_rule(re); @@ -465,7 +468,8 @@ rule_edit (GtkWidget *widget, RuleEditor *re) gtk_widget_set_parent_window (GTK_WIDGET (re->dialog), GTK_WIDGET (re)->window); gtk_container_set_border_width ((GtkContainer *) re->dialog, 6); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 3); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (re->dialog)); + gtk_box_pack_start (GTK_BOX (content_area), rules, TRUE, TRUE, 3); g_signal_connect (re->dialog, "response", G_CALLBACK (edit_editor_response), re); g_object_weak_ref ((GObject *) re->dialog, (GWeakNotify) editor_destroy, re); @@ -828,19 +832,24 @@ void rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const gchar *source, const gchar *label) { GtkWidget *w; + GtkWidget *action_area; + GtkWidget *content_area; gint i; gchar *tmp; re->context = context; g_object_ref (context); + action_area = gtk_dialog_get_action_area (GTK_DIALOG (re)); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (re)); + gtk_window_set_resizable ((GtkWindow *) re, TRUE); gtk_window_set_default_size ((GtkWindow *) re, 350, 400); gtk_widget_realize ((GtkWidget *) re); - gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *) re)->action_area, 12); + gtk_container_set_border_width (GTK_CONTAINER (action_area), 12); w = glade_xml_get_widget(gui, "rule_editor"); - gtk_box_pack_start((GtkBox *)((GtkDialog *)re)->vbox, w, TRUE, TRUE, 3); + gtk_box_pack_start (GTK_BOX (content_area), w, TRUE, TRUE, 3); for (i = 0; i < BUTTON_LAST; i++) { re->priv->buttons[i] = (GtkButton *) (w = glade_xml_get_widget (gui, edit_buttons[i].name)); |