r465 - in trunk/src/target/OM-2007/applications/openmoko-dialer: data src

tony_guan at gta01.hmw-consulting.de tony_guan at gta01.hmw-consulting.de
Mon Dec 25 10:41:49 CET 2006


Author: tony_guan
Date: 2006-12-25 10:40:54 +0100 (Mon, 25 Dec 2006)
New Revision: 465

Added:
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/status0.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/status1.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/status2.png
Modified:
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/10086.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/unkown.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/common.c
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.c
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.h
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-autolist.h
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-declares.h
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-includes.h
   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.h
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.c
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.h
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
   trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-dialer.c
Log:
MokoStatus finished, outgoing call window partly finished.



Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/data/10086.png
===================================================================
(Binary files differ)

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am	2006-12-25 09:40:54 UTC (rev 465)
@@ -4,7 +4,11 @@
                 sally.png\
                 10086.png\
                 chaowei.png\
-                unkown.png
+                unkown.png\
+                status0.png\
+                status1.png\
+                status2.png
+                
 resourcedir = $(pkgdatadir)
 
 resource_DATA = tony.png\
@@ -13,5 +17,7 @@
                 sally.png\
                 10086.png\
                 chaowei.png\
-                unkown.png
-
+                unkown.png\
+                status0.png\
+                status1.png\
+                status2.png

Added: trunk/src/target/OM-2007/applications/openmoko-dialer/data/status0.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/target/OM-2007/applications/openmoko-dialer/data/status0.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/src/target/OM-2007/applications/openmoko-dialer/data/status1.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/target/OM-2007/applications/openmoko-dialer/data/status1.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/src/target/OM-2007/applications/openmoko-dialer/data/status2.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/target/OM-2007/applications/openmoko-dialer/data/status2.png
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/data/unkown.png
===================================================================
(Binary files differ)

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/common.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/common.c	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/common.c	2006-12-25 09:40:54 UTC (rev 465)
@@ -157,6 +157,7 @@
 	    src_pixbuf = gdk_pixbuf_new_from_file ( pathname, &err );
 	    DBG_MESSAGE("file_load_person_image_scalable_from_relative_path,width=%d,height=%d",widget->allocation.width, widget->allocation.height);
 	    
+//	    dest_pixbuf = gdk_pixbuf_scale_simple (src_pixbuf, widget->requisition.width, widget->requisition.height, GDK_INTERP_NEAREST);
 	    dest_pixbuf = gdk_pixbuf_scale_simple (src_pixbuf, widget->allocation.width, widget->allocation.height, GDK_INTERP_NEAREST);
 	     gtk_image_set_from_pixbuf (image,dest_pixbuf);
 	    g_free (pathname);

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.c	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.c	2006-12-25 09:40:54 UTC (rev 465)
@@ -362,7 +362,63 @@
   return 0;
 }
 
+/**
+ * @brief get the name and picture path from the contact list, indexed by the number provided.
+ * in the case that contact API returns NULL, we will call this function for debug.
+ * 
+ * 
+ *
+ * @param contacts, the first contact pointer of the list.
+ * @param peer, the structure to hold the pointer to the strings in the contact list.
+ * @return 0-failed, 1-found the contact.
+ * @retval 
+ */
 
+int contact_get_peer_info_from_number(DIALER_CONTACT* contacts, DIALER_CONTACT_PEER_INFO * peer)
+{
+
+	peer->hasname=0;
+	peer->searched=1;
+	peer->name=0;
+	peer->picpath=0;
+
+	if(peer->number==0)return 0;
+	if(strlen(peer->number)==0)return 0;
+	
+//  DIALER_CONTACT* contacts=g_contactlist.contacts;
+
+	DIALER_CONTACT_ENTRY* entry;
+ 
+   while(contacts!= 0)
+   {
+     entry=contacts->entry;
+
+	 while(entry)
+	 {
+	
+	 //judge if the entry includes the string
+		 
+	 if(strcmp(entry->content,peer->number)==0)
+	 {	
+	 peer->picpath=contacts->picpath;
+	 peer->name=contacts->name;
+	// DBG_MESSAGE("Yeah, we know the owner is %s.",name);
+ 	peer->hasname=1;
+	 return 1;
+	 }
+     entry=entry->next;
+	 }
+    
+	 
+	 contacts= contacts->next;
+	
+  }
+  //DBG_MESSAGE("Can not find the number.");
+  return 0;
+}
+
+
+
 /**
  * @brief judge if the content includes the sensative string 
  *

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/contacts.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -61,6 +61,20 @@
 
 
 /**
+ * @brief contact  structure for open dialer.
+ */
+typedef struct peer_info_
+{
+//we should at least have the number called.
+  char number[MOKO_DIALER_MAX_NUMBER_LEN];        ///<the number of the peer
+  char *name;       	///<person name
+  char *picpath;  ///<the picture file path for the person
+  int searched; ///<if true; no need to search for the name 
+  int hasname; ///<if true, we the picpath & name can be used.
+}DIALER_CONTACT_PEER_INFO;
+
+
+/**
  * @brief the structure for intelligent search results.
  */	
 typedef struct dialer_ready_contact
@@ -84,6 +98,7 @@
 int contact_release_contact_list(DIALER_CONTACTS_LIST_HEAD * head);
 int contact_init_from_cmd(DIALER_CONTACTS_LIST_HEAD * head);
 int contact_get_info_from_number(DIALER_CONTACT* contacts,char* name,char* picpath,const char* number);
+int contact_get_peer_info_from_number(DIALER_CONTACT* contacts, DIALER_CONTACT_PEER_INFO * peer);
 int contact_init_contact_data(DIALER_CONTACTS_LIST_HEAD   *p_contactlist);
 int contact_print_contact_list(DIALER_CONTACTS_LIST_HEAD * head);
 int contact_string_has_sensentive (char * content, char *string);

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-autolist.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-autolist.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-autolist.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -56,7 +56,7 @@
   
   DIALER_CONTACTS_LIST_HEAD* head;
 
-  HISTORY_ENTRY * g_currentselected; ///<pointer to the history entry which in the GUI the user selects.
+//  HISTORY_ENTRY * g_currentselected; ///<pointer to the history entry which in the GUI the user selects.
 
 //static PangoFontDescription *font_desc=NULL; ///<the PangoFontDescription which a lot of widget will use it.
 

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-declares.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-declares.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-declares.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -24,8 +24,8 @@
 //MAXDISPNAMENUM MUST >=1 & <=9!
 //only when user inputs at least MINSENSATIVELEN, should we start to search.
 #define MOKO_DIALER_MIN_SENSATIVE_LEN (1)
-#define MOKO_DIALER_MAX_STATUS_ICONS (1)
-#define MOKO_DIALER_DEFAULT_PERSON_IMAGE_PATH ("./default.png")
+#define MOKO_DIALER_MAX_STATUS_ICONS (3)
+#define MOKO_DIALER_DEFAULT_PERSON_IMAGE_PATH ("unkown.png")
 #define MOKO_DIALER_MAX_TIPS (3)
 
 #endif

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-includes.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-includes.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-includes.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -27,9 +27,11 @@
 #include "moko-dialer-panel.h"
 #include "moko-dialer-textview.h"
 #include "moko-digit-button.h"
+#include "moko-dialer-status.h"
+#include <libmokoui/moko-dialog-window.h>
+//
 
 
-
 typedef enum _state{
   STATE_NON= 0,
   STATE_CALLING,
@@ -77,15 +79,14 @@
 	gint ptimer;
 	gint stopsec; ///<indicates when the ticks reaches stopsec, then this timer has to be stopped.
 	gint timeout; ///<indicates wether this timer has timeout to stopsec.
-	GtkWidget* label;
+
 	gint ticks; //seconds together
 	gint sec;   
 	gint min;
 	gint hour;
-	char timestring[9] ;
-	gint updatewidget;
-	TimeExpireCallback expirecallback;
+	char timestring[MOKO_DIALER_MAX_NUMBER_LEN] ;
 }TIMER_DATA;
+
 enum {
 	COLUMN_TYPE,
 	COLUMN_TYPEICON,

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	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.c	2006-12-25 09:40:54 UTC (rev 465)
@@ -48,42 +48,61 @@
 //upper section
 ; ///<the topmost title bar of the status
 moko_dialer_status->labelStatusTitle= gtk_label_new("");
+
+/*
 for(gint i=0;i<MOKO_DIALER_MAX_STATUS_ICONS;i++)
 	moko_dialer_status->iconStatus[i]=gtk_image_new();
+*/
 
+moko_dialer_status->icon=gtk_image_new();
+
+
 //lower section  
 	moko_dialer_status->imagePerson=gtk_image_new();  ///<the image of the person we care
+gtk_widget_set_size_request (moko_dialer_status->imagePerson, 130,130);
+  gtk_misc_set_alignment (GTK_MISC (moko_dialer_status->imagePerson), 1, 0);
+
+	
 	moko_dialer_status->labelStatus=gtk_label_new("");	///<the status label
+        	  gtk_misc_set_alignment (GTK_MISC (moko_dialer_status->labelStatus), 0, 0);
+//          	  gtk_misc_set_padding(GTK_MISC (moko_dialer_status->labelStatus), 20,0);
 	moko_dialer_status->labelPersonName=gtk_label_new(""); ///<the person name
+		  gtk_misc_set_alignment (GTK_MISC (moko_dialer_status->labelPersonName), 0, 0);
 	moko_dialer_status->labelNumber=gtk_label_new(""); ///<the number of the person
+		  gtk_misc_set_alignment (GTK_MISC (moko_dialer_status->labelNumber), 0, 0);
 //private section
 	moko_dialer_status->number_of_the_icons=0;
 
- gtk_box_pack_start( GTK_BOX(moko_dialer_status),	moko_dialer_status->labelStatusTitle , FALSE, FALSE, 0 );
- gtk_box_pack_start( GTK_BOX(moko_dialer_status),	moko_dialer_status->iconStatus[0], FALSE, FALSE, 0 );
+ gtk_widget_set_size_request (moko_dialer_status->icon, 64,64);
+ gtk_box_pack_start( GTK_BOX(moko_dialer_status),	moko_dialer_status->labelStatusTitle , FALSE, FALSE, 20 );
+ gtk_box_pack_start( GTK_BOX(moko_dialer_status),	moko_dialer_status->icon, FALSE, FALSE, 20);
  
 //ok now, we arrange them in the vbox.
 
 // we create another vbox to hold the status labels.
     GtkVBox *  vbox2 = gtk_vbox_new( FALSE, 0 );
-   gtk_box_pack_start( GTK_BOX(vbox2),	moko_dialer_status->labelStatus, FALSE, FALSE, 0 );
+   gtk_box_pack_start( GTK_BOX(vbox2),	moko_dialer_status->labelStatus, TRUE, TRUE, 0);
    
-   gtk_box_pack_start( GTK_BOX(vbox2),	moko_dialer_status->labelPersonName, FALSE, FALSE, 0 );
+   gtk_box_pack_start( GTK_BOX(vbox2),	moko_dialer_status->labelPersonName, TRUE, TRUE, 0 );
 
 
     
-   gtk_box_pack_start( GTK_BOX(vbox2),	moko_dialer_status->labelNumber, FALSE, FALSE, 0 );
+   gtk_box_pack_start( GTK_BOX(vbox2),	moko_dialer_status->labelNumber, TRUE, TRUE, 0 );
 // a hbox to hold the image and the vbox2
     GtkVBox *  hbox2 = gtk_hbox_new( FALSE, 0 );
-    gtk_widget_set_size_request (moko_dialer_status->imagePerson, 64,64);
-   gtk_box_pack_start( GTK_BOX(hbox2),	moko_dialer_status->imagePerson, FALSE, FALSE, 0 );
 
-   gtk_box_pack_start( GTK_BOX(hbox2),vbox2, FALSE, FALSE, 0 );
 
-gtk_box_pack_start( GTK_BOX(moko_dialer_status),hbox2, FALSE, FALSE, 0 );
+    
+//   gtk_box_pack_start( GTK_BOX(hbox2),	moko_dialer_status->imagePerson, FALSE, FALSE, 0 );
+   gtk_box_pack_start( GTK_BOX(hbox2),	moko_dialer_status->imagePerson, TRUE,TRUE, 0 );
 
-gtk_widget_set_size_request (GTK_WIDGET(moko_dialer_status), 480, 40); 
+// gtk_box_pack_start( GTK_BOX(hbox2),vbox2, FALSE, FALSE, 0 );
+ gtk_box_pack_start( GTK_BOX(hbox2),vbox2, TRUE,TRUE, 36 );
 
+gtk_box_pack_start( GTK_BOX(moko_dialer_status),hbox2, TRUE, TRUE, 0 );
+
+//gtk_widget_set_size_request (GTK_WIDGET(moko_dialer_status), 320, 200); 
+
 DBG_LEAVE();
 
 }
@@ -106,6 +125,8 @@
 }
 void moko_dialer_status_set_status_label(MokoDialerStatus *moko_dialer_status,const gchar* text)
 {
+
+DBG_MESSAGE("moko_dialer_status_set_status_label:moko_dialer_status=0X%x",moko_dialer_status);
 gtk_label_set_text(GTK_LABEL(moko_dialer_status->labelStatus),text);
 }
 
@@ -120,11 +141,62 @@
 
 void moko_dialer_status_set_person_image(MokoDialerStatus *moko_dialer_status,const gchar* path)
 {
-file_load_person_image_scalable_from_relative_path(moko_dialer_status->imagePerson,path);
+//file_load_person_image_scalable_from_relative_path(moko_dialer_status->imagePerson,path);
+file_load_person_image_from_relative_path(moko_dialer_status->imagePerson,path);
+//file_load_person_image_scalable_from_relative_path(moko_dialer_status->imagePerson,path);
 } 
-void moko_dialer_status_set_icons(MokoDialerStatus *moko_dialer_status,const gchar* text)
+int moko_dialer_status_add_status_icon(MokoDialerStatus *moko_dialer_status,const gchar* text)
 {
+if(moko_dialer_status->number_of_the_icons<MOKO_DIALER_MAX_STATUS_ICONS)
+{
+	moko_dialer_status->iconStatus[moko_dialer_status->number_of_the_icons]=create_pixbuf (text);
 
+	moko_dialer_status->number_of_the_icons++;
+	return 1;
+}
+else
+{
+	DBG_ERROR("MOKO_DIALER_MAX_STATUS_ICONS has reached, add no more icons.");
+	return 0;
+}
 } 
 
+void moko_dialer_status_set_error_icon(MokoDialerStatus *moko_dialer_status,const gchar* text)
+{
+
+	moko_dialer_status->iconError=create_pixbuf (text);
+//	file_load_person_image_from_relative_path(moko_dialer_status->iconError,text);
+} 
+void moko_dialer_status_set_success_icon(MokoDialerStatus *moko_dialer_status,const gchar* text)
+{
+	moko_dialer_status->iconError=create_pixbuf (text);
+//	file_load_person_image_from_relative_path(moko_dialer_status->iconSuccuss,text);
+}
 
+void moko_dialer_status_set_icon_by_index(MokoDialerStatus *moko_dialer_status,gint index)
+{
+if( moko_dialer_status->iconStatus[index]!=0&&index<moko_dialer_status->number_of_the_icons)
+	gtk_image_set_from_pixbuf(moko_dialer_status->icon, moko_dialer_status->iconStatus[index]);
+}
+void moko_dialer_status_update_icon(MokoDialerStatus *moko_dialer_status)
+{
+static gint currenticon=0;
+currenticon=(currenticon+1)%moko_dialer_status->number_of_the_icons;
+if( moko_dialer_status->iconStatus[currenticon])
+	moko_dialer_status_set_icon_by_index(moko_dialer_status,currenticon);
+}
+	
+
+void moko_dialer_status_set_error(MokoDialerStatus *moko_dialer_status)
+{
+if(moko_dialer_status->iconError)
+	gtk_image_set_from_pixbuf(moko_dialer_status->icon, moko_dialer_status->iconError);
+}
+
+void moko_dialer_status_set_success(MokoDialerStatus *moko_dialer_status)
+{
+if(moko_dialer_status->iconSuccess)
+	gtk_image_set_from_pixbuf(moko_dialer_status->icon, moko_dialer_status->iconSuccess);
+
+}
+

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-status.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -55,8 +55,10 @@
   GtkVBox vbox;
 //upper section
   GtkWidget * labelStatusTitle; ///<the topmost title bar of the status
-  GtkWidget * iconStatus[MOKO_DIALER_MAX_STATUS_ICONS];
-
+  GtkWidget * icon;
+  GdkPixbuf * iconStatus[MOKO_DIALER_MAX_STATUS_ICONS];
+  GdkPixbuf * iconError;
+  GdkPixbuf * iconSuccess;
 //lower section  
   GtkWidget * imagePerson;  ///<the image of the person we care
   GtkWidget * labelStatus;	///<the status label

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.c	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.c	2006-12-25 09:40:54 UTC (rev 465)
@@ -178,6 +178,8 @@
   
 }
 
+
+
  /**
  * @brief moko_dialer_textview_insert  
  *
@@ -298,6 +300,17 @@
 return 1;
 }
 
+//delete all the input 
+int  moko_dialer_textview_empty(MokoDialerTextview *moko_dialer_textview)
+{
+GtkTextBuffer *buffer;
+
+buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (moko_dialer_textview));
+
+gtk_text_buffer_set_text(buffer,"",-1);
+return 1;
+}
+
 ///delete the selection or one character.
 int  moko_dialer_textview_delete(MokoDialerTextview *moko_dialer_textview)
 {

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-dialer-textview.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -67,6 +67,7 @@
  int moko_dialer_textview_insert(MokoDialerTextview *moko_dialer_textview, const gchar* number);
 
 int  moko_dialer_textview_get_input(MokoDialerTextview *moko_dialer_textview,gchar* input,int ALL);
+int  moko_dialer_textview_empty(MokoDialerTextview *moko_dialer_textview);
 
 G_END_DECLS
 

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.h	2006-12-25 09:40:54 UTC (rev 465)
@@ -16,7 +16,20 @@
  *  Current Version: $Rev$ ($Date) [$Author: Tony Guan $]
  */
  #include "moko-dialer-includes.h"
+/*
 
+typedef struct _window_outgoing
+{
+
+MokoDialerStatus * status_outgoing;
+
+GtkWidget* window_outgoing;
+
+GtkWidget* buttonSpeaker;
+GtkWidget* buttonCancel;
+GtkWidget* buttonRedial;
+}WindowOutgoing;
+*/
  typedef struct _dialer_data
 {
  //the global data area begins here
@@ -28,6 +41,8 @@
 
 DIALER_CONTACTS_LIST_HEAD       g_contactlist; ///< the whole list of the contacts from the contact book.
 
+DIALER_CONTACT_PEER_INFO g_peer_info; ///<hold the peer's name, number, etc.
+
 HISTORY_LIST_HEAD g_historylist; ///< the whole list of the talk history
 
 GLOBAL_STATE g_state; ///< the global states holder. we count on it a lot.
@@ -36,9 +51,16 @@
 
 TIMER_DATA g_timer_data;///< the data used by the timers
 
+MokoDialerStatus * status_outgoing;
 GtkWidget * window_dialer;
 GtkWidget* window_outgoing;
 
+//buttons
+GtkWidget* buttonSpeaker;
+GtkWidget* buttonCancel;
+GtkWidget* buttonRedial;
+
+//WindowOutgoing window_outgoing_data;
 // GtkListStore  *g_list_store_filter;///<the list store used by the gtktreeview, for displaying the history list dynamically.
 
 // HISTORY_TYPE g_historyfiltertype;///<indicates the current history filter type, the gtktreeview will be filtered on the value.

Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-dialer.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-dialer.c	2006-12-25 01:16:03 UTC (rev 464)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-dialer.c	2006-12-25 09:40:54 UTC (rev 465)
@@ -73,10 +73,29 @@
 
 void cb_dialer_button_clicked( GtkButton* button, MOKO_DIALER_APP_DATA * appdata)
 {
-    g_debug( "dialer button clicked" );
+ g_debug( "dialer button clicked" );
+gchar codesinput[MOKO_DIALER_MAX_NUMBER_LEN];
+ //get the input digits
+ moko_dialer_textview_get_input(appdata->moko_dialer_text_view, codesinput, 0);
+if(strlen(codesinput)<=1)
+	return;
+//empty the textview
+moko_dialer_textview_empty(appdata->moko_dialer_text_view);
+
+//got the number;
+strcpy(appdata->g_peer_info.number,codesinput);
+
+//retrieve the contact information if any.
+contact_get_peer_info_from_number(appdata->g_contactlist.contacts , &(appdata->g_peer_info));
+// contact_get_peer_info_from_number
+
 if(!appdata->window_outgoing)
 	window_outgoing_init(appdata);
 
+//transfer the contact info
+window_outgoing_prepare(appdata);
+
+//start dialling.
 gtk_widget_show(appdata->window_outgoing);
 }
 
@@ -117,6 +136,8 @@
 moko_dialer_textview_confirm_it(moko_dialer_text_view,ready_contact->p_entry->content);
 DBG_MESSAGE("And here we are supposed to call out directly");
 
+
+
 }
 void
 on_dialer_autolist_nomatch(GtkWidget * widget,gpointer         user_data)
@@ -257,17 +278,11 @@
 
 //the buttons
 
-/*
-    GtkWidget *iconimage = gtk_image_new();
-   file_load_person_image_from_relative_path( iconimage,"unkown.png");
- //gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
- */
-//    moko_pixmap_button_set_finger_toolbox_btn_center_image (button1, iconimage);
     GtkVBox *  vbox2 = gtk_vbox_new( FALSE, 0 );
     GtkButton* button1 = moko_pixmap_button_new();
     g_signal_connect( G_OBJECT(button1), "clicked", G_CALLBACK(cb_delete_button_clicked), p_dialer_data );
     gtk_widget_set_name( GTK_WIDGET(button1), "mokofingerbutton-orange" );
-	moko_pixmap_button_set_action_btn_center_stock(button1,"gtk-delete");
+	moko_pixmap_button_set_center_stock(button1,"gtk-delete");
 	moko_pixmap_button_set_action_btn_lower_label(button1,"Delete");
   gtk_widget_set_size_request (button1, WINDOW_DIALER_BUTTON_SIZE_X, WINDOW_DIALER_BUTTON_SIZE_Y);
   
@@ -276,7 +291,7 @@
     GtkButton* button3 = moko_pixmap_button_new();
     g_signal_connect( G_OBJECT(button3), "clicked", G_CALLBACK(cb_history_button_clicked), p_dialer_data );
     gtk_widget_set_name( GTK_WIDGET(button3), "mokofingerbutton-orange" );
-moko_pixmap_button_set_action_btn_center_stock(button3,"gtk-refresh");
+moko_pixmap_button_set_center_stock(button3,"gtk-refresh");
 moko_pixmap_button_set_action_btn_lower_label(button3,"History");
   gtk_widget_set_size_request (button3, WINDOW_DIALER_BUTTON_SIZE_X, WINDOW_DIALER_BUTTON_SIZE_Y);	
     gtk_box_pack_start( GTK_BOX(vbox2), GTK_WIDGET(button3),FALSE, FALSE, 5 );
@@ -286,7 +301,7 @@
 	
     g_signal_connect( G_OBJECT(button2), "clicked", G_CALLBACK(cb_dialer_button_clicked), p_dialer_data );
     gtk_widget_set_name( GTK_WIDGET(button2), "mokofingerbutton-black" );
-	moko_pixmap_button_set_action_btn_center_stock(button2,"gtk-yes");
+	moko_pixmap_button_set_center_stock(button2,"gtk-yes");
 	moko_pixmap_button_set_action_btn_lower_label(button2,"Dial");
   gtk_widget_set_size_request (button2, WINDOW_DIALER_BUTTON_SIZE_X+20, WINDOW_DIALER_BUTTON_SIZE_Y+80);
   





More information about the commitlog mailing list