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. r1653 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src
([EMAIL PROTECTED])
2. r1654 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src
([EMAIL PROTECTED])
3. r1655 -
trunk/src/target/OM-2007/applications/openmoko-messages/src
([EMAIL PROTECTED])
4. r1656 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src
([EMAIL PROTECTED])
--- Begin Message ---
Author: tony_guan
Date: 2007-04-04 10:43:35 +0200 (Wed, 04 Apr 2007)
New Revision: 1653
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
Log:
bug362,363,365,386, they are one bug.
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
2007-04-04 08:25:39 UTC (rev 1652)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
2007-04-04 08:43:35 UTC (rev 1653)
@@ -61,7 +61,8 @@
const gchar * string_acrobat)
{
-
+ PangoFontDescription *font_desc_label = 0;
+ font_desc_label = pango_font_description_new ();
MokoDigitButton *digitbutton =
(MokoDigitButton *) g_object_new (MOKO_TYPE_DIGIT_BUTTON, NULL);
@@ -76,31 +77,40 @@
GtkWidget *vbox = gtk_vbox_new (TRUE, 0);
gtk_widget_show (vbox);
- gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 15);
GtkWidget *labelDigit = gtk_label_new (string_digit);
gtk_widget_show (labelDigit);
gtk_box_pack_start (GTK_BOX (vbox), labelDigit, TRUE, TRUE, 0);
- GtkWidget *alignment = gtk_alignment_new (0, 1, 1, 0.3);
+ GtkWidget *alignment = gtk_alignment_new (0, 1, 0, 0.3);
gtk_widget_show (alignment);
gtk_box_pack_start (GTK_BOX (hbox), alignment, TRUE, TRUE, 0);
GtkWidget *labelAcrobat = gtk_label_new (string_acrobat);
gtk_widget_show (labelAcrobat);
gtk_container_add (GTK_CONTAINER (alignment), labelAcrobat);
- gtk_widget_set_size_request (labelAcrobat, 0, 0);
- gtk_label_set_justify (GTK_LABEL (labelAcrobat), GTK_JUSTIFY_RIGHT);
gtk_widget_set_name (GTK_WIDGET (digitbutton), "mokofingerbutton-dialer");
MokoDigitButtonPrivate *priv =
(MokoDigitButtonPrivate *) MOKO_DIGIT_BUTTON_GET_PRIVATE (digitbutton);
+ //set the fonts of each side.
+ pango_font_description_set_size (font_desc_label, 32 * PANGO_SCALE);
+ if (font_desc_label)
+ gtk_widget_modify_font (labelDigit ,
+ font_desc_label);
+ pango_font_description_set_size (font_desc_label, 10*PANGO_SCALE);
+ if (font_desc_label)
+ gtk_widget_modify_font (labelAcrobat,
+ font_desc_label);
+ if(font_desc_label)
+ pango_font_description_free(font_desc_label);
+
priv->labelDigit = labelDigit;
priv->labelAcrobat = labelAcrobat;
-//g_print("moko_digit_button_new_with_labels:%s,%s\n",string_digit,string_acrobat);
return GTK_WIDGET (digitbutton);
--- End Message ---
--- Begin Message ---
Author: tony_guan
Date: 2007-04-04 11:12:23 +0200 (Wed, 04 Apr 2007)
New Revision: 1654
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/history.c
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-history.c
Log:
bug405
Modified: trunk/src/target/OM-2007/applications/openmoko-dialer/src/history.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-dialer/src/history.c
2007-04-04 08:43:35 UTC (rev 1653)
+++ trunk/src/target/OM-2007/applications/openmoko-dialer/src/history.c
2007-04-04 09:12:23 UTC (rev 1654)
@@ -309,11 +309,12 @@
DBG_ENTER ();
int res = history_read_list (historyhead);
-
+/*
if (res == 0)
{
res = history_read_list_cmd (historyhead);
}
+ */
DBG_MESSAGE ("History:%d", historyhead->length);
DBG_LEAVE ();
return res;
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-04-04 08:43:35 UTC (rev 1653)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/openmoko-dialer-window-history.c
2007-04-04 09:12:23 UTC (rev 1654)
@@ -322,6 +322,7 @@
{
DBG_MESSAGE ("NEED TO UPDATE HISTORY");
}
+ history_update_counter (appdata);
DBG_LEAVE ();
}
@@ -504,7 +505,7 @@
gtk_misc_set_alignment (GTK_MISC (labelFilter), 0, 0.5);
p_dialer_data->label_filter_history = labelFilter;
- GtkWidget *labelCounter = gtk_label_new (("1/21"));
+ GtkWidget *labelCounter = gtk_label_new (("0/0"));
gtk_widget_show (labelCounter);
gtk_box_pack_start (GTK_BOX (hbox67), labelCounter, TRUE, TRUE, 0);
gtk_label_set_justify (GTK_LABEL (labelCounter), GTK_JUSTIFY_RIGHT);
--- End Message ---
--- Begin Message ---
Author: alex_tang
Date: 2007-04-04 11:22:45 +0200 (Wed, 04 Apr 2007)
New Revision: 1655
Modified:
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.c
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.h
Log:
Use synchronized function to load contacts.
Get selected contacts by uid.
Modified:
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.c
2007-04-04 09:12:23 UTC (rev 1654)
+++
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.c
2007-04-04 09:22:45 UTC (rev 1655)
@@ -95,14 +95,16 @@
data->contacts = contacts;
g_debug ("list length %d", g_list_length(c));
- const gchar *name , *phoneNum;
+ const gchar *uid, *name , *phoneNum;
for (;c;c=c->next){
EContact *contact = E_CONTACT (c->data);
+ uid = e_contact_get_const (contact, E_CONTACT_UID);
name = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
- phoneNum = e_contact_get_const (contact, E_CONTACT_PHONE_BUSINESS);
+ phoneNum = e_contact_get_const (contact, E_CONTACT_PHONE_MOBILE);
gtk_list_store_append(contacts_liststore, &iter);
gtk_list_store_set (contacts_liststore, &iter,
CONTACT_SEL_COL, FALSE,
+ CONTACT_UID_COL, uid,
CONTACT_NAME_COL, name,
CONTACT_CELLPHONE_COL, phoneNum,
-1);
@@ -131,6 +133,32 @@
return FALSE;
}
+static void
+open_book_syn (SmsContactData* data)
+{
+ /* open ebook */
+ GError* error = NULL;
+ e_book_open (data->book,FALSE,&error);
+ if (error){
+ g_debug ("open book error %s",error->message);
+ return;
+ }
+
+ /* open contacts */
+ EBookQuery* query;
+ query = e_book_query_any_field_contains ("");
+ GList* contacts = NULL;
+ e_book_get_contacts(data->book,query,&contacts,&error);
+ if (error){
+ g_debug ("open book error %s",error->message);
+ return;
+ }
+ else{
+ g_debug ("contacts number %d",g_list_length(contacts));
+ updateContactsView (data->book,E_BOOK_ERROR_OK,contacts,data);
+ }
+}
+
static void
sms_contact_window_init (SmsContactWindow* self)
{
@@ -154,8 +182,8 @@
gtk_box_pack_start(GTK_BOX(priv->vbox), eventbox, FALSE, TRUE, 0);
/* create contact list */
- data->contacts_liststore = gtk_list_store_new (3, G_TYPE_BOOLEAN,
- G_TYPE_STRING, G_TYPE_STRING);
+ data->contacts_liststore = gtk_list_store_new (4, G_TYPE_BOOLEAN,
+ G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING);
priv->contacts_view = create_contacts_list(data);
gtk_box_pack_start(GTK_BOX(priv->vbox), priv->contacts_view, TRUE, TRUE, 0);
g_object_unref (data->contacts_liststore);
@@ -173,7 +201,8 @@
gtk_box_pack_start(GTK_BOX(priv->vbox), priv->buttonbox, FALSE, TRUE, 0);
/* loading contacts */
- g_idle_add((GSourceFunc)open_book,data);
+ //g_idle_add((GSourceFunc)open_book,data);
+ open_book_syn (data);
gtk_widget_show_all(priv->vbox);
gtk_container_add(GTK_CONTAINER(self), priv->vbox);
@@ -231,27 +260,26 @@
SmsContactData* contactData = priv->data;
g_debug ("select item contacts %d", g_list_length(contactData->contacts));
- gchar* name;
+ gchar* selUid;
gboolean selected;
gtk_tree_model_get (model, iter,
CONTACT_SEL_COL, &selected,
- CONTACT_NAME_COL,&name,
+ CONTACT_UID_COL, &selUid,
-1);
if (selected)
- g_debug ("contact %s selected", name);
+ g_debug ("contact %s selected", selUid);
else {
- g_debug ("contact %s not selected, remove from contacts list", name);
+ g_debug ("contact %s not selected, remove from contacts list", selUid);
GList* contactListItem = contactData->contacts;
for ( ; contactListItem; contactListItem=contactListItem->next){
EContact* contact = E_CONTACT (contactListItem->data);
- const gchar *contactName;
- contactName = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
- if (!g_strcasecmp(name, contactName))
+ const gchar *uid = e_contact_get_const (contact, E_CONTACT_UID);
+ if (!g_strcasecmp(uid, selUid))
contactData->contacts = g_list_remove (contactData->contacts,
contactListItem->data);
}
}
- g_free(name);
+ g_free(selUid);
return FALSE;
}
Modified:
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.h
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.h
2007-04-04 09:12:23 UTC (rev 1654)
+++
trunk/src/target/OM-2007/applications/openmoko-messages/src/sms-contact-window.h
2007-04-04 09:22:45 UTC (rev 1655)
@@ -39,6 +39,7 @@
enum {
CONTACT_SEL_COL,
+ CONTACT_UID_COL,
CONTACT_NAME_COL,
CONTACT_CELLPHONE_COL,
CONTACT_LAST_COL
--- End Message ---
--- Begin Message ---
Author: tony_guan
Date: 2007-04-04 11:31:16 +0200 (Wed, 04 Apr 2007)
New Revision: 1656
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
Log:
bug395
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
2007-04-04 09:22:45 UTC (rev 1655)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/moko-digit-button.c
2007-04-04 09:31:16 UTC (rev 1656)
@@ -68,7 +68,7 @@
gtk_widget_show (GTK_WIDGET (digitbutton));
gtk_widget_set_size_request (GTK_WIDGET (digitbutton), 64, 64);
-
+ GTK_WIDGET_UNSET_FLAGS( GTK_WIDGET(digitbutton), GTK_CAN_FOCUS);
// GtkWidget * hbox = gtk_hbox_new (TRUE, 0);
GtkWidget *hbox = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox);
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog