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

Side by Side Diff: chrome/browser/ui/gtk/gtk_expanded_container.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/gtk_expanded_container.h" 5 #include "chrome/browser/ui/gtk/gtk_expanded_container.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 16 matching lines...) Expand all
27 GValue v = { 0 }; 27 GValue v = { 0 };
28 g_value_init(&v, G_TYPE_INT); 28 g_value_init(&v, G_TYPE_INT);
29 gtk_container_child_get_property(GTK_CONTAINER(container), child, "x", &v); 29 gtk_container_child_get_property(GTK_CONTAINER(container), child, "x", &v);
30 *x = g_value_get_int(&v); 30 *x = g_value_get_int(&v);
31 gtk_container_child_get_property(GTK_CONTAINER(container), child, "y", &v); 31 gtk_container_child_get_property(GTK_CONTAINER(container), child, "y", &v);
32 *y = g_value_get_int(&v); 32 *y = g_value_get_int(&v);
33 g_value_unset(&v); 33 g_value_unset(&v);
34 } 34 }
35 35
36 void ChildSizeAllocate(GtkWidget* child, gpointer userdata) { 36 void ChildSizeAllocate(GtkWidget* child, gpointer userdata) {
37 if (!GTK_WIDGET_VISIBLE(child)) 37 if (!gtk_widget_get_visible(child))
38 return; 38 return;
39 39
40 SizeAllocateData* data = reinterpret_cast<SizeAllocateData*>(userdata); 40 SizeAllocateData* data = reinterpret_cast<SizeAllocateData*>(userdata);
41 41
42 GtkRequisition child_requisition; 42 GtkRequisition child_requisition;
43 child_requisition.width = data->allocation->width - data->border_width * 2; 43 child_requisition.width = data->allocation->width - data->border_width * 2;
44 child_requisition.height = data->allocation->height - data->border_width * 2; 44 child_requisition.height = data->allocation->height - data->border_width * 2;
45 45
46 // We need to give whoever is pulling our strings a chance to adjust the 46 // We need to give whoever is pulling our strings a chance to adjust the
47 // size of our children. 47 // size of our children.
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 gtk_fixed_set_has_window(GTK_FIXED(container), has_window); 184 gtk_fixed_set_has_window(GTK_FIXED(container), has_window);
185 } 185 }
186 186
187 gboolean gtk_expanded_container_get_has_window( 187 gboolean gtk_expanded_container_get_has_window(
188 GtkExpandedContainer* container) { 188 GtkExpandedContainer* container) {
189 g_return_val_if_fail(GTK_IS_EXPANDED_CONTAINER(container), FALSE); 189 g_return_val_if_fail(GTK_IS_EXPANDED_CONTAINER(container), FALSE);
190 return gtk_fixed_get_has_window(GTK_FIXED(container)); 190 return gtk_fixed_get_has_window(GTK_FIXED(container));
191 } 191 }
192 192
193 G_END_DECLS 193 G_END_DECLS
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_custom_menu_item.cc ('k') | chrome/browser/ui/gtk/gtk_floating_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698