[gnome-packagekit] Remove the gpk-update-icon process, the functionality has been moved to gnome-settings-daemon



commit 3eb5c683d694050c12f438545b647362ebf8f0d3
Author: Richard Hughes <richard hughsie com>
Date:   Tue Feb 22 08:54:17 2011 +0000

    Remove the gpk-update-icon process, the functionality has been moved to gnome-settings-daemon

 data/Makefile.am                          |    4 -
 data/gpk-update-icon.desktop.in           |   10 -
 data/org.gnome.packagekit.gschema.migrate |   27 -
 data/org.gnome.packagekit.gschema.xml     |  135 ---
 po/POTFILES.in                            |    8 -
 src/Makefile.am                           |   22 -
 src/gpk-auto-refresh.c                    |  658 ------------
 src/gpk-auto-refresh.h                    |   57 -
 src/gpk-check-update.c                    | 1642 -----------------------------
 src/gpk-check-update.h                    |   56 -
 src/gpk-common.h                          |   34 +-
 src/gpk-firmware.c                        | 1060 -------------------
 src/gpk-firmware.h                        |   56 -
 src/gpk-hardware.c                        |  363 -------
 src/gpk-hardware.h                        |   56 -
 src/gpk-inhibit.c                         |  206 ----
 src/gpk-inhibit.h                         |   58 -
 src/gpk-prefs.c                           |   37 +-
 src/gpk-update-icon.c                     |  184 ----
 src/gpk-watch.c                           |  730 -------------
 src/gpk-watch.h                           |   56 -
 21 files changed, 28 insertions(+), 5431 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 7cea37f..f0760ea 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -24,9 +24,6 @@ desktop_in_files =					\
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 @INTLTOOL_DESKTOP_RULE@
-autostartdir = $(datadir)/gnome/autostart
-autostart_in_files = gpk-update-icon.desktop.in
-autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
 
 pkgdata_DATA =						\
 	gpk-eula.ui					\
@@ -68,7 +65,6 @@ DISTCLEANFILES =					\
 	gpk-install-catalog.desktop			\
 	gpk-install-file.desktop			\
 	gpk-log.desktop					\
-	gpk-update-icon.desktop				\
 	gpk-application.desktop				\
 	gpk-distro-upgrade.desktop			\
 	org.freedesktop.PackageKit.service		\
diff --git a/data/org.gnome.packagekit.gschema.migrate b/data/org.gnome.packagekit.gschema.migrate
index edaa19f..cb662e3 100644
--- a/data/org.gnome.packagekit.gschema.migrate
+++ b/data/org.gnome.packagekit.gschema.migrate
@@ -1,33 +1,9 @@
 [org.gnome.packagekit]
-enable-check-firmware = /apps/gnome-packagekit/enable_check_firmware
-banned-firmware = /apps/gnome-packagekit/update-icon/banned_firmware
-ignored-devices = /apps/gnome-packagekit/update-icon/ignored_devices
-ignored-messages = /apps/gnome-packagekit/update-icon/ignored_messages
-enable-check-hardware = /apps/gnome-packagekit/enable_check_hardware
 enable-autoremove = /apps/gnome-packagekit/enable_autoremove
 show-depends = /apps/gnome-packagekit/show_depends
 show-copy-confirm = /apps/gnome-packagekit/show_copy_confirm
-notify-update-failed = /apps/gnome-packagekit/update-icon/notify_update_failed
-notify-update-complete = /apps/gnome-packagekit/update-icon/notify_update_complete
-notify-update-complete-restart = /apps/gnome-packagekit/update-icon/notify_update_complete_restart
-notify-update-not-battery = /apps/gnome-packagekit/update-icon/notify_update_not_battery
-notify-update-started = /apps/gnome-packagekit/update-icon/notify_update_started
-notify-message = /apps/gnome-packagekit/update-icon/notify_message
-notify-errors = /apps/gnome-packagekit/update-icon/notify_errors
-notify-complete = /apps/gnome-packagekit/update-icon/notify_complete
-notify-available = /apps/gnome-packagekit/update-icon/notify_available
-notify-distro-upgrades = /apps/gnome-packagekit/update-icon/notify_distro_upgrades
-notify-critical = /apps/gnome-packagekit/update-icon/notify_critical
-connection-use-mobile = /apps/gnome-packagekit/update-icon/connection_use_mobile
-connection-use-wifi = /apps/gnome-packagekit/update-icon/connection_use_wifi
 watch-active-transactions = /apps/gnome-packagekit/update-icon/watch_active_transactions
 autocomplete = /apps/gnome-packagekit/autocomplete
-session-startup-timeout = /apps/gnome-packagekit/update-icon/session_startup_timeout
-force-get-updates-login = /apps/gnome-packagekit/update-icon/force_get_updates_login
-frequency-get-updates = /apps/gnome-packagekit/update-icon/frequency_get_updates
-frequency-get-upgrades = /apps/gnome-packagekit/update-icon/frequency_get_upgrades
-frequency-refresh-cache = /apps/gnome-packagekit/update-icon/frequency_refresh_cache
-update-battery = /apps/gnome-packagekit/update-icon/update_battery
 filter-basename = /apps/gnome-packagekit/application/filter_basename
 filter-newest = /apps/gnome-packagekit/application/filter_newest
 filter-arch = /apps/gnome-packagekit/application/filter_arch
@@ -43,6 +19,3 @@ enable-codec-helper = /apps/gnome-packagekit/enable_codec_helper
 enable-mime-type-helper = /apps/gnome-packagekit/enable_mime_type_helper
 dbus-default-interaction = /apps/gnome-packagekit/dbus_default_interaction
 dbus-enforced-interaction = /apps/gnome-packagekit/dbus_enforced_interaction
-install-root = /apps/gnome-packagekit/install_root
-media-repo-filenames = /apps/gnome-packagekit/media_repo_filenames
-
diff --git a/data/org.gnome.packagekit.gschema.xml b/data/org.gnome.packagekit.gschema.xml
index 5f1f7d0..a1f0a2b 100644
--- a/data/org.gnome.packagekit.gschema.xml
+++ b/data/org.gnome.packagekit.gschema.xml
@@ -1,40 +1,10 @@
 <schemalist>
-  <enum id="org.gnome.packagekit.AutoUpdateType">
-    <value nick="all" value="0"/>
-    <value nick="security" value="1"/>
-    <value nick="none" value="2"/>
-  </enum>
   <enum id="org.gnome.packagekit.SearchType">
     <value nick="name" value="0"/>
     <value nick="details" value="1"/>
     <value nick="file" value="2"/>
   </enum>
   <schema id="org.gnome.packagekit" path="/apps/gnome-packagekit/">
-    <key name="enable-check-firmware" type="b">
-      <default>true</default>
-      <summary>Ask the user if additional firmware should be installed</summary>
-      <description>Ask the user if additional firmware should be installed.</description>
-    </key>
-    <key name="banned-firmware" type="s">
-      <default>'*/intel-ucode/*'</default>
-      <summary>Firmware files that should not be searched for</summary>
-      <description>Firmware files that should not be searched for, separated by commas. These can include '*' and '?' characters.</description>
-    </key>
-    <key name="ignored-devices" type="s">
-      <default>''</default>
-      <summary>Devices that should be ignored</summary>
-      <description>Devices that should be ignored, separated by commas. These can include '*' and '?' characters.</description>
-    </key>
-    <key name="ignored-messages" type="s">
-      <default>'backend-*,untrusted-package,other-updates-held-back,repo-metadata-download-failed'</default>
-      <summary>Messages that should be ignored</summary>
-      <description>Messages that should be ignored, separated by commas. These can include '*' and '?' characters.</description>
-    </key>
-    <key name="enable-check-hardware" type="b">
-      <default>false</default>
-      <summary>Ask the user if additional hardware drivers should be installed</summary>
-      <description>Ask the user if additional hardware drivers should be installed.</description>
-    </key>
     <key name="enable-autoremove" type="b">
       <default>false</default>
       <summary>Automatically remove unused dependencies</summary>
@@ -50,111 +20,11 @@
       <summary>Ask the user if files should be copied to a non-private directory</summary>
       <description>Ask the user if files should be copied to a non-private directory when installing from a FUSE mount.</description>
     </key>
-    <key name="notify-update-failed" type="b">
-      <default>true</default>
-      <summary>Notify the user when an update has failed</summary>
-      <description>Notify the user when an update has failed.</description>
-    </key>
-    <key name="notify-update-complete" type="b">
-      <default>false</default>
-      <summary>Notify the user for completed updates</summary>
-      <description>Notify the user for completed updates.</description>
-    </key>
-    <key name="notify-update-complete-restart" type="b">
-      <default>true</default>
-      <summary>Notify the user for completed updates where the user needs to restart</summary>
-      <description>Notify the user for completed updates where the user needs to restart.</description>
-    </key>
-    <key name="notify-update-not-battery" type="b">
-      <default>false</default>
-      <summary>Notify the user when the automatic update was not started on battery power</summary>
-      <description>Notify the user when the update was not automatically started while running on battery power.</description>
-    </key>
-    <key name="notify-update-started" type="b">
-      <default>true</default>
-      <summary>Notify the user when the update was started</summary>
-      <description>Notify the user when the update was started.</description>
-    </key>
-    <key name="notify-message" type="b">
-      <default>false</default>
-      <summary>Notify the user when there are messages</summary>
-      <description>Notify the user when there are messages from the package manager.</description>
-    </key>
-    <key name="notify-errors" type="b">
-      <default>true</default>
-      <summary>Notify the user when there are errors</summary>
-      <description>Notify the user when there are errors.</description>
-    </key>
-    <key name="notify-complete" type="b">
-      <default>true</default>
-      <summary>Notify the user when a task is complete</summary>
-      <description>Notify the user when a task is complete.</description>
-    </key>
-    <key name="notify-available" type="b">
-      <default>true</default>
-      <summary>Notify the user when updates are available</summary>
-      <description>Notify the user when updates are available.</description>
-    </key>
-    <key name="notify-distro-upgrades" type="b">
-      <default>true</default>
-      <summary>Notify the user when distribution upgrades are available</summary>
-      <description>Notify the user when distribution upgrades are available.</description>
-    </key>
-    <key name="notify-critical" type="b">
-      <default>true</default>
-      <summary>Notify the user when security updates are available</summary>
-      <description>Notify the user when security updates are available.</description>
-    </key>
-    <key name="connection-use-mobile" type="b">
-      <default>false</default>
-      <summary>Use mobile broadband connections</summary>
-      <description>Use mobile broadband connections such as GSM and CDMA to check for updates.</description>
-    </key>
-    <key name="connection-use-wifi" type="b">
-      <default>true</default>
-      <summary>Use WiFi connections</summary>
-      <description>Use WiFi (wireless LAN) connections to check for updates.</description>
-    </key>
     <key name="autocomplete" type="b">
       <default>false</default>
       <summary>If search terms should be completed automatically</summary>
       <description>If search terms should be completed automatically.</description>
     </key>
-    <key name="session-startup-timeout" type="i">
-      <default>300</default>
-      <summary>The number of seconds at session startup to wait before checking for updates</summary>
-      <description>The number of seconds at session startup to wait before checking for updates.</description>
-    </key>
-    <key name="force-get-updates-login" type="b">
-      <default>false</default>
-      <summary>Get the update list when the session starts</summary>
-      <description>Get the update list when the session starts, even if not scheduled to. This ensures the user has up to date and valid data in the tray at startup.</description>
-    </key>
-    <key name="frequency-get-updates" type="i">
-      <default>86400</default>
-      <summary>How often to check for updates</summary>
-      <description>How often to check for updates. Value is in seconds.</description>
-    </key>
-    <key name="frequency-get-upgrades" type="i">
-      <default>604800</default>
-      <summary>How often to check for distribution upgrades</summary>
-      <description>How often to check for distribution upgrades. Value is in seconds.</description>
-    </key>
-    <key name="frequency-refresh-cache" type="i">
-      <default>86400</default>
-      <summary>How often to refresh the package cache</summary>
-      <description>How often to refresh the package cache. Value is in seconds.</description>
-    </key>
-    <key name="auto-update" enum="org.gnome.packagekit.AutoUpdateType">
-      <default>'none'</default>
-      <summary>Automatically update these types of updates</summary>
-      <description>Automatically update these types of updates.</description>
-    </key>
-    <key name="update-battery" type="b">
-      <default>false</default>
-      <summary>Install updates automatically when running on battery power</summary>
-      <description>Install updates automatically when running on battery power.</description>
-    </key>
     <key name="filter-basename" type="b">
       <default>false</default>
       <summary>Filter using basename in gpk-application</summary>
@@ -233,11 +103,6 @@
       <default>'show-confirm-install'</default>
       <description>When displaying UI from a session DBus request, force these options to be turned on.</description>
     </key>
-    <key name="media-repo-filenames" type="s">
-      <default>'media.repo,.discinfo'</default>
-      <summary>The filenames on removable media that designate it important.</summary>
-      <description>When removable media is inserted, it is checked to see if it contains any important filenames in the root directory. If the filename matches, then an updates check is performed. This allows post-install disks to be used to update running systems.</description>
-    </key>
   </schema>
   <schema id="org.gnome.settings-daemon" path="/apps/gnome-settings-daemon/">
     <child name="gtk-modules" schema="gnome-settings-daemon.gtk-modules"/>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9b36939..55cc113 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,13 +16,11 @@ data/gpk-prefs.desktop.in
 [type: gettext/glade]data/gpk-service-pack.desktop.in
 [type: gettext/glade]data/gpk-service-pack.ui
 [type: gettext/glade]data/gpk-signature.ui
-data/gpk-update-icon.desktop.in
 data/gpk-update-viewer.desktop.in
 data/gpk-distro-upgrade.desktop.in
 [type: gettext/glade]data/gpk-update-viewer.ui
 python/packagekit/gtkwidgets.py
 src/gpk-application.c
-src/gpk-check-update.c
 src/gpk-common.c
 src/gpk-dbus-task.c
 src/gpk-desktop.c
@@ -30,12 +28,9 @@ src/gpk-dialog.c
 src/gpk-distro-upgrade.c
 src/gpk-enum.c
 src/gpk-error.c
-src/gpk-firmware.c
-src/gpk-hardware.c
 src/gpk-helper-chooser.c
 src/gpk-task.c
 src/gpk-helper-run.c
-src/gpk-inhibit.c
 src/gpk-install-catalog.c
 src/gpk-install-local-file.c
 src/gpk-install-mime-type.c
@@ -45,9 +40,6 @@ src/gpk-log.c
 src/gpk-modal-dialog.c
 src/gpk-prefs.c
 src/gpk-service-pack.c
-src/gpk-update-icon.c
 src/gpk-update-viewer.c
 src/gpk-dbus-service.c
-src/gpk-watch.c
 src/gpk-debug.c
-
diff --git a/src/Makefile.am b/src/Makefile.am
index 90434c9..7c3e974 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -38,7 +38,6 @@ bin_PROGRAMS =						\
 	gpk-install-mime-type				\
 	gpk-install-provide-file			\
 	gpk-install-package-name			\
-	gpk-update-icon					\
 	gpk-update-viewer				\
 	gpk-log						\
 	gpk-dbus-service				\
@@ -157,27 +156,6 @@ gpk_distro_upgrade_LDADD =				\
 	libgpkshared.a					\
 	$(shared_LIBS)
 
-gpk_update_icon_SOURCES =				\
-	gpk-update-icon.c				\
-	gpk-check-update.c				\
-	gpk-check-update.h				\
-	gpk-auto-refresh.c				\
-	gpk-auto-refresh.h				\
-	gpk-watch.c					\
-	gpk-watch.h					\
-	gpk-firmware.c					\
-	gpk-firmware.h					\
-	gpk-hardware.c					\
-	gpk-hardware.h					\
-	gpk-inhibit.c					\
-	gpk-inhibit.h					\
-	$(NULL)
-
-gpk_update_icon_LDADD =					\
-	libgpkshared.a					\
-	$(shared_LIBS)					\
-	$(NULL)
-
 gpk_dbus_service_SOURCES =				\
 	gpk-dbus-service.c				\
 	gpk-dbus.c					\
diff --git a/src/gpk-common.h b/src/gpk-common.h
index 3db4533..cd4bbdb 100644
--- a/src/gpk-common.h
+++ b/src/gpk-common.h
@@ -33,51 +33,33 @@ G_BEGIN_DECLS
 
 #define GPK_SETTINGS_SCHEMA				"org.gnome.packagekit"
 #define GPK_SETTINGS_AUTOCOMPLETE			"autocomplete"
-#define GPK_SETTINGS_AUTO_UPDATE			"auto-update"
-#define GPK_SETTINGS_BANNED_FIRMWARE			"banned-firmware"
 #define GPK_SETTINGS_CATEGORY_GROUPS			"category-groups"
-#define GPK_SETTINGS_CONNECTION_USE_MOBILE		"connection-use-mobile"
-#define GPK_SETTINGS_CONNECTION_USE_WIFI		"connection-use-wifi"
 #define GPK_SETTINGS_DBUS_DEFAULT_INTERACTION		"dbus-default-interaction"
 #define GPK_SETTINGS_DBUS_ENFORCED_INTERACTION		"dbus-enforced-interaction"
 #define GPK_SETTINGS_ENABLE_AUTOREMOVE			"enable-autoremove"
-#define GPK_SETTINGS_ENABLE_CHECK_FIRMWARE		"enable-check-firmware"
-#define GPK_SETTINGS_ENABLE_CHECK_HARDWARE		"enable-check-hardware"
 #define GPK_SETTINGS_ENABLE_CODEC_HELPER		"enable-codec-helper"
 #define GPK_SETTINGS_ENABLE_FONT_HELPER			"enable-font-helper"
 #define GPK_SETTINGS_ENABLE_MIME_TYPE_HELPER		"enable-mime-type-helper"
 #define GPK_SETTINGS_FILTER_ARCH			"filter-arch"
 #define GPK_SETTINGS_FILTER_BASENAME			"filter-basename"
 #define GPK_SETTINGS_FILTER_NEWEST			"filter-newest"
-#define GPK_SETTINGS_FORCE_GET_UPDATES_LOGIN		"force-get-updates-login"
-#define GPK_SETTINGS_FREQUENCY_GET_UPDATES		"frequency-get-updates"
-#define GPK_SETTINGS_FREQUENCY_GET_UPGRADES		"frequency-get-upgrades"
-#define GPK_SETTINGS_FREQUENCY_REFRESH_CACHE		"frequency-refresh-cache"
 #define GPK_SETTINGS_IGNORED_DBUS_REQUESTS		"ignored-dbus-requests"
-#define GPK_SETTINGS_IGNORED_DEVICES			"ignored-devices"
-#define GPK_SETTINGS_IGNORED_MESSAGES			"ignored-messages"
-#define GPK_SETTINGS_MEDIA_REPO_FILENAMES		"media-repo-filenames"
-#define GPK_SETTINGS_NOTIFY_AVAILABLE			"notify-available"
-#define GPK_SETTINGS_NOTIFY_COMPLETED			"notify-complete"
-#define GPK_SETTINGS_NOTIFY_CRITICAL			"notify-critical"
-#define GPK_SETTINGS_NOTIFY_DISTRO_UPGRADES		"notify-distro-upgrades"
-#define GPK_SETTINGS_NOTIFY_ERROR			"notify-errors"
-#define GPK_SETTINGS_NOTIFY_MESSAGE			"notify-message"
 #define GPK_SETTINGS_NOTIFY_MOBILE_CONNECTION		"notify-mobile-connection"
-#define GPK_SETTINGS_NOTIFY_UPDATE_COMPLETE		"notify-update-complete"
-#define GPK_SETTINGS_NOTIFY_UPDATE_COMPLETE_RESTART	"notify-update-complete-restart"
-#define GPK_SETTINGS_NOTIFY_UPDATE_FAILED		"notify-update-failed"
-#define GPK_SETTINGS_NOTIFY_UPDATE_NOT_BATTERY		"notify-update-not-battery"
-#define GPK_SETTINGS_NOTIFY_UPDATE_STARTED		"notify-update-started"
 #define GPK_SETTINGS_ONLY_NEWEST			"only-newest"
 #define GPK_SETTINGS_REPO_SHOW_DETAILS			"repo-show-details"
 #define GPK_SETTINGS_SCROLL_ACTIVE			"scroll-active"
 #define GPK_SETTINGS_SEARCH_MODE			"search-mode"
-#define GPK_SETTINGS_SESSION_STARTUP_TIMEOUT		"session-startup-timeout"
 #define GPK_SETTINGS_SHOW_ALL_PACKAGES			"show-all-packages"
 #define GPK_SETTINGS_SHOW_COPY_CONFIRM			"show-copy-confirm"
 #define GPK_SETTINGS_SHOW_DEPENDS			"show-depends"
-#define GPK_SETTINGS_UPDATE_BATTERY			"update-battery"
+
+#define GSD_SETTINGS_SCHEMA				"org.gnome.settings-daemon.plugins.updates"
+#define GSD_SETTINGS_AUTO_UPDATE_TYPE			"auto-update-type"
+#define GSD_SETTINGS_CONNECTION_USE_MOBILE		"connection-use-mobile"
+#define GSD_SETTINGS_FREQUENCY_GET_UPDATES		"frequency-get-updates"
+#define GSD_SETTINGS_FREQUENCY_GET_UPGRADES		"frequency-get-upgrades"
+#define GSD_SETTINGS_FREQUENCY_REFRESH_CACHE		"frequency-refresh-cache"
+#define GSD_SETTINGS_UPDATE_BATTERY			"update-battery"
 
 #define GPK_BUGZILLA_URL			"https://bugs.freedesktop.org/";
 
diff --git a/src/gpk-prefs.c b/src/gpk-prefs.c
index f5738be..29129f5 100644
--- a/src/gpk-prefs.c
+++ b/src/gpk-prefs.c
@@ -37,7 +37,8 @@
 typedef struct {
 	const gchar		*id_tmp;
 	GCancellable		*cancellable;
-	GSettings		*settings;
+	GSettings		*settings_gsd;
+	GSettings		*settings_gpk;
 	GtkApplication		*application;
 	GtkBuilder		*builder;
 	GtkListStore		*list_store;
@@ -127,8 +128,8 @@ gpk_prefs_update_freq_combo_changed (GtkWidget *widget, GpkPrefsPrivate *priv)
 	else
 		g_assert (FALSE);
 
-	g_debug ("Changing %s to %i", GPK_SETTINGS_FREQUENCY_GET_UPDATES, freq);
-	g_settings_set_int (priv->settings, GPK_SETTINGS_FREQUENCY_GET_UPDATES, freq);
+	g_debug ("Changing %s to %i", GSD_SETTINGS_FREQUENCY_GET_UPDATES, freq);
+	g_settings_set_int (priv->settings_gsd, GSD_SETTINGS_FREQUENCY_GET_UPDATES, freq);
 	g_free (value);
 }
 
@@ -151,8 +152,8 @@ gpk_prefs_upgrade_freq_combo_changed (GtkWidget *widget, GpkPrefsPrivate *priv)
 	else
 		g_assert (FALSE);
 
-	g_debug ("Changing %s to %i", GPK_SETTINGS_FREQUENCY_GET_UPGRADES, freq);
-	g_settings_set_int (priv->settings, GPK_SETTINGS_FREQUENCY_GET_UPGRADES, freq);
+	g_debug ("Changing %s to %i", GSD_SETTINGS_FREQUENCY_GET_UPGRADES, freq);
+	g_settings_set_int (priv->settings_gsd, GSD_SETTINGS_FREQUENCY_GET_UPGRADES, freq);
 	g_free (value);
 }
 
@@ -167,7 +168,7 @@ gpk_prefs_update_combo_changed (GtkWidget *widget, GpkPrefsPrivate *priv)
 	update = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
 	if (update == -1)
 		return;
-	g_settings_set_enum (priv->settings, GPK_SETTINGS_AUTO_UPDATE, update);
+	g_settings_set_enum (priv->settings_gsd, GSD_SETTINGS_AUTO_UPDATE_TYPE, update);
 }
 
 /**
@@ -181,8 +182,8 @@ gpk_prefs_update_freq_combo_setup (GpkPrefsPrivate *priv)
 	guint value;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "combobox_check"));
-	is_writable = g_settings_is_writable (priv->settings, GPK_SETTINGS_FREQUENCY_GET_UPDATES);
-	value = g_settings_get_int (priv->settings, GPK_SETTINGS_FREQUENCY_GET_UPDATES);
+	is_writable = g_settings_is_writable (priv->settings_gsd, GSD_SETTINGS_FREQUENCY_GET_UPDATES);
+	value = g_settings_get_int (priv->settings_gsd, GSD_SETTINGS_FREQUENCY_GET_UPDATES);
 	g_debug ("value from settings %i", value);
 
 	/* do we have permission to write? */
@@ -220,8 +221,8 @@ gpk_prefs_upgrade_freq_combo_setup (GpkPrefsPrivate *priv)
 	guint value;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "combobox_upgrade"));
-	is_writable = g_settings_is_writable (priv->settings, GPK_SETTINGS_FREQUENCY_GET_UPGRADES);
-	value = g_settings_get_int (priv->settings, GPK_SETTINGS_FREQUENCY_GET_UPGRADES);
+	is_writable = g_settings_is_writable (priv->settings_gsd, GSD_SETTINGS_FREQUENCY_GET_UPGRADES);
+	value = g_settings_get_int (priv->settings_gsd, GSD_SETTINGS_FREQUENCY_GET_UPGRADES);
 	g_debug ("value from settings %i", value);
 
 	/* do we have permission to write? */
@@ -256,8 +257,8 @@ gpk_prefs_auto_update_combo_setup (GpkPrefsPrivate *priv)
 	GtkWidget *widget;
 
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "combobox_install"));
-	is_writable = g_settings_is_writable (priv->settings, GPK_SETTINGS_AUTO_UPDATE);
-	update = g_settings_get_enum (priv->settings, GPK_SETTINGS_AUTO_UPDATE);
+	is_writable = g_settings_is_writable (priv->settings_gsd, GSD_SETTINGS_AUTO_UPDATE_TYPE);
+	update = g_settings_get_enum (priv->settings_gsd, GSD_SETTINGS_AUTO_UPDATE_TYPE);
 
 	/* do we have permission to write? */
 	gtk_widget_set_sensitive (widget, is_writable);
@@ -861,8 +862,8 @@ gpk_pack_startup_cb (GtkApplication *application, GpkPrefsPrivate *priv)
 	}
 
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "checkbutton_mobile_broadband"));
-	g_settings_bind (priv->settings,
-			 GPK_SETTINGS_CONNECTION_USE_MOBILE,
+	g_settings_bind (priv->settings_gsd,
+			 GSD_SETTINGS_CONNECTION_USE_MOBILE,
 			 widget, "active",
 			 G_SETTINGS_BIND_DEFAULT);
 
@@ -882,7 +883,7 @@ gpk_pack_startup_cb (GtkApplication *application, GpkPrefsPrivate *priv)
 	gpk_prefs_auto_update_combo_setup (priv);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "checkbutton_detail"));
-	g_settings_bind (priv->settings,
+	g_settings_bind (priv->settings_gpk,
 			 GPK_SETTINGS_REPO_SHOW_DETAILS,
 			 widget, "active",
 			 G_SETTINGS_BIND_DEFAULT);
@@ -989,7 +990,8 @@ main (int argc, char *argv[])
 	priv = g_new0 (GpkPrefsPrivate, 1);
 	priv->cancellable = g_cancellable_new ();
 	priv->builder = gtk_builder_new ();
-	priv->settings = g_settings_new (GPK_SETTINGS_SCHEMA);
+	priv->settings_gsd = g_settings_new (GSD_SETTINGS_SCHEMA);
+	priv->settings_gpk = g_settings_new (GPK_SETTINGS_SCHEMA);
 	priv->list_store = gtk_list_store_new (GPK_COLUMN_LAST, G_TYPE_BOOLEAN,
 					       G_TYPE_STRING, G_TYPE_STRING,
 					       G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
@@ -1013,7 +1015,8 @@ main (int argc, char *argv[])
 		g_cancellable_cancel (priv->cancellable);
 		g_object_unref (priv->cancellable);
 		g_object_unref (priv->builder);
-		g_object_unref (priv->settings);
+		g_object_unref (priv->settings_gsd);
+		g_object_unref (priv->settings_gpk);
 		g_object_unref (priv->list_store);
 		g_object_unref (priv->client);
 		g_free (priv);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]