Skip to content

Commit

Permalink
make sure the findbar is reset when opening a new file
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgerman committed Apr 21, 2012
1 parent ea5bf85 commit f51cf72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.dmg
Expand Up @@ -21,7 +21,7 @@
| Last page seen | Jump to the last page seen (info stored in the .xoj file) |
| Next-prev file | Quickly go from one file to the next/prev in the current directory |
| Poor man's bookmarks | Jump quickly to the previous/next annotation |
| Partial search | Search: finds occurrence, but no UI (yet) |
| Partial search | Search is almost there... |
|----------------------+--------------------------------------------------------------------|

* Features Implemented
Expand Down
6 changes: 5 additions & 1 deletion src/xo-file.c
Expand Up @@ -258,6 +258,7 @@ gboolean close_journal(void)
clear_undo_stack();

shutdown_bgpdf();
reset_find_bar();

delete_journal(&journal);

Expand Down Expand Up @@ -832,10 +833,14 @@ gboolean open_journal(char *filename)

// i wished this code would be documented a bit more

// check if the file is a ".pdf" and there exists a file with same name + .xoj
// if that is the case, open the xoj, but only if the option ui.autoload_pdf_xoj
// is true
tmpfn = g_strdup_printf("%s.xoj", filename);
if (ui.autoload_pdf_xoj && g_file_test(tmpfn, G_FILE_TEST_EXISTS) &&
(g_str_has_suffix(filename, ".pdf") || g_str_has_suffix(filename, ".PDF")))
{
// reenter with new filename
valid = open_journal(tmpfn);
g_free(tmpfn);
return valid;
Expand Down Expand Up @@ -970,7 +975,6 @@ gboolean open_journal(char *filename)
update_file_name(g_strdup(filename));
gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);

reset_find_bar();

make_canvas_items();
update_page_stuff();
Expand Down

0 comments on commit f51cf72

Please sign in to comment.