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. r1170 - in
      trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm:        . src
      ([EMAIL PROTECTED])
   2. r1171 - in
      trunk/src/target/OM-2007/applications/openmoko-dialer:    data src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: zhiyong_sun
Date: 2007-03-01 08:54:40 +0100 (Thu, 01 Mar 2007)
New Revision: 1170

Modified:
   trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/configure.ac
   trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/Makefile.am
   trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.c
   trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.h
   
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
Log:
convert to matchbox-panel-2

Modified: trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/configure.ac
===================================================================
--- trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/configure.ac      
2007-03-01 07:39:08 UTC (rev 1169)
+++ trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/configure.ac      
2007-03-01 07:54:40 UTC (rev 1170)
@@ -11,17 +11,14 @@
 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, openmoko-libs >= 0.0.2,,
+                 AC_MSG_ERROR([*** Required OpenMoko Libraries >= 0.0.2 not 
installed ***]))
 
-PKG_CHECK_MODULES(LIBMB, libmb,,
-                 exit)
-
 PKG_CHECK_MODULES(LIBGSMD, libgsmd,,
                exit)
 
-LIBS="$LIBS $GTK_LIBS $LIBMB_LIBS $LIBGSMD_LIBS"
-CFLAGS="$CFLAGS $OPENMOKO_CFLAGS $LIBMB_CFALGS $LIBGSMD_CFLAGS" 
+LIBS="$LIBS $GTK_LIBS $LIBGSMD_LIBS"
+CFLAGS="$CFLAGS $OPENMOKO_CFLAGS $LIBGSMD_CFLAGS" 
 
 # output stuff
 AC_OUTPUT([

Modified: 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/Makefile.am   
2007-03-01 07:39:08 UTC (rev 1169)
+++ trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/Makefile.am   
2007-03-01 07:54:40 UTC (rev 1170)
@@ -1,10 +1,11 @@
-INCLUDES = -DPKGDATADIR=\"$(pkgdatadir)\" @OPENMOKO_CFLAGS@ -Wall -std=c99 
-pedantic
+AM_CPPFLAGS=-DPKGDATADIR=\"$(pkgdatadir)\" -DGETTEXT_PACKAGE=\"matchbox-panel\"
+AM_CFLAGS = -Wall -std=c99 -pedantic @OPENMOKO_CFLAGS@
 
-bin_PROGRAMS = openmoko-panel-gsm
+appletdir = $(libdir)/matchbox-panel/
+applet_LTLIBRARIES = libopenmoko-panel-gsm.la
 
-openmoko_panel_gsm_SOURCES = openmoko-panel-gsm.c\
-                            moko-gsm-conn.c
+libopenmoko_panel_gsm_la_SOURCES = openmoko-panel-gsm.c moko-gsm-conn.c
+libopenmoko_panel_gsm_la_LIBADD = @OPENMOKO_LIBS@
 
+MAINTAINERCLEANFILES = Makefile.in
 
-openmoko_panel_gsm_LDADD = @OPENMOKO_LIBS@
-

Modified: 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.c
===================================================================
--- 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.c   
    2007-03-01 07:39:08 UTC (rev 1169)
+++ 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.c   
    2007-03-01 07:54:40 UTC (rev 1170)
@@ -147,12 +147,30 @@
 moko_panel_gsm_quality(int *quality)
 {
     update_gsm_signal_qualite();
-    
-    if (updated){
-       *quality = signal_value;
-        updated = FALSE;
+
+
+
+    if (updated)
+       {
+               /*switch (signal_value) //needs debug board to test signal 
value range.
+               {
+               }
+               */
+       
+
+       updated = FALSE;
        return TRUE;
-       }
+    }
     else
+       {
+               printf ("This is a test resualt without libgsmd support\n");
+       static int test = 0;
+
+       *quality = test;
+
+               if ( ++test >= TOTAL_SIGNALS )
+                       test = 0;
+
        return FALSE;
+       }
 }

Modified: 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.h
===================================================================
--- 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.h   
    2007-03-01 07:39:08 UTC (rev 1169)
+++ 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/moko-gsm-conn.h   
    2007-03-01 07:54:40 UTC (rev 1170)
@@ -3,6 +3,16 @@
 
 #define STDIN_BUF_SIZE 1024
 
+enum{
+       GSM_SIGNAL_ERROR = 0,
+       GSM_SIGNAL_LEVEL_1,
+       GSM_SIGNAL_LEVEL_2,
+       GSM_SIGNAL_LEVEL_3,
+       GSM_SIGNAL_LEVEL_4,
+       GSM_SIGNAL_LEVEL_5,
+       TOTAL_SIGNALS
+};
+
 int
 moko_panel_gsm_quality(int *quality);
 

Modified: 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
===================================================================
--- 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
  2007-03-01 07:39:08 UTC (rev 1169)
+++ 
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c
  2007-03-01 07:54:40 UTC (rev 1170)
@@ -1,334 +1,105 @@
-#include <libmb/mb.h>
-#include <X11/Xlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
+/*  openmoko-panel-gsm.c
+ *
+ *  Authored by Sun Zhiyong <[EMAIL PROTECTED]>
+ *  Copyright (C) 2007 OpenMoko Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU Lesser 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: mickey $]
+ */
+#include <libmokoui/moko-panel-applet.h>
 
+#include <gtk/gtkimage.h>
+#include <time.h>
+
 #include "moko-gsm-conn.h"
 
-#define DIR_LONG       256
-#define FONT_POPUP_DESC       "Sans bold 28px"
-#define ADD_IMG "mbadd.png"  //use for test
+typedef struct {
+       int gsm_quality;
+       GtkImage *image;
+       guint timeout_id;
+} GsmApplet;
 
-enum {
-       conn_err=0,
-       level_1,
-       level_2,
-       level_3,
-       level_4,
-       level_5,
-       MAX_ID,
-};
-
-static MBPixbuf *pb;
-static MBPixbufImage *img_icon[MAX_ID]; 
-static MBPixbufImage *img_scaled[MAX_ID];
-static int cur_img = 0;
-static int last_img = -1;
-MBMenu* popupmenu;
-static Display *dpy;
-static int screen;
-static int times = 0;
-static int gsm_quality = 0;
-
-static void 
-fork_exec(char *cmd)
-{
-  switch (fork())
-    {
-    case 0:
-      setpgid(0, 0); /* Stop us killing child */
-      mb_exec(cmd);
-      fprintf(stderr, "openmoko-panel-gsm: Failed to Launch '%s'\n", cmd);
-      exit(1);
-    case -1:
-      fprintf(stderr, "openmoko-panel-gsm: Failed to Launch '%s'", cmd);
-      break;
-    }
-}
-
-void
-om_gsm_connect_dialog_cb(MBMenuItem *item)
-{
-      fprintf(stdout, "open connect status dialog");
-}
-
 static void
-om_gsm_disconnect_dialog_cb(MBMenuItem *item)
+gsm_applet_free (GsmApplet *applet)
 {
-      fprintf(stdout, "open disconnect status dialog");
-}
+    g_source_remove (applet->timeout_id);
 
-static void
-xevent_callback (MBTrayApp *app, XEvent *e)
-{
-       mb_menu_handle_xevent (popupmenu, e);
+    g_slice_free (GsmApplet, applet);
 }
 
-static void
-menu_get_popup_pos (MBTrayApp *app, int *x, int *y)
+static gboolean
+timeout_cb (GsmApplet *applet)
 {
-  int abs_x, abs_y, menu_h, menu_w;
-  mb_tray_app_get_absolute_coords (app, &abs_x, &abs_y);
-  mb_menu_get_root_menu_size(popupmenu, &menu_w, &menu_h);
 
-  if (mb_tray_app_tray_is_vertical (app))
-   {
-      /* XXX need to figure out menu size before its mapped 
-            so we can figure out offset for east panel
-      */
-     *y = abs_y + mb_tray_app_height(app);
+ /*   if (!moko_panel_gsm_quality (&gsm_quality)) //signal value not changed.
+               return TRUE;
+               */
+       moko_panel_gsm_quality (&(applet->gsm_quality));
+       g_debug ("moko gsm quality = %d", applet->gsm_quality);
 
-      if (abs_x > (DisplayWidth(mb_tray_app_xdisplay(app), 
mb_tray_app_xscreen(app)) /2))
-       *x = abs_x - menu_w - 2;
-      else
-       *x = abs_x + mb_tray_app_width(app) + 2;
-    }
-  else
-    {
-      *x = abs_x;
-      if (abs_y > (DisplayHeight(mb_tray_app_xdisplay(app), 
mb_tray_app_xscreen(app)) /2))
-       *y = abs_y - 2;
-      else
-       *y = abs_y + mb_tray_app_height(app) + menu_h;
-    }
-}
+       switch (applet->gsm_quality)
+       {
+               case GSM_SIGNAL_ERROR :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_00.png");
+                   break;
 
-static void
-menu_init(MBTrayApp* app)
-{
- char* icon_path_ucon;
- char* icon_path_con;
- char* mb_theme;
+               case GSM_SIGNAL_LEVEL_1 :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_01.png");
+                       break;
 
-if (popupmenu == NULL)
-    {
-     popupmenu = mb_menu_new (mb_tray_app_xdisplay(app), 
-                                                               
mb_tray_app_xscreen(app));
-     mb_menu_set_icon_size(popupmenu, 32);
-     mb_menu_set_font (popupmenu, FONT_POPUP_DESC);   
-     mb_menu_set_trans(popupmenu, 0);
-    }
-  else mb_menu_free(popupmenu);
+               case GSM_SIGNAL_LEVEL_2 :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_02.png");
+                       break;
 
-  //if ((mb_theme = mb_tray_app_get_theme_name (app) ) == NULL) exit(1);
-  mb_theme = mb_tray_app_get_theme_name (app);
+               case GSM_SIGNAL_LEVEL_3 :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_03.png");
+                       break;
 
- 
-  icon_path_con = mb_dot_desktop_icon_get_full_path (mb_theme, 
-                                                16, ADD_IMG  );
+               case GSM_SIGNAL_LEVEL_4 :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_04.png");
+                       break;
 
-   icon_path_ucon = mb_dot_desktop_icon_get_full_path (mb_theme, 
-                                                16, ADD_IMG  );
-  
-  mb_menu_add_item_to_menu(popupmenu, popupmenu->rootmenu, "Connect", 
-                         icon_path_con, NULL , 
-                         om_gsm_connect_dialog_cb, (void *)app, 
MBMENU_NO_SORT);
+               case GSM_SIGNAL_LEVEL_5 :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_05.png");
+                       break;
 
-  mb_menu_add_item_to_menu(popupmenu, popupmenu->rootmenu, "Disconnect", 
-                         icon_path_ucon, NULL , 
-                         om_gsm_disconnect_dialog_cb, (void *)app, 
MBMENU_NO_SORT);
+               default :
+                       gtk_image_set_from_file (applet->image, 
PKGDATADIR"/SignalStrength25g_00.png");
+                       break;
+       }
 
-  if (icon_path_con) free (icon_path_con);
-  if (icon_path_ucon) free (icon_path_ucon);
-  if (mb_theme) free (mb_theme);
+    /* Keep going */
+    return TRUE;
 }
 
-static void
-paint_callback (MBTrayApp *app, Drawable drw )
+G_MODULE_EXPORT GtkWidget* 
+mb_panel_applet_create(const char* id, GtkOrientation orientation)
 {
-  MBPixbufImage *img_backing = NULL;
+    MokoPanelApplet* mokoapplet = moko_panel_applet_new();
 
-  cur_img = gsm_quality;
+    GsmApplet *applet;
+    time_t t;
+    struct tm *local_time;
 
-  if (last_img == cur_img) 
-       return;
-  
-  img_backing = mb_tray_app_get_background (app, pb);
+    applet = g_slice_new (GsmApplet);
 
-  mb_pixbuf_img_copy_composite(pb, img_backing, 
-                              img_scaled[cur_img], 0, 0,
-                              mb_pixbuf_img_get_width(img_scaled[0]),
-                              mb_pixbuf_img_get_height(img_scaled[0]),
-                              mb_tray_app_tray_is_vertical(app) ? 
-                              
(mb_pixbuf_img_get_width(img_backing)-mb_pixbuf_img_get_width(img_scaled[0]))/2 
: 0,
-                              mb_tray_app_tray_is_vertical(app) ? 0 : 
-                              
(mb_pixbuf_img_get_height(img_backing)-mb_pixbuf_img_get_height(img_scaled[0]))/2
 );
+    applet->image = GTK_IMAGE(gtk_image_new_from_file 
(PKGDATADIR"/SignalStrength25g_00.png"));
+    gtk_widget_set_name( applet->image, "OpenMoko gsm applet" );
+    g_object_weak_ref( G_OBJECT(applet->image), (GWeakNotify) gsm_applet_free, 
applet );
 
-  mb_pixbuf_img_render_to_drawable(pb, img_backing, drw, 0, 0);
+    t = time( NULL );
+    local_time = localtime(&t);
+    applet->timeout_id = g_timeout_add( 2000, (GSourceFunc) timeout_cb, 
applet);
 
-  mb_pixbuf_img_free( pb, img_backing );
-
-  last_img = cur_img;
-}
-
-static void
-resize_callback (MBTrayApp *app, int w, int h )
-{
-  int  i;
-  int  base_width  = mb_pixbuf_img_get_width(img_icon[0]);
-  int  base_height = mb_pixbuf_img_get_height(img_icon[0]);
-  int  scale_width = base_width, scale_height = base_height;
-  Bool want_resize = True;
-
-  if (mb_tray_app_tray_is_vertical(app) && w < base_width)
-    {
-
-      scale_width = w;
-      scale_height = ( base_height * w ) / base_width;
-
-      want_resize = False;
-    }
-  else if (!mb_tray_app_tray_is_vertical(app) && h < base_height)
-    {
-      scale_height = h;
-      scale_width = ( base_width * h ) / base_height;
-      want_resize = False;
-    }
-
-  if (w < base_width && h < base_height
-      && ( scale_height > h || scale_width > w))
-    {
-
-       /* Something is really wrong to get here  */
-      scale_height = h; scale_width = w;
-      want_resize = False;
-    }
-
-  if (want_resize)  /* we only request a resize is absolutely needed */
-    {
-      last_img = -1;
-      mb_tray_app_request_size (app, scale_width, scale_height);
-    }
-
-  for (i=0; i<MAX_ID; i++)
-    {
-      if (img_scaled[i] != NULL) 
-       mb_pixbuf_img_free(pb, img_scaled[i]);
-
-      img_scaled[i] = mb_pixbuf_img_scale(pb, 
-                                         img_icon[i], 
-                                         scale_width, 
-                                         scale_height);
-    }
-}
-
-/**
[EMAIL PROTECTED] button callback function.
-*/
-static void
-button_callback (MBTrayApp *app, int x, int y, Bool is_released )
-{
-   XEvent ev;
-   int done = 0;
-   struct timeval then, now;
-   Time click_time = 800;
-   int click_x,click_y;
-   int counter = 10;
-
-   fprintf(stdout, "openmoko-panel-gsm: %d times call function 
buttoncallback", ++times);
-
-   if (!popupmenu) return; /* menu disabled */
-
-   gettimeofday(&then, NULL);
-    
- //check the click type: tap "done = 1 "; tap with hold "done = 2";
-   while (!done && !is_released)
-    {
-       if (XCheckMaskEvent(dpy,ButtonReleaseMask, &ev))
-         if (ev.type == ButtonRelease)
-          {
-            done = 1;
-          }
-
-       gettimeofday(&now, NULL);
-       
-       if ((now.tv_usec-then.tv_usec) > (click_time*50000))
-        {
-          done = 2;
-        }
-    }
-
-//function for "tap" action.
-  if (done == 1)  
-    {   
-       mb_tray_app_tray_send_message(app, "Run openmoko-gsm application 
(openmoko-preference)", 6000);
-       //fork_exec("openmoko-preference");  //launch openmoko-preference.
-      return;
-    }
-//function for "tap with hold" action.
- else if (done == 2 && !mb_menu_is_active(popupmenu))
-    {
-       mb_tray_app_tray_send_message(app, "Connect or reconnect gsm signal", 
6000);
-
-       // menu_get_popup_pos(app, &click_x, &click_y);
-       //fprintf(stdout, "openmoko-panel-gsm: x = %d, y = %d\n", click_x, 
click_y);
-       //mb_menu_activate(popupmenu, click_x, click_y);
-    }
-}
-
-static void
-timeout_callback ( MBTrayApp *app )
-{
-    if (moko_panel_gsm_quality(&gsm_quality))
-       {
-       printf ("quality = %d\n", gsm_quality);
-       mb_tray_app_repaint (app);
-       return;
-       }
-    else
-       {
-       printf ("signal quality have not changed \n");
-       return;
-       }
-}
-
-
-int
-main( int argc, char *argv[])
-{
-   MBTrayApp *app = NULL;
-   struct timeval tv;
-   int i =0;
-
-   app = mb_tray_app_new ( "gsm Monitor",
-                         resize_callback,
-                         paint_callback,
-                         &argc,
-                         &argv );  
-
-   dpy    = mb_tray_app_xdisplay(app);
-   screen = mb_tray_app_xscreen(app);
-  
-   pb = mb_pixbuf_new(mb_tray_app_xdisplay(app), 
-                     mb_tray_app_xscreen(app));
-  
-   memset (&tv,0,sizeof(struct timeval));
-   tv.tv_sec = 5;
-   tv.tv_usec = 0;
-
-    menu_init (app);
-
-  img_icon[conn_err]= mb_pixbuf_img_new_from_file(pb, 
PKGDATADIR"/SignalStrength25g_00.png");
-  img_icon[level_1]= mb_pixbuf_img_new_from_file(pb, 
PKGDATADIR"/SignalStrength25g_01.png");
-  img_icon[level_2]= mb_pixbuf_img_new_from_file(pb, 
PKGDATADIR"/SignalStrength25g_02.png");
-  img_icon[level_3]= mb_pixbuf_img_new_from_file(pb, 
PKGDATADIR"/SignalStrength25g_03.png");
-  img_icon[level_4]= mb_pixbuf_img_new_from_file(pb, 
PKGDATADIR"/SignalStrength25g_04.png");
-  img_icon[level_5]= mb_pixbuf_img_new_from_file(pb, 
PKGDATADIR"/SignalStrength25g_05.png");
-  
-   mb_tray_app_set_timeout_callback (app, timeout_callback, &tv); 
-   
-   mb_tray_app_set_button_callback (app, button_callback );
-
-   mb_tray_app_set_xevent_callback(app, xevent_callback);
-   
-   mb_tray_app_set_icon(app, pb, img_icon[level_3]);
-
-   mb_tray_app_request_offset (app, 1);
-
-   mb_tray_app_main (app);
-   
-   XCloseDisplay(dpy);
-
-}
+    moko_panel_applet_set_widget( GTK_CONTAINER(mokoapplet), applet->image );
+    gtk_widget_show_all( GTK_WIDGET(mokoapplet) );
+    return GTK_WIDGET(mokoapplet);
+};




--- End Message ---
--- Begin Message ---
Author: tony_guan
Date: 2007-03-01 10:12:51 +0100 (Thu, 01 Mar 2007)
New Revision: 1171

Added:
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/answer.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/cancel.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/connecting.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/delete_01.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/failure.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/hangup.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/history.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/incall.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/redial.png
Modified:
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/delete.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/dialed.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/dtmf.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/missed.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/received.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/sms.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/speaker.png
   trunk/src/target/OM-2007/applications/openmoko-dialer/data/talking.png
   
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
   
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-history.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-outgoing.c
   
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-talking.c
Log:
solved history window treeview problem,updated some png files,removed some bugs.


Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am      
2007-03-01 07:54:40 UTC (rev 1170)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/data/Makefile.am      
2007-03-01 09:12:51 UTC (rev 1171)
@@ -18,7 +18,17 @@
                 dtmf.png\
                 talking.png\
                 sms.png\
-                all.png
+                all.png\
+                history.png\
+                delete_01.png\
+                incall.png\
+                connecting.png\
+                answer.png\
+                cancel.png\
+                hangup.png\
+                redial.png\
+                failure.png
+
 resourcedir = $(pkgdatadir)
 
 resource_DATA = tony.png\
@@ -42,4 +52,13 @@
                 dtmf.png\
                 talking.png\
                 sms.png\
-                all.png
+                all.png\
+                history.png\
+                delete_01.png\
+                incall.png\
+                connecting.png\
+                answer.png\
+                cancel.png\
+                hangup.png\
+                redial.png\
+                failure.png

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


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

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


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

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


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

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

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


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

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

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

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


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

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


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

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


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

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


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

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

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

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


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

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

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

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

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
    2007-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-main.c
    2007-03-01 09:12:51 UTC (rev 1171)
@@ -83,7 +83,7 @@
 
 DBG_MESSAGE("START=%d,END=%d",start,end);
 g_stpcpy(temp,number+start);
-temp[end-1]=0;
+temp[end-start]=0;
 DBG_MESSAGE("%s",temp);        
 
 
@@ -290,30 +290,17 @@
   window_pin_init(p_dialer_data); 
   window_outgoing_init(p_dialer_data); 
   window_history_init(p_dialer_data); 
-
-
   DBG_MSG ("\nusage: \"openmoko-dialer\" will not show any GUI initialy until 
you reactivate the app using another \"openmoko-dialer\" command");
 
 
 
 //from now on we will not use multithreads.
   gsm_lgsm_start(mainloop);
-  //gtk_widget_show(p_dialer_data->window_pin);
-  //start a timer to monitor incoming calls
-  //gtk_timeout_add(100,incoming_calls,0);
- 
-//instead, we add a g_source
 
+//for debug only>>
+//gsm_incoming_call("13917209523");
+//<<for debug only
 
-  //gdk_threads_enter();
-  //gtk_main ();
-  //gdk_threads_leave();
-  
-//  GMainLoop* mainloop = g_main_loop_new(NULL, FALSE );
-  
-//  [ set up a GSource ]
-//  [ add a GPollFD ]
-//  g_source_attach( gsource, NULL );
   g_main_loop_run(mainloop);
 
 

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
   2007-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-dialer.c
   2007-03-01 09:12:51 UTC (rev 1171)
@@ -316,8 +316,8 @@
 
 
     GtkWidget *window = moko_finger_window_new ();
+    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE);
 
-
     GtkMenu *appmenu = GTK_MENU (gtk_menu_new ());
     GtkWidget *closeitem = gtk_menu_item_new_with_label ("Close");
     g_signal_connect (G_OBJECT (closeitem), "activate",
@@ -415,8 +415,10 @@
     g_signal_connect (G_OBJECT (button1), "clicked",
                       G_CALLBACK (cb_delete_button_clicked), p_dialer_data);
     gtk_widget_set_name (button1, "mokofingerbutton-orange");
-    moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (button1),
-                                         "gtk-delete");
+    moko_pixmap_button_set_finger_toolbox_btn_center_image (MOKO_PIXMAP_BUTTON
+                                                            (button1),
+                                                            
file_new_image_from_relative_path
+                                                            ("delete.png"));
     moko_pixmap_button_set_action_btn_lower_label (MOKO_PIXMAP_BUTTON
                                                    (button1), "Delete");
     gtk_widget_set_size_request (button1, WINDOW_DIALER_BUTTON_SIZE_X,
@@ -432,7 +434,7 @@
     moko_pixmap_button_set_finger_toolbox_btn_center_image (MOKO_PIXMAP_BUTTON
                                                             (button3),
                                                             
file_new_image_from_relative_path
-                                                            ("all.png"));
+                                                            ("history.png"));
     moko_pixmap_button_set_action_btn_lower_label (MOKO_PIXMAP_BUTTON
                                                    (button3), "History");
     gtk_widget_set_size_request (button3, WINDOW_DIALER_BUTTON_SIZE_X,

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-history.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-history.c
  2007-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-history.c
  2007-03-01 09:12:51 UTC (rev 1171)
@@ -132,7 +132,7 @@
 }
 
 void
-openmoko_history_wheel_press_left_up_cb (GtkWidget * widget,
+cb_openmoko_history_wheel_press_left_up(GtkWidget * widget,
                                          MOKO_DIALER_APP_DATA * appdata)
 {
   DBG_ENTER ();
@@ -168,7 +168,7 @@
 }
 
 void
-openmoko_history_wheel_press_right_down_cb (GtkWidget * widget,
+cb_openmoko_history_wheel_press_right_down (GtkWidget * widget,
                                             MOKO_DIALER_APP_DATA * appdata)
 {
   DBG_ENTER ();
@@ -309,12 +309,15 @@
 {
   DBG_ENTER ();
 
-  if (appdata->wheel_history)
-    gtk_widget_show (appdata->wheel_history);
 
+
   if (appdata->toolbox_history)
     gtk_widget_show (appdata->toolbox_history);
 
+  if (appdata->wheel_history)
+    gtk_widget_show (appdata->wheel_history);
+
+//FIXME: some day later, the contact changed infor will be sent to the dialer.
   if (appdata->history_need_to_update)
   {
     DBG_MESSAGE ("NEED TO UPDATE HISTORY");
@@ -345,6 +348,7 @@
 
 //now the container--window
     window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
+    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE);
     p_dialer_data->window_history = GTK_WIDGET (window);
 
 
@@ -357,26 +361,26 @@
     g_signal_connect ((gpointer) window, "hide",
                       G_CALLBACK (on_window_history_hide), p_dialer_data);
 
+   //FIXME: without gtk_widget_show_all first and then hide, the history view 
will not show properly. -tony
+   gtk_widget_show_all(GTK_WIDGET(window));
 
-
-   // gtk_widget_show_all (GTK_WIDGET (window));
-
-//the gtk_widget_show_all is really bad, cause i have to call it and then hide 
some widgets.
-
-
     //now the wheel and tool box, why should the wheel and toolbox created 
after the gtk_widget_show_all???
     // This causes a segfault for me... maybe a problem in libmokoui? - thomas
     //gtk_widget_show (GTK_WIDGET (moko_finger_window_get_wheel (window)));
 
     g_signal_connect (G_OBJECT (moko_finger_window_get_wheel (window)),
                       "press_left_up",
-                      G_CALLBACK (openmoko_history_wheel_press_left_up_cb),
+                      G_CALLBACK (cb_openmoko_history_wheel_press_left_up),
                       p_dialer_data);
     g_signal_connect (G_OBJECT (moko_finger_window_get_wheel (window)),
                       "press_right_down",
-                      G_CALLBACK (openmoko_history_wheel_press_right_down_cb),
+                      G_CALLBACK (cb_openmoko_history_wheel_press_right_down),
                       p_dialer_data);
 
+    g_signal_connect (G_OBJECT (moko_finger_window_get_wheel (window)),
+                      "press_bottom",
+                      G_CALLBACK (cb_tool_button_history_back_clicked),
+                      p_dialer_data);
 
 
     tools = moko_finger_window_get_toolbox (window);
@@ -403,7 +407,7 @@
 
     button =
       GTK_WIDGET (moko_finger_tool_box_add_button_without_label (tools));
-    image = file_new_image_from_relative_path ("delete.png");
+    image = file_new_image_from_relative_path ("delete_01.png");
     moko_pixmap_button_set_finger_toolbox_btn_center_image (MOKO_PIXMAP_BUTTON
                                                             (button), image);
     g_signal_connect (G_OBJECT (button), "clicked",
@@ -419,13 +423,12 @@
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_tool_button_history_back_clicked),
                       p_dialer_data);
+
     //gtk_widget_show (GTK_WIDGET (tools));
 
     p_dialer_data->wheel_history = GTK_WIDGET (moko_finger_window_get_wheel 
(window));
     p_dialer_data->toolbox_history = GTK_WIDGET (tools);
-
-    //gtk_widget_hide (GTK_WIDGET (window));
-
+    gtk_widget_hide(GTK_WIDGET(window));
     DBG_LEAVE ();
   }
   else
@@ -471,6 +474,7 @@
 
   GtkWidget *treeviewHistory;
   GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox);
   //FIRST of all, the top title area;
   GtkWidget *eventboxTop = gtk_event_box_new ();
   gtk_widget_show (eventboxTop);
@@ -526,10 +530,11 @@
                                   GTK_POLICY_NEVER, GTK_POLICY_NEVER);
 
   treeviewHistory = gtk_tree_view_new ();
+  gtk_widget_show (treeviewHistory);
   gtk_container_add (GTK_CONTAINER (align), scrolledwindow);
   gtk_container_add (GTK_CONTAINER (scrolledwindow), treeviewHistory);
 
-  gtk_widget_show (treeviewHistory);
+
   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeviewHistory), FALSE);
   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeviewHistory), FALSE);
 //   gtk_misc_set_alignment (GTK_MISC (treeviewHistory), 0.5, 0.5);
@@ -547,7 +552,7 @@
                     G_CALLBACK (on_treeviewHistory_cursor_changed),
                     p_dialer_data);
 
-
+  gtk_widget_show (vbox);
   return vbox;
 }
 
@@ -609,7 +614,6 @@
   GtkWidget *contactview = NULL;
 
   //DBG_ENTER();
-  //DBG_MESSAGE("History:%d",g_historylist.length);
 
   //DBG_TRACE();
   p_dialer_data->g_history_filter_type = ALL;

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-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-incoming.c
 2007-03-01 09:12:51 UTC (rev 1171)
@@ -136,8 +136,9 @@
 
sprintf(timer_data->timestring,"%02d:%02d:%02d",timer_data->hour,timer_data->min,timer_data->sec);
 //ok,we update the label now.
 
moko_dialer_status_set_status_label(appdata->status_incoming,timer_data->timestring);
+*/
 moko_dialer_status_update_icon(appdata->status_incoming);
-*/
+
   if (event_get_keep_calling ())
   {
     event_reset_keep_calling ();
@@ -256,9 +257,9 @@
 
     vbox = gtk_vbox_new (FALSE, 0);
     status = moko_dialer_status_new ();
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status0.png");
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status1.png");
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status2.png");
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"incall.png");
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"connecting.png");
+// moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status2.png");
     moko_dialer_status_set_icon_by_index (MOKO_DIALER_STATUS (status), 0);
 
     gtk_box_pack_start (GTK_BOX (vbox), status, FALSE, FALSE, 0);
@@ -266,6 +267,7 @@
 
     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);
 
@@ -279,6 +281,7 @@
 
 
     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, 10);
@@ -294,6 +297,7 @@
 //  moko_dialog_window_set_contents( window, GTK_WIDGET(vbox) );
 
     window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
+    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE);
     moko_finger_window_set_contents (window, GTK_WIDGET (vbox));
 
 

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-outgoing.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-outgoing.c
 2007-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-outgoing.c
 2007-03-01 09:12:51 UTC (rev 1171)
@@ -237,7 +237,8 @@
   //DBG_TRACE ();
   appdata->g_state.historytype = OUTGOING;
   //DBG_TRACE ();
-  gsm_dial (appdata->g_peer_info.number);
+  int retv=gsm_dial (appdata->g_peer_info.number);
+  DBG_MESSAGE("GSM_DIAL returns %d",retv);
   //DBG_LEAVE ();
 }
 
@@ -256,9 +257,10 @@
 
     vbox = gtk_vbox_new (FALSE, 0);
     status = moko_dialer_status_new ();
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status0.png");
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"connecting.png");
     moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status1.png");
     moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status2.png");
+    moko_dialer_status_set_error_icon(MOKO_DIALER_STATUS 
(status),"failure.png");
     moko_dialer_status_set_icon_by_index (MOKO_DIALER_STATUS (status), 0);
 
     gtk_box_pack_start (GTK_BOX (vbox), status, FALSE, FALSE, 0);
@@ -266,6 +268,7 @@
 
     GtkWidget *hbox2 = gtk_hbox_new (FALSE, 0);
     GtkWidget *button = gtk_button_new_with_label ("Speaker");
+    
gtk_button_set_image(GTK_BUTTON(button),file_new_image_from_relative_path("speaker.png"));
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_speaker_button_clicked), p_dialer_data);
     p_dialer_data->buttonSpeaker = button;
@@ -273,6 +276,7 @@
     gtk_box_pack_start (GTK_BOX (hbox2), GTK_WIDGET (button), TRUE, TRUE, 40);
 
     button = gtk_button_new_with_label ("Redial");
+    
gtk_button_set_image(GTK_BUTTON(button),file_new_image_from_relative_path("redial.png"));
     p_dialer_data->buttonRedial = button;
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_redial_button_clicked), p_dialer_data);
@@ -282,6 +286,7 @@
 
 
     button = gtk_button_new_with_label ("Cancel");
+    
gtk_button_set_image(GTK_BUTTON(button),file_new_image_from_relative_path("cancel.png"));
     p_dialer_data->buttonCancel = button;
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_cancel_button_clicked), p_dialer_data);
@@ -299,6 +304,7 @@
 //  moko_dialog_window_set_contents( window, GTK_WIDGET(vbox) );
 
     window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
+    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE); //FIXME: this line 
seems only necessary on my PC. tony
     moko_finger_window_set_contents (window, GTK_WIDGET (vbox));
 
 

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-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-pin.c
      2007-03-01 09:12:51 UTC (rev 1171)
@@ -128,6 +128,7 @@
 
 
     MokoFingerWindow *window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
+    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE);
     g_signal_connect ((gpointer) window, "show",
                       G_CALLBACK (on_window_pin_show), p_dialer_data);
     g_signal_connect ((gpointer) window, "hide",
@@ -173,8 +174,12 @@
     g_signal_connect (G_OBJECT (button1), "clicked",
                       G_CALLBACK (pin_delete_button_clicked), p_dialer_data);
     gtk_widget_set_name (GTK_WIDGET (button1), "mokofingerbutton-orange");
-    moko_pixmap_button_set_center_stock (MOKO_PIXMAP_BUTTON (button1),
-                                         "gtk-delete");
+    
+    moko_pixmap_button_set_finger_toolbox_btn_center_image (MOKO_PIXMAP_BUTTON
+                                                            (button1),
+                                                            
file_new_image_from_relative_path
+                                                            ("delete.png"));
+
     moko_pixmap_button_set_action_btn_lower_label (MOKO_PIXMAP_BUTTON
                                                    (button1), "Delete");
 //    gtk_widget_set_size_request (button1, WINDOW_DIALER_BUTTON_SIZE_X,

Modified: 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-talking.c
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-talking.c
  2007-03-01 07:54:40 UTC (rev 1170)
+++ 
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-talking.c
  2007-03-01 09:12:51 UTC (rev 1171)
@@ -264,11 +264,12 @@
   appdata->g_timer_data.ptimer =
     g_timeout_add (1000, (GSourceFunc) timer_talking_time_out, appdata);
 
+  if (appdata->toolbox_talking)
+    gtk_widget_show (appdata->toolbox_talking);
+
   if (appdata->wheel_talking)
     gtk_widget_show (appdata->wheel_talking);
 
-  if (appdata->toolbox_talking)
-    gtk_widget_show (appdata->toolbox_talking);
 
 
 
@@ -294,6 +295,7 @@
     GtkWidget *content_talk = NULL;
     GtkWidget *content_dtmf = NULL;
     MokoFingerToolBox *tools = NULL;
+    MokoFingerWheel* wheel=NULL;
     GtkWidget *mokodialerpanel = NULL;
     MokoPixmapButton *button;
     GtkWidget *image;
@@ -303,9 +305,8 @@
 
     content_talk = gtk_vbox_new (FALSE, 0);
     status = moko_dialer_status_new ();
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status0.png");
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status1.png");
-    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"status2.png");
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"talking.png");
+    moko_dialer_status_add_status_icon (MOKO_DIALER_STATUS (status), 
"connecting.png");
     moko_dialer_status_set_icon_by_index (MOKO_DIALER_STATUS (status), 0);
 
 
@@ -352,6 +353,7 @@
 
 //now the container--window
     window = MOKO_FINGER_WINDOW (moko_finger_window_new ());
+    gtk_window_set_decorated(GTK_WINDOW(window ),FALSE);
     p_dialer_data->window_talking = GTK_WIDGET (window);
     moko_finger_window_set_contents (window, GTK_WIDGET (vbox));
     g_signal_connect ((gpointer) window, "show",
@@ -362,8 +364,8 @@
 
 
 
+    gtk_widget_show_all (GTK_WIDGET (window));
 
-    gtk_widget_show_all (GTK_WIDGET (window));
 //the gtk_widget_show_all is really bad, cause i have to call it and then hide 
some widgets.
 
     gtk_widget_hide (content_dtmf);
@@ -371,20 +373,20 @@
 
     //now the wheel and tool box, why should the wheel and toolbox created 
after the gtk_widget_show_all???
 //   gtk_widget_show(GTK_WIDGET(moko_finger_window_get_wheel(window)));
-
-    g_signal_connect (G_OBJECT (moko_finger_window_get_wheel (window)),
+    wheel=moko_finger_window_get_wheel (window);
+    g_signal_connect (G_OBJECT (wheel),
                       "press_left_up",
                       G_CALLBACK (openmoko_wheel_press_left_up_cb),
                       p_dialer_data);
-    g_signal_connect (G_OBJECT (moko_finger_window_get_wheel (window)),
+    g_signal_connect (G_OBJECT (wheel),
                       "press_right_down",
                       G_CALLBACK (openmoko_wheel_press_right_down_cb),
                       p_dialer_data);
+    
 
 
 
     tools = moko_finger_window_get_toolbox (window);
-
     button = MOKO_PIXMAP_BUTTON (moko_finger_tool_box_add_button_without_label 
(tools));
     image = file_new_image_from_relative_path ("speaker.png");
     moko_pixmap_button_set_finger_toolbox_btn_center_image 
(MOKO_PIXMAP_BUTTON(button), image);
@@ -404,18 +406,21 @@
 
 
     button = MOKO_PIXMAP_BUTTON (moko_finger_tool_box_add_button_without_label 
(tools));
-    image = file_new_image_from_relative_path ("tony.png");
+    image = file_new_image_from_relative_path ("hangup.png");
     moko_pixmap_button_set_finger_toolbox_btn_center_image 
(MOKO_PIXMAP_BUTTON(button), image);
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (cb_tool_button_hangup_clicked),
                       p_dialer_data);
     gtk_widget_show (GTK_WIDGET (tools));
+    gtk_widget_show (GTK_WIDGET (wheel));
 
     p_dialer_data->dtmf_in_talking_window = 0;
-    p_dialer_data->wheel_talking = GTK_WIDGET (moko_finger_window_get_wheel 
(window));
+    p_dialer_data->wheel_talking = GTK_WIDGET (wheel);
     p_dialer_data->toolbox_talking = GTK_WIDGET (tools);
 
+    //gtk_widget_hide(window);
 
+
     DBG_LEAVE ();
   }
 




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

Reply via email to