gtkmm r1030 - in trunk: . gtk/src tools/m4



Author: murrayc
Date: Tue Aug 12 12:03:51 2008
New Revision: 1030
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1030&view=rev

Log:
2008-08-12  Murray Cumming  <murrayc murrayc com>

* gtk/src/gtk_methods.defs: Regenerated.
* gtk/src/linkbutton.hg: Added get/set_visited() and the property.
* gtk/src/statusicon.ccg:
* gtk/src/statusicon.hg: Use _WRAP_METHOD() for get_gicon(), 
adapting it to the changed GTK+ API.

Modified:
   trunk/ChangeLog
   trunk/gtk/src/gtk_methods.defs
   trunk/gtk/src/linkbutton.hg
   trunk/gtk/src/statusicon.ccg
   trunk/gtk/src/statusicon.hg
   trunk/gtk/src/widget.hg
   trunk/tools/m4/convert_gtk.m4

Modified: trunk/gtk/src/gtk_methods.defs
==============================================================================
--- trunk/gtk/src/gtk_methods.defs	(original)
+++ trunk/gtk/src/gtk_methods.defs	Tue Aug 12 12:03:51 2008
@@ -14024,6 +14024,21 @@
   )
 )
 
+(define-method get_visited
+  (of-object "GtkLinkButton")
+  (c-name "gtk_link_button_get_visited")
+  (return-type "gboolean")
+)
+
+(define-method set_visited
+  (of-object "GtkLinkButton")
+  (c-name "gtk_link_button_set_visited")
+  (return-type "none")
+  (parameters
+    '("gboolean" "visited")
+  )
+)
+
 
 
 ;; From gtklist.h
@@ -22191,10 +22206,7 @@
 (define-method get_gicon
   (of-object "GtkStatusIcon")
   (c-name "gtk_status_icon_get_gicon")
-  (return-type "none")
-  (parameters
-    '("GIcon**" "icon")
-  )
+  (return-type "GIcon*")
 )
 
 (define-method get_size

Modified: trunk/gtk/src/linkbutton.hg
==============================================================================
--- trunk/gtk/src/linkbutton.hg	(original)
+++ trunk/gtk/src/linkbutton.hg	Tue Aug 12 12:03:51 2008
@@ -55,6 +55,9 @@
   _WRAP_METHOD(Glib::ustring get_uri() const, gtk_link_button_get_uri)
   _WRAP_METHOD(void set_uri(const Glib::ustring& uri), gtk_link_button_set_uri)
 
+  _WRAP_METHOD(bool get_visited() const, gtk_link_button_get_visited)
+  _WRAP_METHOD(void set_visited(bool visited = true), gtk_link_button_set_visited)
+
   /** For instance,
    * void on_linkbutton_uri(Gtk::LinkButton *button, const Glib::ustring& uri);
    *
@@ -78,7 +81,8 @@
   static void unset_uri_hook();
 
 
-  _WRAP_PROPERTY("uri", Glib::ustring)                                           
+  _WRAP_PROPERTY("uri", Glib::ustring)
+  _WRAP_PROPERTY("visited", bool)                                          
 };
 
 

Modified: trunk/gtk/src/statusicon.ccg
==============================================================================
--- trunk/gtk/src/statusicon.ccg	(original)
+++ trunk/gtk/src/statusicon.ccg	Tue Aug 12 12:03:51 2008
@@ -48,24 +48,9 @@
 void StatusIcon::popup_menu_at_position(Menu& menu, guint button, guint32 activate_time)
 {
   gtk_menu_popup(menu.gobj(), NULL, NULL,
-			gtk_status_icon_position_menu, gobj() /* user_data, passed to gtk_status_icon_position_menu()/ */,
-			button, activate_time);
+    gtk_status_icon_position_menu, gobj() /* user_data, passed to gtk_status_icon_position_menu()/ */,
+    button, activate_time);
 }
 
-Glib::RefPtr<Gio::Icon> StatusIcon::get_icon()
-{
-  GIcon* cicon = 0;
-  gtk_status_icon_get_gicon(gobj(), &cicon);
-  return Glib::wrap(cicon, true /* take a reference */);
-}
-
-Glib::RefPtr<const Gio::Icon> StatusIcon::get_icon() const
-{
-  return const_cast<StatusIcon*>(this)->get_icon();
-}
-
-
-
-
 } // namespace Gtk
 

Modified: trunk/gtk/src/statusicon.hg
==============================================================================
--- trunk/gtk/src/statusicon.hg	(original)
+++ trunk/gtk/src/statusicon.hg	Tue Aug 12 12:03:51 2008
@@ -94,11 +94,8 @@
   _WRAP_METHOD(StockID get_stock() const, gtk_status_icon_get_stock)
   _WRAP_METHOD(Glib::ustring get_icon_name() const, gtk_status_icon_get_icon_name)
 
-  //Hand-written because the C function uses an output parameter. 
-  //See http://bugzilla.gnome.org/show_bug.cgi?id=546730
-  Glib::RefPtr<Gio::Icon> get_icon();
-  Glib::RefPtr<const Gio::Icon> get_icon() const;
-  _IGNORE(gtk_status_icon_get_gicon)
+  _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_icon(), gtk_status_icon_get_gicon, refreturn);
+  _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_icon() const, gtk_status_icon_get_gicon, refreturn, constversion);
 
   _WRAP_METHOD(int get_size() const, gtk_status_icon_get_size)
 

Modified: trunk/gtk/src/widget.hg
==============================================================================
--- trunk/gtk/src/widget.hg	(original)
+++ trunk/gtk/src/widget.hg	Tue Aug 12 12:03:51 2008
@@ -226,6 +226,7 @@
   _WRAP_METHOD(void set_child_visible(bool is_visible = true), gtk_widget_set_child_visible)
   _WRAP_METHOD(bool get_child_visible() const, gtk_widget_get_child_visible)
 
+  _CONVERSION(`GtkAllocation',`Allocation',`($2)(Glib::wrap(&($3)))')
   _WRAP_METHOD(Allocation get_allocation() const, gtk_widget_get_allocation)
 
   _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_window(), gtk_widget_get_window, refreturn)

Modified: trunk/tools/m4/convert_gtk.m4
==============================================================================
--- trunk/tools/m4/convert_gtk.m4	(original)
+++ trunk/tools/m4/convert_gtk.m4	Tue Aug 12 12:03:51 2008
@@ -500,7 +500,6 @@
 
 _CONVERSION(`Allocation&',`GtkAllocation*',`($2)($3.gobj())')
 _CONVERSION(`const Allocation&',`GtkAllocation*',`($2)($3.gobj())')
-_CONVERSION(`GtkAllocation',`Allocation',`($2)(Glib::wrap(&$3))')
 _CONVERSION(`GtkAllocation*',`Allocation&',`($2)(Glib::wrap($3))')
 _CONVERSION(`Allocation',`GtkAllocation',`($2)(*($3.gobj()))')
 
@@ -623,6 +622,7 @@
 _CONVERSION(`const Glib::StringArrayHandle&',`const gchar**',`const_cast<const gchar**>(($3).data())')
 
 _CONVERSION(`const Glib::RefPtr<const Gio::Icon>&',`GIcon*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gio::Icon))
+_CONVERSION(`GIcon*',`Glib::RefPtr<Gio::Icon>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<const Gio::File>&',`GFile*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gio::File))
 _CONVERSION(`GFile*',`Glib::RefPtr<Gio::File>',`Glib::wrap($3)')
 _CONVERSION(`GFile*',`Glib::RefPtr<const Gio::File>',`Glib::wrap($3)')



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