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

Side by Side Diff: chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.cc

Issue 7227027: GTK: More 2.18 goodness. Move from macros to real accessor functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove views/ Created 9 years, 5 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 | Annotate | Revision Log
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/omnibox/omnibox_popup_view_gtk.h" 5 #include "chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 GtkWidget* location_bar) 273 GtkWidget* location_bar)
274 : model_(new AutocompletePopupModel(this, edit_model, profile)), 274 : model_(new AutocompletePopupModel(this, edit_model, profile)),
275 omnibox_view_(omnibox_view), 275 omnibox_view_(omnibox_view),
276 location_bar_(location_bar), 276 location_bar_(location_bar),
277 window_(gtk_window_new(GTK_WINDOW_POPUP)), 277 window_(gtk_window_new(GTK_WINDOW_POPUP)),
278 layout_(NULL), 278 layout_(NULL),
279 theme_service_(GtkThemeService::GetFrom(profile)), 279 theme_service_(GtkThemeService::GetFrom(profile)),
280 font_(font.DeriveFont(kEditFontAdjust)), 280 font_(font.DeriveFont(kEditFontAdjust)),
281 ignore_mouse_drag_(false), 281 ignore_mouse_drag_(false),
282 opened_(false) { 282 opened_(false) {
283 GTK_WIDGET_UNSET_FLAGS(window_, GTK_CAN_FOCUS); 283 gtk_widget_set_can_focus(window_, FALSE);
284 // Don't allow the window to be resized. This also forces the window to 284 // Don't allow the window to be resized. This also forces the window to
285 // shrink down to the size of its child contents. 285 // shrink down to the size of its child contents.
286 gtk_window_set_resizable(GTK_WINDOW(window_), FALSE); 286 gtk_window_set_resizable(GTK_WINDOW(window_), FALSE);
287 gtk_widget_set_app_paintable(window_, TRUE); 287 gtk_widget_set_app_paintable(window_, TRUE);
288 // Have GTK double buffer around the expose signal. 288 // Have GTK double buffer around the expose signal.
289 gtk_widget_set_double_buffered(window_, TRUE); 289 gtk_widget_set_double_buffered(window_, TRUE);
290 290
291 // Cache the layout so we don't have to create it for every expose. If we 291 // Cache the layout so we don't have to create it for every expose. If we
292 // were a real widget we should handle changing directions, but we're not 292 // were a real widget we should handle changing directions, but we're not
293 // doing RTL or anything yet, so it shouldn't be important now. 293 // doing RTL or anything yet, so it shouldn't be important now.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 (text_width - actual_content_width - 680 (text_width - actual_content_width -
681 (actual_description_width / PANGO_SCALE)), 681 (actual_description_width / PANGO_SCALE)),
682 content_y, layout_); 682 content_y, layout_);
683 } 683 }
684 } 684 }
685 685
686 g_object_unref(gc); 686 g_object_unref(gc);
687 687
688 return TRUE; 688 return TRUE;
689 } 689 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc ('k') | chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698