Fix a few deprecation warnings

This commit is contained in:
Přemysl Eric Janouch 2015-01-20 07:41:54 +01:00
parent 5b16953a2f
commit e1225accf4
3 changed files with 13 additions and 7 deletions

View File

@ -57,7 +57,7 @@ ld_category_view_init (LdCategoryViewInterface *iface)
} }
G_DEFINE_TYPE_WITH_CODE (LdCategoryTreeView, 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)); G_IMPLEMENT_INTERFACE (LD_TYPE_CATEGORY_VIEW, ld_category_view_init));
static void static void
@ -80,6 +80,7 @@ ld_category_tree_view_init (LdCategoryTreeView *self)
{ {
self->priv = G_TYPE_INSTANCE_GET_PRIVATE self->priv = G_TYPE_INSTANCE_GET_PRIVATE
(self, LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeViewPrivate); (self, LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeViewPrivate);
gtk_orientable_set_orientation (GTK_ORIENTABLE (self), GTK_ORIENTATION_VERTICAL);
} }
static void static void
@ -136,8 +137,13 @@ create_empty_label (void)
label = gtk_label_new (_("Empty")); label = gtk_label_new (_("Empty"));
gtk_widget_set_sensitive (label, FALSE); 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 (); attr = pango_attr_list_new ();
pango_attr_list_change (attr, pango_attr_style_new (PANGO_STYLE_ITALIC)); pango_attr_list_change (attr, pango_attr_style_new (PANGO_STYLE_ITALIC));

View File

@ -37,14 +37,14 @@ typedef struct _LdCategoryTreeViewClass LdCategoryTreeViewClass;
struct _LdCategoryTreeView struct _LdCategoryTreeView
{ {
/*< private >*/ /*< private >*/
GtkVBox parent_instance; GtkBox parent_instance;
LdCategoryTreeViewPrivate *priv; LdCategoryTreeViewPrivate *priv;
}; };
struct _LdCategoryTreeViewClass struct _LdCategoryTreeViewClass
{ {
/*< private >*/ /*< private >*/
GtkVBoxClass parent_class; GtkBoxClass parent_class;
}; };

View File

@ -299,7 +299,7 @@ ld_window_main_init (LdWindowMain *self)
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (priv->lv_window), priv->lv_viewport); 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), gtk_paned_pack1 (GTK_PANED (priv->paned),
priv->lv_window, FALSE, FALSE); priv->lv_window, FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (priv->paned), 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); gtk_paned_set_position (GTK_PANED (priv->paned), 180);
/* Pack all widgets into the window. */ /* 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->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->toolbar, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->paned, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (priv->vbox), priv->paned, TRUE, TRUE, 0);