| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 5 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/gtk/gtk_util.h" | 9 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 10 #include "ui/base/gtk/gtk_compat.h" | 10 #include "ui/base/gtk/gtk_compat.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 static void gtk_chrome_link_button_enter(GtkButton* button) { | 153 static void gtk_chrome_link_button_enter(GtkButton* button) { |
| 154 GtkWidget* widget = GTK_WIDGET(button); | 154 GtkWidget* widget = GTK_WIDGET(button); |
| 155 GtkChromeLinkButton* link_button = GTK_CHROME_LINK_BUTTON(button); | 155 GtkChromeLinkButton* link_button = GTK_CHROME_LINK_BUTTON(button); |
| 156 gdk_window_set_cursor(gtk_widget_get_window(widget), | 156 gdk_window_set_cursor(gtk_widget_get_window(widget), |
| 157 link_button->hand_cursor); | 157 link_button->hand_cursor); |
| 158 } | 158 } |
| 159 | 159 |
| 160 static void gtk_chrome_link_button_leave(GtkButton* button) { | 160 static void gtk_chrome_link_button_leave(GtkButton* button) { |
| 161 GtkWidget* widget = GTK_WIDGET(button); | 161 GtkWidget* widget = GTK_WIDGET(button); |
| 162 gdk_window_set_cursor(widget->window, NULL); | 162 gdk_window_set_cursor(gtk_widget_get_window(widget), NULL); |
| 163 } | 163 } |
| 164 | 164 |
| 165 static void gtk_chrome_link_button_destroy(GtkObject* object) { | 165 static void gtk_chrome_link_button_destroy(GtkObject* object) { |
| 166 GtkChromeLinkButton* button = GTK_CHROME_LINK_BUTTON(object); | 166 GtkChromeLinkButton* button = GTK_CHROME_LINK_BUTTON(object); |
| 167 | 167 |
| 168 gtk_chrome_link_button_destroy_text_resources(button); | 168 gtk_chrome_link_button_destroy_text_resources(button); |
| 169 | 169 |
| 170 button->hand_cursor = NULL; | 170 button->hand_cursor = NULL; |
| 171 | 171 |
| 172 GTK_OBJECT_CLASS(gtk_chrome_link_button_parent_class)->destroy(object); | 172 GTK_OBJECT_CLASS(gtk_chrome_link_button_parent_class)->destroy(object); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 strncpy(button->normal_color, "blue", 9); | 258 strncpy(button->normal_color, "blue", 9); |
| 259 } | 259 } |
| 260 | 260 |
| 261 gtk_chrome_link_button_set_text(button); | 261 gtk_chrome_link_button_set_text(button); |
| 262 | 262 |
| 263 if (gtk_widget_get_visible(GTK_WIDGET(button))) | 263 if (gtk_widget_get_visible(GTK_WIDGET(button))) |
| 264 gtk_widget_queue_draw(GTK_WIDGET(button)); | 264 gtk_widget_queue_draw(GTK_WIDGET(button)); |
| 265 } | 265 } |
| 266 | 266 |
| 267 G_END_DECLS | 267 G_END_DECLS |
| OLD | NEW |