[gthumb] added "More" button to open extensions page on wiki
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb] added "More" button to open extensions page on wiki
- Date: Thu, 7 Jan 2010 13:35:37 +0000 (UTC)
commit 69159ba9e059c970ce2ec02aa06c56324c4b68c6
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Thu Jan 7 08:34:41 2010 -0500
added "More" button to open extensions page on wiki
data/ui/extensions.ui | 21 +++++++++++++++++++--
gthumb/dlg-extensions.c | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/extensions.ui b/data/ui/extensions.ui
index fba62e7..d9e2a57 100644
--- a/data/ui/extensions.ui
+++ b/data/ui/extensions.ui
@@ -26,7 +26,7 @@
<object class="GtkLabel" id="extensions_label">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">_Available extensions:</property>
+ <property name="label" translatable="yes">Available _extensions:</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -81,12 +81,28 @@
</packing>
</child>
<child>
+ <object class="GtkButton" id="more_button">
+ <property name="label" translatable="yes">_More</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_markup">Additional user-contributed extensions are available for download.</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="preferences_button">
<property name="label" translatable="yes">gtk-preferences</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_markup">Some extensions are configurable.</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -106,7 +122,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -120,6 +136,7 @@
</child>
<action-widgets>
<action-widget response="0">about_button</action-widget>
+ <action-widget response="0">more_button</action-widget>
<action-widget response="0">preferences_button</action-widget>
<action-widget response="0">close_button</action-widget>
</action-widgets>
diff --git a/gthumb/dlg-extensions.c b/gthumb/dlg-extensions.c
index 7c4a41a..a5aebf4 100644
--- a/gthumb/dlg-extensions.c
+++ b/gthumb/dlg-extensions.c
@@ -353,6 +353,41 @@ about_button_clicked_cb (GtkButton *button,
}
+static void
+more_button_clicked_cb (GtkButton *button,
+ gpointer user_data)
+{
+ DialogData *data = user_data;
+ GError *error = NULL;
+
+ if (! gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (data->dialog)),
+ "http://live.gnome.org/gthumb/extensions";,
+ GDK_CURRENT_TIME,
+ &error)) {
+ GtkWidget *dialog;
+
+ dialog = _gtk_message_dialog_new (GTK_WINDOW (data->dialog),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_DIALOG_ERROR,
+ _("Could not load extensions web page in browser"),
+ error->message,
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ NULL);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+
+ g_signal_connect (G_OBJECT (dialog), "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
+ gtk_widget_show (dialog);
+
+ g_clear_error (&error);
+ }
+}
+
+
void
dlg_extensions (GthBrowser *browser)
{
@@ -426,6 +461,10 @@ dlg_extensions (GthBrowser *browser)
"clicked",
G_CALLBACK (about_button_clicked_cb),
data);
+ g_signal_connect (GET_WIDGET ("more_button"),
+ "clicked",
+ G_CALLBACK (more_button_clicked_cb),
+ data);
g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (data->list_view)),
"changed",
G_CALLBACK (list_view_selection_changed_cb),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]