Ticket #1742 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

url catching

Reported by: goldmann <marek_AT_goldmann_DOT_pl> Owned by: nk
Priority: normal Milestone: 0.11
Component: None Version:
Severity: normal Keywords:
Cc: OS:

Description

It would be nice, if Gajim could catch urls ('http://', 'www.', '@') form status messages from users:

  • in status message displayed on roster
  • in status message displayed in chat window (top of the window)
  • in user info

Somewhere else?

Attachments

untested_patch.diff (4.2 kB) - added by nk 2 years ago.
in theory it all works nicely. I could be wrong in a place or two (especially on the params on the table.attach method). This should have been in from GTK 0.1 not GTK 2.10 but anywayzzzzzz

Change History

Changed 3 years ago by nk

  • milestone changed from 0.10 to 0.11

* in status message displayed on roster

no, as it kills usability, user has to pass sniper tests to be order to use our main window if this happens.

in user info, if user adds a link in his status msg chances are it's too big so it won't be shown as a whole

on status change event it is catched

for banner, banner could be clickable in the place where status msg is if status message is special but gtk labels aren't clickable, so we wait for GTK 2.10

Changed 2 years ago by anonymous

no, as it kills usability, user has to pass sniper tests to be order to

use our main window if this happens.

Usability? In my opinion it would be a great enhancement. You can put a true/false option in ACE to toggle url catching on roster.

Changed 2 years ago by asterix

I don't think it's a good thing to have clickable things everywhere

(except maybe in banner, there is a GtkLinkButton? in GTK2.10 that can be used)

Changed 2 years ago by dkirov

How can we combine GtkLabel? with GtkLinkButton?, these are two different

widgets? If we have:

 New Bugs at http://trac.gajim.org/newticket, http://www.frappr.com/gajim
 add yourselves! Paste in http://gajim.pastebin.com ....

We cannot make a single lable with clickable parts in it.

Changed 2 years ago by dkirov

I'm not sure, but as long as I could see in the new api GtkLabel? has

nothing related to links. GtkLinkButton? comes as replacement of GnomeHRef, as part of Project Ridley, this is different and cannot help us to put url in label.

... If we used GtkTextView? we could do this long before gtk+-2.10. The other solution is to use GtkDrawingArea? and draw the text with pango, something like custom widget, but this will bring many new problems.

IMO the places, where clickable text should apear are:

  • banners in chats and groupchats
  • vcard window, but not profile window (GtkLinkButton? can be used here)

Changed 2 years ago by asterix

I was thinking about a hbox in which we put labels and linkbuttons.

I agree for where to put clickable links (if profile window means the window in which we edit our own profile and vcard window, the window in which we see others vcard)

Changed 2 years ago by asterix

in fact wrapping / elpisze is not possible with hbox, so no clickable link

in banner until GTK offer a way to do that in label. So only use linkbutton (or GnomeHRef) in vcard window if user has GTK >= 2.10 (or gnome-python)

Changed 2 years ago by asterix

  • status changed from new to closed

will be done in #1840

Changed 2 years ago by patrys@…

  • status changed from closed to reopened

Why not just add a submenu "Use link..." to the context menu with all URIs

catched from status message?

Changed 2 years ago by asterix

I find this idea ugly ... other comments ?

Changed 2 years ago by nk

  • owner changed from asterix to nk

I don't have PyGTK 2.10 yet (nor 2.9), but

http://www.pygtk.org/pygtk2reference/class-gtklinkbutton.html is out and I'll patch for the sake of good old times.

This ticket then can be closed, but the refactor of the window should happen at some time.

Changed 2 years ago by nk

in theory it all works nicely. I could be wrong in a place or two (especially on the params on the table.attach method). This should have been in from GTK 0.1 not GTK 2.10 but anywayzzzzzz

Changed 2 years ago by asterix

  • status changed from new to closed

we now use linkbutton in vcard when pygtk2.10 is installed

Add/Change #1742 (url catching)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.