[recipes] window: Add fullscreen api
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] window: Add fullscreen api
- Date: Thu, 26 Jan 2017 08:07:47 +0000 (UTC)
commit e28d2c04219d201d62778bb76d96362db74c6dbe
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 23 18:42:44 2017 +0300
window: Add fullscreen api
We can't just use the GtkWindow api unfortunately, since there is
no way to query the current state.
src/gr-window.c | 12 ++++++++++++
src/gr-window.h | 2 ++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-window.c b/src/gr-window.c
index eb7b85e..38cc95d 100644
--- a/src/gr-window.c
+++ b/src/gr-window.c
@@ -66,6 +66,7 @@ struct _GrWindow
GrRecipeImporter *importer;
GQueue *back_entry_stack;
+ gboolean is_fullscreen;
};
G_DEFINE_TYPE (GrWindow, gr_window, GTK_TYPE_APPLICATION_WINDOW)
@@ -173,6 +174,17 @@ add_recipe (GrWindow *window)
}
}
+void
+gr_window_set_fullscreen (GrWindow *window,
+ gboolean fullscreen)
+{
+ if (fullscreen)
+ gtk_window_fullscreen (GTK_WINDOW (window));
+ else
+ gtk_window_unfullscreen (GTK_WINDOW (window));
+ window->is_fullscreen = fullscreen;
+}
+
static void
stop_search (GrWindow *window)
{
diff --git a/src/gr-window.h b/src/gr-window.h
index a83f397..c53f08b 100644
--- a/src/gr-window.h
+++ b/src/gr-window.h
@@ -62,5 +62,7 @@ void gr_window_show_search_by_ingredients (GrWindow *window,
const char *ingredient);
void gr_window_offer_undelete (GrWindow *window,
GrRecipe *recipe);
+void gr_window_set_fullscreen (GrWindow *window,
+ gboolean fullscreen);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]