#define MESSAGE_HEIGHT (C_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT)
#define MESSAGE_WIDTH (C_WIDTH - 2*HILDON_MARGIN_DEFAULT)
-#define SERVICE_ICON_SIZE 64
+#define SERVICE_ICON_SIZE HILDON_ICON_PIXEL_SIZE_SMALL
#define AVATAR_SIZE HILDON_ICON_PIXEL_SIZE_THUMB
#define AVATAR_X (C_WIDTH - AVATAR_SIZE - HILDON_MARGIN_DEFAULT)
RTComEl *eventlogger;
GtkWidget *sender;
- /* GtkWidget *icon; */
+ GtkWidget *icon;
GtkWidget *unread;
GtkWidget *received;
GtkWidget *empty;
PangoFontDescription *font_desc;
GdkPixbuf *avatar_pixbuf;
- GdkPixbuf *service_pixbuf;
guint idle_id;
1.0f);
cairo_stroke (cr);
}
+#if 0
+ if (priv->service_pixbuf) {
+ guint x = C_WIDTH - SERVICE_ICON_SIZE - HILDON_MARGIN_DEFAULT;
+ guint y = (HEADER_HEIGHT - SERVICE_ICON_SIZE)/2;
+
+ if (priv->avatar_pixbuf)
+ x -= AVATAR_SIZE + HILDON_MARGIN_DEFAULT;
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+ gdk_cairo_set_source_pixbuf (cr,
+ priv->service_pixbuf,
+ x, y);
+ cairo_paint (cr);
+ }
+#endif
if (priv->message) {
- if (priv->service_pixbuf) {
- cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- gdk_cairo_set_source_pixbuf (cr,
- priv->service_pixbuf,
- C_WIDTH - SERVICE_ICON_SIZE,
- C_HEIGHT - FOOTER_HEIGHT - SERVICE_ICON_SIZE);
- cairo_paint_with_alpha (cr, 0.3);
- }
/* draw footer unread part bg */
rounded_rectangle (cr,
C_WIDTH,
HILDON_ICON_PIXEL_SIZE_THUMB);
- if (priv->service_pixbuf) {
- g_object_unref (priv->service_pixbuf);
- priv->service_pixbuf = NULL;
- }
+ gtk_widget_hide (priv->icon);
if (priv->avatar_pixbuf) {
g_object_unref (priv->avatar_pixbuf);
ELHomeAppletPrivate *priv = self->priv;
EBookQuery *query = NULL;
GError *error = NULL;
-
+ g_warning ("%s rid %s lid %s", G_STRFUNC, priv->remote_id, priv->local_id);
if (priv->local_id && priv->remote_id) {
const gchar *vcard = osso_abook_account_manager_get_vcard_field
(NULL, priv->local_id);
{
ELHomeAppletPrivate *priv = self->priv;
RTComElIter *it = NULL;
+ const gchar *icon_name = NULL;
clean_state (self);
show_event (self, it);
resolve_contact (self);
- if (g_strcmp0 (priv->local_id, "ring/tel/ring" == 0)) {
+ if (g_strcmp0 (priv->local_id, "ring/tel/ring") == 0) {
+ icon_name = "general_sms";
+ }
+ else{
McAccount *account;
- const gchar *icon_name = NULL;
account = osso_abook_account_manager_lookup_by_name (NULL,
priv->local_id);
if (account) {
McProfile *profile = mc_profile_lookup (mc_account_compat_get_profile (account));
icon_name = mc_profile_get_icon_name (profile);
}
- if (icon_name) {
- GdkScreen *screen;
- GtkIconTheme *icon_theme;
-
- screen = gtk_widget_get_screen (GTK_WIDGET (self));
- icon_theme = gtk_icon_theme_get_for_screen (screen);
+ }
- priv->service_pixbuf = gtk_icon_theme_load_icon (icon_theme,
- icon_name,
- SERVICE_ICON_SIZE,
- 0, NULL);
- }
+ if (icon_name) {
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->icon),
+ icon_name,
+ HILDON_ICON_SIZE_SMALL);
+ gtk_widget_show (priv->icon);
}
if (it) g_object_unref (it);
/* gtk_widget_set_size_request (priv->unread, */
/* -1, */
/* HEADER_HEIGHT); */
-#if 0
- priv->icon = gtk_image_new_from_icon_name ("chat_unread_sms",
- HILDON_ICON_SIZE_FINGER);
+#if 1
+ priv->icon = gtk_image_new ();
gtk_misc_set_alignment (GTK_MISC (priv->icon),
0.5f,
0.5f);
GTK_WIDGET_SET_FLAGS (priv->cut_message, GTK_NO_SHOW_ALL);
hbox = gtk_hbox_new (FALSE, 0);
- /* gtk_box_pack_start (GTK_BOX (hbox), priv->icon, FALSE, FALSE, 0); */
gtk_box_pack_start (GTK_BOX (hbox), priv->sender, FALSE, FALSE, 0);
/* gtk_box_pack_start (GTK_BOX (hbox), priv->avatar, FALSE, FALSE, 0); */
footer = gtk_hbox_new (FALSE, HILDON_MARGIN_DEFAULT);
gtk_box_pack_start (GTK_BOX (footer), priv->unread, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (footer), priv->cut_message, TRUE, TRUE, 0);
+ gtk_box_pack_end (GTK_BOX (footer), priv->icon, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (footer), priv->received, FALSE, FALSE, 0);
vbox = gtk_vbox_new (FALSE, 0);
osso_abook_init_with_name (PACKAGE, NULL);
- read_new_event (self);
+ add_new_idle (self);
#endif
}