[geary/gtk-3.10] --enable-unity flag to deal with GtkHeaderBar issues: Refs bgo#727624
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/gtk-3.10] --enable-unity flag to deal with GtkHeaderBar issues: Refs bgo#727624
- Date: Fri, 4 Apr 2014 21:58:23 +0000 (UTC)
commit b864770e9b3cc0a1f3b7eb29ec5482bdb540492c
Author: Jim Nelson <jim yorba org>
Date: Fri Apr 4 14:56:38 2014 -0700
--enable-unity flag to deal with GtkHeaderBar issues: Refs bgo#727624
Unity doesn't deal well with pure GtkHeaderBar apps, so this allows
for the GtkHeaderBar to be treated like a toolbar and the window
retain its chrome.
configure | 6 ++++++
debian/rules | 2 +-
src/CMakeLists.txt | 10 ++++++++++
src/client/components/main-window.vala | 9 +++++++--
4 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/configure b/configure
index 89fb4c7..4eb7e9d 100755
--- a/configure
+++ b/configure
@@ -24,6 +24,8 @@ configure_help() {
--disable-fatal-warnings
Disable Vala fatal warnings when compiling.
+ --enable-unity
+ Enable Unity interface changes.
--enable-ref-tracking
Enable reference tracking which is dumped to stdout when the program exits.
--disable-schemas-compile
@@ -90,6 +92,10 @@ do
CMDLINE="${CMDLINE} -DREF_TRACKING=ON"
;;
+ --enable-unity)
+ CMDLINE="${CMDLINE} -DENABLE_UNITY=ON"
+ ;;
+
--disable-schemas-compile)
CMDLINE="${CMDLINE} -DGSETTINGS_COMPILE=OFF"
CMDLINE="${CMDLINE} -DGSETTINGS_COMPILE_IN_PLACE=OFF"
diff --git a/debian/rules b/debian/rules
index 5a411ae..3800f34 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,7 @@
dh $@ --parallel
override_dh_auto_configure:
- ./configure --prefix=/usr
+ ./configure --prefix=/usr --enable-unity
override_dh_strip:
dh_strip --dbg-package=geary-dbg
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 827f4ca..1f9a8be 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -574,6 +574,16 @@ else ()
message(STATUS "Reference tracking: OFF")
endif ()
+if (ENABLE_UNITY)
+ message(STATUS "Unity interface changes: ON")
+ set(EXTRA_VALA_OPTIONS
+ ${EXTRA_VALA_OPTIONS}
+ --define=ENABLE_UNITY
+ )
+else ()
+ message(STATUS "Unity interface changes: OFF")
+endif ()
+
set(LIB_PATHS ${DEPS_LIBRARY_DIRS})
link_directories(${LIB_PATHS})
add_definitions(${CFLAGS})
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 9e02472..ccceb0e 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -73,12 +73,14 @@ public class MainWindow : Gtk.ApplicationWindow {
Geary.Engine.instance.account_available.connect(on_account_available);
Geary.Engine.instance.account_unavailable.connect(on_account_unavailable);
- create_layout();
-
// Toolbar.
main_toolbar = new MainToolbar();
+#if !ENABLE_UNITY
main_toolbar.show_close_button = true;
set_titlebar(main_toolbar);
+#endif
+
+ create_layout();
}
public override void show_all() {
@@ -171,6 +173,9 @@ public class MainWindow : Gtk.ApplicationWindow {
folder_paned.pack1(status_bar_box, false, false);
folder_paned.pack2(conversations_paned, true, false);
+#if ENABLE_UNITY
+ main_layout.pack_start(main_toolbar, false, true, 0);
+#endif
main_layout.pack_end(folder_paned, true, true, 0);
add(main_layout);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]