[gtk+] linkbutton: Only set widget cursor once



commit e4be37eb6048598f82cad2e909423bed38411516
Author: Timm Bäder <mail baedert org>
Date:   Fri Jan 19 13:21:41 2018 +0100

    linkbutton: Only set widget cursor once

 gtk/gtklinkbutton.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 1426a36..e2c1662 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -124,9 +124,6 @@ static void gtk_link_button_pressed_cb (GtkGestureMultiPress *gesture,
 
 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[] = {
   "text/uri-list",
   "_NETSCAPE_URL"
@@ -249,7 +246,7 @@ gtk_link_button_init (GtkLinkButton *link_button)
   context = gtk_widget_get_style_context (GTK_WIDGET (link_button));
   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
@@ -308,16 +305,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
 popup_menu_detach (GtkWidget *attach_widget,
                   GtkMenu   *menu)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]