Commit 02ecae85 authored by Murray Cumming's avatar Murray Cumming
Browse files

Adapt to the gtkmm 3 change to using vectors.

* glom/mode_data/datawidget/cellrenderer_dblist.cc:
* glom/mode_data/db_adddel/db_adddel.cc:
* glom/mode_design/layout/dialog_choose_field.cc:
* glom/mode_design/print_layouts/print_layout_toolbar_button.cc:
* glom/mode_design/print_layouts/window_print_layout_edit.h:
* glom/utility_widgets/imageglom.cc:
* glom/utility_widgets/layouttoolbarbutton.cc: Use std::vector instead of
std::list.
* glom/dialog_existing_or_new.cc: This one even used the intermediate type
directly, showing how necessary this API change was.
parent 43347f7f
2011-01-28 Murray Cumming <murrayc@murrayc.com>
Adapt to the gtkmm 3 change to using vectors.
* glom/mode_data/datawidget/cellrenderer_dblist.cc:
* glom/mode_data/db_adddel/db_adddel.cc:
* glom/mode_design/layout/dialog_choose_field.cc:
* glom/mode_design/print_layouts/print_layout_toolbar_button.cc:
* glom/mode_design/print_layouts/window_print_layout_edit.h:
* glom/utility_widgets/imageglom.cc:
* glom/utility_widgets/layouttoolbarbutton.cc: Use std::vector instead of
std::list.
* glom/dialog_existing_or_new.cc: This one even used the intermediate type
directly, showing how necessary this API change was.
2011-01-18 Murray Cumming <murrayc@murrayc.com>
Disable more deprecated API.
......
......@@ -163,8 +163,9 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
#endif
// Add recently used files
Gtk::RecentManager::ListHandle_RecentInfos infos = Gtk::RecentManager::get_default()->get_items();
for(Gtk::RecentManager::ListHandle_RecentInfos::const_iterator iter = infos.begin(); iter != infos.end(); ++ iter)
typedef std::vector< Glib::RefPtr<Gtk::RecentInfo> > type_vec_infos;
type_vec_infos infos = Gtk::RecentManager::get_default()->get_items();
for(type_vec_infos::const_iterator iter = infos.begin(); iter != infos.end(); ++ iter)
{
Glib::RefPtr<Gtk::RecentInfo> info = *iter;
if(info->get_mime_type() == "application/x-glom")
......
......@@ -157,7 +157,7 @@ void CellRendererDbList::repack_cells_related(Gtk::CellLayout* combobox)
std::cerr << G_STRFUNC << ": widget is null." << std::endl;
}
const std::list<Gtk::CellRenderer*> cells = combobox->get_cells();
const std::vector<Gtk::CellRenderer*> cells = combobox->get_cells();
const guint initial_cells_count = cells.size();
guint i = 0;
......
......@@ -1643,7 +1643,7 @@ void DbAddDel::on_treeview_column_resized(int model_column_index, DbTreeViewColu
//We do not save the column width if this is the last column,
//because that must always be automatic,
//because it must resize when the whole column resizes.
std::list<const Gtk::TreeView::Column*> columns = m_TreeView.get_columns();
std::vector<Gtk::TreeView::Column*> columns = m_TreeView.get_columns();
const int n_view_columns = columns.size();
if(n_view_columns && (view_column == m_TreeView.get_column(n_view_columns -1)))
return;
......
......@@ -222,7 +222,7 @@ Dialog_ChooseField::type_list_field_items Dialog_ChooseField::get_fields_chosen(
sharedptr<Relationship> relationship = m_combo_relationship->get_selected_relationship(related_relationship);
typedef std::list<Gtk::TreeModel::Path> type_list_paths;
typedef std::vector<Gtk::TreeModel::Path> type_list_paths;
type_list_paths list_paths = refTreeSelection->get_selected_rows();
for(type_list_paths::const_iterator iter = list_paths.begin(); iter != list_paths.end(); ++iter)
{
......
......@@ -51,7 +51,7 @@ PrintLayoutToolbarButton::PrintLayoutToolbarButton(const std::string& icon_name,
m_type = type;
g_object_set_data(G_OBJECT(gobj()), "glom-type", GINT_TO_POINTER(type));
std::list<Gtk::TargetEntry> targetentries;
std::vector<Gtk::TargetEntry> targetentries;
targetentries.push_back(Gtk::TargetEntry(get_target()));
drag_source_set(targetentries, Gdk::MODIFIER_MASK,
......
......@@ -135,7 +135,7 @@ private:
//Toolbar:
Gtk::HandleBox* m_palette_handle_box; //TODO: The toolbar is already a HandleBox.
std::list<Gtk::TargetEntry> m_drag_targets;
std::vector<Gtk::TargetEntry> m_drag_targets;
PrintLayoutToolbar m_toolbar;
//Context menu for clicking on empty space on the canvas:
......
......@@ -233,8 +233,8 @@ Gnome::Gda::Value ImageGlom::get_value() const
{
gchar* buffer = 0;
gsize buffer_size = 0;
std::list<Glib::ustring> list_keys;
std::list<Glib::ustring> list_values;
std::vector<Glib::ustring> list_keys;
std::vector<Glib::ustring> list_values;
//list_keys.push_back("quality"); //For jpeg only.
//list_values.push_back("95");
......@@ -407,8 +407,7 @@ void ImageGlom::on_menupopup_activate_copy()
Glib::RefPtr<Gtk::Clipboard> refClipboard = Gtk::Clipboard::get();
//Targets:
std::list<Gtk::TargetEntry> listTargets;
std::vector<Gtk::TargetEntry> listTargets;
listTargets.push_back( Gtk::TargetEntry(GLOM_IMAGE_FORMAT_MIME_TYPE) );
refClipboard->set( listTargets, sigc::mem_fun(*this, &ImageGlom::on_clipboard_get), sigc::mem_fun(*this, &ImageGlom::on_clipboard_clear) );
......
......@@ -50,7 +50,7 @@ LayoutToolbarButton::LayoutToolbarButton(const std::string& icon_name, LayoutWid
m_type = type;
g_object_set_data(G_OBJECT(gobj()), "glom-type", GINT_TO_POINTER(type));
std::list<Gtk::TargetEntry> targetentries;
std::vector<Gtk::TargetEntry> targetentries;
targetentries.push_back(Gtk::TargetEntry(get_target()));
drag_source_set(targetentries, Gdk::MODIFIER_MASK,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment