[gtk+/kill-size-request] Removed size_request from GtkNotebook
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/kill-size-request] Removed size_request from GtkNotebook
- Date: Wed, 27 Oct 2010 05:39:47 +0000 (UTC)
commit 9a80908c91e3c83c8c4aaf09b38bada36b32fe9c
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed Oct 27 14:35:04 2010 +0900
Removed size_request from GtkNotebook
gtk/gtknotebook.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 2827645..5a765ea 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -333,6 +333,12 @@ static void gtk_notebook_realize (GtkWidget *widget);
static void gtk_notebook_unrealize (GtkWidget *widget);
static void gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition);
+static void gtk_notebook_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural);
+static void gtk_notebook_get_preferred_height(GtkWidget *widget,
+ gint *minimum,
+ gint *natural);
static void gtk_notebook_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gint gtk_notebook_draw (GtkWidget *widget,
@@ -635,7 +641,8 @@ gtk_notebook_class_init (GtkNotebookClass *class)
widget_class->unmap = gtk_notebook_unmap;
widget_class->realize = gtk_notebook_realize;
widget_class->unrealize = gtk_notebook_unrealize;
- widget_class->size_request = gtk_notebook_size_request;
+ widget_class->get_preferred_width = gtk_notebook_get_preferred_width;
+ widget_class->get_preferred_height = gtk_notebook_get_preferred_height;
widget_class->size_allocate = gtk_notebook_size_allocate;
widget_class->draw = gtk_notebook_draw;
widget_class->button_press_event = gtk_notebook_button_press;
@@ -2209,6 +2216,31 @@ gtk_notebook_size_request (GtkWidget *widget,
}
}
+
+static void
+gtk_notebook_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
+{
+ GtkRequisition requisition;
+
+ gtk_notebook_size_request (widget, &requisition);
+
+ *minimum = *natural = requisition.width;
+}
+
+static void
+gtk_notebook_get_preferred_height (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
+{
+ GtkRequisition requisition;
+
+ gtk_notebook_size_request (widget, &requisition);
+
+ *minimum = *natural = requisition.height;
+}
+
static void
gtk_notebook_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]