rpms/epiphany/devel epiphany-tooltips.patch, NONE, 1.1 epiphany.spec, 1.148, 1.149
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Mon Jul 23 19:34:00 UTC 2007
Author: mclasen
Update of /cvs/pkgs/rpms/epiphany/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29294
Modified Files:
epiphany.spec
Added Files:
epiphany-tooltips.patch
Log Message:
port to new GTK+ tooltip api
epiphany-tooltips.patch:
--- NEW FILE epiphany-tooltips.patch ---
--- trunk/src/bookmarks/ephy-bookmark-action.c 2007/03/11 19:42:02 6952
+++ trunk/src/bookmarks/ephy-bookmark-action.c 2007/07/10 13:46:49 7141
@@ -417,49 +417,46 @@
static gboolean
-set_tooltip_cb (GtkToolItem *toolitem,
- GtkTooltips *tooltips,
- gchar *tip_text,
- gchar *tip_private,
- GtkAction *action)
+query_tooltip_cb (GtkWidget *proxy,
+ gint x,
+ gint y,
+ gboolean keyboard_mode,
+ GtkTooltip *tooltip,
+ GtkAction *action)
{
EphyBookmarks *bookmarks;
EphyNode *node;
- GtkWidget *button;
-
const char *title, *location;
- char *tooltip;
+ char *text = NULL;
node = ephy_bookmark_action_get_bookmark (EPHY_BOOKMARK_ACTION (action));
bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
title = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_TITLE);
location = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_LOCATION);
- tooltip = NULL;
if (strstr (location, "%s") != NULL)
{
GnomeVFSURI *uri = gnome_vfs_uri_new (location);
if (uri != NULL)
{
- tooltip = g_strconcat
- (title, "\n", gnome_vfs_uri_get_scheme (uri),
- "://", gnome_vfs_uri_get_host_name (uri), NULL);
+ text = g_markup_printf_escaped ("%s\n%s://%s",
+ title,
+ gnome_vfs_uri_get_scheme (uri),
+ gnome_vfs_uri_get_host_name (uri));
gnome_vfs_uri_unref (uri);
}
}
- if (tooltip == NULL)
+ if (text == NULL)
{
- tooltip = g_strconcat (title, "\n", location, NULL);
+ text = g_markup_printf_escaped ("%s\n%s", title, location);
}
-
- button = g_object_get_data (G_OBJECT (toolitem), "button");
- gtk_tooltips_set_tip (tooltips, button, tooltip, NULL);
- g_free (tooltip);
+
+ gtk_tooltip_set_markup (tooltip, text);
+ g_free (text);
return TRUE;
}
-
static void
connect_proxy (GtkAction *action,
GtkWidget *proxy)
@@ -486,8 +483,11 @@
g_signal_connect (proxy, "toolbar-reconfigured",
G_CALLBACK (toolbar_reconfigured_cb), action);
- g_signal_connect (proxy, "set-tooltip",
- G_CALLBACK (set_tooltip_cb), action);
+
+ /* FIXME: maybe make the tooltip cover only the button, not also the entry (if there is one?) */
+ g_object_set (proxy, "has-tooltip", TRUE, NULL);
+ g_signal_connect (proxy, "query-tooltip",
+ G_CALLBACK (query_tooltip_cb), action);
button = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "button"));
g_signal_connect (button, "clicked", G_CALLBACK (activate_cb), action);
@@ -546,10 +546,14 @@
/* Notify all other properties */
g_object_notify (G_OBJECT (action), "location");
- g_object_notify (G_OBJECT (action), "tooltip");
g_object_notify (G_OBJECT (action), "icon");
- g_object_thaw_notify (G_OBJECT (action));
+ g_object_thaw_notify (G_OBJECT (action));
+
+ /* We could force a tooltip re-query with gtk_tooltip_trigger_tooltip_query
+ * here, but it's not really worth it. Just show the updated tip next time
+ * the tip is queried.
+ */
}
EphyNode *
@@ -678,40 +682,30 @@
g_object_class_install_property (object_class,
PROP_BOOKMARK,
- g_param_spec_pointer ("bookmark",
- "bookmark",
- "bookmark",
+ g_param_spec_pointer ("bookmark", NULL, NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
G_PARAM_CONSTRUCT_ONLY));
/* overwrite GtkActionClass::tooltip, so we can use the url as tooltip */
g_object_class_install_property (object_class,
PROP_TOOLTIP,
- g_param_spec_string ("tooltip",
- "tooltip",
- "tooltip",
+ g_param_spec_string ("tooltip", NULL, NULL,
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
g_object_class_install_property (object_class,
PROP_LOCATION,
- g_param_spec_string ("location",
- "location",
- "location",
+ g_param_spec_string ("location", NULL, NULL,
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
g_object_class_install_property (object_class,
PROP_SMART_URL,
- g_param_spec_boolean ("smarturl",
- "smarturl",
- "smarturl",
+ g_param_spec_boolean ("smarturl", NULL, NULL,
FALSE,
G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
g_object_class_install_property (object_class,
PROP_ICON,
- g_param_spec_string ("icon",
- "icon",
- "icon",
+ g_param_spec_string ("icon", NULL, NULL,
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
Index: epiphany.spec
===================================================================
RCS file: /cvs/pkgs/rpms/epiphany/devel/epiphany.spec,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- epiphany.spec 20 Jul 2007 03:28:07 -0000 1.148
+++ epiphany.spec 23 Jul 2007 19:33:28 -0000 1.149
@@ -8,7 +8,7 @@
Summary: GNOME web browser based on the Mozilla rendering engine
Name: epiphany
Version: 2.19.5
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPL
Group: Applications/Internet
URL: http://www.gnome.org/projects/epiphany/
@@ -47,6 +47,8 @@
Patch0: epiphany-1.0.1-home-page.patch
Patch1: epiphany-2.17.3-use-pango.patch
Patch2: epiphany-2.18.1-default-bookmarks.patch
+# fixed in upstream svn
+Patch3: epiphany-tooltips.patch
%description
epiphany is a simple GNOME web browser based on the Mozilla rendering
@@ -84,6 +86,7 @@
%patch0 -p1 -b .homepage
%patch1 -p1 -b .use-pango
%patch2 -p1 -b .default-bookmarks
+%patch3 -p1 -b .tooltips
%build
%ifnarch s390 s390x
@@ -177,6 +180,9 @@
%{_datadir}/pygtk/2.0/defs/epiphany.defs
%changelog
+* Mon Jul 23 2007 Matthias Clasen <mclasen at redhat.com> - 2.19.5-3
+- Port to new GTK+ tooltips API
+
* Fri Jul 20 2007 Kai Engert <kengert at redhat.com> - 2.19.5-2
- Rebuild against newer gecko
More information about the fedora-extras-commits
mailing list