diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-06-05 04:23:39 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-06-05 04:23:39 +0200 |
commit | 4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (patch) | |
tree | fc8426e57068733d7df20fc3a963f11cd864f079 /src/publishing | |
parent | 0d64f78a02829282cd00dd6df691df08d29ed751 (diff) |
Imported Upstream version 0.23.1upstream/0.23.1
Diffstat (limited to 'src/publishing')
-rw-r--r-- | src/publishing/APIGlue.vala | 2 | ||||
-rw-r--r-- | src/publishing/Publishing.vala | 2 | ||||
-rw-r--r-- | src/publishing/PublishingPluginHost.vala | 2 | ||||
-rw-r--r-- | src/publishing/PublishingUI.vala | 47 |
4 files changed, 45 insertions, 8 deletions
diff --git a/src/publishing/APIGlue.vala b/src/publishing/APIGlue.vala index 24e10cc..23c4e8c 100644 --- a/src/publishing/APIGlue.vala +++ b/src/publishing/APIGlue.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/publishing/Publishing.vala b/src/publishing/Publishing.vala index c245385..6c30b91 100644 --- a/src/publishing/Publishing.vala +++ b/src/publishing/Publishing.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/publishing/PublishingPluginHost.vala b/src/publishing/PublishingPluginHost.vala index 1a95ef3..fed3802 100644 --- a/src/publishing/PublishingPluginHost.vala +++ b/src/publishing/PublishingPluginHost.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/publishing/PublishingUI.vala b/src/publishing/PublishingUI.vala index a74bfaf..f1e4ce6 100644 --- a/src/publishing/PublishingUI.vala +++ b/src/publishing/PublishingUI.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2015 Yorba Foundation +/* Copyright 2016 Software Freedom Conservancy Inc. * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. @@ -156,8 +156,11 @@ public class PublishingDialog : Gtk.Dialog { protected PublishingDialog(Gee.Collection<MediaSource> to_publish) { assert(to_publish.size > 0); - Object(use_header_bar: 1); - ((Gtk.HeaderBar) get_header_bar()).set_show_close_button(false); + bool use_header; + Gtk.Settings.get_default ().get ("gtk-dialogs-use-header", out use_header); + Object(use_header_bar: use_header ? 1 : 0); + if (use_header) + ((Gtk.HeaderBar) get_header_bar()).set_show_close_button(false); resizable = false; delete_event.connect(on_window_close); @@ -243,6 +246,36 @@ public class PublishingDialog : Gtk.Dialog { service_selector_box.changed.connect(on_service_changed); + if (!use_header) + { + var service_selector_box_label = new Gtk.Label.with_mnemonic(label); + service_selector_box_label.set_mnemonic_widget(service_selector_box); + service_selector_box_label.set_alignment(0.0f, 0.5f); + + /* the wrapper is not an extraneous widget -- it's necessary to prevent the service + selection box from growing and shrinking whenever its parent's size changes. + When wrapped inside a Gtk.Alignment, the Alignment grows and shrinks instead of + the service selection box. */ + Gtk.Alignment service_selector_box_wrapper = new Gtk.Alignment(1.0f, 0.5f, 0.0f, 0.0f); + service_selector_box_wrapper.add(service_selector_box); + + Gtk.Box service_selector_layouter = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 8); + service_selector_layouter.set_border_width(12); + service_selector_layouter.add(service_selector_box_label); + service_selector_layouter.pack_start(service_selector_box_wrapper, true, true, 0); + + /* 'service area' is the selector assembly plus the horizontal rule dividing it from the + rest of the dialog */ + Gtk.Box service_area_layouter = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); + service_area_layouter.add(service_selector_layouter); + service_area_layouter.add(new Gtk.Separator(Gtk.Orientation.HORIZONTAL)); + + Gtk.Alignment service_area_wrapper = new Gtk.Alignment(0.0f, 0.0f, 1.0f, 0.0f); + service_area_wrapper.add(service_area_layouter); + + get_content_area().pack_start(service_area_wrapper, false, false, 0); + } + central_area_layouter = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); get_content_area().pack_start(central_area_layouter, true, true, 0); @@ -250,8 +283,12 @@ public class PublishingDialog : Gtk.Dialog { close_cancel_button = new Gtk.Button.with_mnemonic("_Cancel"); close_cancel_button.set_can_default(true); close_cancel_button.clicked.connect(on_close_cancel_clicked); - ((Gtk.HeaderBar) get_header_bar()).pack_start(close_cancel_button); - ((Gtk.HeaderBar) get_header_bar()).pack_end(service_selector_box); + if (use_header) { + ((Gtk.HeaderBar) get_header_bar()).pack_start(close_cancel_button); + ((Gtk.HeaderBar) get_header_bar()).pack_end(service_selector_box); + } + else + ((Gtk.Container) get_action_area()).add(close_cancel_button); set_standard_window_mode(); |