Commits

jjacky  committed 22d6c52

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

Couple minor code adjustements.

  • Participants
  • Parent commits 36f1c57

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)
     {