Skip to content

Commit

Permalink
fix #788 use saved status of detached sidebar.
Browse files Browse the repository at this point in the history
  • Loading branch information
karlkleinpaste committed Sep 3, 2017
1 parent b11949c commit c8d2b16
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -2,6 +2,7 @@

* #524 fix use of fonts whose names end in digits.
(ex. Goudy Bookletter 1911.)
* #788 use saved status of detached sidebar.

2017-08-23 karl <charcoal@users.sf.net>

Expand Down
2 changes: 2 additions & 0 deletions src/gnome2/sidebar.c
Expand Up @@ -405,10 +405,12 @@ void gui_set_sidebar_program_start(void)
/* set width of bible pane */
//gtk_paned_set_position(GTK_PANED(widgets.hpaned), settings.biblepane_width);

#if 0
if (!settings.docked) {
settings.docked = TRUE;
//gui_attach_detach_shortcutbar();
}
#endif
}

/******************************************************************************
Expand Down
4 changes: 4 additions & 0 deletions src/gnome2/sidebar_dialog.c
Expand Up @@ -35,6 +35,7 @@
#include "main/previewer.h"
#include "main/settings.h"
#include "main/sword.h"
#include "main/xml.h"

#include "gui/debug_glib_null.h"

Expand Down Expand Up @@ -89,6 +90,7 @@ void gui_attach_detach_sidebar(void)
gtk_widget_show_all(widgets.dock_sb);
gtk_widget_show(sidebar.html_viewer_widget);

xml_set_value("Xiphos", "misc", "sidebar_docked", "0");
} else {
settings.docked = TRUE;
biblepanesize =
Expand All @@ -113,6 +115,8 @@ void gui_attach_detach_sidebar(void)

gtk_widget_show(sidebar.html_viewer_widget);
gtk_widget_destroy(widgets.dock_sb);

xml_set_value("Xiphos", "misc", "sidebar_docked", "1");
}
main_set_previewer_widget(TRUE);
main_init_previewer();
Expand Down
4 changes: 4 additions & 0 deletions src/gnome2/xiphos.c
Expand Up @@ -234,6 +234,10 @@ void frontend_display(const char *tabs)
main_open_search_dialog();
if (settings.display_prefs)
gui_setup_preferences_dialog();
if (!settings.docked) {
settings.docked = TRUE; /* momentary lie */
on_attach_detach_sidebar_activate(NULL, 0);
}

if (settings.showdevotional)
main_display_devotional();
Expand Down

0 comments on commit c8d2b16

Please sign in to comment.