[vinagre] Adapt to new gtk width-for-height geometry



commit a047acd00762c2048cb57eb66f7c313a627a9ccc
Author: Jonh Wendell <jwendell gnome org>
Date:   Wed Nov 24 14:15:50 2010 -0300

    Adapt to new gtk width-for-height geometry

 vinagre/view/ovBox.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/view/ovBox.c b/vinagre/view/ovBox.c
index 1c80fe5..4159f13 100644
--- a/vinagre/view/ovBox.c
+++ b/vinagre/view/ovBox.c
@@ -505,6 +505,30 @@ ViewOvBoxSizeRequest(GtkWidget *widget,           // IN
    requisition->height = MAX(underR.height + min, priv->overR.height);
 }
 
+static void
+ViewOvBox_get_preferred_width (GtkWidget *widget,
+                               gint      *minimal_width,
+                               gint      *natural_width)
+{
+  GtkRequisition requisition;
+
+  ViewOvBoxSizeRequest (widget, &requisition);
+
+  *minimal_width = *natural_width = requisition.width;
+}
+
+static void
+ViewOvBox_get_preferred_height (GtkWidget *widget,
+                                gint      *minimal_height,
+                                gint      *natural_height)
+{
+  GtkRequisition requisition;
+
+  ViewOvBoxSizeRequest (widget, &requisition);
+
+  *minimal_height = *natural_height = requisition.height;
+}
+
 
 /*
  *-----------------------------------------------------------------------------
@@ -685,7 +709,8 @@ ViewOvBoxClassInit(ViewOvBoxClass *klass) // IN
    widgetClass->unmap = ViewOvBoxUnmap;
    widgetClass->realize = ViewOvBoxRealize;
    widgetClass->unrealize = ViewOvBoxUnrealize;
-   widgetClass->size_request = ViewOvBoxSizeRequest;
+   widgetClass->get_preferred_width = ViewOvBox_get_preferred_width;
+   widgetClass->get_preferred_height = ViewOvBox_get_preferred_height;
    widgetClass->size_allocate = ViewOvBoxSizeAllocate;
    widgetClass->style_set = ViewOvBoxStyleSet;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]