+2005-09-07 Marco Pesenti Gritti <mpg@redhat.com>
+
+ * lib/ev-tooltip.c:
+
+ Use mozilla style vs gtk style, way better for links.
+
+ * shell/ev-view.c: (ev_view_motion_notify_event),
+ (ev_view_destroy), (ev_view_init):
+
+ Deactive tooltip when the link hovered is changed.
+
2005-09-07 Marco Pesenti Gritti <mpg@redhat.com>
* backend/ev-document.h:
int pressed_button;
EvViewCursor cursor;
GtkWidget *link_tooltip;
+ EvLink *hovered_link;
EvPageCache *page_cache;
EvPixbufCache *pixbuf_cache;
link = get_link_at_location (view, event->x + view->scroll_x, event->y + view->scroll_y);
- if (!link && view->link_tooltip) {
+ if (view->link_tooltip == NULL) {
+ view->link_tooltip = ev_tooltip_new (GTK_WIDGET (view));
+ }
+
+ if (view->hovered_link != link) {
+ view->hovered_link = link;
ev_tooltip_deactivate (EV_TOOLTIP (view->link_tooltip));
}
if (link) {
char *msg = tip_from_link (view, link);
- if (view->link_tooltip == NULL) {
- view->link_tooltip = ev_tooltip_new (GTK_WIDGET (view));
- }
ev_tooltip_set_position (EV_TOOLTIP (view->link_tooltip), event->x, event->y);
ev_tooltip_set_text (EV_TOOLTIP (view->link_tooltip), msg);
ev_tooltip_activate (EV_TOOLTIP (view->link_tooltip));
g_object_unref (view->document);
view->document = NULL;
}
+
if (view->pixbuf_cache) {
g_object_unref (view->pixbuf_cache);
view->pixbuf_cache = NULL;
}
+
if (view->link_tooltip) {
gtk_widget_destroy (view->link_tooltip);
- view->link_tooltip = NULL;
}
ev_view_set_scroll_adjustments (view, NULL, NULL);
view->cursor = EV_VIEW_CURSOR_NORMAL;
view->drag_info.in_drag = FALSE;
view->selection_info.in_selection = FALSE;
-
view->selection_mode = EV_VIEW_SELECTION_TEXT;
view->continuous = TRUE;
view->dual_page = FALSE;