[cheese/shareable-media] Pass Cheese.MainWindow XID to nautilus-sendto
- From: Patricia Santana Cruz <patriciasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/shareable-media] Pass Cheese.MainWindow XID to nautilus-sendto
- Date: Thu, 29 Dec 2011 13:10:47 +0000 (UTC)
commit 8a9138276ee8d3833a1de86fefadb47314df45f9
Author: Patricia Santana Cruz <patriciasantanacruz gmail com>
Date: Thu Dec 29 13:06:08 2011 +0000
Pass Cheese.MainWindow XID to nautilus-sendto
Using the --xid argument when calling nautilus-sendto, in order to pass
the Cheese.MainWindow XID and assure that the nautilus-sendto dialog
will always be on the top of the Cheese.MainWindow.
Makefile.am | 3 ++-
src/cheese-shareable-media.vala | 3 +++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6b6db65..3c8ae63 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -65,7 +65,8 @@ VALAFLAGS = \
--pkg libcanberra \
--pkg eogthumbnav \
--pkg cheese-thumbview \
- --pkg cheese-common
+ --pkg cheese-common \
+ --pkg gdk-x11-3.0
lib_LTLIBRARIES = libcheese.la libcheese-gtk.la
diff --git a/src/cheese-shareable-media.vala b/src/cheese-shareable-media.vala
index f7b6594..652d0c3 100644
--- a/src/cheese-shareable-media.vala
+++ b/src/cheese-shareable-media.vala
@@ -3,6 +3,7 @@
*/
namespace ShareableMedia {
private const string SENDTO_EXEC = "nautilus-sendto";
+ private const string XID = "--xid=";
private Cheese.MainWindow window;
private int num_children = 0;
@@ -25,6 +26,8 @@ namespace ShareableMedia {
window = mainWindow;
string[] argv = {};
argv += SENDTO_EXEC;
+ argv += XID + "%lu".printf(Gdk.X11Window.get_xid (window.get_window()));
+
files.foreach ((file) => argv += file.get_path());
try {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]