Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm.git;a=commitdiff;h=85e88328c17735462459a80732d24b3d6e52fc11

commit 85e88328c17735462459a80732d24b3d6e52fc11
Author: Priyank <[EMAIL PROTECTED]>
Date:   Wed Sep 5 13:08:57 2007 +0530

gfpm-interface: cb_gfpm_refresh_button_clicked()
don't use pacman_list_count() to check if updates are available as this is a 
bit slower.
instead, just check if the list is NULL.

diff --git a/src/gfpm-interface.c b/src/gfpm-interface.c
index 5319994..043956c 100644
--- a/src/gfpm-interface.c
+++ b/src/gfpm-interface.c
@@ -966,13 +966,11 @@ cb_gfpm_refresh_button_clicked (GtkButton *button, 
gpointer data)

/* Drop 'no changes to apply' instead of an empty list, if no need to
upgrade any package */
-       /* FIXME FIX ME FIXME PLS! pacman_list_count() seems a bit slow, need 
some
-          better way to check this!! */
-       if (pacman_list_count(packages) <= 0)
+       if (packages == NULL)
{
gfpm_message ("Gfpm", _("No changes to apply."));
goto cleanup;
-       } /* FIXME END */
+       }

if (gfpm_plist_question(_("Package upgrade"), _("Following packages will be 
upgraded. Do you want to continue ?"), gfpm_pmlist_to_glist(packages)) == 
GTK_RESPONSE_YES)
{
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to