This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Displaying hyperlinks via notify-send on KDE4.x

Tags: None
(comma "," separated)
ogmios
Registered Member
Posts
2
Karma
0
OS
I'm in the process of making a small script (using Perl) that will send notifications based on certain irssi events. I have the notifications working fine, but for some reason I can't seem to make a clickable link. Here's the relevant parts of the code:

Code: Select all
$stripped = "<a href=\"".$turl."\">NewStuff</a>";
    }
    notify($server, $summary, $stripped);


and:

Code: Select all
sub notify {
    my ($server, $summary, $message) = @_;

    # Make the message entity-safe
    $summary = sanitize($summary);
    $message = sanitize($message);

    my $cmd = "EXEC - notify-send" .
" -i " . Irssi::settings_get_str('notify_icon') .
" -t " . Irssi::settings_get_str('notify_time') .
" -- '" . $summary . "'" .
" '" . $message . "'";

    $server->command($cmd);
}


As is, this shows the full <a href>... as text, but doesn't parse it to a hyperlink. For some reason, if I put a space between New and Stuff, only the "<a" shows up with nothing after it. Everything works fine except it just won't display as a hyperlink no matter what I do. Any help would be very much appreciated.

Edit: ------- The sanitize() function was killing the hyperlink. With that commented out, it shows as a hyperlink. However, nothing happens when I click on it. The cursor doesn't change, and nothing happens. I have tried with the default browser set to Konquerer and Swiftfox. Is this functionality broken at the moment on KDE 4.4.3?
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS
ogmios wrote:However, nothing happens when I click on it. The cursor doesn't change, and nothing happens. I have tried with the default browser set to Konquerer and Swiftfox. Is this functionality broken at the moment on KDE 4.4.3?


Here it changes to a hand cursor when I move over the link for the second time, but it also doesn't do anything on click.
Sounds like a bug to me.

Maybe you can report with with an example notify-send command?

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
ogmios
Registered Member
Posts
2
Karma
0
OS
Bug reported: https://bugs.kde.org/show_bug.cgi?id=240626

I'm rather new at Linux in general, so if this is filed against the wrong thing or needs additional information, let me know and I'll do my best to remedy. Thanks.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]