mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 07:04:29 +00:00
linkbutton: Only set widget cursor once
This commit is contained in:
parent
8224e7ac72
commit
e4be37eb60
@ -124,9 +124,6 @@ static void gtk_link_button_pressed_cb (GtkGestureMultiPress *gesture,
|
|||||||
|
|
||||||
static gboolean gtk_link_button_activate_link (GtkLinkButton *link_button);
|
static gboolean gtk_link_button_activate_link (GtkLinkButton *link_button);
|
||||||
|
|
||||||
static void set_hand_cursor (GtkWidget *widget,
|
|
||||||
gboolean show_hand);
|
|
||||||
|
|
||||||
static const char *link_drop_types[] = {
|
static const char *link_drop_types[] = {
|
||||||
"text/uri-list",
|
"text/uri-list",
|
||||||
"_NETSCAPE_URL"
|
"_NETSCAPE_URL"
|
||||||
@ -249,7 +246,7 @@ gtk_link_button_init (GtkLinkButton *link_button)
|
|||||||
context = gtk_widget_get_style_context (GTK_WIDGET (link_button));
|
context = gtk_widget_get_style_context (GTK_WIDGET (link_button));
|
||||||
gtk_style_context_add_class (context, "link");
|
gtk_style_context_add_class (context, "link");
|
||||||
|
|
||||||
set_hand_cursor (GTK_WIDGET (link_button), TRUE);
|
gtk_widget_set_cursor_from_name (GTK_WIDGET (link_button), "pointer");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -307,16 +304,6 @@ gtk_link_button_set_property (GObject *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
set_hand_cursor (GtkWidget *widget,
|
|
||||||
gboolean show_hand)
|
|
||||||
{
|
|
||||||
if (show_hand)
|
|
||||||
gtk_widget_set_cursor_from_name (widget, "pointer");
|
|
||||||
else
|
|
||||||
gtk_widget_set_cursor (widget, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
popup_menu_detach (GtkWidget *attach_widget,
|
popup_menu_detach (GtkWidget *attach_widget,
|
||||||
GtkMenu *menu)
|
GtkMenu *menu)
|
||||||
|
Loading…
Reference in New Issue
Block a user