gtkmm r959 - in trunk: . atk/src gtk/src



Author: murrayc
Date: Sat Jan 26 12:48:47 2008
New Revision: 959
URL: http://svn.gnome.org/viewvc/gtkmm?rev=959&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:
   trunk/ChangeLog
   trunk/atk/src/action.hg
   trunk/atk/src/editabletext.hg
   trunk/atk/src/image.hg
   trunk/atk/src/object.hg
   trunk/atk/src/streamablecontent.hg
   trunk/gtk/src/celllayout.hg
   trunk/gtk/src/cellrenderer.hg
   trunk/gtk/src/cellrendereraccel.hg
   trunk/gtk/src/cellrenderertext.hg
   trunk/gtk/src/cellrenderertoggle.hg
   trunk/gtk/src/entry.hg
   trunk/gtk/src/entrycompletion.hg
   trunk/gtk/src/recentchooser.hg
   trunk/gtk/src/statusbar.hg
   trunk/gtk/src/style.hg
   trunk/gtk/src/textview.hg

Modified: trunk/atk/src/action.hg
==============================================================================
--- trunk/atk/src/action.hg	(original)
+++ trunk/atk/src/action.hg	Sat Jan 26 12:48:47 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: trunk/atk/src/editabletext.hg
==============================================================================
--- trunk/atk/src/editabletext.hg	(original)
+++ trunk/atk/src/editabletext.hg	Sat Jan 26 12:48:47 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: trunk/atk/src/image.hg
==============================================================================
--- trunk/atk/src/image.hg	(original)
+++ trunk/atk/src/image.hg	Sat Jan 26 12:48:47 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: trunk/atk/src/object.hg
==============================================================================
--- trunk/atk/src/object.hg	(original)
+++ trunk/atk/src/object.hg	Sat Jan 26 12:48:47 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: trunk/atk/src/streamablecontent.hg
==============================================================================
--- trunk/atk/src/streamablecontent.hg	(original)
+++ trunk/atk/src/streamablecontent.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/celllayout.hg
==============================================================================
--- trunk/gtk/src/celllayout.hg	(original)
+++ trunk/gtk/src/celllayout.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/cellrenderer.hg
==============================================================================
--- trunk/gtk/src/cellrenderer.hg	(original)
+++ trunk/gtk/src/cellrenderer.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/cellrendereraccel.hg
==============================================================================
--- trunk/gtk/src/cellrendereraccel.hg	(original)
+++ trunk/gtk/src/cellrendereraccel.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/cellrenderertext.hg
==============================================================================
--- trunk/gtk/src/cellrenderertext.hg	(original)
+++ trunk/gtk/src/cellrenderertext.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/cellrenderertoggle.hg
==============================================================================
--- trunk/gtk/src/cellrenderertoggle.hg	(original)
+++ trunk/gtk/src/cellrenderertoggle.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/entry.hg
==============================================================================
--- trunk/gtk/src/entry.hg	(original)
+++ trunk/gtk/src/entry.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/entrycompletion.hg
==============================================================================
--- trunk/gtk/src/entrycompletion.hg	(original)
+++ trunk/gtk/src/entrycompletion.hg	Sat Jan 26 12:48:47 2008
@@ -178,6 +178,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: trunk/gtk/src/recentchooser.hg
==============================================================================
--- trunk/gtk/src/recentchooser.hg	(original)
+++ trunk/gtk/src/recentchooser.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/statusbar.hg
==============================================================================
--- trunk/gtk/src/statusbar.hg	(original)
+++ trunk/gtk/src/statusbar.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/style.hg
==============================================================================
--- trunk/gtk/src/style.hg	(original)
+++ trunk/gtk/src/style.hg	Sat Jan 26 12:48:47 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: trunk/gtk/src/textview.hg
==============================================================================
--- trunk/gtk/src/textview.hg	(original)
+++ trunk/gtk/src/textview.hg	Sat Jan 26 12:48:47 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]