[gnome-packagekit] Remove unused functionality



commit 52b1ece4d58f407436bd74aceeca9da607c701eb
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 16 11:18:26 2015 +0000

    Remove unused functionality

 po/POTFILES.in           |    6 -
 src/Makefile.am          |   47 ---
 src/gpk-animated-icon.c  |  307 -----------------
 src/gpk-animated-icon.h  |   72 ----
 src/gpk-application.c    |    3 +-
 src/gpk-common.c         |   47 ---
 src/gpk-common.h         |    5 -
 src/gpk-enum.c           |  139 +--------
 src/gpk-enum.h           |    8 -
 src/gpk-error.c          |    2 +-
 src/gpk-error.h          |    5 -
 src/gpk-gnome.c          |   49 ---
 src/gpk-gnome.h          |   33 --
 src/gpk-helper-chooser.c |  348 -------------------
 src/gpk-helper-chooser.h |   65 ----
 src/gpk-helper-run.c     |    2 -
 src/gpk-language.c       |  196 -----------
 src/gpk-language.h       |   60 ----
 src/gpk-log.c            |    1 -
 src/gpk-marshal.list     |    3 -
 src/gpk-modal-dialog.c   |  861 ----------------------------------------------
 src/gpk-modal-dialog.h   |  127 -------
 src/gpk-prefs.c          |    1 -
 src/gpk-self-test.c      |  138 --------
 src/gpk-task.c           |    1 -
 src/gpk-update-viewer.c  |    3 +-
 src/gpk-vendor.c         |  159 ---------
 src/gpk-vendor.h         |   70 ----
 28 files changed, 4 insertions(+), 2754 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7f01dc2..f5ca93d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,6 @@ data/appdata/gpk-update-viewer.appdata.xml.in
 data/gpk-application.desktop.in
 [type: gettext/glade]data/gpk-application.ui
 [type: gettext/glade]data/gpk-client.ui
-data/gpk-dbus-service.desktop.in
 [type: gettext/glade]data/gpk-error.ui
 [type: gettext/glade]data/gpk-eula.ui
 data/gpk-install-local-file.desktop.in
@@ -20,17 +19,12 @@ data/gpk-update-viewer.desktop.in
 data/org.gnome.packagekit.gschema.xml
 src/gpk-application.c
 src/gpk-common.c
-src/gpk-dbus-service.c
-src/gpk-dbus-task.c
 src/gpk-debug.c
 src/gpk-dialog.c
 src/gpk-enum.c
 src/gpk-error.c
-src/gpk-helper-chooser.c
 src/gpk-helper-run.c
-src/gpk-install-local-file.c
 src/gpk-log.c
-src/gpk-modal-dialog.c
 src/gpk-prefs.c
 src/gpk-task.c
 src/gpk-update-viewer.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 01dfed3..8d7b79c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,24 +44,10 @@ libgpkshared_a_SOURCES =                            \
        gpk-debug.h                                     \
        gpk-enum.c                                      \
        gpk-enum.h                                      \
-       gpk-marshal.c                                   \
-       gpk-marshal.h                                   \
-       gpk-animated-icon.c                             \
-       gpk-animated-icon.h                             \
        gpk-dialog.c                                    \
        gpk-dialog.h                                    \
-       gpk-vendor.c                                    \
-       gpk-vendor.h                                    \
-       gpk-language.c                                  \
-       gpk-language.h                                  \
-       gpk-modal-dialog.c                              \
-       gpk-modal-dialog.h                              \
        gpk-helper-run.c                                \
        gpk-helper-run.h                                \
-       gpk-helper-chooser.c                            \
-       gpk-helper-chooser.h                            \
-       gpk-gnome.c                                     \
-       gpk-gnome.h                                     \
        gpk-common.c                                    \
        gpk-common.h                                    \
        gpk-task.c                                      \
@@ -100,8 +86,6 @@ gpk_application_LDADD =                                      \
 gpk_prefs_SOURCES =                                    \
        gpk-debug.h                                     \
        gpk-debug.c                                     \
-       gpk-animated-icon.c                             \
-       gpk-animated-icon.h                             \
        gpk-enum.c                                      \
        gpk-enum.h                                      \
        gpk-common.c                                    \
@@ -140,18 +124,6 @@ gpk_log_LDADD =                                            \
        $(shared_LIBS)                                  \
        $(NULL)
 
-BUILT_SOURCES =                                        \
-       gpk-marshal.c                                   \
-       gpk-marshal.h                                   \
-       $(NULL)
-
-gpk-marshal.c: gpk-marshal.list
-       echo "#include \"gpk-marshal.h\"" > $@ && \
-       glib-genmarshal $< --prefix=gpk_marshal --body >> $@
-
-gpk-marshal.h: gpk-marshal.list
-       glib-genmarshal $< --prefix=gpk_marshal --header > $@
-
 if EGG_BUILD_TESTS
 
 check_PROGRAMS =                                       \
@@ -174,24 +146,10 @@ gpk_self_test_SOURCES =                                   \
        gpk-common.h                                    \
        gpk-error.c                                     \
        gpk-error.h                                     \
-       gpk-language.c                                  \
-       gpk-language.h                                  \
-       gpk-modal-dialog.c                              \
-       gpk-modal-dialog.h                              \
-       gpk-animated-icon.c                             \
-       gpk-animated-icon.h                             \
-       gpk-gnome.c                                     \
-       gpk-gnome.h                                     \
-       gpk-vendor.c                                    \
-       gpk-vendor.h                                    \
        gpk-task.c                                      \
        gpk-task.h                                      \
        gpk-helper-run.c                                \
        gpk-helper-run.h                                \
-       gpk-helper-chooser.c                            \
-       gpk-helper-chooser.h                            \
-       gpk-marshal.c                                   \
-       gpk-marshal.h                                   \
        gpk-dialog.c                                    \
        gpk-dialog.h                                    \
        $(NULL)
@@ -206,13 +164,8 @@ gpk_self_test_CFLAGS = $(AM_CFLAGS)
 TESTS = gpk-self-test
 endif
 
-EXTRA_DIST =                                           \
-       gpk-marshal.list                                \
-       $(NULL)
-
 clean-local:
        rm -f *~
-       rm -f gpk-marshal.c gpk-marshal.h
        rm -f *.out
        rm -f *.gcda
        rm -f *.gcno
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 1f0f7be..91a993a 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -42,7 +42,6 @@
 #include "gpk-dialog.h"
 #include "gpk-enum.h"
 #include "gpk-error.h"
-#include "gpk-gnome.h"
 #include "gpk-helper-run.h"
 #include "gpk-task.h"
 #include "gpk-debug.h"
@@ -508,7 +507,7 @@ out:
 static void
 gpk_application_menu_homepage_cb (GtkAction *action, GpkApplicationPrivate *priv)
 {
-       gpk_gnome_open (priv->homepage_url);
+       gtk_show_uri (NULL, priv->homepage_url, GDK_CURRENT_TIME, NULL);
 }
 
 /**
diff --git a/src/gpk-common.c b/src/gpk-common.c
index 7988357..0d24798 100644
--- a/src/gpk-common.c
+++ b/src/gpk-common.c
@@ -49,21 +49,6 @@
 /* static, so local to process */
 static gboolean small_form_factor_mode = FALSE;
 
-gchar **
-pk_package_array_to_strv (GPtrArray *array)
-{
-       PkPackage *item;
-       gchar **results;
-       guint i;
-
-       results = g_new0 (gchar *, array->len+1);
-       for (i=0; i<array->len; i++) {
-               item = g_ptr_array_index (array, i);
-               results[i] = g_strdup (pk_package_get_id (item));
-       }
-       return results;
-}
-
 /**
  * pk_strv_to_ptr_array:
  * @array: the gchar** array of strings
@@ -335,38 +320,6 @@ out:
 }
 
 /**
- * gpk_set_animated_icon_from_status:
- **/
-gboolean
-gpk_set_animated_icon_from_status (GpkAnimatedIcon *icon, PkStatusEnum status, GtkIconSize size)
-{
-       const gchar *name = NULL;
-       guint delay = 0;
-
-       /* see if there is an animation */
-       name = gpk_status_enum_to_animation (status);
-
-       /* get the timing */
-       if (g_str_has_prefix (name, "pk-action-"))
-               delay = 150;
-       else if (g_str_has_prefix (name, "process-working"))
-               delay = 50;
-
-       /* animate or set static */
-       if (delay != 0) {
-               gpk_animated_icon_set_frame_delay (icon, delay);
-               gpk_animated_icon_set_filename_tile (icon, size, name);
-       } else {
-               gpk_animated_icon_set_icon_name (icon, size, name);
-       }
-
-       /* stop spinning */
-       if (status == PK_STATUS_ENUM_FINISHED)
-               gpk_animated_icon_enable_animation (icon, FALSE);
-       return TRUE;
-}
-
-/**
  * gpk_time_to_imprecise_string:
  * @time_secs: The time value to convert in seconds
  *
diff --git a/src/gpk-common.h b/src/gpk-common.h
index 3c552fc..e343f9e 100644
--- a/src/gpk-common.h
+++ b/src/gpk-common.h
@@ -26,7 +26,6 @@
 #include <gtk/gtk.h>
 #include <packagekit-glib2/packagekit.h>
 
-#include "gpk-animated-icon.h"
 #include "gpk-enum.h"
 
 G_BEGIN_DECLS
@@ -70,9 +69,6 @@ gchar         *gpk_time_to_localised_string           (guint           time_secs);
 gchar          *gpk_time_to_imprecise_string           (guint           time_secs);
 gboolean        gpk_check_privileged_user              (const gchar    *application_name,
                                                         gboolean        show_ui);
-gboolean        gpk_set_animated_icon_from_status      (GpkAnimatedIcon *icon,
-                                                        PkStatusEnum    status,
-                                                        GtkIconSize     size);
 gchar          *gpk_strv_join_locale                   (gchar          **array);
 GtkEntryCompletion *gpk_package_entry_completion_new   (void);
 gboolean        gpk_window_set_size_request            (GtkWindow      *window,
@@ -82,7 +78,6 @@ gboolean       gpk_window_set_parent_xid              (GtkWindow      *window,
                                                         guint32         xid);
 GPtrArray      *pk_strv_to_ptr_array                   (gchar          **array)
                                                         G_GNUC_WARN_UNUSED_RESULT;
-gchar          **pk_package_array_to_strv              (GPtrArray      *array);
 
 G_END_DECLS
 
diff --git a/src/gpk-enum.c b/src/gpk-enum.c
index 85e8505..7cf08a9 100644
--- a/src/gpk-enum.c
+++ b/src/gpk-enum.c
@@ -100,46 +100,6 @@ static const PkEnumMatch enum_status_icon_name[] = {
        {0, NULL}
 };
 
-static const PkEnumMatch enum_status_animation[] = {
-       {PK_STATUS_ENUM_UNKNOWN,                "help-browser"},
-       {PK_STATUS_ENUM_CANCEL,                 "pk-action-cleanup"},
-       {PK_STATUS_ENUM_CLEANUP,                "pk-action-cleanup"},
-       {PK_STATUS_ENUM_COMMIT,                 "pk-setup"},
-       {PK_STATUS_ENUM_DEP_RESOLVE,            "pk-action-testing"},
-       {PK_STATUS_ENUM_DOWNLOAD_CHANGELOG,     "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_DOWNLOAD_FILELIST,      "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_DOWNLOAD_GROUP,         "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST,   "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_DOWNLOAD,               "pk-action-download"},
-       {PK_STATUS_ENUM_DOWNLOAD_REPOSITORY,    "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_DOWNLOAD_UPDATEINFO,    "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_FINISHED,               "pk-package-cleanup"},
-       {PK_STATUS_ENUM_GENERATE_PACKAGE_LIST,  "pk-action-searching"},
-       {PK_STATUS_ENUM_WAITING_FOR_LOCK,       "pk-action-waiting"},
-       {PK_STATUS_ENUM_WAITING_FOR_AUTH,       "pk-action-waiting"},
-       {PK_STATUS_ENUM_INFO,                   "process-working"},
-       {PK_STATUS_ENUM_INSTALL,                "pk-action-installing"},
-       {PK_STATUS_ENUM_LOADING_CACHE,          "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_OBSOLETE,               "pk-package-cleanup"},
-       {PK_STATUS_ENUM_QUERY,                  "pk-action-searching"},
-       {PK_STATUS_ENUM_REFRESH_CACHE,          "pk-action-refresh-cache"},
-       {PK_STATUS_ENUM_REMOVE,                 "pk-action-removing"},
-       {PK_STATUS_ENUM_REPACKAGING,            "pk-package-info"},
-       {PK_STATUS_ENUM_REQUEST,                "process-working"},
-       {PK_STATUS_ENUM_RUNNING,                "pk-setup"},
-       {PK_STATUS_ENUM_SCAN_APPLICATIONS,      "pk-action-searching"},
-       {PK_STATUS_ENUM_SETUP,                  "pk-package-info"},
-       {PK_STATUS_ENUM_SIG_CHECK,              "pk-package-info"},
-       {PK_STATUS_ENUM_TEST_COMMIT,            "pk-action-testing"},
-       {PK_STATUS_ENUM_UPDATE,                 "pk-action-installing"},
-       {PK_STATUS_ENUM_WAIT,                   "pk-action-waiting"},
-       {PK_STATUS_ENUM_SCAN_PROCESS_LIST,      "pk-package-info"},
-       {PK_STATUS_ENUM_CHECK_EXECUTABLE_FILES, "pk-package-info"},
-       {PK_STATUS_ENUM_CHECK_LIBRARIES,        "pk-package-info"},
-       {PK_STATUS_ENUM_COPY_FILES,             "pk-package-info"},
-       {0, NULL}
-};
-
 static const PkEnumMatch enum_role_icon_name[] = {
        {PK_ROLE_ENUM_UNKNOWN,                  "help-browser"},        /* fall though value */
        {PK_ROLE_ENUM_ACCEPT_EULA,              "pk-package-info"},
@@ -227,17 +187,6 @@ static const PkEnumMatch enum_restart_icon_name[] = {
        {0, NULL}
 };
 
-static const PkEnumMatch enum_restart_dialog_icon_name[] = {
-       {PK_RESTART_ENUM_UNKNOWN,               "help-browser"},        /* fall though value */
-       {PK_RESTART_ENUM_NONE,                  "dialog-information"},
-       {PK_RESTART_ENUM_SYSTEM,                "dialog-error"},
-       {PK_RESTART_ENUM_SESSION,               "dialog-warning"},
-       {PK_RESTART_ENUM_APPLICATION,           "dialog-warning"},
-       {PK_RESTART_ENUM_SECURITY_SYSTEM,       "dialog-error"},
-       {PK_RESTART_ENUM_SECURITY_SESSION,      "dialog-error"},
-       {0, NULL}
-};
-
 /**
  * gpk_media_type_enum_to_localised_text:
  **/
@@ -808,32 +757,6 @@ gpk_restart_enum_to_localised_text (PkRestartEnum restart)
 }
 
 /**
- * gpk_update_state_enum_to_localised_text:
- **/
-const gchar *
-gpk_update_state_enum_to_localised_text (PkUpdateStateEnum state)
-{
-       const gchar *text = NULL;
-       switch (state) {
-       case PK_UPDATE_STATE_ENUM_STABLE:
-               /* TRANSLATORS: A distribution stability level */
-               text = _("Stable");
-               break;
-       case PK_UPDATE_STATE_ENUM_UNSTABLE:
-               /* TRANSLATORS: A distribution stability level */
-               text = _("Unstable");
-               break;
-       case PK_UPDATE_STATE_ENUM_TESTING:
-               /* TRANSLATORS: A distribution stability level */
-               text = _("Testing");
-               break;
-       default:
-               g_warning ("state unrecognized: %i", state);
-       }
-       return text;
-}
-
-/**
  * gpk_status_enum_to_localised_text:
  **/
 const gchar *
@@ -992,48 +915,6 @@ gpk_status_enum_to_localised_text (PkStatusEnum status)
 }
 
 /**
- * gpk_update_enum_to_localised_text:
- **/
-gchar *
-gpk_update_enum_to_localised_text (PkInfoEnum info, guint number)
-{
-       gchar *text = NULL;
-       switch (info) {
-       case PK_INFO_ENUM_LOW:
-               /* TRANSLATORS: type of update */
-               text = g_strdup_printf (ngettext ("%i trivial update", "%i trivial updates", number), number);
-               break;
-       case PK_INFO_ENUM_NORMAL:
-               /* TRANSLATORS: type of update in the case that we don't have any data */
-               text = g_strdup_printf (ngettext ("%i update", "%i updates", number), number);
-               break;
-       case PK_INFO_ENUM_IMPORTANT:
-               /* TRANSLATORS: type of update */
-               text = g_strdup_printf (ngettext ("%i important update", "%i important updates", number), 
number);
-               break;
-       case PK_INFO_ENUM_SECURITY:
-               /* TRANSLATORS: type of update */
-               text = g_strdup_printf (ngettext ("%i security update", "%i security updates", number), 
number);
-               break;
-       case PK_INFO_ENUM_BUGFIX:
-               /* TRANSLATORS: type of update */
-               text = g_strdup_printf (ngettext ("%i bug fix update", "%i bug fix updates", number), number);
-               break;
-       case PK_INFO_ENUM_ENHANCEMENT:
-               /* TRANSLATORS: type of update */
-               text = g_strdup_printf (ngettext ("%i enhancement update", "%i enhancement updates", number), 
number);
-               break;
-       case PK_INFO_ENUM_BLOCKED:
-               /* TRANSLATORS: number of updates that cannot be installed due to deps */
-               text = g_strdup_printf (ngettext ("%i blocked update", "%i blocked updates", number), number);
-               break;
-       default:
-               g_warning ("update info unrecognized: %s", pk_info_enum_to_string (info));
-       }
-       return text;
-}
-
-/**
  * gpk_info_enum_to_localised_text:
  **/
 const gchar *
@@ -1096,7 +977,7 @@ gpk_info_enum_to_localised_text (PkInfoEnum info)
 /**
  * gpk_info_enum_to_localised_present:
  **/
-const gchar *
+static const gchar *
 gpk_info_enum_to_localised_present (PkInfoEnum info)
 {
        const gchar *text = NULL;
@@ -1648,15 +1529,6 @@ gpk_status_enum_to_icon_name (PkStatusEnum status)
 }
 
 /**
- * gpk_status_enum_to_animation:
- **/
-const gchar *
-gpk_status_enum_to_animation (PkStatusEnum status)
-{
-       return pk_enum_find_string (enum_status_animation, status);
-}
-
-/**
  * gpk_role_enum_to_icon_name:
  **/
 const gchar *
@@ -1688,15 +1560,6 @@ gpk_restart_enum_to_icon_name (PkRestartEnum restart)
 }
 
 /**
- * gpk_restart_enum_to_dialog_icon_name:
- **/
-const gchar *
-gpk_restart_enum_to_dialog_icon_name (PkRestartEnum restart)
-{
-       return pk_enum_find_string (enum_restart_dialog_icon_name, restart);
-}
-
-/**
  * gpk_info_status_enum_to_string:
  **/
 const gchar *
diff --git a/src/gpk-enum.h b/src/gpk-enum.h
index c711bc2..3e8460a 100644
--- a/src/gpk-enum.h
+++ b/src/gpk-enum.h
@@ -84,13 +84,10 @@ const gchar *gpk_info_enum_to_localised_text        (PkInfoEnum      info)
                                                         G_GNUC_CONST;
 const gchar    *gpk_info_enum_to_localised_past        (PkInfoEnum      info)
                                                         G_GNUC_CONST;
-const gchar    *gpk_info_enum_to_localised_present     (PkInfoEnum      info)
-                                                        G_GNUC_CONST;
 const gchar    *gpk_info_enum_to_icon_name             (PkInfoEnum      info);
 const gchar    *gpk_status_enum_to_localised_text      (PkStatusEnum    status)
                                                         G_GNUC_CONST;
 const gchar    *gpk_status_enum_to_icon_name           (PkStatusEnum    status);
-const gchar    *gpk_status_enum_to_animation           (PkStatusEnum    status);
 const gchar    *gpk_restart_enum_to_icon_name          (PkRestartEnum   restart);
 const gchar    *gpk_restart_enum_to_dialog_icon_name   (PkRestartEnum   restart);
 const gchar    *gpk_error_enum_to_localised_text       (PkErrorEnum code)
@@ -98,16 +95,11 @@ const gchar *gpk_error_enum_to_localised_text       (PkErrorEnum code)
 const gchar    *gpk_error_enum_to_localised_message    (PkErrorEnum code);
 const gchar    *gpk_restart_enum_to_localised_text     (PkRestartEnum   restart)
                                                         G_GNUC_CONST;
-const gchar    *gpk_update_state_enum_to_localised_text (PkUpdateStateEnum state)
-                                                        G_GNUC_CONST;
 const gchar    *gpk_restart_enum_to_localised_text_future(PkRestartEnum         restart)
                                                         G_GNUC_CONST;
 const gchar    *gpk_group_enum_to_localised_text       (PkGroupEnum     group)
                                                         G_GNUC_CONST;
 const gchar    *gpk_group_enum_to_icon_name            (PkGroupEnum     group);
-gchar          *gpk_update_enum_to_localised_text      (PkInfoEnum      info,
-                                                        guint           number)
-                                                        G_GNUC_CONST;
 const gchar    *gpk_info_status_enum_to_string         (GpkInfoStatusEnum info);
 const gchar    *gpk_info_status_enum_to_icon_name      (GpkInfoStatusEnum info);
 
diff --git a/src/gpk-error.c b/src/gpk-error.c
index fe565e7..b5521f7 100644
--- a/src/gpk-error.c
+++ b/src/gpk-error.c
@@ -58,7 +58,7 @@ gpk_error_dialog_expanded_cb (GObject *object, GParamSpec *param_spec, GtkBuilde
  *
  * Shows a modal error, and blocks until the user clicks close
  **/
-gboolean
+static gboolean
 gpk_error_dialog_modal_with_time (GtkWindow *window, const gchar *title, const gchar *message, const gchar 
*details, guint timestamp)
 {
        GtkWidget *widget;
diff --git a/src/gpk-error.h b/src/gpk-error.h
index b558688..9028ca8 100644
--- a/src/gpk-error.h
+++ b/src/gpk-error.h
@@ -33,11 +33,6 @@ gboolean      gpk_error_dialog_modal                 (GtkWindow      *window,
                                                         const gchar    *title,
                                                         const gchar    *message,
                                                         const gchar    *details);
-gboolean        gpk_error_dialog_modal_with_time       (GtkWindow      *window,
-                                                        const gchar    *title,
-                                                        const gchar    *message,
-                                                        const gchar    *details,
-                                                        guint           timestamp);
 
 G_END_DECLS
 
diff --git a/src/gpk-helper-run.c b/src/gpk-helper-run.c
index ac20577..c991229 100644
--- a/src/gpk-helper-run.c
+++ b/src/gpk-helper-run.c
@@ -27,8 +27,6 @@
 #include <gio/gdesktopappinfo.h>
 
 #include "gpk-helper-run.h"
-#include "gpk-marshal.h"
-#include "gpk-gnome.h"
 #include "gpk-common.h"
 #include "gpk-enum.h"
 
diff --git a/src/gpk-log.c b/src/gpk-log.c
index 5ca3587..be2ec9c 100644
--- a/src/gpk-log.c
+++ b/src/gpk-log.c
@@ -32,7 +32,6 @@
 #include <packagekit-glib2/packagekit.h>
 
 #include "gpk-common.h"
-#include "gpk-gnome.h"
 #include "gpk-debug.h"
 
 static GtkBuilder *builder = NULL;
diff --git a/src/gpk-prefs.c b/src/gpk-prefs.c
index 39531bf..2792aed 100644
--- a/src/gpk-prefs.c
+++ b/src/gpk-prefs.c
@@ -32,7 +32,6 @@
 #include "gpk-debug.h"
 #include "gpk-enum.h"
 #include "gpk-error.h"
-#include "gpk-gnome.h"
 
 typedef struct {
        const gchar             *id_tmp;
diff --git a/src/gpk-self-test.c b/src/gpk-self-test.c
index 181d7b4..8be7da8 100644
--- a/src/gpk-self-test.c
+++ b/src/gpk-self-test.c
@@ -27,8 +27,6 @@
 #include "gpk-common.h"
 #include "gpk-enum.h"
 #include "gpk-error.h"
-#include "gpk-language.h"
-#include "gpk-modal-dialog.h"
 #include "gpk-task.h"
 
 
@@ -108,15 +106,6 @@ gpk_test_enum_func (void)
                }
        }
 
-       /* check we convert all the status animation enums */
-       for (i = PK_STATUS_ENUM_UNKNOWN+1; i < PK_STATUS_ENUM_UNKNOWN; i++) {
-               string = gpk_status_enum_to_animation (i);
-               if (string == NULL || g_strcmp0 (string, "help-browser") == 0) {
-                       g_warning ("failed to get %s", pk_status_enum_to_string (i));
-                       break;
-               }
-       }
-
        /* check we convert all the info icon names enums */
        for (i = PK_INFO_ENUM_UNKNOWN+1; i < PK_INFO_ENUM_LAST; i++) {
                string = gpk_info_enum_to_icon_name (i);
@@ -210,131 +199,6 @@ gpk_test_enum_func (void)
 }
 
 static void
-gpk_test_modal_dialog_func (void)
-{
-       GtkResponseType button;
-       GpkModalDialog *dialog = NULL;
-       GPtrArray *array;
-       PkPackage *item;
-       gboolean ret;
-
-       /* get GpkModalDialog object */
-       dialog = gpk_modal_dialog_new ();
-       g_assert (dialog);
-
-       /* set some packages */
-       array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
-       item = pk_package_new ();
-       ret = pk_package_set_id (item, "totem;001;i386;fedora", NULL);
-       g_assert (ret);
-       g_object_set (item,
-                     "info", PK_INFO_ENUM_INSTALLED,
-                     "summary", "Totem is a music player for GNOME",
-                     NULL);
-       g_ptr_array_add (array, item);
-       item = pk_package_new ();
-       ret = pk_package_set_id (item, "totem;001;i386;fedora", NULL);
-       g_assert (ret);
-       g_object_set (item,
-                     "info", PK_INFO_ENUM_AVAILABLE,
-                     "summary", "Amarok is a music player for KDE",
-                     NULL);
-       g_ptr_array_add (array, item);
-       gpk_modal_dialog_set_package_list (dialog, array);
-       g_ptr_array_unref (array);
-
-       /* help button */
-       gpk_modal_dialog_setup (dialog, GPK_MODAL_DIALOG_PAGE_WARNING, 0);
-       gpk_modal_dialog_set_title (dialog, "Button press test");
-       gpk_modal_dialog_set_message (dialog, "Please press close");
-       gpk_modal_dialog_set_image (dialog, "dialog-warning");
-       gpk_modal_dialog_present (dialog);
-       button = gpk_modal_dialog_run (dialog);
-       g_assert_cmpint (button, ==, GTK_RESPONSE_CLOSE);
-
-       /* confirm button */
-       gpk_modal_dialog_setup (dialog, GPK_MODAL_DIALOG_PAGE_CONFIRM, 0);
-       gpk_modal_dialog_set_title (dialog, "Button press test with a really really long title");
-       gpk_modal_dialog_set_message (dialog, "Please press Uninstall\n\nThis is a really really, 
really,\nreally long title <i>with formatting</i>");
-       gpk_modal_dialog_set_image (dialog, "dialog-information");
-       gpk_modal_dialog_set_action (dialog, "Uninstall");
-       gpk_modal_dialog_present (dialog);
-       button = gpk_modal_dialog_run (dialog);
-       g_assert_cmpint (button, ==, GTK_RESPONSE_OK);
-
-       /* no message */
-       gpk_modal_dialog_setup (dialog, GPK_MODAL_DIALOG_PAGE_PROGRESS, 0);
-       gpk_modal_dialog_set_title (dialog, "Refresh cache");
-       gpk_modal_dialog_set_image_status (dialog, PK_STATUS_ENUM_REFRESH_CACHE);
-       gpk_modal_dialog_set_percentage (dialog, -1);
-       gpk_modal_dialog_present (dialog);
-       gpk_modal_dialog_run (dialog);
-
-       /* progress */
-       gpk_modal_dialog_setup (dialog, GPK_MODAL_DIALOG_PAGE_PROGRESS, GPK_MODAL_DIALOG_PACKAGE_PADDING);
-       gpk_modal_dialog_set_title (dialog, "Button press test");
-       gpk_modal_dialog_set_message (dialog, "Please press cancel");
-       gpk_modal_dialog_set_image_status (dialog, PK_STATUS_ENUM_RUNNING);
-       gpk_modal_dialog_set_percentage (dialog, 50);
-       gpk_modal_dialog_present (dialog);
-       button = gpk_modal_dialog_run (dialog);
-       g_assert_cmpint (button, ==, GTK_RESPONSE_CANCEL);
-
-       /* progress */
-       gpk_modal_dialog_setup (dialog, GPK_MODAL_DIALOG_PAGE_PROGRESS, pk_bitfield_from_enums 
(GPK_MODAL_DIALOG_WIDGET_MESSAGE, -1));
-       gpk_modal_dialog_set_title (dialog, "Button press test");
-       gpk_modal_dialog_set_message (dialog, "Please press close");
-       gpk_modal_dialog_set_image_status (dialog, PK_STATUS_ENUM_INSTALL);
-       gpk_modal_dialog_set_percentage (dialog, -1);
-       gpk_modal_dialog_present (dialog);
-       button = gpk_modal_dialog_run (dialog);
-       g_assert_cmpint (button, ==, GTK_RESPONSE_CLOSE);
-
-       /* confirm install button */
-       gpk_modal_dialog_setup (dialog, GPK_MODAL_DIALOG_PAGE_CONFIRM, GPK_MODAL_DIALOG_PACKAGE_LIST);
-       gpk_modal_dialog_set_title (dialog, "Button press test");
-       gpk_modal_dialog_set_message (dialog, "Please press Install if you can see the package list");
-       gpk_modal_dialog_set_image (dialog, "dialog-information");
-       gpk_modal_dialog_set_action (dialog, "Install");
-       gpk_modal_dialog_present (dialog);
-       button = gpk_modal_dialog_run (dialog);
-       g_assert_cmpint (button, ==, GTK_RESPONSE_OK);
-
-       gpk_modal_dialog_close (dialog);
-
-       g_object_unref (dialog);
-}
-
-static void
-gpk_test_language_func (void)
-{
-       gboolean ret;
-       gchar *lang;
-       GError *error = NULL;
-       GpkLanguage *language = NULL;
-
-       /* get GpkLanguage object */
-       language = gpk_language_new ();
-       g_assert (language != NULL);
-
-       /* populate */
-       ret = gpk_language_populate (language, &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-
-       /* get data (present) */
-       lang = gpk_language_iso639_to_language (language, "en");
-       g_assert_cmpstr (lang, ==, "English");
-       g_free (lang);
-
-       /* get data (missing) */
-       lang = gpk_language_iso639_to_language (language, "notgoingtoexist");
-       g_assert_cmpstr (lang, ==, NULL);
-
-       g_object_unref (language);
-}
-
-static void
 gpk_test_error_func (void)
 {
        gboolean ret;
@@ -690,10 +554,8 @@ main (int argc, char **argv)
 
        g_test_add_func ("/gnome-packagekit/enum", gpk_test_enum_func);
        g_test_add_func ("/gnome-packagekit/common", gpk_test_common_func);
-       g_test_add_func ("/gnome-packagekit/language", gpk_test_language_func);
        g_test_add_func ("/gnome-packagekit/markdown", gpk_test_markdown_func);
        if (g_test_thorough ()) {
-               g_test_add_func ("/gnome-packagekit/modal-dialog", gpk_test_modal_dialog_func);
                g_test_add_func ("/gnome-packagekit/error", gpk_test_error_func);
                g_test_add_func ("/gnome-packagekit/task", gpk_test_task_func);
        }
diff --git a/src/gpk-task.c b/src/gpk-task.c
index 791598e..02f0fd8 100644
--- a/src/gpk-task.c
+++ b/src/gpk-task.c
@@ -25,7 +25,6 @@
 #include <packagekit-glib2/packagekit.h>
 
 #include "gpk-task.h"
-#include "gpk-gnome.h"
 #include "gpk-common.h"
 #include "gpk-enum.h"
 #include "gpk-dialog.h"
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index edcfe1e..e751022 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -42,7 +42,6 @@
 #include "gpk-dialog.h"
 #include "gpk-enum.h"
 #include "gpk-error.h"
-#include "gpk-gnome.h"
 #include "gpk-task.h"
 #include "gpk-debug.h"
 
@@ -2833,7 +2832,7 @@ gpk_update_viewer_textview_follow_link (GtkWidget *text_view, GtkTextIter *iter)
                GtkTextTag *tag = tagp->data;
                const gchar *href = (const gchar *) (g_object_get_data (G_OBJECT (tag), "href"));
                if (href != NULL)
-                       gpk_gnome_open (href);
+                       gtk_show_uri (NULL, href, GDK_CURRENT_TIME, NULL);
        }
 
        if (tags != NULL)


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