size = 32768;
}
*attachments_size += size;
-
}
g_object_unref (part);
}
}
static void
+dummy_clear_func (GtkClipboard *clipboard,
+ gpointer user_data_or_owner)
+{
+ /* Do nothing */
+}
+
+static void
own_clipboard (ModestAttachmentsView *atts_view)
{
GtkTargetEntry targets[] = {
gtk_clipboard_set_with_owner (gtk_widget_get_clipboard (GTK_WIDGET (atts_view), GDK_SELECTION_PRIMARY),
targets, G_N_ELEMENTS (targets),
- clipboard_get, NULL, G_OBJECT(atts_view));
-
+ clipboard_get, dummy_clear_func, G_OBJECT(atts_view));
}
static gboolean
}
}
+
+guint
+modest_attachments_view_get_num_attachments (ModestAttachmentsView *atts_view)
+{
+ ModestAttachmentsViewPrivate *priv;
+ GList *children;
+ gint result;
+
+ g_return_val_if_fail (MODEST_IS_ATTACHMENTS_VIEW (atts_view), 0);
+ priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view);
+
+ children = gtk_container_get_children (GTK_CONTAINER (priv->box));
+ result = g_list_length (children);
+ g_list_free (children);
+
+ return result;
+}