[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sylpheed
Subject:    [sylpheed:22148] PATCH: Show underlying URL before launching browser
From:       Bill Trenker <mlwtrenker () yahoo ! ca>
Date:       2003-12-26 13:44:56
[Download RAW message or body]

Below, is a very simple patch to Sylpheed 0.9.8a that displays the url of an html link when you \
double-click on the green text in a message.  A message box pops up and displays the full url.  The \
message box includes two buttons, one to go ahead and display the url in your browser, and another button \
to cancel.  If you don't like the looks of the url, just click on the Cancel button.

In more polished form, the availability of this message box should be an option in the preferences.

A more elegant solution would be to implement a roll-over so that when you roll the mouse over a \
green-highlighted html link, a small note would pop-up displaying the full url.  Perhaps someone more \
familiar with GTK+ event programming could look into that possibility.

Regards,
Bill

-----------------------

/src/sylpheed-0.9.8a/src# diff -u textview.c-original textview.c          
--- textview.c-original Fri Dec 26 12:13:42 2003
+++ textview.c  Fri Dec 26 13:20:09 2003
@@ -47,6 +47,7 @@
 #include "html.h"
 #include "compose.h"
 #include "displayheader.h"
+#include "alertpanel.h"
 
 typedef struct _RemoteURI      RemoteURI;
 
@@ -1568,9 +1569,13 @@
                                if (!g_strncasecmp(uri->uri, "mailto:", 7))
                                        compose_new(NULL, NULL, uri->uri + 7,
                                                    NULL);
-                               else
-                                       open_uri(uri->uri,
-                                                prefs_common.uri_cmd);
+                               else {
+                                       AlertValue aval;
+                                       aval = alertpanel(_("URL"),uri->uri,_("Open In \
Browser"),_("Cancel"),NULL); +                                       if (aval == G_ALERTDEFAULT)
+                                               open_uri(uri->uri,
+                                                   prefs_common.uri_cmd);
+                               }
                        }                               
                }
        }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic