Ejemplo n.º 1
0
 def on_remove_app(self, widget, data=None):
     d = ConfirmDialog('Remove', _('Are you sure you want to remove the app?'),
             _('This will permanently remove the app and delete all the data associated with it.'),
             None, self, 'gtk-delete')
     response = d.run()
     if response == Gtk.ResponseType.YES:
         self.emit('fogger-app-remove')
         self.space_label.set_text('')
     d.destroy()
Ejemplo n.º 2
0
 def on_reset_data(self, widget, data=None):
     d = ConfirmDialog('Reset', _('Are you sure you want to reset the app?'),
             _('This will log you out of all websites and delete all local data'),
             None, self, 'gtk-delete')
     response = d.run()
     if response == Gtk.ResponseType.YES:
         self.emit('fogger-app-reset')
         self.space_label.set_text('')
     d.destroy()
Ejemplo n.º 3
0
 def on_remove_app(self, widget, data=None):
     d = ConfirmDialog(
         'Remove', _('Are you sure you want to remove the app?'),
         _('This will permanently remove the app and delete all the data associated with it.'
           ), None, self, 'gtk-delete')
     response = d.run()
     if response == Gtk.ResponseType.YES:
         self.emit('fogger-app-remove')
         self.space_label.set_text('')
     d.destroy()
Ejemplo n.º 4
0
 def on_reset_data(self, widget, data=None):
     d = ConfirmDialog(
         'Reset', _('Are you sure you want to reset the app?'),
         _('This will log you out of all websites and delete all local data'
           ), None, self, 'gtk-delete')
     response = d.run()
     if response == Gtk.ResponseType.YES:
         self.emit('fogger-app-reset')
         self.space_label.set_text('')
     d.destroy()
Ejemplo n.º 5
0
    def on_request_geo_permission(self, view, frame, decision, data=None):
        d = ConfirmDialog(self.app.name, _('Geolocation permission requested'),
            _('%s wants to know your current location. Do you want to share?'\
            % (frame.get_uri() or self.app.name)), None, self,
            _('Share'))
        response = d.run()
        d.destroy()

        if response == Gtk.ResponseType.YES:
            WebKit.geolocation_policy_allow(decision)
        else:
            WebKit.geolocation_policy_deny(decision)
        return True
Ejemplo n.º 6
0
 def on_create(self, widget, data=None):
     name = self.name.get_text()
     manager = FogAppManager()
     existing = manager.get_by_name(name)
     if existing:
         confirm = ConfirmDialog('Fogger', _('There\'s an app for that!'),
                     _('A fog app already exists by that name. '\
                       'Would you like to replace it with a new one?'),
                     existing.icon, self, _('Replace'))
         response = confirm.run()
         confirm.destroy()
         if response != Gtk.ResponseType.YES:
             self.name.grab_focus()
             return
     self.set_loading_url(True)
     self.error_message.hide()
     thread = threading.Thread(target=self.verify_url)
     thread.daemon = True
     thread.start()
Ejemplo n.º 7
0
 def on_create(self, widget, data=None):
     name = self.name.get_text()
     manager = FogAppManager()
     existing = manager.get_by_name(name)
     if existing:
         confirm = ConfirmDialog('Fogger', _('There\'s an app for that!'),
                     _('A fog app already exists by that name. '\
                       'Would you like to replace it with a new one?'),
                     existing.icon, self, _('Replace'))
         response = confirm.run()
         confirm.destroy()
         if response != Gtk.ResponseType.YES:
             self.name.grab_focus()
             return
     self.set_loading_url(True)
     self.error_message.hide()
     thread = threading.Thread(target=self.verify_url)
     thread.daemon = True
     thread.start()