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
=== modified file 'core/stipple.py'
--- core/stipple.py 2010-05-10 15:01:55 +0000
+++ core/stipple.py 2010-05-14 19:07:27 +0000
@@ -16,9 +16,19 @@
16import shutil16import shutil
17from core.db import Database17from core.db import Database
1818
19cache = apt.Cache()
20
19class PluginBase(object): 21class PluginBase(object):
20 value = False22 value = False
21 23
24 def isInstalled(self):
25 """ It search on the apt list if the package is installed"""
26 try:
27 cache[(self.name).lower()]
28 return True
29 except:
30 return False
31
22class Window:32class Window:
2333
24 def callback_o (self, widget, data=None):34 def callback_o (self, widget, data=None):
@@ -59,9 +69,10 @@
59 # Loading the buttons69 # Loading the buttons
60 for op in options:70 for op in options:
61 button = gtk.CheckButton(op.name)71 button = gtk.CheckButton(op.name)
62# button.available = False
63 button.connect("toggled", self.callback_o, op)72 button.connect("toggled", self.callback_o, op)
64 vbox.pack_start(button, True, True, 0)73 vbox.pack_start(button, True, True, 0)
74 if not op.isInstalled():
75 button.set_sensitive(False)
65 button.show()76 button.show()
66 77
67 ##Run Command Button ##78 ##Run Command Button ##
6879
=== modified file 'plugins/sync_packages.py'
--- plugins/sync_packages.py 2010-05-10 15:01:55 +0000
+++ plugins/sync_packages.py 2010-05-14 19:07:27 +0000
@@ -148,6 +148,7 @@
148148
149 def search(self):149 def search(self):
150 pass150 pass
151151
152152 def isInstalled(self):
153 return True
153154

Subscribers

People subscribed via source and target branches

to all changes: