diff options
Diffstat (limited to 'mateweather/mateweather-dialog.c')
-rw-r--r-- | mateweather/mateweather-dialog.c | 188 |
1 files changed, 3 insertions, 185 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c index 30e5a042..dc14080d 100644 --- a/mateweather/mateweather-dialog.c +++ b/mateweather/mateweather-dialog.c @@ -27,11 +27,6 @@ #include "mateweather-pref.h" #include "mateweather-dialog.h" -#if GTK_CHECK_VERSION (3, 0, 0) -#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) -#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) -#endif - struct _MateWeatherDialogPrivate { GtkWidget* cond_location; GtkWidget* cond_update; @@ -156,11 +151,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) GtkWidget *weather_vbox; GtkWidget *weather_notebook; GtkWidget *cond_hbox; -#if GTK_CHECK_VERSION (3, 0, 0) GtkWidget *cond_grid; -#else - GtkWidget *cond_table; -#endif GtkWidget *cond_location_lbl; GtkWidget *cond_update_lbl; GtkWidget *cond_temp_lbl; @@ -220,12 +211,11 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) gtk_widget_show (weather_notebook); gtk_box_pack_start (GTK_BOX (weather_vbox), weather_notebook, TRUE, TRUE, 0); - cond_hbox = gtk_hbox_new (FALSE, 2); + cond_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); gtk_widget_show (cond_hbox); gtk_container_add (GTK_CONTAINER (weather_notebook), cond_hbox); gtk_container_set_border_width (GTK_CONTAINER (cond_hbox), 4); -#if GTK_CHECK_VERSION (3, 0, 0) cond_grid = gtk_grid_new (); gtk_widget_show (cond_grid); gtk_box_pack_start (GTK_BOX (cond_hbox), cond_grid, TRUE, TRUE, 0); @@ -236,20 +226,6 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_location_lbl = gtk_label_new (_("City:")); gtk_widget_show (cond_location_lbl); gtk_grid_attach (GTK_GRID (cond_grid), cond_location_lbl, 0, 0, 1, 1); -#else - cond_table = gtk_table_new (13, 2, FALSE); - gtk_widget_show (cond_table); - gtk_box_pack_start (GTK_BOX (cond_hbox), cond_table, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (cond_table), 12); - gtk_table_set_row_spacings (GTK_TABLE (cond_table), 6); - gtk_table_set_col_spacings (GTK_TABLE (cond_table), 12); - - cond_location_lbl = gtk_label_new (_("City:")); - gtk_widget_show (cond_location_lbl); - gtk_table_attach (GTK_TABLE (cond_table), cond_location_lbl, 0, 1, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -259,13 +235,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_update_lbl = gtk_label_new (_("Last update:")); gtk_widget_show (cond_update_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_update_lbl, 0, 1, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_update_lbl, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -275,13 +245,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_cond_lbl = gtk_label_new (_("Conditions:")); gtk_widget_show (cond_cond_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_cond_lbl, 0, 2, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_cond_lbl, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -291,13 +255,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_sky_lbl = gtk_label_new (_("Sky:")); gtk_widget_show (cond_sky_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_sky_lbl, 0, 3, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_sky_lbl, 0, 1, 3, 4, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -307,13 +265,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_temp_lbl = gtk_label_new (_("Temperature:")); gtk_widget_show (cond_temp_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_temp_lbl, 0, 4, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_temp_lbl, 0, 1, 4, 5, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -323,13 +275,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_apparent_lbl = gtk_label_new (_("Feels like:")); gtk_widget_show (cond_apparent_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_apparent_lbl, 0, 5, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_apparent_lbl, 0, 1, 5, 6, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -339,13 +285,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_dew_lbl = gtk_label_new (_("Dew point:")); gtk_widget_show (cond_dew_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_dew_lbl, 0, 6, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_dew_lbl, 0, 1, 6, 7, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -355,13 +295,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_humidity_lbl = gtk_label_new (_("Relative humidity:")); gtk_widget_show (cond_humidity_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_humidity_lbl, 0, 7, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_humidity_lbl, 0, 1, 7, 8, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -371,13 +305,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_wind_lbl = gtk_label_new (_("Wind:")); gtk_widget_show (cond_wind_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_wind_lbl, 0, 8, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_wind_lbl, 0, 1, 8, 9, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -387,13 +315,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_pressure_lbl = gtk_label_new (_("Pressure:")); gtk_widget_show (cond_pressure_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_pressure_lbl, 0, 9, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_pressure_lbl, 0, 1, 9, 10, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -403,13 +325,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_vis_lbl = gtk_label_new (_("Visibility:")); gtk_widget_show (cond_vis_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_vis_lbl, 0, 10, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_vis_lbl, 0, 1, 10, 11, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -419,13 +335,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_sunrise_lbl = gtk_label_new (_("Sunrise:")); gtk_widget_show (cond_sunrise_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_sunrise_lbl, 0, 11, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_sunrise_lbl, 0, 1, 11, 12, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -435,13 +345,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) cond_sunset_lbl = gtk_label_new (_("Sunset:")); gtk_widget_show (cond_sunset_lbl); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), cond_sunset_lbl, 0, 12, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), cond_sunset_lbl, 0, 1, 12, 13, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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); @@ -451,13 +355,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_location = gtk_label_new (""); gtk_widget_show (priv->cond_location); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_location, 1, 0, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_location, 1, 2, 0, 1, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -468,13 +366,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_update = gtk_label_new (""); gtk_widget_show (priv->cond_update); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_update, 1, 1, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_update, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -485,13 +377,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_cond = gtk_label_new (""); gtk_widget_show (priv->cond_cond); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_cond, 1, 2, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_cond, 1, 2, 2, 3, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -502,13 +388,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_sky = gtk_label_new (""); gtk_widget_show (priv->cond_sky); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sky, 1, 3, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_sky, 1, 2, 3, 4, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -519,13 +399,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_temp = gtk_label_new (""); gtk_widget_show (priv->cond_temp); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_temp, 1, 4, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_temp, 1, 2, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -536,13 +410,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_apparent = gtk_label_new (""); gtk_widget_show (priv->cond_apparent); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_apparent, 1, 5, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_apparent, 1, 2, 5, 6, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -553,13 +421,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_dew = gtk_label_new (""); gtk_widget_show (priv->cond_dew); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_dew, 1, 6, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_dew, 1, 2, 6, 7, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -570,13 +432,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_humidity = gtk_label_new (""); gtk_widget_show (priv->cond_humidity); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_humidity, 1, 7, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_humidity, 1, 2, 7, 8, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -587,13 +443,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_wind = gtk_label_new (""); gtk_widget_show (priv->cond_wind); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_wind, 1, 8, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_wind, 1, 2, 8, 9, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -604,13 +454,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_pressure = gtk_label_new (""); gtk_widget_show (priv->cond_pressure); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_pressure, 1, 9, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_pressure, 1, 2, 9, 10, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -621,13 +465,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_vis = gtk_label_new (""); gtk_widget_show (priv->cond_vis); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_vis, 1, 10, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_vis, 1, 2, 10, 11, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -638,13 +476,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_sunrise = gtk_label_new (""); gtk_widget_show (priv->cond_sunrise); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sunrise, 1, 11, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_sunrise, 1, 2, 11, 12, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -655,13 +487,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) priv->cond_sunset = gtk_label_new (""); gtk_widget_show (priv->cond_sunset); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_grid_attach (GTK_GRID (cond_grid), priv->cond_sunset, 1, 12, 1, 1); -#else - gtk_table_attach (GTK_TABLE (cond_table), priv->cond_sunset, 1, 2, 12, 13, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); -#endif 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) @@ -685,7 +511,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) if (gw_applet->mateweather_pref.location->zone_valid) { - forecast_hbox = gtk_hbox_new(FALSE, 0); + forecast_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_set_border_width (GTK_CONTAINER (forecast_hbox), 12); gtk_widget_show (forecast_hbox); @@ -717,7 +543,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) radar_note_lbl = gtk_label_new_with_mnemonic (_("Radar Map")); gtk_widget_show (radar_note_lbl); - radar_vbox = gtk_vbox_new (FALSE, 6); + radar_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_widget_show (radar_vbox); gtk_notebook_append_page (GTK_NOTEBOOK (weather_notebook), radar_vbox, radar_note_lbl); gtk_container_set_border_width (GTK_CONTAINER (radar_vbox), 6); @@ -734,11 +560,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog) ebox = gtk_event_box_new (); gtk_widget_show (ebox); -#if GTK_CHECK_VERSION (3, 0, 0) gtk_container_add (GTK_CONTAINER (imagescroll_window),ebox); -#else - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(imagescroll_window),ebox); -#endif gtk_box_pack_start (GTK_BOX (radar_vbox), imagescroll_window, TRUE, TRUE, 0); gtk_widget_show (priv->radar_image); gtk_widget_show (imagescroll_window); @@ -824,11 +646,7 @@ void mateweather_dialog_update(MateWeatherDialog* dialog) if (gw_applet->mateweather_pref.location->zone_valid) { font_desc = get_system_monospace_font (); if (font_desc) { -#if GTK_CHECK_VERSION(3,0,0) gtk_widget_override_font (priv->forecast_text, font_desc); -#else - gtk_widget_modify_font (priv->forecast_text, font_desc); -#endif pango_font_description_free (font_desc); } |