[gtkmm] AboutDialog, LinkButton: Add activate_link signals.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] AboutDialog, LinkButton: Add activate_link signals.
- Date: Tue, 26 Oct 2010 10:31:29 +0000 (UTC)
commit ba7b108574a9ad88309fa4eef92335f6e527afc6
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Oct 26 11:36:05 2010 +0200
AboutDialog, LinkButton: Add activate_link signals.
* gtk/src/aboutdialog.hg:
* gtk/src/linkbutton.hg: Add the signals and update the class documentation
to mention them.
ChangeLog | 12 +++++-------
gtk/src/aboutdialog.hg | 8 +++++---
gtk/src/linkbutton.hg | 6 +++++-
3 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index aca103c..1b9f770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,10 @@
-2010-10-26 Murray Cumming <murrayc murrayc-desktop>
+2010-10-26 Murray Cumming <murrayc murrayc com>
- reviewed by: <delete if not using a buddy>
+ AboutDialog, LinkButton: Add activate_link signals.
- * configure.ac:
- * gtk/src/application.hg:
- * gtk/src/comboboxtext.ccg:
- * gtk/src/comboboxtext.hg:
- * gtk/src/recentinfo.hg:
+ * gtk/src/aboutdialog.hg:
+ * gtk/src/linkbutton.hg: Add the signals and update the class documentation
+ to mention them.
2010-10-26 Murray Cumming <murrayc murrayc com>>
diff --git a/gtk/src/aboutdialog.hg b/gtk/src/aboutdialog.hg
index 17f655e..054198a 100644
--- a/gtk/src/aboutdialog.hg
+++ b/gtk/src/aboutdialog.hg
@@ -35,9 +35,9 @@ _WRAP_ENUM(License, GtkLicense)
* who have worked on the program. An about dialog is typically opened when the user selects the About option
* from the Help menu. All parts of the dialog are optional.
*
- * About dialogs often contain links and email addresses. Gtk::AboutDialog supports this by offering global
- * hooks, which are called when the user clicks on a link or email address, see set_email_hook() and
- * set_url_hook(). Email addresses in the authors, documenters and artists properties are recognized by looking
+ * About dialogs often contain links and email addresses. Gtk::AboutDialog displays these as clickable links.
+ * By default, it calls gtk_show_uri() when a user clicks one. The behaviour can be overridden with the activate_link signal.
+ * Email addresses in the authors, documenters and artists properties are recognized by looking
* for <user host>, URLs are recognized by looking for http://url, with the URL extending to the next space,
* tab or line break.
*
@@ -115,6 +115,8 @@ public:
_WRAP_PROPERTY("logo", Glib::RefPtr<Gdk::Pixbuf>)
_WRAP_PROPERTY("logo_icon_name", Glib::ustring)
_WRAP_PROPERTY("wrap_license", bool)
+
+ _WRAP_SIGNAL(bool activate_link(const std::string& uri), "activate-link")
};
} // namespace Gtk
diff --git a/gtk/src/linkbutton.hg b/gtk/src/linkbutton.hg
index dd79edd..679f48f 100644
--- a/gtk/src/linkbutton.hg
+++ b/gtk/src/linkbutton.hg
@@ -36,7 +36,9 @@ namespace Gtk
*
* The URI bound to a Gtk::LinkButton can be set specifically using set_uri(),
* and retrieved using get_uri().
- * Gtk::LinkButton offers a global hook, which is called when the used clicks on it: see set_uri_hook().
+ * By default, Gtk::LinkButton calls gtk_show_uri() when the button is clicked.
+ * This behaviour can be overridden by connecting to the activate_link signal and
+ * returning true from the signal handler.
*
* The LinkButton widget looks like this:
* @image html linkbutton1.png
@@ -61,6 +63,8 @@ public:
_WRAP_PROPERTY("uri", Glib::ustring)
_WRAP_PROPERTY("visited", bool)
+
+ _WRAP_SIGNAL(bool activate_link(), "activate-link")
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]