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()
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()
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)
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)
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)
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)