[glom] Renamed Dialog_GroupBy_SecondaryFields to Dialog_FieldsList.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Renamed Dialog_GroupBy_SecondaryFields to Dialog_FieldsList.
- Date: Tue, 7 Sep 2010 13:52:09 +0000 (UTC)
commit 7a576b182b4308689ab2318b59fe02d2d12f4e3e
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 6 15:56:14 2010 +0200
Renamed Dialog_GroupBy_SecondaryFields to Dialog_FieldsList.
* glom/mode_design/layout/layout_item_dialogs/dialog_groupby_second
aryfields.[h|cc]: Rename to dialog_fieldslist.[h|cc]:
* glom/glom_developer.glade: Renamed the ID too.
adapted.
* Makefile_glom.am:
* glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h:
* tests/test_glade_derived_instantiation.cc:
Adapted.
This lets me use it for other things too.
ChangeLog | 14 +++++
Makefile_glom.am | 4 +-
glom/glom_developer.glade | 2 +-
...pby_secondaryfields.cc => dialog_fieldslist.cc} | 61 ++++++++++----------
...oupby_secondaryfields.h => dialog_fieldslist.h} | 12 ++--
.../layout/layout_item_dialogs/dialog_group_by.h | 4 +-
tests/test_glade_derived_instantiation.cc | 4 +-
7 files changed, 57 insertions(+), 44 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6659698..5549f1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2010-09-06 Murray Cumming <murrayc murrayc-desktop>
+ Renamed Dialog_GroupBy_SecondaryFields to Dialog_FieldsList.
+
+ * glom/mode_design/layout/layout_item_dialogs/dialog_groupby_second
+ aryfields.[h|cc]: Rename to dialog_fieldslist.[h|cc]:
+ * glom/glom_developer.glade: Renamed the ID too.
+ adapted.
+ * Makefile_glom.am:
+ * glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h:
+ * tests/test_glade_derived_instantiation.cc:
+ Adapted.
+ This lets me use it for other things too.
+
+2010-09-06 Murray Cumming <murrayc murrayc-desktop>
+
get_choices_related
2010-09-06 Murray Cumming <murrayc murrayc com>
diff --git a/Makefile_glom.am b/Makefile_glom.am
index bc5c1da..3f12009 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -266,8 +266,8 @@ glom_source_files += \
glom/mode_design/layout/layout_item_dialogs/dialog_formatting.h \
glom/mode_design/layout/layout_item_dialogs/dialog_group_by.cc \
glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h \
- glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.cc \
- glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.h \
+ glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc \
+ glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.h \
glom/mode_design/layout/layout_item_dialogs/dialog_groupby_sortfields.cc \
glom/mode_design/layout/layout_item_dialogs/dialog_groupby_sortfields.h \
glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc \
diff --git a/glom/glom_developer.glade b/glom/glom_developer.glade
index 4512473..322a238 100644
--- a/glom/glom_developer.glade
+++ b/glom/glom_developer.glade
@@ -5741,7 +5741,7 @@ Which user should be added to this group?</property>
<action-widget response="-5">button_ok</action-widget>
</action-widgets>
</object>
- <object class="GtkDialog" id="dialog_groupby_secondary_fields">
+ <object class="GtkDialog" id="dialog_fieldslist">
<property name="title" translatable="yes">Group By - Secondary Fields</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc
similarity index 82%
rename from glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.cc
rename to glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc
index 32d1c32..17c4f39 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.cc
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "dialog_groupby_secondaryfields.h"
+#include "dialog_fieldslist.h"
#include "dialog_field_layout.h"
//#include <libgnome/gnome-i18n.h>
@@ -27,10 +27,10 @@
namespace Glom
{
-const char* Dialog_GroupBy_SecondaryFields::glade_id("dialog_groupby_secondary_fields");
-const bool Dialog_GroupBy_SecondaryFields::glade_developer(true);
+const char* Dialog_FieldsList::glade_id("dialog_fieldslist");
+const bool Dialog_FieldsList::glade_developer(true);
-Dialog_GroupBy_SecondaryFields::Dialog_GroupBy_SecondaryFields(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
+Dialog_FieldsList::Dialog_FieldsList(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
: Dialog_Layout(cobject, builder, false /* means no table title */),
m_treeview_fields(0),
m_button_field_up(0),
@@ -55,7 +55,7 @@ Dialog_GroupBy_SecondaryFields::Dialog_GroupBy_SecondaryFields(BaseObjectType* c
Gtk::CellRendererText* renderer_name = Gtk::manage(new Gtk::CellRendererText);
column_name->pack_start(*renderer_name);
- column_name->set_cell_data_func(*renderer_name, sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_cell_data_name));
+ column_name->set_cell_data_func(*renderer_name, sigc::mem_fun(*this, &Dialog_FieldsList::on_cell_data_name));
//Sort by sequence, so we can change the order by changing the values in the hidden sequence column.
@@ -66,39 +66,39 @@ Dialog_GroupBy_SecondaryFields::Dialog_GroupBy_SecondaryFields(BaseObjectType* c
Glib::RefPtr<Gtk::TreeView::Selection> refSelection = m_treeview_fields->get_selection();
if(refSelection)
{
- refSelection->signal_changed().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_treeview_fields_selection_changed) );
+ refSelection->signal_changed().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_treeview_fields_selection_changed) );
}
- m_model_fields->signal_row_changed().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_treemodel_row_changed) );
+ m_model_fields->signal_row_changed().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_treemodel_row_changed) );
}
builder->get_widget("button_field_up", m_button_field_up);
- m_button_field_up->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_button_field_up) );
+ m_button_field_up->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_button_field_up) );
builder->get_widget("button_field_down", m_button_field_down);
- m_button_field_down->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_button_field_down) );
+ m_button_field_down->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_button_field_down) );
builder->get_widget("button_field_delete", m_button_field_delete);
- m_button_field_delete->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_button_delete) );
+ m_button_field_delete->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_button_delete) );
builder->get_widget("button_field_add", m_button_field_add);
- m_button_field_add->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_button_add_field) );
+ m_button_field_add->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_button_add_field) );
builder->get_widget("button_field_edit", m_button_field_edit);
- m_button_field_edit->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_button_edit_field) );
+ m_button_field_edit->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_button_edit_field) );
builder->get_widget("button_field_formatting", m_button_field_formatting);
- m_button_field_formatting->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_GroupBy_SecondaryFields::on_button_formatting) );
+ m_button_field_formatting->signal_clicked().connect( sigc::mem_fun(*this, &Dialog_FieldsList::on_button_formatting) );
show_all_children();
}
-Dialog_GroupBy_SecondaryFields::~Dialog_GroupBy_SecondaryFields()
+Dialog_FieldsList::~Dialog_FieldsList()
{
}
-void Dialog_GroupBy_SecondaryFields::set_fields(const Glib::ustring& table_name, const LayoutGroup::type_list_items& fields)
+void Dialog_FieldsList::set_fields(const Glib::ustring& table_name, const LayoutGroup::type_list_items& fields)
{
m_modified = false;
m_table_name = table_name;
@@ -135,7 +135,7 @@ void Dialog_GroupBy_SecondaryFields::set_fields(const Glib::ustring& table_name,
m_modified = false;
}
-void Dialog_GroupBy_SecondaryFields::enable_buttons()
+void Dialog_FieldsList::enable_buttons()
{
//Fields:
Glib::RefPtr<Gtk::TreeView::Selection> refSelection = m_treeview_fields->get_selection();
@@ -177,17 +177,17 @@ void Dialog_GroupBy_SecondaryFields::enable_buttons()
}
-void Dialog_GroupBy_SecondaryFields::on_button_field_up()
+void Dialog_FieldsList::on_button_field_up()
{
move_treeview_selection_up(m_treeview_fields, m_ColumnsFields.m_col_sequence);
}
-void Dialog_GroupBy_SecondaryFields::on_button_field_down()
+void Dialog_FieldsList::on_button_field_down()
{
move_treeview_selection_down(m_treeview_fields, m_ColumnsFields.m_col_sequence);
}
-LayoutGroup::type_list_items Dialog_GroupBy_SecondaryFields::get_fields() const
+LayoutGroup::type_list_items Dialog_FieldsList::get_fields() const
{
LayoutGroup::type_list_items result;
@@ -202,7 +202,7 @@ LayoutGroup::type_list_items Dialog_GroupBy_SecondaryFields::get_fields() const
{
sharedptr<LayoutItem_Field> field_copy = glom_sharedptr_clone(item);
- result[field_sequence] = field_copy;
+ result[field_sequence] = field_copy;
++field_sequence;
}
@@ -211,21 +211,21 @@ LayoutGroup::type_list_items Dialog_GroupBy_SecondaryFields::get_fields() const
return result;
}
-void Dialog_GroupBy_SecondaryFields::on_treeview_fields_selection_changed()
+void Dialog_FieldsList::on_treeview_fields_selection_changed()
{
enable_buttons();
}
-void Dialog_GroupBy_SecondaryFields::on_button_add_field()
+void Dialog_FieldsList::on_button_add_field()
{
//Get the chosen fields:
type_list_field_items fields_list = offer_field_list(m_table_name, this);
- for(type_list_field_items::iterator iter_chosen = fields_list.begin(); iter_chosen != fields_list.end(); ++iter_chosen)
+ for(type_list_field_items::iterator iter_chosen = fields_list.begin(); iter_chosen != fields_list.end(); ++iter_chosen)
{
- sharedptr<LayoutItem_Field> field = *iter_chosen;
+ sharedptr<LayoutItem_Field> field = *iter_chosen;
if(!field)
continue;
-
+
//Add the field details to the layout treeview:
Gtk::TreeModel::iterator iter = m_model_fields->append();
@@ -246,7 +246,7 @@ void Dialog_GroupBy_SecondaryFields::on_button_add_field()
}
}
-void Dialog_GroupBy_SecondaryFields::on_button_delete()
+void Dialog_FieldsList::on_button_delete()
{
Glib::RefPtr<Gtk::TreeView::Selection> refTreeSelection = m_treeview_fields->get_selection();
if(refTreeSelection)
@@ -263,7 +263,7 @@ void Dialog_GroupBy_SecondaryFields::on_button_delete()
}
-void Dialog_GroupBy_SecondaryFields::on_cell_data_name(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter)
+void Dialog_FieldsList::on_cell_data_name(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter)
{
//Set the view's cell properties depending on the model's data:
Gtk::CellRendererText* renderer_text = dynamic_cast<Gtk::CellRendererText*>(renderer);
@@ -281,7 +281,7 @@ void Dialog_GroupBy_SecondaryFields::on_cell_data_name(Gtk::CellRenderer* render
}
-void Dialog_GroupBy_SecondaryFields::on_button_edit_field()
+void Dialog_FieldsList::on_button_edit_field()
{
Glib::RefPtr<Gtk::TreeView::Selection> refTreeSelection = m_treeview_fields->get_selection();
if(refTreeSelection)
@@ -294,7 +294,7 @@ void Dialog_GroupBy_SecondaryFields::on_button_edit_field()
sharedptr<const LayoutItem_Field> field = row[m_ColumnsFields.m_col_layout_item];
//Get the chosen field:
- sharedptr<LayoutItem_Field> field_chosen =
+ sharedptr<LayoutItem_Field> field_chosen =
offer_field_list_select_one_field(field, m_table_name, this);
//Set the field details in the layout treeview:
@@ -315,7 +315,7 @@ void Dialog_GroupBy_SecondaryFields::on_button_edit_field()
}
}
-void Dialog_GroupBy_SecondaryFields::on_button_formatting()
+void Dialog_FieldsList::on_button_formatting()
{
Glib::RefPtr<Gtk::TreeView::Selection> refTreeSelection = m_treeview_fields->get_selection();
if(refTreeSelection)
@@ -336,4 +336,3 @@ void Dialog_GroupBy_SecondaryFields::on_button_formatting()
}
} //namespace Glom
-
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.h b/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.h
similarity index 87%
rename from glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.h
rename to glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.h
index 495c2ee..bbdfcaa 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.h
@@ -18,8 +18,8 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef GLOM_MODE_DATA_DIALOG_GROUPBY_SECONDARYFIELDS_HH
-#define GLOM_MODE_DATA_DIALOG_GROUPBY_SECONDARYFIELDS_HH
+#ifndef GLOM_MODE_DATA_DIALOG_FIELDSLIST_HH
+#define GLOM_MODE_DATA_DIALOG_FIELDSLIST_HH
#include <glom/base_db.h>
#include <glom/mode_design/layout/dialog_layout.h>
@@ -28,15 +28,15 @@
namespace Glom
{
-class Dialog_GroupBy_SecondaryFields
+class Dialog_FieldsList
: public Dialog_Layout //It has some useful stuff
{
public:
static const char* glade_id;
static const bool glade_developer;
- Dialog_GroupBy_SecondaryFields(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
- virtual ~Dialog_GroupBy_SecondaryFields();
+ Dialog_FieldsList(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
+ virtual ~Dialog_FieldsList();
void set_fields(const Glib::ustring& table_name, const LayoutGroup::type_list_items& table_fields);
@@ -87,4 +87,4 @@ private:
} //namespace Glom
-#endif //GLOM_MODE_DATA_DIALOG_GROUPBY_SECONDARYFIELDS_HH
+#endif //GLOM_MODE_DATA_DIALOG_FIELDSLIST_HH
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h b/glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h
index 86d6d8d..9d2d041 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h
@@ -27,7 +27,7 @@
#include <glom/box_withbuttons.h>
#include <glom/utility_widgets/combo_textglade.h>
#include <glom/mode_design/comboentry_currency.h>
-#include "dialog_groupby_secondaryfields.h"
+#include "dialog_fieldslist.h"
#include "dialog_groupby_sortfields.h"
#include "comboentry_borderwidth.h"
@@ -73,7 +73,7 @@ private:
Gtk::Button* m_button_secondary_fields;
ComboEntry_BorderWidth* m_comboboxentry_border_width;
- Dialog_GroupBy_SecondaryFields* m_dialog_choose_secondary_fields;
+ Dialog_FieldsList* m_dialog_choose_secondary_fields;
Dialog_GroupBy_SortFields* m_dialog_choose_sort_fields;
mutable sharedptr<LayoutItem_GroupBy> m_layout_item;
diff --git a/tests/test_glade_derived_instantiation.cc b/tests/test_glade_derived_instantiation.cc
index 67aff02..5923a9f 100644
--- a/tests/test_glade_derived_instantiation.cc
+++ b/tests/test_glade_derived_instantiation.cc
@@ -35,7 +35,7 @@
#include <glom/mode_design/fields/dialog_fielddefinition.h>
#include <glom/mode_design/dialog_fields.h>
#include <glom/mode_design/dialog_initial_password.h>
-#include <glom/mode_design/layout/layout_item_dialogs/dialog_groupby_secondaryfields.h>
+#include <glom/mode_design/layout/layout_item_dialogs/dialog_fieldslist.h>
#include <glom/mode_design/layout/layout_item_dialogs/dialog_groupby_sortfields.h>
#include <glom/mode_design/layout/layout_item_dialogs/dialog_formatting.h>
#include <glom/mode_design/script_library/dialog_new_script.h>
@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
instantiate_widget<Dialog_ChooseRelationship>();
instantiate_widget<Dialog_FieldDefinition>();
instantiate_widget<Box_Formatting>();
- instantiate_widget<Dialog_GroupBy_SecondaryFields>();
+ instantiate_widget<Dialog_FieldsList>();
instantiate_widget<Dialog_GroupBy_SortFields>();
instantiate_widget<Dialog_ImageObject>();
instantiate_widget<Dialog_Notebook>();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]