[gimp] libgimpwidgets: fix GimpFrame's child allocation for GSEAL_ENABLE
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: fix GimpFrame's child allocation for GSEAL_ENABLE
- Date: Mon, 18 Oct 2010 14:42:35 +0000 (UTC)
commit d831b9a3533ea41a3572e0c084b6b7380bf40673
Author: Michael Natterer <mitch gimp org>
Date: Mon Oct 18 16:40:47 2010 +0200
libgimpwidgets: fix GimpFrame's child allocation for GSEAL_ENABLE
Don't override GtkFrame::compute_child_allocation() because we
completely override all functions that call this virtual function
anyway. Consequently, there is no need to store the child's allocation
in the sealed frame->child_allocation.
libgimpwidgets/gimpframe.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/libgimpwidgets/gimpframe.c b/libgimpwidgets/gimpframe.c
index 8495052..39dbb25 100644
--- a/libgimpwidgets/gimpframe.c
+++ b/libgimpwidgets/gimpframe.c
@@ -23,8 +23,6 @@
#include <string.h>
-#undef GSEAL_ENABLE
-
#include <gtk/gtk.h>
#include "gimpwidgetstypes.h"
@@ -53,12 +51,12 @@ static void gimp_frame_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gimp_frame_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gimp_frame_child_allocate (GtkFrame *frame,
- GtkAllocation *allocation);
static void gimp_frame_style_set (GtkWidget *widget,
GtkStyle *previous);
static gboolean gimp_frame_expose_event (GtkWidget *widget,
GdkEventExpose *event);
+static void gimp_frame_child_allocate (GtkFrame *frame,
+ GtkAllocation *allocation);
static void gimp_frame_label_widget_notify (GtkFrame *frame);
static gint gimp_frame_get_indent (GtkWidget *widget);
static gint gimp_frame_get_label_spacing (GtkFrame *frame);
@@ -73,15 +71,12 @@ static void
gimp_frame_class_init (GimpFrameClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GtkFrameClass *frame_class = GTK_FRAME_CLASS (klass);
widget_class->size_request = gimp_frame_size_request;
widget_class->size_allocate = gimp_frame_size_allocate;
widget_class->style_set = gimp_frame_style_set;
widget_class->expose_event = gimp_frame_expose_event;
- frame_class->compute_child_allocation = gimp_frame_child_allocate;
-
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("label-bold",
NULL, NULL,
@@ -148,16 +143,17 @@ static void
gimp_frame_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
- GtkFrame *frame = GTK_FRAME (widget);
- GtkWidget *label_widget = gtk_frame_get_label_widget (frame);
- GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
+ GtkFrame *frame = GTK_FRAME (widget);
+ GtkWidget *label_widget = gtk_frame_get_label_widget (frame);
+ GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
+ GtkAllocation child_allocation;
gtk_widget_set_allocation (widget, allocation);
- gimp_frame_child_allocate (frame, &frame->child_allocation);
+ gimp_frame_child_allocate (frame, &child_allocation);
if (child && gtk_widget_get_visible (child))
- gtk_widget_size_allocate (child, &frame->child_allocation);
+ gtk_widget_size_allocate (child, &child_allocation);
if (label_widget && gtk_widget_get_visible (label_widget))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]