r3722 - in trunk/src/target/OM-2007.2/applications/openmoko-messages2: . src
chris at sita.openmoko.org
chris at sita.openmoko.org
Fri Dec 21 18:23:09 CET 2007
Author: chris
Date: 2007-12-21 18:23:07 +0100 (Fri, 21 Dec 2007)
New Revision: 3722
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-main.c
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms.h
Log:
* src/sms-main.c:
* src/sms-notes.c: (sms_notes_data_func), (sms_notes_page_new):
* src/sms.h:
Add emblem support for sent/sending/rejected messages
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog 2007-12-21 15:33:47 UTC (rev 3721)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog 2007-12-21 17:23:07 UTC (rev 3722)
@@ -1,5 +1,12 @@
2007-12-21 Chris Lord <chris at openedhand.com>
+ * src/sms-main.c:
+ * src/sms-notes.c: (sms_notes_data_func), (sms_notes_page_new):
+ * src/sms.h:
+ Add emblem support for sent/sending/rejected messages
+
+2007-12-21 Chris Lord <chris at openedhand.com>
+
* src/sms-notes.c: (mark_messages_read_idle):
Fix to possible crash actually caused infinite loop. Fix properly.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-main.c 2007-12-21 15:33:47 UTC (rev 3721)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-main.c 2007-12-21 17:23:07 UTC (rev 3722)
@@ -21,7 +21,7 @@
#include "sms-contacts.h"
#include "sms-notes.h"
#include "sms-compose.h"
-#include <moko-stock.h>
+#include <libmokoui2/moko-stock.h>
static void
notebook_add_page_with_icon (GtkWidget *notebook, GtkWidget *child,
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c 2007-12-21 15:33:47 UTC (rev 3721)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c 2007-12-21 17:23:07 UTC (rev 3722)
@@ -28,6 +28,7 @@
#include <libjana-ecal/jana-ecal.h>
#include <libmokoui2/moko-finger-scroll.h>
#include <libmokoui2/moko-search-bar.h>
+#include <libmokoui2/moko-stock.h>
#include <libebook/e-book.h>
#include <string.h>
@@ -326,7 +327,6 @@
break;
}
}
- g_strfreev (categories);
}
/* Replace numbers with contact names */
@@ -362,9 +362,11 @@
"justify", outgoing ?
GTK_JUSTIFY_LEFT : GTK_JUSTIFY_RIGHT,
"icon", outgoing ?
- data->recipient_icon : data->author_icon,
+ data->author_icon : data->recipient_icon,
+ "categories", categories,
NULL);
+ g_strfreev (categories);
g_free (author);
/*g_free (recipient);*/
g_free (body);
@@ -712,6 +714,8 @@
GtkWidget *scroll, *vbox, *notes_combo;
GtkCellRenderer *renderer;
GHashTable *colours_hash;
+ GtkIconTheme *icon_theme;
+ gint size;
data->author_uid = NULL;
data->author_icon = NULL;
@@ -723,6 +727,22 @@
data->unassigned_notes = NULL;
data->notes_scroll_idle = 0;
+ /* Create note emblem hash-table */
+ data->note_emblems = g_hash_table_new_full (g_str_hash, g_str_equal,
+ NULL, (GDestroyNotify)g_object_unref);
+ icon_theme = gtk_icon_theme_get_default ();
+ /* FIXME: These are temporary icons */
+ gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &size, NULL);
+ g_hash_table_insert (data->note_emblems, "Sent",
+ gtk_icon_theme_load_icon (icon_theme, MOKO_STOCK_MAIL_SEND,
+ size, 0, NULL));
+ g_hash_table_insert (data->note_emblems, "Sending",
+ gtk_icon_theme_load_icon (icon_theme, MOKO_STOCK_SMS_NEW,
+ size, 0, NULL));
+ g_hash_table_insert (data->note_emblems, "Rejected",
+ gtk_icon_theme_load_icon (icon_theme, MOKO_STOCK_CALL_REJECT,
+ size, 0, NULL));
+
/* Create note store */
data->notes = jana_ecal_store_new (JANA_COMPONENT_NOTE);
g_signal_connect (data->notes, "opened",
@@ -749,7 +769,8 @@
gtk_tree_view_set_headers_visible (
GTK_TREE_VIEW (data->notes_treeview), FALSE);
renderer = jana_gtk_cell_renderer_note_new ();
- g_object_set (renderer, "draw_box", TRUE, "show_recipient", TRUE, NULL);
+ g_object_set (renderer, "draw_box", TRUE, "show_recipient", TRUE,
+ "category_icon_hash", data->note_emblems, NULL);
gtk_tree_view_insert_column_with_data_func (
GTK_TREE_VIEW (data->notes_treeview), 0, "Messages", renderer,
(GtkTreeCellDataFunc)sms_notes_data_func, data, NULL);
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms.h
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms.h 2007-12-21 15:33:47 UTC (rev 3721)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms.h 2007-12-21 17:23:07 UTC (rev 3722)
@@ -40,6 +40,7 @@
GHashTable *note_count;
guint note_count_idle;
GList *unassigned_notes;
+ GHashTable *note_emblems;
EBook *ebook;
GtkTreeModel *contacts_store;
More information about the commitlog
mailing list