Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r3381 - in
      trunk/src/target/OM-2007.2/applications/openmoko-appmanager2: .
      src ([EMAIL PROTECTED])
   2. r3382 - in
      trunk/src/target/OM-2007.2/applications/openmoko-appmanager2: .
      src ([EMAIL PROTECTED])
   3. r3383 - in
      trunk/src/target/OM-2007.2/applications/openmoko-appmanager2: .
      src ([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-11-09 10:19:06 +0100 (Fri, 09 Nov 2007)
New Revision: 3381

Added:
   
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.c
   
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.h
Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
Log:
* src/package-store.c:
* src/package-store.h:

Add package-store to the repository


Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog      
2007-11-08 17:42:57 UTC (rev 3380)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog      
2007-11-09 09:19:06 UTC (rev 3381)
@@ -1,3 +1,10 @@
+2007-11-09  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * src/package-store.c:
+       * src/package-store.h:
+
+       Add package-store to the repository
+
 2007-11-08  Thomas Wood  <[EMAIL PROTECTED]>
 
        * src/Makefile.am:

Added: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.c
    2007-11-08 17:42:57 UTC (rev 3380)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.c
    2007-11-09 09:19:06 UTC (rev 3381)
@@ -0,0 +1,54 @@
+/*
+ *  @file package-store.c
+ *  @brief A GTK+ list store that contains the list of available packages
+ *
+ *  Copyright (C) 2007 OpenMoko Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Public License as published by
+ *  the Free Software Foundation; version 2 of the license.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Public License for more details.
+ *
+ *  Authors:
+ *    OpenedHand Ltd. <[EMAIL PROTECTED]>
+ */
+
+#include "package-store.h"
+#include "ipkgapi.h"
+#include <glib.h>
+
+GtkTreeModel *
+package_store_new ()
+{
+  GtkListStore *store;
+  IPK_PACKAGE *pkg;
+  PKG_LIST_HEAD list;
+  int ret;
+  
+  ipkg_initialize (0);
+  
+  /* status, name, size, pkg */
+  store = gtk_list_store_new (NUM_COL, G_TYPE_INT,
+                              G_TYPE_STRING, G_TYPE_POINTER);
+
+  ret = ipkg_list_available_cmd (&list);
+  g_return_val_if_fail (ret >= 0, NULL);
+  
+  pkg = list.pkg_list;
+  
+  while (pkg)
+  {
+    gtk_list_store_insert_with_values (store, NULL, -1,
+                                       COL_STATUS, pkg->state_status,
+                                       COL_NAME, pkg->name,
+                                       COL_POINTER, pkg,
+                                       -1);
+    pkg = pkg->next;
+  }
+
+  return GTK_TREE_MODEL (store);
+}

Added: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.h
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.h
    2007-11-08 17:42:57 UTC (rev 3380)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/package-store.h
    2007-11-09 09:19:06 UTC (rev 3381)
@@ -0,0 +1,35 @@
+/*
+ *  @file package-store.h
+ *  @brief A GTK+ list store that contains the list of available packages
+ *
+ *  Copyright (C) 2007 OpenMoko Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Public License as published by
+ *  the Free Software Foundation; version 2 of the license.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Public License for more details.
+ *
+ *  Authors:
+ *    OpenedHand Ltd. <[EMAIL PROTECTED]>
+ */
+
+#ifndef PACKAGE_STORE_H
+#define PACKAGE_STORE_H
+
+#include <gtk/gtk.h>
+
+enum {
+  COL_STATUS = 0,
+  COL_NAME,
+  COL_POINTER,
+  NUM_COL
+};
+
+
+GtkTreeModel * package_store_new ();
+
+#endif /* PACKAGE_STORE_H */




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-11-09 10:41:41 +0100 (Fri, 09 Nov 2007)
New Revision: 3382

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
   
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-window.c
   
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/detail-area.c
   
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/install-dialog.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.c
Log:
* src/appmanager-window.c:
* src/detail-area.c:
* src/install-dialog.c:
* src/tool-box.c:

Remove references to missing header files


Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog      
2007-11-09 09:19:06 UTC (rev 3381)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog      
2007-11-09 09:41:41 UTC (rev 3382)
@@ -1,5 +1,15 @@
 2007-11-09  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/appmanager-window.c:
+       * src/detail-area.c:
+       * src/install-dialog.c:
+       * src/tool-box.c:
+
+       Remove references to missing header files
+
+
+2007-11-09  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/package-store.c:
        * src/package-store.h:
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-window.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-window.c
        2007-11-09 09:19:06 UTC (rev 3381)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-window.c
        2007-11-09 09:41:41 UTC (rev 3382)
@@ -27,7 +27,6 @@
 #include "detail-area.h"
 #include "appmanager-data.h"
 #include "errorcode.h"
-#include "package-list.h"
 #include "search-bar.h"
 
 #include "ipkg-utils.h"

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/detail-area.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/detail-area.c  
    2007-11-09 09:19:06 UTC (rev 3381)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/detail-area.c  
    2007-11-09 09:41:41 UTC (rev 3382)
@@ -23,7 +23,6 @@
 
 #include "detail-area.h"
 #include "navigation-area.h"
-#include "package-list.h"
 
 #include "ipkgapi.h"
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/install-dialog.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/install-dialog.c
   2007-11-09 09:19:06 UTC (rev 3381)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/install-dialog.c
   2007-11-09 09:41:41 UTC (rev 3382)
@@ -22,7 +22,6 @@
 
 #include "install-dialog.h"
 #include "appmanager-window.h"
-#include "package-list.h"
 
 static void install_dialog_class_init (InstallDialogClass *klass);
 static void install_dialog_init (InstallDialog *self);

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.c 
2007-11-09 09:19:06 UTC (rev 3381)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.c 
2007-11-09 09:41:41 UTC (rev 3382)
@@ -23,10 +23,7 @@
 
 #include "tool-box.h"
 #include "navigation-area.h"
-#include "package-list.h"
 #include "appmanager-window.h"
-#include "apply-dialog.h"
-#include "install-dialog.h"
 #include "ipkg-utils.h"
 
 /*




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-11-09 11:18:19 +0100 (Fri, 09 Nov 2007)
New Revision: 3383

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/search-bar.c
Log:
* src/search-bar.c: (search_bar_new): Sort the categories before adding
 to the combobox


Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog      
2007-11-09 09:41:41 UTC (rev 3382)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog      
2007-11-09 10:18:19 UTC (rev 3383)
@@ -1,5 +1,10 @@
 2007-11-09  Thomas Wood  <[EMAIL PROTECTED]>
 
+       * src/search-bar.c: (search_bar_new): Sort the categories before adding
+        to the combobox
+
+2007-11-09  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/appmanager-window.c:
        * src/detail-area.c:
        * src/install-dialog.c:

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/search-bar.c
===================================================================
--- 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/search-bar.c   
    2007-11-09 09:41:41 UTC (rev 3382)
+++ 
trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/search-bar.c   
    2007-11-09 10:18:19 UTC (rev 3383)
@@ -105,28 +105,29 @@
   GtkWidget *searchbar;
   GtkListStore *filter;
   GtkCellRenderer *renderer;
-  GHashTable *hash;
-  /* GSList *slist = NULL; */
+  /* GHashTable *hash; */
+  GSList *slist = NULL;
 
   filter = gtk_list_store_new (1, G_TYPE_STRING);
   appdata->filter_store = GTK_TREE_MODEL (filter);
 
   gtk_list_store_insert_with_values (filter, NULL, FILTER_INSTALLED, 0, 
"Installed", -1);
   gtk_list_store_insert_with_values (filter, NULL, FILTER_UPGRADEABLE, 0, 
"Upgradeable", -1);
-  gtk_list_store_insert_with_values (filter, NULL, FILTER_SELECTED, 0, 
"Selected", -1);
   gtk_list_store_insert_with_values (filter, NULL, 3, 0, NULL, -1);
 
   /* profile these two methods to see which is quicker */
+#if 0
   hash = g_hash_table_new (g_str_hash, g_str_equal);
   gtk_tree_model_foreach (pkg_list, (GtkTreeModelForeachFunc) 
section_search_hash, hash);
   g_hash_table_foreach (hash, (GHFunc) section_hash_insert, filter);
   g_hash_table_unref (hash);
+#endif
   
-#if 0
   gtk_tree_model_foreach (pkg_list, (GtkTreeModelForeachFunc) 
section_search_slist, &slist);
-  g_slist_foreach (slist, slist_insert, filter);
+  slist = g_slist_sort (slist, (GCompareFunc) strcmp);
+  g_slist_foreach (slist, (GFunc) slist_insert, filter);
   g_slist_free (slist);
-#endif
+
   
   renderer = gtk_cell_renderer_text_new ();
   




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to