gint saveOptions() { if(SHASH("username") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/username", SHASH("username"), NULL); if((SHASH("password") != NULL) && (iSHASH("savepw") == TRUE)) gconf_client_set_string(gcfg, GCONF_BASE"/password", SHASH("password"), NULL); if(SHASH("domain") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/domain", SHASH("domain"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/savepw", iSHASH("savepw"), NULL); gconf_client_set_int(gcfg, GCONF_BASE"/rdp_protocol", iSHASH("rdp_protocol"), NULL); if(SHASH("geometry") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/geometry", SHASH("geometry"), NULL); if(SHASH("keymap") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/keymap", SHASH("keymap"), NULL); gconf_client_set_int(gcfg, GCONF_BASE"/colorsize", iSHASH("colorsize"), NULL); gconf_client_set_int(gcfg, GCONF_BASE"/sound", iSHASH("sound"), NULL); if(SHASH("program") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/program", SHASH("program"), NULL); if(SHASH("ppath") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/ppath", SHASH("ppath"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/runprog", iSHASH("runprog"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/bitmapupd", iSHASH("bitmapupd"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/motionevt", iSHASH("motionevt"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/hidewmdecoration", iSHASH("hidewmdecoration"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/noencryption", iSHASH("noencryption"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/wmkeybindings", iSHASH("wmkeybindings"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/attconsole", iSHASH("attconsole"), NULL); if(SHASH("clientname") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/clientname", SHASH("clientname"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/usessh", iSHASH("usessh"), NULL); if(SHASH("sshuser") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/sshuser", SHASH("sshuser"), NULL); if(SHASH("sshhost") != NULL) gconf_client_set_string(gcfg, GCONF_BASE"/sshhost", SHASH("sshhost"), NULL); gconf_client_set_bool(gcfg, GCONF_BASE"/showopts", iSHASH("showopts"), NULL); return(0); }
void lmplayer_search_init(LmplayerObject *lmplayer) { gchar *database; gchar *path; database = gconf_client_get_string(lmplayer->gc, GCONF_PREFIX"/library_database", NULL); if(!database || strlen(database) < 1) { database = g_build_filename((const char*)getenv("HOME"), ".lmplayer/media.database", NULL); gconf_client_set_string(lmplayer->gc, GCONF_PREFIX"/library_database", (const gchar*)database, NULL); } path = gconf_client_get_string(lmplayer->gc, GCONF_PREFIX"/library_path", NULL); if(!path) { path = g_build_filename((const char*)getenv("HOME"), _("Music"), NULL); gconf_client_set_string(lmplayer->gc, GCONF_PREFIX"/library_path", (const gchar*)path, NULL); } search_library_init(database, path); g_free(database); g_free(path); }
/* Preferences Callback : Change color. */ void preferences_color_cb (GtkWidget *button, gpointer data) { GdkColor color, font_color; char *color_str, *font_color_str; gtk_color_button_get_color ( GTK_COLOR_BUTTON (stickynotes->w_prefs_color), &color); gtk_color_button_get_color ( GTK_COLOR_BUTTON (stickynotes->w_prefs_font_color), &font_color); color_str = g_strdup_printf ("#%.2x%.2x%.2x", color.red / 256, color.green / 256, color.blue / 256); font_color_str = g_strdup_printf ("#%.2x%.2x%.2x", font_color.red / 256, font_color.green / 256, font_color.blue / 256); gconf_client_set_string (stickynotes->gconf, GCONF_PATH "/defaults/color", color_str, NULL); gconf_client_set_string (stickynotes->gconf, GCONF_PATH "/defaults/font_color", font_color_str, NULL); g_free (color_str); g_free (font_color_str); }
static void construct(Uptime_plug_data **p) { *p = g_malloc(sizeof(Uptime_plug_data)); Uptime_plug_data * data = *p; GConfValue *value; gchar * svalue; data->timer = 1000; data->forceupdate = FALSE; svalue = gconf_client_get_string(get_dashboard_gconf(), GCONF_UPTIME_NO_GTK_BG, NULL); if (!svalue) { gconf_client_set_string(get_dashboard_gconf(), GCONF_UPTIME_NO_GTK_BG, svalue = g_strdup("999999d6"), NULL); } awn_cairo_string_to_color(svalue, &data->bg); g_free(svalue); svalue = gconf_client_get_string(get_dashboard_gconf(), GCONF_UPTIME_NO_GTK_FG, NULL); if (!svalue) { gconf_client_set_string(get_dashboard_gconf(), GCONF_UPTIME_NO_GTK_FG, svalue = g_strdup("000000bb"), NULL); } awn_cairo_string_to_color(svalue, &data->fg); g_free(svalue); value = gconf_client_get(get_dashboard_gconf(), GCONF_UPTIME_SIZE_MULT, NULL); if (value) { data->size_mult = gconf_client_get_float(get_dashboard_gconf(), GCONF_UPTIME_SIZE_MULT, NULL); } else { data->size_mult = 2.0; } value = gconf_client_get(get_dashboard_gconf(), GCONF_UPTIME_SHOW_SECONDS, NULL); if (value) { data->show_seconds = gconf_client_get_bool(get_dashboard_gconf(), GCONF_UPTIME_SHOW_SECONDS, NULL); } else { data->show_seconds = FALSE; } }
void notify_demo(GConfClient* client) { gconf_client_add_dir(client, "/apps/demo", GCONF_CLIENT_PRELOAD_NONE, NULL); gconf_client_notify_add(client, string_key, on_notify, NULL, NULL, NULL); gconf_client_set_string(client, string_key, "string_new_value", NULL); gconf_client_set_string(client, string_key, "string_new_value1", NULL); return; }
/* Sets the timezone. If set to NULL it defaults to UTC. FIXME: Should check it is being set to a valid timezone. */ void calendar_config_set_timezone (gchar *timezone) { calendar_config_init (); if (timezone && timezone[0]) gconf_client_set_string (config, CALENDAR_CONFIG_TIMEZONE, timezone, NULL); else gconf_client_set_string (config, CALENDAR_CONFIG_TIMEZONE, "UTC", NULL); }
/** * gnome_vfs_connect_to_server: * @uri: The string representation of the server to connect to. * @display_name: The display name that is used to identify the server connection. * @icon: The icon that is used to identify the server connection. * * This function adds a server connection to the specified @uri, which is displayed * in user interfaces with the specified @display_name and @icon. * * If this function is invoked successfully, the created server shows up in the * list of mounted volumes of the #GnomeVFSVolumeMonitor, which can be queried * using gnome_vfs_volume_monitor_get_mounted_volumes(). * * <note> * <para> * This function does not have a return value. Hence, you can't easily detect * whether the specified server was successfully created. The actual creation and * consumption of the new server through the #GnomeVFSVolumeMonitor is done * asynchronously. * </para> * <para> * @uri, @display_name, and @icon can be freely chosen, but should be meaningful: * </para> * <para> * @uri should refer to a valid location. You can check the validity of the * location by calling gnome_vfs_uri_new() with @uri, and checking whether * the return value is not %NULL. * </para> * <para> * The @display_name should be queried from the user, and an empty string * should not be considered valid. * </para> * <para> * @icon typically references an icon from the icon theme. Some * implementations currently use <literal>gnome-fs-smb</literal>, * <literal>gnome-fs-ssh</literal>, <literal>gnome-fs-ftp</literal> and * <literal>gnome-fs-share</literal>, depending on the type of the server * referenced by @uri. The icon naming conventions might change in the * future, though. Obeying the <ulink * url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html"> * freedesktop.org Icon Naming Specification</ulink> is suggested. * </para> * </note> * * Since: 2.6 */ void gnome_vfs_connect_to_server (const char *uri, const char *display_name, const char *icon) { GConfClient *client; GSList *dirs, *l; char *dir, *dir_id; int max_id, gconf_id; char *key; char *id; client = gconf_client_get_default (); max_id = 0; dirs = gconf_client_all_dirs (client, CONNECTED_SERVERS_DIR, NULL); for (l = dirs; l != NULL; l = l->next) { dir = l->data; dir_id = strrchr (dir, '/'); if (dir_id != NULL) { dir_id++; gconf_id = strtol (dir_id, NULL, 10); max_id = MAX (max_id, gconf_id); } g_free (dir); } g_slist_free (dirs); id = g_strdup_printf ("%d", max_id + 1); key = g_strconcat (CONNECTED_SERVERS_DIR "/", id, "/icon", NULL); gconf_client_set_string (client, key, icon, NULL); g_free (key); key = g_strconcat (CONNECTED_SERVERS_DIR "/", id, "/display_name", NULL); gconf_client_set_string (client, key, display_name, NULL); g_free (key); /* Uri key creation triggers creation, do this last */ key = g_strconcat (CONNECTED_SERVERS_DIR "/", id, "/uri", NULL); gconf_client_set_string (client, key, uri, NULL); g_free (key); g_free (id); g_object_unref (client); }
static void visual_bell_type_toggle_cb (GtkWidget *button, CcUaPanel *panel) { const gchar *key = "/apps/metacity/general/visual_bell_type"; gboolean window_title; window_title = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); if (window_title) gconf_client_set_string (panel->priv->client, key, "frame_flash", NULL); else gconf_client_set_string (panel->priv->client, key, "fullscreen", NULL); }
gboolean panel_menu_button_create (PanelToplevel *toplevel, int position, const char *filename, const char *menu_path, gboolean use_menu_path, const char *tooltip) { GConfClient *client; const char *scheme; const char *key; char *id; client = panel_gconf_get_client (); id = panel_profile_prepare_object (PANEL_OBJECT_MENU, toplevel, position, FALSE); key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, id, "use_menu_path"); gconf_client_set_bool (client, key, use_menu_path, NULL); scheme = panel_menu_filename_to_scheme (filename); if (filename && !scheme) { g_warning ("Failed to find menu scheme for %s\n", filename); g_free (id); return FALSE; } if (use_menu_path && menu_path && menu_path [0] && scheme) { char *menu_uri; menu_uri = g_strconcat (scheme, ":", menu_path, NULL); key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, id, "menu_path"); gconf_client_set_string (client, key, menu_uri, NULL); g_free (menu_uri); } if (tooltip && tooltip [0]) { key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, id, "tooltip"); gconf_client_set_string (client, key, tooltip, NULL); } panel_profile_add_to_list (PANEL_GCONF_OBJECTS, id); g_free (id); return TRUE; }
static PanelToplevel * create_drawer_toplevel (const char *drawer_id) { PanelToplevel *toplevel; GConfClient *client; const char *key; char *toplevel_id; client = panel_gconf_get_client (); toplevel_id = panel_profile_find_new_id (PANEL_GCONF_TOPLEVELS); toplevel = panel_profile_load_toplevel (client, PANEL_CONFIG_DIR, PANEL_GCONF_TOPLEVELS, toplevel_id); if (!toplevel) { g_free (toplevel_id); return NULL; } key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, drawer_id, "attached_toplevel_id"); gconf_client_set_string (client, key, toplevel_id, NULL); g_free (toplevel_id); panel_profile_set_toplevel_enable_buttons (toplevel, TRUE); panel_profile_set_toplevel_enable_arrows (toplevel, TRUE); return toplevel; }
static void url_entry_changed(GtkWidget *entry, EConfig *config) { gchar *uri; EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target; uri = g_strdup (gtk_entry_get_text((GtkEntry *)entry)); g_strstrip (uri); if (uri && uri[0]) { const char *address = e_account_get_string (target->MODIFIED_ACCT, E_ACCOUNT_ID_ADDRESS); GConfClient *client = gconf_client_get_default (); char *key; key = g_strdup_printf ("/apps/activesyncd/accounts/%s/serverUri", address); gconf_client_set_string (client, key, uri, NULL); g_free (key); g_object_unref (client); update_url_account (target->MODIFIED_ACCT, E_ACCOUNT_SOURCE_URL, uri); update_url_account (target->MODIFIED_ACCT, E_ACCOUNT_TRANSPORT_URL, uri); } g_free (uri); }
void gconf_setup() { gchar *str; GConfClient *client = gconf_client_get_default(); if (client == NULL) return; /* we're not running under GConf */ /* * This is deliberately somewhat simple-minded, at least for now. * We care about one thing: Is anything set to handle "bible://"? * * Unfortunate consequence of changing xiphos2 => xiphos: * We must fix broken keys. */ if ((((str = gconf_client_get_string(client, gconf_keys[0][0], NULL)) == NULL) || (strncmp(str, "xiphos ", 7) == 0))) { /* * Mechanical as can be, one after another. */ int i; for (i = 0; i < GS_GCONF_MAX; ++i) { (((i % 3) == 0) /* contrived hack */ ? gconf_client_set_string(client, gconf_keys[i][0], gconf_keys[i][1], NULL) : gconf_client_set_bool(client, gconf_keys[i][0], (gconf_keys[i][1] ? TRUE : FALSE), NULL)); } } }
/** * gpk_prefs_update_combo_changed: **/ static void gpk_prefs_update_combo_changed (GtkWidget *widget, gpointer data) { gchar *value; const gchar *action; GpkUpdateEnum update = GPK_UPDATE_ENUM_UNKNOWN; GConfClient *client; client = gconf_client_get_default (); value = gtk_combo_box_get_active_text (GTK_COMBO_BOX (widget)); if (value == NULL) { egg_warning ("value NULL"); return; } if (strcmp (value, PK_UPDATE_ALL_TEXT) == 0) { update = GPK_UPDATE_ENUM_ALL; } else if (strcmp (value, PK_UPDATE_SECURITY_TEXT) == 0) { update = GPK_UPDATE_ENUM_SECURITY; } else if (strcmp (value, PK_UPDATE_NONE_TEXT) == 0) { update = GPK_UPDATE_ENUM_NONE; } else { g_assert (FALSE); } action = gpk_update_enum_to_text (update); egg_debug ("Changing %s to %s", GPK_CONF_AUTO_UPDATE, action); gconf_client_set_string (client, GPK_CONF_AUTO_UPDATE, action, NULL); g_free (value); g_object_unref (client); }
void save_settings() { GConfClient* gcClient = NULL; gcClient = gconf_client_get_default(); g_assert(GCONF_IS_CLIENT(gcClient)); gchar *port_path = g_strconcat(config->GC_ROOT, "port", NULL); const gchar *save_server_port = gtk_entry_get_text(GTK_ENTRY(txtServerPort)); if (! gconf_client_set_string(gcClient, port_path, save_server_port, NULL) ) { GtkWidget *failDialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Failed to update server port setting\n"); gtk_dialog_run (GTK_DIALOG (failDialog)); gtk_widget_destroy (failDialog); } gchar *update_path = g_strconcat(config->GC_ROOT, "update", NULL); const gchar *save_update_interval = gtk_entry_get_text(GTK_ENTRY(txtUpdateInterval)); if (! gconf_client_set_int(gcClient, update_path, g_ascii_strtod(save_update_interval, NULL), NULL) ) { GtkWidget *failDialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "Failed to update update interval setting\n"); gtk_dialog_run (GTK_DIALOG (failDialog)); gtk_widget_destroy (failDialog); } g_object_unref(gcClient); gcClient = NULL; }
static void username_entry_changed (GtkWidget *entry, EConfig *config) { gchar *name; EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target; name = g_strdup (gtk_entry_get_text((GtkEntry *)entry)); g_strstrip (name); if (name && name[0]) { const char *address = e_account_get_string (target->MODIFIED_ACCT, E_ACCOUNT_ID_ADDRESS); GConfClient *client = gconf_client_get_default (); char *key; key = g_strdup_printf ("/apps/activesyncd/accounts/%s/username", address); gconf_client_set_string (client, key, name, NULL); g_free (key); g_object_unref (client); } g_free (name); }
void save_settings(const GBoggleSettings *settings) { GConfClient *gconf_client = gconf_client_get_default(); gboolean res; gint saved_game_time; g_assert(settings); if (settings->language) { res = gconf_client_set_string(gconf_client, GCONF_KEY_LANGUAGE, settings->language, NULL); if (!res) { g_warning("saving %s into gconf was failed", GCONF_KEY_LANGUAGE); } } if (settings->game_time == 0) { saved_game_time = -1; } else { saved_game_time = settings->game_time; } res = gconf_client_set_int(gconf_client, GCONF_KEY_GAME_TIME, saved_game_time, NULL); if (!res) { g_warning("saving %s into gconf was failed", GCONF_KEY_GAME_TIME); } else { DEBUGMSG("Saved game time as %d\n", saved_game_time); } }
static void url_entry_changed(GtkWidget *entry, EConfig *config) { gchar *uri; EMConfigTargetSettings *target = (EMConfigTargetSettings *)config->target; uri = g_strdup (gtk_entry_get_text((GtkEntry *)entry)); g_strstrip (uri); if (uri && uri[0]) { const char *address = target->email_address; GConfClient *client = gconf_client_get_default (); char *key; key = g_strdup_printf ("/apps/activesyncd/accounts/%s/serverUri", address); gconf_client_set_string (client, key, uri, NULL); g_free (key); g_object_unref (client); camel_eas_settings_set_account_uid ((CamelEasSettings *)target->storage_settings, address); camel_eas_settings_set_account_uid ((CamelEasSettings *)target->transport_settings, address); } g_free (uri); }
/* * Class: gnu_java_util_prefs_gconf_GConfNativePeer * Method: gconf_client_set_string * Signature: (Ljava/lang/String;Ljava/lang/String;)Z */ JNIEXPORT jboolean JNICALL Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1set_1string (JNIEnv *env, jclass clazz __attribute__ ((unused)), jstring key, jstring value) { const char *_key = NULL; const char *_value = NULL; GError *err = NULL; gboolean result = JNI_FALSE; /* load an UTF string from the virtual machine. */ _key = JCL_jstring_to_cstring (env, key); _value = JCL_jstring_to_cstring (env, value); if (_key == NULL || _value == NULL) { return JNI_FALSE; } gdk_threads_enter (); result = gconf_client_set_string (client, _key, _value, &err); gdk_threads_leave (); if (err != NULL) { g_error_free (err); err = NULL; result = JNI_FALSE; } JCL_free_cstring (env, key, _key); JCL_free_cstring (env, value, _value); return (jboolean) result; }
static void on_keyCombEntry_changed (GtkEntry *entry, gpointer user_data) { const gchar* value = gtk_entry_get_text (entry); gconf_client_set_string (global_conf, KEY_COMBINATION_KEY, value, NULL); }
void calendar_config_set_primary_memos (const char *primary_uid) { calendar_config_init (); gconf_client_set_string (config, CALENDAR_CONFIG_PRIMARY_MEMOS, primary_uid, NULL); }
void gm_pref_store_set_string(GmPrefStore * store, const gchar * key, gchar * value) { if (store == NULL) return; #if HAVE_GSETTINGS if (value == NULL) { g_settings_reset(store->settings, key); } else { g_settings_set_string(store->settings, key, value); } #else #ifdef HAVE_GCONF gchar *full_key; full_key = g_strdup_printf("/apps/%s/preferences/%s", store->context, key); gconf_client_unset(store->gconf, full_key, NULL); if (value != NULL && strlen(g_strstrip(value)) > 0) gconf_client_set_string(store->gconf, full_key, value, NULL); g_free(full_key); #else if (value != NULL && strlen(g_strstrip(value)) > 0) { g_key_file_set_string(store->keyfile, store->context, key, value); } else { g_key_file_remove_key(store->keyfile, store->context, key, NULL); } #endif #endif }
/** * calendar_config_set_default_reminder_units: * @units: Time units, e.g. CAL_MINUTES for "5 minutes". * * Sets the units to be used for default reminders in new appointments. **/ void calendar_config_set_default_reminder_units (CalUnits units) { calendar_config_init (); gconf_client_set_string (config, CALENDAR_CONFIG_DEFAULT_REMINDER_UNITS, units_to_string(units), NULL); }
/** * e_account_list_get_default: * @accounts: * * Get the default account. If no default is specified, or the default * has become stale, then the first account is made the default. * * Return value: The account or NULL if no accounts are defined. **/ const EAccount * e_account_list_get_default(EAccountList *accounts) { char *uid; EIterator *it; const EAccount *account = NULL; uid = gconf_client_get_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", NULL); it = e_list_get_iterator ((EList *)accounts); if (uid) { for (;e_iterator_is_valid (it);e_iterator_next (it)) { account = (const EAccount *)e_iterator_get (it); if (!strcmp(uid, account->uid)) break; account = NULL; } e_iterator_reset(it); } /* no uid or uid not found, @it will be at the first account */ if (account == NULL && e_iterator_is_valid(it)) { account = (const EAccount *) e_iterator_get (it); gconf_client_set_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", account->uid, NULL); } g_object_unref(it); g_free(uid); return account; }
void set_version (void) { GConfClient *client = gconf_client_get_default (); gconf_client_set_string (client, "/apps/xchat/version", PACKAGE_VERSION, NULL); g_object_unref (client); }
static void widget_entry_changed_cb (GtkWidget *widget, gpointer data) { const gchar *value; gint port = -1; GConfClient *client; client = gconf_client_get_default (); /* * Do not change the order of comparison - * GtkSpinButton is an extended form of GtkEntry */ if (GTK_IS_SPIN_BUTTON (widget)) { port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget)); gconf_client_set_int (client, (const gchar *) data, port, NULL); d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, port)); } else if (GTK_IS_ENTRY (widget)) { value = gtk_entry_get_text (GTK_ENTRY (widget)); gconf_client_set_string (client, (const gchar *) data, value, NULL); d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, value)); } g_object_unref (client); }
NS_IMETHODIMP nsGConfService::SetAppForProtocol(const nsACString &aScheme, const nsACString &aCommand) { nsCAutoString key("/desktop/gnome/url-handlers/"); key.Append(aScheme); key.Append("/command"); PRBool res = gconf_client_set_string(mClient, key.get(), PromiseFlatCString(aCommand).get(), nsnull); if (res) { key.Replace(key.Length() - 7, 7, NS_LITERAL_CSTRING("enabled")); res = gconf_client_set_bool(mClient, key.get(), PR_TRUE, nsnull); if (res) { key.Replace(key.Length() - 7, 7, NS_LITERAL_CSTRING("needs_terminal")); res = gconf_client_set_bool(mClient, key.get(), PR_FALSE, nsnull); if (res) { key.Replace(key.Length() - 14, 14, NS_LITERAL_CSTRING("command-id")); res = gconf_client_unset(mClient, key.get(), nsnull); } } } return res ? NS_OK : NS_ERROR_FAILURE; }
static void panel_drawer_prepare (const char *drawer_id, const char *custom_icon, gboolean use_custom_icon, const char *tooltip, char **attached_toplevel_id) { GConfClient *client; const char *key; client = panel_gconf_get_client (); if (tooltip) { key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, drawer_id, "tooltip"); gconf_client_set_string (client, key, tooltip, NULL); } key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, drawer_id, "use_custom_icon"); gconf_client_set_bool (client, key, use_custom_icon, NULL); if (custom_icon) { key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, drawer_id, "custom_icon"); gconf_client_set_string (client, key, custom_icon, NULL); } if (attached_toplevel_id) { char *toplevel_id; char *toplevel_dir; toplevel_id = panel_profile_find_new_id (PANEL_GCONF_TOPLEVELS); toplevel_dir = g_strdup_printf (PANEL_CONFIG_DIR "/toplevels/%s", toplevel_id); panel_gconf_associate_schemas_in_dir (client, toplevel_dir, PANEL_SCHEMAS_DIR "/toplevels"); key = panel_gconf_full_key (PANEL_GCONF_OBJECTS, drawer_id, "attached_toplevel_id"); gconf_client_set_string (client, key, toplevel_id, NULL); key = panel_gconf_full_key (PANEL_GCONF_TOPLEVELS, toplevel_id, "enable_buttons"); gconf_client_set_bool (client, key, TRUE, NULL); key = panel_gconf_full_key (PANEL_GCONF_TOPLEVELS, toplevel_id, "enable_arrows"); gconf_client_set_bool (client, key, TRUE, NULL); *attached_toplevel_id = toplevel_id; } }
void CGnomeSettingsStore::SaveSetting(const std::string &Key, const std::string &Value) { std::string keypath(GCONF_KEY_ROOT); keypath += Key; GError *the_error = NULL; gconf_client_set_string(the_gconf_client, keypath.c_str(), Value.c_str(), &the_error); }
void gm_conf_set_string (const gchar *key, const gchar *v) { g_return_if_fail (key != NULL); gconf_client_set_string (client, key, v, NULL); }
/* Preferences Callback : Change font. */ void preferences_font_cb (GtkWidget *button, gpointer data) { const char *font_str; font_str = gtk_font_button_get_font_name (GTK_FONT_BUTTON (button)); gconf_client_set_string(stickynotes->gconf, GCONF_PATH "/defaults/font", font_str, NULL); }