From 1614f363635a13644c54a6459a018303327e7c02 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 7 Aug 2008 12:08:44 +0000 Subject: ** Fix for bug #324203 2008-08-07 Milan Crha ** Fix for bug #324203 * gui/component/ldap-config.glade: * gui/component/addressbook-config.c: (canbrowse_toggled_cb), (eabc_details_limit): New check box to be able to set LDAP address books browseable until reaches given limits. Note: To let this really works, one should have eds of revision 9295 or better. svn path=/trunk/; revision=35922 --- addressbook/ChangeLog | 9 +++++ addressbook/gui/component/addressbook-config.c | 14 ++++++++ addressbook/gui/component/ldap-config.glade | 48 ++++++++++++++++++++++++-- 3 files changed, 69 insertions(+), 2 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 786901cdcc..bb251b4963 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,12 @@ +2008-08-07 Milan Crha + + ** Fix for bug #324203 + + * gui/component/ldap-config.glade: + * gui/component/addressbook-config.c: (canbrowse_toggled_cb), + (eabc_details_limit): New check box to be able to set LDAP + address books browseable until reaches given limits. + 2008-08-06 Milan Crha ** Fix for bug #249844 diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 76b5dca5c1..2b749a6dd8 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -111,6 +111,7 @@ struct _AddressbookSourceDialog { GtkWidget *search_filter; GtkWidget *timeout_scale; GtkWidget *limit_spinbutton; + GtkWidget *canbrowsecheck; /* display name page fields */ GtkWidget *display_name; @@ -925,6 +926,15 @@ limit_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog) e_source_set_property(sdialog->source, "limit", limit); } +static void +canbrowse_toggled_cb (GtkWidget *toggle_button, ESource *source) +{ + if (!source || !toggle_button) + return; + + e_source_set_property (source, "can-browse", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle_button)) ? "1" : NULL); +} + static GtkWidget * eabc_details_limit(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) { @@ -956,6 +966,10 @@ eabc_details_limit(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st gtk_spin_button_set_value((GtkSpinButton *)sdialog->limit_spinbutton, tmp?g_strtod(tmp, NULL):100.0); g_signal_connect (sdialog->limit_spinbutton, "value_changed", G_CALLBACK (limit_changed_cb), sdialog); + sdialog->canbrowsecheck = glade_xml_get_widget (gui, "canbrowsecheck"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sdialog->canbrowsecheck), e_source_get_property (sdialog->source, "can-browse") && strcmp (e_source_get_property (sdialog->source, "can-browse"), "1") == 0); + g_signal_connect (sdialog->canbrowsecheck, "toggled", G_CALLBACK (canbrowse_toggled_cb), sdialog->source); + g_object_unref(gui); return w; diff --git a/addressbook/gui/component/ldap-config.glade b/addressbook/gui/component/ldap-config.glade index 1641741075..1e1c4d5fea 100644 --- a/addressbook/gui/component/ldap-config.glade +++ b/addressbook/gui/component/ldap-config.glade @@ -1179,7 +1179,7 @@ True - 2 + 3 3 False 6 @@ -1405,6 +1405,28 @@ shrink|fill + + + + True + True + B_rowse this book until limit reached + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 3 + 2 + 3 + fill + + + 0 @@ -2707,7 +2729,7 @@ 12 True - 2 + 3 3 False 6 @@ -2930,6 +2952,28 @@ + + + + True + True + B_rowse this book until limit reached + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 3 + 2 + 3 + fill + + + -- cgit