[gtkmm/vector] Make adaptations compilable.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/vector] Make adaptations compilable.
- Date: Sun, 23 Jan 2011 21:42:15 +0000 (UTC)
commit f7e74a0a7201328fd3f8ee9de7d6b526550fee3a
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sun Jan 23 22:35:01 2011 +0100
Make adaptations compilable.
gdk/src/types.hg | 2 +-
gtk/gtkmm/stock.cc | 2 +-
gtk/gtkmm/targetentry.h | 1 -
gtk/src/aboutdialog.hg | 2 --
gtk/src/box.hg | 1 -
gtk/src/builder.ccg | 12 ++++--------
gtk/src/clipboard.ccg | 10 ++++++----
gtk/src/clipboard.hg | 4 ++--
gtk/src/container.hg | 4 ++--
gtk/src/enums.hg | 10 ++++++----
gtk/src/filechooser.hg | 4 ++--
gtk/src/iconset.ccg | 2 +-
gtk/src/iconset.hg | 1 -
gtk/src/icontheme.ccg | 2 +-
gtk/src/iconview.ccg | 2 +-
gtk/src/iconview.hg | 2 +-
gtk/src/liststore.ccg | 2 +-
gtk/src/menushell.ccg | 14 +++++++-------
gtk/src/menushell.hg | 1 -
gtk/src/notebook.hg | 1 -
gtk/src/printsettings.hg | 2 +-
gtk/src/recentchooser.hg | 6 +++---
gtk/src/recentmanager.hg | 5 ++---
gtk/src/scalebutton.hg | 2 +-
gtk/src/table.hg | 1 -
gtk/src/textbuffer.ccg | 4 ++--
gtk/src/textbuffer.hg | 4 ++--
gtk/src/toolbar.hg | 1 -
gtk/src/treemodel.ccg | 2 +-
gtk/src/treeselection.ccg | 4 ++--
gtk/src/treeview.ccg | 25 +++++++++++++++----------
gtk/src/treeviewcolumn.hg | 1 -
gtk/src/window.hg | 1 -
33 files changed, 65 insertions(+), 72 deletions(-)
---
diff --git a/gdk/src/types.hg b/gdk/src/types.hg
index f9a5774..4e3cfff 100644
--- a/gdk/src/types.hg
+++ b/gdk/src/types.hg
@@ -103,7 +103,7 @@ inline bool operator!=(const Point& lhs, const Point& rhs)
struct PointTraits
{
typedef Gdk::Point CppType;
- typedef const GdkPoint CType;
+ typedef GdkPoint CType;
typedef GdkPoint CTypeNonConst;
static CType to_c_type (CType c_obj) { return c_obj; }
diff --git a/gtk/gtkmm/stock.cc b/gtk/gtkmm/stock.cc
index 56b6925..0bb8065 100644
--- a/gtk/gtkmm/stock.cc
+++ b/gtk/gtkmm/stock.cc
@@ -164,7 +164,7 @@ bool lookup(const Gtk::StockID& stock_id, Gtk::IconSize size, Gtk::Image& image)
std::vector<Gtk::StockID> get_ids()
{
- return Glib::SListHandler<Gtk::StockID,Gtk::StockID_Traits>::array_to_vector (
+ return Glib::SListHandler<Gtk::StockID,Gtk::StockID_Traits>::slist_to_vector (
gtk_stock_list_ids(), Glib::OWNERSHIP_DEEP);
}
diff --git a/gtk/gtkmm/targetentry.h b/gtk/gtkmm/targetentry.h
index 0fa93ed..87610ec 100644
--- a/gtk/gtkmm/targetentry.h
+++ b/gtk/gtkmm/targetentry.h
@@ -25,7 +25,6 @@
#include <glibmm/utility.h>
#include <glibmm/ustring.h>
-#include <glibmm/arrayhandle.h>
#include <gtkmm/enums.h>
#include <gtk/gtk.h> //For GtkTargetEntry.
diff --git a/gtk/src/aboutdialog.hg b/gtk/src/aboutdialog.hg
index b8ae745..873e3d6 100644
--- a/gtk/src/aboutdialog.hg
+++ b/gtk/src/aboutdialog.hg
@@ -81,8 +81,6 @@ public:
_WRAP_METHOD(std::vector<Glib::ustring> get_documenters() const, gtk_about_dialog_get_documenters)
- #m4 _CONVERSION(`const std::vector<Glib::ustring>&',`const gchar**',`const_cast<const gchar**>(($3).data())')
-
_WRAP_METHOD(void set_documenters(const std::vector<Glib::ustring>& documenters), gtk_about_dialog_set_documenters)
_WRAP_METHOD(std::vector<Glib::ustring> get_artists() const, gtk_about_dialog_get_artists)
_WRAP_METHOD(void set_artists(const std::vector<Glib::ustring>& artists), gtk_about_dialog_set_artists)
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 5302399..6caaddf 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -28,7 +28,6 @@ _PINCLUDE(gtkmm/private/container_p.h)
#include <gtkmm/container.h>
#include <gtkmm/orientable.h>
-#include <glibmm/helperlist.h>
#include <gtk/gtk.h> /* For _GtkBoxChild */
diff --git a/gtk/src/builder.ccg b/gtk/src/builder.ccg
index bc50f49..5d6d9a0 100644
--- a/gtk/src/builder.ccg
+++ b/gtk/src/builder.ccg
@@ -133,16 +133,14 @@ Glib::RefPtr<Builder> Builder::create_from_string(const Glib::ustring& buffer,
bool Builder::add_from_file(const std::string& filename, const char* object_id)
{
- std::list<Glib::ustring> object_ids;
- object_ids.push_back(object_id);
+ std::vector<Glib::ustring> object_ids (1, object_id);
return add_from_file(filename, object_ids);
}
bool Builder::add_from_file(const std::string& filename, const Glib::ustring& object_id)
{
- std::list<Glib::ustring> object_ids;
- object_ids.push_back(object_id);
+ std::vector<Glib::ustring> object_ids (1, object_id);
return add_from_file(filename, object_ids);
}
@@ -161,16 +159,14 @@ bool Builder::add_from_string(const Glib::ustring& buffer)
bool Builder::add_from_string(const Glib::ustring& buffer, const char* object_id)
{
- std::list<Glib::ustring> object_ids;
- object_ids.push_back(object_id);
+ std::vector<Glib::ustring> object_ids (1, object_id);
return add_from_string(buffer, object_ids);
}
bool Builder::add_from_string(const Glib::ustring& buffer, const Glib::ustring& object_id)
{
- std::list<Glib::ustring> object_ids;
- object_ids.push_back(object_id);
+ std::vector<Glib::ustring> object_ids (1, object_id);
return add_from_string(buffer, object_ids);
}
diff --git a/gtk/src/clipboard.ccg b/gtk/src/clipboard.ccg
index 7893742..e253d7a 100644
--- a/gtk/src/clipboard.ccg
+++ b/gtk/src/clipboard.ccg
@@ -19,6 +19,8 @@
#include <glibmm/vectorutils.h>
+#include <gdkmm/types.h>
+
#include <gtkmm/textbuffer.h>
#include <gtkmm/selectiondata_private.h>
#include <glibmm/utility.h> //For ScopedPtr<>.
@@ -114,7 +116,7 @@ static void SignalProxy_TargetsReceived_gtk_callback(GtkClipboard*, GdkAtom* ato
try
{
// TODO: check if the ownership is good.
- (*slot) (Glib::ArrayHandler<std::string, AtomStringTraits>::array_to_vector (names, n_atoms > 0 ? n_atoms : 0, Glib::OWNERSHIP_NONE));
+ (*slot) (Glib::ArrayHandler<std::string, Gdk::AtomStringTraits>::array_to_vector (atoms, n_atoms > 0 ? n_atoms : 0, Glib::OWNERSHIP_NONE));
}
catch (...)
{
@@ -204,7 +206,7 @@ bool Clipboard::set(const std::vector<TargetEntry>& targets,
return gtk_clipboard_set_with_data(
gobj(),
- Glib::ArrayHandler<TargetEntry, TargetEntry_Traits>::vector_to_array (targets).data (),
+ Glib::ArrayHandler<TargetEntry, TargetEntryTraits>::vector_to_array (targets).data (),
targets.size(),
&SignalProxy_GetClear_gtk_callback_get,
&SignalProxy_GetClear_gtk_callback_clear,
@@ -286,12 +288,12 @@ std::vector<std::string> Clipboard::wait_for_targets() const
n_targets = 0;
}
- return Glib::ArrayHandler<std::string, AtomStringTraits>::array_to_vector (atoms, n_targets, Glib::OWNERSHIP_SHALLOW);
+ return Glib::ArrayHandler<std::string, Gdk::AtomStringTraits>::array_to_vector (atoms, n_targets, Glib::OWNERSHIP_SHALLOW);
}
void Clipboard::set_can_store(const std::vector<TargetEntry>& targets)
{
- gtk_clipboard_set_can_store( gobj(), Glib::ArrayHandler<TargetEntry, TargetEntry_Traits>::vector_to_array (targets).data (), targets.size() );
+ gtk_clipboard_set_can_store( gobj(), Glib::ArrayHandler<TargetEntry, TargetEntryTraits>::vector_to_array (targets).data (), targets.size() );
}
void Clipboard::set_can_store()
diff --git a/gtk/src/clipboard.hg b/gtk/src/clipboard.hg
index ed9dbc7..69ca92b 100644
--- a/gtk/src/clipboard.hg
+++ b/gtk/src/clipboard.hg
@@ -26,7 +26,6 @@
#include <gtkmm/targetentry.h>
#include <gtkmm/selectiondata.h>
#include <glibmm/object.h>
-#include <glibmm/containers.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
@@ -219,7 +218,7 @@ public:
_IGNORE(gtk_clipboard_request_image)
/// For instance: void on_targets_received(const std::vector<Glib::ustring>& targets);
- typedef sigc::slot<void, const std::vector<Glib::ustring>&> SlotTargetsReceived;
+ typedef sigc::slot<void, const std::vector<std::string>&> SlotTargetsReceived;
/** Requests the contents of the clipboard as list of supported targets.
* When the list is later received, callback will be called.
@@ -273,6 +272,7 @@ public:
std::vector<std::string> wait_for_targets() const;
_IGNORE(gtk_clipboard_wait_for_targets)
+#m4 _CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector ($3, Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(std::vector<Glib::ustring> wait_for_uris() const, gtk_clipboard_wait_for_uris)
/** Hints that the clipboard data should be stored somewhere when the application exits or when store()
diff --git a/gtk/src/container.hg b/gtk/src/container.hg
index 242b032..1c233fb 100644
--- a/gtk/src/container.hg
+++ b/gtk/src/container.hg
@@ -109,13 +109,13 @@ public:
#m4 _CONVERSION(`GList*',`std::vector<Widget*>',`Glib::ListHandler<Widget*>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector<Widget*> get_children(), gtk_container_get_children)
-#m4 _CONVERSION(`GList*',`std::vector<const Widget*>',`Glib::ListHandler<Widget*>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GList*',`std::vector<const Widget*>',`Glib::ListHandler<const Widget*>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector<const Widget*> get_children() const, gtk_container_get_children)
//TODO: See https://bugzilla.gnome.org/show_bug.cgi?id=630800
//_WRAP_METHOD(void propagate_expose(Widget& child, GdkEventExpose* event), gtk_container_propagate_expose)
-#m4 _CONVERSION(`const std::vector<Widget*>&',`GList*',`Glib::ListHandler<Widget*>::vector_to_list($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`const std::vector<Widget*>&',`GList*',`Glib::ListHandler<Widget*>::vector_to_list($3).data ()')
_WRAP_METHOD(void set_focus_chain(const std::vector<Widget*>& focusable_widgets),
gtk_container_set_focus_chain)
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index 53de901..bd21d8a 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -19,6 +19,8 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <gtk/gtk.h>
+
#include <gtkmmconfig.h> //For GTKMM_MAEMO_EXTENSIONS_ENABLED
_DEFS(gtkmm,gtk)
@@ -209,13 +211,13 @@ public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
struct IconSizeTraits
{
- typedef Gtk::IconSize CppType;
- typedef const GtkIconSize CType;
- typedef GtkIconSize CTypeNonConst;
+ typedef Gtk::IconSize CppType;
+ typedef GtkIconSize CType;
+ typedef GtkIconSize CTypeNonConst;
static CType to_c_type (CType c_obj) { return c_obj; }
static void release_c_type (CType) {}
- static CType to_c_type (const CppType& cpp_obj) { return cpp_obj; }
+ static CType to_c_type (const CppType& cpp_obj) { int value (cpp_obj); return static_cast<CType> (value); }
static CppType to_cpp_type (CType c_obj) { return CppType (c_obj); }
};
#endif //DOXYGEN_SHOULD_SKIP_THIS
diff --git a/gtk/src/filechooser.hg b/gtk/src/filechooser.hg
index 9636c92..77bbb1e 100644
--- a/gtk/src/filechooser.hg
+++ b/gtk/src/filechooser.hg
@@ -159,8 +159,8 @@ public:
_WRAP_METHOD(void add_filter(const Glib::RefPtr<FileFilter>& filter), gtk_file_chooser_add_filter)
_WRAP_METHOD(void remove_filter (const Glib::RefPtr<FileFilter>& filter), gtk_file_chooser_remove_filter)
-_CONVERSION(`GSList*',`std::vector< Glib::RefPtr<FileFilter> >',`Glib::SListHandler< Glib::RefPtr<FileFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
-_CONVERSION(`GSList*',`std::vector< Glib::RefPtr<const FileFilter> >',`Glib::SListHandler< Glib::RefPtr<const FileFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<FileFilter> >',`Glib::SListHandler< Glib::RefPtr<FileFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<const FileFilter> >',`Glib::SListHandler< Glib::RefPtr<const FileFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector< Glib::RefPtr<FileFilter> > list_filters(), gtk_file_chooser_list_filters)
_WRAP_METHOD(std::vector< Glib::RefPtr<const FileFilter> > list_filters() const, gtk_file_chooser_list_filters)
diff --git a/gtk/src/iconset.ccg b/gtk/src/iconset.ccg
index 1966067..9dad7a9 100644
--- a/gtk/src/iconset.ccg
+++ b/gtk/src/iconset.ccg
@@ -37,7 +37,7 @@ std::vector<IconSize> IconSet::get_sizes() const
int n_sizes = 0;
gtk_icon_set_get_sizes(const_cast<GtkIconSet*>(gobj()), &pSizes, &n_sizes);
- return Glib::ArrayHandler<IconSize, IconSizeTraits>(pSizes, n_sizes, Glib::OWNERSHIP_SHALLOW);
+ return Glib::ArrayHandler<IconSize, IconSizeTraits>::array_to_vector (pSizes, n_sizes, Glib::OWNERSHIP_SHALLOW);
}
IconSet IconSet::lookup_default(const Gtk::StockID& stock_id) //static
diff --git a/gtk/src/iconset.hg b/gtk/src/iconset.hg
index 2059e34..3680541 100644
--- a/gtk/src/iconset.hg
+++ b/gtk/src/iconset.hg
@@ -24,7 +24,6 @@
#include <gtkmm/iconsource.h>
//#include <gtkmm/widget.h>
#include <gtkmm/stockid.h>
-#include <glibmm/arrayhandle.h>
_DEFS(gtkmm,gtk)
diff --git a/gtk/src/icontheme.ccg b/gtk/src/icontheme.ccg
index cf9550f..74a7f0e 100644
--- a/gtk/src/icontheme.ccg
+++ b/gtk/src/icontheme.ccg
@@ -46,7 +46,7 @@ std::vector<int> IconTheme::get_icon_sizes(const Glib::ustring& icon_name) const
std::vector<Glib::ustring> IconTheme::list_icons() const
{
- return Glib::ListHandler<Glib::ustring>::array_to_vector (gtk_icon_theme_list_icons(const_cast<GtkIconTheme*>(gobj()), 0 /* means all icons according to the C documentation. */ ), Glib::OWNERSHIP_SHALLOW);
+ return Glib::ListHandler<Glib::ustring>::list_to_vector (gtk_icon_theme_list_icons(const_cast<GtkIconTheme*>(gobj()), 0 /* means all icons according to the C documentation. */ ), Glib::OWNERSHIP_SHALLOW);
}
diff --git a/gtk/src/iconview.ccg b/gtk/src/iconview.ccg
index e17f510..39dd19d 100644
--- a/gtk/src/iconview.ccg
+++ b/gtk/src/iconview.ccg
@@ -185,7 +185,7 @@ void IconView::enable_model_drag_source(const std::vector<TargetEntry>& targets,
void IconView::enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions)
{
- gtk_icon_view_enable_model_drag_dest(gobj(), Glib::ArrayHandler<TargetEntry>::vector_to_array (targets).data(), targets.size(), (GdkDragAction)actions);
+ gtk_icon_view_enable_model_drag_dest(gobj(), Glib::ArrayHandler<TargetEntry, TargetEntryTraits>::vector_to_array (targets).data(), targets.size(), (GdkDragAction)actions);
}
bool
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index 93579f2..d4008b1 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -181,7 +181,7 @@ public:
};
#endif //DOXYGEN_SHOULD_SKIP_THIS
- _CONVERSION(`GList*',`std::vector<TreePath>',`Glib::ListHandler<TreePath, TreePathTraits>::list_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GList*',`std::vector<TreePath>',`Glib::ListHandler<TreePath, TreePathTraits>::list_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector<TreePath> get_selected_items() const, gtk_icon_view_get_selected_items)
_WRAP_METHOD(void select_all(), gtk_icon_view_select_all)
diff --git a/gtk/src/liststore.ccg b/gtk/src/liststore.ccg
index 3eea244..c7ba805 100644
--- a/gtk/src/liststore.ccg
+++ b/gtk/src/liststore.ccg
@@ -119,7 +119,7 @@ void ListStore::move(const iterator& source, const iterator& destination)
void ListStore::reorder(const std::vector<int>& new_order)
{
- gtk_list_store_reorder(gobj(), const_cast<int*>(Glib::ArrayHandler<int>vector_to_array (new_order).data()));
+ gtk_list_store_reorder(gobj(), const_cast<int*>(Glib::ArrayHandler<int>::vector_to_array (new_order).data()));
}
void ListStore::set_value_impl(const iterator& row, int column, const Glib::ValueBase& value)
diff --git a/gtk/src/menushell.ccg b/gtk/src/menushell.ccg
index 0f3c676..a99e30c 100644
--- a/gtk/src/menushell.ccg
+++ b/gtk/src/menushell.ccg
@@ -55,16 +55,16 @@ void MenuShell::accelerate(Window& window)
// after it has been accelerated.
accel_window_ = &window;
- typedef std::list<Gtk::Widget*> type_list_widgets;
- type_list_widgets items = get_children();
- const type_list_widgets::iterator items_end = items.end();
+ std::vector<Gtk::Widget*> items = get_children();
- for(type_list_widgets::iterator iter = items.begin(); iter != items_end; ++iter)
+ for(std::vector<Gtk::Widget*>::iterator iter (items.begin ()), items_end (items.end ()); iter != items_end; ++iter)
{
- Gtk::Widget* widget = *iter;
- Gtk::MenuItem* menuitem = dynamic_cast<MenuItem*>(widget);
- if(menuitem)
+ Gtk::MenuItem* menuitem = dynamic_cast<MenuItem*>(*iter);
+
+ if (menuitem)
+ {
menuitem->accelerate(window);
+ }
}
}
diff --git a/gtk/src/menushell.hg b/gtk/src/menushell.hg
index 5c24b68..88fd8a9 100644
--- a/gtk/src/menushell.hg
+++ b/gtk/src/menushell.hg
@@ -26,7 +26,6 @@ _PINCLUDE(gtkmm/window.h)
#include <gtkmm/container.h>
#include <gtkmm/menuitem.h>
-#include <glibmm/helperlist.h>
namespace Gtk
{
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index fd4600c..1669059 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -20,7 +20,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <gtkmm/container.h>
#include <gtkmm/label.h>
-#include <glibmm/helperlist.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
diff --git a/gtk/src/printsettings.hg b/gtk/src/printsettings.hg
index 508d875..573f614 100644
--- a/gtk/src/printsettings.hg
+++ b/gtk/src/printsettings.hg
@@ -277,7 +277,7 @@ public:
struct PageRangeTraits
{
typedef PageRange CppType;
- typedef const GtkPageRange CType;
+ typedef GtkPageRange CType;
typedef GtkPageRange CTypeNonConst;
static CType to_c_type (CType c_obj) { return c_obj; }
diff --git a/gtk/src/recentchooser.hg b/gtk/src/recentchooser.hg
index 72036ab..f8c1fd2 100644
--- a/gtk/src/recentchooser.hg
+++ b/gtk/src/recentchooser.hg
@@ -103,9 +103,9 @@ public:
_WRAP_METHOD(void unselect_all(), gtk_recent_chooser_unselect_all)
//typedef Glib::ListHandle<RecentInfo, RecentInfoTraits> ListHandle_RecentInfos;
- _CONVERSION(`GList*',`std::vector<RecentInfo>',`Glib::ListHandler<RecentInfo, RecentInfoTraits>::list_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<RecentInfo> >',`Glib::ListHandler<Glib::RefPtr<RecentInfo>, RecentInfoTraits>::list_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
- _WRAP_METHOD(std::vector<RecentInfo> get_items() const, gtk_recent_chooser_get_items)
+ _WRAP_METHOD(std::vector<Glib::RefPtr<RecentInfo> > get_items() const, gtk_recent_chooser_get_items)
/** Gets the URI of the recently used resources.
*
@@ -120,7 +120,7 @@ public:
#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<RecentFilter> >',`Glib::SListHandler<Glib::RefPtr<RecentFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector< Glib::RefPtr<RecentFilter> > list_filters(), gtk_recent_chooser_list_filters)
-#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<const RecentFilter> >',`Glib::SListHandler<Glib::RefPtr<RecentFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GSList*',`std::vector< Glib::RefPtr<const RecentFilter> >',`Glib::SListHandler<Glib::RefPtr<const RecentFilter> >::slist_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector< Glib::RefPtr<const RecentFilter> > list_filters() const, gtk_recent_chooser_list_filters)
_WRAP_METHOD(void set_filter(const Glib::RefPtr<RecentFilter>& filter), gtk_recent_chooser_set_filter)
diff --git a/gtk/src/recentmanager.hg b/gtk/src/recentmanager.hg
index 825fc98..5be9c6b 100644
--- a/gtk/src/recentmanager.hg
+++ b/gtk/src/recentmanager.hg
@@ -25,7 +25,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <gtkmm/recentinfo.h>
#include <glibmm/object.h>
-#include <glibmm/containers.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
@@ -124,9 +123,9 @@ public:
_WRAP_METHOD(bool has_item(const Glib::ustring& uri) const, gtk_recent_manager_has_item)
_WRAP_METHOD(bool move_item(const Glib::ustring& uri, const Glib::ustring& new_uri), gtk_recent_manager_move_item, errthrow)
- _CONVERSION(`GList*',`std::vector<RecentInfo>',`Glib::ListHandler<RecentInfo, RecentInfoTraits>::list_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<RecentInfo> >',`Glib::ListHandler<Glib::RefPtr<RecentInfo>, RecentInfoTraits>::list_to_vector ($3, Glib::OWNERSHIP_SHALLOW)')
- _WRAP_METHOD(std::vector<RecentInfo> get_items() const, gtk_recent_manager_get_items)
+ _WRAP_METHOD(std::vector<Glib::RefPtr<RecentInfo> > get_items() const, gtk_recent_manager_get_items)
_WRAP_METHOD(int purge_items(), gtk_recent_manager_purge_items, errthrow)
diff --git a/gtk/src/scalebutton.hg b/gtk/src/scalebutton.hg
index 336b936..735ac79 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -47,7 +47,7 @@ class ScaleButton
_IMPLEMENTS_INTERFACE(Orientable)
public:
-#m4 _CONVERSION(`const std::vector<Glib::ustring>&',`const gchar**',`Glib::ArrayHandler<Glib::ustring>::vector_to_array ($3)')
+#m4 _CONVERSION(`const std::vector<Glib::ustring>&',`const gchar**',`Glib::ArrayHandler<Glib::ustring>::vector_to_array ($3).data ()')
_WRAP_CTOR(ScaleButton(IconSize size, double min, double max, double step, const std::vector<Glib::ustring>& icons), gtk_scale_button_new)
_WRAP_METHOD(void set_icons(const std::vector<Glib::ustring>& icons), gtk_scale_button_set_icons)
diff --git a/gtk/src/table.hg b/gtk/src/table.hg
index 9223a98..cb6cdd4 100644
--- a/gtk/src/table.hg
+++ b/gtk/src/table.hg
@@ -17,7 +17,6 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <glibmm/helperlist.h>
#include <gtkmm/container.h>
#include <gtkmm/enums.h>
diff --git a/gtk/src/textbuffer.ccg b/gtk/src/textbuffer.ccg
index 7bb5b8e..ad9d0ad 100644
--- a/gtk/src/textbuffer.ccg
+++ b/gtk/src/textbuffer.ccg
@@ -499,14 +499,14 @@ Glib::ustring TextBuffer::get_text(bool include_hidden_chars) const
return get_text(unconst->begin(), unconst->end(), include_hidden_chars);
}
-std::vector<std::vector> TextBuffer::get_serialize_formats() const
+std::vector<std::string> TextBuffer::get_serialize_formats() const
{
int n_atoms = 0;
GdkAtom* atoms = gtk_text_buffer_get_serialize_formats(const_cast<GtkTextBuffer*>(gobj()), &n_atoms);
return Glib::ArrayHandler<std::string, Gdk::AtomStringTraits>::array_to_vector(atoms, n_atoms, Glib::OWNERSHIP_SHALLOW);
}
-std::vector<Glib::ustring> TextBuffer::get_deserialize_formats() const
+std::vector<std::string> TextBuffer::get_deserialize_formats() const
{
int n_atoms = 0;
GdkAtom* atoms = gtk_text_buffer_get_deserialize_formats(const_cast<GtkTextBuffer*>(gobj()), &n_atoms);
diff --git a/gtk/src/textbuffer.hg b/gtk/src/textbuffer.hg
index f602947..9b3cd7e 100644
--- a/gtk/src/textbuffer.hg
+++ b/gtk/src/textbuffer.hg
@@ -494,9 +494,9 @@ public:
_WRAP_METHOD(bool get_can_create_tags(const Glib::ustring& format) const, gtk_text_buffer_deserialize_get_can_create_tags)
- std::vector<Glib::ustring> get_serialize_formats() const;
+ std::vector<std::string> get_serialize_formats() const;
_IGNORE(gtk_text_buffer_get_serialize_formats)
- std::vector<Glib::ustring> get_deserialize_formats() const;
+ std::vector<std::string> get_deserialize_formats() const;
_IGNORE(gtk_text_buffer_get_deserialize_formats)
/*
diff --git a/gtk/src/toolbar.hg b/gtk/src/toolbar.hg
index 1101e9e..0305556 100644
--- a/gtk/src/toolbar.hg
+++ b/gtk/src/toolbar.hg
@@ -23,7 +23,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <gtkmm/toolitem.h>
#include <gtkmm/toolbutton.h>
#include <gtkmm/toggletoolbutton.h>
-#include <glibmm/helperlist.h>
#include <gtkmm/container.h>
#include <gtkmm/stockid.h>
diff --git a/gtk/src/treemodel.ccg b/gtk/src/treemodel.ccg
index 80339e4..4bb6e3a 100644
--- a/gtk/src/treemodel.ccg
+++ b/gtk/src/treemodel.ccg
@@ -598,7 +598,7 @@ void TreeModel::rows_reordered(const Path& path, const iterator& iter, const std
gtk_tree_model_rows_reordered(gobj(),
const_cast<GtkTreePath*>((path).gobj()),
const_cast<GtkTreeIter*>((iter).gobj()),
- const_cast<int*>(Glib::ArrayHandler<int>::vector_to_data (new_order).data ()));
+ const_cast<int*>(Glib::ArrayHandler<int>::vector_to_array (new_order).data ()));
}
void TreeModel::rows_reordered(const Path& path, const std::vector<int>& new_order)
diff --git a/gtk/src/treeselection.ccg b/gtk/src/treeselection.ccg
index 2659591..46ea6f2 100644
--- a/gtk/src/treeselection.ccg
+++ b/gtk/src/treeselection.ccg
@@ -167,7 +167,7 @@ void TreeSelection::selected_foreach(const SlotForeachPathAndIter& slot) const
std::vector<TreeModel::Path> TreeSelection::get_selected_rows() const
{
- return Glib::ListHandler<TreeModel::Path, TreePathTraits>::array_to_vector (gtk_tree_selection_get_selected_rows(
+ return Glib::ListHandler<TreeModel::Path, TreePathTraits>::list_to_vector (gtk_tree_selection_get_selected_rows(
const_cast<GtkTreeSelection*>(gobj()), 0), Glib::OWNERSHIP_DEEP);
}
@@ -175,7 +175,7 @@ std::vector<TreeModel::Path> TreeSelection::get_selected_rows(Glib::RefPtr<TreeM
{
GtkTreeModel* model_gobject = 0;
- const std::vector<TreeModel::Path> result (Glib::ListHandler<TreeModel::Path, TreePathTraits>::array_to_vector (gtk_tree_selection_get_selected_rows(
+ const std::vector<TreeModel::Path> result (Glib::ListHandler<TreeModel::Path, TreePathTraits>::list_to_vector (gtk_tree_selection_get_selected_rows(
const_cast<GtkTreeSelection*>(gobj()), &model_gobject), Glib::OWNERSHIP_DEEP));
model = Glib::wrap(model_gobject, true);
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index 446c3ff..6cf9eb1 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -159,9 +159,9 @@ void TreeView::enable_model_drag_source(const std::vector<TargetEntry>& targets,
void TreeView::enable_model_drag_source(Gdk::ModifierType start_button_mask, Gdk::DragAction actions)
{
- std::list<TargetEntry> listTargets;
- listTargets.push_back(TargetEntry(treeview_target_row));
- enable_model_drag_source(listTargets, start_button_mask, actions);
+ std::vector<TargetEntry> targets (1, TargetEntry (treeview_target_row));
+
+ enable_model_drag_source(targets, start_button_mask, actions);
}
void TreeView::enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions)
@@ -173,9 +173,9 @@ void TreeView::enable_model_drag_dest(const std::vector<TargetEntry>& targets, G
void TreeView::enable_model_drag_dest(Gdk::DragAction actions)
{
- std::list<TargetEntry> listTargets;
- listTargets.push_back(TargetEntry(treeview_target_row));
- enable_model_drag_dest(listTargets, actions);
+ std::vector<TargetEntry> targets (1, TargetEntry (treeview_target_row));
+
+ enable_model_drag_dest(targets, actions);
}
bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColumn*& column, int& cell_x, int& cell_y) const
@@ -295,13 +295,18 @@ void TreeView::remove_all_columns()
//This method is not in GTK+, but it seems useful.
//Remove all View columns:
- typedef std::list< Gtk::TreeView::Column* > type_vecViewColumns;
- type_vecViewColumns vecViewColumns = get_columns();
- for(type_vecViewColumns::iterator iter = vecViewColumns.begin(); iter != vecViewColumns.end(); ++iter)
+ std::vector<Gtk::TreeView::Column*> vecViewColumns (get_columns());
+
+ for (std::vector<Gtk::TreeView::Column*>::iterator iter (vecViewColumns.begin ()), columns_end (vecViewColumns.end ());
+ iter != columns_end;
+ ++iter)
{
- Gtk::TreeView::Column* pViewColumn = *iter;
+ Gtk::TreeView::Column* pViewColumn (*iter);
+
if(pViewColumn)
+ {
remove_column(*pViewColumn);
+ }
}
}
diff --git a/gtk/src/treeviewcolumn.hg b/gtk/src/treeviewcolumn.hg
index e20cdb4..867cf7d 100644
--- a/gtk/src/treeviewcolumn.hg
+++ b/gtk/src/treeviewcolumn.hg
@@ -24,7 +24,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <gdkmm/window.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/celllayout.h>
-#include <glibmm/listhandle.h>
#include <gtkmm/cellrenderer_generation.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/object_p.h)
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 0bbbcb4..15b0754 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -22,7 +22,6 @@
#include <vector>
#include <glibmm/object.h>
-#include <glibmm/listhandle.h>
#include <gtkmm/bin.h>
#include <gtkmm/application.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]