diff options
author | monsta <[email protected]> | 2016-01-20 14:23:21 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-20 14:23:21 +0300 |
commit | 08d2a1e2280991796805f34cb76ace948c6b7bbf (patch) | |
tree | a810e66c4385418caa11333e1e157d765b146c84 /mate-volume-control | |
parent | 3447078bdbfc279c92f09f4bcb102d73e220cd41 (diff) | |
download | mate-media-08d2a1e2280991796805f34cb76ace948c6b7bbf.tar.bz2 mate-media-08d2a1e2280991796805f34cb76ace948c6b7bbf.tar.xz |
[GTK+3] fix deprecated usage of GtkMisc
Diffstat (limited to 'mate-volume-control')
-rw-r--r-- | mate-volume-control/gvc-balance-bar.c | 5 | ||||
-rw-r--r-- | mate-volume-control/gvc-channel-bar.c | 31 | ||||
-rw-r--r-- | mate-volume-control/gvc-combo-box.c | 6 |
3 files changed, 38 insertions, 4 deletions
diff --git a/mate-volume-control/gvc-balance-bar.c b/mate-volume-control/gvc-balance-bar.c index c7f8919..4177613 100644 --- a/mate-volume-control/gvc-balance-bar.c +++ b/mate-volume-control/gvc-balance-bar.c @@ -358,7 +358,12 @@ gvc_balance_bar_set_balance_type (GvcBalanceBar *bar, GvcBalanceType btype) break; } +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0); + gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.0); +#else gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.0); +#endif /* Frame */ frame = gtk_frame_new (NULL); diff --git a/mate-volume-control/gvc-channel-bar.c b/mate-volume-control/gvc-channel-bar.c index a9cba92..6a53d03 100644 --- a/mate-volume-control/gvc-channel-bar.c +++ b/mate-volume-control/gvc-channel-bar.c @@ -349,15 +349,33 @@ update_marks (GvcChannelBar *bar) if (has_mark) { gtk_alignment_set (GTK_ALIGNMENT (bar->priv->mute_box), 0.5, 0, 0, 0); - gtk_misc_set_alignment (GTK_MISC (bar->priv->low_image), 0.5, 0); - gtk_misc_set_alignment (GTK_MISC (bar->priv->high_image), 0.5, 0); - gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0, 0); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (bar->priv->low_image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (bar->priv->low_image, GTK_ALIGN_START); + gtk_widget_set_halign (bar->priv->high_image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (bar->priv->high_image, GTK_ALIGN_START); + gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0); + gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.0); +#else + gtk_misc_set_alignment (GTK_MISC (bar->priv->low_image), 0.5, 0.0); + gtk_misc_set_alignment (GTK_MISC (bar->priv->high_image), 0.5, 0.0); + gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.0); +#endif } else { gtk_alignment_set (GTK_ALIGNMENT (bar->priv->mute_box), 0.5, 0.5, 0, 0); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (bar->priv->low_image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (bar->priv->low_image, GTK_ALIGN_CENTER); + gtk_widget_set_halign (bar->priv->high_image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (bar->priv->high_image, GTK_ALIGN_CENTER); + gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0); + gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (bar->priv->low_image), 0.5, 0.5); gtk_misc_set_alignment (GTK_MISC (bar->priv->high_image), 0.5, 0.5); - gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5); +#endif } } @@ -1114,7 +1132,12 @@ gvc_channel_bar_init (GvcChannelBar *bar) gtk_widget_set_no_show_all (bar->priv->high_image, TRUE); bar->priv->label = gtk_label_new (NULL); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0); + gtk_label_set_yalign (GTK_LABEL (bar->priv->label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5); +#endif gtk_widget_set_no_show_all (bar->priv->label, TRUE); /* Frame */ diff --git a/mate-volume-control/gvc-combo-box.c b/mate-volume-control/gvc-combo-box.c index c43f05d..29e49b5 100644 --- a/mate-volume-control/gvc-combo-box.c +++ b/mate-volume-control/gvc-combo-box.c @@ -354,7 +354,13 @@ gvc_combo_box_init (GvcComboBox *combobox) combobox->priv->combobox = gtk_combo_box_new_with_model (combobox->priv->model); combobox->priv->label = gtk_label_new (NULL); + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_label_set_xalign (GTK_LABEL (combobox->priv->label), 0.0); + gtk_label_set_yalign (GTK_LABEL (combobox->priv->label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (combobox->priv->label), 0.0, 0.5); +#endif gtk_label_set_mnemonic_widget (GTK_LABEL (combobox->priv->label), combobox->priv->combobox); |