Merge lp:~tualatrix/acire/double-click-to-start into lp:acire

Proposed by Ding Zhou
Status: Needs review
Proposed branch: lp:~tualatrix/acire/double-click-to-start
Merge into: lp:acire
Diff against target: 38 lines (+9/-1)
2 files modified
bin/acire (+8/-1)
data/ui/AcireWindow.ui (+1/-0)
To merge this branch: bzr merge lp:~tualatrix/acire/double-click-to-start
Reviewer Review Type Date Requested Status
Jono Bacon Disapprove
Review via email: mp+21028@code.launchpad.net

Description of the change

Hi, I've made a change to add support for double click on the snippet to execute it.

I hope you like it and merge it into the main branch.

To post a comment you must log in.
Revision history for this message
Jono Bacon (jonobacon) wrote :

Thanks for the merge request! I am actually in the process of hacking Acire to work in a more scalable way internally, so your code would not apply to these changes, but while I am making these changes I will apply a double-click to run feature. Thanks!

review: Disapprove

Unmerged revisions

39. By Ding Zhou

Add support for double click to run the snippets

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/acire'
2--- bin/acire 2010-03-03 00:20:16 +0000
3+++ bin/acire 2010-03-10 09:10:29 +0000
4@@ -197,6 +197,10 @@
5 cat = self.categories_combo.get_active_text()
6 self.update_snippets_treeview(cat)
7
8+ def snippet_double_clicked(self, widget, path, column):
9+ """Run an currently selected snippet when double click it"""
10+
11+ self.run_snippet(self, widget)
12
13 def snippet_selected(self, widget, data=None):
14 """Snippet is selected from the treeview"""
15@@ -205,7 +209,10 @@
16 (model, it) = selection.get_selected()
17
18 # set the current snippet variables
19- self.current_name = self.snippets_model.get_value(it, 1)
20+ current_name = self.snippets_model.get_value(it, 1)
21+ if self.current_name == current_name:
22+ return
23+ self.current_name = current_name
24 self.current_filename = self.snippets_model.get_value(it, 2)
25 self.current_description = self.snippets_model.get_value(it, 3)
26
27
28=== modified file 'data/ui/AcireWindow.ui'
29--- data/ui/AcireWindow.ui 2010-03-02 22:11:07 +0000
30+++ data/ui/AcireWindow.ui 2010-03-10 09:10:29 +0000
31@@ -108,6 +108,7 @@
32 <property name="search_column">1</property>
33 <property name="tooltip_column">3</property>
34 <signal name="cursor_changed" handler="snippet_selected"/>
35+ <signal name="row-activated" handler="snippet_double_clicked"/>
36 </object>
37 </child>
38 </object>

Subscribers

People subscribed via source and target branches