GTG

Merge lp://qastaging/~sara.ribeiro/gtg/userdoc into lp://qastaging/~gtg/gtg/old-trunk

Proposed by Sara Ribeiro
Status: Merged
Merged at revision: 1364
Proposed branch: lp://qastaging/~sara.ribeiro/gtg/userdoc
Merge into: lp://qastaging/~gtg/gtg/old-trunk
Diff against target: 240 lines (+79/-10)
8 files modified
CHANGELOG (+1/-0)
GTG/gtk/backends_dialog.ui (+1/-1)
GTG/gtk/backends_dialog/__init__.py (+8/-4)
GTG/gtk/editor/editor.py (+4/-0)
GTG/gtk/help.py (+53/-0)
GTG/gtk/plugins.py (+5/-1)
GTG/gtk/plugins.ui (+3/-3)
GTG/gtk/preferences.py (+4/-1)
To merge this branch: bzr merge lp://qastaging/~sara.ribeiro/gtg/userdoc
Reviewer Review Type Date Requested Status
Izidor Matušov Needs Fixing
Nimit Shah Needs Fixing
Review via email: mp+210071@code.qastaging.launchpad.net

Description of the change

Fix for bug #1027604: Deeper integeration of userdoc

To post a comment you must log in.
Revision history for this message
Nimit Shah (nimit-svnit) wrote :
Download full text (8.1 KiB)

Hi Sara,
You need to make some small fixes:

=== 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))
> +
>
Remove this extra line

> 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)
>
> + # F...

Read more...

Revision history for this message
Nimit Shah (nimit-svnit) wrote :

Hi Sara,
Please check my mail for the small readability related issues that you need to rectify.

review: Needs Fixing
Revision history for this message
Izidor Matušov (izidor) wrote :

I like the change and have a proposal to make it even better! What about extracting the code you added into a separate module, something like GTG.gtk.help?

Why?

 - less duplicated code
 - add more abstraction: I want the documentation for this dialog be this URI
 - it would be easy to modify way how to open/display help

The use can be as easy as this:

<code>
from GTG.gtk.help import register_help
register_help(self.dialog, 'preferences')
</code>

Implementation will be the code you copy pasted (pseudo code):

<code>
def show_help(help_url, *args):
   openurl(help_url)
   return True

def register_help(widget, help_addr):
   full_help_addr = construct_help_addr(help_addr)

   # Code for adding accel group here
</code>

review: Needs Fixing
1366. By Sara Ribeiro

Removed blank lines

1367. By Sara Ribeiro

Solve merge conflict

1368. By Sara Ribeiro

Created a separate Help module for better abstraction

1369. By Sara Ribeiro

Solve merge conflict

1370. By Sara Ribeiro

Removed blank lines

Revision history for this message
Sara Ribeiro (sara.ribeiro) wrote :

I made the modifications you guys suggested. Can you please review again? Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: