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
=== modified file 'bin/acire'
--- bin/acire 2010-03-03 00:20:16 +0000
+++ bin/acire 2010-03-10 09:10:29 +0000
@@ -197,6 +197,10 @@
197 cat = self.categories_combo.get_active_text()197 cat = self.categories_combo.get_active_text()
198 self.update_snippets_treeview(cat)198 self.update_snippets_treeview(cat)
199199
200 def snippet_double_clicked(self, widget, path, column):
201 """Run an currently selected snippet when double click it"""
202
203 self.run_snippet(self, widget)
200 204
201 def snippet_selected(self, widget, data=None):205 def snippet_selected(self, widget, data=None):
202 """Snippet is selected from the treeview"""206 """Snippet is selected from the treeview"""
@@ -205,7 +209,10 @@
205 (model, it) = selection.get_selected()209 (model, it) = selection.get_selected()
206210
207 # set the current snippet variables211 # set the current snippet variables
208 self.current_name = self.snippets_model.get_value(it, 1)212 current_name = self.snippets_model.get_value(it, 1)
213 if self.current_name == current_name:
214 return
215 self.current_name = current_name
209 self.current_filename = self.snippets_model.get_value(it, 2)216 self.current_filename = self.snippets_model.get_value(it, 2)
210 self.current_description = self.snippets_model.get_value(it, 3)217 self.current_description = self.snippets_model.get_value(it, 3)
211218
212219
=== modified file 'data/ui/AcireWindow.ui'
--- data/ui/AcireWindow.ui 2010-03-02 22:11:07 +0000
+++ data/ui/AcireWindow.ui 2010-03-10 09:10:29 +0000
@@ -108,6 +108,7 @@
108 <property name="search_column">1</property>108 <property name="search_column">1</property>
109 <property name="tooltip_column">3</property>109 <property name="tooltip_column">3</property>
110 <signal name="cursor_changed" handler="snippet_selected"/>110 <signal name="cursor_changed" handler="snippet_selected"/>
111 <signal name="row-activated" handler="snippet_double_clicked"/>
111 </object>112 </object>
112 </child>113 </child>
113 </object>114 </object>

Subscribers

People subscribed via source and target branches