diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-27 18:14:37 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-27 18:14:37 +0100 |
commit | 37e590249dd9d191a2331040fb879830c9ceea8e (patch) | |
tree | 59fa7570d63841063eeb7682c201a5053f3d427b /mateweather | |
parent | acc20eb50af01fcb6ca2a024b65913cc32a1e670 (diff) | |
download | mate-applets-37e590249dd9d191a2331040fb879830c9ceea8e.tar.bz2 mate-applets-37e590249dd9d191a2331040fb879830c9ceea8e.tar.xz |
GTK3: fix previous GtkMisc deprecations fix commit
Diffstat (limited to 'mateweather')
-rw-r--r-- | mateweather/mateweather-dialog.c | 156 | ||||
-rw-r--r-- | mateweather/mateweather-pref.c | 36 |
2 files changed, 93 insertions, 99 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c index 510de399..9e8344b8 100644 --- a/mateweather/mateweather-dialog.c +++ b/mateweather/mateweather-dialog.c @@ -234,10 +234,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_location_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_location_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_location_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_location_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_location_lbl), 0.0, 0.5); #endif cond_update_lbl = gtk_label_new (_("Last update:")); @@ -246,10 +246,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_update_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_update_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_update_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_update_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_update_lbl), 0.0, 0.5); #endif cond_cond_lbl = gtk_label_new (_("Conditions:")); @@ -258,10 +258,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_cond_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_cond_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_cond_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_cond_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_cond_lbl), 0.0, 0.5); #endif cond_sky_lbl = gtk_label_new (_("Sky:")); @@ -270,10 +270,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_sky_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_sky_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_sky_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_sky_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_sky_lbl), 0.0, 0.5); #endif cond_temp_lbl = gtk_label_new (_("Temperature:")); @@ -282,10 +282,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_temp_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_temp_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_temp_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_temp_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_temp_lbl), 0.0, 0.5); #endif cond_apparent_lbl = gtk_label_new (_("Feels like:")); @@ -294,10 +294,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_apparent_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_apparent_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_apparent_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_apparent_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_apparent_lbl), 0.0, 0.5); #endif cond_dew_lbl = gtk_label_new (_("Dew point:")); @@ -306,10 +306,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_dew_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_dew_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_dew_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_dew_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_dew_lbl), 0.0, 0.5); #endif cond_humidity_lbl = gtk_label_new (_("Relative humidity:")); @@ -318,10 +318,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_humidity_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_humidity_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_humidity_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_humidity_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_humidity_lbl), 0.0, 0.5); #endif cond_wind_lbl = gtk_label_new (_("Wind:")); @@ -330,10 +330,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_wind_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_wind_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_wind_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_wind_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_wind_lbl), 0.0, 0.5); #endif cond_pressure_lbl = gtk_label_new (_("Pressure:")); @@ -342,10 +342,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_pressure_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_pressure_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_pressure_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_pressure_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_pressure_lbl), 0.0, 0.5); #endif cond_vis_lbl = gtk_label_new (_("Visibility:")); @@ -354,10 +354,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_vis_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_vis_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_vis_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_vis_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_vis_lbl), 0.0, 0.5); #endif cond_sunrise_lbl = gtk_label_new (_("Sunrise:")); @@ -366,10 +366,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_sunrise_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_sunrise_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_sunrise_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_sunrise_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_sunrise_lbl), 0.0, 0.5); #endif cond_sunset_lbl = gtk_label_new (_("Sunset:")); @@ -378,10 +378,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (cond_sunset_lbl), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (cond_sunset_lbl, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (cond_sunset_lbl), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (cond_sunset_lbl), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (cond_sunset_lbl), 0.0, 0.5); #endif priv->cond_location = gtk_label_new (""); @@ -391,10 +391,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_location), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_location), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_location, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_location), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_location), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_location), 0.0, 0.5); #endif priv->cond_update = gtk_label_new (""); @@ -404,10 +404,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_update), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_update), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_update, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_update), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_update), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_update), 0.0, 0.5); #endif priv->cond_cond = gtk_label_new (""); @@ -417,10 +417,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_cond), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_cond), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_cond, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_cond), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_cond), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_cond), 0.0, 0.5); #endif priv->cond_sky = gtk_label_new (""); @@ -430,10 +430,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_sky), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_sky), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_sky, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_sky), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_sky), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_sky), 0.0, 0.5); #endif priv->cond_temp = gtk_label_new (""); @@ -443,10 +443,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_temp), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_temp), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_temp, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_temp), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_temp), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_temp), 0.0, 0.5); #endif priv->cond_apparent = gtk_label_new (""); @@ -456,10 +456,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_apparent), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_apparent), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_apparent, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_apparent), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_apparent), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_apparent), 0.0, 0.5); #endif priv->cond_dew = gtk_label_new (""); @@ -469,10 +469,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_dew), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_dew), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_dew, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_dew), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_dew), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_dew), 0.0, 0.5); #endif priv->cond_humidity = gtk_label_new (""); @@ -482,10 +482,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_humidity), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_humidity), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_humidity, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_humidity), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_humidity), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_humidity), 0.0, 0.5); #endif priv->cond_wind = gtk_label_new (""); @@ -495,10 +495,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_wind), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_wind), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_wind, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_wind), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_wind), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_wind), 0.0, 0.5); #endif priv->cond_pressure = gtk_label_new (""); @@ -508,10 +508,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_pressure), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_pressure), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_pressure, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_pressure), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_pressure), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_pressure), 0.0, 0.5); #endif priv->cond_vis = gtk_label_new (""); @@ -521,10 +521,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_vis), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_vis), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_vis, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_vis), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_vis), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_vis), 0.0, 0.5); #endif priv->cond_sunrise = gtk_label_new (""); @@ -534,10 +534,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_sunrise), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_sunrise), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_sunrise, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_sunrise), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_sunrise), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_sunrise), 0.0, 0.5); #endif priv->cond_sunset = gtk_label_new (""); @@ -547,10 +547,10 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) (GtkAttachOptions) (0), 0, 0); gtk_label_set_selectable (GTK_LABEL (priv->cond_sunset), TRUE); gtk_label_set_justify (GTK_LABEL (priv->cond_sunset), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (priv->cond_sunset, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (priv->cond_sunset), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (priv->cond_sunset), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (priv->cond_sunset), 0.0, 0.5); #endif cond_frame_alignment = gtk_alignment_new (0.5, 0, 1, 0); diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c index 6d64a59d..79448acd 100644 --- a/mateweather/mateweather-pref.c +++ b/mateweather/mateweather-pref.c @@ -575,8 +575,8 @@ static GtkWidget* create_hig_catagory(GtkWidget* main_box, gchar* title) tmp = g_strdup_printf ("<b>%s</b>", title); label = gtk_label_new (NULL); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif @@ -871,10 +871,10 @@ static void mateweather_pref_create(MateWeatherPref* pref) temp_label = gtk_label_new_with_mnemonic (_("_Temperature unit:")); gtk_label_set_use_markup (GTK_LABEL (temp_label), TRUE); gtk_label_set_justify (GTK_LABEL (temp_label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (temp_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (temp_label), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (temp_label), 0.0, 0.5); #endif gtk_widget_show (temp_label); @@ -897,10 +897,10 @@ static void mateweather_pref_create(MateWeatherPref* pref) speed_label = gtk_label_new_with_mnemonic (_("_Wind speed unit:")); gtk_label_set_use_markup (GTK_LABEL (speed_label), TRUE); gtk_label_set_justify (GTK_LABEL (speed_label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (speed_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (speed_label), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (speed_label), 0.0, 0.5); #endif gtk_widget_show (speed_label); @@ -928,10 +928,10 @@ static void mateweather_pref_create(MateWeatherPref* pref) pres_label = gtk_label_new_with_mnemonic (_("_Pressure unit:")); gtk_label_set_use_markup (GTK_LABEL (pres_label), TRUE); gtk_label_set_justify (GTK_LABEL (pres_label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (pres_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (pres_label), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (pres_label), 0.0, 0.5); #endif gtk_widget_show (pres_label); @@ -962,8 +962,8 @@ static void mateweather_pref_create(MateWeatherPref* pref) dist_label = gtk_label_new_with_mnemonic (_("_Visibility unit:")); gtk_label_set_use_markup (GTK_LABEL (dist_label), TRUE); gtk_label_set_justify (GTK_LABEL (dist_label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (dist_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (dist_label), 0, 0.5); #endif @@ -1070,12 +1070,6 @@ static void mateweather_pref_create(MateWeatherPref* pref) pref_basic_update_lbl = gtk_label_new_with_mnemonic (_("_Automatically update every:")); gtk_widget_show (pref_basic_update_lbl); - -/* - gtk_label_set_justify (GTK_LABEL (pref_basic_update_lbl), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (pref_basic_update_lbl), 1, 0.5); -*/ - gtk_widget_show (pref_basic_update_hbox); pref_basic_update_spin_adj = gtk_adjustment_new (30, 1, 3600, 5, 25, 1); @@ -1135,8 +1129,8 @@ static void mateweather_pref_create(MateWeatherPref* pref) gtk_container_add (GTK_CONTAINER (pref_notebook), pref_loc_hbox); tree_label = gtk_label_new_with_mnemonic (_("_Select a location:")); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (tree_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (tree_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (tree_label), 0.0, 0.5); #endif |