summaryrefslogtreecommitdiff
path: root/src/dlg-batch-add.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-12-13 12:05:34 +0100
committerraveit65 <[email protected]>2022-01-29 14:15:50 +0100
commit3664a2d2a6d2f18aaeadd355f2ae0bbf91b8a9c1 (patch)
treed97ee213fe891cbb579b5f8a3e13a56752a8965a /src/dlg-batch-add.c
parentd2a04c51cf8ee50a390248192fdfb9a427bec6a3 (diff)
downloadengrampa-3664a2d2a6d2f18aaeadd355f2ae0bbf91b8a9c1.tar.bz2
engrampa-3664a2d2a6d2f18aaeadd355f2ae0bbf91b8a9c1.tar.xz
Fix some -Wfloat-conversion warnings
Diffstat (limited to 'src/dlg-batch-add.c')
-rw-r--r--src/dlg-batch-add.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c
index 2e36726..7d78e65 100644
--- a/src/dlg-batch-add.c
+++ b/src/dlg-batch-add.c
@@ -114,7 +114,7 @@ set_archive_options (DialogData *data)
int size;
value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (GET_WIDGET ("a_volume_spinbutton")));
- size = floor (value * MEGABYTE);
+ size = (int) (value * MEGABYTE);
g_settings_set_int (data->settings, PREF_BATCH_ADD_VOLUME_SIZE, size);
fr_window_set_volume_size (data->window, (guint) size);
}
@@ -464,6 +464,7 @@ dlg_batch_add_files (FrWindow *window,
const char *first_filename;
char *parent;
int i;
+ int size;
if (file_list == NULL)
return;
@@ -481,7 +482,9 @@ dlg_batch_add_files (FrWindow *window,
gtk_expander_set_expanded (GTK_EXPANDER (GET_WIDGET ("a_other_options_expander")), FALSE /*g_settings_get_boolean (data->settings, PREF_BATCH_ADD_OTHER_OPTIONS)*/);
gtk_toggle_button_set_active (GET_TOGGLE_BUTTON ("a_encrypt_header_checkbutton"), g_settings_get_boolean (data->settings_general, PREF_GENERAL_ENCRYPT_HEADER));
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("a_volume_spinbutton")), g_settings_get_int (data->settings, PREF_BATCH_ADD_VOLUME_SIZE) / MEGABYTE);
+ size = g_settings_get_int (data->settings, PREF_BATCH_ADD_VOLUME_SIZE);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("a_volume_spinbutton")),
+ ((gdouble) size) / MEGABYTE);
first_filename = (char*) file_list->data;
parent = remove_level_from_path (first_filename);