[california/wip/732029-gtk-312] Fix some RotatingButtonBox issues
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/732029-gtk-312] Fix some RotatingButtonBox issues
- Date: Wed, 20 Aug 2014 21:13:14 +0000 (UTC)
commit 958d9cf75a7c6449ceff292476166fb97d997f6f
Author: Jim Nelson <jim yorba org>
Date: Wed Aug 20 14:12:54 2014 -0700
Fix some RotatingButtonBox issues
src/host/host-show-event.vala | 12 +++++++++---
src/toolkit/toolkit-rotating-button-box.vala | 10 +++++-----
2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/host/host-show-event.vala b/src/host/host-show-event.vala
index 5ee6bd7..9179a95 100644
--- a/src/host/host-show-event.vala
+++ b/src/host/host-show-event.vala
@@ -64,10 +64,11 @@ public class ShowEvent : Gtk.Grid, Toolkit.Card {
private Gtk.Button close_button = new Gtk.Button.with_mnemonic(_("_Close"));
private Gtk.Button update_button = new Gtk.Button.with_mnemonic(_("_Edit"));
private Gtk.Button remove_button = new Gtk.Button.with_mnemonic(_("_Delete"));
- private Gtk.Button remove_all_button = new Gtk.Button.with_mnemonic(_("Delete A_ll Events"));
- private Gtk.Button remove_this_button = new Gtk.Button.with_mnemonic(_("Delete _This Event"));
+ private Gtk.Label delete_label = new Gtk.Label(_("Delete"));
+ private Gtk.Button remove_all_button = new Gtk.Button.with_mnemonic(_("A_ll Events"));
+ private Gtk.Button remove_this_button = new Gtk.Button.with_mnemonic(_("_This Event"));
private Gtk.Button remove_this_future_button = new Gtk.Button.with_mnemonic(
- _("Delete This and _Future Events"));
+ _("This & _Future Events"));
private Gtk.Button cancel_remove_button = new Gtk.Button.with_mnemonic(_("_Cancel"));
public ShowEvent() {
@@ -94,11 +95,16 @@ public class ShowEvent : Gtk.Grid, Toolkit.Card {
rotating_button_box.pack_end(FAMILY_NORMAL, update_button);
rotating_button_box.pack_end(FAMILY_NORMAL, close_button);
+ delete_label.xalign = 1.0f;
+ delete_label.get_style_context().add_class(Gtk.STYLE_CLASS_DIM_LABEL);
+ rotating_button_box.pack_start(FAMILY_REMOVING, delete_label);
rotating_button_box.pack_end(FAMILY_REMOVING, remove_this_button);
rotating_button_box.pack_end(FAMILY_REMOVING, remove_this_future_button);
rotating_button_box.pack_end(FAMILY_REMOVING, remove_all_button);
rotating_button_box.pack_end(FAMILY_REMOVING, cancel_remove_button);
+ rotating_button_box.get_family_container(FAMILY_REMOVING).homogeneous = false;
+
rotating_button_box.expand = true;
rotating_button_box.halign = Gtk.Align.FILL;
rotating_button_box.valign = Gtk.Align.END;
diff --git a/src/toolkit/toolkit-rotating-button-box.vala b/src/toolkit/toolkit-rotating-button-box.vala
index 552e274..07a5f53 100644
--- a/src/toolkit/toolkit-rotating-button-box.vala
+++ b/src/toolkit/toolkit-rotating-button-box.vala
@@ -74,8 +74,8 @@ public class RotatingButtonBox : Gtk.Stack {
*
* See Gtk.Box.pack_start().
*/
- public void pack_start(string family, Gtk.Button button) {
- get_family_container(family).pack_start(button);
+ public void pack_start(string family, Gtk.Widget widget) {
+ get_family_container(family).pack_start(widget);
}
/**
@@ -83,8 +83,8 @@ public class RotatingButtonBox : Gtk.Stack {
*
* See Gtk.Box.pack_end().
*/
- public void pack_end(string family, Gtk.Button button) {
- get_family_container(family).pack_end(button);
+ public void pack_end(string family, Gtk.Widget widget) {
+ get_family_container(family).pack_end(widget);
}
/**
@@ -133,7 +133,7 @@ public class RotatingButtonBox : Gtk.Stack {
if (show && !shown)
add_named(button_box, family);
- else if (shown)
+ else if (!show && shown)
remove(button_box);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]