gtkmm r958 - in branches/gtkmm-2-12: . atk/src gtk/src



Author: murrayc
Date: Sat Jan 26 12:46:09 2008
New Revision: 958
URL: http://svn.gnome.org/viewvc/gtkmm?rev=958&view=rev

Log:
2008-01-26  Murray Cumming  <murrayc murrayc com>

* atk/src/action.hg:
* atk/src/editabletext.hg:
* atk/src/image.hg:
* atk/src/object.hg:
* atk/src/streamablecontent.hg:
* gtk/src/celllayout.hg:
* gtk/src/cellrenderer.hg:
* gtk/src/cellrendereraccel.hg:
* gtk/src/cellrenderertext.hg:
* gtk/src/cellrenderertoggle.hg:
* gtk/src/entry.hg:
* gtk/src/entrycompletion.hg:
* gtk/src/recentchooser.hg:
* gtk/src/statusbar.hg:
* gtk/src/style.hg:
* gtk/src/textview.hg: Added conversions from const gchar* to const ustring&, 
to fix the build I guess I removed this from a convert_*.m4 file, to discourage  
people from returning const ustring& from methods.
Bug #511708 (Josà Alburquerque).

Modified:
   branches/gtkmm-2-12/ChangeLog
   branches/gtkmm-2-12/atk/src/action.hg
   branches/gtkmm-2-12/atk/src/editabletext.hg
   branches/gtkmm-2-12/atk/src/image.hg
   branches/gtkmm-2-12/atk/src/object.hg
   branches/gtkmm-2-12/atk/src/streamablecontent.hg
   branches/gtkmm-2-12/gtk/src/celllayout.hg
   branches/gtkmm-2-12/gtk/src/cellrenderer.hg
   branches/gtkmm-2-12/gtk/src/cellrendereraccel.hg
   branches/gtkmm-2-12/gtk/src/cellrenderertext.hg
   branches/gtkmm-2-12/gtk/src/cellrenderertoggle.hg
   branches/gtkmm-2-12/gtk/src/entry.hg
   branches/gtkmm-2-12/gtk/src/entrycompletion.hg
   branches/gtkmm-2-12/gtk/src/recentchooser.hg
   branches/gtkmm-2-12/gtk/src/statusbar.hg
   branches/gtkmm-2-12/gtk/src/style.hg
   branches/gtkmm-2-12/gtk/src/textview.hg

Modified: branches/gtkmm-2-12/atk/src/action.hg
==============================================================================
--- branches/gtkmm-2-12/atk/src/action.hg	(original)
+++ branches/gtkmm-2-12/atk/src/action.hg	Sat Jan 26 12:46:09 2008
@@ -64,6 +64,8 @@
   _WRAP_VFUNC(const char* get_description(int i) const, "get_description")
   _WRAP_VFUNC(const char* get_name(int i) const, "get_name")
   _WRAP_VFUNC(const char* get_keybinding(int i) const, "get_keybinding")
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_VFUNC(bool set_description(int i, const Glib::ustring& desc), "set_description")
 };
 

Modified: branches/gtkmm-2-12/atk/src/editabletext.hg
==============================================================================
--- branches/gtkmm-2-12/atk/src/editabletext.hg	(original)
+++ branches/gtkmm-2-12/atk/src/editabletext.hg	Sat Jan 26 12:46:09 2008
@@ -55,7 +55,10 @@
 
 protected:
   _WRAP_VFUNC(bool set_run_attributes(AtkAttributeSet* attrib_set, int start_offset, int end_offset), set_run_attributes)
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_VFUNC(void set_text_contents(const Glib::ustring& string), set_text_contents)
+
   _WRAP_VFUNC(void insert_text(const Glib::ustring& string, int length, int& position), insert_text)
   _WRAP_VFUNC(void copy_text(int start_pos, int end_pos), copy_text)
   _WRAP_VFUNC(void cut_text(int start_pos, int end_pos), cut_text)

Modified: branches/gtkmm-2-12/atk/src/image.hg
==============================================================================
--- branches/gtkmm-2-12/atk/src/image.hg	(original)
+++ branches/gtkmm-2-12/atk/src/image.hg	Sat Jan 26 12:46:09 2008
@@ -55,6 +55,7 @@
   _WRAP_METHOD(void get_image_position(int& x, int& y, CoordType coord_type) const, atk_image_get_image_position)
 
 protected:
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_VFUNC(bool set_image_description(const Glib::ustring& description), set_image_description)
   _WRAP_VFUNC(const char* get_image_description() const, get_image_description)
 

Modified: branches/gtkmm-2-12/atk/src/object.hg
==============================================================================
--- branches/gtkmm-2-12/atk/src/object.hg	(original)
+++ branches/gtkmm-2-12/atk/src/object.hg	Sat Jan 26 12:46:09 2008
@@ -82,7 +82,10 @@
   _WRAP_SIGNAL(void children_changed(guint change_index, gpointer changed_child), "children_changed")
   _WRAP_SIGNAL(void focus_event(bool focus_in), "focus_event")
   _WRAP_SIGNAL(void property_change(AtkPropertyValues* values), "property_change")
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void state_change(const Glib::ustring& name, bool state_set), "state_change")
+
   _WRAP_SIGNAL(void visible_data_changed(), "visible_data_changed")
   _WRAP_SIGNAL(void active_descendant_changed(void** child), "active_descendant_changed")
 

Modified: branches/gtkmm-2-12/atk/src/streamablecontent.hg
==============================================================================
--- branches/gtkmm-2-12/atk/src/streamablecontent.hg	(original)
+++ branches/gtkmm-2-12/atk/src/streamablecontent.hg	Sat Jan 26 12:46:09 2008
@@ -49,6 +49,8 @@
 protected:
   _WRAP_VFUNC(int get_n_mime_types() const, get_n_mime_types)
   _WRAP_VFUNC(const gchar* get_mime_type(int i) const, get_mime_type)
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_VFUNC(GIOChannel* get_stream(const Glib::ustring& mime_type), get_stream)                                                   
 };
 

Modified: branches/gtkmm-2-12/gtk/src/celllayout.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/celllayout.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/celllayout.hg	Sat Jan 26 12:46:09 2008
@@ -83,7 +83,10 @@
   _WRAP_VFUNC(void pack_start(CellRenderer* cell, bool expand), pack_start)
   _WRAP_VFUNC(void pack_end(CellRenderer* cell, bool expand), pack_end)
   _WRAP_VFUNC(void clear(), clear)
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_VFUNC(void add_attribute(CellRenderer* cell, const Glib::ustring& attribute, int column), add_attribute)
+
 //TODO (added in GTK+ 2.4):  _WRAP_VFUNC(void set_cell_data_func(CellRenderer* cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy), gtk_cell_layout_set_cell_data_func)
   _WRAP_VFUNC(void clear_attributes(CellRenderer* cell), clear_attributes)
   _WRAP_VFUNC(void reorder(CellRenderer* cell, int position), reorder)

Modified: branches/gtkmm-2-12/gtk/src/cellrenderer.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/cellrenderer.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/cellrenderer.hg	Sat Jan 26 12:46:09 2008
@@ -114,6 +114,8 @@
    */
   _WRAP_SIGNAL(void editing_canceled(), editing_canceled)
   
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
+
   //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
   //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
   //TODO: Remove the warning in the documentation when we have fixed the inheritance of CellRendererCombo.

Modified: branches/gtkmm-2-12/gtk/src/cellrendereraccel.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/cellrendereraccel.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/cellrendereraccel.hg	Sat Jan 26 12:46:09 2008
@@ -47,6 +47,8 @@
 
   _CTOR_DEFAULT
 
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
+
   //TODO: Wrap accel_key and accel_mods in an AccelKey?
   _WRAP_SIGNAL(void accel_edited(const Glib::ustring& path_string, guint accel_key, Gdk::ModifierType accel_mods, guint hardware_keycode), "accel_edited")
   _WRAP_SIGNAL(void accel_cleared(const Glib::ustring& path_string), "accel_cleared")

Modified: branches/gtkmm-2-12/gtk/src/cellrenderertext.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/cellrenderertext.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/cellrenderertext.hg	Sat Jan 26 12:46:09 2008
@@ -39,6 +39,7 @@
 
   _WRAP_METHOD(void set_fixed_height_from_font(int number_of_rows), gtk_cell_renderer_text_set_fixed_height_from_font)
 
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void edited(const Glib::ustring& path, const Glib::ustring& new_text), "edited")
 
   _WRAP_PROPERTY("text", Glib::ustring)

Modified: branches/gtkmm-2-12/gtk/src/cellrenderertoggle.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/cellrenderertoggle.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/cellrenderertoggle.hg	Sat Jan 26 12:46:09 2008
@@ -46,6 +46,7 @@
   _WRAP_METHOD(bool get_active() const, gtk_cell_renderer_toggle_get_active)
   _WRAP_METHOD(void set_active(bool setting = true), gtk_cell_renderer_toggle_set_active)
 
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
    //TODO: Maybe the parameter should be a TreePath.
   /** The toggled signal is emitted when the cell is toggled.
    *

Modified: branches/gtkmm-2-12/gtk/src/entry.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/entry.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/entry.hg	Sat Jan 26 12:46:09 2008
@@ -99,6 +99,8 @@
   _MEMBER_GET(text_length, text_length, guint16, guint16)
 
   _WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup")
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void insert_at_cursor(const Glib::ustring& str), "insert_at_cursor")
 
   //Key-binding signals:

Modified: branches/gtkmm-2-12/gtk/src/entrycompletion.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/entrycompletion.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/entrycompletion.hg	Sat Jan 26 12:46:09 2008
@@ -176,6 +176,8 @@
   _POP()
 #m4end
 
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
+
   //We use no_default_handler for these signals, because we can not add a new vfunc without breaking ABI.
   //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
 

Modified: branches/gtkmm-2-12/gtk/src/recentchooser.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/recentchooser.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/recentchooser.hg	Sat Jan 26 12:46:09 2008
@@ -141,10 +141,8 @@
   _WRAP_PROPERTY("filter", RecentFilter*)
 
 protected:
-#m4begin
-  // As in editable.hg
-  _CONVERSION(`Glib::ustring', `gchar*', `g_strdup(($3).c_str())')
-#m4end
+#m4 _CONVERSION(`Glib::ustring', `gchar*', `g_strdup(($3).c_str())')
+
   // TODO: How to wrap those vfuncs?
 
   //_CONVERSION(`ListHandle_RecentInfos', `GList*', `($3).data()')
@@ -152,6 +150,8 @@
 
   //_WRAP_VFUNC(bool set_current_uri(const Glib::ustring& uri), "set_current_uri", errthrow)
   _WRAP_VFUNC(Glib::ustring get_current_uri() const, "get_current_uri")
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   //_WRAP_VFUNC(bool select_uri(const Glib::ustring& uri), "select_uri", errthrow)
   _WRAP_VFUNC(void unselect_uri(const Glib::ustring& uri), "unselect_uri")
   _WRAP_VFUNC(void select_all(), "select_all")

Modified: branches/gtkmm-2-12/gtk/src/statusbar.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/statusbar.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/statusbar.hg	Sat Jan 26 12:46:09 2008
@@ -52,6 +52,7 @@
   _WRAP_METHOD(void set_has_resize_grip(bool setting = true), gtk_statusbar_set_has_resize_grip)
   _WRAP_METHOD(bool get_has_resize_grip() const, gtk_statusbar_get_has_resize_grip)
 
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void text_pushed(guint context_id, const Glib::ustring& text), "text_pushed")
   _WRAP_SIGNAL(void text_popped(guint context_id, const Glib::ustring& text), "text_popped")
 

Modified: branches/gtkmm-2-12/gtk/src/style.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/style.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/style.hg	Sat Jan 26 12:46:09 2008
@@ -390,6 +390,7 @@
                   int                               height) const, gtk_paint_resize_grip)
 
 
+//TODO: This should be const:
   _WRAP_METHOD(Glib::RefPtr<Style> copy(), gtk_style_copy)
 
   _WRAP_METHOD(Glib::RefPtr<Style> attach(const Glib::RefPtr<Gdk::Window>& window), gtk_style_attach)
@@ -427,6 +428,7 @@
 #m4 _CONVERSION(`GdkWindow*',`const Glib::RefPtr<Gdk::Window>&', `Glib::wrap((GdkWindowObject*)($3), true)')
   _WRAP_VFUNC(void set_background(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type), set_background)
 
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_VFUNC(Glib::RefPtr<Gdk::Pixbuf> render_icon(const IconSource& source,
                                  TextDirection direction,
                                  Gtk::StateType state,

Modified: branches/gtkmm-2-12/gtk/src/textview.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/textview.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/textview.hg	Sat Jan 26 12:46:09 2008
@@ -199,6 +199,8 @@
   _WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup")
 
   _WRAP_SIGNAL(void set_anchor(), "set_anchor")
+
+#m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void insert_at_cursor(const Glib::ustring& str), "insert_at_cursor")
   
   //Keybinding signals:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]