summaryrefslogtreecommitdiff
path: root/mateweather/mateweather-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'mateweather/mateweather-dialog.c')
-rw-r--r--mateweather/mateweather-dialog.c104
1 files changed, 104 insertions, 0 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index a50cbec2..510de399 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -234,7 +234,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_location_lbl), 0, 0.5);
+#endif
cond_update_lbl = gtk_label_new (_("Last update:"));
gtk_widget_show (cond_update_lbl);
@@ -242,7 +246,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_update_lbl), 0, 0.5);
+#endif
cond_cond_lbl = gtk_label_new (_("Conditions:"));
gtk_widget_show (cond_cond_lbl);
@@ -250,7 +258,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_cond_lbl), 0, 0.5);
+#endif
cond_sky_lbl = gtk_label_new (_("Sky:"));
gtk_widget_show (cond_sky_lbl);
@@ -258,7 +270,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_sky_lbl), 0, 0.5);
+#endif
cond_temp_lbl = gtk_label_new (_("Temperature:"));
gtk_widget_show (cond_temp_lbl);
@@ -266,7 +282,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_temp_lbl), 0, 0.5);
+#endif
cond_apparent_lbl = gtk_label_new (_("Feels like:"));
gtk_widget_show (cond_apparent_lbl);
@@ -274,7 +294,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_apparent_lbl), 0, 0.5);
+#endif
cond_dew_lbl = gtk_label_new (_("Dew point:"));
gtk_widget_show (cond_dew_lbl);
@@ -282,7 +306,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_dew_lbl), 0, 0.5);
+#endif
cond_humidity_lbl = gtk_label_new (_("Relative humidity:"));
gtk_widget_show (cond_humidity_lbl);
@@ -290,7 +318,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_humidity_lbl), 0, 0.5);
+#endif
cond_wind_lbl = gtk_label_new (_("Wind:"));
gtk_widget_show (cond_wind_lbl);
@@ -298,7 +330,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_wind_lbl), 0, 0.5);
+#endif
cond_pressure_lbl = gtk_label_new (_("Pressure:"));
gtk_widget_show (cond_pressure_lbl);
@@ -306,7 +342,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_pressure_lbl), 0, 0.5);
+#endif
cond_vis_lbl = gtk_label_new (_("Visibility:"));
gtk_widget_show (cond_vis_lbl);
@@ -314,7 +354,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_vis_lbl), 0, 0.5);
+#endif
cond_sunrise_lbl = gtk_label_new (_("Sunrise:"));
gtk_widget_show (cond_sunrise_lbl);
@@ -322,7 +366,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_sunrise_lbl), 0, 0.5);
+#endif
cond_sunset_lbl = gtk_label_new (_("Sunset:"));
gtk_widget_show (cond_sunset_lbl);
@@ -330,7 +378,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (cond_sunset_lbl), 0, 0.5);
+#endif
priv->cond_location = gtk_label_new ("");
gtk_widget_show (priv->cond_location);
@@ -339,7 +391,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_location), 0, 0.5);
+#endif
priv->cond_update = gtk_label_new ("");
gtk_widget_show (priv->cond_update);
@@ -348,7 +404,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_update), 0, 0.5);
+#endif
priv->cond_cond = gtk_label_new ("");
gtk_widget_show (priv->cond_cond);
@@ -357,7 +417,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_cond), 0, 0.5);
+#endif
priv->cond_sky = gtk_label_new ("");
gtk_widget_show (priv->cond_sky);
@@ -366,7 +430,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_sky), 0, 0.5);
+#endif
priv->cond_temp = gtk_label_new ("");
gtk_widget_show (priv->cond_temp);
@@ -375,7 +443,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_temp), 0, 0.5);
+#endif
priv->cond_apparent = gtk_label_new ("");
gtk_widget_show (priv->cond_apparent);
@@ -384,7 +456,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_apparent), 0, 0.5);
+#endif
priv->cond_dew = gtk_label_new ("");
gtk_widget_show (priv->cond_dew);
@@ -393,7 +469,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_dew), 0, 0.5);
+#endif
priv->cond_humidity = gtk_label_new ("");
gtk_widget_show (priv->cond_humidity);
@@ -402,7 +482,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_humidity), 0, 0.5);
+#endif
priv->cond_wind = gtk_label_new ("");
gtk_widget_show (priv->cond_wind);
@@ -411,7 +495,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_wind), 0, 0.5);
+#endif
priv->cond_pressure = gtk_label_new ("");
gtk_widget_show (priv->cond_pressure);
@@ -420,7 +508,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_pressure), 0, 0.5);
+#endif
priv->cond_vis = gtk_label_new ("");
gtk_widget_show (priv->cond_vis);
@@ -429,7 +521,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_vis), 0, 0.5);
+#endif
priv->cond_sunrise = gtk_label_new ("");
gtk_widget_show (priv->cond_sunrise);
@@ -438,7 +534,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_sunrise), 0, 0.5);
+#endif
priv->cond_sunset = gtk_label_new ("");
gtk_widget_show (priv->cond_sunset);
@@ -447,7 +547,11 @@ 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);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->cond_sunset), 0, 0.5);
+#endif
cond_frame_alignment = gtk_alignment_new (0.5, 0, 1, 0);
gtk_widget_show (cond_frame_alignment);