diff options
author | Roy Zhang <[email protected]> | 2016-01-04 14:05:03 +0800 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-23 22:33:21 +0100 |
commit | 067dbe7b68fa625ea87ef6e259539fff2baaeaf7 (patch) | |
tree | 0dd7b2c62af9ee70409cc1c36111635274656e5c /applets | |
parent | 0f7314ea3db7411ae7827ec9bb89a2b485227f1a (diff) | |
download | mate-panel-067dbe7b68fa625ea87ef6e259539fff2baaeaf7.tar.bz2 mate-panel-067dbe7b68fa625ea87ef6e259539fff2baaeaf7.tar.xz |
Gtk3: Don't use deprecated gtk_misc_set_alignment
Diffstat (limited to 'applets')
-rw-r--r-- | applets/clock/clock-location-tile.c | 15 | ||||
-rw-r--r-- | applets/fish/fish.c | 5 | ||||
-rw-r--r-- | applets/notification_area/fixedtip.c | 5 | ||||
-rw-r--r-- | applets/notification_area/testtray.c | 10 |
4 files changed, 35 insertions, 0 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index b4c7c93f..173a3854 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -279,7 +279,12 @@ clock_location_tile_fill (ClockLocationTile *this) head_section = gtk_vbox_new (FALSE, 0); priv->city_label = gtk_label_new (NULL); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->city_label), 0.0); + gtk_label_set_yalign (GTK_LABEL (priv->city_label), 0.0); +#else gtk_misc_set_alignment (GTK_MISC (priv->city_label), 0, 0); +#endif align = gtk_alignment_new (0, 0, 0, 0); gtk_alignment_set_padding (GTK_ALIGNMENT (align), 0, 0, 0, 3); @@ -287,7 +292,12 @@ clock_location_tile_fill (ClockLocationTile *this) gtk_box_pack_start (GTK_BOX (head_section), align, FALSE, FALSE, 0); priv->time_label = gtk_label_new (NULL); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->time_label), 0.0); + gtk_label_set_yalign (GTK_LABEL (priv->time_label), 0.0); +#else gtk_misc_set_alignment (GTK_MISC (priv->time_label), 0, 0); +#endif priv->weather_icon = gtk_image_new (); align = gtk_alignment_new (0, 0, 0, 0); @@ -308,7 +318,12 @@ clock_location_tile_fill (ClockLocationTile *this) _("Set location as current location and use its timezone for this computer")); priv->current_marker = gtk_image_new_from_icon_name ("go-home", GTK_ICON_SIZE_BUTTON); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (priv->current_marker, GTK_ALIGN_END); + gtk_widget_set_valign (priv->current_marker, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (priv->current_marker), 1.0, 0.5); +#endif gtk_widget_set_no_show_all (priv->current_marker, TRUE); priv->current_spacer = gtk_event_box_new (); diff --git a/applets/fish/fish.c b/applets/fish/fish.c index 4562e65e..8986e9e1 100644 --- a/applets/fish/fish.c +++ b/applets/fish/fish.c @@ -892,8 +892,13 @@ static void display_fortune_dialog(FishApplet* fish) gtk_label_set_ellipsize (GTK_LABEL (fish->fortune_label), PANGO_ELLIPSIZE_MIDDLE); fish->fortune_cmd_label = gtk_label_new (""); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (fish->fortune_cmd_label), 0.0); + gtk_label_set_yalign (GTK_LABEL (fish->fortune_cmd_label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (fish->fortune_cmd_label), 0, 0.5); +#endif vbox = gtk_dialog_get_content_area (GTK_DIALOG (fish->fortune_dialog)); gtk_box_pack_start (GTK_BOX (vbox), diff --git a/applets/notification_area/fixedtip.c b/applets/notification_area/fixedtip.c index ded3dbb6..ce4852c9 100644 --- a/applets/notification_area/fixedtip.c +++ b/applets/notification_area/fixedtip.c @@ -136,7 +136,12 @@ na_fixed_tip_init (NaFixedTip *fixedtip) label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); +#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 gtk_widget_show (label); gtk_container_add (GTK_CONTAINER (fixedtip), label); fixedtip->priv->label = label; diff --git a/applets/notification_area/testtray.c b/applets/notification_area/testtray.c index f19663cd..4a2d0108 100644 --- a/applets/notification_area/testtray.c +++ b/applets/notification_area/testtray.c @@ -160,7 +160,12 @@ create_tray_on_screen (GdkScreen *screen, hbox = gtk_hbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new_with_mnemonic ("_Orientation:"); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); + gtk_label_set_yalign (GTK_LABEL (label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); combo = gtk_combo_box_text_new (); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Horizontal"); @@ -171,7 +176,12 @@ create_tray_on_screen (GdkScreen *screen, label = gtk_label_new (NULL); data->count_label = GTK_LABEL (label); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); + gtk_label_set_yalign (GTK_LABEL (label), 0.5); +#else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); data->tray = na_tray_new_for_screen (screen, GTK_ORIENTATION_HORIZONTAL); |