GtkHTML URL patch
- From: hitched97 <hitched97 myrealbox com>
- To: Balsa List <balsa-list gnome org>
- Subject: GtkHTML URL patch
- Date: Tue, 11 Sep 2001 17:48:48 -0400
For those using GtkHTML, this patch will display URL's in the status
bar on mouseover. Patch is against 1.2.pre3.
--
Steve Wall
diff -pc ./src/balsa-message.c.orig ./src/balsa-message.c
*** ./src/balsa-message.c.orig Tue Sep 11 17:17:47 2001
--- ./src/balsa-message.c Tue Sep 11 17:18:55 2001
*************** static void balsa_gtk_html_size_request(
*** 131,136 ****
--- 131,138 ----
gpointer data);
static void balsa_gtk_html_link_clicked(GtkWidget *html,
const gchar *url);
+ static void balsa_gtk_html_on_url(GtkWidget *html,
+ const gchar *url);
#endif
static void balsa_icon_list_size_request(GtkWidget * widget,
GtkRequisition * requisition,
*************** part_info_init_html(BalsaMessage * bm, B
*** 1717,1722 ****
--- 1719,1727 ----
gtk_signal_connect(GTK_OBJECT(html), "link_clicked",
GTK_SIGNAL_FUNC(balsa_gtk_html_link_clicked),
bm);
+ gtk_signal_connect(GTK_OBJECT(html), "on_url",
+ GTK_SIGNAL_FUNC(balsa_gtk_html_on_url),
+ bm);
gtk_container_add(GTK_CONTAINER(scroll), html);
*************** static void
*** 2226,2231 ****
--- 2231,2253 ----
balsa_gtk_html_link_clicked(GtkWidget *html, const gchar *url)
{
gnome_url_show(url);
+ }
+
+ static url_pushed = FALSE;
+
+ static void
+ balsa_gtk_html_on_url(GtkWidget *html, const gchar *url)
+ {
+ if( url ) {
+ if (url_pushed) {
+ gnome_appbar_set_status(balsa_app.appbar, url);
+ } else {
+ gnome_appbar_push(balsa_app.appbar, url);
+ url_pushed = TRUE;
+ }
+ } else {
+ gnome_appbar_pop(balsa_app.appbar);
+ }
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]