diff options
author | rbuj <[email protected]> | 2021-12-13 23:18:26 +0100 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2022-03-22 16:25:09 -0400 |
commit | b3892cf644c693fef44b5daf55a0b66a667ac147 (patch) | |
tree | 4d1acd062b9b7adc49239036cfe156444c88374c /stickynotes/stickynotes_applet_callbacks.c | |
parent | 0685093d85f70823d71397e35f3c2acf09a0c083 (diff) | |
download | mate-applets-b3892cf644c693fef44b5daf55a0b66a667ac147.tar.bz2 mate-applets-b3892cf644c693fef44b5daf55a0b66a667ac147.tar.xz |
Fix some -Wfloat-conversion warnings
Diffstat (limited to 'stickynotes/stickynotes_applet_callbacks.c')
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index c0889df2..6481bb82 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -444,18 +444,26 @@ menu_about_cb (GtkAction *action, void preferences_save_cb (gpointer data) { - gint width = gtk_adjustment_get_value (stickynotes->w_prefs_width); - gint height = gtk_adjustment_get_value (stickynotes->w_prefs_height); - gboolean sys_color = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_sys_color)); - gboolean sys_font = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_sys_font)); - gboolean sticky = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_sticky)); - gboolean force_default = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_force)); - gboolean desktop_hide = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_desktop)); + gint width; + gint height; + gboolean sys_color; + gboolean sys_font; + gboolean sticky; + gboolean force_default; + gboolean desktop_hide; + gdouble adjustment_value; + + adjustment_value = gtk_adjustment_get_value (stickynotes->w_prefs_width); + width = (gint) adjustment_value; + + adjustment_value = gtk_adjustment_get_value (stickynotes->w_prefs_height); + height = (gint) adjustment_value; + + sys_color = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_sys_color)); + sys_font = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_sys_font)); + sticky = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_sticky)); + force_default = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_force)); + desktop_hide = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (stickynotes->w_prefs_desktop)); if (g_settings_is_writable (stickynotes->settings, "default-width")) |