Closes #119: win32: Show preferences if one of the paths doesn't exist.

This commit is contained in:
Kolan Sh 2016-09-27 13:24:05 +03:00
parent a79e1aff2f
commit 2b355d5c86
1 changed files with 14 additions and 0 deletions

View File

@ -35,6 +35,10 @@ namespace LAview.Desktop {
subprocess_dialog = new SubprocessDialog (application, window);
about_dialog = new AboutDialogWindow (application, window);
#if (WINDOWS)
check_paths ();
#endif
fill_liststore_templates ();
application.app_menu = builder.get_object ("menubar") as MenuModel;
@ -386,5 +390,15 @@ namespace LAview.Desktop {
public void action_quit_activate (Gtk.Action action) {
window.destroy();
}
void check_paths () {
bool all_paths_exist = true;
string[] paths1 = {AppCore.core.lyx_path, AppCore.core.latexmk_pl_path, AppCore.core.perl_path};
foreach (var path in paths1) {
if (!File.new_for_path(path).query_exists())
all_paths_exist = false;
}
if (!all_paths_exist) pref_dialog.show_all ();
}
}
}