From 66fb2b97ac0fed163d22b8f36ba5114b627d6ba5976e2936c3f526f085aff315 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 22 Feb 2017 20:37:37 +0000 Subject: [PATCH] Accepting request 459734 from GNOME:Next Scripted push of project GNOME:Next OBS-URL: https://build.opensuse.org/request/show/459734 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/polari?expand=0&rev=54 --- polari-3.22.2.tar.xz | 3 - polari-3.23.90.tar.xz | 3 + polari-allow-run-in-background.patch | 186 - polari-fast-forward-to-9d0fcf3.patch | 4787 ++++++++++++++++++++++++++ polari.changes | 34 + polari.spec | 15 +- 6 files changed, 4831 insertions(+), 197 deletions(-) delete mode 100644 polari-3.22.2.tar.xz create mode 100644 polari-3.23.90.tar.xz delete mode 100644 polari-allow-run-in-background.patch create mode 100644 polari-fast-forward-to-9d0fcf3.patch diff --git a/polari-3.22.2.tar.xz b/polari-3.22.2.tar.xz deleted file mode 100644 index 17a35ac..0000000 --- a/polari-3.22.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c7b4c382a9bae8094a576dbd9d022de0a90e186a36529a2eab914fe9d9b0045f -size 617316 diff --git a/polari-3.23.90.tar.xz b/polari-3.23.90.tar.xz new file mode 100644 index 0000000..ee21a88 --- /dev/null +++ b/polari-3.23.90.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed3c599c8399bc80475b29ac0e7ff530202fe1e9c4a3a0eb87f87adb7989821f +size 701036 diff --git a/polari-allow-run-in-background.patch b/polari-allow-run-in-background.patch deleted file mode 100644 index 330203e..0000000 --- a/polari-allow-run-in-background.patch +++ /dev/null @@ -1,186 +0,0 @@ -a5244483d205d69774c7adbb4f620ae49 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Fri, 24 Jun 2016 13:15:03 +0200 -Subject: app: Add option to run in background - -Like other messaging applications, IRC clients don't require constant -attention from the user, but can sit in the background and notify the -user when an important message was received. We currently don't have -any explicit support for this mode, so users need to ignore the window -the best they can (by moving it to another workspace or keeping it at -the bottom of the window stack). This is obviously not great, but neither -are status icons that have traditionally been used by applications to -offer this mode. - -Instead, implement a pattern for background applications that was agreed -upon with the GNOME design team: - -When set up to run in the background, the application: - - sets itself up to start in the background on login - - keeps running after the last window has been closed - - can be stopped via the 'quit' action in the application menu - -https://bugzilla.gnome.org/show_bug.cgi?id=770750 ---- - data/Makefile.am | 4 +++ - data/org.gnome.Polari.Autostart.desktop | 4 +++ - data/org.gnome.Polari.gschema.xml | 5 ++++ - data/resources/menus.ui | 6 +++++ - src/application.js | 48 +++++++++++++++++++++++++++++++-- - 5 files changed, 65 insertions(+), 2 deletions(-) - create mode 100644 data/org.gnome.Polari.Autostart.desktop - -diff --git a/data/Makefile.am b/data/Makefile.am -index 3f9866c..4756d21 100644 ---- a/data/Makefile.am -+++ b/data/Makefile.am -@@ -4,6 +4,9 @@ desktopdir = $(datadir)/applications - desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) - desktop_in_files = $(APP_ID).desktop.in - -+autostartdir = $(pkgdatadir) -+autostart_DATA = $(APP_ID).Autostart.desktop -+ - %.desktop: %.desktop.in Makefile - $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ - -@@ -25,6 +28,7 @@ clientdir=$(datadir)/telepathy/clients - dist_client_DATA = Polari.client - - EXTRA_DIST = \ -+ $(autostart_DATA) \ - $(desktop_in_files) \ - $(service_in_files) \ - $(APP_ID).data.gresource.xml \ -diff --git a/data/org.gnome.Polari.Autostart.desktop b/data/org.gnome.Polari.Autostart.desktop -new file mode 100644 -index 0000000..d0cc77d ---- /dev/null -+++ b/data/org.gnome.Polari.Autostart.desktop -@@ -0,0 +1,4 @@ -+[Desktop Entry] -+Type=Application -+Exec=gapplication action org.gnome.Polari start-client -+NoDisplay=True -diff --git a/data/org.gnome.Polari.gschema.xml b/data/org.gnome.Polari.gschema.xml -index 839983c..d6a16b9 100644 ---- a/data/org.gnome.Polari.gschema.xml -+++ b/data/org.gnome.Polari.gschema.xml -@@ -6,6 +6,11 @@ - Saved channel list - List of channels to restore on startup - -+ -+ false -+ Run in Background -+ Keep running in background when closed. -+ - - [800,500] - Window size -diff --git a/data/resources/menus.ui b/data/resources/menus.ui -index 22f20e5..eff8d78 100644 ---- a/data/resources/menus.ui -+++ b/data/resources/menus.ui -@@ -2,6 +2,12 @@ - -
- -+ app.run-in-background -+ Run in Background -+ -+
-+
-+ - win.show-help-overlay - Keyboard Shortcuts - -diff --git a/src/application.js b/src/application.js -index 6e2f40d..7818776 100644 ---- a/src/application.js -+++ b/src/application.js -@@ -21,6 +21,9 @@ const MAX_RETRIES = 3; - - const IRC_SCHEMA_REGEX = /^(irc?:\/\/)([\da-z\.-]+):?(\d+)?\/(?:%23)?([\w\.\+-]+)/i; - -+const AUTOSTART_DIR = GLib.get_user_config_dir() + '/autostart'; -+const AUTOSTART_FILE = '/org.gnome.Polari.Autostart.desktop'; -+ - const Application = new Lang.Class({ - Name: 'Application', - Extends: Gtk.Application, -@@ -149,6 +152,14 @@ const Application = new Lang.Class({ - this.add_action(action); - })); - -+ this._settings = new Gio.Settings({ schema_id: 'org.gnome.Polari' }); -+ let action = this._settings.create_action('run-in-background'); -+ this.add_action(action); -+ -+ this._settings.connect('changed::run-in-background', -+ Lang.bind(this, this._onRunInBackgroundChanged)); -+ this._onRunInBackgroundChanged(); -+ - for (let i = 1; i < 10; i++) - this.set_accels_for_action('app.nth-room(%d)'.format(i), ['' + i]); - -@@ -184,8 +195,11 @@ const Application = new Lang.Class({ - - if (!this.active_window) { - let window = new MainWindow.MainWindow({ application: this }); -- window.connect('destroy', -- () => { this.emit('prepare-shutdown'); }); -+ window.connect('destroy', () => { -+ if (this._settings.get_boolean('run-in-background')) -+ return; -+ this.emit('prepare-shutdown'); -+ }); - window.connect('notify::active-room', - () => { this.emit('room-focus-changed'); }); - window.connect('notify::is-active', -@@ -500,6 +514,35 @@ const Application = new Lang.Class({ - dialog.show(); - }, - -+ _createLink: function(file, target) { -+ try { -+ file.get_parent().make_directory_with_parents(null); -+ } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.EXISTS)) { -+ // not an error, carry on -+ } -+ -+ file.make_symbolic_link(target, null); -+ }, -+ -+ _onRunInBackgroundChanged: function() { -+ let file = Gio.File.new_for_path(AUTOSTART_DIR + AUTOSTART_FILE); -+ -+ if (this._settings.get_boolean('run-in-background')) -+ try { -+ this._createLink(file, pkg.pkgdatadir + AUTOSTART_FILE); -+ } catch(e) { -+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.EXISTS)) -+ log('Failed to create autostart link: ' + e.message); -+ } -+ else -+ try { -+ file.delete(null); -+ } catch(e) { -+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) -+ log('Failed to remove autostart link: ' + e.message); -+ } -+ }, -+ - _onStartClient: function() { - if (this._telepathyClient) - return; -@@ -564,5 +607,6 @@ const Application = new Lang.Class({ - - _onQuit: function() { - this.get_windows().reverse().forEach(w => { w.destroy(); }); -+ this.emit('prepare-shutdown'); - } - }); --- -cgit v0.12 - diff --git a/polari-fast-forward-to-9d0fcf3.patch b/polari-fast-forward-to-9d0fcf3.patch new file mode 100644 index 0000000..322db44 --- /dev/null +++ b/polari-fast-forward-to-9d0fcf3.patch @@ -0,0 +1,4787 @@ +diff --git a/data/resources/join-room-dialog.ui b/data/resources/join-room-dialog.ui +index 56791f8..5fd6719 100644 +--- a/data/resources/join-room-dialog.ui ++++ b/data/resources/join-room-dialog.ui +@@ -1,22 +1,5 @@ + + +- +- +- +- +- +- +- +- liststore +- 0 +- True +- +- +- +- 0 +- +- +- +