[libpeas] No longer use Gtk[HV]Box as it is deprecated
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] No longer use Gtk[HV]Box as it is deprecated
- Date: Sun, 12 Jun 2011 19:15:14 +0000 (UTC)
commit 394c8d940d8eae42afb30f00e9c2c366fbcfcda3
Author: Garrett Regier <alias301 gmail com>
Date: Sat Jun 11 15:37:15 2011 -0700
No longer use Gtk[HV]Box as it is deprecated
libpeas-gtk/peas-gtk-plugin-manager.c | 17 ++++++++++-------
libpeas-gtk/peas-gtk-plugin-manager.h | 4 ++--
peas-demo/peas-demo-window.c | 3 ++-
peas-demo/peas-demo.c | 4 ++--
4 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager.c b/libpeas-gtk/peas-gtk-plugin-manager.c
index 73ff7f9..1a05481 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager.c
@@ -76,7 +76,7 @@ enum {
PROP_VIEW
};
-G_DEFINE_TYPE (PeasGtkPluginManager, peas_gtk_plugin_manager, GTK_TYPE_VBOX);
+G_DEFINE_TYPE (PeasGtkPluginManager, peas_gtk_plugin_manager, GTK_TYPE_BOX);
static gboolean
plugin_is_configurable (PeasGtkPluginManager *pm,
@@ -243,13 +243,14 @@ show_configure_cb (GtkWidget *widget,
if (peas_plugin_info_get_help_uri (info) != NULL)
{
- GtkWidget *buttonbox;
+ GtkWidget *hbuttonbox;
GtkWidget *help_button;
- buttonbox = gtk_dialog_get_action_area (GTK_DIALOG (conf_dlg));
+ hbuttonbox = gtk_dialog_get_action_area (GTK_DIALOG (conf_dlg));
help_button = gtk_button_new_from_stock (GTK_STOCK_HELP);
- gtk_container_add (GTK_CONTAINER (buttonbox), help_button);
- gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (buttonbox), help_button, TRUE);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox), help_button);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (hbuttonbox),
+ help_button, TRUE);
g_signal_connect (help_button,
"clicked",
@@ -344,6 +345,8 @@ peas_gtk_plugin_manager_init (PeasGtkPluginManager *pm)
"PeasGtk", "1.0", 0, NULL);
gtk_box_set_spacing (GTK_BOX (pm), 6);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (pm),
+ GTK_ORIENTATION_VERTICAL);
gtk_widget_push_composite_child ();
@@ -354,9 +357,9 @@ peas_gtk_plugin_manager_init (PeasGtkPluginManager *pm)
GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (pm), pm->priv->sw, TRUE, TRUE, 0);
- hbuttonbox = gtk_hbutton_box_new ();
- gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_END);
+ hbuttonbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing (GTK_BOX (hbuttonbox), 6);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox), GTK_BUTTONBOX_END);
gtk_box_pack_start (GTK_BOX (pm), hbuttonbox, FALSE, FALSE, 0);
pm->priv->about_button = gtk_button_new_from_stock (GTK_STOCK_ABOUT);
diff --git a/libpeas-gtk/peas-gtk-plugin-manager.h b/libpeas-gtk/peas-gtk-plugin-manager.h
index a5bf89c..eb868ca 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager.h
+++ b/libpeas-gtk/peas-gtk-plugin-manager.h
@@ -43,7 +43,7 @@ typedef struct _PeasGtkPluginManagerPrivate PeasGtkPluginManagerPrivate;
struct _PeasGtkPluginManager
{
- GtkVBox vbox;
+ GtkBox box;
/*< private > */
PeasGtkPluginManagerPrivate *priv;
@@ -51,7 +51,7 @@ struct _PeasGtkPluginManager
struct _PeasGtkPluginManagerClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
gpointer padding[8];
};
diff --git a/peas-demo/peas-demo-window.c b/peas-demo/peas-demo-window.c
index 3b7f01c..eed5967 100644
--- a/peas-demo/peas-demo-window.c
+++ b/peas-demo/peas-demo-window.c
@@ -51,7 +51,8 @@ demo_window_init (DemoWindow *dw)
DemoWindowClass *klass = DEMO_WINDOW_GET_CLASS (dw);
gchar *label;
- dw->box = gtk_vbox_new (TRUE, 6);
+ dw->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_box_set_homogeneous (GTK_BOX (dw->box), TRUE);
gtk_container_add (GTK_CONTAINER (dw), dw->box);
label = g_strdup_printf ("Peas Window %d", ++(klass->n_windows));
diff --git a/peas-demo/peas-demo.c b/peas-demo/peas-demo.c
index 78d5644..fd14f0a 100644
--- a/peas-demo/peas-demo.c
+++ b/peas-demo/peas-demo.c
@@ -65,13 +65,13 @@ create_main_window (void)
gtk_window_set_has_resize_grip (GTK_WINDOW (window), FALSE);
- box = gtk_vbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (window), box);
manager = peas_gtk_plugin_manager_new (peas_engine_get_default ());
gtk_box_pack_start (GTK_BOX (box), manager, TRUE, TRUE, 0);
- button_box = gtk_hbutton_box_new ();
+ button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_set_spacing (GTK_BOX (button_box), 6);
gtk_button_box_set_layout (GTK_BUTTON_BOX (button_box), GTK_BUTTONBOX_END);
gtk_box_pack_start (GTK_BOX (box), button_box, FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]