gtkmm r1090 - in trunk: . gtk/src



Author: murrayc
Date: Thu Feb  5 16:54:57 2009
New Revision: 1090
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1090&view=rev

Log:
2009-02-05  Murray Cumming  <murrayc murrayc com>

* gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
* gtk/src/action.ccg:
* gtk/src/action.hg: Reimplemented set_tooltip() with the new C 
gtk_action_set_tooltip() function. Added get/set_label(), 
get/set_short_label(), get_tooltip(), get/set_stock_id(), 
get/set_gicon(), get/set_icon_name(), get/set_visible_horizontal(), 
get/set_visible_vertical(), get/set_is_important(), which are new 
accessors for the properties. Added the gicon property.
* gtk/src/imagemenuitem.hg: Added get/set_always_show_image() and 
property.
* gtk/src/scale.hg: Added add_mark() and clear_marks().

Modified:
   trunk/ChangeLog
   trunk/gtk/src/action.ccg
   trunk/gtk/src/action.hg
   trunk/gtk/src/gtk_methods.defs
   trunk/gtk/src/imagemenuitem.hg
   trunk/gtk/src/scale.hg
   trunk/gtk/src/treeselection.hg

Modified: trunk/gtk/src/action.ccg
==============================================================================
--- trunk/gtk/src/action.ccg	(original)
+++ trunk/gtk/src/action.ccg	Thu Feb  5 16:54:57 2009
@@ -56,16 +56,5 @@
   return Glib::RefPtr<Action>( new Action(name, icon_name, label, tooltip) );
 }
 
-
-void Action::set_tooltip(const Glib::ustring& tooltip)
-{
-#ifdef GLIBMM_PROPERTIES_ENABLED
-  property_tooltip() = tooltip;
-#else
-  set_property("tooltip", tooltip);
-#endif
-}
-
-
 } // namespace Gtk
 

Modified: trunk/gtk/src/action.hg
==============================================================================
--- trunk/gtk/src/action.hg	(original)
+++ trunk/gtk/src/action.hg	Thu Feb  5 16:54:57 2009
@@ -20,6 +20,7 @@
 #include <gtkmm/widget.h>
 #include <gtkmm/accelgroup.h>
 #include <gtkmm/stockid.h>
+#include <giomm/icon.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/object_p.h)
@@ -144,8 +145,6 @@
   _WRAP_METHOD(bool is_sensitive() const, gtk_action_is_sensitive)
   _WRAP_METHOD(bool get_sensitive() const, gtk_action_get_sensitive)
 
-   void set_tooltip(const Glib::ustring& tooltip);
-
   _WRAP_METHOD(void set_sensitive(bool sensitive = true), gtk_action_set_sensitive)
 
   _WRAP_METHOD(bool is_visible() const, gtk_action_is_visible)
@@ -183,6 +182,25 @@
   _WRAP_METHOD(void set_accel_path(const Glib::ustring& accel_path), gtk_action_set_accel_path)
   _WRAP_METHOD(void set_accel_group(const Glib::RefPtr<AccelGroup>& accel_group), gtk_action_set_accel_group)
 
+  _WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_action_set_label)
+  _WRAP_METHOD(Glib::ustring get_label() const, gtk_action_get_label)
+  _WRAP_METHOD(void set_short_label(const Glib::ustring& short_label), gtk_action_set_short_label)
+  _WRAP_METHOD(Glib::ustring get_short_label() const, gtk_action_get_short_label)
+  _WRAP_METHOD(void set_tooltip(const Glib::ustring& tooltip), gtk_action_set_tooltip)
+  _WRAP_METHOD(Glib::ustring get_tooltip() const, gtk_action_get_tooltip)
+  _WRAP_METHOD(void set_stock_id(const StockID& stock_id), gtk_action_set_stock_id)
+  _WRAP_METHOD(StockID get_stock_id() const, gtk_action_get_stock_id)
+  _WRAP_METHOD(void set_gicon(const Glib::RefPtr<Gio::Icon>& icon), gtk_action_set_gicon)
+  _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_gicon(), gtk_action_get_gicon, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_gicon() const, gtk_action_get_gicon, refreturn, constversion)
+  _WRAP_METHOD(void set_icon_name(const Glib::ustring& icon_name), gtk_action_set_icon_name)
+  _WRAP_METHOD(Glib::ustring get_icon_name() const, gtk_action_get_icon_name)
+  _WRAP_METHOD(void set_visible_horizontal(bool visible_horizontal = true), gtk_action_set_visible_horizontal)
+  _WRAP_METHOD(bool get_visible_horizontal() const, gtk_action_get_visible_horizontal)
+  _WRAP_METHOD(void set_visible_vertical(bool visible_vertical = true), gtk_action_set_visible_vertical)
+  _WRAP_METHOD(bool get_visible_vertical() const, gtk_action_get_visible_vertical)
+  _WRAP_METHOD(void set_is_important(bool is_important = true), gtk_action_set_is_important)
+  _WRAP_METHOD(bool get_is_important() const, gtk_action_get_is_important)
 
   //gtk_action_get_accel_closure() is too C-specific:
   _IGNORE(gtk_action_get_accel_closure)
@@ -192,6 +210,7 @@
   _WRAP_PROPERTY("short_label", Glib::ustring)
   _WRAP_PROPERTY("tooltip", Glib::ustring)
   _WRAP_PROPERTY("stock_id", StockID)
+  _WRAP_PROPERTY("gicon", Glib::RefPtr<Gio::Icon>)
   _WRAP_PROPERTY("icon_name", Glib::ustring)
   _WRAP_PROPERTY("visible_horizontal", bool)
   _WRAP_PROPERTY("visible_vertical", bool)

Modified: trunk/gtk/src/gtk_methods.defs
==============================================================================
--- trunk/gtk/src/gtk_methods.defs	(original)
+++ trunk/gtk/src/gtk_methods.defs	Thu Feb  5 16:54:57 2009
@@ -28,6 +28,12 @@
   (gtype-id "GTK_TYPE_ACTION_GROUP")
 )
 
+(define-object Activatable
+  (in-module "Gtk")
+  (c-name "GtkActivatable")
+  (gtype-id "GTK_TYPE_ACTIVATABLE")
+)
+
 (define-object Buildable
   (in-module "Gtk")
   (c-name "GtkBuildable")
@@ -2325,6 +2331,7 @@
     '("nonexistent" "GTK_FILE_CHOOSER_ERROR_NONEXISTENT")
     '("bad-filename" "GTK_FILE_CHOOSER_ERROR_BAD_FILENAME")
     '("already-exists" "GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS")
+    '("incomplete-hostname" "GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME")
   )
 )
 
@@ -4020,36 +4027,12 @@
   (return-type "GtkWidget*")
 )
 
-(define-method connect_proxy
-  (of-object "GtkAction")
-  (c-name "gtk_action_connect_proxy")
-  (return-type "none")
-  (parameters
-    '("GtkWidget*" "proxy")
-  )
-)
-
-(define-method disconnect_proxy
-  (of-object "GtkAction")
-  (c-name "gtk_action_disconnect_proxy")
-  (return-type "none")
-  (parameters
-    '("GtkWidget*" "proxy")
-  )
-)
-
 (define-method get_proxies
   (of-object "GtkAction")
   (c-name "gtk_action_get_proxies")
   (return-type "GSList*")
 )
 
-(define-method get_action
-  (of-object "GtkWidget")
-  (c-name "gtk_widget_get_action")
-  (return-type "GtkAction*")
-)
-
 (define-method connect_accelerator
   (of-object "GtkAction")
   (c-name "gtk_action_connect_accelerator")
@@ -4074,6 +4057,30 @@
   (return-type "GClosure*")
 )
 
+(define-method get_action
+  (of-object "GtkWidget")
+  (c-name "gtk_widget_get_action")
+  (return-type "GtkAction*")
+)
+
+(define-method connect_proxy
+  (of-object "GtkAction")
+  (c-name "gtk_action_connect_proxy")
+  (return-type "none")
+  (parameters
+    '("GtkWidget*" "proxy")
+  )
+)
+
+(define-method disconnect_proxy
+  (of-object "GtkAction")
+  (c-name "gtk_action_disconnect_proxy")
+  (return-type "none")
+  (parameters
+    '("GtkWidget*" "proxy")
+  )
+)
+
 (define-method block_activate_from
   (of-object "GtkAction")
   (c-name "gtk_action_block_activate_from")
@@ -4092,6 +4099,18 @@
   )
 )
 
+(define-method block_activate
+  (of-object "GtkAction")
+  (c-name "gtk_action_block_activate")
+  (return-type "none")
+)
+
+(define-method unblock_activate
+  (of-object "GtkAction")
+  (c-name "gtk_action_unblock_activate")
+  (return-type "none")
+)
+
 (define-method set_accel_path
   (of-object "GtkAction")
   (c-name "gtk_action_set_accel_path")
@@ -4110,6 +4129,198 @@
   )
 )
 
+(define-method set_label
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_label")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "label")
+  )
+)
+
+(define-method get_label
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_label")
+  (return-type "const-gchar*")
+)
+
+(define-method set_short_label
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_short_label")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "short_label")
+  )
+)
+
+(define-method get_short_label
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_short_label")
+  (return-type "const-gchar*")
+)
+
+(define-method set_tooltip
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_tooltip")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "tooltip")
+  )
+)
+
+(define-method get_tooltip
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_tooltip")
+  (return-type "const-gchar*")
+)
+
+(define-method set_stock_id
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_stock_id")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "stock_id")
+  )
+)
+
+(define-method get_stock_id
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_stock_id")
+  (return-type "const-gchar*")
+)
+
+(define-method set_gicon
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_gicon")
+  (return-type "none")
+  (parameters
+    '("GIcon*" "icon")
+  )
+)
+
+(define-method get_gicon
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_gicon")
+  (return-type "GIcon*")
+)
+
+(define-method set_icon_name
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_icon_name")
+  (return-type "none")
+  (parameters
+    '("const-gchar*" "icon_name")
+  )
+)
+
+(define-method get_icon_name
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_icon_name")
+  (return-type "const-gchar*")
+)
+
+(define-method set_visible_horizontal
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_visible_horizontal")
+  (return-type "none")
+  (parameters
+    '("gboolean" "visible_horizontal")
+  )
+)
+
+(define-method get_visible_horizontal
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_visible_horizontal")
+  (return-type "gboolean")
+)
+
+(define-method set_visible_vertical
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_visible_vertical")
+  (return-type "none")
+  (parameters
+    '("gboolean" "visible_vertical")
+  )
+)
+
+(define-method get_visible_vertical
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_visible_vertical")
+  (return-type "gboolean")
+)
+
+(define-method set_is_important
+  (of-object "GtkAction")
+  (c-name "gtk_action_set_is_important")
+  (return-type "none")
+  (parameters
+    '("gboolean" "is_important")
+  )
+)
+
+(define-method get_is_important
+  (of-object "GtkAction")
+  (c-name "gtk_action_get_is_important")
+  (return-type "gboolean")
+)
+
+
+
+;; From gtkactivatable.h
+
+(define-function gtk_activatable_get_type
+  (c-name "gtk_activatable_get_type")
+  (return-type "GType")
+)
+
+(define-method reset
+  (of-object "GtkActivatable")
+  (c-name "gtk_activatable_reset")
+  (return-type "none")
+  (parameters
+    '("GtkAction*" "action")
+  )
+)
+
+(define-method set_related_action
+  (of-object "GtkActivatable")
+  (c-name "gtk_activatable_set_related_action")
+  (return-type "none")
+  (parameters
+    '("GtkAction*" "action")
+  )
+)
+
+(define-method get_related_action
+  (of-object "GtkActivatable")
+  (c-name "gtk_activatable_get_related_action")
+  (return-type "GtkAction*")
+)
+
+(define-method set_use_action_appearance
+  (of-object "GtkActivatable")
+  (c-name "gtk_activatable_set_use_action_appearance")
+  (return-type "none")
+  (parameters
+    '("gboolean" "use_appearance")
+  )
+)
+
+(define-method get_use_action_appearance
+  (of-object "GtkActivatable")
+  (c-name "gtk_activatable_get_use_action_appearance")
+  (return-type "gboolean")
+)
+
+(define-method do_set_related_action
+  (of-object "GtkActivatable")
+  (c-name "gtk_activatable_do_set_related_action")
+  (return-type "none")
+  (parameters
+    '("GtkAction*" "action")
+  )
+)
+
 
 
 ;; From gtkadjustment.h
@@ -13332,6 +13543,21 @@
   )
 )
 
+(define-method set_always_show_image
+  (of-object "GtkImageMenuItem")
+  (c-name "gtk_image_menu_item_set_always_show_image")
+  (return-type "none")
+  (parameters
+    '("gboolean" "always_show")
+  )
+)
+
+(define-method get_always_show_image
+  (of-object "GtkImageMenuItem")
+  (c-name "gtk_image_menu_item_get_always_show_image")
+  (return-type "gboolean")
+)
+
 (define-method set_image
   (of-object "GtkImageMenuItem")
   (c-name "gtk_image_menu_item_set_image")
@@ -21272,6 +21498,23 @@
   )
 )
 
+(define-method add_mark
+  (of-object "GtkScale")
+  (c-name "gtk_scale_add_mark")
+  (return-type "none")
+  (parameters
+    '("gdouble" "value")
+    '("GtkPositionType" "position")
+    '("const-gchar*" "markup")
+  )
+)
+
+(define-method clear_marks
+  (of-object "GtkScale")
+  (c-name "gtk_scale_clear_marks")
+  (return-type "none")
+)
+
 
 
 ;; From gtkscrollbar.h

Modified: trunk/gtk/src/imagemenuitem.hg
==============================================================================
--- trunk/gtk/src/imagemenuitem.hg	(original)
+++ trunk/gtk/src/imagemenuitem.hg	Thu Feb  5 16:54:57 2009
@@ -48,6 +48,9 @@
   explicit ImageMenuItem(const Glib::ustring& label, bool mnemonic = false);
   explicit ImageMenuItem(const StockID& id);  
   
+  _WRAP_METHOD(void set_always_show_image(bool always_show = true), gtk_image_menu_item_set_always_show_image)
+  _WRAP_METHOD(bool get_always_show_image() const, gtk_image_menu_item_get_always_show_image)
+
   _WRAP_METHOD(void set_image(Widget& image), gtk_image_menu_item_set_image)
   _WRAP_METHOD(Widget* get_image(), gtk_image_menu_item_get_image)
   _WRAP_METHOD(const Widget* get_image() const, gtk_image_menu_item_get_image, constversion)
@@ -59,6 +62,7 @@
   _WRAP_PROPERTY("image", Widget*)
   _WRAP_PROPERTY("use-stock", bool)
   _WRAP_PROPERTY("accel-group", Glib::RefPtr<AccelGroup>)
+  _WRAP_PROPERTY("always-show-image", bool)
 
 };
 

Modified: trunk/gtk/src/scale.hg
==============================================================================
--- trunk/gtk/src/scale.hg	(original)
+++ trunk/gtk/src/scale.hg	Thu Feb  5 16:54:57 2009
@@ -82,6 +82,9 @@
   _WRAP_METHOD(Glib::RefPtr<Pango::Layout> get_layout(), gtk_scale_get_layout, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Pango::Layout> get_layout() const, gtk_scale_get_layout, refreturn, constversion)
   _WRAP_METHOD(void get_layout_offsets(int& x, int& y) const, gtk_scale_get_layout_offsets)
+
+  _WRAP_METHOD(void add_mark(double value, PositionType position, const Glib::ustring& markup), gtk_scale_add_mark)
+  _WRAP_METHOD(void clear_marks(), gtk_scale_clear_marks)
   
 #m4 dnl// The ::format_value signal handler should return a newly allocated string.
 #m4 dnl// (which is obviously not a const gchar*)

Modified: trunk/gtk/src/treeselection.hg
==============================================================================
--- trunk/gtk/src/treeselection.hg	(original)
+++ trunk/gtk/src/treeselection.hg	Thu Feb  5 16:54:57 2009
@@ -60,7 +60,7 @@
 class TreeSelection : public Glib::Object
 {
    _CLASS_GOBJECT(TreeSelection, GtkTreeSelection, GTK_TREE_SELECTION, Glib::Object, GObject)
-   _IGNORE(gtk_tree_selection_get_selected, gtk_tree_selection_set_select_function, 
+   _IGNORE(gtk_tree_selection_get_selected, 
            gtk_tree_selection_get_selected_rows, gtk_tree_selection_count_selected_rows)
 protected:
   
@@ -84,6 +84,7 @@
    * @param slot The selection function.
    */
   void set_select_function(const SlotSelect& slot);
+  _IGNORE(gtk_tree_selection_set_select_function, gtk_tree_selection_get_select_function)
 
   _IGNORE(gtk_tree_selection_get_user_data) // This would be our SignalProxy_Select* data.
 



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