if (rc){
fprintf(stderr, "error open db %d %s\n", rc, sqlite3_errmsg(db));
}else {
- snprintf(sql, sizeof(sql)-1, "select count(id) from notifications where icon_name='general_%s'", notify_type);
+ snprintf(sql, sizeof(sql)-1, "select count(id) from notifications where icon_name='%s'", notify_type);
rc = sqlite3_prepare(db, sql, sizeof(sql)-1, &res, NULL);
if (rc != SQLITE_OK){
fprintf(stderr, "error prepare %d %s\n", rc, sql);
gint count = 0;
fprintf(stderr, "read notification \n");
- count = get_notify_count("missed");
+ count = get_notify_count("general_missed");
if (count > 0){
message = g_strdup_printf("%s: %d", _("Missed calls"), count);
}
- count = get_notify_count("sms");
+ count = get_notify_count("general_sms");
if (count > 0){
if (message){
message = g_strdup_printf("%s \n%s: %d", message, _("Missed sms"), count);
message = g_strdup_printf("%s: %d", _("Missed sms"), count);
}
}
- count = get_notify_count("chat");
+ count = get_notify_count("general_chat");
if (count > 0){
if (message){
message = g_strdup_printf("%s \n%s: %d", message, _("Missed chat"), count);
message = g_strdup_printf("%s: %d", _("Missed chat"), count);
}
}
- count = get_notify_count("mail");
+ count = get_notify_count("qgn_list_messagin");
if (count > 0){
if (message){
message = g_strdup_printf("%s \n%s: %d", message, _("Missed mail"), count);
message = g_strdup_printf("%s: %d", _("Missed mail"), count);
}
}
+ fprintf(stderr, "notify=%s\n", message);
return message;
}
PangoFontDescription *pfd = NULL;
fprintf(stderr, "change_billboard\n");
- if (desktop_plugin->priv->scene->notification){
+ if (desktop_plugin->priv->scene->notification < time(NULL)){
message = read_notification();
label = actor->image;
mes = g_markup_printf_escaped("<span bgcolor=\"%s\" foreground=\"%s\">%s</span>", "#FFFFFF", "#000000",
if (dbus_message_is_method_call(msg, NOTIFY_SIGNAL_INTERFACE, NOTIFY_MEMBER)){
fprintf(stderr,"read notifications.db notify\n");
//read_notification(priv->desktop_plugin);
- priv->scene->notification = TRUE;
+ priv->scene->notification = time(NULL) + 20;
}
if (dbus_message_is_signal(msg, NOTIFY_SIGNAL_INTERFACE, CLOSENOTIFY_MEMBER)){
fprintf(stderr,"read notifications.db close notify\n");
//read_notification(priv->desktop_plugin);
- priv->scene->notification = TRUE;
+ priv->scene->notification = time(NULL) + 20;
}
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;