Skip to content

Commit

Permalink
Temporarily turn off the inotify function
Browse files Browse the repository at this point in the history
  • Loading branch information
aharotias2 committed Dec 10, 2023
1 parent 5b341aa commit 5566e93
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
14 changes: 9 additions & 5 deletions src/Model/FileList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ namespace ParaPara {

public int get_index_of(string filename) throws AppError {
if (file_list != null) {
int index = file_list.index_of(filename);
if (index < 0) {
return file_list.size - 1;
} else {
return index;
try {
int index = file_list.index_of(filename);
if (index < 0) {
return file_list.size - 1;
} else {
return index;
}
} catch (Error e) {
return -1;
}
} else {
throw new AppError.FILE_LIST_ERROR(_("The file list is not initialized!"));
Expand Down
1 change: 1 addition & 0 deletions src/Utils/inotify-utils.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#include <gee-0.8/gee.h>
#include <sys/inotify.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ namespace ParaPara {
});
}
});
file_list.start_watch();
//file_list.start_watch();
image_view.file_list = file_list;
image_prev_button.sensitive = false;
image_next_button.sensitive = false;
Expand Down

0 comments on commit 5566e93

Please sign in to comment.