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. r1256 -
      trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep
      ([EMAIL PROTECTED])
   2. r1257 -
      trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0
      ([EMAIL PROTECTED])
   3. r1258 -
      trunk/src/target/OM-2007/applications/openmoko-messages/src
      ([EMAIL PROTECTED])
   4. r1259 -
      trunk/src/target/OM-2007/applications/openmoko-keyboard/src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: jiang_li
Date: 2007-03-07 06:59:44 +0100 (Wed, 07 Mar 2007)
New Revision: 1256

Modified:
   trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c
   
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c
Log:
This commit modify the code to ensure that only one instance of simple 
mediaplayer exists. 


Modified: 
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c    
    2007-03-06 09:15:57 UTC (rev 1255)
+++ 
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/main.c    
    2007-03-07 05:59:44 UTC (rev 1256)
@@ -880,6 +880,14 @@
     gtk_widget_destroy(dialog);
 }
 */
+
+static void
+handler_sigusr1(int value)
+{
+    openmoko_show_created_window();
+    signal(SIGUSR1, handler_sigusr1);
+}
+
 static pid_t
 testlock(char* fname)
 {
@@ -948,14 +956,15 @@
 main(gint argc, gchar ** argv)
 {
     //added by lijiang
-    pid_t lockmusicplayer;
-    lockmusicplayer = testlock("/tmp/musicplayer.lock");
-    if(lockmusicplayer > 0)
+    pid_t locksimplemusicplayer;
+    locksimplemusicplayer = testlock("/tmp/simplemusicplayer.lock");
+    if(locksimplemusicplayer > 0)
     {
         printf("Already running a instance\n");
+        kill(locksimplemusicplayer, SIGUSR1);
         return 0;
     }
-    setlock("/tmp/musicplayer.lock");
+    setlock("/tmp/simplemusicplayer.lock");
     //added end
        
     //BmpCmdLineOpt options;
@@ -1094,6 +1103,8 @@
 //    g_free(audio_path);
    
     openmoko_mainwin_create();
+
+    signal(SIGUSR1, handler_sigusr1);
     
     gtk_main();
 

Modified: 
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c 
    2007-03-06 09:15:57 UTC (rev 1255)
+++ 
trunk/src/target/OM-2007/applications/openmoko-simplemediaplayer/beep/mainwin.c 
    2007-03-07 05:59:44 UTC (rev 1256)
@@ -4144,6 +4144,20 @@
     g_free(prefix);
 }
 
+static GtkWidget* created_mainwin = NULL;
+
+void
+openmoko_show_created_window()
+{
+    if(created_mainwin == NULL)
+    {
+        g_print("can not get the saved main window pointer\n");
+       return;
+    }
+    gtk_window_present(GTK_WINDOW(created_mainwin));
+    return;
+}
+
 void 
 openmoko_mainwin_create()
 {
@@ -4166,12 +4180,15 @@
     
 //    MokoApplication *app = MOKO_APPLICATION(moko_application_get_instance());
 
-    MokoFingerWindow *window = MOKO_FINGER_WINDOW(moko_finger_window_new());
-    g_signal_connect(G_OBJECT(window), "destroy", 
G_CALLBACK(openmoko_main_quit), NULL);
-    gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
+    MokoFingerWindow *mainwin = MOKO_FINGER_WINDOW(moko_finger_window_new());
+    g_signal_connect(G_OBJECT(mainwin), "destroy", 
G_CALLBACK(openmoko_main_quit), NULL);
+    gtk_window_set_decorated(GTK_WINDOW(mainwin), FALSE);
 
+    //save the main window pointer
+    created_mainwin = GTK_WIDGET(mainwin);
+
     fixed = MOKO_FIXED(moko_fixed_new());
-    moko_finger_window_set_contents(window, GTK_WIDGET(fixed));
+    moko_finger_window_set_contents(mainwin, GTK_WIDGET(fixed));
    
 /*******************************************/
     background_vbox = gtk_vbox_new(FALSE, 0);
@@ -4535,35 +4552,35 @@
     btn_set_center_image(GTK_BUTTON(playlist_button), GTK_IMAGE(image));
 /*******************************************/
     
-    gtk_widget_show_all(GTK_WIDGET(window));
-    gtk_window_present(GTK_WINDOW(window));
+    gtk_widget_show_all(GTK_WIDGET(mainwin));
+    gtk_window_present(GTK_WINDOW(mainwin));
     
-    gtk_widget_show(GTK_WIDGET(moko_finger_window_get_wheel(window)));
+    gtk_widget_show(GTK_WIDGET(moko_finger_window_get_wheel(mainwin)));
     
-    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(window)),
+    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(mainwin)),
                    "press_left_up",
                    G_CALLBACK(openmoko_wheel_press_left_up_cb),
                    NULL);
-    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(window)),
+    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(mainwin)),
                    "long_press_left_up",
                    G_CALLBACK(openmoko_wheel_press_left_up_cb),
                    NULL);
-    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(window)),
+    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(mainwin)),
                    "press_right_down",
                    G_CALLBACK(openmoko_wheel_press_right_down_cb),
                    NULL);
-    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(window)),
+    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(mainwin)),
                    "long_press_right_down",
                    G_CALLBACK(openmoko_wheel_press_right_down_cb),
                    NULL);
-    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(window)),
+    g_signal_connect(G_OBJECT(moko_finger_window_get_wheel(mainwin)),
                    "press_bottom",
                    G_CALLBACK(openmoko_main_quit),
                    NULL);
 
     if(!tools)
     {
-        tools = 
MOKO_FINGER_TOOL_BOX(moko_finger_window_get_toolbox(MOKO_FINGER_WINDOW(window)));
+        tools = 
MOKO_FINGER_TOOL_BOX(moko_finger_window_get_toolbox(MOKO_FINGER_WINDOW(mainwin)));
        
        prev_button = 
GTK_BUTTON(moko_finger_tool_box_add_button_without_label(MOKO_FINGER_TOOL_BOX(tools)));
         image_path = g_build_path("/", images_dir, "ico-previoustrack.png", 
NULL);
@@ -4608,4 +4625,6 @@
     dbus_bus_add_match(bus, 
"type='signal',interface='com.burtonini.dbus.Signal'", &error);
     dbus_connection_add_filter(bus, signal_filter, mainwin, NULL);
     //added end
+    
+    return;
 }




--- End Message ---
--- Begin Message ---
Author: ken_zhao
Date: 2007-03-07 08:16:39 +0100 (Wed, 07 Mar 2007)
New Revision: 1257

Modified:
   trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkbutton
Log:
fix bug 228:
openmoko-stylus-demo and openmoko-appmanager runs OK.
contacts still crashes.



Modified: 
trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkbutton
===================================================================
--- trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkbutton 
2007-03-07 05:59:44 UTC (rev 1256)
+++ trunk/src/target/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/gtkbutton 
2007-03-07 07:16:39 UTC (rev 1257)
@@ -5,7 +5,7 @@
             recolorable     = TRUE
             state           = NORMAL
             file            = "gtkbutton.png"
-            border          = { 22, 33, 18, 25 }
+#            border          = { 22, 33, 18, 25 }
             stretch         = TRUE
         }
         image {
@@ -13,7 +13,7 @@
             recolorable     = TRUE
             state           = PRELIGHT
             file            = "gtkbutton.png"
-            border          = { 22, 33, 18, 25 }
+#            border          = { 22, 33, 18, 25 }
             stretch         = TRUE
         }
         image {
@@ -21,7 +21,7 @@
             recolorable     = TRUE
             state           = ACTIVE
             file            = "gtkbutton_p.png"
-            border          = { 22, 33, 18, 25 }
+#            border          = { 22, 33, 18, 25 }
             stretch         = TRUE
         }
     }




--- End Message ---
--- Begin Message ---
Author: alex_tang
Date: 2007-03-07 09:38:01 +0100 (Wed, 07 Mar 2007)
New Revision: 1258

Modified:
   trunk/src/target/OM-2007/applications/openmoko-messages/src/callbacks.c
   trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c
   trunk/src/target/OM-2007/applications/openmoko-messages/src/main.h
Log:
Add get_model_number to get current folder's message number.
Add search key word initializtion.


Modified: 
trunk/src/target/OM-2007/applications/openmoko-messages/src/callbacks.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-messages/src/callbacks.c     
2007-03-07 07:16:39 UTC (rev 1257)
+++ trunk/src/target/OM-2007/applications/openmoko-messages/src/callbacks.c     
2007-03-07 08:38:01 UTC (rev 1258)
@@ -22,12 +22,30 @@
 #include "detail-area.h"
 #include <gtk/gtk.h>
 
+static gboolean 
+model_number_helper (GtkTreeModel* model,
+                    GtkTreePath*  path,
+                    GtkTreeIter*  iter,
+                    gpointer      data)
+{
+    MessengerData* d = (MessengerData*)data;
+    d->msg_num ++;
+    return FALSE;
+}
 
+gint get_model_number (MessengerData* d)
+{
+    d->msg_num = 0;
+    gtk_tree_model_foreach (d->filter,model_number_helper,d);
+    return d->msg_num;
+}
+
 gboolean cb_filter_changed(GtkWidget* widget, gchar* text, MessengerData* d)
 {
-    g_debug("changed to %s folder",text);
+    //g_debug("changed to %s folder",text);
     d->currentfolder = g_strdup(text);
     gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER(d->filter));
+    g_debug("folder %s has %d messages",text,get_model_number(d));
     
     return FALSE;
 }
@@ -448,7 +466,7 @@
     GtkWidget* search_entry = GTK_WIDGET(editable);
     d->s_key = g_strdup (gtk_entry_get_text(GTK_ENTRY(search_entry)));
     gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER(d->filter));
-    g_debug ("search %s",d->s_key);
+    g_debug ("search %s, result has %d messages",d->s_key,get_model_number(d));
 }
 
 void cb_search_on (MessengerData* d)

Modified: trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c  
2007-03-07 07:16:39 UTC (rev 1257)
+++ trunk/src/target/OM-2007/applications/openmoko-messages/src/main.c  
2007-03-07 08:38:01 UTC (rev 1258)
@@ -111,7 +111,6 @@
     lockapp = testlock ("/tmp/messages.lock");
     if (lockapp > 0)
      {
-       //kill (lockapp, SIGUSR1);
        g_debug("Openmoko messages is already running");
        return 0;
      }
@@ -119,6 +118,8 @@
 
     MessengerData* d = g_new ( MessengerData, 1);
     d->foldersdb = foldersdb_new();
+    d->s_key = "";
+    d->msg_num = 0;
     d->app = MOKO_APPLICATION (moko_application_get_instance());
     d->currentfolder = g_strdup("Inbox");
     g_set_application_name( "Messages" ); 

Modified: trunk/src/target/OM-2007/applications/openmoko-messages/src/main.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-messages/src/main.h  
2007-03-07 07:16:39 UTC (rev 1257)
+++ trunk/src/target/OM-2007/applications/openmoko-messages/src/main.h  
2007-03-07 08:38:01 UTC (rev 1258)
@@ -44,6 +44,7 @@
     GSList* folderlist;
     gchar* currentfolder;
     gchar* s_key;
+    gint   msg_num;
     gboolean searchOn;
     GtkWidget* nfEntry;
     GtkWidget* frEntry;




--- End Message ---
--- Begin Message ---
Author: caowai_song
Date: 2007-03-07 10:07:29 +0100 (Wed, 07 Mar 2007)
New Revision: 1259

Modified:
   
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-ui-xft-backend.c
Log:
Remove unnecessory debug message.


Modified: 
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-ui-xft-backend.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-ui-xft-backend.c
      2007-03-07 08:38:01 UTC (rev 1258)
+++ 
trunk/src/target/OM-2007/applications/openmoko-keyboard/src/matchbox-keyboard-ui-xft-backend.c
      2007-03-07 09:07:29 UTC (rev 1259)
@@ -364,7 +364,6 @@
   if (mb_kbd_layout_realsize(layout))
     {
       image_name = mb_kbd_layout_get_changerground(layout);
-      printf("changer background=%s\n", image_name);
       if ((image = mb_kbd_image_new(mb_kbd_ui_kbd(ui), image_name)) != NULL)
         {
           int x, y, w, h;
@@ -382,7 +381,6 @@
                            0, 0, 0, 0, x, y, w, h);
 
           mb_kbd_image_destroy(image);
-          fprintf(stderr, "print changer background\n");
         }
     }
 




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

Reply via email to