aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-17 00:36:13 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-17 00:36:46 +0800
commit2a8e2030e46b63a9cac0cd5d3017fd9d73a57407 (patch)
tree1528b2baf5a21317d55e1d2358e36ad45b11144f /e-util
parent672adf12a0923437e90d08ab7925bd9329fcce0d (diff)
downloadgsoc2013-evolution-2a8e2030e46b63a9cac0cd5d3017fd9d73a57407.tar.gz
gsoc2013-evolution-2a8e2030e46b63a9cac0cd5d3017fd9d73a57407.tar.zst
gsoc2013-evolution-2a8e2030e46b63a9cac0cd5d3017fd9d73a57407.zip
Chip away at GSEAL compliance.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-dialog-widgets.c14
-rw-r--r--e-util/e-error.c19
-rw-r--r--e-util/e-request.c2
3 files changed, 21 insertions, 14 deletions
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
index afa680d11b..cdcd52dd26 100644
--- a/e-util/e-dialog-widgets.c
+++ b/e-util/e-dialog-widgets.c
@@ -320,9 +320,11 @@ e_dialog_radio_get (GtkWidget *widget, const gint *value_map)
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
for (i = 0, l = group; l; l = l->next, i++) {
- widget = GTK_WIDGET (l->data);
+ GtkToggleButton *toggle_button;
- if (GTK_TOGGLE_BUTTON (widget)->active)
+ toggle_button = GTK_TOGGLE_BUTTON (l->data);
+
+ if (gtk_toggle_button_get_active (toggle_button))
break;
}
@@ -373,10 +375,9 @@ e_dialog_toggle_set (GtkWidget *widget, gboolean value)
gboolean
e_dialog_toggle_get (GtkWidget *widget)
{
- g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (widget), FALSE);
- return GTK_TOGGLE_BUTTON (widget)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
}
/**
@@ -396,7 +397,7 @@ e_dialog_spin_set (GtkWidget *widget, double value)
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
- adj->value = value;
+ gtk_adjustment_set_value (adj, value);
g_signal_emit_by_name (adj, "value_changed", 0);
}
@@ -417,7 +418,8 @@ e_dialog_spin_get_double (GtkWidget *widget)
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), 0.0);
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
- return adj->value;
+
+ return gtk_adjustment_get_value (adj);
}
/**
diff --git a/e-util/e-error.c b/e-util/e-error.c
index dd5dddf64e..b672e1d17e 100644
--- a/e-util/e-error.c
+++ b/e-util/e-error.c
@@ -412,6 +412,8 @@ e_error_newv(GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap)
struct _e_error *e;
struct _e_error_button *b;
GtkWidget *hbox, *w, *scroll=NULL;
+ GtkWidget *action_area;
+ GtkWidget *content_area;
gchar *tmp, *domain, *id;
GString *out, *oerr;
GPtrArray *args;
@@ -422,11 +424,14 @@ e_error_newv(GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap)
ee_load_tables();
dialog = (GtkDialog *)gtk_dialog_new();
+ action_area = gtk_dialog_get_action_area (dialog);
+ content_area = gtk_dialog_get_content_area (dialog);
+
gtk_dialog_set_has_separator(dialog, FALSE);
gtk_widget_ensure_style ((GtkWidget *)dialog);
- gtk_container_set_border_width ((GtkContainer *)(dialog->vbox), 0);
- gtk_container_set_border_width ((GtkContainer *)(dialog->action_area), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);
if (parent == NULL && ee_parent_list)
parent = (GtkWindow *)ee_parent_list->data;
@@ -454,7 +459,7 @@ e_error_newv(GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap)
gtk_label_set_markup((GtkLabel *)w, tmp);
GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_FOCUS);
gtk_widget_show(w);
- gtk_box_pack_start((GtkBox *)dialog->vbox, w, TRUE, TRUE, 12);
+ gtk_box_pack_start (GTK_BOX (content_area), w, TRUE, TRUE, 12);
return (GtkWidget *)dialog;
}
@@ -557,7 +562,7 @@ e_error_newv(GtkWindow *parent, const gchar *tag, const gchar *arg0, va_list ap)
gtk_widget_show_all(hbox);
- gtk_box_pack_start((GtkBox *)dialog->vbox, hbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
g_object_set_data_full ((GObject *) dialog, "primary", perr, g_free);
g_object_set_data_full ((GObject *) dialog, "secondary", serr, g_free);
@@ -645,14 +650,14 @@ e_error_run(GtkWindow *parent, const gchar *tag, const gchar *arg0, ...)
guint
e_error_count_buttons (GtkDialog *dialog)
{
- GtkContainer *action_area;
+ GtkWidget *container;
GList *children, *iter;
guint n_buttons = 0;
g_return_val_if_fail (GTK_DIALOG (dialog), 0);
- action_area = GTK_CONTAINER (dialog->action_area);
- children = gtk_container_get_children (action_area);
+ container = gtk_dialog_get_action_area (dialog);
+ children = gtk_container_get_children (GTK_CONTAINER (container));
/* Iterate over the children looking for buttons. */
for (iter = children; iter != NULL; iter = iter->next)
diff --git a/e-util/e-request.c b/e-util/e-request.c
index 3cd23968b2..58784ee1ae 100644
--- a/e-util/e-request.c
+++ b/e-util/e-request.c
@@ -64,7 +64,7 @@ e_request_string (GtkWindow *parent,
gtk_window_set_default_size (GTK_WINDOW (dialog), 275, -1);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- vbox = GTK_DIALOG (dialog)->vbox;
+ vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
prompt_label = gtk_label_new (prompt);
gtk_box_pack_start (GTK_BOX (vbox), prompt_label, TRUE, TRUE, 6);