gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #03972
[Merge] lp:~sara.ribeiro/gtg/userdoc into lp:gtg
Sara Ribeiro has proposed merging lp:~sara.ribeiro/gtg/userdoc into lp:gtg.
Requested reviews:
Gtg developers (gtg)
Related bugs:
Bug #1027604 in Getting Things GNOME!: "Deeper integeration of userdoc"
https://bugs.launchpad.net/gtg/+bug/1027604
For more details, see:
https://code.launchpad.net/~sara.ribeiro/gtg/userdoc/+merge/210071
Fix for bug #1027604: Deeper integeration of userdoc
--
https://code.launchpad.net/~sara.ribeiro/gtg/userdoc/+merge/210071
Your team Gtg developers is requested to review the proposed merge of lp:~sara.ribeiro/gtg/userdoc into lp:gtg.
=== modified file 'CHANGELOG'
--- CHANGELOG 2014-03-05 19:25:18 +0000
+++ CHANGELOG 2014-03-09 03:03:28 +0000
@@ -19,6 +19,7 @@
* Fix for bug #1286493 : GTG cannot connect to RTM, by Pawan Hegde
* Fix for bug #1288011 : More intuitive title label for tasks, by Sara Ribeiro
* Fix for bug #316922 : Have a link to the parent(s) in the task editor, by Parth Panchal
+ * Fix for bug #1027604: Deeper integeration of userdoc, by Sara Ribeiro
2013-11-24 Getting Things GNOME! 0.3.1
* Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin
=== modified file 'GTG/gtk/backends_dialog.ui'
--- GTG/gtk/backends_dialog.ui 2013-09-04 17:48:19 +0000
+++ GTG/gtk/backends_dialog.ui 2014-03-09 03:03:28 +0000
@@ -151,7 +151,7 @@
<property name="can_focus">False</property>
<property name="layout_style">edge</property>
<child>
- <object class="GtkButton" id="button1">
+ <object class="GtkButton" id="sync_help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
=== modified file 'GTG/gtk/backends_dialog/__init__.py'
--- GTG/gtk/backends_dialog/__init__.py 2013-11-25 02:37:46 +0000
+++ GTG/gtk/backends_dialog/__init__.py 2014-03-09 03:03:28 +0000
@@ -72,6 +72,7 @@
self._load_widgets_from_builder(builder)
# Load and setup other widgets
self.dialog.set_title(_("Synchronization Services - %s" % info.NAME))
+
self._create_widgets_for_add_panel()
self._create_widgets_for_conf_panel()
self._setup_signal_connections(builder)
@@ -199,6 +200,13 @@
}
builder.connect_signals(signals)
+ # adding F1 as a shortcut for Help
+ agr = Gtk.AccelGroup()
+ self.dialog.add_accel_group(agr)
+ widget = builder.get_object("sync_help")
+ key, modifier = Gtk.accelerator_parse('F1')
+ widget.add_accelerator("activate", agr, key, modifier, Gtk.AccelFlags.VISIBLE)
+
def _configure_icon_theme(self):
'''
Inform gtk on the location of the backends icons (which is in
=== modified file 'GTG/gtk/editor/editor.py'
--- GTG/gtk/editor/editor.py 2014-03-05 19:25:18 +0000
+++ GTG/gtk/editor/editor.py 2014-03-09 03:03:28 +0000
@@ -24,10 +24,12 @@
The rest is the logic of the widget: date changing widgets, buttons, ...
"""
import time
+from webbrowser import open as openurl
from gi.repository import Gtk, Gdk, Pango
from GTG import _, ngettext
+from GTG import info
from GTG.gtk.editor import GnomeConfig
from GTG.gtk.editor.taskview import TaskView
from GTG.core.plugins.engine import PluginEngine
@@ -201,6 +203,10 @@
key, modifier = Gtk.accelerator_parse('<Control>w')
agr.connect(key, modifier, Gtk.AccelFlags.VISIBLE, self.close)
+ # F1 shows help
+ key, modifier = Gtk.accelerator_parse('F1')
+ agr.connect(key, modifier, Gtk.AccelFlags.VISIBLE, self.show_help)
+
# Ctrl-N creates a new task
key, modifier = Gtk.accelerator_parse('<Control>n')
agr.connect(key, modifier, Gtk.AccelFlags.VISIBLE, self.new_task)
@@ -573,6 +579,12 @@
self.config.set(tid, "position", self.get_position())
self.config.set(tid, "size", self.window.get_size())
+ # We define dummy variable for when show_help is called from a callback
+ def show_help(self, window=None, a=None, b=None, c=None):
+ """ Open help """
+ openurl(info.HELP_URI)
+ return True
+
# We define dummy variable for when close is called from a callback
def close(self, window=None, a=None, b=None, c=None):
=== modified file 'GTG/gtk/plugins.py'
--- GTG/gtk/plugins.py 2013-11-25 02:37:46 +0000
+++ GTG/gtk/plugins.py 2014-03-09 03:03:28 +0000
@@ -19,6 +19,8 @@
""" Dialog for loading plugins """
+from webbrowser import open as openurl
+
from gi.repository import Gtk, Pango
from GTG import _
@@ -172,6 +174,14 @@
self.on_plugin_about_close,
})
+ # adding F1 as a shortcut for Help
+ agr = Gtk.AccelGroup()
+ self.dialog.add_accel_group(agr)
+ widget = builder.get_object("plugins_help")
+ key, mod = Gtk.accelerator_parse("F1")
+ widget.add_accelerator("activate", agr, key, mod,
+ Gtk.AccelFlags.VISIBLE)
+
def _init_plugin_tree(self):
""" Initialize the PluginTree Gtk.TreeView.
@@ -237,7 +247,8 @@
@classmethod
def on_help(cls, widget):
- """ In future, this will open help for plugins """
+ """ Open help for plugins """
+ openurl("help:gtg/gtg-plugins")
return True
def on_plugin_toggle(self, widget, path):
=== modified file 'GTG/gtk/plugins.ui'
--- GTG/gtk/plugins.ui 2013-09-04 17:48:19 +0000
+++ GTG/gtk/plugins.ui 2014-03-09 03:03:28 +0000
@@ -83,16 +83,16 @@
<object class="GtkButtonBox" id="dialog-action_area5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="layout_style">edge</property>
<child>
<object class="GtkButton" id="plugins_help">
<property name="label">gtk-help</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="no_show_all">True</property>
+ <property name="visible">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
- <signal name="released" handler="on_plugins_help" swapped="no"/>
+ <signal name="clicked" handler="on_plugins_help" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
=== modified file 'GTG/gtk/preferences.py'
--- GTG/gtk/preferences.py 2014-01-14 16:36:35 +0000
+++ GTG/gtk/preferences.py 2014-03-09 03:03:28 +0000
@@ -21,6 +21,7 @@
import os
import shutil
+from webbrowser import open as openurl
from gi.repository import Gtk
from xdg.BaseDirectory import xdg_config_home
@@ -100,6 +101,12 @@
editor_font = font.to_string()
self.fontbutton.set_font_name(editor_font)
+ # F1 shows help
+ agr = Gtk.AccelGroup()
+ self.dialog.add_accel_group(agr)
+ key, modifier = Gtk.accelerator_parse('F1')
+ agr.connect(key, modifier, Gtk.AccelFlags.VISIBLE, self.on_help)
+
builder.connect_signals({
'on_pref_autostart_toggled':
self.on_autostart_toggled,
@@ -148,8 +155,10 @@
return True
@classmethod
- def on_help(cls, widget):
- """ In future, this will open help for preferences """
+ # We define dummy variable for when on_help is called from a callback
+ def on_help(self, window=None, a=None, b=None, c=None):
+ """ Open help for preferences """
+ openurl(info.HELP_URI)
return True
@classmethod