[pitivi] application: Allow more than one Pitivi instance
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] application: Allow more than one Pitivi instance
- Date: Mon, 23 Sep 2019 11:13:09 +0000 (UTC)
commit 423963f2b3347283ba21fc1888a16c01297bd2a4
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Aug 31 00:11:45 2019 +0200
application: Allow more than one Pitivi instance
pitivi/application.py | 6 +++---
pitivi/editorperspective.py | 12 ------------
2 files changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 05ec092c..ce7c7a58 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -71,7 +71,8 @@ class Pitivi(Gtk.Application, Loggable):
def __init__(self):
Gtk.Application.__init__(self,
application_id="org.pitivi.Pitivi",
- flags=Gio.ApplicationFlags.HANDLES_OPEN)
+ flags=Gio.ApplicationFlags.NON_UNIQUE &
+ Gio.ApplicationFlags.HANDLES_OPEN)
Loggable.__init__(self)
self.settings = None
@@ -216,8 +217,7 @@ class Pitivi(Gtk.Application, Loggable):
self.create_main_window()
self.gui.show()
if len(giofiles) > 1:
- self.warning(
- "Can open only one project file at a time. Ignoring the rest!")
+ self.warning("Opening only one project at a time. Ignoring the rest!")
project_file = giofiles[0]
self.project_manager.load_project(quote_uri(project_file.get_uri()))
return True
diff --git a/pitivi/editorperspective.py b/pitivi/editorperspective.py
index da4d3f45..da3386db 100644
--- a/pitivi/editorperspective.py
+++ b/pitivi/editorperspective.py
@@ -272,14 +272,6 @@ class EditorPerspective(Perspective, Loggable):
headerbar = Gtk.HeaderBar()
headerbar.set_show_close_button(True)
- back_button = Gtk.Button.new_from_icon_name(
- "go-previous-symbolic", Gtk.IconSize.SMALL_TOOLBAR)
- back_button.set_always_show_image(True)
- back_button.set_tooltip_text(_("Close project"))
- back_button.connect("clicked", self.__close_project_cb)
- back_button.set_margin_right(4 * PADDING)
- headerbar.pack_start(back_button)
-
undo_button = Gtk.Button.new_from_icon_name(
"edit-undo-symbolic", Gtk.IconSize.SMALL_TOOLBAR)
undo_button.set_always_show_image(True)
@@ -396,10 +388,6 @@ class EditorPerspective(Perspective, Loggable):
# Toolbar/Menu actions callback
- def __close_project_cb(self, unused_button):
- """Closes the current project."""
- self.app.project_manager.closeRunningProject()
-
def __save_project_cb(self, unused_action, unused_param):
self.saveProject()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]