[glom] Use buttonbox for details view.
- From: Daniel Borgmann <dborg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Use buttonbox for details view.
- Date: Thu, 8 Apr 2010 18:37:10 +0000 (UTC)
commit 1629b9762972cf725ac6b47e3c9166df47bf9bec
Author: Daniel Borgmann <danielb openismus com>
Date: Thu Apr 8 19:30:07 2010 +0100
Use buttonbox for details view.
* glom/mode_data/box_data_details.cc:
* glom/mode_data/box_data_details.h:
Use HButtonBox instead of HBox.
ChangeLog | 8 ++++++++
glom/mode_data/box_data_details.cc | 13 ++++++++-----
glom/mode_data/box_data_details.h | 2 +-
3 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 49f1122..fc08854 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-04-08 Daniel Borgmann <danielb openismus com>
+
+ Use buttonbox for details view.
+
+ * glom/mode_data/box_data_details.cc:
+ * glom/mode_data/box_data_details.h:
+ Use HButtonBox instead of HBox.
+
2010-04-08 Murray Cumming <murrayc murrayc com>
ImageGlom: Move scale_keeping_ratio() somewhere more sensible.
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index 89503f1..cdbb933 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -39,7 +39,7 @@ namespace Glom
Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
: m_hbox_content(false, Utils::DEFAULT_SPACING_SMALL),
#ifndef GLOM_ENABLE_MAEMO
- m_hbox_buttons(false, Utils::DEFAULT_SPACING_SMALL),
+ m_hbox_buttons(Gtk::BUTTONBOX_END, Utils::DEFAULT_SPACING_SMALL),
m_Button_New(Gtk::Stock::ADD),
m_Button_Del(Gtk::Stock::DELETE),
m_Button_Nav_First(Gtk::Stock::GOTO_FIRST),
@@ -127,6 +127,9 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
m_hbox_buttons.pack_start(m_Button_New, Gtk::PACK_SHRINK);
m_hbox_buttons.pack_start(m_Button_Del, Gtk::PACK_SHRINK);
+ m_hbox_buttons.set_child_secondary(m_Button_New, true);
+ m_hbox_buttons.set_child_secondary(m_Button_Del, true);
+
//Link buttons to handlers:
m_Button_New.signal_clicked().connect(sigc::mem_fun(*this, &Box_Data_Details::on_button_new));
m_Button_Del.signal_clicked().connect(sigc::mem_fun(*this, &Box_Data_Details::on_button_del));
@@ -134,10 +137,10 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
//Navigation:
if(bWithNavButtons)
{
- m_hbox_buttons.pack_end(m_Button_Nav_Last, Gtk::PACK_SHRINK);
- m_hbox_buttons.pack_end(m_Button_Nav_Next, Gtk::PACK_SHRINK);
- m_hbox_buttons.pack_end(m_Button_Nav_Prev, Gtk::PACK_SHRINK);
- m_hbox_buttons.pack_end(m_Button_Nav_First, Gtk::PACK_SHRINK);
+ m_hbox_buttons.pack_start(m_Button_Nav_First, Gtk::PACK_SHRINK);
+ m_hbox_buttons.pack_start(m_Button_Nav_Prev, Gtk::PACK_SHRINK);
+ m_hbox_buttons.pack_start(m_Button_Nav_Next, Gtk::PACK_SHRINK);
+ m_hbox_buttons.pack_start(m_Button_Nav_Last, Gtk::PACK_SHRINK);
}
//Link buttons to handlers:
diff --git a/glom/mode_data/box_data_details.h b/glom/mode_data/box_data_details.h
index 9bbd7b4..f5fe312 100644
--- a/glom/mode_data/box_data_details.h
+++ b/glom/mode_data/box_data_details.h
@@ -150,7 +150,7 @@ protected:
#endif
#ifndef GLOM_ENABLE_MAEMO
- Gtk::HBox m_hbox_buttons;
+ Gtk::HButtonBox m_hbox_buttons;
Gtk::Button m_Button_New;
Gtk::Button m_Button_Del;
Gtk::Button m_Button_Nav_First;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]