[gnome-software] Add a getter for the mode
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Add a getter for the mode
- Date: Wed, 28 Aug 2013 13:34:38 +0000 (UTC)
commit aff6f43c7624a1581c581a8994483df4ee7467cc
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Aug 28 09:21:15 2013 -0400
Add a getter for the mode
This is better than directly poking at the current notebook
page, as we currently do in a few places.
src/gs-shell.c | 8 ++++++++
src/gs-shell.h | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 87a4f0f..d2da1d0 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -248,6 +248,14 @@ gs_shell_set_mode (GsShell *shell, GsShellMode mode)
gs_shell_set_overview_mode (shell, mode, NULL, NULL);
}
+GsShellMode
+gs_shell_get_mode (GsShell *shell)
+{
+ GsShellPrivate *priv = shell->priv;
+
+ return priv->mode;
+}
+
void
gs_shell_show_details (GsShell *shell, GsApp *app)
{
diff --git a/src/gs-shell.h b/src/gs-shell.h
index 2a7f1e1..e5e4176 100644
--- a/src/gs-shell.h
+++ b/src/gs-shell.h
@@ -65,6 +65,7 @@ void gs_shell_refresh (GsShell *shell,
GCancellable *cancellable);
void gs_shell_set_mode (GsShell *shell,
GsShellMode mode);
+GsShellMode gs_shell_get_mode (GsShell *shell);
void gs_shell_show_details (GsShell *shell,
GsApp *app);
void gs_shell_show_category (GsShell *shell,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]