[gtkmm] ComboBox: Add signal_format_entry_text().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] ComboBox: Add signal_format_entry_text().
- Date: Mon, 26 Mar 2012 08:33:49 +0000 (UTC)
commit 4f6fdbe85f08366117c0709e411cd09425cd8c56
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Mar 26 10:33:42 2012 +0200
ComboBox: Add signal_format_entry_text().
* gtk/src/gtk_signals.defs: Correct the costness of the gchar* result.
* gtk/src/combobox.hg: Wrap the new format-entry-text signal,
using no_default_handler to preserve ABI.
ChangeLog | 8 ++++++++
gtk/src/combobox.hg | 8 ++++++++
gtk/src/gtk_signals.defs | 2 +-
3 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 93ac140..8221fee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-03-26 Murray Cumming <murrayc murrayc com>
+ ComboBox: Add signal_format_entry_text().
+
+ * gtk/src/gtk_signals.defs: Correct the costness of the gchar* result.
+ * gtk/src/combobox.hg: Wrap the new format-entry-text signal,
+ using no_default_handler to preserve ABI.
+
+2012-03-26 Murray Cumming <murrayc murrayc com>
+
ColorChooser: Add add_palette.
* gtk/src/colorchooser.[hg|ccg]: Wrap gtk_color_chooser_add_palette().
diff --git a/gtk/src/combobox.hg b/gtk/src/combobox.hg
index 108625d..100148f 100644
--- a/gtk/src/combobox.hg
+++ b/gtk/src/combobox.hg
@@ -226,6 +226,14 @@ public:
_WRAP_SIGNAL(void changed(), "changed")
+//TODO: Remove no_defualt_handler when we can break ABI
+#m4 dnl// The ::format_value signal handler should return a newly allocated string.
+#m4 dnl// (which is obviously not a const gchar*)
+#m4 _CONVERSION(`Glib::ustring',`const gchar*',`(strlen($3.c_str()) ? g_strdup($3.c_str()) : 0)')
+#m4 _CONVERSION(`const gchar*',`const TreeModel::Path&',`TreeModel::Path($3)')
+#m4 _CONVERSION(`const TreeModel::Path&',`const gchar*',`($3).to_string().c_str()')
+ _WRAP_SIGNAL(Glib::ustring format_entry_text(const TreeModel::Path& path), "format-entry-text", no_default_handler)
+
//Key-binding signals:
_IGNORE_SIGNAL("move-active")
_IGNORE_SIGNAL("popup")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 53d8083..f8bc614 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -2881,7 +2881,7 @@
(define-signal format-entry-text
(of-object "GtkComboBox")
- (return-type "const-gchar*")
+ (return-type "gchar*")
(when "last")
(parameters
'("const-gchar*" "p0")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]