aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-01-20 07:41:54 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-01-20 07:41:54 +0100
commite1225accf47ce3dcff0b811b8793d8898e78f9e9 (patch)
tree648be4f537684d1529c36105d90ae9eb362e7e76
parent5b16953a2f6d7fbd6e0c62b8bb793afae0f59de2 (diff)
downloadlogdiag-e1225accf47ce3dcff0b811b8793d8898e78f9e9.tar.gz
logdiag-e1225accf47ce3dcff0b811b8793d8898e78f9e9.tar.xz
logdiag-e1225accf47ce3dcff0b811b8793d8898e78f9e9.zip
Fix a few deprecation warnings
-rw-r--r--liblogdiag/ld-category-tree-view.c12
-rw-r--r--liblogdiag/ld-category-tree-view.h4
-rw-r--r--src/ld-window-main.c4
3 files changed, 13 insertions, 7 deletions
diff --git a/liblogdiag/ld-category-tree-view.c b/liblogdiag/ld-category-tree-view.c
index 18112c2..4fc0d6c 100644
--- a/liblogdiag/ld-category-tree-view.c
+++ b/liblogdiag/ld-category-tree-view.c
@@ -57,7 +57,7 @@ ld_category_view_init (LdCategoryViewInterface *iface)
}
G_DEFINE_TYPE_WITH_CODE (LdCategoryTreeView,
- ld_category_tree_view, GTK_TYPE_VBOX,
+ ld_category_tree_view, GTK_TYPE_BOX,
G_IMPLEMENT_INTERFACE (LD_TYPE_CATEGORY_VIEW, ld_category_view_init));
static void
@@ -80,6 +80,7 @@ ld_category_tree_view_init (LdCategoryTreeView *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE
(self, LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeViewPrivate);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (self), GTK_ORIENTATION_VERTICAL);
}
static void
@@ -136,8 +137,13 @@ create_empty_label (void)
label = gtk_label_new (_("Empty"));
gtk_widget_set_sensitive (label, FALSE);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label), 5, 0);
+
+ gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+ gtk_widget_set_margin_left (label, 5);
+ gtk_widget_set_margin_right (label, 5);
+ gtk_widget_set_margin_top (label, 5);
+ gtk_widget_set_margin_bottom (label, 5);
attr = pango_attr_list_new ();
pango_attr_list_change (attr, pango_attr_style_new (PANGO_STYLE_ITALIC));
diff --git a/liblogdiag/ld-category-tree-view.h b/liblogdiag/ld-category-tree-view.h
index b222a0a..f99314d 100644
--- a/liblogdiag/ld-category-tree-view.h
+++ b/liblogdiag/ld-category-tree-view.h
@@ -37,14 +37,14 @@ typedef struct _LdCategoryTreeViewClass LdCategoryTreeViewClass;
struct _LdCategoryTreeView
{
/*< private >*/
- GtkVBox parent_instance;
+ GtkBox parent_instance;
LdCategoryTreeViewPrivate *priv;
};
struct _LdCategoryTreeViewClass
{
/*< private >*/
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
};
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index d74fb7d..94cb1c7 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -299,7 +299,7 @@ ld_window_main_init (LdWindowMain *self)
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (priv->lv_window), priv->lv_viewport);
- priv->paned = gtk_hpaned_new ();
+ priv->paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_pack1 (GTK_PANED (priv->paned),
priv->lv_window, FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (priv->paned),
@@ -307,7 +307,7 @@ ld_window_main_init (LdWindowMain *self)
gtk_paned_set_position (GTK_PANED (priv->paned), 180);
/* Pack all widgets into the window. */
- priv->vbox = gtk_vbox_new (FALSE, 0);
+ priv->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->menu, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->toolbar, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->paned, TRUE, TRUE, 0);