diff options
Diffstat (limited to 'mateweather/mateweather-dialog.c')
-rw-r--r-- | mateweather/mateweather-dialog.c | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c index 5f7911dc..c2eefea7 100644 --- a/mateweather/mateweather-dialog.c +++ b/mateweather/mateweather-dialog.c @@ -109,17 +109,10 @@ static void response_cb(MateWeatherDialog* dialog, gint id, gpointer data) static void link_cb(GtkButton* button, gpointer data) { -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (NULL, "http://www.weather.com/", gtk_get_current_event_time (), NULL); -#else - gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (button)), - "http://www.weather.com/", - gtk_get_current_event_time (), - NULL); -#endif } static gchar* replace_multiple_new_lines(gchar* s) @@ -234,274 +227,170 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) gtk_widget_show (cond_location_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_location_lbl, 0, 0, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_location_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_update_lbl = gtk_label_new (_("Last update:")); gtk_widget_show (cond_update_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_update_lbl, 0, 1, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_update_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_cond_lbl = gtk_label_new (_("Conditions:")); gtk_widget_show (cond_cond_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_cond_lbl, 0, 2, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_cond_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_sky_lbl = gtk_label_new (_("Sky:")); gtk_widget_show (cond_sky_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_sky_lbl, 0, 3, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_sky_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_temp_lbl = gtk_label_new (_("Temperature:")); gtk_widget_show (cond_temp_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_temp_lbl, 0, 4, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_temp_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_apparent_lbl = gtk_label_new (_("Feels like:")); gtk_widget_show (cond_apparent_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_apparent_lbl, 0, 5, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_apparent_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_dew_lbl = gtk_label_new (_("Dew point:")); gtk_widget_show (cond_dew_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_dew_lbl, 0, 6, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_dew_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_humidity_lbl = gtk_label_new (_("Relative humidity:")); gtk_widget_show (cond_humidity_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_humidity_lbl, 0, 7, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_humidity_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_wind_lbl = gtk_label_new (_("Wind:")); gtk_widget_show (cond_wind_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_wind_lbl, 0, 8, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_wind_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_pressure_lbl = gtk_label_new (_("Pressure:")); gtk_widget_show (cond_pressure_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_pressure_lbl, 0, 9, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_pressure_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_vis_lbl = gtk_label_new (_("Visibility:")); gtk_widget_show (cond_vis_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_vis_lbl, 0, 10, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_vis_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_sunrise_lbl = gtk_label_new (_("Sunrise:")); gtk_widget_show (cond_sunrise_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_sunrise_lbl, 0, 11, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_sunrise_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif cond_sunset_lbl = gtk_label_new (_("Sunset:")); gtk_widget_show (cond_sunset_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_sunset_lbl, 0, 12, 1, 1); gtk_label_set_justify (GTK_LABEL (cond_sunset_lbl), GTK_JUSTIFY_LEFT); -#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, 0.5); -#endif priv->cond_location = gtk_label_new (""); gtk_widget_show (priv->cond_location); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_location, 1, 0, 1, 1); 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, 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, 0.5); -#endif priv->cond_update = gtk_label_new (""); gtk_widget_show (priv->cond_update); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_update, 1, 1, 1, 1); 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, 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, 0.5); -#endif priv->cond_cond = gtk_label_new (""); gtk_widget_show (priv->cond_cond); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_cond, 1, 2, 1, 1); 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, 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, 0.5); -#endif priv->cond_sky = gtk_label_new (""); gtk_widget_show (priv->cond_sky); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sky, 1, 3, 1, 1); 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, 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, 0.5); -#endif priv->cond_temp = gtk_label_new (""); gtk_widget_show (priv->cond_temp); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_temp, 1, 4, 1, 1); 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, 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, 0.5); -#endif priv->cond_apparent = gtk_label_new (""); gtk_widget_show (priv->cond_apparent); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_apparent, 1, 5, 1, 1); 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, 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, 0.5); -#endif priv->cond_dew = gtk_label_new (""); gtk_widget_show (priv->cond_dew); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_dew, 1, 6, 1, 1); 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, 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, 0.5); -#endif priv->cond_humidity = gtk_label_new (""); gtk_widget_show (priv->cond_humidity); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_humidity, 1, 7, 1, 1); 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, 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, 0.5); -#endif priv->cond_wind = gtk_label_new (""); gtk_widget_show (priv->cond_wind); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_wind, 1, 8, 1, 1); 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, 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, 0.5); -#endif priv->cond_pressure = gtk_label_new (""); gtk_widget_show (priv->cond_pressure); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_pressure, 1, 9, 1, 1); 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, 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, 0.5); -#endif priv->cond_vis = gtk_label_new (""); gtk_widget_show (priv->cond_vis); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_vis, 1, 10, 1, 1); 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, 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, 0.5); -#endif priv->cond_sunrise = gtk_label_new (""); gtk_widget_show (priv->cond_sunrise); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sunrise, 1, 11, 1, 1); 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, 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, 0.5); -#endif priv->cond_sunset = gtk_label_new (""); gtk_widget_show (priv->cond_sunset); gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sunset, 1, 12, 1, 1); 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, 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, 0.5); -#endif cond_frame_alignment = gtk_alignment_new (0.5, 0, 1, 0); gtk_widget_show (cond_frame_alignment); |