GtkColorSel: derive from GtkBox, not GtkVBox

This commit is contained in:
Matthias Clasen 2011-06-07 18:34:34 -04:00
parent 8a5e1fe543
commit 5df02faa5f
2 changed files with 8 additions and 4 deletions

View File

@ -33,6 +33,7 @@
#include <string.h>
#include "gdk/gdk.h"
#include "gtkorientable.h"
#include "gtkhsv.h"
#include "gtkwindow.h"
#include "gtkselection.h"
@ -298,7 +299,7 @@ static const guchar dropper_bits[] = {
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
G_DEFINE_TYPE (GtkColorSelection, gtk_color_selection, GTK_TYPE_VBOX)
G_DEFINE_TYPE (GtkColorSelection, gtk_color_selection, GTK_TYPE_BOX)
static void
gtk_color_selection_class_init (GtkColorSelectionClass *klass)
@ -394,6 +395,9 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
AtkObject *atk_obj;
GList *focus_chain = NULL;
gtk_orientable_set_orientation (GTK_ORIENTABLE (colorsel),
GTK_ORIENTATION_VERTICAL);
gtk_widget_push_composite_child ();
priv = colorsel->private_data = G_TYPE_INSTANCE_GET_PRIVATE (colorsel, GTK_TYPE_COLOR_SELECTION, GtkColorSelectionPrivate);

View File

@ -33,7 +33,7 @@
#define __GTK_COLOR_SELECTION_H__
#include <gtk/gtkdialog.h>
#include <gtk/gtkvbox.h>
#include <gtk/gtkbox.h>
G_BEGIN_DECLS
@ -66,7 +66,7 @@ typedef void (* GtkColorSelectionChangePaletteWithScreenFunc) (GdkScreen
struct _GtkColorSelection
{
GtkVBox parent_instance;
GtkBox parent_instance;
/* < private_data > */
GtkColorSelectionPrivate *private_data;
@ -74,7 +74,7 @@ struct _GtkColorSelection
struct _GtkColorSelectionClass
{
GtkVBoxClass parent_class;
GtkBoxClass parent_class;
void (*color_changed) (GtkColorSelection *color_selection);