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/clock | |
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/clock')
-rw-r--r-- | applets/clock/clock-location-tile.c | 15 |
1 files changed, 15 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 (); |