summaryrefslogtreecommitdiff
path: root/siv.c
diff options
context:
space:
mode:
Diffstat (limited to 'siv.c')
-rw-r--r--siv.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/siv.c b/siv.c
index 2a7b5b8..1efade4 100644
--- a/siv.c
+++ b/siv.c
@@ -83,6 +83,8 @@ foreach (gpointer key, gpointer value, gpointer user_data)
g_key_file_set_integer (key_file, filename, "background", meta->background);
g_key_file_set_integer (key_file, filename, "smooth_image", meta->smooth_image);
g_key_file_set_integer (key_file, filename, "zoom_level", meta->zoom_level);
+ g_key_file_set_integer (key_file, filename, "hadj", meta->hadj);
+ g_key_file_set_integer (key_file, filename, "vadj", meta->vadj);
}
void
@@ -94,7 +96,9 @@ app_set_meta_data (App *app,
int window_height,
gboolean smooth_image,
BackgroundType background,
- int zoom_level)
+ int zoom_level,
+ int vadj,
+ int hadj)
{
GKeyFile *keyfile = g_key_file_new ();
MetaData *data = g_hash_table_lookup (app->meta_data, filename);
@@ -115,6 +119,8 @@ app_set_meta_data (App *app,
data->background = background;
data->smooth_image = smooth_image;
data->zoom_level = zoom_level;
+ data->hadj = hadj;
+ data->vadj = vadj;
g_hash_table_foreach (app->meta_data, foreach, keyfile);
@@ -199,6 +205,12 @@ load_meta_data (void)
if (!get_int (keyfile, group, "zoom_level", &(data->zoom_level)))
data->zoom_level = 0;
+
+ if (!get_int (keyfile, group, "vadj", &(data->vadj)))
+ data->vadj = 0;
+
+ if (!get_int (keyfile, group, "hadj", &(data->hadj)))
+ data->hadj = 0;
g_hash_table_insert (result, g_strdup (group), data);
}