Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm/.git;a=commitdiff;h=54c51a158ab7d2846976572b29d2f6ce94685ef7
commit 54c51a158ab7d2846976572b29d2f6ce94685ef7
Author: Priyank <[EMAIL PROTECTED]>
Date: Sun Jul 22 14:18:57 2007 +0530
gfpm-interface: show update icon for searched packages that need update (in all
packages)
diff --git a/src/gfpm-interface.c b/src/gfpm-interface.c
index 10c7f91..5406d8b 100644
--- a/src/gfpm-interface.c
+++ b/src/gfpm-interface.c
@@ -879,15 +879,23 @@ cb_gfpm_search_keypress (GtkWidget *widget, GdkEventKey
*event, gpointer data)
{
PM_PKG *pm_lpkg;
gboolean inst = FALSE;
+ gboolean up = FALSE;
for (i=l;i;i=pacman_list_next(i))
{
pm_pkg = pacman_db_readpkg (sync_db, pacman_list_getdata(i));
pm_lpkg = pacman_db_readpkg (local_db, pacman_list_getdata(i));
if (pacman_pkg_getinfo (pm_lpkg, PM_PKG_VERSION)!=NULL)
- inst = TRUE;
- else
- inst = FALSE;
-
+ {
+ inst = TRUE;
+ char *v1 = (char*)pacman_pkg_getinfo (pm_pkg,
PM_PKG_VERSION);
+ char *v2 = (char*)pacman_pkg_getinfo (pm_lpkg,
PM_PKG_VERSION);
+ if (v1!=NULL && v2!=NULL)
+ if (!strcmp(v1,v2))
+ up = FALSE;
+ else up = TRUE;
+ }
+ else
+ inst = FALSE;
gtk_list_store_append (store, &iter);
if (inst == TRUE)
gtk_list_store_set (store, &iter, 3, (char*)pacman_pkg_getinfo (pm_lpkg,
PM_PKG_VERSION), -1);
@@ -896,7 +904,7 @@ cb_gfpm_search_keypress (GtkWidget *widget, GdkEventKey
*event, gpointer data)
gtk_list_store_set (store, &iter,
0, inst,
- 1, (inst==TRUE)?icon_yes:icon_no,
+ 1,
(inst==TRUE)?(up==TRUE)?icon_up:icon_yes:icon_no,
2, (char*)pacman_pkg_getinfo (pm_pkg, PM_PKG_NAME),
4, (char*)pacman_pkg_getinfo (pm_pkg, PM_PKG_VERSION),
5, (char*)pacman_pkg_getinfo (pm_pkg, PM_PKG_DESC),
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git