summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dlg-batch-add.c2
-rw-r--r--src/dlg-new.c4
-rw-r--r--src/typedefs.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c
index 3597214..50b85d8 100644
--- a/src/dlg-batch-add.c
+++ b/src/dlg-batch-add.c
@@ -510,7 +510,7 @@ dlg_batch_add_files (FrWindow *window,
gtk_button_set_label (GTK_BUTTON (GET_WIDGET ("a_add_button")), FR_STOCK_CREATE_ARCHIVE);
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 (GTK_TOGGLE_BUTTON (GET_WIDGET ("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")), (double) g_settings_get_int (data->settings, PREF_BATCH_ADD_VOLUME_SIZE) / MEGABYTE);
+ 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);
first_filename = (char*) file_list->data;
diff --git a/src/dlg-new.c b/src/dlg-new.c
index d0c8e6b..57cd301 100644
--- a/src/dlg-new.c
+++ b/src/dlg-new.c
@@ -36,7 +36,7 @@
#define GET_WIDGET(x) (_gtk_builder_get_widget (data->builder, (x)))
#define DEFAULT_EXTENSION ".tar.gz"
#define BAD_CHARS "/\\*"
-#define MEGABYTE (1024 * 1024)
+#define MEGABYTE (1024.0 * 1024.0)
/* called when the main dialog is closed. */
@@ -318,7 +318,7 @@ dlg_new_archive (FrWindow *window,
g_object_unref (settings);
settings = g_settings_new (ENGRAMPA_SCHEMA_BATCH_ADD);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->n_volume_spinbutton), (double) g_settings_get_int (settings, PREF_BATCH_ADD_VOLUME_SIZE) / MEGABYTE);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->n_volume_spinbutton), g_settings_get_int (settings, PREF_BATCH_ADD_VOLUME_SIZE) / MEGABYTE);
g_object_unref (settings);
/* format chooser */
diff --git a/src/typedefs.h b/src/typedefs.h
index 22a7417..0206f51 100644
--- a/src/typedefs.h
+++ b/src/typedefs.h
@@ -26,7 +26,7 @@
#include <glib.h>
#include <glib-object.h>
-#define MEGABYTE (1024 * 1024)
+#define MEGABYTE (1024.0 * 1024.0)
#define ADD_FOLDER_OPTIONS_DIR "engrampa/options"