Esempio n. 1
0
 def colleague_changed(self, widget):
     enabled = self.recently_used.get_active()
     file = os.path.expanduser("~/.recently-used.xbel")
     if enabled:
         os.system('rm -r %s' % file)
         os.system('touch %s' % file)
     else:
         dialog = WarningDialog(title=_("Warning"),
                                message=_('Disabling "Recent Documents" may break other software, for example the history feature in VMware Player.'))
         if dialog.run() == Gtk.ResponseType.YES:
             os.system('rm -r %s' % file)
             os.system('mkdir %s' % file)
         else:
             widget.set_active(True)
         dialog.destroy()
Esempio n. 2
0
    def show_warning(self):
        if not CONFIG.get_value():
            dialog = WarningDialog(
                title=_('Warning'),
                message=_('It is a possible security risk to '
                          'use packages from Third-Party Sources.\n'
                          'Please be careful and use only sources you trust.'),
                buttons=Gtk.ButtonsType.OK)
            checkbutton = CheckButton(_('Never show this dialog'),
                                      key=WARNING_KEY,
                                      backend='gsettings')
            dialog.add_option_button(checkbutton)

            dialog.run()
            dialog.destroy()
Esempio n. 3
0
    def show_warning(self):
        if not CONFIG.get_value():
            dialog = WarningDialog(title=_('Warning'),
                                   message=_('It is a possible security risk to '
                'use packages from Third-Party Sources.\n'
                'Please be careful and use only sources you trust.'),
                                   buttons=Gtk.ButtonsType.OK)
            checkbutton = CheckButton(_('Never show this dialog'),
                                      key=WARNING_KEY,
                                      backend='gsettings')
            dialog.add_option_button(checkbutton)

            dialog.run()
            dialog.destroy()
    def on_polkit_action(self, widget):
        self.sync_button.set_sensitive(True)

        if proxy.get_object():
            self.sourceview.set_sensitive(True)
            self.expander.set_sensitive(True)

            if not CONFIG.get_value():
                dialog = WarningDialog(title=_('Warning'),
                                       message=_('It is a possible security risk to '
                    'use packages from Third-Party Sources.\n'
                    'Please be careful and use only sources you trust.'),
                                       buttons=Gtk.ButtonsType.OK)
                checkbutton = CheckButton(_('Never show this dialog'),
                                          key=WARNING_KEY,
                                          backend='gsettings')
                dialog.add_option_button(checkbutton)

                dialog.run()
                dialog.destroy()
        else:
            ServerErrorDialog().launch()