[glade] Converted GladeBaseEditor, GladeDesignView and GladePalette to be GtkBox subclasses
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Converted GladeBaseEditor, GladeDesignView and GladePalette to be GtkBox subclasses
- Date: Tue, 7 May 2013 05:34:38 +0000 (UTC)
commit 2fb4d177019ccc7eed107a9dbf199a61da3c9dba
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Tue May 7 14:14:09 2013 +0900
Converted GladeBaseEditor, GladeDesignView and GladePalette to be GtkBox subclasses
Avoids deprecation warnings from GtkVBox.
gladeui/glade-base-editor.c | 5 ++++-
gladeui/glade-base-editor.h | 4 ++--
gladeui/glade-design-view.c | 4 +++-
gladeui/glade-design-view.h | 4 ++--
gladeui/glade-palette.c | 5 ++++-
gladeui/glade-palette.h | 4 ++--
6 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index aecf053..20179cf 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) 2006 Juan Pablo Ugarte.
*
@@ -113,7 +114,7 @@ enum
N_PROPERTIES
};
-G_DEFINE_TYPE (GladeBaseEditor, glade_base_editor, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (GladeBaseEditor, glade_base_editor, GTK_TYPE_BOX)
static GParamSpec *properties[N_PROPERTIES];
static guint glade_base_editor_signals[LAST_SIGNAL] = { 0 };
@@ -1702,6 +1703,8 @@ glade_base_editor_init (GladeBaseEditor *editor)
GtkWidget *paned, *hbox, *vbox, *tree_vbox, *scroll, *button_table, *button,
*label;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
+ GTK_ORIENTATION_VERTICAL);
gtk_box_set_spacing (GTK_BOX (editor), 8);
e = editor->priv = g_new0 (GladeBaseEditorPrivate, 1);
diff --git a/gladeui/glade-base-editor.h b/gladeui/glade-base-editor.h
index 59b0be4..f631c8d 100644
--- a/gladeui/glade-base-editor.h
+++ b/gladeui/glade-base-editor.h
@@ -40,14 +40,14 @@ typedef struct _GladeBaseEditorClass GladeBaseEditorClass;
struct _GladeBaseEditor
{
- GtkVBox parent;
+ GtkBox parent;
GladeBaseEditorPrivate *priv;
};
struct _GladeBaseEditorClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (*child_selected) (GladeBaseEditor *, GladeWidget *);
gboolean (*change_type) (GladeBaseEditor *, GladeWidget *, GType);
diff --git a/gladeui/glade-design-view.c b/gladeui/glade-design-view.c
index d4a3055..d696d31 100644
--- a/gladeui/glade-design-view.c
+++ b/gladeui/glade-design-view.c
@@ -69,7 +69,7 @@ struct _GladeDesignViewPrivate
static GtkVBoxClass *parent_class = NULL;
-G_DEFINE_TYPE (GladeDesignView, glade_design_view, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (GladeDesignView, glade_design_view, GTK_TYPE_BOX)
static void
glade_design_layout_scroll (GladeDesignView *view, gint x, gint y, gint w, gint h)
@@ -360,6 +360,8 @@ glade_design_view_init (GladeDesignView *view)
view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
gtk_widget_set_no_show_all (GTK_WIDGET (view), TRUE);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (view),
+ GTK_ORIENTATION_VERTICAL);
view->priv->project = NULL;
view->priv->layout_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
diff --git a/gladeui/glade-design-view.h b/gladeui/glade-design-view.h
index 0f6fe97..950ec45 100644
--- a/gladeui/glade-design-view.h
+++ b/gladeui/glade-design-view.h
@@ -45,14 +45,14 @@ typedef struct _GladeDesignViewClass GladeDesignViewClass;
struct _GladeDesignView
{
- GtkVBox parent_instance;
+ GtkBox parent_instance;
GladeDesignViewPrivate *priv;
};
struct _GladeDesignViewClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* glade_reserved1) (void);
void (* glade_reserved2) (void);
diff --git a/gladeui/glade-palette.c b/gladeui/glade-palette.c
index c57bea1..811f935 100644
--- a/gladeui/glade-palette.c
+++ b/gladeui/glade-palette.c
@@ -99,7 +99,7 @@ static void glade_palette_update_appearance (GladePalette *palette);
static void palette_item_toggled_cb (GtkToggleToolButton *button,
GladePalette *palette);
-G_DEFINE_TYPE (GladePalette, glade_palette, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (GladePalette, glade_palette, GTK_TYPE_BOX)
/*******************************************************
@@ -652,6 +652,9 @@ glade_palette_init (GladePalette * palette)
GladePalettePrivate *priv;
GtkWidget *sw;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (palette),
+ GTK_ORIENTATION_VERTICAL);
+
priv = palette->priv = GLADE_PALETTE_GET_PRIVATE (palette);
priv->button_table = g_hash_table_new (g_str_hash, g_str_equal);
diff --git a/gladeui/glade-palette.h b/gladeui/glade-palette.h
index 0e4bfac..586b714 100644
--- a/gladeui/glade-palette.h
+++ b/gladeui/glade-palette.h
@@ -47,14 +47,14 @@ typedef struct _GladePaletteClass GladePaletteClass;
struct _GladePalette
{
- GtkVBox parent_instance;
+ GtkBox parent_instance;
GladePalettePrivate *priv;
};
struct _GladePaletteClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* refresh) (GladePalette *palette);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]