Merge lp:~fran-penedo/catfish-search/close-on-open into lp:~catfish-search/catfish-search/trunk

Proposed by Fran Penedo
Status: Needs review
Proposed branch: lp:~fran-penedo/catfish-search/close-on-open
Merge into: lp:~catfish-search/catfish-search/trunk
Diff against target: 24 lines (+4/-1)
2 files modified
catfish/CatfishWindow.py (+2/-0)
catfish_lib/CatfishSettings.py (+2/-1)
To merge this branch: bzr merge lp:~fran-penedo/catfish-search/close-on-open
Reviewer Review Type Date Requested Status
Review via email: mp+283733@code.launchpad.net

Commit message

Added support for closing catfish after opening a file.

Description of the change

Implements an optional feature that allows catfish to close immediately after opening a file, which makes catfish to behave more like a launcher. The feature can be enabled or disabled setting the option 'close-on-open' in the config file.

To post a comment you must log in.
Revision history for this message
Fran Penedo (fran-penedo) wrote :

I wanted to request this feature, but it was easy enough to implement it myself. Feel free to merge it if you think it will be useful for other users.

Unmerged revisions

436. By Fran Penedo

Added support for closing catfish after opening a file.

The option 'close-on-open' has been defined. It defaults
to False to preserve past behavior

435. By Launchpad Translations on behalf of catfish-search

Launchpad automatic translations update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'catfish/CatfishWindow.py'
2--- catfish/CatfishWindow.py 2016-01-23 04:06:52 +0000
3+++ catfish/CatfishWindow.py 2016-01-23 23:30:16 +0000
4@@ -917,6 +917,8 @@
5 command = ['xdg-open', filename]
6 try:
7 subprocess.Popen(command, shell=False)
8+ if self.settings.get_setting('close-on-open'):
9+ self.destroy()
10 return
11 except Exception as msg:
12 logger.debug('Exception encountered while opening %s.' +
13
14=== modified file 'catfish_lib/CatfishSettings.py'
15--- catfish_lib/CatfishSettings.py 2015-09-08 00:42:58 +0000
16+++ catfish_lib/CatfishSettings.py 2016-01-23 23:30:16 +0000
17@@ -23,7 +23,8 @@
18 default_settings = {
19 'use-headerbar': True,
20 'show-hidden-files': False,
21- 'show-sidebar': False
22+ 'show-sidebar': False,
23+ 'close-on-open': False
24 }
25
26

Subscribers

People subscribed via source and target branches