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 PanelToplevel * create_drawer_toplevel (const char *drawer_id, GSettings *settings) { PanelToplevel *toplevel; char *toplevel_id; toplevel_id = panel_profile_find_new_id (PANEL_GSETTINGS_TOPLEVELS); toplevel = panel_profile_load_toplevel (toplevel_id); if (!toplevel) { g_free (toplevel_id); return NULL; } g_settings_set_string (settings, PANEL_OBJECT_ATTACHED_TOPLEVEL_ID_KEY, toplevel_id); g_free (toplevel_id); panel_profile_set_toplevel_enable_buttons (toplevel, TRUE); panel_profile_set_toplevel_enable_arrows (toplevel, TRUE); return toplevel; }