jjacky avatar jjacky committed 22d6c52

If synchronizing dbs failed while using --auto-checks or --manual-checks, a GTK error wold occur; fixed.

Couple minor code adjustements.

Comments (0)

Files changed (1)

                              error->message);
             g_clear_error (&error);
             #ifndef DISABLE_GUI
-            set_kalpm_busy (FALSE);
+            if (!is_cli)
+            {
+                set_kalpm_busy (FALSE);
+            }
             #endif
             return;
         }
             g_clear_error (&error);
             kalu_alpm_free ();
             #ifndef DISABLE_GUI
-            set_kalpm_busy (FALSE);
+            if (!is_cli)
+            {
+                set_kalpm_busy (FALSE);
+            }
             #endif
             return;
         }
                 packages = NULL;
                 if (aur_has_updates (&packages, aur_pkgs, FALSE, &error))
                 {
-                    got_something = 1;
+                    got_something = TRUE;
                     nb_aur = (gint) alpm_list_count (packages);
                     notify_updates (packages, CHECK_AUR, NULL);
                     FREE_PACKAGE_LIST (packages);
 free_config (void)
 {
     if (config == NULL)
+    {
         return;
+    }
     
     free (config->pacmanconf);
     
     #ifndef DISABLE_GUI
     if (run_manual_checks || run_auto_checks)
     {
-        set_kalpm_busy (TRUE);
     #endif
         kalu_check_work (run_auto_checks);
     #ifndef DISABLE_GUI
     notify_init ("kalu");
     gtk_main ();
 eop:
-    notify_uninit ();
+    if (!is_cli)
+    {
+        notify_uninit ();
+    }
     #endif /* DISABLE_GUI */
     if (config->is_curl_init)
     {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.