+
/* Notification plugin for Claws-Mail
* Copyright (C) 2005-2007 Holger Berndt
*
/* Read selections from a common xml-file. Called when loading the plugin.
* Returns TRUE if data has been read, FALSE if no data is available
- * or an error occured.
+ * or an error occurred.
* This is analog to folder.h::folder_read_list. */
gboolean notification_foldercheck_read_array(void)
{
/* Check that root entry is "foldercheckarray" */
if(strcmp2(xmlnode->tag->tag, "foldercheckarray") != 0) {
- g_warning("wrong foldercheck array file\n");
+ g_warning("wrong foldercheck array file");
xml_free_tree(rootnode);
return FALSE;
}
xmlnode = branchnode->data;
if(strcmp2(xmlnode->tag->tag, "branch") != 0) {
- g_warning("tag name != \"branch\"\n");
+ g_warning("tag name != \"branch\"");
return FALSE;
}
}
}
if((list == NULL) || (entry == NULL)) {
- g_warning("Did not find attribute \"name\" in tag \"branch\"\n");
+ g_warning("Did not find attribute \"name\" in tag \"branch\"");
continue; /* with next branch */
}
/* These should all be leaves. */
if(!G_NODE_IS_LEAF(node))
g_warning("Subnodes in \"branch\" nodes should all be leaves. "
- "Ignoring deeper subnodes..\n");
+ "Ignoring deeper subnodes.");
/* Check if tag is "folderitem" */
xmlnode = node->data;
if(strcmp2(xmlnode->tag->tag, "folderitem") != 0) {
- g_warning("tag name != \"folderitem\"\n");
+ g_warning("tag name != \"folderitem\"");
continue; /* to next node in branch */
}
}
if((list == NULL) || (item == NULL)) {
g_warning("Did not find attribute \"identifier\" in tag "
- "\"folderitem\"\n");
+ "\"folderitem\"");
continue; /* with next leaf node */
}
{
gchar *name, *tmpname;
GdkPixbuf *pixbuf, *pixbuf_open;
- gboolean use_color;
- PangoWeight weight = PANGO_WEIGHT_NORMAL;
- GdkColor *foreground = NULL;
- static GdkColor color_noselect = {0, COLOR_DIM, COLOR_DIM, COLOR_DIM};
name = tmpname = folder_item_get_name(item);
pixbuf = item->no_select ? foldernoselect_pixbuf : folder_pixbuf;
pixbuf_open =
item->no_select ? foldernoselect_pixbuf : folderopen_pixbuf;
-
- if (folder_has_parent_of_type(item, F_DRAFT) ||
- folder_has_parent_of_type(item, F_OUTBOX) ||
- folder_has_parent_of_type(item, F_TRASH)) {
- use_color = FALSE;
- } else if (folder_has_parent_of_type(item, F_QUEUE)) {
- use_color = (item->total_msgs > 0);
- if (item->total_msgs > 0)
- weight = PANGO_WEIGHT_BOLD;
- } else {
- if (item->unread_msgs > 0)
- weight = PANGO_WEIGHT_BOLD;
- use_color = (item->new_msgs > 0);
- }
-
- if (item->no_select)
- foreground = &color_noselect;
/* insert this node */
gtk_tree_store_append(store, iter, parent);