[gtkmm] Button, ComboBox, FileChoooserButton: Hand-code property_focus_on_click()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Button, ComboBox, FileChoooserButton: Hand-code property_focus_on_click()
- Date: Thu, 3 Mar 2016 13:40:53 +0000 (UTC)
commit 5feca670897e5b1cf819d9269a23c8e5eea956cf
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Mar 3 13:30:39 2016 +0100
Button, ComboBox, FileChoooserButton: Hand-code property_focus_on_click()
The focus-on-click property has been removed from GtkButton, GtkComboBox
and GtkFileChooserButton, and replaced by GtkWidget:focus-on-click.
See gtk+ bug #757269.
It would be an ABI-break to remove them in gtkmm. _WRAP_PROPERTY() can't
generate code for them, when they have been removed from gtk_signals.defs.
Hand-code them until the next ABI-break.
gtk/src/button.ccg | 14 ++++++++++++++
gtk/src/button.hg | 23 ++++++++++++++++++++++-
gtk/src/combobox.ccg | 13 +++++++++++++
gtk/src/combobox.hg | 23 ++++++++++++++++++++++-
gtk/src/filechooserbutton.ccg | 13 +++++++++++++
gtk/src/filechooserbutton.hg | 23 ++++++++++++++++++++++-
6 files changed, 106 insertions(+), 3 deletions(-)
---
diff --git a/gtk/src/button.ccg b/gtk/src/button.ccg
index c34fa7d..462da5d 100644
--- a/gtk/src/button.ccg
+++ b/gtk/src/button.ccg
@@ -52,5 +52,19 @@ void Button::set_image_from_icon_name(const Glib::ustring& icon_name, IconSize s
set_image(*image);
}
+// GtkButton:focus-on-click has been removed from gtk+.
+// TODO: At ABI-break, remove it from gtkmm.
+#ifndef GTKMM_DISABLE_DEPRECATED
+Glib::PropertyProxy< bool > Button::property_focus_on_click()
+{
+ return Glib::PropertyProxy< bool >(this, "focus-on-click");
+}
+
+Glib::PropertyProxy_ReadOnly< bool > Button::property_focus_on_click() const
+{
+ return Glib::PropertyProxy_ReadOnly< bool >(this, "focus-on-click");
+}
+#endif // GTKMM_DISABLE_DEPRECATED
+
} // namespace Gtk
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 26def65..7d82e0d 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -162,7 +162,28 @@ public:
_WRAP_PROPERTY("relief", ReliefStyle)
_WRAP_PROPERTY("use-underline", bool)
_WRAP_PROPERTY("use-stock", bool, deprecated "No replacement available.")
- _WRAP_PROPERTY("focus-on-click", bool, deprecated "Use Widget::property_focus_on_click() instead.")
+
+ // GtkButton:focus-on-click has been removed from gtk+.
+ // TODO: At ABI-break, remove it from gtkmm.
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** Whether the button grabs focus when it is clicked with the mouse.
+ * @deprecated Use Widget::property_focus_on_click() instead.
+ *
+ * @return A PropertyProxy that allows you to get or set the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy< bool > property_focus_on_click() ;
+
+ /** Whether the button grabs focus when it is clicked with the mouse.
+ * @deprecated Use Widget::property_focus_on_click() instead.
+ *
+ * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< bool > property_focus_on_click() const;
+#endif // GTKMM_DISABLE_DEPRECATED
+ //_WRAP_PROPERTY("focus-on-click", bool, deprecated "Use Widget::property_focus_on_click() instead.")
+
_WRAP_PROPERTY("xalign", float, deprecated "Access the child widget directly if you need to control its
alignment.")
_WRAP_PROPERTY("yalign", float, deprecated "Access the child widget directly if you need to control its
alignment.")
_WRAP_PROPERTY("image", Gtk::Widget*)
diff --git a/gtk/src/combobox.ccg b/gtk/src/combobox.ccg
index 77011f8..ba1fcaa 100644
--- a/gtk/src/combobox.ccg
+++ b/gtk/src/combobox.ccg
@@ -120,5 +120,18 @@ Glib::ustring ComboBox::get_entry_text() const
return entry->get_text();
}
+// GtkComboBox:focus-on-click has been removed from gtk+.
+// TODO: At ABI-break, remove it from gtkmm.
+#ifndef GTKMM_DISABLE_DEPRECATED
+Glib::PropertyProxy< bool > ComboBox::property_focus_on_click()
+{
+ return Glib::PropertyProxy< bool >(this, "focus-on-click");
+}
+
+Glib::PropertyProxy_ReadOnly< bool > ComboBox::property_focus_on_click() const
+{
+ return Glib::PropertyProxy_ReadOnly< bool >(this, "focus-on-click");
+}
+#endif // GTKMM_DISABLE_DEPRECATED
} // namespace Gtk
diff --git a/gtk/src/combobox.hg b/gtk/src/combobox.hg
index fef28e5..df49de4 100644
--- a/gtk/src/combobox.hg
+++ b/gtk/src/combobox.hg
@@ -221,7 +221,28 @@ public:
_WRAP_PROPERTY("active", int)
_WRAP_PROPERTY("add-tearoffs", bool, deprecated "No replacement available.")
_WRAP_PROPERTY("has-frame", bool)
- _WRAP_PROPERTY("focus-on-click", bool, deprecated "Use Widget::property_focus_on_click() instead.")
+
+ // GtkComboBox:focus-on-click has been removed from gtk+.
+ // TODO: At ABI-break, remove it from gtkmm.
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** Whether the combo box grabs focus when it is clicked with the mouse.
+ * @deprecated Use Widget::property_focus_on_click() instead.
+ *
+ * @return A PropertyProxy that allows you to get or set the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy< bool > property_focus_on_click() ;
+
+ /** Whether the combo box grabs focus when it is clicked with the mouse.
+ * @deprecated Use Widget::property_focus_on_click() instead.
+ *
+ * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< bool > property_focus_on_click() const;
+#endif // GTKMM_DISABLE_DEPRECATED
+ //_WRAP_PROPERTY("focus-on-click", bool, deprecated "Use Widget::property_focus_on_click() instead.")
+
_WRAP_PROPERTY("tearoff-title", Glib::ustring, deprecated "No replacement available.")
_WRAP_PROPERTY("popup-shown", bool)
_WRAP_PROPERTY("button-sensitivity", SensitivityType)
diff --git a/gtk/src/filechooserbutton.ccg b/gtk/src/filechooserbutton.ccg
index 0c132e8..a5ee9e4 100644
--- a/gtk/src/filechooserbutton.ccg
+++ b/gtk/src/filechooserbutton.ccg
@@ -27,6 +27,19 @@ FileChooserButton::FileChooserButton(FileChooserAction action)
{
}
+// GtkFileChooserButton:focus-on-click has been removed from gtk+.
+// TODO: At ABI-break, remove it from gtkmm.
+#ifndef GTKMM_DISABLE_DEPRECATED
+Glib::PropertyProxy< bool > FileChooserButton::property_focus_on_click()
+{
+ return Glib::PropertyProxy< bool >(this, "focus-on-click");
+}
+
+Glib::PropertyProxy_ReadOnly< bool > FileChooserButton::property_focus_on_click() const
+{
+ return Glib::PropertyProxy_ReadOnly< bool >(this, "focus-on-click");
+}
+#endif // GTKMM_DISABLE_DEPRECATED
} // namespace Gtk
diff --git a/gtk/src/filechooserbutton.hg b/gtk/src/filechooserbutton.hg
index b4171c6..fec1039 100644
--- a/gtk/src/filechooserbutton.hg
+++ b/gtk/src/filechooserbutton.hg
@@ -84,7 +84,28 @@ public:
_WRAP_SIGNAL(void file_set(), "file-set")
//_WRAP_PROPERTY("dialog", FileChooserDialog*) //construct-only
- _WRAP_PROPERTY("focus-on-click", bool, deprecated "Use Widget::property_focus_on_click() instead.")
+
+ // GtkFileChooserButton:focus-on-click has been removed from gtk+.
+ // TODO: At ABI-break, remove it from gtkmm.
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** Whether the button grabs focus when it is clicked with the mouse.
+ * @deprecated Use Widget::property_focus_on_click() instead.
+ *
+ * @return A PropertyProxy that allows you to get or set the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy< bool > property_focus_on_click() ;
+
+ /** Whether the button grabs focus when it is clicked with the mouse.
+ * @deprecated Use Widget::property_focus_on_click() instead.
+ *
+ * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< bool > property_focus_on_click() const;
+#endif // GTKMM_DISABLE_DEPRECATED
+ //_WRAP_PROPERTY("focus-on-click", bool, deprecated "Use Widget::property_focus_on_click() instead.")
+
_WRAP_PROPERTY("title", Glib::ustring)
_WRAP_PROPERTY("width-chars", int)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]