--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.
This commit is contained in:
Jim Nelson 2014-04-04 14:56:38 -07:00
parent e44d50561d
commit ce269c79bf
4 changed files with 24 additions and 3 deletions

6
configure vendored
View file

@ -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"

2
debian/rules vendored
View file

@ -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

View file

@ -579,6 +579,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})

View file

@ -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);