soylent r78 - trunk/src
- From: treitter svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r78 - trunk/src
- Date: Wed, 13 Feb 2008 06:37:20 +0000 (GMT)
Author: treitter
Date: Wed Feb 13 06:37:20 2008
New Revision: 78
URL: http://svn.gnome.org/viewvc/soylent?rev=78&view=rev
Log:
roll mailing address signal setup into soylent_browser_widget_signals_setup()
Modified:
trunk/src/soylent-browser.c
Modified: trunk/src/soylent-browser.c
==============================================================================
--- trunk/src/soylent-browser.c (original)
+++ trunk/src/soylent-browser.c Wed Feb 13 06:37:20 2008
@@ -78,8 +78,6 @@
static gboolean soylent_browser_widget_signals_setup (SoylentBrowser *browser);
static gboolean soylent_browser_person_info_mail_signals_setup
(SoylentBrowser *browser);
-static gboolean soylent_browser_person_detail_add_signals_setup
- (SoylentBrowser *browser);
static gboolean soylent_browser_signals_setup (SoylentBrowser *browser);
/* Instantiate the main SoylentBrowser */
@@ -1664,11 +1662,25 @@
soylent_browser_person_view_save_finalize_cb, CB_DATA_SIMPLE, browser},
/* Adding new details to a person */
+ /* general */
{"cbox_detail_domain", "changed", cbox_detail_type_update, CB_DATA_SIMPLE,
browser},
{"entry_detail_add", "changed", btn_detail_add_update, CB_DATA_SIMPLE,
browser},
{"btn_detail_add", "clicked", commit_detail_add, CB_DATA_SIMPLE, browser},
+ /* postal mail */
+ {"tv_person_mail_add_street", "changed", btn_detail_add_update,
+ CB_DATA_SIMPLE, browser},
+ {"entry_person_mail_add_po", "changed", btn_detail_add_update,
+ CB_DATA_SIMPLE, browser},
+ {"entry_person_mail_add_locality", "changed", btn_detail_add_update,
+ CB_DATA_SIMPLE, browser},
+ {"entry_person_mail_add_code", "changed", btn_detail_add_update,
+ CB_DATA_SIMPLE, browser},
+ {"entry_person_mail_add_region", "changed", btn_detail_add_update,
+ CB_DATA_SIMPLE, browser},
+ {"entry_person_mail_add_country", "changed", btn_detail_add_update,
+ CB_DATA_SIMPLE, browser},
/*
* Editing existing Person Details
@@ -1914,57 +1926,6 @@
return retval;
}
-/* Hook up handlers for actions on widgets in the Detail Add UI section
- *
- * Return TRUE for success, FALSE for any failure. */
-static gboolean
-soylent_browser_person_detail_add_signals_setup (SoylentBrowser *browser)
-{
- gboolean retval = FALSE;
- GladeXML *wtree = NULL;
- guint i = 0;
-
- g_return_val_if_fail (browser != NULL, retval);
- /* FIXME: uncomment once SoylentBrowser is a GObject:
- g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
- */
-
- wtree = browser->main_window;
-
- /* invert usual logic to simplify the loop below */
- retval = TRUE;
-
- for (i = 0; i < MAIL_FIELDS_NUM; i++)
- {
- const gchar *signal_name = "changed";
- const GCallback callback = G_CALLBACK (btn_detail_add_update);
- gboolean connect_retval = FALSE;
- gchar *widget_name = NULL;
-
- widget_name = g_strdup_printf ("%s_person_mail_add_%s",
- MAIL_WIDGET_TYPE_STRS[i],
- MAIL_FIELD_STRS[i]);
-
- connect_retval = widget_signal_connect (wtree, widget_name, signal_name,
- callback, browser);
- if (connect_retval)
- {
- /* success */
- }
- else
- {
- g_critical ("failed to set up signal handler for widget "
- "%s::%s\n", widget_name, signal_name);
-
- retval = FALSE;
- }
-
- g_free (widget_name);
- }
-
- return retval;
-}
-
/* Hook up handlers for all the people-related widgets (overview)
*
* Return TRUE for complete success, FALSE otherwise. */
@@ -1987,7 +1948,6 @@
/* FIXME: simplify these like widget_signals_setup, above */
soylent_browser_person_info_mail_signals_setup (browser);
- soylent_browser_person_detail_add_signals_setup (browser);
/* FIXME: only set this if everything above succeeds */
retval = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]