[california] Help button on Quick Add dialog to online documentation: Bug #732303
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california] Help button on Quick Add dialog to online documentation: Bug #732303
- Date: Thu, 31 Jul 2014 21:38:51 +0000 (UTC)
commit f5280d5354ac5e34c5519a35f5de3c5bf089b203
Author: Samer Masterson <samer samertm com>
Date: Thu Jul 31 14:38:09 2014 -0700
Help button on Quick Add dialog to online documentation: Bug #732303
THANKS | 1 +
src/application/california-application.vala | 1 +
src/host/host-quick-create-event.vala | 9 +++++++++
src/rc/quick-create-event.ui | 22 +++++++++++++++++++---
4 files changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/THANKS b/THANKS
index 9f456e8..6c265ed 100644
--- a/THANKS
+++ b/THANKS
@@ -2,4 +2,5 @@ The California team would like to thank the following contributors:
Yosef Or Boczko <yoseforb gmail com>
Pierre-Yves Luyten <py luyten fr>
+Samer Masterson <samer samertm com>
diff --git a/src/application/california-application.vala b/src/application/california-application.vala
index 49dfe8a..321dae2 100644
--- a/src/application/california-application.vala
+++ b/src/application/california-application.vala
@@ -22,6 +22,7 @@ public class Application : Gtk.Application {
public const string WEBSITE_NAME = _("Visit California's home page");
public const string WEBSITE_URL = "https://wiki.gnome.org/Apps/California";
public const string BUGREPORT_URL = "https://bugzilla.gnome.org/enter_bug.cgi?product=california";
+ public const string QUICK_ADD_HELP_URL = "https://wiki.gnome.org/Apps/California/HowToUseQuickAdd";
public const string ID = "org.yorba.california";
public const string ICON_NAME = "x-office-calendar";
diff --git a/src/host/host-quick-create-event.vala b/src/host/host-quick-create-event.vala
index 7fc1dad..d7d6da0 100644
--- a/src/host/host-quick-create-event.vala
+++ b/src/host/host-quick-create-event.vala
@@ -87,6 +87,15 @@ public class QuickCreateEvent : Gtk.Grid, Toolkit.Card {
}
[GtkCallback]
+ private void on_help_button_clicked() {
+ try {
+ Gtk.show_uri(null, Application.QUICK_ADD_HELP_URL, Gtk.get_current_event_time());
+ } catch (Error err) {
+ Application.instance.error_message("Error opening help: %s".printf(err.message));
+ }
+ }
+
+ [GtkCallback]
private void on_cancel_button_clicked() {
notify_user_closed();
}
diff --git a/src/rc/quick-create-event.ui b/src/rc/quick-create-event.ui
index ed0c214..95d61ac 100644
--- a/src/rc/quick-create-event.ui
+++ b/src/rc/quick-create-event.ui
@@ -37,6 +37,22 @@
<property name="homogeneous">True</property>
<property name="layout_style">end</property>
<child>
+ <object class="GtkButton" id="help_button">
+ <property name="label" translatable="yes">_Help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <signal name="clicked" handler="on_help_button_clicked" object="CaliforniaHostQuickCreateEvent"
swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">C_ancel</property>
<property name="visible">True</property>
@@ -48,7 +64,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -63,7 +79,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -83,7 +99,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]