Example #1
0
    def run(cls, file_name=None):
        """Class method.
        Open the named file This is as the open_file() method, except that
        if an existing server could not be contacted then as well as
        creating a server instance rox.mainloop() is called until the
        server exits.

        file_name can be None, in which case the call returns if a server
        exists and installs a new server without opening a window if one
        does not exist.

        True is returned if a server instance was installed and has now
        exited, False if an existing server was used.
        """
        proxy=contact(cls.service_name, cls.interface_name, cls.object_path)
        if proxy is None:
            must_serve=True
            proxy=cls(cls.service_name, cls.interface_name, cls.object_path)

        else:
            must_serve=False

        if file_name is not None:
            proxy.OpenFile(file_name)

        if must_serve:
            rox.mainloop()

        return must_serve
Example #2
0
def setup():
	box = g.MessageDialog(None, g.DIALOG_MODAL,
			g.MESSAGE_QUESTION,
			g.BUTTONS_CANCEL,
			_('Do you want to make ROX a choice '
			'on your login screen (affects all users and '
			'requires the root password), or do you '
			'just want to set the session for your current '
			'user?\n\n'
			'If you know the root password and use '
			'a graphical display manager such as gdm or kdm, '
			'you should probably choose that option.'))
	add_button(box, g.STOCK_HOME, _('Setup for user'), 1)
	add_button(box, g.STOCK_YES, _('Add to login'), 2)

	box.set_default_response(2)

	box.set_position(g.WIN_POS_CENTER)
	resp = box.run()
	box.destroy()
	if resp == 1:
		setup_home()
	elif resp == 2:
		tasks.Task(setup_login())
		rox.toplevel_ref()
		rox.mainloop()
Example #3
0
def main():
    try:
        rox.mainloop()
    finally:
        import dbus_notify
        dbus_notify.close_all()
Example #4
0
def configure():
    """Configure the app"""
    options.edit_options()
    rox.mainloop()
Example #5
0
def configure():
    """Configure the app"""
    options.edit_options()
    rox.mainloop()