[sushi: 2/3] Export a Visible property over D-Bus
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi: 2/3] Export a Visible property over D-Bus
- Date: Thu, 29 Aug 2019 23:20:57 +0000 (UTC)
commit 30ec9b835cadfb6e95cc87fc376e65f5946d3b23
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jul 6 22:57:53 2019 -0700
Export a Visible property over D-Bus
This is needed to help Nautilus update the preview file when we're
open and its selection change.
https://gitlab.gnome.org/GNOME/sushi/issues/5
src/org.gnome.NautilusPreviewer2.xml | 1 +
src/ui/application.js | 5 +++++
2 files changed, 6 insertions(+)
---
diff --git a/src/org.gnome.NautilusPreviewer2.xml b/src/org.gnome.NautilusPreviewer2.xml
index c9f0baa..e22072b 100644
--- a/src/org.gnome.NautilusPreviewer2.xml
+++ b/src/org.gnome.NautilusPreviewer2.xml
@@ -7,6 +7,7 @@
</method>
<method name="Close">
</method>
+ <property name="Visible" type="b" access="read" />
<signal name="SelectionEvent">
<arg type="q" name="direction" />
</signal>
diff --git a/src/ui/application.js b/src/ui/application.js
index ba96031..53fe2b4 100644
--- a/src/ui/application.js
+++ b/src/ui/application.js
@@ -113,8 +113,13 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
return;
this._mainWindow = new MainWindow.MainWindow(this);
+ this._skeleton2.impl.emit_property_changed(
+ 'Visible', new GLib.Variant('b', true));
+
this._mainWindow.connect('destroy', () => {
this._mainWindow = null;
+ this._skeleton2.impl.emit_property_changed(
+ 'Visible', new GLib.Variant('b', false));
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]