| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/gtk_custom_menu_item.h" | 5 #include "chrome/browser/ui/gtk/gtk_custom_menu_item.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "chrome/browser/gtk/gtk_custom_menu.h" | 8 #include "chrome/browser/ui/gtk/gtk_custom_menu.h" |
| 9 | 9 |
| 10 enum { | 10 enum { |
| 11 BUTTON_PUSHED, | 11 BUTTON_PUSHED, |
| 12 TRY_BUTTON_PUSHED, | 12 TRY_BUTTON_PUSHED, |
| 13 LAST_SIGNAL | 13 LAST_SIGNAL |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 static guint custom_menu_item_signals[LAST_SIGNAL] = { 0 }; | 16 static guint custom_menu_item_signals[LAST_SIGNAL] = { 0 }; |
| 17 | 17 |
| 18 G_DEFINE_TYPE(GtkCustomMenuItem, gtk_custom_menu_item, GTK_TYPE_MENU_ITEM) | 18 G_DEFINE_TYPE(GtkCustomMenuItem, gtk_custom_menu_item, GTK_TYPE_MENU_ITEM) |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 gpointer callback_data) { | 425 gpointer callback_data) { |
| 426 // Even though we're filtering |all_widgets| on GTK_IS_BUTTON(), this isn't | 426 // Even though we're filtering |all_widgets| on GTK_IS_BUTTON(), this isn't |
| 427 // equivalent to |button_widgets| because we also want the button-labels. | 427 // equivalent to |button_widgets| because we also want the button-labels. |
| 428 for (GList* i = menu_item->all_widgets; i && GTK_IS_BUTTON(i->data); | 428 for (GList* i = menu_item->all_widgets; i && GTK_IS_BUTTON(i->data); |
| 429 i = g_list_next(i)) { | 429 i = g_list_next(i)) { |
| 430 if (GTK_IS_BUTTON(i->data)) { | 430 if (GTK_IS_BUTTON(i->data)) { |
| 431 callback(GTK_WIDGET(i->data), callback_data); | 431 callback(GTK_WIDGET(i->data), callback_data); |
| 432 } | 432 } |
| 433 } | 433 } |
| 434 } | 434 } |
| OLD | NEW |