diff options
author | rbuj <[email protected]> | 2020-12-20 19:41:23 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-01-01 01:24:31 +0100 |
commit | 45e7c98dc7793a7ced6f80e049eb747e92d47427 (patch) | |
tree | 9cda6a45befe2e93ea2ebc07f1b8842b061fb7cb /mateweather/src/mateweather-pref.c | |
parent | 471cd06e802eff12f8d6116d81fd0920018a467e (diff) | |
download | mate-applets-45e7c98dc7793a7ced6f80e049eb747e92d47427.tar.bz2 mate-applets-45e7c98dc7793a7ced6f80e049eb747e92d47427.tar.xz |
mateweather: Remove conversion warnings
Diffstat (limited to 'mateweather/src/mateweather-pref.c')
-rw-r--r-- | mateweather/src/mateweather-pref.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/mateweather/src/mateweather-pref.c b/mateweather/src/mateweather-pref.c index 5c087c23..c0408a68 100644 --- a/mateweather/src/mateweather-pref.c +++ b/mateweather/src/mateweather-pref.c @@ -170,13 +170,17 @@ static gboolean update_dialog(MateWeatherPref* pref) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pref->priv->basic_update_btn), gw_applet->mateweather_pref.update_enabled); soft_set_sensitive(pref->priv->basic_update_spin, gw_applet->mateweather_pref.update_enabled); - gtk_combo_box_set_active(GTK_COMBO_BOX(pref->priv->basic_temp_combo), gw_applet->mateweather_pref.temperature_unit - 2); + gtk_combo_box_set_active (GTK_COMBO_BOX (pref->priv->basic_temp_combo), + (gint) gw_applet->mateweather_pref.temperature_unit - 2); - gtk_combo_box_set_active(GTK_COMBO_BOX(pref->priv->basic_speed_combo), gw_applet->mateweather_pref.speed_unit - 2); + gtk_combo_box_set_active (GTK_COMBO_BOX (pref->priv->basic_speed_combo), + (gint) gw_applet->mateweather_pref.speed_unit - 2); - gtk_combo_box_set_active(GTK_COMBO_BOX(pref->priv->basic_pres_combo), gw_applet->mateweather_pref.pressure_unit - 2); + gtk_combo_box_set_active (GTK_COMBO_BOX (pref->priv->basic_pres_combo), + (gint) gw_applet->mateweather_pref.pressure_unit - 2); - gtk_combo_box_set_active(GTK_COMBO_BOX(pref->priv->basic_dist_combo), gw_applet->mateweather_pref.distance_unit - 2); + gtk_combo_box_set_active (GTK_COMBO_BOX (pref->priv->basic_dist_combo), + (gint) gw_applet->mateweather_pref.distance_unit - 2); #ifdef RADARMAP gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pref->priv->basic_radar_btn), gw_applet->mateweather_pref.radar_enabled); @@ -335,12 +339,16 @@ on_auto_update_toggled (GtkToggleButton *button, if (gw_applet->mateweather_pref.update_enabled) { - gw_applet->timeout_tag = g_timeout_add_seconds(gw_applet->mateweather_pref.update_interval, timeout_cb, gw_applet); - nxtSunEvent = weather_info_next_sun_event(gw_applet->mateweather_info); + gw_applet->timeout_tag + = g_timeout_add_seconds ((guint) gw_applet->mateweather_pref.update_interval, + timeout_cb, gw_applet); + nxtSunEvent = weather_info_next_sun_event (gw_applet->mateweather_info); if (nxtSunEvent >= 0) { - gw_applet->suncalc_timeout_tag = g_timeout_add_seconds(nxtSunEvent, suncalc_timeout_cb, gw_applet); + gw_applet->suncalc_timeout_tag + = g_timeout_add_seconds ((guint) nxtSunEvent, + suncalc_timeout_cb, gw_applet); } } } @@ -536,7 +544,9 @@ on_update_interval_changed (GtkSpinButton *button, if (gw_applet->mateweather_pref.update_enabled) { - gw_applet->timeout_tag = g_timeout_add_seconds(gw_applet->mateweather_pref.update_interval, timeout_cb, gw_applet); + gw_applet->timeout_tag + = g_timeout_add_seconds ((guint) gw_applet->mateweather_pref.update_interval, + timeout_cb, gw_applet); } } @@ -592,14 +602,10 @@ static gboolean find_location(GtkTreeModel* model, GtkTreeIter* iter, const gcha GtkTreeIter iter_parent; gchar* aux_loc; gboolean valid; - int len; + size_t len; - len = strlen (location); - - if (len <= 0) - { + if ((len = strlen (location)) == 0) return FALSE; - } do { |