[gnome-software/wip/ubuntu-xenial] Remove unnecessary code change from gnome-3-20
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-xenial] Remove unnecessary code change from gnome-3-20
- Date: Tue, 16 Aug 2016 03:20:57 +0000 (UTC)
commit 254c61fa6b1f3dc9b883e5176e8d206320b9cc5f
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Aug 16 15:16:00 2016 +1200
Remove unnecessary code change from gnome-3-20
src/gs-application.c | 7 ++-----
src/gs-shell-search.c | 4 +---
src/gs-shell.c | 8 ++++++++
src/gs-shell.h | 2 ++
4 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 68bb925..b6e7f95 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -680,11 +680,8 @@ details_activated (GSimpleAction *action,
g_variant_get (parameter, "(&s&s)", &id, &search);
if (search != NULL && search[0] != '\0')
gs_shell_show_search_result (app->shell, id, search);
- else {
- g_autoptr (GsApp) a = NULL;
- a = gs_app_new (id);
- gs_shell_show_app (app->shell, a);
- }
+ else
+ gs_shell_show_details (app->shell, id);
}
static void
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index c6ab940..ebbbf74 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -134,9 +134,7 @@ gs_shell_search_get_search_cb (GObject *source_object,
}
if (self->appid_to_show != NULL) {
- g_autoptr (GsApp) a = NULL;
- a = gs_app_new (self->appid_to_show);
- gs_shell_show_app (self->shell, a);
+ gs_shell_show_details (self->shell, self->appid_to_show);
g_clear_pointer (&self->appid_to_show, g_free);
}
}
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 37aa466..c082035 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -935,6 +935,14 @@ gs_shell_show_search_result (GsShell *shell, const gchar *id, const gchar *searc
gs_shell_change_mode (shell, GS_SHELL_MODE_SEARCH, NULL, NULL, TRUE);
}
+void
+gs_shell_show_details (GsShell *shell, const gchar *id)
+{
+ g_autoptr(GsApp) app = NULL;
+ app = gs_app_new (id);
+ gs_shell_show_app (shell, app);
+}
+
/**
* gs_shell_dispose:
**/
diff --git a/src/gs-shell.h b/src/gs-shell.h
index 356ce01..4a68228 100644
--- a/src/gs-shell.h
+++ b/src/gs-shell.h
@@ -82,6 +82,8 @@ void gs_shell_show_filename (GsShell *shell,
void gs_shell_show_search_result (GsShell *shell,
const gchar *id,
const gchar *search);
+void gs_shell_show_details (GsShell *shell,
+ const gchar *id);
void gs_shell_show_extras_search (GsShell *shell,
const gchar *mode,
gchar **resources);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]