Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: chrome/browser/ui/gtk/menu_gtk.cc

Issue 9109028: GTK: Another GTK deprecation patch. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: evanm fix Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/browser/ui/gtk/reload_button_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ui/gtk/menu_gtk.h" 5 #include "chrome/browser/ui/gtk/menu_gtk.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 void MenuGtk::WidgetMenuPositionFunc(GtkMenu* menu, 683 void MenuGtk::WidgetMenuPositionFunc(GtkMenu* menu,
684 int* x, 684 int* x,
685 int* y, 685 int* y,
686 gboolean* push_in, 686 gboolean* push_in,
687 void* void_widget) { 687 void* void_widget) {
688 GtkWidget* widget = GTK_WIDGET(void_widget); 688 GtkWidget* widget = GTK_WIDGET(void_widget);
689 GtkRequisition menu_req; 689 GtkRequisition menu_req;
690 690
691 gtk_widget_size_request(GTK_WIDGET(menu), &menu_req); 691 gtk_widget_size_request(GTK_WIDGET(menu), &menu_req);
692 692
693 gdk_window_get_origin(widget->window, x, y); 693 gdk_window_get_origin(gtk_widget_get_window(widget), x, y);
694 GdkScreen *screen = gtk_widget_get_screen(widget); 694 GdkScreen *screen = gtk_widget_get_screen(widget);
695 gint monitor = gdk_screen_get_monitor_at_point(screen, *x, *y); 695 gint monitor = gdk_screen_get_monitor_at_point(screen, *x, *y);
696 696
697 GdkRectangle screen_rect; 697 GdkRectangle screen_rect;
698 gdk_screen_get_monitor_geometry(screen, monitor, 698 gdk_screen_get_monitor_geometry(screen, monitor,
699 &screen_rect); 699 &screen_rect);
700 700
701 GtkAllocation allocation; 701 GtkAllocation allocation;
702 gtk_widget_get_allocation(widget, &allocation); 702 gtk_widget_get_allocation(widget, &allocation);
703 703
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 gtk_widget_hide(widget); 912 gtk_widget_hide(widget);
913 } 913 }
914 914
915 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)); 915 GtkWidget* submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget));
916 if (submenu) { 916 if (submenu) {
917 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo, 917 gtk_container_foreach(GTK_CONTAINER(submenu), &SetMenuItemInfo,
918 userdata); 918 userdata);
919 } 919 }
920 } 920 }
921 } 921 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/browser/ui/gtk/reload_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698