gulong outbox_deleted_handler;
guint activity_changed_handler;
+ GdkColor *active_color;
};
#define MODEST_FOLDER_VIEW_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), \
buffer = g_string_append (buffer, *item_name);
if (concat_folder_name) {
- if (bold) buffer = g_string_append (buffer, "<span weight='bold'>");
buffer = g_string_append (buffer, folder_name);
- if (bold) buffer = g_string_append (buffer, "</span>");
}
g_free (*item_name);
g_object_unref (account);
*item_name = g_string_free (buffer, FALSE);
- *use_markup = bold;
+ *use_markup = FALSE;
} else {
*use_markup = FALSE;
}
if (item_name && item_weight) {
/* Set the name in the treeview cell: */
- if (use_markup)
- g_object_set (rendobj, "markup", item_name, "weight-set", FALSE, NULL);
- else
- g_object_set (rendobj, "text", item_name, "weight-set", TRUE, "weight", item_weight, NULL);
+ if (priv->cell_style == MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT && item_weight == 800 && priv->active_color) {
+ g_object_set (rendobj,
+ "text", item_name,
+ "weight-set", FALSE,
+ "foreground-set", TRUE,
+ "foreground-gdk", priv->active_color,
+ NULL);
+ } else {
+ g_object_set (rendobj,
+ "text", item_name,
+ "foreground-set", FALSE,
+ "weight-set", TRUE,
+ "weight", item_weight,
+ NULL);
+ }
/* Notify display name observers */
/* TODO: What listens for this signal, and how can it use only the new name? */
G_CALLBACK(on_configuration_key_changed),
obj);
+ priv->active_color = NULL;
+
update_style (obj);
g_signal_connect (G_OBJECT (obj), "notify::style", G_CALLBACK (on_notify_style), (gpointer) obj);
priv = MODEST_FOLDER_VIEW_GET_PRIVATE(obj);
+ if (priv->active_color) {
+ gdk_color_free (priv->active_color);
+ priv->active_color = NULL;
+ }
+
if (priv->timer_expander != 0) {
g_source_remove (priv->timer_expander);
priv->timer_expander = 0;
update_style (ModestFolderView *self)
{
ModestFolderViewPrivate *priv;
- GdkColor style_color;
+ GdkColor style_color, style_active_color;
PangoAttrList *attr_list;
GtkStyle *style;
PangoAttribute *attr;
NULL);
pango_attr_list_unref (attr_list);
}
+ if (priv->active_color)
+ gdk_color_free (priv->active_color);
+
+ if (gtk_style_lookup_color (GTK_WIDGET (self)->style, "ActiveTextColor", &style_active_color)) {
+ priv->active_color = gdk_color_copy (&style_active_color);
+ }
}
static void