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. r1835 -
      trunk/src/target/OM-2007/applications/openmoko-dialer/src
      ([EMAIL PROTECTED])
   2. r1836 -
      trunk/src/target/OM-2007/applications/openmoko-dialer/src
      ([EMAIL PROTECTED])
   3. r1837 -
      trunk/src/target/OM-2007/applications/openmoko-dialer/src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: thomas
Date: 2007-04-25 15:34:01 +0200 (Wed, 25 Apr 2007)
New Revision: 1835

Modified:
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
Log:
* Convert files to UNIX format


Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-04-25 11:28:46 UTC (rev 1834)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-04-25 13:34:01 UTC (rev 1835)
@@ -1,45 +1,45 @@
-/*   openmoko-dialer-window-incoming.c
- *
- *  Authored by Tony Guan<[EMAIL PROTECTED]>
- *
- *  Copyright (C) 2006 FIC Shanghai Lab
- *
- *  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 Lesser Public License for more details.
- *
- *  Current Version: $Rev$ ($Date) [$Author: Tony Guan $]
- */  
-  
-#include <libmokoui/moko-finger-tool-box.h>
-#include <libmokoui/moko-finger-window.h>
-#include <libmokoui/moko-finger-wheel.h>
-#include <libmokoui/moko-pixmap-button.h>
-  
-#include <gtk/gtkalignment.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkvbox.h>
-  
-#include "contacts.h"
-#include "openmoko-dialer-main.h"
-#include "moko-dialer-status.h"
-#include "openmoko-dialer-window-incoming.h"
-#include "openmoko-dialer-window-talking.h"
-#include "openmoko-dialer-window-history.h"
-#include "history.h"
-
void 
+/*   openmoko-dialer-window-incoming.c
+ *
+ *  Authored by Tony Guan<[EMAIL PROTECTED]>
+ *
+ *  Copyright (C) 2006 FIC Shanghai Lab
+ *
+ *  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 Lesser Public License for more details.
+ *
+ *  Current Version: $Rev$ ($Date) [$Author: Tony Guan $]
+ */  
+  
+#include <libmokoui/moko-finger-tool-box.h>
+#include <libmokoui/moko-finger-window.h>
+#include <libmokoui/moko-finger-wheel.h>
+#include <libmokoui/moko-pixmap-button.h>
+  
+#include <gtk/gtkalignment.h>
+#include <gtk/gtkbutton.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkmenu.h>
+#include <gtk/gtkmenuitem.h>
+#include <gtk/gtkvbox.h>
+  
+#include "contacts.h"
+#include "openmoko-dialer-main.h"
+#include "moko-dialer-status.h"
+#include "openmoko-dialer-window-incoming.h"
+#include "openmoko-dialer-window-talking.h"
+#include "openmoko-dialer-window-history.h"
+#include "history.h"
+
void 
 cb_answer_button_clicked (GtkButton * button,
-                          MokoDialerData * appdata) 
+                          MokoDialerData * appdata) 
 {
   DBG_ENTER ();
   appdata->g_state.callstate = STATE_TALKING;
@@ -57,16 +57,16 @@
 
 void
 cb_ignore_button_clicked (GtkButton * button,
-                          MokoDialerData * appdata) 
+                          MokoDialerData * appdata) 
 {
   
DBG_ENTER ();
   
DBG_MESSAGE ("We will mute the phone for this call.");
   
appdata->g_state.callstate = STATE_IGNORED;
   
DBG_LEAVE ();
-
} 

void 
+
} 

void 
 
 cb_reject_button_clicked (GtkButton * button,
-                          MokoDialerData * appdata) 
+                          MokoDialerData * appdata) 
 {
   DBG_ENTER ();
   /* TODO: MokoGsmdConnection->hangup
@@ -78,84 +78,84 @@
 }
 
 void
-window_incoming_prepare (MokoDialerData * appdata) 
+window_incoming_prepare (MokoDialerData * appdata) 
 {
   
if (!appdata)
-    
+    
   {
     
DBG_WARN ("appdata=NULL!");
     
return;
   
}
   

if (appdata->window_incoming == 0)
-    
+    
   {
     
window_incoming_init (appdata);
   
}
   

moko_dialer_status_set_person_number (appdata->status_incoming,
                                           
appdata->g_peer_info.number);
   
if (appdata->g_peer_info.hasname)
-    
+    
   {
     

moko_dialer_status_set_person_image (appdata->status_incoming,
                                            
appdata->g_peer_info.ID);
     
moko_dialer_status_set_person_name (appdata->status_incoming,
                                          
appdata->g_peer_info.name);
   
}
-  
+  
   else
-    
+    
   {
     
moko_dialer_status_set_person_image (appdata->status_incoming, "");
     
moko_dialer_status_set_person_name (appdata->status_incoming, "");
   

}
 



}
-

void 
-window_incoming_fails (MokoDialerData * appdata) 
+

void 
+window_incoming_fails (MokoDialerData * appdata) 
 {
   
DBG_ENTER ();
   
DBG_LEAVE ();
-
} 

gint 
 timer_incoming_time_out (MokoDialerData * appdata) 
+
} 

gint 
 timer_incoming_time_out (MokoDialerData * appdata) 
 {
-  
-//DBG_ENTER();
+  
+//DBG_ENTER();
     TIMER_DATA * timer_data = &(appdata->g_timer_data);
   

moko_dialer_status_update_icon (appdata->status_incoming);
-  
-//now that we have the incoming call status report correctly, the timeout 
mechanism is not needed.
-/*
-  if (event_get_keep_calling ())
-  {
-    event_reset_keep_calling ();
-    timer_data->ticks = 0;
-  }
-  else
-  {                             //we count 4 before we confirm that there are 
no calling at all.
-    if (timer_data->ticks >= 3)
-    {
-      DBG_MESSAGE ("THE CALLER aborted, we quit.");
-      gsm_hangup ();
-      appdata->g_state.callstate = STATE_MISSED;
-      appdata->g_state.historytype = MISSED;
-      gdk_threads_enter ();
-      gtk_widget_hide (appdata->window_incoming);
-      gdk_threads_leave ();
-      return 0;                 //don't lookout the timeout.
-    }
-    else
-    {
-      DBG_MESSAGE ("ticks=%d", timer_data->ticks);
-      timer_data->ticks++;
-    }
-  }
-*/ 
+  
+//now that we have the incoming call status report correctly, the timeout 
mechanism is not needed.
+/*
+  if (event_get_keep_calling ())
+  {
+    event_reset_keep_calling ();
+    timer_data->ticks = 0;
+  }
+  else
+  {                             //we count 4 before we confirm that there are 
no calling at all.
+    if (timer_data->ticks >= 3)
+    {
+      DBG_MESSAGE ("THE CALLER aborted, we quit.");
+      gsm_hangup ();
+      appdata->g_state.callstate = STATE_MISSED;
+      appdata->g_state.historytype = MISSED;
+      gdk_threads_enter ();
+      gtk_widget_hide (appdata->window_incoming);
+      gdk_threads_leave ();
+      return 0;                 //don't lookout the timeout.
+    }
+    else
+    {
+      DBG_MESSAGE ("ticks=%d", timer_data->ticks);
+      timer_data->ticks++;
+    }
+  }
+*/ 
     return 1;
 


}
-



void 
-on_window_incoming_hide (GtkWidget * widget, MokoDialerData * appdata) 
+



void 
+on_window_incoming_hide (GtkWidget * widget, MokoDialerData * appdata) 
 {
   

DBG_ENTER ();
   

if (appdata->g_timer_data.ptimer != 0)
-    
+    
   {
     
g_source_remove (appdata->g_timer_data.ptimer);
     
appdata->g_timer_data.ptimer = 0;
@@ -164,8 +164,8 @@
   
event_reset_incoming_signaled ();
   
event_reset_keep_calling ();
   

if (appdata->g_state.callstate != STATE_TALKING)
-    
-  {                             //     
add_histroy_entry(g_state.historytype,g_state.contactinfo.name,g_state.contactinfo.number,g_state.contactinfo.picpath,g_state.starttime,0);
+    
+  {                             //     
add_histroy_entry(g_state.historytype,g_state.contactinfo.name,g_state.contactinfo.number,g_state.contactinfo.picpath,g_state.starttime,0);
     
add_histroy_entry (appdata, appdata->g_state.historytype,
                         
appdata->g_peer_info.name,
                         
appdata->g_peer_info.number,
@@ -175,8 +175,8 @@
   

}
   

DBG_LEAVE ();
 
}
-

void 
-window_incoming_setup_timer (MokoDialerData * appdata) 
+

void 
+window_incoming_setup_timer (MokoDialerData * appdata) 
 {
   
time_t timep;
   
struct tm *p;
@@ -187,7 +187,7 @@
   
sprintf (appdata->g_state.startdate, "%04d/%02d/%02d", p->tm_year,
             
p->tm_mon, p->tm_mday);
   

if (appdata->g_timer_data.ptimer != 0)
-    
+    
   {
     
g_source_remove (appdata->g_timer_data.ptimer);
     
appdata->g_timer_data.ptimer = 0;
@@ -198,21 +198,21 @@
     
g_timeout_add (1000, (GSourceFunc) timer_incoming_time_out,
                     (gpointer) appdata);
 


}
-

void 
-on_window_incoming_show (GtkWidget * widget, MokoDialerData * appdata) 
+

void 
+on_window_incoming_show (GtkWidget * widget, MokoDialerData * appdata) 
 {
   

DBG_ENTER ();
   
appdata->g_state.callstate = STATE_INCOMING;
   
window_incoming_setup_timer (appdata);
   
DBG_LEAVE ();
-

} 


gint 
 window_incoming_init (MokoDialerData * p_dialer_data) 
+

} 


gint 
 window_incoming_init (MokoDialerData * p_dialer_data) 
 {
   

DBG_ENTER ();
   
MokoFingerWindow * window;
   
GtkWidget * vbox;
   
GtkWidget * status;
   

if (p_dialer_data->window_incoming == 0)
-    
+    
   {
     

vbox = gtk_vbox_new (FALSE, 0);
     
status = moko_dialer_status_new ();
@@ -247,16 +247,16 @@
     
gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
                          10);
     




gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 50);
-    
-//currently     MokoDialogWindow is not finished, wating...
-//   MokoDialogWindow* window = (MokoDialogWindow *)(moko_dialog_window_new());
-//  moko_dialog_window_set_contents( window, GTK_WIDGET(vbox) );
+    
+//currently     MokoDialogWindow is not finished, wating...
+//   MokoDialogWindow* window = (MokoDialogWindow *)(moko_dialog_window_new());
+//  moko_dialog_window_set_contents( window, GTK_WIDGET(vbox) );
       
window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
     
moko_finger_window_set_contents (window, GTK_WIDGET (vbox));
-    
-      //FIXME: dear thomas, I know that show & hide is not good, but when you 
removed the following 2 lines, the incoming window
-      //is simply not displaying well. please have a try and then commit. If 
you cannot test the incoming window, you can simply modify the code to show it 
out debuggingly.
-      //Pardon me to re-add the 2 lines. Tony Guan 14,3,2007
+    
+      //FIXME: dear thomas, I know that show & hide is not good, but when you 
removed the following 2 lines, the incoming window
+      //is simply not displaying well. please have a try and then commit. If 
you cannot test the incoming window, you can simply modify the code to show it 
out debuggingly.
+      //Pardon me to re-add the 2 lines. Tony Guan 14,3,2007
       gtk_widget_show_all (GTK_WIDGET (window));
     
gtk_widget_hide (GTK_WIDGET (window));
     

moko_dialer_status_set_title_label (MOKO_DIALER_STATUS (status),
@@ -264,8 +264,8 @@
     
moko_dialer_status_set_status_label (MOKO_DIALER_STATUS (status), "");
     

p_dialer_data->window_incoming = GTK_WIDGET (window);
     
p_dialer_data->status_incoming = MOKO_DIALER_STATUS (status);
-    
-//   
DBG_MESSAGE("p_dialer_data->status_incoming=0X%x",p_dialer_data->status_incoming);
+    
+//   
DBG_MESSAGE("p_dialer_data->status_incoming=0X%x",p_dialer_data->status_incoming);
       

g_signal_connect ((gpointer) window, "show",
                           
G_CALLBACK (on_window_incoming_show),
                           p_dialer_data);
@@ -276,4 +276,4 @@
   
return 1;
 
}
 
-
+




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-25 16:04:10 +0200 (Wed, 25 Apr 2007)
New Revision: 1836

Modified:
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.c
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
Log:
* Remove spurious carriage returns


Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.c  
    2007-04-25 13:34:01 UTC (rev 1835)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.c  
    2007-04-25 14:04:10 UTC (rev 1836)
@@ -191,7 +191,7 @@
 moko_dialer_status_set_error_icon (MokoDialerStatus * moko_dialer_status,
                                    const gchar * text)
 {
-  
moko_dialer_status->iconError = create_pixbuf (text);
+  moko_dialer_status->iconError = create_pixbuf (text);
 //      
file_load_person_image_from_relative_path(moko_dialer_status->iconError,text);
 }
 

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-04-25 13:34:01 UTC (rev 1835)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-04-25 14:04:10 UTC (rev 1836)
@@ -37,7 +37,7 @@
 #include "openmoko-dialer-window-talking.h"
 #include "openmoko-dialer-window-history.h"
 #include "history.h"
-
void 
+void 
 cb_answer_button_clicked (GtkButton * button,
                           MokoDialerData * appdata) 
 {
@@ -52,18 +52,18 @@
   //transfer the contact info
    window_talking_prepare (appdata);
   gtk_widget_show (appdata->window_talking);
-  

DBG_LEAVE ();
+  DBG_LEAVE ();
 } 
 
 void
 cb_ignore_button_clicked (GtkButton * button,
                           MokoDialerData * appdata) 
 {
-  
DBG_ENTER ();
-  
DBG_MESSAGE ("We will mute the phone for this call.");
-  
appdata->g_state.callstate = STATE_IGNORED;
-  
DBG_LEAVE ();
-
} 

void 
+  DBG_ENTER ();
+  DBG_MESSAGE ("We will mute the phone for this call.");
+  appdata->g_state.callstate = STATE_IGNORED;
+  DBG_LEAVE ();
+} void 
 
 cb_reject_button_clicked (GtkButton * button,
                           MokoDialerData * appdata) 
@@ -80,46 +80,46 @@
 void
 window_incoming_prepare (MokoDialerData * appdata) 
 {
-  
if (!appdata)
+  if (!appdata)
     
   {
-    
DBG_WARN ("appdata=NULL!");
-    
return;
-  
}
-  

if (appdata->window_incoming == 0)
+    DBG_WARN ("appdata=NULL!");
+    return;
+  }
+  if (appdata->window_incoming == 0)
     
   {
-    
window_incoming_init (appdata);
-  
}
-  

moko_dialer_status_set_person_number (appdata->status_incoming,
-                                          
appdata->g_peer_info.number);
-  
if (appdata->g_peer_info.hasname)
+    window_incoming_init (appdata);
+  }
+  moko_dialer_status_set_person_number (appdata->status_incoming,
+                                          appdata->g_peer_info.number);
+  if (appdata->g_peer_info.hasname)
     
   {
-    

moko_dialer_status_set_person_image (appdata->status_incoming,
-                                           
appdata->g_peer_info.ID);
-    
moko_dialer_status_set_person_name (appdata->status_incoming,
-                                         
appdata->g_peer_info.name);
-  
}
+    moko_dialer_status_set_person_image (appdata->status_incoming,
+                                           appdata->g_peer_info.ID);
+    moko_dialer_status_set_person_name (appdata->status_incoming,
+                                         appdata->g_peer_info.name);
+  }
   
   else
     
   {
-    
moko_dialer_status_set_person_image (appdata->status_incoming, "");
-    
moko_dialer_status_set_person_name (appdata->status_incoming, "");
-  

}
-



}
-

void 
+    moko_dialer_status_set_person_image (appdata->status_incoming, "");
+    moko_dialer_status_set_person_name (appdata->status_incoming, "");
+  }
+}
+void 
 window_incoming_fails (MokoDialerData * appdata) 
 {
-  
DBG_ENTER ();
-  
DBG_LEAVE ();
-
} 

gint 
 timer_incoming_time_out (MokoDialerData * appdata) 
+  DBG_ENTER ();
+  DBG_LEAVE ();
+} gint  timer_incoming_time_out (MokoDialerData * appdata) 
 {
   
 //DBG_ENTER();
     TIMER_DATA * timer_data = &(appdata->g_timer_data);
-  

moko_dialer_status_update_icon (appdata->status_incoming);
+  moko_dialer_status_update_icon (appdata->status_incoming);
   
 //now that we have the incoming call status report correctly, the timeout 
mechanism is not needed.
 /*
@@ -149,131 +149,131 @@
   }
 */ 
     return 1;
-


}
-



void 
+}
+void 
 on_window_incoming_hide (GtkWidget * widget, MokoDialerData * appdata) 
 {
-  

DBG_ENTER ();
-  

if (appdata->g_timer_data.ptimer != 0)
+  DBG_ENTER ();
+  if (appdata->g_timer_data.ptimer != 0)
     
   {
-    
g_source_remove (appdata->g_timer_data.ptimer);
-    
appdata->g_timer_data.ptimer = 0;
-  
}
-  

event_reset_clip_signaled ();
-  
event_reset_incoming_signaled ();
-  
event_reset_keep_calling ();
-  

if (appdata->g_state.callstate != STATE_TALKING)
+    g_source_remove (appdata->g_timer_data.ptimer);
+    appdata->g_timer_data.ptimer = 0;
+  }
+  event_reset_clip_signaled ();
+  event_reset_incoming_signaled ();
+  event_reset_keep_calling ();
+  if (appdata->g_state.callstate != STATE_TALKING)
     
   {                             //     
add_histroy_entry(g_state.historytype,g_state.contactinfo.name,g_state.contactinfo.number,g_state.contactinfo.picpath,g_state.starttime,0);
-    
add_histroy_entry (appdata, appdata->g_state.historytype,
-                        
appdata->g_peer_info.name,
-                        
appdata->g_peer_info.number,
-                        
appdata->g_peer_info.ID,
-                        
appdata->g_state.starttime,
-                        
appdata->g_state.startdate, 0);
-  

}
-  

DBG_LEAVE ();
-
}
-

void 
+    add_histroy_entry (appdata, appdata->g_state.historytype,
+                        appdata->g_peer_info.name,
+                        appdata->g_peer_info.number,
+                        appdata->g_peer_info.ID,
+                        appdata->g_state.starttime,
+                        appdata->g_state.startdate, 0);
+  }
+  DBG_LEAVE ();
+}
+void 
 window_incoming_setup_timer (MokoDialerData * appdata) 
 {
-  
time_t timep;
-  
struct tm *p;
-  
time (&timep);
-  
p = localtime (&timep);
-  

sprintf (appdata->g_state.starttime, "%02d:%02d:%02d", p->tm_hour,
-             
p->tm_min, p->tm_sec);
-  
sprintf (appdata->g_state.startdate, "%04d/%02d/%02d", p->tm_year,
-            
p->tm_mon, p->tm_mday);
-  

if (appdata->g_timer_data.ptimer != 0)
+  time_t timep;
+  struct tm *p;
+  time (&timep);
+  p = localtime (&timep);
+  sprintf (appdata->g_state.starttime, "%02d:%02d:%02d", p->tm_hour,
+             p->tm_min, p->tm_sec);
+  sprintf (appdata->g_state.startdate, "%04d/%02d/%02d", p->tm_year,
+            p->tm_mon, p->tm_mday);
+  if (appdata->g_timer_data.ptimer != 0)
     
   {
-    
g_source_remove (appdata->g_timer_data.ptimer);
-    
appdata->g_timer_data.ptimer = 0;
-  
}
-  

memset (&(appdata->g_timer_data), 0, sizeof (appdata->g_timer_data));
-  

appdata->g_timer_data.stopsec = 0;
-  

appdata->g_timer_data.ptimer =
-    
g_timeout_add (1000, (GSourceFunc) timer_incoming_time_out,
+    g_source_remove (appdata->g_timer_data.ptimer);
+    appdata->g_timer_data.ptimer = 0;
+  }
+  memset (&(appdata->g_timer_data), 0, sizeof (appdata->g_timer_data));
+  appdata->g_timer_data.stopsec = 0;
+  appdata->g_timer_data.ptimer =
+    g_timeout_add (1000, (GSourceFunc) timer_incoming_time_out,
                     (gpointer) appdata);
-


}
-

void 
+}
+void 
 on_window_incoming_show (GtkWidget * widget, MokoDialerData * appdata) 
 {
-  

DBG_ENTER ();
-  
appdata->g_state.callstate = STATE_INCOMING;
-  
window_incoming_setup_timer (appdata);
-  
DBG_LEAVE ();
-

} 


gint 
 window_incoming_init (MokoDialerData * p_dialer_data) 
+  DBG_ENTER ();
+  appdata->g_state.callstate = STATE_INCOMING;
+  window_incoming_setup_timer (appdata);
+  DBG_LEAVE ();
+} gint  window_incoming_init (MokoDialerData * p_dialer_data) 
 {
-  

DBG_ENTER ();
-  
MokoFingerWindow * window;
-  
GtkWidget * vbox;
-  
GtkWidget * status;
-  

if (p_dialer_data->window_incoming == 0)
+  DBG_ENTER ();
+  MokoFingerWindow * window;
+  GtkWidget * vbox;
+  GtkWidget * status;
+  if (p_dialer_data->window_incoming == 0)
     
   {
-    

vbox = gtk_vbox_new (FALSE, 0);
-    
status = moko_dialer_status_new ();
-    
moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
+    vbox = gtk_vbox_new (FALSE, 0);
+    status = moko_dialer_status_new ();
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
                                          "incoming_0.png");
-    
moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
                                          "incoming_1.png");
-    
moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
                                          "incoming_2.png");
-    
moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status),
                                          "incoming_3.png");
-    
moko_dialer_status_set_icon_by_index (MOKO_DIALER_STATUS (status), 0);
-    

gtk_box_pack_start (GTK_BOX (vbox), status, FALSE, FALSE, 0);
-    


GtkWidget * hbox2 = gtk_hbox_new (FALSE, 0);
-    
GtkWidget * button = gtk_button_new_with_label ("Answer");
-    
gtk_button_set_image (GTK_BUTTON (button),
+    moko_dialer_status_set_icon_by_index (MOKO_DIALER_STATUS (status), 0);
+    gtk_box_pack_start (GTK_BOX (vbox), status, FALSE, FALSE, 0);
+    GtkWidget * hbox2 = gtk_hbox_new (FALSE, 0);
+    GtkWidget * button = gtk_button_new_with_label ("Answer");
+    gtk_button_set_image (GTK_BUTTON (button),
                            file_new_image_from_relative_path ("answer.png"));
-    
g_signal_connect (G_OBJECT (button), "clicked",
-                       
G_CALLBACK (cb_answer_button_clicked), p_dialer_data);
-    

gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
+    g_signal_connect (G_OBJECT (button), "clicked",
+                       G_CALLBACK (cb_answer_button_clicked), p_dialer_data);
+    gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
                           10);
-    

button = gtk_button_new_with_label ("Ignore");
-    
g_signal_connect (G_OBJECT (button), "clicked",
-                       
G_CALLBACK (cb_ignore_button_clicked), p_dialer_data);
-    
gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
+    button = gtk_button_new_with_label ("Ignore");
+    g_signal_connect (G_OBJECT (button), "clicked",
+                       G_CALLBACK (cb_ignore_button_clicked), p_dialer_data);
+    gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
                          10);
-    



button = gtk_button_new_with_label ("Reject");
-    
gtk_button_set_image (GTK_BUTTON (button),
+    button = gtk_button_new_with_label ("Reject");
+    gtk_button_set_image (GTK_BUTTON (button),
                            file_new_image_from_relative_path ("cancel.png"));
-    
g_signal_connect (G_OBJECT (button), "clicked",
-                       
G_CALLBACK (cb_reject_button_clicked), p_dialer_data);
-    
gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
+    g_signal_connect (G_OBJECT (button), "clicked",
+                       G_CALLBACK (cb_reject_button_clicked), p_dialer_data);
+    gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE,
                          10);
-    




gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 50);
-    
+    gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 50);
+    
 //currently     MokoDialogWindow is not finished, wating...
 //   MokoDialogWindow* window = (MokoDialogWindow *)(moko_dialog_window_new());
 //  moko_dialog_window_set_contents( window, GTK_WIDGET(vbox) );
-      
window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
-    
moko_finger_window_set_contents (window, GTK_WIDGET (vbox));
+      window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
+    moko_finger_window_set_contents (window, GTK_WIDGET (vbox));
     
       //FIXME: dear thomas, I know that show & hide is not good, but when you 
removed the following 2 lines, the incoming window
       //is simply not displaying well. please have a try and then commit. If 
you cannot test the incoming window, you can simply modify the code to show it 
out debuggingly.
       //Pardon me to re-add the 2 lines. Tony Guan 14,3,2007
       gtk_widget_show_all (GTK_WIDGET (window));
-    
gtk_widget_hide (GTK_WIDGET (window));
-    

moko_dialer_status_set_title_label (MOKO_DIALER_STATUS (status),
+    gtk_widget_hide (GTK_WIDGET (window));
+    moko_dialer_status_set_title_label (MOKO_DIALER_STATUS (status),
                                           "Incoming call");
-    
moko_dialer_status_set_status_label (MOKO_DIALER_STATUS (status), "");
-    

p_dialer_data->window_incoming = GTK_WIDGET (window);
-    
p_dialer_data->status_incoming = MOKO_DIALER_STATUS (status);
-    
+    moko_dialer_status_set_status_label (MOKO_DIALER_STATUS (status), "");
+    p_dialer_data->window_incoming = GTK_WIDGET (window);
+    p_dialer_data->status_incoming = MOKO_DIALER_STATUS (status);
+    
 //   
DBG_MESSAGE("p_dialer_data->status_incoming=0X%x",p_dialer_data->status_incoming);
-      

g_signal_connect ((gpointer) window, "show",
-                          
G_CALLBACK (on_window_incoming_show),
+      g_signal_connect ((gpointer) window, "show",
+                          G_CALLBACK (on_window_incoming_show),
                           p_dialer_data);
-    
g_signal_connect ((gpointer) window, "hide",
-                       
G_CALLBACK (on_window_incoming_hide), p_dialer_data);
-  

}
-  


DBG_LEAVE ();
-  
return 1;
-
}
+    g_signal_connect ((gpointer) window, "hide",
+                       G_CALLBACK (on_window_incoming_hide), p_dialer_data);
+  }
+  DBG_LEAVE ();
+  return 1;
+}
 
-
+

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
      2007-04-25 13:34:01 UTC (rev 1835)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
      2007-04-25 14:04:10 UTC (rev 1836)
@@ -141,7 +141,7 @@
 
     GtkEventBox *eventbox1 = gtk_event_box_new ();
     gtk_widget_show (eventbox1);
-    
gtk_widget_set_name (GTK_WIDGET (eventbox1), "gtkeventbox-black");
+    gtk_widget_set_name (GTK_WIDGET (eventbox1), "gtkeventbox-black");
     gtk_widget_modify_bg (eventbox1, GTK_STATE_NORMAL, &color);
 //        gtk_widget_set_size_request (eventbox1, 480, 132);
 




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-04-25 16:12:36 +0200 (Wed, 25 Apr 2007)
New Revision: 1837

Removed:
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.c
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.h
Modified:
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
Log:
* Remove libgsmd event code


Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am       
2007-04-25 14:04:10 UTC (rev 1836)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/Makefile.am       
2007-04-25 14:12:36 UTC (rev 1837)
@@ -10,7 +10,6 @@
 moko-dialer-textview.c\
 moko-dialer-tip.c\
 moko-dialer-autolist.c\
-event.c\
 history.c\
 contacts.c\
 common.c\

Deleted: trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.c   
2007-04-25 14:04:10 UTC (rev 1836)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.c   
2007-04-25 14:12:36 UTC (rev 1837)
@@ -1,253 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <gdk/gdk.h>
-
-#include <libgsmd/libgsmd.h>
-#include <libgsmd/event.h>
-
-#include "moko-dialer-includes.h"
-
-static int IncomingSignaled;    ///<to keep communication with GUI
-static int ClipSignaled;        ///<to keep communication with GUI
-static int KeepCalling;
-
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
-
-int
-event_get_incoming_signaled ()
-{
-  return IncomingSignaled;
-}
-
-int
-event_set_incoming_signaled ()
-{
-  IncomingSignaled = 1;
-  return IncomingSignaled;
-}
-
-int
-event_reset_incoming_signaled ()
-{
-  IncomingSignaled = 0;
-  return 1;
-}
-
-int
-event_get_clip_signaled ()
-{
-  return ClipSignaled;
-
-}
-
-int
-event_set_clip_signaled ()
-{
-  ClipSignaled = 1;
-  return 1;
-
-}
-
-int
-event_reset_clip_signaled ()
-{
-  ClipSignaled = 0;
-  return 1;
-
-}
-
-int
-event_get_keep_calling ()
-{
-  return KeepCalling;
-}
-
-int
-event_set_keep_calling ()
-{
-  KeepCalling = 1;
-  return 1;
-}
-
-int
-event_reset_keep_calling ()
-{
-  KeepCalling = 0;
-  return 1;
-}
-
-static int
-incall_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
-{
-  printf ("EVENT: Incoming call type = %u\n", aux->u.call.type);
-
-  if (event_get_incoming_signaled ())
-  {
-    printf ("already signaled, just set keep_calling");
-    event_set_keep_calling ();
-  }
-  else
-  {
-    printf ("set incoming signaled");
-    event_set_incoming_signaled ();
-    //PhoneIncoming(0);     
-  }
-  return 0;
-}
-
-
-static int
-clip_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
-{
-  printf ("EVENT: Incoming call clip = %s\n", aux->u.clip.addr.number);
-  if (event_get_clip_signaled ())
-  {
-    printf ("already signaled, just set keep_calling");
-    event_set_keep_calling ();
-  }
-  else
-  {
-    event_set_clip_signaled ();
-    printf ("set clip signaled and call phoneincoming");
-    gdk_threads_enter ();
-    //here!
-    gsm_incoming_call (aux->u.clip.addr.number);
-//              PhoneIncomingClip(aux->u.clip.addr.number);
-    gdk_threads_leave ();
-  }
-  return 0;
-}
-
-static int
-netreg_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
-{
-  printf ("EVENT: Netreg ");
-
-  switch (aux->u.netreg.state)
-  {
-  case GSMD_NETREG_NONE:
-    printf ("not searching for network ");
-    break;
-  case 1:
-    printf ("registered (home network) ");
-    break;
-    /* 
-     * FIXME: these are not defined in gsmd/event.h
-     *
-     case 2:
-     printf ("searching for network ");
-     break;
-     case 3:
-     printf ("registration denied ");
-     break;
-     case 5:
-     printf ("registered (roaming) ");
-     break;
-     *
-     *
-     */
-  }
-
-  if (aux->u.netreg.lac)
-    printf ("LocationAreaCode = 0x%04X ", aux->u.netreg.lac);
-  if (aux->u.netreg.ci)
-    printf ("CellID = 0x%04X ", aux->u.netreg.ci);
-
-  printf ("\n");
-
-  return 0;
-}
-
-static int
-sigq_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
-{
-  printf ("EVENT: Signal Quality: %u\n", aux->u.signal.sigq.rssi);
-  return 0;
-}
-static const char *cprog_names[] = {
-  [GSMD_CALLPROG_SETUP] = "SETUP",
-  [GSMD_CALLPROG_DISCONNECT] = "DISCONNECT",
-  [GSMD_CALLPROG_ALERT] = "ALERT",
-  [GSMD_CALLPROG_CALL_PROCEED] = "PROCEED",
-  [GSMD_CALLPROG_SYNC] = "SYNC",
-  [GSMD_CALLPROG_PROGRESS] = "PROGRESS",
-  [GSMD_CALLPROG_CONNECTED] = "CONNECTED",
-  [GSMD_CALLPROG_RELEASE] = "RELEASE",
-  [GSMD_CALLPROG_REJECT] = "REJECT",
-  [GSMD_CALLPROG_UNKNOWN] = "UNKNOWN",
-};
-
-static const char *cdir_names[] = {
-  [GSMD_CALL_DIR_MO] = "Outgoing",
-  [GSMD_CALL_DIR_MT] = "Incoming",
-  [GSMD_CALL_DIR_CCBS] = "CCBS",
-  [GSMD_CALL_DIR_MO_REDIAL] = "Outgoing Redial",
-};
-
-static int
-cprog_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
-{
-  const char *name, *dir;
-
-  if (aux->u.call_status.prog >= ARRAY_SIZE (cprog_names))
-    name = "UNDEFINED";
-  else
-    name = cprog_names[aux->u.call_status.prog];
-
-  if (aux->u.call_status.dir >= ARRAY_SIZE (cdir_names))
-    dir = "";
-  else
-    dir = cdir_names[aux->u.call_status.dir];
-
-  printf ("EVENT: %s Call Progress: %s\n", dir, name);
-
-  if (aux->u.call_status.prog == GSMD_CALLPROG_CONNECTED)
-  {
-
-    if (aux->u.call_status.dir == GSMD_CALL_DIR_MO)
-      gsm_peer_accept ();
-  }
-
-  if (aux->u.call_status.prog == GSMD_CALLPROG_REJECT)
-  {
-    if (aux->u.call_status.dir == GSMD_CALL_DIR_MO)
-      gsm_peer_refuse ();
-  }
-
-  if (aux->u.call_status.prog == GSMD_CALLPROG_DISCONNECT)
-  {
-//    if (aux->u.call_status.dir == GSMD_CALL_DIR_MO)
-    gsm_peer_disconnect ();
-
-  }
-
-
-  return 0;
-}
-
-static int
-colp_handler (struct lgsm_handle *lh, int evt, struct gsmd_evt_auxdata *aux)
-{
-  printf ("EVENT: Outgoing call colp = %s\n", aux->u.colp.addr.number);
-
-  return 0;
-}
-
-
-int
-event_init (struct lgsm_handle *lh)
-{
-  int rc;
-
-  rc = lgsm_evt_handler_register (lh, GSMD_EVT_IN_CALL, &incall_handler);
-  rc |= lgsm_evt_handler_register (lh, GSMD_EVT_IN_CLIP, &clip_handler);
-  rc |= lgsm_evt_handler_register (lh, GSMD_EVT_OUT_COLP, &colp_handler);
-  rc |= lgsm_evt_handler_register (lh, GSMD_EVT_NETREG, &netreg_handler);
-  rc |= lgsm_evt_handler_register (lh, GSMD_EVT_SIGNAL, &sigq_handler);
-  rc |= lgsm_evt_handler_register (lh, GSMD_EVT_OUT_STATUS, &cprog_handler);
-
-  return rc;
-}

Deleted: trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.h   
2007-04-25 14:04:10 UTC (rev 1836)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/event.h   
2007-04-25 14:12:36 UTC (rev 1837)
@@ -1,14 +0,0 @@
-
-extern int event_init (struct lgsm_handle *lh);
-extern int event_get_incoming_signaled ();
-
-extern int event_set_incoming_signaled ();
-
-extern int event_reset_incoming_signaled ();
-extern int event_get_clip_signaled ();
-extern int event_set_clip_signaled ();
-extern int event_reset_clip_signaled ();
-
-extern int event_get_keep_calling ();
-extern int event_set_keep_calling ();
-extern int event_reset_keep_calling ();

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-04-25 14:04:10 UTC (rev 1836)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-04-25 14:12:36 UTC (rev 1837)
@@ -160,9 +160,11 @@
     g_source_remove (appdata->g_timer_data.ptimer);
     appdata->g_timer_data.ptimer = 0;
   }
+  /*
   event_reset_clip_signaled ();
   event_reset_incoming_signaled ();
   event_reset_keep_calling ();
+  */
   if (appdata->g_state.callstate != STATE_TALKING)
     
   {                             //     
add_histroy_entry(g_state.historytype,g_state.contactinfo.name,g_state.contactinfo.number,g_state.contactinfo.picpath,g_state.starttime,0);




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

Reply via email to