libgimp*: don't derive from GtkHBox and GtkVBox in libgimp either
I know this is not 100% compatible, but is in fact absolutely safe to change unless somebody is using the headers in ways that are totally wrong.
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
static void gimp_select_button_dispose (GObject *object);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpSelectButton, gimp_select_button, GTK_TYPE_HBOX)
|
||||
G_DEFINE_TYPE (GimpSelectButton, gimp_select_button, GTK_TYPE_BOX)
|
||||
|
||||
static void
|
||||
gimp_select_button_class_init (GimpSelectButtonClass *klass)
|
||||
@ -57,6 +57,9 @@ gimp_select_button_class_init (GimpSelectButtonClass *klass)
|
||||
static void
|
||||
gimp_select_button_init (GimpSelectButton *select_button)
|
||||
{
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (select_button),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
select_button->temp_callback = NULL;
|
||||
}
|
||||
|
||||
|
@ -42,16 +42,16 @@ typedef struct _GimpSelectButtonClass GimpSelectButtonClass;
|
||||
|
||||
struct _GimpSelectButton
|
||||
{
|
||||
GtkHBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
const gchar *temp_callback;
|
||||
};
|
||||
|
||||
struct _GimpSelectButtonClass
|
||||
{
|
||||
GtkHBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
gchar *default_title;
|
||||
gchar *default_title;
|
||||
|
||||
void (*select_destroy) (const gchar *callback);
|
||||
|
||||
|
@ -113,7 +113,7 @@ static void gimp_color_selection_update (GimpColorSelection *select
|
||||
UpdateType update);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpColorSelection, gimp_color_selection, GTK_TYPE_VBOX)
|
||||
G_DEFINE_TYPE (GimpColorSelection, gimp_color_selection, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_color_selection_parent_class
|
||||
|
||||
@ -161,6 +161,9 @@ gimp_color_selection_init (GimpColorSelection *selection)
|
||||
|
||||
selection->show_alpha = TRUE;
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (selection),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gimp_rgba_set (&selection->rgb, 0.0, 0.0, 0.0, 1.0);
|
||||
gimp_rgb_to_hsv (&selection->rgb, &selection->hsv);
|
||||
|
||||
|
@ -43,7 +43,7 @@ typedef struct _GimpColorSelectionClass GimpColorSelectionClass;
|
||||
|
||||
struct _GimpColorSelection
|
||||
{
|
||||
GtkVBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
gboolean show_alpha;
|
||||
|
||||
@ -63,7 +63,7 @@ struct _GimpColorSelection
|
||||
|
||||
struct _GimpColorSelectionClass
|
||||
{
|
||||
GtkVBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* color_changed) (GimpColorSelection *selection);
|
||||
|
||||
|
@ -55,7 +55,7 @@ enum
|
||||
};
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpColorSelector, gimp_color_selector, GTK_TYPE_VBOX)
|
||||
G_DEFINE_TYPE (GimpColorSelector, gimp_color_selector, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_color_selector_parent_class
|
||||
|
||||
@ -107,6 +107,9 @@ gimp_color_selector_init (GimpColorSelector *selector)
|
||||
selector->toggles_sensitive = TRUE;
|
||||
selector->show_alpha = TRUE;
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (selector),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gimp_rgba_set (&selector->rgb, 0.0, 0.0, 0.0, 1.0);
|
||||
gimp_rgb_to_hsv (&selector->rgb, &selector->hsv);
|
||||
|
||||
|
@ -64,7 +64,7 @@ typedef struct _GimpColorSelectorClass GimpColorSelectorClass;
|
||||
|
||||
struct _GimpColorSelector
|
||||
{
|
||||
GtkVBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
gboolean toggles_visible;
|
||||
gboolean toggles_sensitive;
|
||||
@ -78,11 +78,11 @@ struct _GimpColorSelector
|
||||
|
||||
struct _GimpColorSelectorClass
|
||||
{
|
||||
GtkVBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
const gchar *name;
|
||||
const gchar *help_id;
|
||||
const gchar *stock_id;
|
||||
const gchar *name;
|
||||
const gchar *help_id;
|
||||
const gchar *stock_id;
|
||||
|
||||
/* virtual functions */
|
||||
void (* set_toggles_visible) (GimpColorSelector *selector,
|
||||
|
@ -78,7 +78,7 @@ static void gimp_file_entry_browse_clicked (GtkWidget *widget,
|
||||
static void gimp_file_entry_check_filename (GimpFileEntry *entry);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpFileEntry, gimp_file_entry, GTK_TYPE_HBOX)
|
||||
G_DEFINE_TYPE (GimpFileEntry, gimp_file_entry, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_file_entry_parent_class
|
||||
|
||||
@ -119,6 +119,9 @@ gimp_file_entry_init (GimpFileEntry *entry)
|
||||
entry->check_valid = FALSE;
|
||||
entry->file_exists = NULL;
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (entry),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
gtk_box_set_spacing (GTK_BOX (entry), 4);
|
||||
gtk_box_set_homogeneous (GTK_BOX (entry), FALSE);
|
||||
|
||||
|
@ -45,7 +45,7 @@ typedef struct _GimpFileEntryClass GimpFileEntryClass;
|
||||
|
||||
struct _GimpFileEntry
|
||||
{
|
||||
GtkHBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
GtkWidget *file_exists;
|
||||
GtkWidget *entry;
|
||||
@ -60,7 +60,7 @@ struct _GimpFileEntry
|
||||
|
||||
struct _GimpFileEntryClass
|
||||
{
|
||||
GtkHBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* filename_changed) (GimpFileEntry *entry);
|
||||
|
||||
|
@ -35,14 +35,14 @@
|
||||
**/
|
||||
|
||||
|
||||
typedef GtkHBoxClass GimpHintBoxClass;
|
||||
typedef GtkBoxClass GimpHintBoxClass;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkHBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
gchar *stock_id;
|
||||
gchar *hint;
|
||||
gchar *stock_id;
|
||||
gchar *hint;
|
||||
} GimpHintBox;
|
||||
|
||||
#define GIMP_HINT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_HINT_BOX, GimpHintBox))
|
||||
@ -68,7 +68,7 @@ static void gimp_hint_box_get_property (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpHintBox, gimp_hint_box, GTK_TYPE_HBOX)
|
||||
G_DEFINE_TYPE (GimpHintBox, gimp_hint_box, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_hint_box_parent_class
|
||||
|
||||
@ -98,6 +98,9 @@ gimp_hint_box_class_init (GimpHintBoxClass *klass)
|
||||
static void
|
||||
gimp_hint_box_init (GimpHintBox *box)
|
||||
{
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (box),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
box->stock_id = NULL;
|
||||
box->hint = NULL;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ static void gimp_memsize_entry_unit_callback (GtkWidget *widget,
|
||||
GimpMemsizeEntry *entry);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpMemsizeEntry, gimp_memsize_entry, GTK_TYPE_HBOX)
|
||||
G_DEFINE_TYPE (GimpMemsizeEntry, gimp_memsize_entry, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_memsize_entry_parent_class
|
||||
|
||||
@ -87,6 +87,9 @@ gimp_memsize_entry_class_init (GimpMemsizeEntryClass *klass)
|
||||
static void
|
||||
gimp_memsize_entry_init (GimpMemsizeEntry *entry)
|
||||
{
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (entry),
|
||||
GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
gtk_box_set_spacing (GTK_BOX (entry), 4);
|
||||
|
||||
entry->value = 0;
|
||||
|
@ -41,23 +41,23 @@ typedef struct _GimpMemsizeEntryClass GimpMemsizeEntryClass;
|
||||
|
||||
struct _GimpMemsizeEntry
|
||||
{
|
||||
GtkHBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
/*< private >*/
|
||||
guint64 value;
|
||||
guint64 lower;
|
||||
guint64 upper;
|
||||
guint64 value;
|
||||
guint64 lower;
|
||||
guint64 upper;
|
||||
|
||||
guint shift;
|
||||
guint shift;
|
||||
|
||||
GtkAdjustment *adjustment;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *menu;
|
||||
GtkAdjustment *adjustment;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *menu;
|
||||
};
|
||||
|
||||
struct _GimpMemsizeEntryClass
|
||||
{
|
||||
GtkHBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* value_changed) (GimpMemsizeEntry *entry);
|
||||
|
||||
|
@ -127,7 +127,7 @@ static GdkPixbuf * gimp_page_selector_add_frame (GtkWidget *widget,
|
||||
GdkPixbuf *pixbuf);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpPageSelector, gimp_page_selector, GTK_TYPE_VBOX)
|
||||
G_DEFINE_TYPE (GimpPageSelector, gimp_page_selector, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_page_selector_parent_class
|
||||
|
||||
@ -235,6 +235,9 @@ gimp_page_selector_init (GimpPageSelector *selector)
|
||||
priv->n_pages = 0;
|
||||
priv->target = GIMP_PAGE_SELECTOR_TARGET_LAYERS;
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (selector),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gtk_box_set_spacing (GTK_BOX (selector), 12);
|
||||
|
||||
/* Pages */
|
||||
|
@ -40,14 +40,14 @@ typedef struct _GimpPageSelectorClass GimpPageSelectorClass;
|
||||
|
||||
struct _GimpPageSelector
|
||||
{
|
||||
GtkVBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
gpointer priv;
|
||||
};
|
||||
|
||||
struct _GimpPageSelectorClass
|
||||
{
|
||||
GtkVBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* selection_changed) (GimpPageSelector *selector);
|
||||
void (* activate) (GimpPageSelector *selector);
|
||||
|
@ -89,7 +89,7 @@ static void gimp_path_editor_writable_toggled (GtkCellRendererToggle *toggle
|
||||
GimpPathEditor *editor);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpPathEditor, gimp_path_editor, GTK_TYPE_VBOX)
|
||||
G_DEFINE_TYPE (GimpPathEditor, gimp_path_editor, GTK_TYPE_BOX)
|
||||
|
||||
#define parent_class gimp_path_editor_parent_class
|
||||
|
||||
@ -149,6 +149,9 @@ gimp_path_editor_init (GimpPathEditor *editor)
|
||||
editor->sel_path = NULL;
|
||||
editor->num_items = 0;
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
editor->upper_hbox = gtk_hbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (editor), editor->upper_hbox, FALSE, TRUE, 0);
|
||||
gtk_widget_show (editor->upper_hbox);
|
||||
|
@ -43,7 +43,7 @@ typedef struct _GimpPathEditorClass GimpPathEditorClass;
|
||||
|
||||
struct _GimpPathEditor
|
||||
{
|
||||
GtkVBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
GtkWidget *upper_hbox;
|
||||
|
||||
@ -66,7 +66,7 @@ struct _GimpPathEditor
|
||||
|
||||
struct _GimpPathEditorClass
|
||||
{
|
||||
GtkVBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
void (* path_changed) (GimpPathEditor *editor);
|
||||
void (* writable_changed) (GimpPathEditor *editor);
|
||||
|
@ -115,7 +115,7 @@ static void gimp_preview_real_untransform (GimpPreview *preview,
|
||||
|
||||
static guint preview_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GtkVBoxClass *parent_class = NULL;
|
||||
static GtkBoxClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
@ -138,7 +138,7 @@ gimp_preview_get_type (void)
|
||||
(GInstanceInitFunc) gimp_preview_init,
|
||||
};
|
||||
|
||||
preview_type = g_type_register_static (GTK_TYPE_VBOX,
|
||||
preview_type = g_type_register_static (GTK_TYPE_BOX,
|
||||
"GimpPreview",
|
||||
&preview_info,
|
||||
G_TYPE_FLAG_ABSTRACT);
|
||||
@ -203,6 +203,9 @@ gimp_preview_init (GimpPreview *preview)
|
||||
GtkWidget *frame;
|
||||
gdouble xalign = 0.0;
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (preview),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gtk_box_set_homogeneous (GTK_BOX (preview), FALSE);
|
||||
gtk_box_set_spacing (GTK_BOX (preview), 6);
|
||||
|
||||
|
@ -43,7 +43,7 @@ typedef struct _GimpPreviewClass GimpPreviewClass;
|
||||
|
||||
struct _GimpPreview
|
||||
{
|
||||
GtkVBox parent_instance;
|
||||
GtkBox parent_instance;
|
||||
|
||||
gboolean update_preview;
|
||||
|
||||
@ -65,7 +65,7 @@ struct _GimpPreview
|
||||
|
||||
struct _GimpPreviewClass
|
||||
{
|
||||
GtkVBoxClass parent_class;
|
||||
GtkBoxClass parent_class;
|
||||
|
||||
/* virtual methods */
|
||||
void (* draw) (GimpPreview *preview);
|
||||
|
Reference in New Issue
Block a user