[gnome-packagekit] Disable check for updates if gpk-update-viewer is uninstalled
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Disable check for updates if gpk-update-viewer is uninstalled
- Date: Sat, 9 Aug 2014 14:23:17 +0000 (UTC)
commit 39e60c02ba3ff3e8b903bde02c21647225bb74f3
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Aug 8 19:21:54 2014 -0500
Disable check for updates if gpk-update-viewer is uninstalled
https://bugzilla.gnome.org/show_bug.cgi?id=732408
src/gpk-application.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 6afe308..aefa3f3 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -3470,6 +3470,7 @@ main (int argc, char *argv[])
GOptionContext *context;
gboolean ret;
gint status = 0;
+ gchar *filename;
GpkApplicationPrivate *priv;
const GOptionEntry options[] = {
@@ -3522,6 +3523,13 @@ main (int argc, char *argv[])
G_N_ELEMENTS (gpk_menu_app_entries),
priv);
+ filename = g_build_filename (BINDIR, "gpk-update-viewer", NULL);
+ if (!g_file_test (filename, G_FILE_TEST_IS_EXECUTABLE)) {
+ GAction *action = g_action_map_lookup_action (G_ACTION_MAP (priv->application), "updates");
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
+ }
+ g_free (filename);
+
/* run */
status = g_application_run (G_APPLICATION (priv->application), argc, argv);
g_object_unref (priv->application);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]