summaryrefslogtreecommitdiff
path: root/gtk/gtkbin.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-04-05 18:10:41 -0400
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-04-05 18:10:41 -0400
commit52eabce3c4f298d2909f8d0e4227338feb0f5b4b (patch)
treea8854836f5c374ffa6db043e8ea992ee28385da8 /gtk/gtkbin.c
parent24ed2f8aa11c674f1a507200945a9b4f20ce3069 (diff)
downloadgtk+-52eabce3c4f298d2909f8d0e4227338feb0f5b4b.tar.gz
Revert "Implement extended layout for GtkBin"
This reverts commit 5e8045b14dde691fef5447b7ca483d95f9132b8a. Conflicts: gtk/gtkbin.c
Diffstat (limited to 'gtk/gtkbin.c')
-rw-r--r--gtk/gtkbin.c64
1 files changed, 2 insertions, 62 deletions
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index 0691588197..16f13794ee 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -21,12 +21,11 @@
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include "gtkbin.h"
-#include "gtkextendedlayout.h"
#include "gtkintl.h"
#include "gtkalias.h"
@@ -40,15 +39,8 @@ static void gtk_bin_forall (GtkContainer *container,
gpointer callback_data);
static GType gtk_bin_child_type (GtkContainer *container);
-static void gtk_bin_extended_layout_interface_init (GtkExtendedLayoutIface *iface);
-
-
-static GtkExtendedLayoutIface *parent_extended_layout_iface;
-
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GtkBin, gtk_bin, GTK_TYPE_CONTAINER,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_EXTENDED_LAYOUT,
- gtk_bin_extended_layout_interface_init))
+G_DEFINE_ABSTRACT_TYPE (GtkBin, gtk_bin, GTK_TYPE_CONTAINER)
static void
gtk_bin_class_init (GtkBinClass *class)
@@ -154,57 +146,5 @@ gtk_bin_get_child (GtkBin *bin)
return bin->child;
}
-static void
-gtk_bin_extended_layout_get_desired_size (GtkExtendedLayout *layout,
- GtkRequisition *minimum_size,
- GtkRequisition *natural_size)
-{
- GtkBin *bin = GTK_BIN (layout);
-
- if (bin->child && gtk_widget_get_visible (bin->child))
- gtk_widget_get_desired_size (bin->child, minimum_size, natural_size);
- else
- /* Just let GtkWidgetClass clear the values */
- parent_extended_layout_iface->get_desired_size (layout, minimum_size, natural_size);
-}
-
-static void
-gtk_bin_extended_layout_get_width_for_height (GtkExtendedLayout *layout,
- gint height,
- gint *minimum_width,
- gint *natural_width)
-{
- GtkWidget *child;
-
- child = gtk_bin_get_child (GTK_BIN (layout));
-
- gtk_extended_layout_get_width_for_height (GTK_EXTENDED_LAYOUT (child),
- height, minimum_width, natural_width);
-}
-
-static void
-gtk_bin_extended_layout_get_height_for_width (GtkExtendedLayout *layout,
- gint width,
- gint *minimum_height,
- gint *natural_height)
-{
- GtkWidget *child;
-
- child = gtk_bin_get_child (GTK_BIN (layout));
-
- gtk_extended_layout_get_height_for_width (GTK_EXTENDED_LAYOUT (child),
- width, minimum_height, natural_height);
-}
-
-static void
-gtk_bin_extended_layout_interface_init (GtkExtendedLayoutIface *iface)
-{
- parent_extended_layout_iface = g_type_interface_peek_parent (iface);
-
- iface->get_desired_size = gtk_bin_extended_layout_get_desired_size;
- iface->get_height_for_width = gtk_bin_extended_layout_get_height_for_width;
- iface->get_width_for_height = gtk_bin_extended_layout_get_width_for_height;
-}
-
#define __GTK_BIN_C__
#include "gtkaliasdef.c"