[gnome-panel/features/port-gsettings: 1/9] wncklet: remove unneeded code and rename function
- From: Philipp Kaluza <phk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/features/port-gsettings: 1/9] wncklet: remove unneeded code and rename function
- Date: Sun, 24 Aug 2014 11:20:25 +0000 (UTC)
commit 19dced6622c3fc20dc73b9dfce76be5d71f2a86f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Nov 17 00:38:19 2013 +0200
wncklet: remove unneeded code and rename function
Function panel_applet_add_preferences was used only with gconf,
but applet now uses gsettings to store/read settings so this
function is not needed anymore.
Renamed function setup_gconf to setup_gsettings as it is more
correct name for this function.
applets/wncklet/window-list.c | 6 ++----
applets/wncklet/workspace-switcher.c | 8 +++-----
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index ff74dbc..f2fbe0b 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -267,7 +267,7 @@ move_unminimized_windows_changed (GSettings *settings,
}
static void
-setup_gconf (TasklistData *tasklist)
+setup_gsettings (TasklistData *tasklist)
{
tasklist->settings =
panel_applet_settings_new (PANEL_APPLET (tasklist->applet),
@@ -364,9 +364,7 @@ window_list_applet_fill (PanelApplet *applet)
PANEL_APPLET_EXPAND_MINOR |
PANEL_APPLET_HAS_HANDLE);
- panel_applet_add_preferences (applet, "/schemas/apps/window_list_applet/prefs", NULL);
-
- setup_gconf (tasklist);
+ setup_gsettings (tasklist);
tasklist->include_all_workspaces = g_settings_get_boolean (tasklist->settings,
"display-all-workspaces");
tasklist->grouping = g_settings_get_enum (tasklist->settings, "group-windows");
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index 9139a41..8b86fa4 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -287,7 +287,7 @@ all_workspaces_changed (GSettings *settings,
}
static void
-setup_gconf (PagerData *pager)
+setup_gsettings (PagerData *pager)
{
pager->settings =
panel_applet_settings_new (PANEL_APPLET (pager->applet),
@@ -308,16 +308,14 @@ workspace_switcher_applet_fill (PanelApplet *applet)
GtkActionGroup *action_group;
GtkAction *action;
gboolean display_names;
-
- panel_applet_add_preferences (applet, "/schemas/apps/workspace_switcher_applet/prefs", NULL);
-
+
pager = g_new0 (PagerData, 1);
pager->applet = GTK_WIDGET (applet);
panel_applet_set_flags (PANEL_APPLET (pager->applet), PANEL_APPLET_EXPAND_MINOR);
- setup_gconf (pager);
+ setup_gsettings (pager);
pager->n_rows = g_settings_get_int (pager->settings, "num-rows");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]