aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/gconf-bridge.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 20:37:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-27 20:37:17 +0800
commitcc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (patch)
tree763785c47096a6aba1ca6c03115b5e862c9f49ad /e-util/gconf-bridge.c
parent10f8406b09318b1a3e4fe9d08d41a60239f9f3a6 (diff)
parente4afd3f9fb962ea1295a0657ec9f83a427829171 (diff)
downloadgsoc2013-evolution-cc3a98fc1ad5bb87aa7335f3de404ee7feee1541.tar.gz
gsoc2013-evolution-cc3a98fc1ad5bb87aa7335f3de404ee7feee1541.tar.zst
gsoc2013-evolution-cc3a98fc1ad5bb87aa7335f3de404ee7feee1541.zip
Merge branch 'master' into kill-bonobo
Conflicts: a11y/widgets/ea-combo-button.c a11y/widgets/ea-combo-button.h addressbook/gui/component/addressbook-component.c addressbook/gui/component/addressbook-component.h addressbook/gui/component/addressbook-view.c addressbook/gui/component/addressbook-view.h addressbook/gui/component/component-factory.c addressbook/gui/widgets/e-addressbook-view.c addressbook/gui/widgets/eab-contact-display.c addressbook/gui/widgets/eab-gui-util.h addressbook/gui/widgets/eab-menu.c addressbook/gui/widgets/eab-menu.h addressbook/gui/widgets/eab-popup-control.c addressbook/gui/widgets/eab-popup-control.h addressbook/gui/widgets/eab-popup.c addressbook/gui/widgets/eab-popup.h calendar/gui/cal-search-bar.c calendar/gui/calendar-commands.c calendar/gui/calendar-component.c calendar/gui/comp-editor-factory.c calendar/gui/comp-editor-factory.h calendar/gui/control-factory.c calendar/gui/dialogs/comp-editor.c calendar/gui/e-cal-component-memo-preview.c calendar/gui/e-cal-component-memo-preview.h calendar/gui/e-calendar-table.c calendar/gui/e-memo-table.c calendar/gui/e-memos.c calendar/gui/e-tasks.c calendar/gui/gnome-cal.c calendar/gui/gnome-cal.h calendar/gui/itip-bonobo-control.c calendar/gui/itip-bonobo-control.h calendar/gui/main.c calendar/gui/memos-component.c calendar/gui/memos-control.c calendar/gui/memos-control.h calendar/gui/migration.c calendar/gui/migration.h calendar/gui/tasks-component.c calendar/gui/tasks-control.c calendar/importers/main.c composer/Makefile.am composer/e-composer-header-table.c composer/e-composer-header.c composer/e-composer-header.h composer/e-composer-name-header.c composer/e-composer-private.c composer/e-composer-text-header.c composer/e-msg-composer.c composer/e-msg-composer.h e-util/e-corba-utils.h e-util/e-logger.c e-util/e-logger.h e-util/e-util-labels.c e-util/e-util-labels.h em-format/em-format.c mail/Makefile.am mail/e-mail-shell-migrate.c mail/em-account-editor.c mail/em-account-editor.h mail/em-composer-prefs.c mail/em-composer-utils.c mail/em-composer-utils.h mail/em-folder-browser.c mail/em-folder-tree-model.c mail/em-folder-tree.c mail/em-folder-tree.h mail/em-folder-utils.c mail/em-folder-utils.h mail/em-folder-view.c mail/em-format-html-display.c mail/em-format-html.c mail/em-mailer-prefs.c mail/em-mailer-prefs.h mail/em-message-browser.c mail/em-message-browser.h mail/em-network-prefs.h mail/em-popup.c mail/em-utils.c mail/importers/Makefile.am mail/mail-component-factory.c mail/mail-component.c mail/mail-config-factory.c mail/mail-config-factory.h mail/mail-config.c mail/mail-dialogs.glade mail/mail-types.h plugins/calendar-weather/calendar-weather.c plugins/mail-account-disable/mail-account-disable.c plugins/select-one-source/select-one-source.c po/POTFILES.in shell/e-component-registry.c shell/e-component-registry.h shell/e-component-view.c shell/e-component-view.h shell/e-corba-config-page.c shell/e-corba-config-page.h shell/e-shell-constants.h shell/e-shell-settings-dialog.c shell/e-shell-settings-dialog.h shell/e-shell-window-commands.c shell/e-shell-window.c shell/e-shell.h shell/e-sidebar.c shell/e-sidebar.h shell/e-user-creatable-items-handler.c shell/e-user-creatable-items-handler.h shell/es-menu.c shell/es-menu.h shell/evolution-component.h shell/evolution-config-control.c shell/evolution-config-control.h shell/evolution-listener.c shell/evolution-listener.h shell/evolution-shell-component-utils.c shell/evolution-shell-component-utils.h shell/importer/evolution-importer-client.c shell/importer/evolution-importer-client.h shell/importer/evolution-importer-listener.c shell/importer/evolution-importer-listener.h shell/importer/evolution-importer.c shell/importer/evolution-importer.h shell/importer/evolution-intelligent-importer.c shell/importer/evolution-intelligent-importer.h shell/importer/intelligent.c shell/main.c shell/test/evolution-test-component.c shell/test/evolution-test-component.h widgets/menus/gal-view-instance.c widgets/menus/gal-view-menus.c widgets/menus/gal-view-menus.h widgets/misc/Makefile.am widgets/misc/e-activity-handler.c widgets/misc/e-activity-handler.h widgets/misc/e-charset-picker.c widgets/misc/e-combo-button.c widgets/misc/e-combo-button.h widgets/misc/e-config-page.h widgets/misc/e-dropdown-button.c widgets/misc/e-dropdown-button.h widgets/misc/e-filter-bar.c widgets/misc/e-info-label.c widgets/misc/e-info-label.h widgets/misc/e-multi-config-dialog.c widgets/misc/e-multi-config-dialog.h widgets/misc/e-search-bar.c widgets/misc/e-search-bar.h widgets/misc/e-task-bar.c widgets/misc/e-task-bar.h widgets/misc/e-task-widget.c widgets/misc/e-task-widget.h widgets/misc/test-dropdown-button.c widgets/misc/test-error.c widgets/misc/test-info-label.c widgets/table/e-table-example-1.c
Diffstat (limited to 'e-util/gconf-bridge.c')
-rw-r--r--e-util/gconf-bridge.c43
1 files changed, 19 insertions, 24 deletions
diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c
index 852d5f8f53..5a3693730f 100644
--- a/e-util/gconf-bridge.c
+++ b/e-util/gconf-bridge.c
@@ -1,4 +1,4 @@
-/*
+/*
* (C) 2005 OpenedHand Ltd.
*
* Author: Jorn Baayen <jorn@openedhand.com>
@@ -29,7 +29,7 @@
struct _GConfBridge {
GConfClient *client;
-
+
GHashTable *bindings;
};
@@ -43,7 +43,7 @@ typedef enum {
typedef struct {
BindingType type;
guint id;
-
+
gboolean delayed_mode;
char *key;
@@ -107,11 +107,6 @@ typedef union {
static void
unbind (Binding *binding);
-#if !HAVE_DECL_GCONF_VALUE_COMPARE /* Not in headers in GConf < 2.13 */
-int gconf_value_compare (const GConfValue *value_a,
- const GConfValue *value_b);
-#endif
-
static GConfBridge *bridge = NULL; /* Global GConfBridge object */
/* Free up all resources allocated by the GConfBridge. Called on exit. */
@@ -154,7 +149,7 @@ gconf_bridge_get (void)
* gconf_bridge_get_client
* @bridge: A #GConfBridge
*
- * Returns the #GConfClient used by @bridge. This is the same #GConfClient
+ * Returns the #GConfClient used by @bridge. This is the same #GConfClient
* as returned by gconf_client_get_default().
*
* Return value: A #GConfClient.
@@ -188,7 +183,7 @@ prop_binding_sync_pref_to_prop (PropBinding *binding,
GConfValue *pref_value)
{
GValue src_value, value;
-
+
/* Make sure we don't enter an infinite synchronizing loop */
g_signal_handler_block (binding->object, binding->prop_notify_id);
@@ -234,7 +229,7 @@ prop_binding_sync_pref_to_prop (PropBinding *binding,
"transform a \"%s\" to a \"%s\".",
g_type_name (src_value.g_type),
g_type_name (value.g_type));
-
+
goto done;
}
@@ -244,7 +239,7 @@ prop_binding_sync_pref_to_prop (PropBinding *binding,
g_object_set_property (binding->object,
binding->prop->name, &src_value);
}
-
+
done:
g_value_unset (&src_value);
g_value_unset (&value);
@@ -402,7 +397,7 @@ prop_binding_pref_changed (GConfClient *client,
prop_binding_sync_pref_to_prop (binding, gconf_value);
}
-/* Performs a scheduled prop-to-pref sync for a prop binding in
+/* Performs a scheduled prop-to-pref sync for a prop binding in
* delay mode */
static gboolean
prop_binding_perform_scheduled_sync (PropBinding *binding)
@@ -412,7 +407,7 @@ prop_binding_perform_scheduled_sync (PropBinding *binding)
binding->sync_timeout_id = 0;
g_object_unref (binding->object);
-
+
return FALSE;
}
@@ -456,7 +451,7 @@ prop_binding_object_destroyed (gpointer user_data,
binding = (PropBinding *) user_data;
binding->object = NULL; /* Don't do anything with the object
at unbind() */
-
+
g_hash_table_remove (bridge->bindings,
GUINT_TO_POINTER (binding->id));
}
@@ -521,7 +516,7 @@ gconf_bridge_bind_property_full (GConfBridge *bridge,
binding->object = object;
binding->prop = pspec;
binding->sync_timeout_id = 0;
-
+
/* Watch GConf key */
binding->val_notify_id =
gconf_client_notify_add (bridge->client, key,
@@ -562,7 +557,7 @@ prop_binding_unbind (PropBinding *binding)
if (binding->delayed_mode && binding->sync_timeout_id > 0) {
/* Perform any scheduled syncs */
g_source_remove (binding->sync_timeout_id);
-
+
/* The object will still be around as we have
* a reference */
prop_binding_perform_scheduled_sync (binding);
@@ -701,7 +696,7 @@ window_binding_window_destroyed (gpointer user_data,
binding = (WindowBinding *) user_data;
binding->window = NULL; /* Don't do anything with the window
at unbind() */
-
+
g_hash_table_remove (bridge->bindings,
GUINT_TO_POINTER (binding->id));
}
@@ -713,7 +708,7 @@ window_binding_window_destroyed (gpointer user_data,
* @window: A #GtkWindow
* @bind_size: TRUE to bind the size of @window
* @bind_pos: TRUE to bind the position of @window
- *
+ *
* On calling this function @window will be resized to the values
* specified by "@key_prefix<!-- -->_width" and "@key_prefix<!-- -->_height"
* and maximixed if "@key_prefix<!-- -->_maximized is TRUE if
@@ -789,7 +784,7 @@ gconf_bridge_bind_window (GConfBridge *bridge,
if (bind_pos) {
char *key;
GConfValue *x_val, *y_val;
-
+
key = g_strconcat (key_prefix, "_x", NULL);
x_val = gconf_client_get (bridge->client, key, NULL);
g_free (key);
@@ -884,7 +879,7 @@ list_store_binding_sync_pref_to_store (ListStoreBinding *binding,
binding->row_inserted_id);
g_signal_handler_block (binding->list_store,
binding->row_deleted_id);
-
+
gtk_list_store_clear (binding->list_store);
list = gconf_value_get_list (value);
@@ -1001,7 +996,7 @@ list_store_binding_store_destroyed (gpointer user_data,
binding = (ListStoreBinding *) user_data;
binding->list_store = NULL; /* Don't do anything with the store
at unbind() */
-
+
g_hash_table_remove (bridge->bindings,
GUINT_TO_POINTER (binding->id));
}
@@ -1024,7 +1019,7 @@ list_store_binding_store_changed_cb (ListStoreBinding *binding)
* @bridge: A #GConfBridge
* @key: A GConf key to be bound
* @list_store: A #GtkListStore
- *
+ *
* On calling this function single string column #GtkListStore @list_store
* will be kept synchronized with the GConf string list value pointed to by
* @key. On calling this function @list_store will be populated with the
@@ -1197,7 +1192,7 @@ gconf_bridge_unbind (GConfBridge *bridge,
/* This will trigger the hash tables value destruction
* function, which will take care of further cleanup */
- g_hash_table_remove (bridge->bindings,
+ g_hash_table_remove (bridge->bindings,
GUINT_TO_POINTER (binding_id));
}