aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2011-06-09 22:29:56 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2011-06-09 23:11:19 +0800
commitffae9a0909f5a12e510038840586044a77b7baec (patch)
tree21a5141eb756a6cafbee1ca0836db4901202bb38 /lib
parent0f61b9bd7ab89b70f1323f08b4f26a27b005d62a (diff)
downloadgsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.tar
gsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.tar.gz
gsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.tar.bz2
gsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.tar.lz
gsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.tar.xz
gsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.tar.zst
gsoc2013-epiphany-ffae9a0909f5a12e510038840586044a77b7baec.zip
Use GtkOrientable interface instead of deprecated V/H widgets
Gtk[HV]Box, Gtk[HV]Separator, Gtk[HV]Paned are deprecated in GTK+ 3.2, so let's use the GtkOrientable interface instead. GtkBox is likely to dissapear soon too, so a migration to GtkGrid might be necessary at some point. https://bugzilla.gnome.org/show_bug.cgi?id=652201
Diffstat (limited to 'lib')
-rw-r--r--lib/egg/egg-editable-toolbar.c8
-rw-r--r--lib/egg/egg-editable-toolbar.h4
-rw-r--r--lib/egg/egg-toolbar-editor.c8
-rw-r--r--lib/egg/egg-toolbar-editor.h4
-rw-r--r--lib/widgets/ephy-download-widget.c5
-rw-r--r--lib/widgets/ephy-download-widget.h4
-rw-r--r--lib/widgets/ephy-zoom-control.c3
7 files changed, 22 insertions, 14 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 6a686bd35..a9028aa9f 100644
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -84,7 +84,7 @@ struct _EggEditableToolbarPrivate
gchar *primary_name;
};
-G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_VBOX);
+G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_BOX);
static int
get_dock_position (EggEditableToolbar *etoolbar,
@@ -1031,7 +1031,7 @@ create_dock (EggEditableToolbar *etoolbar)
{
GtkWidget *toolbar, *hbox;
- hbox = gtk_hbox_new (0, FALSE);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
toolbar = gtk_toolbar_new ();
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
@@ -1385,6 +1385,8 @@ egg_editable_toolbar_init (EggEditableToolbar *etoolbar)
priv = etoolbar->priv = EGG_EDITABLE_TOOLBAR_GET_PRIVATE (etoolbar);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (etoolbar),
+ GTK_ORIENTATION_VERTICAL);
priv->save_hidden = TRUE;
g_signal_connect (etoolbar, "notify::visible",
@@ -1827,7 +1829,7 @@ new_separator_pixbuf (void)
GtkWidget *separator;
GdkPixbuf *pixbuf;
- separator = gtk_vseparator_new ();
+ separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
pixbuf = new_pixbuf_from_widget (separator);
return pixbuf;
}
diff --git a/lib/egg/egg-editable-toolbar.h b/lib/egg/egg-editable-toolbar.h
index b08f68a79..9f975b805 100644
--- a/lib/egg/egg-editable-toolbar.h
+++ b/lib/egg/egg-editable-toolbar.h
@@ -41,7 +41,7 @@ typedef struct _EggEditableToolbarClass EggEditableToolbarClass;
struct _EggEditableToolbar
{
- GtkVBox parent_object;
+ GtkBox parent_object;
/*< private >*/
EggEditableToolbarPrivate *priv;
@@ -49,7 +49,7 @@ struct _EggEditableToolbar
struct _EggEditableToolbarClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* action_request) (EggEditableToolbar *etoolbar,
const char *action_name);
diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c
index bf76ca8b2..0a2c503a3 100644
--- a/lib/egg/egg-toolbar-editor.c
+++ b/lib/egg/egg-toolbar-editor.c
@@ -71,7 +71,7 @@ struct EggToolbarEditorPrivate
gulong sig_handlers[SIGNAL_HANDLER_LIST_SIZE];
};
-G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_VBOX);
+G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_BOX);
static gint
compare_items (gconstpointer a,
@@ -456,7 +456,7 @@ editor_create_item (EggToolbarEditor *editor,
G_CALLBACK (drag_end_cb), NULL);
}
- vbox = gtk_vbox_new (0, FALSE);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (event_box), vbox);
@@ -547,7 +547,7 @@ append_table (GtkTable *table, GList *items, gint y, gint width)
if (y > 0)
{
- item = gtk_hseparator_new ();
+ item = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
alignment = gtk_alignment_new (0.5, 0.5, 1.0, 0.0);
gtk_container_add (GTK_CONTAINER (alignment), item);
gtk_widget_show (alignment);
@@ -667,6 +667,8 @@ egg_toolbar_editor_init (EggToolbarEditor *t)
{
t->priv = EGG_TOOLBAR_EDITOR_GET_PRIVATE (t);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (t),
+ GTK_ORIENTATION_VERTICAL);
t->priv->manager = NULL;
t->priv->actions_list = NULL;
diff --git a/lib/egg/egg-toolbar-editor.h b/lib/egg/egg-toolbar-editor.h
index ba6e1a999..038e19152 100644
--- a/lib/egg/egg-toolbar-editor.h
+++ b/lib/egg/egg-toolbar-editor.h
@@ -40,7 +40,7 @@ typedef struct EggToolbarEditorPrivate EggToolbarEditorPrivate;
struct EggToolbarEditor
{
- GtkVBox parent_object;
+ GtkBox parent_object;
/*< private >*/
EggToolbarEditorPrivate *priv;
@@ -48,7 +48,7 @@ struct EggToolbarEditor
struct EggToolbarEditorClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
};
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 4c8103fbd..e8353a94e 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -33,7 +33,7 @@
#include <glib/gi18n.h>
#include <webkit/webkit.h>
-G_DEFINE_TYPE (EphyDownloadWidget, ephy_download_widget, GTK_TYPE_HBOX)
+G_DEFINE_TYPE (EphyDownloadWidget, ephy_download_widget, GTK_TYPE_BOX)
#define DOWNLOAD_WIDGET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), EPHY_TYPE_DOWNLOAD_WIDGET, EphyDownloadWidgetPrivate))
@@ -399,6 +399,9 @@ static void
ephy_download_widget_init (EphyDownloadWidget *self)
{
self->priv = DOWNLOAD_WIDGET_PRIVATE (self);
+
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (self),
+ GTK_ORIENTATION_HORIZONTAL);
}
/**
diff --git a/lib/widgets/ephy-download-widget.h b/lib/widgets/ephy-download-widget.h
index f2a1d8826..b767e5e32 100644
--- a/lib/widgets/ephy-download-widget.h
+++ b/lib/widgets/ephy-download-widget.h
@@ -47,14 +47,14 @@ typedef struct _EphyDownloadWidgetPrivate EphyDownloadWidgetPrivate;
struct _EphyDownloadWidget
{
- GtkHBox parent;
+ GtkBox parent;
EphyDownloadWidgetPrivate *priv;
};
struct _EphyDownloadWidgetClass
{
- GtkHBoxClass parent_class;
+ GtkBoxClass parent_class;
};
GType ephy_download_widget_get_type (void) G_GNUC_CONST;
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index fc132d438..e16f91b15 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -116,7 +116,8 @@ ephy_zoom_control_init (EphyZoomControl *control)
i = ephy_zoom_get_zoom_level_index (p->zoom);
gtk_combo_box_set_active (combo, i);
- vbox = gtk_vbox_new (TRUE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_box_set_homogeneous (GTK_BOX (vbox), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (combo), TRUE, FALSE, 0);
gtk_widget_show (vbox);