gchar *mailbox;
ModestFolderViewStyle style;
ModestFolderViewCellStyle cell_style;
+ gboolean show_message_count;
gboolean reselect; /* we use this to force a reselection of the INBOX */
gboolean show_non_move;
f_model = gtk_tree_view_get_model (GTK_TREE_VIEW (self));
if (!GTK_IS_TREE_MODEL_FILTER(f_model)) {
- g_warning ("BUG: %s: not a valid filter model", __FUNCTION__);
+ g_debug ("%s: emtpy model or not filter model", __FUNCTION__);
return FALSE;
}
g_free (*item_name);
*item_name = new_item_name;
}
+ } else if (!g_ascii_strcasecmp (*item_name, "Inbox")) {
+
+ g_free (*item_name);
+ *item_name = g_strdup (_("mcen_me_folder_inbox"));
}
if (!is_special || multiaccount) {
} else {
/* Use bold font style if there are unread or unset messages */
if (number > 0) {
- item_name = g_strdup_printf ("%s (%d)", fname, number);
+ if (priv->show_message_count) {
+ item_name = g_strdup_printf ("%s (%d)", fname, number);
+ } else {
+ item_name = g_strdup (fname);
+ }
item_weight = 800;
} else {
item_name = g_strdup (fname);
#ifdef MODEST_TOOLKIT_HILDON2
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
"ypad", MODEST_MARGIN_DEFAULT,
+ "xpad", MODEST_MARGIN_DEFAULT,
#else
"ellipsize", PANGO_ELLIPSIZE_END,
#endif
priv->reselect = FALSE;
priv->show_non_move = TRUE;
priv->list_to_move = NULL;
+ priv->show_message_count = TRUE;
/* Build treeview */
add_columns (GTK_WIDGET (obj));
break;
}
}
+ if (retval && TNY_IS_ACCOUNT (instance) &&
+ modest_tny_folder_store_is_remote (TNY_FOLDER_STORE (instance))) {
+ ModestProtocolType protocol_type;
+
+ protocol_type = modest_tny_account_get_protocol_type (TNY_ACCOUNT (instance));
+ retval = !modest_protocol_registry_protocol_type_has_tag
+ (modest_runtime_get_protocol_registry (),
+ protocol_type,
+ MODEST_PROTOCOL_REGISTRY_STORE_FORBID_MESSAGE_ADD);
+ }
}
/* apply special filters */
void
modest_folder_view_select_first_inbox_or_local (ModestFolderView *self)
{
+#ifndef MODEST_TOOLKIT_HILDON2
GtkTreeModel *model;
GtkTreeIter iter, inbox_iter;
GtkTreeSelection *sel;
/* set focus */
gtk_widget_grab_focus (GTK_WIDGET(self));
+#endif
}
}
}
+void
+modest_folder_view_show_message_count (ModestFolderView *folder_view,
+ gboolean show)
+{
+ ModestFolderViewPrivate* priv;
+
+ g_return_if_fail (folder_view && MODEST_IS_FOLDER_VIEW (folder_view));
+
+ priv = MODEST_FOLDER_VIEW_GET_PRIVATE(folder_view);
+ priv->show_message_count = show;
+
+ g_object_set (G_OBJECT (priv->messages_renderer),
+ "visible", (priv->cell_style == MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT && priv->show_message_count),
+ NULL);
+}
+
/* Returns FALSE if it did not selected anything */
static gboolean
_clipboard_set_selected_data (ModestFolderView *folder_view,
priv->cell_style = cell_style;
g_object_set (G_OBJECT (priv->messages_renderer),
- "visible", (cell_style == MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT),
+ "visible", (cell_style == MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT && priv->show_message_count),
NULL);
gtk_widget_queue_draw (GTK_WIDGET (self));