Documentation: Use G_SOURCE_CONTINUE and G_SOURCE_REMOVE
[geeqie.git] / src / search.cc
index c35d07a..a42a0f8 100644 (file)
@@ -790,7 +790,7 @@ static gboolean search_result_update_idle_cb(gpointer data)
        search_status_update(sd);
 
        sd->update_idle_id = 0;
-       return FALSE;
+       return G_SOURCE_REMOVE;
 }
 
 static void search_result_update_idle_cancel(SearchData *sd)
@@ -1991,13 +1991,13 @@ static gboolean search_file_next(SearchData *sd)
                                }
                        if (sd->search_name_match_case)
                                {
-                               match = g_regex_match(sd->search_name_regex, fd_name_or_path, G_REGEX_MATCH_DEFAULT, NULL);
+                               match = g_regex_match(sd->search_name_regex, fd_name_or_path, GRegexMatchFlags(0), NULL);
                                }
                        else
                                {
                                /* sd->search_name is converted in search_start() */
                                gchar *haystack = g_utf8_strdown(fd_name_or_path, -1);
-                               match = g_regex_match(sd->search_name_regex, haystack, G_REGEX_MATCH_DEFAULT, NULL);
+                               match = g_regex_match(sd->search_name_regex, haystack, GRegexMatchFlags(0), NULL);
                                g_free(haystack);
                                }
                        }
@@ -2188,11 +2188,11 @@ static gboolean search_file_next(SearchData *sd)
 
                        if (sd->match_comment == SEARCH_MATCH_CONTAINS)
                                {
-                               match = g_regex_match(sd->search_comment_regex, comment, G_REGEX_MATCH_DEFAULT, NULL);
+                               match = g_regex_match(sd->search_comment_regex, comment, GRegexMatchFlags(0), NULL);
                                }
                        else if (sd->match_comment == SEARCH_MATCH_NONE)
                                {
-                               match = !g_regex_match(sd->search_comment_regex, comment, G_REGEX_MATCH_DEFAULT, NULL);
+                               match = !g_regex_match(sd->search_comment_regex, comment, GRegexMatchFlags(0), NULL);
                                }
                        g_free(comment);
                        }
@@ -2457,9 +2457,9 @@ static gboolean search_step_cb(gpointer data)
                if (search_file_next(sd))
                        {
                        sd->search_idle_id = 0;
-                       return FALSE;
+                       return G_SOURCE_REMOVE;
                        }
-               return TRUE;
+               return G_SOURCE_CONTINUE;
                }
 
        if (!sd->search_file_list && !sd->search_folder_list)
@@ -2469,7 +2469,7 @@ static gboolean search_step_cb(gpointer data)
                search_stop(sd);
                search_result_thumb_step(sd);
 
-               return FALSE;
+               return G_SOURCE_REMOVE;
                }
 
        fd = static_cast<FileData *>(sd->search_folder_list->data);
@@ -2549,7 +2549,7 @@ static gboolean search_step_cb(gpointer data)
                file_data_unref(fd);
                }
 
-       return TRUE;
+       return G_SOURCE_CONTINUE;
 }
 
 static void search_similarity_load_done_cb(ImageLoader *UNUSED(il), gpointer data)
@@ -2583,13 +2583,13 @@ static void search_start(SearchData *sd)
                g_regex_unref(sd->search_name_regex);
                }
 
-       sd->search_name_regex = g_regex_new(sd->search_name, G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, &error);
+       sd->search_name_regex = g_regex_new(sd->search_name, GRegexCompileFlags(0), GRegexMatchFlags(0), &error);
        if (error)
                {
                log_printf("Error: could not compile regular expression %s\n%s\n", sd->search_name, error->message);
                g_error_free(error);
                error = NULL;
-               sd->search_name_regex = g_regex_new("", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL);
+               sd->search_name_regex = g_regex_new("", GRegexCompileFlags(0), GRegexMatchFlags(0), NULL);
                }
 
        if (!sd->search_comment_match_case)
@@ -2605,13 +2605,13 @@ static void search_start(SearchData *sd)
                g_regex_unref(sd->search_comment_regex);
                }
 
-       sd->search_comment_regex = g_regex_new(sd->search_comment,G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, &error);
+       sd->search_comment_regex = g_regex_new(sd->search_comment, GRegexCompileFlags(0), GRegexMatchFlags(0), &error);
        if (error)
                {
                log_printf("Error: could not compile regular expression %s\n%s\n", sd->search_comment, error->message);
                g_error_free(error);
                error = NULL;
-               sd->search_comment_regex = g_regex_new("", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL);
+               sd->search_comment_regex = g_regex_new("", GRegexCompileFlags(0), GRegexMatchFlags(0), NULL);
                }
 
        sd->search_count = 0;