[glom] Use button box for adddel widgets.
- From: Daniel Borgmann <dborg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Use button box for adddel widgets.
- Date: Thu, 8 Apr 2010 18:37:04 +0000 (UTC)
commit d18d85755629331d43377de12a5363c3676a590d
Author: Daniel Borgmann <danielb openismus com>
Date: Thu Apr 8 12:24:35 2010 +0100
Use button box for adddel widgets.
* glom/utility_widgets/adddel/adddel_withbuttons.cc:
* glom/utility_widgets/adddel/adddel_withbuttons.h:
* glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc:
* glom/utility_widgets/db_adddel/db_adddel_withbuttons.h:
Use ButtonBox instead of HBox.
ChangeLog | 10 ++++++
glom/utility_widgets/adddel/adddel_withbuttons.cc | 30 ++++++++++----------
glom/utility_widgets/adddel/adddel_withbuttons.h | 2 +-
.../db_adddel/db_adddel_withbuttons.cc | 16 +++++-----
.../db_adddel/db_adddel_withbuttons.h | 2 +-
5 files changed, 35 insertions(+), 25 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dbf7831..49f1122 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,16 @@
2010-04-08 Daniel Borgmann <danielb openismus com>
+ Use button box for adddel widgets.
+
+ * glom/utility_widgets/adddel/adddel_withbuttons.cc:
+ * glom/utility_widgets/adddel/adddel_withbuttons.h:
+ * glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc:
+ * glom/utility_widgets/db_adddel/db_adddel_withbuttons.h:
+ Use ButtonBox instead of HBox.
+
+2010-04-08 Daniel Borgmann <danielb openismus com>
+
Use button box for listview buttons.
* glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc:
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.cc b/glom/utility_widgets/adddel/adddel_withbuttons.cc
index b6dc267..addba32 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.cc
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.cc
@@ -27,7 +27,7 @@ namespace Glom
{
AddDel_WithButtons::AddDel_WithButtons()
-: m_HBox(false, Utils::DEFAULT_SPACING_SMALL),
+: m_ButtonBox(Gtk::BUTTONBOX_END),
m_Button_Add(Gtk::Stock::ADD),
m_Button_Del(Gtk::Stock::DELETE),
m_Button_Edit(Gtk::Stock::OPEN)
@@ -37,7 +37,7 @@ AddDel_WithButtons::AddDel_WithButtons()
AddDel_WithButtons::AddDel_WithButtons(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: AddDel(cobject, builder),
- m_HBox(false, Utils::DEFAULT_SPACING_SMALL),
+ m_ButtonBox(Gtk::BUTTONBOX_END),
m_Button_Add(Gtk::Stock::ADD),
m_Button_Del(Gtk::Stock::DELETE),
m_Button_Edit(Gtk::Stock::OPEN)
@@ -47,13 +47,13 @@ AddDel_WithButtons::AddDel_WithButtons(BaseObjectType* cobject, const Glib::RefP
void AddDel_WithButtons::init()
{
- m_HBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
+ m_ButtonBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
//m_Button_Add.set_border_width(Utils::DEFAULT_SPACING_SMALL);
//m_Button_Del.set_border_width(Utils::DEFAULT_SPACING_SMALL);
//m_Button_Edit.set_border_width(Utils::DEFAULT_SPACING_SMALL);
setup_buttons();
- pack_start(m_HBox, Gtk::PACK_SHRINK);
+ pack_start(m_ButtonBox, Gtk::PACK_SHRINK);
//Link buttons to handlers:
m_Button_Add.signal_clicked().connect(sigc::mem_fun(*this, &AddDel_WithButtons::on_button_add));
@@ -116,15 +116,15 @@ void AddDel_WithButtons::set_allow_user_actions(bool bVal)
{
set_allow_user_actions(false); //Remove them first (Don't want to add them twice).
- //Ensure that the buttons are in the HBox.
+ //Ensure that the buttons are in the ButtonBox.
setup_buttons();
}
else
{
- //We don't just remove m_HBox, because we want it to remain as a placeholder.
- m_HBox.remove(m_Button_Add);
- m_HBox.remove(m_Button_Del);
- m_HBox.remove(m_Button_Edit);
+ //We don't just remove m_ButtonBox, because we want it to remain as a placeholder.
+ m_ButtonBox.remove(m_Button_Add);
+ m_ButtonBox.remove(m_Button_Del);
+ m_ButtonBox.remove(m_Button_Edit);
}
//Recreate popup menu with correct items:
@@ -134,15 +134,15 @@ void AddDel_WithButtons::set_allow_user_actions(bool bVal)
void AddDel_WithButtons::setup_buttons()
{
//Put buttons below sheet:
- //m_HBox.remove(m_Button_Add);
- //m_HBox.remove(m_Button_Del);
- //m_HBox.remove(m_Button_Edit);
+ //m_ButtonBox.remove(m_Button_Add);
+ //m_ButtonBox.remove(m_Button_Del);
+ //m_ButtonBox.remove(m_Button_Edit);
if(get_allow_user_actions())
{
- m_HBox.pack_end(m_Button_Edit, Gtk::PACK_SHRINK);
- m_HBox.pack_end(m_Button_Del, Gtk::PACK_SHRINK);
- m_HBox.pack_end(m_Button_Add, Gtk::PACK_SHRINK);
+ m_ButtonBox.pack_end(m_Button_Add, Gtk::PACK_SHRINK);
+ m_ButtonBox.pack_end(m_Button_Del, Gtk::PACK_SHRINK);
+ m_ButtonBox.pack_end(m_Button_Edit, Gtk::PACK_SHRINK);
}
}
diff --git a/glom/utility_widgets/adddel/adddel_withbuttons.h b/glom/utility_widgets/adddel/adddel_withbuttons.h
index f0d333e..86175a4 100644
--- a/glom/utility_widgets/adddel/adddel_withbuttons.h
+++ b/glom/utility_widgets/adddel/adddel_withbuttons.h
@@ -46,7 +46,7 @@ private:
void on_button_edit();
//member widgets:
- Gtk::HBox m_HBox;
+ Gtk::HButtonBox m_ButtonBox;
Gtk::Button m_Button_Add;
Gtk::Button m_Button_Del;
Gtk::Button m_Button_Edit;
diff --git a/glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc b/glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc
index ac2ef88..b5c9ebb 100644
--- a/glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel_withbuttons.cc
@@ -25,7 +25,7 @@ namespace Glom
{
DbAddDel_WithButtons::DbAddDel_WithButtons()
-: m_HBox(Gtk::BUTTONBOX_END),
+: m_ButtonBox(Gtk::BUTTONBOX_END),
#ifndef GLOM_ENABLE_MAEMO
m_Button_Del(Gtk::Stock::DELETE),
m_Button_Edit(Gtk::Stock::OPEN),
@@ -34,24 +34,24 @@ DbAddDel_WithButtons::DbAddDel_WithButtons()
m_Button_Add(Gtk::Hildon::SIZE_FINGER_HEIGHT, Hildon::BUTTON_ARRANGEMENT_HORIZONTAL)
#endif
{
- m_HBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
+ m_ButtonBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
setup_buttons();
- pack_start(m_HBox, Gtk::PACK_SHRINK);
+ pack_start(m_ButtonBox, Gtk::PACK_SHRINK);
//Link buttons to handlers:
#ifndef GLOM_ENABLE_MAEMO
m_Button_Add.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_add));
- m_HBox.pack_end(m_Button_Add, Gtk::PACK_SHRINK);
+ m_ButtonBox.pack_end(m_Button_Add, Gtk::PACK_SHRINK);
m_Button_Del.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_del));
m_Button_Edit.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_edit));
- m_HBox.pack_end(m_Button_Del, Gtk::PACK_SHRINK);
- m_HBox.pack_end(m_Button_Edit, Gtk::PACK_SHRINK);
+ m_ButtonBox.pack_end(m_Button_Del, Gtk::PACK_SHRINK);
+ m_ButtonBox.pack_end(m_Button_Edit, Gtk::PACK_SHRINK);
#else
- m_HBox.hide();
+ m_ButtonBox.hide();
#endif //GLOM_ENABLE_MAEMO
#ifdef GLOM_ENABLE_MAEMO
@@ -133,7 +133,7 @@ void DbAddDel_WithButtons::setup_buttons()
m_Button_Del.set_property("visible", allow_del);
#endif //GLOM_ENABLE_MAEMO
- m_HBox.show();
+ m_ButtonBox.show();
}
// TODO_maemo: Why is this show_all_vfunc, and not on_show()? Where is the
diff --git a/glom/utility_widgets/db_adddel/db_adddel_withbuttons.h b/glom/utility_widgets/db_adddel/db_adddel_withbuttons.h
index 06616af..5d145f8 100644
--- a/glom/utility_widgets/db_adddel/db_adddel_withbuttons.h
+++ b/glom/utility_widgets/db_adddel/db_adddel_withbuttons.h
@@ -55,7 +55,7 @@ private:
virtual void show_all_vfunc();
//member widgets:
- Gtk::HButtonBox m_HBox;
+ Gtk::HButtonBox m_ButtonBox;
#ifndef GLOM_ENABLE_MAEMO
typedef Gtk::Button type_button;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]