aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/addressbook-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/addressbook/addressbook-config.c')
-rw-r--r--modules/addressbook/addressbook-config.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index 9c53f411d5..7d398f855d 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -299,10 +299,15 @@ static gint
addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
const gchar **attrs, LDAPMessage **resp)
{
+ GtkAdjustment *adjustment;
+ GtkRange *range;
gint ldap_error;
struct timeval timeout;
- timeout.tv_sec = (gint) gtk_adjustment_get_value (GTK_RANGE(dialog->timeout_scale)->adjustment);
+ range = GTK_RANGE (dialog->timeout_scale);
+ adjustment = gtk_range_get_adjustment (range);
+
+ timeout.tv_sec = (gint) gtk_adjustment_get_value (adjustment);
timeout.tv_usec = 0;
ldap_error = ldap_search_ext_s (ldap,
@@ -376,6 +381,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkWidget *dialog;
+ GtkWidget *container;
GtkWidget *supported_bases_table;
GtkBuilder *builder;
GtkTreeIter iter;
@@ -389,8 +395,12 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_ensure_style (dialog);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 12);
+
+ container = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
supported_bases_table = e_builder_get_widget (builder, "supported-bases-table");
model = gtk_tree_view_get_model (GTK_TREE_VIEW (supported_bases_table));
@@ -589,7 +599,7 @@ eabc_general_use_in_cal (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkW
if (old)
return old;
- use_in_cal_setting = gtk_check_button_new_with_mnemonic (_("Use in _Birthday & Anniversaries calendar"));
+ use_in_cal_setting = gtk_check_button_new_with_mnemonic (_("U_se in Birthday & Anniversaries calendar"));
gtk_widget_show (use_in_cal_setting);
gtk_container_add (GTK_CONTAINER (parent), use_in_cal_setting);
@@ -918,9 +928,13 @@ eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
static void
timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
{
+ GtkAdjustment *adjustment;
+ GtkRange *range;
gchar *timeout;
- timeout = g_strdup_printf("%f", gtk_adjustment_get_value(((GtkRange *)sdialog->timeout_scale)->adjustment));
+ range = GTK_RANGE (sdialog->timeout_scale);
+ adjustment = gtk_range_get_adjustment (range);
+ timeout = g_strdup_printf("%f", gtk_adjustment_get_value (adjustment));
e_source_set_property(sdialog->source, "timeout", timeout);
g_free(timeout);
}
@@ -947,6 +961,8 @@ static GtkWidget *
eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
+ GtkAdjustment *adjustment;
+ GtkRange *range;
GtkWidget *w;
const gchar *tmp;
GtkBuilder *builder;
@@ -961,9 +977,13 @@ eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
sdialog->timeout_scale = e_builder_get_widget (builder, "timeout-scale");
+ range = GTK_RANGE (sdialog->timeout_scale);
+ adjustment = gtk_range_get_adjustment (range);
tmp = e_source_get_property(sdialog->source, "timeout");
- gtk_adjustment_set_value(((GtkRange *)sdialog->timeout_scale)->adjustment, tmp?g_strtod(tmp, NULL):3.0);
- g_signal_connect (GTK_RANGE(sdialog->timeout_scale)->adjustment, "value_changed", G_CALLBACK (timeout_changed_cb), sdialog);
+ gtk_adjustment_set_value (adjustment, tmp?g_strtod(tmp, NULL):3.0);
+ g_signal_connect (
+ adjustment, "value_changed",
+ G_CALLBACK (timeout_changed_cb), sdialog);
sdialog->limit_spinbutton = e_builder_get_widget (builder, "download-limit-spinbutton");
tmp = e_source_get_property(sdialog->source, "limit");