! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Xfce4-clipman-plugin] QR code support
Status:
RESOLVED: FIXED
Product:
Xfce4-clipman-plugin
Component:
General

Comments

Description Christian Hesse 2012-11-21 22:38:17 CET
Created attachment 4746 
add QR code support to clipman

This links xfce4-clipman-plugin against libqrencode and add QR Code support. This way you can easily past text oder URLs to your smartphone, ... Just mark the text and open clipman's menu. Any comments?
Comment 1 Christian Hesse 2012-11-21 23:21:10 CET
Created attachment 4747 
add QR code support to clipman

Damn, missed a diff... This one should be ok.
Comment 2 Christian Hesse 2012-11-21 23:26:04 CET
Created attachment 4748 
screenshot

If everything works as expected it looks like this.
Comment 3 Christian Hesse 2012-11-23 13:33:04 CET
Created attachment 4749 
add QR code support to clipman

Oh, of course we should use content, not just preview. ;)
Comment 4 Christian Hesse 2013-01-08 07:51:54 CET
Any news on this? Development phase for Xfce 4.12 end on 27th this month. Would be great if this could be merged before.
If this happens I would be happy to add some runtime configuration code (enable/disable QR code, error correction level, possible pixel size) as well.
Comment 5 Christian Hesse 2013-01-12 00:29:09 CET
Created attachment 4847 
add QR code support to clipman

Ok, this needs some error handling...
Comment 6 Christian Hesse 2013-01-12 00:32:51 CET
Created attachment 4848 
add QR code support to clipman

Damn, this one had my debug stuff in it... Updated again.
Comment 7 Harald Judt 2013-02-06 16:43:15 CET
I usually don't use the clipman plugin, but found your qrcode patch interesting, so I decided to give it a try, however it wouldn't apply to current git:

checking file configure.ac.in
checking file panel-plugin/Makefile.am
checking file panel-plugin/menu.c
patch: **** malformed patch at line 106: @@ -478,3 +519,46 @@ clipman_menu_get_property (GObject *object,

> If this happens I would be happy to add some runtime configuration code
> (enable/disable QR code, error correction level, possible pixel size) as
> well.

You might want to keep the error correction level as low as possible to increase data capacity. It would be only useful if your screen is terribly scratched, so that you couldn't see parts of the code ;-)
Comment 8 Christian Hesse 2013-02-06 17:15:30 CET
Created attachment 4901 
add QR code support to clipman

Ok, do not know what went wrong... This one applies cleanly to current git.
Comment 9 Harald Judt 2013-02-06 17:52:45 CET
I have not tested your new patch, but modified the old one to apply. So far, it works fine. The pixel size seems ok and the smartphone had no problems recognizing the qr code.

You should modify your patch to add qrcode flags/libs to libclipman_la_LIBADD, otherwise it will build but fail on runtime with missing symbol errors.

BTW: The clipman also seems to need some maintainer love, it did not compile with automake-1.13.

Now back to your qr code patch, some suggestions for improvement:
* Clicking on the qr code doesn't do anything. How about copying the image itself to the clipboard? I wouldn't deal with saving the image; users can launch gimp or other graphics manipulation software to do this.
* Maybe update the qrcode image when hovering over the items in the clipman history. Currently, it only shows the QR code for the newest entry.

Anyway, thanks for the patch; it would be a nice and helpful addition if it gets integrated.
Comment 10 Christian Hesse 2013-02-06 20:22:26 CET
(In reply to comment #9)
> I have not tested your new patch, but modified the old one to apply. So far,
> it works fine. The pixel size seems ok and the smartphone had no problems
> recognizing the qr code.

I just fixed the patch format, the final code did not change.

> You should modify your patch to add qrcode flags/libs to
> libclipman_la_LIBADD, otherwise it will build but fail on runtime with
> missing symbol errors.

Ok, will take a look at that.

> BTW: The clipman also seems to need some maintainer love, it did not compile
> with automake-1.13.

See https://bugzilla.xfce.org/show_bug.cgi?id=9749 ;)

> Now back to your qr code patch, some suggestions for improvement:
> * Clicking on the qr code doesn't do anything. How about copying the image
> itself to the clipboard? I wouldn't deal with saving the image; users can
> launch gimp or other graphics manipulation software to do this.

Good idea, I will try to implement that.

> * Maybe update the qrcode image when hovering over the items in the clipman
> history. Currently, it only shows the QR code for the newest entry.

This is by intention. If you select an older entry the QR code will be updated the next time you open the menu. (Sure, it is the newest entry then... ;)

> Anyway, thanks for the patch; it would be a nice and helpful addition if it
> gets integrated.

Thanks!
Comment 11 Harald Judt 2013-02-06 22:22:52 CET
(In reply to comment #10)
> > * Maybe update the qrcode image when hovering over the items in the clipman
> > history. Currently, it only shows the QR code for the newest entry.
> 
> This is by intention. If you select an older entry the QR code will be
> updated the next time you open the menu. (Sure, it is the newest entry
> then... ;)

I see. I'd still find it more useful and easier if you could simply copy three or four strings in a row and then switch between them without having to open menu, select, open menu, select, open menu, select...

Anyway, good stuff!
Comment 12 Christian Hesse 2013-02-08 10:50:08 CET
Created attachment 4904 
add QR code support to clipman

Updated to add libqrencode to libclipman.la.
Comment 13 Christian Hesse 2013-02-08 14:22:00 CET
Created attachment 4905 
add QR code support to clipman

And just a new version. This one enables QR-Code image to selection, I could successfully paste the code into gimp. Please give it a try! Thanks!
Comment 14 Harald Judt 2013-02-19 08:24:13 CET
Tested your new patch, it works fine!
Comment 15 Harald Judt 2013-02-19 08:25:58 CET
This should really be optional, though - not all people use smartphones or like QR codes.
Comment 16 Christian Hesse 2013-02-19 09:40:05 CET
(In reply to comment #15)
> This should really be optional, though - not all people use smartphones or
> like QR codes.

This is optional at compile time, so distributions can decide to give --disable-qrencode to configure.

Or do you want an option in the preferences at runtime? I took a look at the code, looks like I have to figure how to display this depending on whether the binary has QR code support. The settings dialog ist hardcoded in a xml file, no?
Comment 17 Harald Judt 2013-02-19 10:09:35 CET
Yes, I think the user should be able to toggle it on or off. Otherwise most distributions would have to provide two packages - one with QR code support and one without. Besides, some users might want to use this feature only every now and then, and turn it off if not needed.

I don't know how to integrate it into the current options dialog, maybe the plugin maintainer can give you a clue...
Comment 18 Christian Hesse 2013-02-19 11:55:26 CET
Created attachment 4925 
add QR code support to clipman

Ok, we do have an option in settings dialog to disable the QR-Code. The option is grayed out if clipman is compiled without support for QR-Code.
Comment 19 Mike Massonnet editbugs 2013-02-28 21:54:44 CET
Hello Christian,

I like the work you put into this new feature.

Although note that currently I'm short on time/busy, but I will make sure to include your patch first before making changes in the source code.

There is one remark in regard to comment #18. If the plugin is not built with QR Code support, the settings dialog shouldn't display any option at all, otherwhise the user might think there is a way to enable it.

Best Regards,
Mike
Comment 20 Christian Hesse 2013-03-01 09:57:11 CET
Created attachment 4942 
add QR code support to clipman

Hey Mike,

thanks for your feedback! Glad to hear that this feature is supposed to go upstream. ;)

About the configuration dialog... No problem, we hide the widget instead of making it insensitive. The new patch is uploaded.

Regards,
Chris
Comment 21 Christian Hesse 2013-07-04 22:56:37 CEST
Created attachment 5087 
add QR code support to clipman

Reworked this to fix compiler warnings. Now even compiles with -Wall -Werror.

Any news about the inclusion? From time to time rumours about Xfce 4.12 arise and I would like to have this ready in time. There are some strings to be translated.
Comment 22 Christian Hesse 2013-07-11 14:23:24 CEST
Created attachment 5090 
add QR code support to clipman

And another update... As we do not have data containing null character we can use QRcode_encodeString8bit().
Comment 23 haarp 2013-12-03 12:53:16 CET
I can't seem to be able to get this to work.

First off, my clipman 1.2.3 has no configure.ac.in. I changed the patch to apply to configure.ac instead, which seems to work.

Then it wouldn't compile in QR support as HAVE_QRENCODE was not defined anywhere. So I added that to the CFLAGS, along with the linker options (it fails to compile otherwise):

CFLAGS="-DHAVE_QRENCODE -lqrencode"

Now it compiles and links with libqrencode, but I still get no QR-related options at all. What does it take to use this patch?
Comment 24 Christian Hesse 2013-12-03 13:24:10 CET
You need to apply against current git, then run autogen.sh. After that just configure and make. If anything complains about missing header file configure with option --enable-maintainer-mode.
Comment 25 Mike Massonnet editbugs 2014-02-02 16:34:11 CET
git commit 4218a5125dc45e5df27b37ce5684317a738c464a

thanks for your patience :)

Bug #9528

Reported by:
Christian Hesse
Reported on: 2012-11-21
Last modified on: 2014-02-02

People

Assignee:
Mike Massonnet
CC List:
2 users

Version

Version:
unspecified

Attachments

add QR code support to clipman (3.81 KB, application/octet-stream)
2012-11-21 22:38 CET , Christian Hesse
no flags
add QR code support to clipman (3.88 KB, patch)
2012-11-21 23:21 CET , Christian Hesse
no flags
screenshot (19.37 KB, image/png)
2012-11-21 23:26 CET , Christian Hesse
no flags
add QR code support to clipman (4.13 KB, patch)
2012-11-23 13:33 CET , Christian Hesse
no flags
add QR code support to clipman (4.56 KB, patch)
2013-01-12 00:29 CET , Christian Hesse
no flags
add QR code support to clipman (4.50 KB, patch)
2013-01-12 00:32 CET , Christian Hesse
no flags
add QR code support to clipman (4.50 KB, patch)
2013-02-06 17:15 CET , Christian Hesse
no flags
add QR code support to clipman (4.66 KB, patch)
2013-02-08 10:50 CET , Christian Hesse
no flags
add QR code support to clipman (6.46 KB, patch)
2013-02-08 14:22 CET , Christian Hesse
no flags
add QR code support to clipman (12.76 KB, patch)
2013-02-19 11:55 CET , Christian Hesse
no flags
add QR code support to clipman (12.77 KB, patch)
2013-03-01 09:57 CET , Christian Hesse
no flags
add QR code support to clipman (13.40 KB, patch)
2013-07-04 22:56 CEST , Christian Hesse
no flags
add QR code support to clipman (13.38 KB, patch)
2013-07-11 14:23 CEST , Christian Hesse
no flags

Additional information