all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue
@ 2020-01-07  8:00 Reza Alizadeh Majd
  2020-01-07  9:52 ` Danny Milosavljevic
  0 siblings, 1 reply; 6+ messages in thread
From: Reza Alizadeh Majd @ 2020-01-07  8:00 UTC (permalink / raw)
  To: 39004

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

Hello,

following patch fix the open file by double-click issue in pcmanfm-qt 
which is previously reported on:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38926


--
Regards
Reza Alizadeh Majd
PantherX Team

[-- Attachment #2: 0001-gnu-pcmanfm-qt-fix-double-click-issue.patch --]
[-- Type: application/octet-stream, Size: 1892 bytes --]

From e8e2a645d8fd0651f32457542529e4c015ffa54e Mon Sep 17 00:00:00 2001
From: Reza Alizadeh Majd <r.majd@pantherx.org>
Date: Tue, 7 Jan 2020 11:24:05 +0330
Subject: [PATCH] gnu: pcmanfm-qt: fix double-click issue

* gnu/packages/lxqt.scm (pcmanfm-qt): set GIO_LAUNCH_DESKTOP environment
variable to related location in "bin" output of "glib" package.
---
 gnu/packages/lxqt.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index 5a3708e30a..c5935d7f2f 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -984,7 +984,8 @@ components to build desktop file managers which belongs to LXDE.")
         (base32 "0x3c25inlxll965xszx37mnl5gp3smm2h7x04f67z0qlh3vsbrjq"))))
     (build-system cmake-build-system)
     (inputs
-     `(("libfm-qt" ,libfm-qt)
+     `(("glib" ,glib "bin")
+       ("libfm-qt" ,libfm-qt)
        ("qtbase" ,qtbase)
        ("qtx11extras" ,qtx11extras)))
     (native-inputs
@@ -1000,7 +1001,15 @@ components to build desktop file managers which belongs to LXDE.")
              (substitute* '("autostart/CMakeLists.txt")
                (("DESTINATION \"\\$\\{LXQT_ETC_XDG_DIR\\}")
                 "DESTINATION \"etc/xdg"))
-             #t)))))
+             #t))
+         (add-after 'install 'wrap-glib
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let ((out  (assoc-ref outputs "out"))
+                   (glib (assoc-ref inputs "glib")))
+               (wrap-program (string-append out "/bin/pcmanfm-qt")
+                 `("GIO_LAUNCH_DESKTOP" ":" prefix
+                   (,(string-append glib "/bin/gio-launch-desktop"))))
+               #t))))))
     (home-page "https://lxqt.org/")
     (synopsis "File manager and desktop icon manager")
     (description "PCManFM-Qt is the Qt port of PCManFM, the file manager of
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue
  2020-01-07  8:00 [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue Reza Alizadeh Majd
@ 2020-01-07  9:52 ` Danny Milosavljevic
  2020-01-07 10:17   ` Reza Alizadeh Majd
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Milosavljevic @ 2020-01-07  9:52 UTC (permalink / raw)
  To: Reza Alizadeh Majd; +Cc: 39004

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Hi Reza,

thanks for the patch.  I think that it is the right way for now.

But GIO_LAUNCH_DESKTOP is not interpreted as a list by glib.

It would be better to communicate intent by constructing GIO_LAUNCH_DESKTOP as

               (wrap-program (string-append out "/bin/pcmanfm-qt")
                 `("GIO_LAUNCH_DESKTOP" =
                   (,(string-append glib "/bin/gio-launch-desktop"))))

.

Otherwise, with ":" and "prefix" it very much sounded like a list.

Also, could you make it check whether /bin/gio-launch-desktop exists and
error out otherwise?  That is in order for us to notice the workaround
later when we move the gio-launch-desktop executable.

(if (file-exists? ".........../bin/gio-launch-desktop")
    (wrap-program ........)
    (error "Could not find gio-launch-desktop"))

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue
  2020-01-07  9:52 ` Danny Milosavljevic
@ 2020-01-07 10:17   ` Reza Alizadeh Majd
  2020-01-11  7:38     ` Reza Alizadeh Majd
  0 siblings, 1 reply; 6+ messages in thread
From: Reza Alizadeh Majd @ 2020-01-07 10:17 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 39004

[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]

Hi Danny, 

On Tue, Jan 7, 2020, at 1:22 PM, Danny Milosavljevic wrote:
> Hi Reza,
> 
> thanks for the patch.  I think that it is the right way for now.
> 
> But GIO_LAUNCH_DESKTOP is not interpreted as a list by glib.
> 
> It would be better to communicate intent by constructing GIO_LAUNCH_DESKTOP as
> 
>                (wrap-program (string-append out "/bin/pcmanfm-qt")
>                  `("GIO_LAUNCH_DESKTOP" =
>                    (,(string-append glib "/bin/gio-launch-desktop"))))
> 
> .
> 
> Otherwise, with ":" and "prefix" it very much sounded like a list.
> 
> Also, could you make it check whether /bin/gio-launch-desktop exists and
> error out otherwise?  That is in order for us to notice the workaround
> later when we move the gio-launch-desktop executable.
> 
> (if (file-exists? ".........../bin/gio-launch-desktop")
>     (wrap-program ........)
>     (error "Could not find gio-launch-desktop"))
>


Thanks for your guidance, I updated the patch and applied both of 

- GIO_LAUNCH_DESKTOP variable format
- gio-launch-desktop existence check 

to this new patch. 


-- 
Regards
Reza Alizadeh Majd
PantherX Team

[-- Attachment #2: 0001-gnu-pcmanfm-qt-fix-double-click-issue.patch --]
[-- Type: application/octet-stream, Size: 2034 bytes --]

From cb5c9597ac8378981bb70fdc8fa01f64406c5395 Mon Sep 17 00:00:00 2001
From: Reza Alizadeh Majd <r.majd@pantherx.org>
Date: Tue, 7 Jan 2020 11:24:05 +0330
Subject: [PATCH] gnu: pcmanfm-qt: fix double-click issue

* gnu/packages/lxqt.scm (pcmanfm-qt): set GIO_LAUNCH_DESKTOP environment
variable to related location in "bin" output of "glib" package.
---
 gnu/packages/lxqt.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index 5a3708e30a..5c5754dc0c 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -984,7 +984,8 @@ components to build desktop file managers which belongs to LXDE.")
         (base32 "0x3c25inlxll965xszx37mnl5gp3smm2h7x04f67z0qlh3vsbrjq"))))
     (build-system cmake-build-system)
     (inputs
-     `(("libfm-qt" ,libfm-qt)
+     `(("glib" ,glib "bin")
+       ("libfm-qt" ,libfm-qt)
        ("qtbase" ,qtbase)
        ("qtx11extras" ,qtx11extras)))
     (native-inputs
@@ -1000,7 +1001,17 @@ components to build desktop file managers which belongs to LXDE.")
              (substitute* '("autostart/CMakeLists.txt")
                (("DESTINATION \"\\$\\{LXQT_ETC_XDG_DIR\\}")
                 "DESTINATION \"etc/xdg"))
-             #t)))))
+             #t))
+         (add-after 'install 'wrap-glib
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (let* ((out  (assoc-ref outputs "out"))
+                    (glib (assoc-ref inputs "glib"))
+                    (gio-exe-path (string-append glib "/bin/gio-launch-desktop")))
+               (if (file-exists? gio-exe-path)
+                 (wrap-program (string-append out "/bin/pcmanfm-qt")
+                   `("GIO_LAUNCH_DESKTOP" = (,gio-exe-path)))
+                 (error "couldn't fin gio-launch-desktop-path"))
+               #t))))))
     (home-page "https://lxqt.org/")
     (synopsis "File manager and desktop icon manager")
     (description "PCManFM-Qt is the Qt port of PCManFM, the file manager of
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue
  2020-01-07 10:17   ` Reza Alizadeh Majd
@ 2020-01-11  7:38     ` Reza Alizadeh Majd
  2020-01-11 20:28         ` bug#39004: " Marius Bakke
  0 siblings, 1 reply; 6+ messages in thread
From: Reza Alizadeh Majd @ 2020-01-11  7:38 UTC (permalink / raw)
  To: 39004

Hi, 

it could be great to have this patch merged, if there is no other issues 
 existed with this change. 

-- 
Regards
Reza Alizadeh Majd
PantherX Team

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#38926: [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue
  2020-01-11  7:38     ` Reza Alizadeh Majd
@ 2020-01-11 20:28         ` Marius Bakke
  0 siblings, 0 replies; 6+ messages in thread
From: Marius Bakke @ 2020-01-11 20:28 UTC (permalink / raw)
  To: Reza Alizadeh Majd, 39004-done; +Cc: 38926-done

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Hi Reza,

"Reza Alizadeh Majd" <r.majd@pantherx.org> writes:

> it could be great to have this patch merged, if there is no other issues 
>  existed with this change. 

I've applied the patch, with minor cosmetic adjustments (fixing typo,
naming the input "glib:bin" as we usually do), as well as a commit
message following our guidelines.

Thanks for the bug report and fix!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#39004: [PATCH] gnu: pcmanfm-qt: fix open file issue
@ 2020-01-11 20:28         ` Marius Bakke
  0 siblings, 0 replies; 6+ messages in thread
From: Marius Bakke @ 2020-01-11 20:28 UTC (permalink / raw)
  To: Reza Alizadeh Majd, 39004-done; +Cc: 38926-done

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Hi Reza,

"Reza Alizadeh Majd" <r.majd@pantherx.org> writes:

> it could be great to have this patch merged, if there is no other issues 
>  existed with this change. 

I've applied the patch, with minor cosmetic adjustments (fixing typo,
naming the input "glib:bin" as we usually do), as well as a commit
message following our guidelines.

Thanks for the bug report and fix!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-11 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-07  8:00 [bug#39004] [PATCH] gnu: pcmanfm-qt: fix open file issue Reza Alizadeh Majd
2020-01-07  9:52 ` Danny Milosavljevic
2020-01-07 10:17   ` Reza Alizadeh Majd
2020-01-11  7:38     ` Reza Alizadeh Majd
2020-01-11 20:28       ` bug#38926: " Marius Bakke
2020-01-11 20:28         ` bug#39004: " Marius Bakke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.