Example #1
0
static void macmenu_write_gconf(MacMenu* mmb)
{
  gchar* prefkey = panel_applet_get_preferences_key(mmb->applet);
  gchar* fullkey = g_strdup_printf("%s/%s", prefkey, "hide_label");
  gconf_client_set_bool(mmb->gconf, fullkey, mmb->hide_label, NULL);
  g_free(prefkey);
  g_free(fullkey);
}
/**
 * panel_applet_gconf_get_full_key:
 * @applet: a #PanelApplet.
 * @key: a GConf key name.
 *
 * Returns the full GConf path of @key, in the per-instance GConf directory of
 * @applet. The string should be freed by the caller.
 *
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 **/
gchar *
panel_applet_gconf_get_full_key (PanelApplet *applet,
				 const gchar *key)
{
	gchar *prefs_key;
	gchar *full_key;

	g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);

	if (!key)
		return NULL;

	prefs_key = panel_applet_get_preferences_key (applet);

	full_key = g_strdup_printf ("%s/%s", prefs_key, key);

	g_free (prefs_key);

	return full_key;
}