Skip to content

Commit

Permalink
Rename option image_overlay.common.enabled to image_overlay.common.state
Browse files Browse the repository at this point in the history
since it is not a boolean anymore.
  • Loading branch information
Laurent Monin committed May 12, 2008
1 parent 99a5012 commit 0481d1d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ static void exit_program_final(void)
&options->layout.main_window.w, &options->layout.main_window.h);
}

options->image_overlay.common.enabled = image_osd_get(lw->image);
options->image_overlay.common.state = image_osd_get(lw->image);
}

layout_geometry_get_dividers(NULL, &options->layout.main_window.hdivider_pos, &options->layout.main_window.vdivider_pos);
Expand Down Expand Up @@ -1484,7 +1484,7 @@ int main(int argc, char *argv[])
}
}

image_osd_set(lw->image, options->image_overlay.common.enabled | (options->image_overlay.common.show_at_startup ? OSD_SHOW_INFO : OSD_SHOW_NOTHING));
image_osd_set(lw->image, options->image_overlay.common.state | (options->image_overlay.common.show_at_startup ? OSD_SHOW_INFO : OSD_SHOW_NOTHING));

g_free(geometry);
g_free(cmd_path);
Expand Down
2 changes: 1 addition & 1 deletion src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ConfOptions *init_options(ConfOptions *options)
options->image.zoom_quality = (gint)GDK_INTERP_BILINEAR;
options->image.zoom_to_fit_allow_expand = TRUE;

options->image_overlay.common.enabled = (guint)OSD_SHOW_NOTHING;
options->image_overlay.common.state = (guint)OSD_SHOW_NOTHING;
options->image_overlay.common.show_at_startup = FALSE;
options->image_overlay.common.template_string = NULL;

Expand Down
2 changes: 1 addition & 1 deletion src/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct _ConfOptions
/* image overlay */
struct {
struct {
guint enabled;
guint state;
gint show_at_startup;
gchar *template_string;
} common;
Expand Down
11 changes: 6 additions & 5 deletions src/rcfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void save_options(void)


WRITE_SUBTITLE("Image Overlay Options");
WRITE_UINT(image_overlay.common.enabled);
WRITE_UINT(image_overlay.common.state);
WRITE_BOOL(image_overlay.common.show_at_startup);
WRITE_CHAR(image_overlay.common.template_string);

Expand Down Expand Up @@ -760,12 +760,13 @@ void load_options(void)
READ_UINT(histogram.last_log_mode);

/* image overlay */
COMPAT_READ_BOOL(fullscreen.show_info, image_overlay.common.show_at_startup);
COMPAT_READ_CHAR(fullscreen.info, image_overlay.common.template_string);
READ_UINT(image_overlay.common.enabled);
COMPAT_READ_UINT(image_overlay.common.enabled, image_overlay.common.state); /* 2008-05-12 */
READ_UINT(image_overlay.common.state);
COMPAT_READ_BOOL(fullscreen.show_info, image_overlay.common.show_at_startup); /* 2008-04-21 */
READ_BOOL(image_overlay.common.show_at_startup);
COMPAT_READ_CHAR(fullscreen.info, image_overlay.common.template_string); /* 2008-04-21 */
READ_CHAR(image_overlay.common.template_string);

/* slideshow options */
READ_INT_UNIT(slideshow.delay, SLIDESHOW_SUBSECOND_PRECISION);
READ_BOOL(slideshow.random);
Expand Down

0 comments on commit 0481d1d

Please sign in to comment.