"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/mail/em-folder-tree.c" between
evolution-3.32.4.tar.xz and evolution-3.34.0.tar.xz

About: Evolution is a personal information management application that provides integrated mail, calendaring and address book functionality (GNOME desktop).

em-folder-tree.c  (evolution-3.32.4.tar.xz):em-folder-tree.c  (evolution-3.34.0.tar.xz)
skipping to change at line 899 skipping to change at line 899
g_clear_object (&service); g_clear_object (&service);
} }
static void static void
folder_tree_render_icon (GtkTreeViewColumn *column, folder_tree_render_icon (GtkTreeViewColumn *column,
GtkCellRenderer *renderer, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeModel *model,
GtkTreeIter *iter) GtkTreeIter *iter)
{ {
GtkTreeSelection *selection; GtkTreeSelection *selection;
GtkTreePath *drag_dest_row;
GtkWidget *tree_view; GtkWidget *tree_view;
GIcon *icon; GIcon *icon, *custom_icon = NULL;
guint unread; guint unread;
guint old_unread; guint old_unread;
gchar *icon_name; gchar *icon_name;
gboolean is_selected; gboolean is_selected;
gboolean is_drafts = FALSE; gboolean is_drafts = FALSE;
gboolean is_drag_dest = FALSE;
gboolean show_new_mail_emblem; gboolean show_new_mail_emblem;
guint32 fi_flags = 0; guint32 fi_flags = 0;
gtk_tree_model_get ( gtk_tree_model_get (
model, iter, model, iter,
COL_STRING_ICON_NAME, &icon_name, COL_STRING_ICON_NAME, &icon_name,
COL_UINT_UNREAD_LAST_SEL, &old_unread, COL_UINT_UNREAD_LAST_SEL, &old_unread,
COL_UINT_UNREAD, &unread, COL_UINT_UNREAD, &unread,
COL_BOOL_IS_DRAFT, &is_drafts, COL_BOOL_IS_DRAFT, &is_drafts,
COL_UINT_FLAGS, &fi_flags, COL_UINT_FLAGS, &fi_flags,
COL_GICON_CUSTOM_ICON, &custom_icon,
-1); -1);
if (icon_name == NULL) if (!icon_name && !custom_icon)
return; return;
tree_view = gtk_tree_view_column_get_tree_view (column); tree_view = gtk_tree_view_column_get_tree_view (column);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
is_selected = gtk_tree_selection_iter_is_selected (selection, iter); is_selected = gtk_tree_selection_iter_is_selected (selection, iter);
gtk_tree_view_get_drag_dest_row ( if (!custom_icon && g_strcmp0 (icon_name, "folder") == 0) {
GTK_TREE_VIEW (tree_view), &drag_dest_row, NULL); GtkTreePath *drag_dest_row;
if (drag_dest_row != NULL) { gboolean is_drag_dest = FALSE;
GtkTreePath *path;
gtk_tree_view_get_drag_dest_row (GTK_TREE_VIEW (tree_view), &drag
_dest_row, NULL);
if (drag_dest_row != NULL) {
GtkTreePath *path;
path = gtk_tree_model_get_path (model, iter);
if (gtk_tree_path_compare (path, drag_dest_row) == 0)
is_drag_dest = TRUE;
gtk_tree_path_free (path);
path = gtk_tree_model_get_path (model, iter); gtk_tree_path_free (drag_dest_row);
if (gtk_tree_path_compare (path, drag_dest_row) == 0) }
is_drag_dest = TRUE;
gtk_tree_path_free (path);
gtk_tree_path_free (drag_dest_row);
}
if (g_strcmp0 (icon_name, "folder") == 0) {
if (is_selected) { if (is_selected) {
g_free (icon_name); g_free (icon_name);
icon_name = g_strdup ("folder-open"); icon_name = g_strdup ("folder-open");
} else if (is_drag_dest) { } else if (is_drag_dest) {
g_free (icon_name); g_free (icon_name);
icon_name = g_strdup ("folder-drag-accept"); icon_name = g_strdup ("folder-drag-accept");
} }
} }
icon = g_themed_icon_new (icon_name); if (custom_icon)
icon = g_object_ref (custom_icon);
else
icon = g_themed_icon_new (icon_name);
show_new_mail_emblem = show_new_mail_emblem =
(unread > old_unread) && (unread > old_unread) &&
!is_selected && !is_drafts && !is_selected && !is_drafts &&
((fi_flags & CAMEL_FOLDER_VIRTUAL) == 0); ((fi_flags & CAMEL_FOLDER_VIRTUAL) == 0);
/* Show an emblem if there's new mail. */ /* Show an emblem if there's new mail. */
if (show_new_mail_emblem) { if (show_new_mail_emblem) {
GIcon *temp_icon; GIcon *temp_icon;
GEmblem *emblem; GEmblem *emblem;
skipping to change at line 975 skipping to change at line 979
temp_icon = g_emblemed_icon_new (icon, emblem); temp_icon = g_emblemed_icon_new (icon, emblem);
g_object_unref (emblem); g_object_unref (emblem);
g_object_unref (icon); g_object_unref (icon);
icon = temp_icon; icon = temp_icon;
} }
g_object_set (renderer, "gicon", icon, NULL); g_object_set (renderer, "gicon", icon, NULL);
g_clear_object (&custom_icon);
g_object_unref (icon); g_object_unref (icon);
g_free (icon_name); g_free (icon_name);
} }
static void static void
folder_tree_selection_changed_cb (EMFolderTree *folder_tree, folder_tree_selection_changed_cb (EMFolderTree *folder_tree,
GtkTreeSelection *selection) GtkTreeSelection *selection)
{ {
GtkTreeModel *model; GtkTreeModel *model;
GtkTreeIter iter; GtkTreeIter iter;
skipping to change at line 1339 skipping to change at line 1344
priv->text_renderer = g_object_ref (gtk_cell_renderer_text_new ()); priv->text_renderer = g_object_ref (gtk_cell_renderer_text_new ());
gtk_tree_view_column_set_cell_data_func ( gtk_tree_view_column_set_cell_data_func (
column, renderer, folder_tree_render_store_icon, column, renderer, folder_tree_render_store_icon,
g_object_ref (priv->text_renderer), g_object_unref); g_object_ref (priv->text_renderer), g_object_unref);
renderer = priv->text_renderer; renderer = priv->text_renderer;
g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL); g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start (column, renderer, TRUE); gtk_tree_view_column_pack_start (column, renderer, TRUE);
gtk_tree_view_column_add_attribute (
column, renderer, "foreground-rgba", COL_RGBA_FOREGROUND_RGBA);
gtk_tree_view_column_set_cell_data_func ( gtk_tree_view_column_set_cell_data_func (
column, renderer, (GtkTreeCellDataFunc) column, renderer, (GtkTreeCellDataFunc)
folder_tree_render_display_name, NULL, NULL); folder_tree_render_display_name, NULL, NULL);
g_signal_connect_swapped ( g_signal_connect_swapped (
renderer, "edited", renderer, "edited",
G_CALLBACK (folder_tree_cell_edited_cb), object); G_CALLBACK (folder_tree_cell_edited_cb), object);
column = gtk_tree_view_column_new (); column = gtk_tree_view_column_new ();
gtk_tree_view_append_column (tree_view, column); gtk_tree_view_append_column (tree_view, column);
 End of changes. 11 change blocks. 
17 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)