Hello community, here is the log from the commit of package gnome-pomodoro for openSUSE:Factory checked in at 2016-05-19 12:15:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnome-pomodoro (Old) and /work/SRC/openSUSE:Factory/.gnome-pomodoro.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-pomodoro" Changes: -------- --- /work/SRC/openSUSE:Factory/gnome-pomodoro/gnome-pomodoro.changes 2016-04-11 10:28:15.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gnome-pomodoro.new/gnome-pomodoro.changes 2016-05-19 12:15:59.000000000 +0200 @@ -1,0 +2,8 @@ +Wed May 18 09:56:03 UTC 2016 - mvet...@suse.com + +- Update to version 0.11.2: + + Ignore small mouse movements in screen notification. + + Fixed indicator not updating. + + Cleaned up some compilation warnings. + +------------------------------------------------------------------- Old: ---- 0.11.2.tar.gz New: ---- 0.11.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-pomodoro.spec ++++++ --- /var/tmp/diff_new_pack.Ge1Oms/_old 2016-05-19 12:16:00.000000000 +0200 +++ /var/tmp/diff_new_pack.Ge1Oms/_new 2016-05-19 12:16:00.000000000 +0200 @@ -17,7 +17,7 @@ Name: gnome-pomodoro -Version: 0.11.2 +Version: 0.11.3 Release: 0 Summary: A time management utility for GNOME License: GPL-3.0+ ++++++ 0.11.2.tar.gz -> 0.11.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/NEWS new/gnome-pomodoro-0.11.3/NEWS --- old/gnome-pomodoro-0.11.2/NEWS 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/NEWS 2016-05-06 20:20:51.000000000 +0200 @@ -1,3 +1,10 @@ +2016-05-06 Kamil Prusko <kamilpru...@gmail.com> + Release version 0.11.3: + + * Ignore small mouse movements in screen notification + * Fixed indicator not updating + * Cleaned up some compilation warnings (thanks @aerostitch) + 2016-03-24 Kamil Prusko <kamilpru...@gmail.com> Release version 0.11.2: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/configure.ac new/gnome-pomodoro-0.11.3/configure.ac --- old/gnome-pomodoro-0.11.2/configure.ac 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/configure.ac 2016-05-06 20:20:51.000000000 +0200 @@ -1,6 +1,6 @@ AC_PREREQ([2.69]) AC_INIT([gnome-pomodoro], - [0.11.2], + [0.11.3], [https://github.com/codito/gnome-pomodoro/issues], [gnome-pomodoro], [http://gnomepomodoro.org]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/extension/dbus.js new/gnome-pomodoro-0.11.3/extension/dbus.js --- old/gnome-pomodoro-0.11.2/extension/dbus.js 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/extension/dbus.js 2016-05-06 20:20:51.000000000 +0200 @@ -59,9 +59,9 @@ </node>'; -var PomodoroProxy = Gio.DBusProxy.makeProxyWrapper(PomodoroInterface); -function Pomodoro(init_callback, cancellable) { - return new PomodoroProxy(Gio.DBus.session, 'org.gnome.Pomodoro', '/org/gnome/Pomodoro', init_callback, cancellable); +const PomodoroProxy = Gio.DBusProxy.makeProxyWrapper(PomodoroInterface); +function Pomodoro(callback, cancellable) { + return new PomodoroProxy(Gio.DBus.session, 'org.gnome.Pomodoro', '/org/gnome/Pomodoro', callback, cancellable); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/extension/dialogs.js new/gnome-pomodoro-0.11.3/extension/dialogs.js --- old/gnome-pomodoro-0.11.2/extension/dialogs.js 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/extension/dialogs.js 2016-05-06 20:20:51.000000000 +0200 @@ -54,6 +54,7 @@ const IDLE_TIME_TO_PUSH_MODAL = 600; const PUSH_MODAL_TIME_LIMIT = 1000; const PUSH_MODAL_RATE = Clutter.get_default_frame_rate(); +const MOTION_DISTANCE_TO_CLOSE = 20; const IDLE_TIME_TO_OPEN = 60000; const IDLE_TIME_TO_CLOSE = 600; @@ -337,6 +338,7 @@ return this._grabHelper.grab({ actor: this._lightbox.actor, + focus: this._lightbox.actor, onUngrab: Lang.bind(this, this._onUngrab) }); }, @@ -372,7 +374,7 @@ this._lightbox.actor.reactive = true; - this._grabHelper.ignoreRelease(); + // this._grabHelper.ignoreRelease(); /* delay pushModal to ignore current events */ Mainloop.idle_add(Lang.bind(this, @@ -468,9 +470,9 @@ this._openWhenIdleWatchId = 0; this._closeWhenActiveDelaySource = 0; this._closeWhenActiveIdleWatchId = 0; - this._closeWhenActiveWatchId = 0; this._actorMappedId = 0; this._timerUpdateId = 0; + this._eventId = 0; this._timerLabel = new St.Label({ style_class: 'extension-pomodoro-dialog-timer' }); @@ -561,6 +563,49 @@ } }, + _onEvent: function(actor, event) { + let x, y, dx, dy, distance; + + if (!event.get_device ()) { + return Clutter.EVENT_STOP; + } + + switch (event.type()) + { + case Clutter.EventType.ENTER: + case Clutter.EventType.LEAVE: + case Clutter.EventType.STAGE_STATE: + case Clutter.EventType.DESTROY_NOTIFY: + case Clutter.EventType.CLIENT_MESSAGE: + case Clutter.EventType.DELETE: + return Clutter.EVENT_PROPAGATE; + + case Clutter.EventType.MOTION: + [x, y] = event.get_coords(); + dx = this._eventX >= 0 ? x - this._eventX : 0; + dy = this._eventY >= 0 ? y - this._eventY : 0; + distance = dx * dx + dy * dy; + + this._eventX = x; + this._eventY = y; + + if (distance > MOTION_DISTANCE_TO_CLOSE * MOTION_DISTANCE_TO_CLOSE) { + this.close(true); + } + + break; + + case Clutter.EventType.KEY_PRESS: + case Clutter.EventType.BUTTON_PRESS: + case Clutter.EventType.TOUCH_BEGIN: + this.close(true); + + break; + } + + return Clutter.EVENT_STOP; + }, + /** * Open the dialog and setup closing when user becomes active. */ @@ -621,23 +666,31 @@ }, _cancelCloseWhenActive: function() { - if (this._closeWhenActiveWatchId) { - this._idleMonitor.remove_watch(this._closeWhenActiveWatchId); - this._closeWhenActiveWatchId = 0; + if (this._eventId) { + this._lightbox.actor.disconnect(this._eventId); + this._eventId = 0; } }, closeWhenActive: function() { + if (this._closeWhenActiveDelaySource) { + Mainloop.source_remove(this._closeWhenActiveDelaySource); + this._closeWhenActiveDelaySource = 0; + } + + if (this._closeWhenActiveIdleWatchId) { + this._idleMonitor.remove_watch(this._closeWhenActiveIdleWatchId); + this._closeWhenActiveIdleWatchId = 0; + } + if (this.state == State.CLOSED || this.state == State.CLOSING) { return; } - if (this._closeWhenActiveWatchId == 0) { - this._closeWhenActiveWatchId = this._idleMonitor.add_user_active_watch(Lang.bind(this, - function(monitor) { - this.close(true); - } - )); + if (this._eventId == 0) { + this._eventX = -1; + this._eventY = -1; + this._eventId = this._lightbox.actor.connect('event', Lang.bind(this, this._onEvent)); } }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/extension/timer.js new/gnome-pomodoro-0.11.3/extension/timer.js --- old/gnome-pomodoro-0.11.2/extension/timer.js 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/extension/timer.js 2016-05-06 20:20:51.000000000 +0200 @@ -41,8 +41,7 @@ Name: 'PomodoroTimer', _init: function() { - this._proxy = null; - + this._connected = false; this._state = null; this._propertiesChangedId = 0; this._notifyPomodoroStartId = 0; @@ -51,6 +50,14 @@ this._shortBreakDuration = 0; this._longBreakDuration = 0; + this._proxy = DBus.Pomodoro(Lang.bind(this, function(proxy, error) { + if (error) { + log('Pomodoro: ' + error.message); + this._notifyServiceNotInstalled(); + return; + } + })); + this._nameWatcherId = Gio.DBus.session.watch_name( 'org.gnome.Pomodoro', Gio.BusNameWatcherFlags.AUTO_START, @@ -66,25 +73,6 @@ catch (error) { Extension.extension.logError(error); } - - if (this._isRunning()) { - this._ensureProxy(); - } - }, - - _isRunning: function() { - let settings; - let state; - - try { - settings = Settings.getSettings('org.gnome.pomodoro.state'); - state = settings.get_string('state'); - } - catch (error) { - Extension.extension.logError(error); - } - - return state && state != State.NULL; }, _onSettingsChanged: function(settings, key) { @@ -99,64 +87,30 @@ } }, - _ensureProxy: function(callback) { - if (this._proxy) { - if (callback) { - callback.call(this); - } - return; + _onNameAppeared: function() { + if (this._propertiesChangedId != 0) { + this._proxy.disconnect(this._propertiesChangedId); } - this._proxy = DBus.Pomodoro(Lang.bind(this, function(proxy, error) { - if (proxy !== this._proxy) { - return; - } - - if (error) { - Extension.extension.logError(error.message); - this._notifyServiceNotInstalled(); - return; - } - - /* Keep in mind that signals won't be called right after initialization - * when gnome-pomodoro comes back and gets restored - */ - if (this._propertiesChangedId == 0) { - this._propertiesChangedId = this._proxy.connect( - 'g-properties-changed', - Lang.bind(this, this._onPropertiesChanged)); - } - - if (this._notifyPomodoroStartId == 0) { - this._notifyPomodoroStartId = this._proxy.connectSignal( - 'NotifyPomodoroStart', - Lang.bind(this, this._onNotifyPomodoroStart)); - } + this._connected = true; - if (this._notifyPomodoroEndId == 0) { - this._notifyPomodoroEndId = this._proxy.connectSignal( - 'NotifyPomodoroEnd', - Lang.bind(this, this._onNotifyPomodoroEnd)); - } + this._propertiesChangedId = this._proxy.connect( + 'g-properties-changed', + Lang.bind(this, this._onPropertiesChanged)); + this._onPropertiesChanged(this._proxy, null); - if (callback) { - callback.call(this); - } - - this.emit('service-connected'); - this.emit('state-changed'); - this.emit('update'); - - this._onPropertiesChanged(this._proxy, null); - })); - }, - - _onNameAppeared: function() { - this._ensureProxy(); + this.emit('service-connected'); + this.emit('state-changed'); + this.emit('update'); }, _onNameVanished: function() { - this._proxy = null; + if (this._propertiesChangedId != 0) { + this._proxy.disconnect(this._propertiesChangedId); + this._propertiesChangedId = 0; + } + + this._connected = false; this.emit('state-changed'); this.emit('update'); @@ -184,7 +138,7 @@ _onCallback: function(result, error) { if (error) { - Extension.extension.logError(error.message); + log('Pomodoro: ' + error.message); /* timer toggle assumes success right away, so we need to straighten it out */ @@ -197,7 +151,7 @@ }, getState: function() { - if (!this._proxy || this._proxy.State == null) { + if (!this._connected || this._proxy.State == null) { return State.NULL; } @@ -205,12 +159,9 @@ }, setState: function(state, duration) { - this._ensureProxy(Lang.bind(this, - function() { - this._proxy.SetStateRemote(state, - duration || 0, - Lang.bind(this, this._onCallback)); - })); + this._proxy.SetStateRemote(state, + duration || 0, + Lang.bind(this, this._onCallback)); }, getStateDuration: function() { @@ -236,30 +187,21 @@ }, getProgress: function() { - return (this._proxy && this._proxy.StateDuration > 0) + return (this._connected && this._proxy.StateDuration > 0) ? this._proxy.Elapsed / this._proxy.StateDuration : 0.0; }, start: function() { - this._ensureProxy(Lang.bind(this, - function() { - this._proxy.StartRemote(Lang.bind(this, this._onCallback)); - })); + this._proxy.StartRemote(Lang.bind(this, this._onCallback)); }, stop: function() { - this._ensureProxy(Lang.bind(this, - function() { - this._proxy.StopRemote(Lang.bind(this, this._onCallback)); - })); + this._proxy.StopRemote(Lang.bind(this, this._onCallback)); }, reset: function() { - this._ensureProxy(Lang.bind(this, - function() { - this._proxy.ResetRemote(Lang.bind(this, this._onCallback)); - })); + this._proxy.ResetRemote(Lang.bind(this, this._onCallback)); }, toggle: function() { @@ -289,17 +231,11 @@ }, showMainWindow: function(timestamp) { - this._ensureProxy(Lang.bind(this, - function() { - this._proxy.ShowMainWindowRemote(timestamp, Lang.bind(this, this._onCallback)); - })); + this._proxy.ShowMainWindowRemote(timestamp, Lang.bind(this, this._onCallback)); }, showPreferences: function(view, timestamp) { - this._ensureProxy(Lang.bind(this, - function() { - this._proxy.ShowPreferencesRemote(view, timestamp, Lang.bind(this, this._onCallback)); - })); + this._proxy.ShowPreferencesRemote(view, timestamp, Lang.bind(this, this._onCallback)); }, _notifyServiceNotInstalled: function() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/lib/gnome-desktop-module.vala new/gnome-pomodoro-0.11.3/lib/gnome-desktop-module.vala --- old/gnome-pomodoro-0.11.2/lib/gnome-desktop-module.vala 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/lib/gnome-desktop-module.vala 2016-05-06 20:20:51.000000000 +0200 @@ -133,7 +133,7 @@ this.timer = timer; } - public static bool can_enable () { + public new static bool can_enable () { var desktop_session = GLib.Environment.get_variable (DESKTOP_SESSION_ENV_VARIABLE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/lib/presence-module.vala new/gnome-pomodoro-0.11.3/lib/presence-module.vala --- old/gnome-pomodoro-0.11.2/lib/presence-module.vala 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/lib/presence-module.vala 2016-05-06 20:20:51.000000000 +0200 @@ -137,7 +137,7 @@ { var status = presence_plugin.get_default_status (Pomodoro.State.NULL); - presence_plugin.set_status (status); + presence_plugin.set_status.begin (status); } plugin.disable (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/lib/sound-chooser-button.vala new/gnome-pomodoro-0.11.3/lib/sound-chooser-button.vala --- old/gnome-pomodoro-0.11.2/lib/sound-chooser-button.vala 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/lib/sound-chooser-button.vala 2016-05-06 20:20:51.000000000 +0200 @@ -98,17 +98,6 @@ } } - public bool focus_on_click { - get { - return this.combo_box.focus_on_click; - } - set { - if (this.combo_box.focus_on_click != value) { - this.combo_box.focus_on_click = value; - } - } - } - public bool has_volume_button { get; set; default=false; } public Gtk.ComboBox combo_box; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/lib/timer.vala new/gnome-pomodoro-0.11.3/lib/timer.vala --- old/gnome-pomodoro-0.11.2/lib/timer.vala 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/lib/timer.vala 2016-05-06 20:20:51.000000000 +0200 @@ -310,7 +310,6 @@ var state_tmp = this._state; var state_duration_tmp = this.state_duration; var elapsed_tmp = this.elapsed; - var session_tmp = this.session; var changed = this.do_set_state_full (state, duration, timestamp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-pomodoro-0.11.2/tests/tests.vala new/gnome-pomodoro-0.11.3/tests/tests.vala --- old/gnome-pomodoro-0.11.2/tests/tests.vala 2016-03-24 21:00:57.000000000 +0100 +++ new/gnome-pomodoro-0.11.3/tests/tests.vala 2016-05-06 20:20:51.000000000 +0200 @@ -198,8 +198,6 @@ this.setup_settings (); } - private bool is_setup = false; - public virtual void global_teardown () { if (this.tmp_dir != null) {