Merge lp:~marcosvanetta/stipple/stipple-sensitive into lp:stipple

Proposed by malev
Status: Merged
Approved by: Duane Hinnen
Approved revision: 14
Merged at revision: 14
Proposed branch: lp:~marcosvanetta/stipple/stipple-sensitive
Merge into: lp:stipple
Diff against target: 48 lines (+15/-3)
2 files modified
core/stipple.py (+12/-1)
plugins/sync_packages.py (+3/-2)
To merge this branch: bzr merge lp:~marcosvanetta/stipple/stipple-sensitive
Reviewer Review Type Date Requested Status
Duane Hinnen Approve
Review via email: mp+25355@code.launchpad.net

Description of the change

Now, when you don't have installed a program, for example vim, it does not let you backup the vim's files.

To post a comment you must log in.
Revision history for this message
Duane Hinnen (duanedesign) wrote :

looks great!

review: Approve
Revision history for this message
Duane Hinnen (duanedesign) wrote :

Closes bug LP 576201

Launchpad bug 576201 in stipple "It shows a list of packages to sync
               without checking first if they are installed (affects: 1) (heat: 6)"
               [Undecided,Fix committed] https://launchpad.net/bugs/576201

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'core/stipple.py'
2--- core/stipple.py 2010-05-10 15:01:55 +0000
3+++ core/stipple.py 2010-05-14 19:07:27 +0000
4@@ -16,9 +16,19 @@
5 import shutil
6 from core.db import Database
7
8+cache = apt.Cache()
9+
10 class PluginBase(object):
11 value = False
12
13+ def isInstalled(self):
14+ """ It search on the apt list if the package is installed"""
15+ try:
16+ cache[(self.name).lower()]
17+ return True
18+ except:
19+ return False
20+
21 class Window:
22
23 def callback_o (self, widget, data=None):
24@@ -59,9 +69,10 @@
25 # Loading the buttons
26 for op in options:
27 button = gtk.CheckButton(op.name)
28-# button.available = False
29 button.connect("toggled", self.callback_o, op)
30 vbox.pack_start(button, True, True, 0)
31+ if not op.isInstalled():
32+ button.set_sensitive(False)
33 button.show()
34
35 ##Run Command Button ##
36
37=== modified file 'plugins/sync_packages.py'
38--- plugins/sync_packages.py 2010-05-10 15:01:55 +0000
39+++ plugins/sync_packages.py 2010-05-14 19:07:27 +0000
40@@ -148,6 +148,7 @@
41
42 def search(self):
43 pass
44-
45-
46+
47+ def isInstalled(self):
48+ return True
49

Subscribers

People subscribed via source and target branches

to all changes: