gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #03016
[Merge] lp:~jonathan-barnoud/gtg/copy_uri into lp:gtg
Pititjo has proposed merging lp:~jonathan-barnoud/gtg/copy_uri into lp:gtg.
Requested reviews:
Gtg developers (gtg)
Related bugs:
#615955 Task-id is displayed nowhere in the GUI
https://bugs.launchpad.net/bugs/615955
This branch introduce a button in the task menu of the task browser and in the task treeview contextual menu to copy tasks URI in the gtk clipboard so they can be used in other applications.
--
https://code.launchpad.net/~jonathan-barnoud/gtg/copy_uri/+merge/32573
Your team Gtg developers is requested to review the proposed merge of lp:~jonathan-barnoud/gtg/copy_uri into lp:gtg.
=== modified file 'AUTHORS'
--- AUTHORS 2010-08-04 00:30:22 +0000
+++ AUTHORS 2010-08-13 12:07:40 +0000
@@ -69,3 +69,4 @@
* Marko Kevac <marko@xxxxxxxxx>
* Volodymyr Floreskul <exufer@xxxxxxxxx>
* Jeff Oliver <kaiserfro@xxxxxxxxx>
+* Jonathan Barnoud <jonathan@xxxxxxxxxxx>
=== modified file 'CHANGELOG'
--- CHANGELOG 2010-08-04 00:30:22 +0000
+++ CHANGELOG 2010-08-13 12:07:40 +0000
@@ -4,6 +4,7 @@
* Fixed bug with data consistency #579189, by Marko Kevac
* Added samba bugzilla to the bugzilla plugin, by Jelmer Vernoij
* Fixed bug #532392, a start date is later than a due date, by Volodymyr Floreskul
+ * Task URI can be copy in the clipboard, by Jonathan Barnoud
2010-03-01 Getting Things GNOME! 0.2.2
* Autostart on login, by Luca Invernizzi
=== modified file 'GTG/gtk/browser/browser.py'
--- GTG/gtk/browser/browser.py 2010-08-10 17:30:24 +0000
+++ GTG/gtk/browser/browser.py 2010-08-13 12:07:40 +0000
@@ -194,6 +194,7 @@
self.new_subtask_mi = self.builder.get_object("new_subtask_mi")
self.dismissbutton = self.builder.get_object("dismiss_b")
self.dismiss_mi = self.builder.get_object("dismiss_mi")
+ self.copy_uri_mi = self.builder.get_object("copy_uri_mi")
self.about = self.builder.get_object("about_dialog")
self.main_pane = self.builder.get_object("main_pane")
self.menu_view_workview = self.builder.get_object("view_workview")
@@ -243,6 +244,8 @@
self.on_add_task,
"on_edit_active_task":
self.on_edit_active_task,
+ "on_copy_task_uri":
+ self.on_copy_task_uri,
"on_edit_done_task":
self.on_edit_done_task,
"on_delete_task":
@@ -1094,6 +1097,14 @@
if tid:
self.vmanager.open_task(tid)
+ def on_copy_task_uri(self, widget, row=None, col=None):
+ tids = self.get_selected_tasks()
+ if tids :
+ #print "\n".join(("gtg://"+tid for tid in tids))
+ clipboard = gtk.clipboard_get()
+ clipboard.set_text("\n".join(("gtg://"+tid for tid in tids)))
+ clipboard.store()
+
def on_edit_done_task(self, widget, row=None, col=None):
tid = self.get_selected_task(self.ctask_tv)
if tid:
@@ -1338,6 +1349,7 @@
self.donebutton.set_sensitive(enable)
self.dismissbutton.set_sensitive(enable)
self.deletebutton.set_sensitive(enable)
+ self.copy_uri_mi.set_sensitive(enable)
### PUBLIC METHODS #########################################################
def get_selected_task(self, tv=None):
=== modified file 'GTG/gtk/browser/taskbrowser.glade'
--- GTG/gtk/browser/taskbrowser.glade 2010-05-22 22:41:44 +0000
+++ GTG/gtk/browser/taskbrowser.glade 2010-08-13 12:07:40 +0000
@@ -104,6 +104,19 @@
</object>
</child>
<child>
+ <object class="GtkMenuItem" id="copy_uri_mi">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Copy task URI in clipboard</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_copy_task_uri"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem2">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
<object class="GtkImageMenuItem" id="file_quit">
<property name="label">gtk-quit</property>
<property name="visible">True</property>
@@ -253,6 +266,7 @@
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Open GTG documentation in your web browser</property>
+ <property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="accel_group">accelgroup1</property>
<signal name="activate" handler="on_documentation_clicked"/>
@@ -484,9 +498,9 @@
<object class="GtkNotebook" id="sidebar_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="tab_pos">bottom</property>
+ <property name="show_tabs">False</property>
<property name="group_id">1</property>
- <property name="show_tabs">False</property>
- <property name="tab_pos">bottom</property>
<child>
<object class="GtkScrolledWindow" id="sidebar-scroll">
<property name="visible">True</property>
@@ -507,7 +521,6 @@
<packing>
<property name="tab_fill">False</property>
</packing>
-
</child>
</object>
<packing>
@@ -572,9 +585,9 @@
<object class="GtkNotebook" id="main_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="tab_pos">bottom</property>
+ <property name="show_tabs">False</property>
<property name="group_id">2</property>
- <property name="show_tabs">False</property>
- <property name="tab_pos">bottom</property>
<child>
<object class="GtkScrolledWindow" id="main_pane">
<property name="visible">True</property>
@@ -603,11 +616,10 @@
</child>
<child>
<object class="GtkNotebook" id="accessory_notebook">
- <property name="visible">False</property>
<property name="can_focus">True</property>
+ <property name="tab_pos">bottom</property>
+ <property name="show_tabs">False</property>
<property name="group_id">2</property>
- <property name="show_tabs">False</property>
- <property name="tab_pos">bottom</property>
<child>
<placeholder/>
</child>
@@ -794,6 +806,19 @@
<signal name="activate" handler="on_add_new_tag"/>
</object>
</child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem1">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="tcm_copy_uri">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Copy URI in clipboard</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_copy_task_uri"/>
+ </object>
+ </child>
</object>
<object class="GtkMenu" id="schedule_for_context_menu">
<property name="visible">True</property>