Ejemplo n.º 1
0
static void
preferences_hookup_string_combo (EmpathyPreferences *preferences,
				 const gchar       *key,
				 GtkWidget         *widget)
{
	guint id;

	preferences_widget_sync_string_combo (key, widget);

	g_object_set_data_full (G_OBJECT (widget), "key",
				g_strdup (key), g_free);

	g_signal_connect (widget,
			  "changed",
			  G_CALLBACK (preferences_string_combo_changed_cb),
			  NULL);

	id = empathy_conf_notify_add (empathy_conf_get (),
				      key,
				      preferences_notify_string_combo_cb,
				      widget);
	if (id) {
		preferences_add_id (preferences, id);
	}
}
Ejemplo n.º 2
0
static void
preferences_notify_string_combo_cb (EmpathyConf  *conf,
				    const gchar *key,
				    gpointer     user_data)
{
	preferences_widget_sync_string_combo (key, user_data);
}
Ejemplo n.º 3
0
static void preferences_hookup_string_combo(PreferencesDialog *prefs, const gchar *key, GtkComboBox *combo_box){
	guint id;

	preferences_widget_sync_string_combo(key, combo_box);

	g_object_set_data_full(G_OBJECT(combo_box), "key", g_strdup(key), g_free);

	g_signal_connect(combo_box, "changed", (GCallback)preferences_string_combo_changed_cb, prefs);

	if((id=gconfig_notify_add(g_strdup(key), preferences_notify_string_combo_cb, combo_box)))
		preferences_add_id(prefs, id);
}
Ejemplo n.º 4
0
static void preferences_notify_string_combo_cb(const gchar *key, gpointer user_data){
	debug("Saving preference: %s", key);
	preferences_widget_sync_string_combo(key, user_data);
}