Advertisement
Guest User

Untitled

a guest
Oct 4th, 2010
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. ishan@ishan:~/new_patches/newsugar/mainline/src/jarabe/model$ git diff
  2. diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py
  3. index 699e339..16d80e0 100644
  4. --- a/src/jarabe/model/bundleregistry.py
  5. +++ b/src/jarabe/model/bundleregistry.py
  6. @@ -373,9 +373,24 @@ class BundleRegistry(gobject.GObject):
  7. return True
  8. return False
  9.  
  10. + def alert_confirmation(self):
  11. + msg = _('Do you want to downgarde?')
  12. + dialog = self.gtk.MessageDialog(parent=self.widgets['window'],
  13. + type=self.gtk.MESSAGE_WARNING,
  14. + buttons=self.gtk.BUTTONS_NONE,
  15. + message_format=msg)
  16. +
  17. + dialog.add_button(self.gtk.STOCK_CANCEL, self.gtk.RESPONSE_CLOSE)
  18. +
  19. + dialog.show_all()
  20. + response = dialog.run()
  21. + dialog.hide()
  22. +
  23. + return response == self.gtk.RESPONSE_YES
  24. +
  25. def install(self, bundle, uid=None):
  26. activities_path = env.get_user_activities_path()
  27. -
  28. + self.alert_confirmation()
  29. for installed_bundle in self._bundles:
  30. if bundle.get_bundle_id() == installed_bundle.get_bundle_id() and \
  31. bundle.get_activity_version() <= \
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement