[eog] Make EogWindow a GtkApplicationWindow
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Make EogWindow a GtkApplicationWindow
- Date: Mon, 25 Jun 2012 19:49:46 +0000 (UTC)
commit df5b2b69fe70ef48882210c9948f9eaca19415c7
Author: Felix Riemann <friemann gnome org>
Date: Thu Jun 7 13:22:20 2012 +0200
Make EogWindow a GtkApplicationWindow
This is necessary to support application menus.
src/eog-window.c | 4 +++-
src/eog-window.h | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 658b5fa..f4ed61e 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -85,7 +85,7 @@
#define EOG_WINDOW_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_WINDOW, EogWindowPrivate))
-G_DEFINE_TYPE (EogWindow, eog_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE (EogWindow, eog_window, GTK_TYPE_APPLICATION_WINDOW);
#define EOG_WINDOW_MIN_WIDTH 440
#define EOG_WINDOW_MIN_HEIGHT 350
@@ -5349,6 +5349,8 @@ eog_window_new (EogStartupFlags flags)
window = EOG_WINDOW (g_object_new (EOG_TYPE_WINDOW,
"type", GTK_WINDOW_TOPLEVEL,
+ "application", EOG_APP,
+ "show-menubar", FALSE,
"startup-flags", flags,
NULL));
diff --git a/src/eog-window.h b/src/eog-window.h
index 679a14d..e19bcfe 100644
--- a/src/eog-window.h
+++ b/src/eog-window.h
@@ -84,13 +84,13 @@ typedef enum {
} EogStartupFlags;
struct _EogWindow {
- GtkWindow win;
+ GtkApplicationWindow win;
EogWindowPrivate *priv;
};
struct _EogWindowClass {
- GtkWindowClass parent_class;
+ GtkApplicationWindowClass parent_class;
void (* prepared) (EogWindow *window);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]