collection manager: Rename widgets in the glade file

o_collection_* was easily confused with widgets on the collection tab,
so I renamed everything to be less confusing.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2014-06-22 11:16:11 -04:00
parent dd9f6de62f
commit 80bed8b956
4 changed files with 25 additions and 25 deletions

View File

@ -76,12 +76,12 @@ void collection_mgr_init()
{
Glib::RefPtr<Gtk::CellRendererToggle> toggle;
c_treeview = lib :: get_widget<Gtk::TreeView>("o_collection_treeview");
c_chooser = lib :: get_widget<Gtk::FileChooserWidget>("o_collection_chooser");
toggle = lib :: get_object<Gtk::CellRendererToggle>("o_collection_toggle");
c_treeview = lib :: get_widget<Gtk::TreeView>("colmgr_treeview");
c_chooser = lib :: get_widget<Gtk::FileChooserWidget>("colmgr_chooser");
toggle = lib :: get_object<Gtk::CellRendererToggle>("colmgr_toggle");
connect_button("o_collection_ok", on_ok);
connect_button("o_collection_update", on_update);
connect_button("colmgr_add", on_ok);
connect_button("colmgr_update", on_update);
c_treeview->signal_row_activated().connect(sigc::ptr_fun(on_row_activated));
c_treeview->signal_cursor_changed().connect(sigc::ptr_fun(on_cursor_changed));

View File

@ -53,7 +53,7 @@ void colmgr :: init()
Database<Library>::iterator it;
Database<Library> *db = &tagdb :: get_library_db();
c_list = lib :: get_object<Gtk::ListStore>("o_collection_list");
c_list = lib :: get_object<Gtk::ListStore>("colmgr_list");
c_list->set_sort_column(c_cols.c_path, Gtk::SORT_ASCENDING);
for (it = db->begin(); it != db->end(); it != db->next(it))

View File

@ -7,6 +7,18 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkListStore" id="colmgr_list">
<columns>
<!-- column-name id -->
<column type="guint"/>
<!-- column-name enabled -->
<column type="gboolean"/>
<!-- column-name size -->
<column type="guint"/>
<!-- column-name path -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkFileFilter" id="filefilter1">
<mime-types>
<mime-type>inode/directory</mime-type>
@ -183,18 +195,6 @@
</object>
</child>
</object>
<object class="GtkListStore" id="o_collection_list">
<columns>
<!-- column-name id -->
<column type="guint"/>
<!-- column-name enabled -->
<column type="gboolean"/>
<!-- column-name size -->
<column type="guint"/>
<!-- column-name path -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="o_playlists">
<columns>
<!-- column-name Playlists -->
@ -1070,7 +1070,7 @@ Manager</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFileChooserWidget" id="o_collection_chooser">
<object class="GtkFileChooserWidget" id="colmgr_chooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">5</property>
@ -1098,12 +1098,12 @@ Manager</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="o_collection_treeview">
<object class="GtkTreeView" id="colmgr_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscroll_policy">natural</property>
<property name="vscroll_policy">natural</property>
<property name="model">o_collection_list</property>
<property name="model">colmgr_list</property>
<property name="headers_clickable">False</property>
<property name="rules_hint">True</property>
<property name="enable_search">False</property>
@ -1114,7 +1114,7 @@ Manager</property>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="fixed_width">20</property>
<child>
<object class="GtkCellRendererToggle" id="o_collection_toggle"/>
<object class="GtkCellRendererToggle" id="colmgr_toggle"/>
<attributes>
<attribute name="active">1</attribute>
</attributes>
@ -1161,7 +1161,7 @@ Manager</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="o_collection_ok">
<object class="GtkButton" id="colmgr_add">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@ -1207,7 +1207,7 @@ Manager</property>
</packing>
</child>
<child>
<object class="GtkButton" id="o_collection_update">
<object class="GtkButton" id="colmgr_update">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>

View File

@ -16,7 +16,7 @@ void test_colmgr()
Gtk::TreePath path;
Gtk::TreeModel::Row row;
Glib::RefPtr<Gtk::ListStore> list;
list = lib :: get_object<Gtk::ListStore>("o_collection_list");
list = lib :: get_object<Gtk::ListStore>("colmgr_list");
test_equal((size_t)list->children().size(), (size_t)0);