示例#1
0
    def __init__(self, app):
        super(SnapperGUI, self).__init__()
        self.builder = Gtk.Builder()
        self.builder.add_from_file(pkg_resources.resource_filename("snappergui",
                                                                   "glade/mainWindow.glade"))
        self.statusbar = self.builder.get_object("statusbar")
        self.snapshotsTreeView = self.builder.get_object("snapstreeview")
        self.configsGroup = self.builder.get_object("configsGroup")
        self.window = self.builder.get_object("applicationwindow1")
        self.stack = self.builder.get_object("stack1")
        self.builder.connect_signals(self)

        self.window.set_application(app)

        self.configView = {}

        for config in snapper.ListConfigs():
            name = str(config[0])
            self.configView[name] = snapshotsView(name)
            self.stack.add_titled(self.configView[name].scrolledwindow, name, name)
            self.configView[name].selection.connect("changed",
                                                    self.on_snapshots_selection_changed)

        self.init_dbus_signal_handlers()
        self.window.show()
示例#2
0
    def __init__(self, app):
        super(SnapperGUI, self).__init__()
        self.builder = Gtk.Builder()
        self.builder.add_from_file(
            pkg_resources.resource_filename("snappergui",
                                            "glade/mainWindow.glade"))
        self.statusbar = self.builder.get_object("statusbar")
        self.snapshotsTreeView = self.builder.get_object("snapstreeview")
        self.configsGroup = self.builder.get_object("configsGroup")
        self.window = self.builder.get_object("applicationwindow1")
        self.stack = self.builder.get_object("stack1")
        self.builder.connect_signals(self)

        self.window.set_application(app)

        self.configView = {}

        for config in snapper.ListConfigs():
            name = str(config[0])
            self.configView[name] = snapshotsView(name)
            self.stack.add_titled(self.configView[name].scrolledwindow, name,
                                  name)
            self.configView[name].selection.connect(
                "changed", self.on_snapshots_selection_changed)

        self.init_dbus_signal_handlers()
        self.window.show()
示例#3
0
    def init_configs_stack(self):
        self._stack = Gtk.Stack(
                transition_type=Gtk.StackTransitionType.CROSSFADE,
                transition_duration=300,
                visible=True)

        self._stack.set_transition_type(Gtk.StackTransitionType.SLIDE_LEFT_RIGHT)

        for config in snapper.ListConfigs():
            name = str(config[0])
            self.configView[name] = snapshotsView(name)
            self._stack.add_titled(self.configView[name].scrolledwindow, name, name)
            self.configView[name].selection.connect("changed", self.on_snapshots_selection_changed)
示例#4
0
    def init_configs_stack(self):
        self._stack = Stack(transition_type=StackTransitionType.CROSSFADE,
                            transition_duration=300,
                            visible=True)

        self._stack.set_transition_type(
            Gtk.StackTransitionType.SLIDE_LEFT_RIGHT)

        for config in snapper.ListConfigs():
            name = str(config[0])
            self.configView[name] = snapshotsView(name)
            self._stack.add_titled(self.configView[name].scrolledwindow, name,
                                   name)
            self.configView[name].selection.connect(
                "changed", self.on_snapshots_selection_changed)
示例#5
0
 def on_dbus_config_created(self, config):
     self.configView[config] = snapshotsView(config)
     self.configView[config].update_view()
     self._stack.add_titled(self.configView[config]._TreeView, config, config)
     self.statusbar.push(5,"Created new configuration %s"% config)
示例#6
0
 def on_dbus_config_created(self, config):
     self.configView[config] = snapshotsView(config)
     self.configView[config].update_view()
     self._stack.add_titled(self.configView[config]._TreeView, config,
                            config)
     self.statusbar.push(5, "Created new configuration %s" % config)