r3090 - in trunk/src/target/OM-2007.2/applications/openmoko-appmanager2: . src

thomas at sita.openmoko.org thomas at sita.openmoko.org
Fri Oct 5 13:57:17 CEST 2007


Author: thomas
Date: 2007-10-05 13:57:08 +0200 (Fri, 05 Oct 2007)
New Revision: 3090

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/configure.ac
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.h
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/apply-dialog.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.h
   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/filter-menu.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.h
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/install-dialog.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/ipkgapi.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/navigation-area.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.c
   trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.h
   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.h
Log:
* configure.ac:
* src/application-menu.c: (application_menu_new):
* src/application-menu.h:
* src/apply-dialog.c: (apply_dialog_new):
* src/appmanager-data.c:
* src/appmanager-data.h:
* src/appmanager-window.c: (main):
* src/detail-area.c: (detail_area_new):
* src/filter-menu.c: (filter_menu_new),
(filter_menu_show_install_list):
* src/filter-menu.h:
* src/install-dialog.c:
* src/ipkgapi.c: (ipkg_remove_cmd):
* src/navigation-area.c: (navigation_area_new):
* src/select-menu.c: (on_unmark_activate),
(on_mark_install_activate), (on_mark_upgrade_activate),
(on_mark_remove_activate), (moko_select_menu_new):
* src/select-menu.h:
* src/tool-box.c:
* src/tool-box.h:

Update to be compatible with OM-2007.2


Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/ChangeLog	2007-10-05 11:57:08 UTC (rev 3090)
@@ -1,3 +1,28 @@
+2007-10-05  Thomas Wood  <thomas at openedhand.com>
+
+	* configure.ac:
+	* src/application-menu.c: (application_menu_new):
+	* src/application-menu.h:
+	* src/apply-dialog.c: (apply_dialog_new):
+	* src/appmanager-data.c:
+	* src/appmanager-data.h:
+	* src/appmanager-window.c: (main):
+	* src/detail-area.c: (detail_area_new):
+	* src/filter-menu.c: (filter_menu_new),
+	(filter_menu_show_install_list):
+	* src/filter-menu.h:
+	* src/install-dialog.c:
+	* src/ipkgapi.c: (ipkg_remove_cmd):
+	* src/navigation-area.c: (navigation_area_new):
+	* src/select-menu.c: (on_unmark_activate),
+	(on_mark_install_activate), (on_mark_upgrade_activate),
+	(on_mark_remove_activate), (moko_select_menu_new):
+	* src/select-menu.h:
+	* src/tool-box.c:
+	* src/tool-box.h:
+
+	Update to be compatible with OM-2007.2
+
 2007-03-29 Chaowei Song <songcw at fic-sh.com.cn>
 	* src/application-menu.c: (on_install_single_application_activate)
 	Remove unnecessory set a default size to the file chooser dialog.

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/configure.ac	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/configure.ac	2007-10-05 11:57:08 UTC (rev 3090)
@@ -11,8 +11,8 @@
 AC_PROG_LIBTOOL
 
 # base deps
-PKG_CHECK_MODULES(OPENMOKO, openmoko-libs >= 0.0.1,,
-                 AC_MSG_ERROR([*** Required OpenMoko Libraries >= 0.0.1 not installed ***]))
+PKG_CHECK_MODULES(OPENMOKO, libmokoui2,,
+                 AC_MSG_ERROR([*** Required OpenMoko Libraries not installed ***]))
 PKG_CHECK_MODULES(LIBIPKG, libipkg,,
                 exit)
 PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -223,10 +223,10 @@
  * @return The GtkMenu widget. If there is error,
  * it will return NULL.
  */
-GtkMenu *
+GtkWidget *
 application_menu_new (ApplicationManagerData *appdata)
 {
-  GtkMenu     *appmenu;
+  GtkWidget   *appmenu;
   GtkWidget   *showstatus;
   GtkWidget   *showsource;
   GtkWidget   *installsingleapp;
@@ -236,7 +236,7 @@
   g_debug ("Init the application appmenu");
   g_return_val_if_fail (MOKO_IS_APPLICATION_MANAGER_DATA (appdata), NULL);
 
-  appmenu = GTK_MENU (gtk_menu_new ());
+  appmenu = gtk_menu_new ();
 
   showstatus = gtk_menu_item_new_with_mnemonic (_("Show Status"));
   gtk_widget_show (showstatus);

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.h	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/application-menu.h	2007-10-05 11:57:08 UTC (rev 3090)
@@ -24,7 +24,7 @@
 
 #include "appmanager-data.h"
 
-GtkMenu *application_menu_new (ApplicationManagerData *appdata);
+GtkWidget *application_menu_new (ApplicationManagerData *appdata);
 
 #endif
 

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/apply-dialog.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/apply-dialog.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/apply-dialog.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -18,8 +18,6 @@
  *
  *  @author Chaowei Song (songcw at fic-sh.com.cn)
  */
-#include <libmokoui/moko-tree-view.h>
-
 #include "apply-dialog.h"
 #include "appmanager-window.h"
 #include "package-list.h"
@@ -67,12 +65,13 @@
   gtk_widget_show (applymsg);
   gtk_box_pack_start (GTK_BOX (dialogvbox), applymsg, FALSE, FALSE, 0);
 
-  applylist = moko_tree_view_new ();
+  applylist = gtk_tree_view_new ();
   gtk_widget_show (applylist);
   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (applylist), FALSE);
   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (applylist), FALSE);
 
-  listwindow = GTK_WIDGET (moko_tree_view_put_into_scrolled_window (MOKO_TREE_VIEW (applylist)));
+  listwindow = gtk_scrolled_window_new (NULL, NULL);
+  gtk_container_add (GTK_CONTAINER (listwindow),applylist);
   gtk_widget_show (listwindow);
   gtk_box_pack_start (GTK_BOX (dialogvbox), listwindow, TRUE, TRUE, 0);
 
@@ -99,7 +98,7 @@
   gtk_tree_view_column_set_attributes (col, renderer,
                                        "text", MARK_COL_NAME,
                                        NULL);
-  moko_tree_view_append_column (MOKO_TREE_VIEW (applylist), col);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (applylist), col);
 
   store = gtk_tree_store_new (MARK_NUM_COL, G_TYPE_STRING);
 

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -78,11 +78,11 @@
  */
 void 
 application_manager_data_set_main_window (ApplicationManagerData *appdata, 
-                                          MokoPanedWindow *window)
+                                          GtkWindow *window)
 {
   g_return_if_fail (MOKO_IS_APPLICATION_MANAGER_DATA (appdata));
-
-  appdata->mwindow = window;
+  g_return_if_fail (GTK_IS_WINDOW (window));
+  appdata->mwindow = GTK_WIDGET (window);
 }
 
 /*
@@ -379,7 +379,7 @@
  * @param appdata The application manager data
  * @return The main window
  */
-MokoPanedWindow *
+GtkWidget *
 application_manager_get_main_window (ApplicationManagerData *appdata)
 {
   g_return_val_if_fail (MOKO_IS_APPLICATION_MANAGER_DATA (appdata), NULL);

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.h	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-data.h	2007-10-05 11:57:08 UTC (rev 3090)
@@ -22,7 +22,6 @@
 
 #include <gtk/gtk.h>
 
-#include <libmokoui/moko-paned-window.h>
 #include "pixbuf-list.h"
 
 G_BEGIN_DECLS
@@ -54,7 +53,7 @@
 typedef struct _ApplicationManagerData {
   GObject          parent;             /* The parent of the struct */
 
-  MokoPanedWindow  *mwindow;           /* The main window */
+  GtkWidget        *mwindow;           /* The main window */
   GtkMenu          *filtermenu;        /* The filter menu */
   GtkWidget        *menubox;           /* The menubox */
   GtkMenu          *selectmenu;        /* The select menu */
@@ -86,7 +85,7 @@
 ApplicationManagerData *application_manager_data_new (void);
 
 void application_manager_data_set_main_window (ApplicationManagerData *appdata, 
-                                               MokoPanedWindow *window);
+                                               GtkWindow *window);
 
 void application_manager_data_set_filter_menu (ApplicationManagerData *appdata,
                                                GtkMenu *filtermenu);
@@ -135,7 +134,7 @@
 void application_manager_data_set_install_dialog (ApplicationManagerData *appdata,
                                                   GtkWidget *installdialog);
 
-MokoPanedWindow *
+GtkWidget *
      application_manager_get_main_window (ApplicationManagerData *appdata);
 
 GtkMenu *

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-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/appmanager-window.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -17,9 +17,6 @@
  *
  *  @author Chaowei Song (songcw at fic-sh.com.cn)
  */
-#include <libmokoui/moko-application.h>
-#include <libmokoui/moko-paned-window.h>
-#include <libmokoui/moko-tool-box.h>
 
 #include <gtk/gtk.h>
 
@@ -41,15 +38,18 @@
 main (int argc, char* argv[])
 {
   ApplicationManagerData *appdata;
-  MokoPanedWindow *window;
-  GtkMenu         *appmenu;
-  GtkMenu         *filtermenu;
-  GtkMenu         *selectmenu;
+  GtkWidget       *window;
+  GtkWidget       *menubox;
+  GtkWidget       *menuitem;
+  GtkWidget       *appmenu;
+  GtkWidget       *filtermenu;
+  GtkWidget       *selectmenu;
   GtkWidget       *navigation;
-  MokoToolBox     *toolbox;
+  GtkWidget       *toolbox;
   GtkWidget       *detail;
 
-  GtkWidget       *menubox;
+  //GtkWidget       *menubox;
+  GtkWidget *vbox;
 
   gint             ret;
 
@@ -72,34 +72,54 @@
 
   init_pixbuf_list (appdata);
 
-  window = MOKO_PANED_WINDOW (moko_paned_window_new ());
+  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   g_signal_connect (G_OBJECT (window), "delete_event",
                     G_CALLBACK (gtk_main_quit), NULL);
-  application_manager_data_set_main_window (appdata, window);
+  application_manager_data_set_main_window (appdata, GTK_WINDOW (window));
 
+  /* main vbox */
+  vbox = gtk_vbox_new (FALSE, 0);
+
   appmenu = application_menu_new (appdata);
-  moko_paned_window_set_application_menu (window, appmenu);
 
   filtermenu = filter_menu_new (appdata);
-  moko_paned_window_set_filter_menu (window, filtermenu);
-  application_manager_data_set_filter_menu (appdata, filtermenu);
+  application_manager_data_set_filter_menu (appdata, GTK_MENU (filtermenu));
 
-  selectmenu = GTK_MENU (moko_select_menu_new (appdata));
-  gtk_widget_show (GTK_WIDGET (selectmenu));
-  application_manager_data_set_select_menu (appdata, selectmenu);
+  selectmenu = moko_select_menu_new (appdata);
+  application_manager_data_set_select_menu (appdata, GTK_MENU (selectmenu));
 
+
   /* Save the menubox to the application manager data */
-  menubox = moko_paned_window_get_menubox (window);
+  menubox = gtk_menu_bar_new ();
+  gtk_box_pack_start (GTK_BOX (vbox), menubox, FALSE, FALSE, 0);
+
   application_manager_data_set_menubox (appdata, menubox);
 
-  navigation = navigation_area_new (appdata);
-  moko_paned_window_set_navigation_pane (window, navigation);
 
+  menuitem = gtk_menu_item_new_with_label ("Package");
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), appmenu);
+  gtk_menu_shell_append (GTK_MENU_SHELL (menubox), menuitem);
+
+  menuitem = gtk_menu_item_new_with_label ("Filter");
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), filtermenu);
+  gtk_menu_shell_append (GTK_MENU_SHELL (menubox), menuitem);
+
+  menuitem = gtk_menu_item_new_with_label ("Select");
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), selectmenu);
+  gtk_menu_shell_append (GTK_MENU_SHELL (menubox), menuitem);
+
   toolbox = tool_box_new (appdata);
-  moko_paned_window_add_toolbox (window, toolbox);
+  gtk_box_pack_start (GTK_BOX (vbox), toolbox, FALSE, FALSE, 0);
+  //moko_paned_window_add_toolbox (window, toolbox);
 
+  navigation = navigation_area_new (appdata);
+  gtk_box_pack_start (GTK_BOX (vbox), navigation, TRUE, TRUE, 0);
+  //moko_paned_window_set_navigation_pane (window, navigation);
+
   detail = detail_area_new (appdata);
-  moko_paned_window_set_details_pane (window, detail);
+  gtk_box_pack_start (GTK_BOX (vbox), detail, TRUE, TRUE, 0);
+  //moko_paned_window_set_details_pane (window, detail);
+  gtk_container_add (GTK_CONTAINER (appdata->mwindow), vbox);
 
   /* Load the list of all package in the memory */
   ret = init_package_list (appdata);

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-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/detail-area.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -17,7 +17,6 @@
  *
  *  @author Chaowei Song (songcw at fic-sh.com.cn)
  */
-#include <libmokoui/moko-scrolled-pane.h>
 #include <string.h>
 
 #include "detail-area.h"
@@ -35,7 +34,7 @@
   GtkWidget    *text;
   GtkWidget    *detail;
 
-  detail = moko_scrolled_pane_new ();
+  detail = gtk_scrolled_window_new (NULL, NULL);
 
   text = gtk_text_view_new ();
   gtk_widget_show (text);
@@ -43,7 +42,7 @@
   gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (text), FALSE);
   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text), GTK_WRAP_WORD);
 
-  moko_scrolled_pane_pack (MOKO_SCROLLED_PANE (detail), text);
+  gtk_container_add (GTK_CONTAINER (detail), text);
   application_manager_data_set_tvdetail (appdata, text);
 
   return GTK_WIDGET (detail);

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -140,10 +140,10 @@
  * @param appdata The application manager data
  * @return The filter menu.
  */
-GtkMenu *
+GtkWidget *
 filter_menu_new (ApplicationManagerData *appdata)
 {
-  GtkMenu   *filtermenu;
+  GtkWidget *filtermenu;
   GtkWidget *searchresult;
   GtkWidget *installed;
   GtkWidget *upgradeable;
@@ -152,7 +152,7 @@
   g_debug ("Init the filter filtermenu");
   g_return_val_if_fail (MOKO_IS_APPLICATION_MANAGER_DATA (appdata), NULL);
 
-  filtermenu = GTK_MENU (gtk_menu_new ());
+  filtermenu = gtk_menu_new ();
 
   searchresult = gtk_menu_item_new_with_label (_("Search Results"));
   gtk_widget_show (searchresult);
@@ -213,7 +213,7 @@
 filter_menu_show_install_list (ApplicationManagerData *appdata)
 {
   gpointer     pkglist;
-  MokoMenuBox *menubox;
+  GtkWidget   *menubox;
 
   g_return_if_fail (MOKO_IS_APPLICATION_MANAGER_DATA (appdata));
 
@@ -224,8 +224,8 @@
           MOKO_APPLICATION_MANAGER_DATA (appdata),
           pkglist);
 
-  menubox = MOKO_MENU_BOX (application_manager_get_menubox (appdata));
+  menubox = application_manager_get_menubox (appdata);
 
-  g_return_if_fail (IS_MOKO_MENU_BOX (menubox));
-  moko_menu_box_set_active_filter (menubox, _("Installed"));
+  //g_return_if_fail (IS_MOKO_MENU_BOX (menubox));
+  //moko_menu_box_set_active_filter (menubox, _("Installed"));
 }

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.h	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/filter-menu.h	2007-10-05 11:57:08 UTC (rev 3090)
@@ -22,10 +22,9 @@
 
 #include <gtk/gtk.h>
 
-#include <libmokoui/moko-paned-window.h>
 #include "appmanager-data.h"
 
-GtkMenu *filter_menu_new (ApplicationManagerData *appdata);
+GtkWidget *filter_menu_new (ApplicationManagerData *appdata);
 
 void filter_menu_add_item (GtkMenu *filtermenu, const gchar *name,
                            ApplicationManagerData *appdata);

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-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/install-dialog.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -18,7 +18,6 @@
  *
  *  @author Chaowei Song (songcw at fic-sh.com.cn)
  */
-#include <libmokoui/moko-tree-view.h>
 #include <string.h>
 
 #include "install-dialog.h"

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/ipkgapi.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/ipkgapi.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/ipkgapi.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -874,7 +874,7 @@
             DBG("Package seems to be %s not installed (STATUS = NOT_INSTALLED).\n", pkg->name);
             continue;
         }
-        pkg_to_remove->is_processing = 1;
+        // pkg_to_remove->is_processing = 1;
         ipkg_remove_pkg(&global_conf, pkg_to_remove, 0);
         done = 1;
     }

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/navigation-area.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/navigation-area.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/navigation-area.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -17,7 +17,6 @@
  *
  *  @author Chaowei Song (songcw at fic-sh.com.cn)
  */
-#include <libmokoui/moko-tree-view.h>
 #include <string.h>
 
 #include "appmanager-window.h"
@@ -152,7 +151,7 @@
   GtkTreeViewColumn  *col;
   GtkCellRenderer    *renderer;
 
-  treeview = moko_tree_view_new ();
+  treeview = gtk_tree_view_new ();
   gtk_widget_show (treeview);
   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), FALSE);
 
@@ -167,7 +166,7 @@
                                        "pixbuf", COL_STATUS,
                                        NULL);
 
-  moko_tree_view_append_column (MOKO_TREE_VIEW (treeview), col);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), col);
 
   /* Add the name as the second column. */
   col = gtk_tree_view_column_new ();
@@ -180,7 +179,7 @@
                                        "text", COL_NAME,
                                        NULL);
 
-  moko_tree_view_append_column (MOKO_TREE_VIEW (treeview), col);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), col);
 
   /* For some reason, there must set the column length to fixed */
   gtk_tree_view_column_set_resizable (col, FALSE);
@@ -198,7 +197,7 @@
                                        "text", COL_SIZE,
                                        NULL);
 
-  moko_tree_view_append_column (MOKO_TREE_VIEW (treeview), col);
+  gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), col);
 
   model = GTK_TREE_MODEL (create_package_list_store ());
   gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), model);
@@ -208,7 +207,8 @@
   gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
                                GTK_SELECTION_SINGLE);
 
-  scrollwindow = GTK_WIDGET (moko_tree_view_put_into_scrolled_window (MOKO_TREE_VIEW (treeview)));
+  scrollwindow = gtk_scrolled_window_new (NULL, NULL);
+  gtk_container_add (GTK_CONTAINER (scrollwindow), treeview);
   application_manager_data_set_tvpkglist (appdata, treeview);
 
   /* Connect signal to the treeview */

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.c	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -17,8 +17,6 @@
  *
  *  @author Chaowei Song (songcw at fic-sh.com.cn)
  */
-#include <libmokoui/moko-tree-view.h>
-
 #include "select-menu.h"
 #include "appmanager-window.h"
 #include "pixbuf-list.h"
@@ -61,7 +59,7 @@
   appdata = MOKO_APPLICATION_MANAGER_DATA (data);
 
   treeview = application_manager_get_tvpkglist (appdata);
-  g_return_if_fail (MOKO_IS_TREE_VIEW (treeview));
+  g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -123,7 +121,7 @@
   appdata = MOKO_APPLICATION_MANAGER_DATA (data);
 
   treeview = application_manager_get_tvpkglist (appdata);
-  g_return_if_fail (MOKO_IS_TREE_VIEW (treeview));
+  g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -176,7 +174,7 @@
   appdata = MOKO_APPLICATION_MANAGER_DATA (data);
 
   treeview = application_manager_get_tvpkglist (appdata);
-  g_return_if_fail (MOKO_IS_TREE_VIEW (treeview));
+  g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -231,7 +229,7 @@
   appdata = MOKO_APPLICATION_MANAGER_DATA (data);
 
   treeview = application_manager_get_tvpkglist (appdata);
-  g_return_if_fail (MOKO_IS_TREE_VIEW (treeview));
+  g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
@@ -284,7 +282,7 @@
  * @param appdata The application manager data
  * @return The MokoSelectMenu
  */
-MokoSelectMenu *
+GtkWidget *
 moko_select_menu_new (ApplicationManagerData *appdata)
 {
   MokoSelectMenu *self = MOKO_SELECT_MENU (g_object_new (MOKO_TYPE_SELECT_MENU, NULL));
@@ -314,7 +312,7 @@
   g_signal_connect ((gpointer) priv->markremove, "activate",
                     G_CALLBACK (on_mark_remove_activate), appdata);
 
-  return self;
+  return GTK_WIDGET (self);
 }
 
 /*

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.h	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/select-menu.h	2007-10-05 11:57:08 UTC (rev 3090)
@@ -46,7 +46,7 @@
 
 GType moko_select_menu_get_type (void);
 
-MokoSelectMenu *moko_select_menu_new (ApplicationManagerData *appdata);
+GtkWidget *moko_select_menu_new (ApplicationManagerData *appdata);
 
 void moko_select_menu_popup (MokoSelectMenu *menu, 
                              GdkEventButton *event,

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-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.c	2007-10-05 11:57:08 UTC (rev 3090)
@@ -165,38 +165,35 @@
  * @param appdata The application manager data
  * @return The toplevel widget of the tool box
  */
-MokoToolBox *
+GtkWidget *
 tool_box_new (ApplicationManagerData *appdata)
 {
-  MokoToolBox *toolbox;
-  GtkWidget   *bapply;
-  GtkWidget   *bupgrade;
-  GtkWidget   *searchentry;
+  GtkWidget   *toolbox;
+  GtkToolItem *bapply;
+  GtkToolItem *bupgrade;
   GtkWidget   *anImage;
 
-  toolbox = MOKO_TOOL_BOX (moko_tool_box_new_with_search ());
+  toolbox = gtk_toolbar_new ();
 
-  bupgrade = moko_tool_box_add_action_button (toolbox);
   anImage = gtk_image_new_from_file (PKGDATADIR "/Upgrades.png");
-  moko_pixmap_button_set_center_image (MOKO_PIXMAP_BUTTON (bupgrade), anImage);
+  bupgrade = gtk_tool_button_new (anImage, "Upgrades");
   g_signal_connect ((gpointer)bupgrade, "clicked",
                     G_CALLBACK (on_upgrade_clicked), 
                     appdata);
 
-  bapply = moko_tool_box_add_action_button (toolbox);
   anImage = gtk_image_new_from_file (PKGDATADIR "/Apply.png");
-  moko_pixmap_button_set_center_image (MOKO_PIXMAP_BUTTON (bapply), anImage);
+  bapply = gtk_tool_button_new (anImage, "Apply");
   g_signal_connect ((gpointer)bapply, "clicked",
                     G_CALLBACK (on_apply_clicked), 
                     appdata);
-
+#if 0
   searchentry = moko_tool_box_get_entry (toolbox);
   application_manager_data_set_search_entry (appdata, GTK_ENTRY (searchentry));
   gtk_entry_set_max_length (GTK_ENTRY (searchentry), MAX_SEARCH_ENTRY_TEXT_LENGTH);
   g_signal_connect ((gpointer) searchentry, "changed",
                     G_CALLBACK (on_search_entry_changed),
                     appdata);
-
+#endif
   return toolbox;
 }
 

Modified: trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.h	2007-10-05 11:50:49 UTC (rev 3089)
+++ trunk/src/target/OM-2007.2/applications/openmoko-appmanager2/src/tool-box.h	2007-10-05 11:57:08 UTC (rev 3090)
@@ -22,13 +22,11 @@
 
 #include <gtk/gtk.h>
 
-#include <libmokoui/moko-paned-window.h>
-#include <libmokoui/moko-tool-box.h>
 #include "appmanager-data.h"
 
 #define MAX_SEARCH_ENTRY_TEXT_LENGTH   50
 
-MokoToolBox *tool_box_new (ApplicationManagerData *appdata);
+GtkWidget *tool_box_new (ApplicationManagerData *appdata);
 
 #endif
 





More information about the commitlog mailing list