Skip to content

Commit

Permalink
fix dprecated GtkMisc
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfgang Ulbrich committed Jan 25, 2016
1 parent e40b789 commit d01ea18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ui/fixedtip.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ meta_fixed_tip_show (int screen_number,

label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (label), 0.5);
gtk_label_set_yalign (GTK_LABEL (label), 0.5);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/ui/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static GtkWidget* menu_item_new(MenuItem* menuitem, int workspace_id)
meta_core_get_menu_accelerator (menuitem->op, workspace_id, &key, &mods);

accel_label = meta_accel_label_new_with_mnemonic (i18n_label);
#if GTK_CHECK_VERSION (3, 14, 0)
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (accel_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (accel_label), 0.0, 0.5);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/tabpopup.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
gtk_misc_set_padding (GTK_MISC (image),
INSIDE_SELECT_RECT + OUTSIDE_SELECT_RECT + 1,
INSIDE_SELECT_RECT + OUTSIDE_SELECT_RECT + 1);
#if GTK_CHECK_VERSION (3, 14, 0)
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
#else
Expand Down
5 changes: 5 additions & 0 deletions src/ui/theme-viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,12 @@ menu_contents (void)
{
char *str = g_strdup_printf (_("Fake menu item %d\n"), i + 1);
mi = gtk_label_new (str);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (image, GTK_ALIGN_START);
gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
#else
gtk_misc_set_alignment (GTK_MISC (mi), 0.0, 0.5);
#endif
g_free (str);
gtk_box_pack_start (GTK_BOX (vbox), mi, FALSE, FALSE, 0);

Expand Down

0 comments on commit d01ea18

Please sign in to comment.