summaryrefslogtreecommitdiff
path: root/gtk/gtkcellview.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2011-03-05 17:49:49 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2011-03-25 18:42:07 +0900
commit887142f1f5d364765bc84a46ddb187be08261710 (patch)
tree25591d2b4c6df43b2d1b443c5a94340f1bd69567 /gtk/gtkcellview.c
parent59440927d001e4d6400548a9e7f02dd43be6a4d0 (diff)
downloadgtk+-887142f1f5d364765bc84a46ddb187be08261710.tar.gz
Added GTK_SIZE_REQUEST_CONSTANT_SIZE to GtkSizeRequestMode
The constant size request mode defines a request mode where height-for-width geometry is unneeded, thus optimizing GTK+ by reducing the overall amount of requests that need to be performed and cached while resizing an interface.
Diffstat (limited to 'gtk/gtkcellview.c')
-rw-r--r--gtk/gtkcellview.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index d6a87af0e5..051bae5050 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -93,6 +93,7 @@ static void gtk_cell_view_buildable_custom_tag_end (GtkBuildable
const gchar *tagname,
gpointer *data);
+static GtkSizeRequestMode gtk_cell_view_get_request_mode (GtkWidget *widget);
static void gtk_cell_view_get_preferred_width (GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
@@ -175,6 +176,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
widget_class->draw = gtk_cell_view_draw;
widget_class->size_allocate = gtk_cell_view_size_allocate;
+ widget_class->get_request_mode = gtk_cell_view_get_request_mode;
widget_class->get_preferred_width = gtk_cell_view_get_preferred_width;
widget_class->get_preferred_height = gtk_cell_view_get_preferred_height;
widget_class->get_preferred_width_for_height = gtk_cell_view_get_preferred_width_for_height;
@@ -637,6 +639,15 @@ gtk_cell_view_request_model (GtkCellView *cellview,
}
}
+static GtkSizeRequestMode
+gtk_cell_view_get_request_mode (GtkWidget *widget)
+{
+ GtkCellView *cellview = GTK_CELL_VIEW (widget);
+ GtkCellViewPrivate *priv = cellview->priv;
+
+ return gtk_cell_area_get_request_mode (priv->area);
+}
+
static void
gtk_cell_view_get_preferred_width (GtkWidget *widget,
gint *minimum_size,