r1400 - trunk/src/target/OM-2007/applications/openmoko-taskmanager/src

zhiyong_sun at sita.openmoko.org zhiyong_sun at sita.openmoko.org
Mon Mar 19 04:46:36 CET 2007


Author: zhiyong_sun
Date: 2007-03-19 04:46:34 +0100 (Mon, 19 Mar 2007)
New Revision: 1400

Modified:
   trunk/src/target/OM-2007/applications/openmoko-taskmanager/src/callbacks.c
Log:
add dbus send function

Modified: trunk/src/target/OM-2007/applications/openmoko-taskmanager/src/callbacks.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-taskmanager/src/callbacks.c	2007-03-19 03:20:56 UTC (rev 1399)
+++ trunk/src/target/OM-2007/applications/openmoko-taskmanager/src/callbacks.c	2007-03-19 03:46:34 UTC (rev 1400)
@@ -55,7 +55,6 @@
     	  }
     else 
     {
-	     g_debug ("send message to footer");
          moko_dbus_send_message ("No application selected");
     	  return FALSE;
      }
@@ -74,8 +73,7 @@
 {
     if (!tm)
     	return;
-    moko_wm_cmd (tm, 
-    			GTK_WIDGET (tm->l->list_view), CMD_ACTIVATE_WINDOW);
+    moko_wm_cmd (tm, GTK_WIDGET (tm->l->list_view), CMD_ACTIVATE_WINDOW);
 }
 
 void
@@ -83,8 +81,7 @@
 {
     if (!tm)
     	return;
-    moko_wm_cmd (tm, 
-    			GTK_WIDGET (tm->l->list_view), CMD_CLOSE_WINDOW);
+    moko_wm_cmd (tm, GTK_WIDGET (tm->l->list_view), CMD_CLOSE_WINDOW);
 }
 
 void
@@ -95,7 +92,7 @@
     GtkTreeModel *model;
     Window *win;
     GSList *list = NULL;
-    
+
     gtk_tree_selection_get_selected (sel, &model, &iter);
 
     if (!gtk_tree_model_get_iter_first (model, &iter))
@@ -110,19 +107,12 @@
     	}
     while (1);
 
-   do{
-   	mbcommand (GDK_DISPLAY(), CMD_CLOSE_WINDOW, list->data, NULL); 
-   	g_debug ("%d", list->data);
-  
+   do
+   {
+        mbcommand (GDK_DISPLAY(), CMD_CLOSE_WINDOW, list->data, NULL); 
 	}
     while (list = g_slist_next (list));
-    	  /*Window w;
-
-    	  gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, OBJECT_COL, &w, -1);
-    	  mbcommand(GDK_DISPLAY(), task, w, NULL);
-    	  return TRUE;
-    	  }
-*/
+  
   if (list)
  	g_slist_free (list);
 }
@@ -133,8 +123,9 @@
     	return;
 
     gtk_window_iconify (GTK_WINDOW (tm->window));
+	moko_dbus_send_message ("");
 }
-
+/*
 void
 moko_tab_event_cb (GtkButton *btn, MokoTaskList *l) 
 {
@@ -165,20 +156,26 @@
 {
   
 }
-
+*/
 void
 moko_wheel_left_up_press_cb (GtkWidget *self, MokoTaskManager *tm)
 {
-   GtkTreeSelection    *selection;
-   GtkTreeModel        *model;
-   GtkTreeIter         iter;
+   GtkTreeSelection *selection;
+   GtkTreeModel *model;
+   GtkTreeIter iter;
    GtkTreePath* path;
 
+   if (!tm->l->list_view)
+ 	return;
+
    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tm->l->list_view));
 
    if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+   {
+     moko_dbus_send_message ("");
 	 return;
-   
+   }
+
    path = gtk_tree_model_get_path (model, &iter);
    if (!gtk_tree_path_prev (path))
    {
@@ -194,9 +191,9 @@
 void
 moko_wheel_right_down_press_cb (GtkWidget *self, MokoTaskManager *tm)
 {
-   GtkTreeSelection    *selection;
-   GtkTreeModel        *model;
-   GtkTreeIter         iter;
+   GtkTreeSelection *selection;
+   GtkTreeModel *model;
+   GtkTreeIter iter;
    GtkTreePath* path;
 
    if (!tm->l->list_view)
@@ -205,7 +202,10 @@
    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tm->l->list_view));
 
    if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+   {
+     moko_dbus_send_message ("");
 	 return;
+   }
    
    path = gtk_tree_model_get_path (model, &iter);
    gtk_tree_path_next (path);
@@ -216,4 +216,4 @@
    gtk_tree_view_set_cursor (GTK_TREE_VIEW (tm->l->list_view), path, 0, 0);
    gtk_tree_path_free (path);
    return;
- }
+}





More information about the commitlog mailing list