aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment-icon-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-03-26 12:48:21 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-03-26 12:48:21 +0800
commitc05c973cff53769ef575bfc5257a2a414117b323 (patch)
tree0fbf2bedde0eccc6062d2240890ab53875f6aa71 /widgets/misc/e-attachment-icon-view.c
parent6e163b39c75dbba470d073b4f79a897aa6fb0e54 (diff)
downloadgsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar
gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.gz
gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.bz2
gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.lz
gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.xz
gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.tar.zst
gsoc2013-evolution-c05c973cff53769ef575bfc5257a2a414117b323.zip
Saving progress again on the attachment rewrite.
svn path=/branches/kill-bonobo/; revision=37476
Diffstat (limited to 'widgets/misc/e-attachment-icon-view.c')
-rw-r--r--widgets/misc/e-attachment-icon-view.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/widgets/misc/e-attachment-icon-view.c b/widgets/misc/e-attachment-icon-view.c
index 6d27429743..f6e42b2fbe 100644
--- a/widgets/misc/e-attachment-icon-view.c
+++ b/widgets/misc/e-attachment-icon-view.c
@@ -21,6 +21,7 @@
#include "e-attachment-icon-view.h"
+#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include "e-attachment.h"
@@ -163,6 +164,15 @@ attachment_icon_view_popup_menu (GtkWidget *widget)
return TRUE;
}
+static void
+attachment_icon_view_item_activated (GtkIconView *icon_view,
+ GtkTreePath *path)
+{
+ EAttachmentView *view = E_ATTACHMENT_VIEW (icon_view);
+
+ e_attachment_view_open_path (view, path, NULL);
+}
+
static EAttachmentViewPrivate *
attachment_icon_view_get_private (EAttachmentView *view)
{
@@ -265,6 +275,7 @@ attachment_icon_view_class_init (EAttachmentIconViewClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
+ GtkIconViewClass *icon_view_class;
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EAttachmentViewPrivate));
@@ -282,6 +293,9 @@ attachment_icon_view_class_init (EAttachmentIconViewClass *class)
widget_class->drag_data_received = attachment_icon_view_drag_data_received;
widget_class->popup_menu = attachment_icon_view_popup_menu;
+ icon_view_class = GTK_ICON_VIEW_CLASS (class);
+ icon_view_class->item_activated = attachment_icon_view_item_activated;
+
g_object_class_override_property (
object_class, PROP_EDITABLE, "editable");
}
@@ -317,7 +331,7 @@ attachment_icon_view_init (EAttachmentIconView *icon_view)
renderer = gtk_cell_renderer_pixbuf_new ();
g_object_set (renderer, "stock-size", GTK_ICON_SIZE_DIALOG, NULL);
- gtk_cell_layout_pack_start (cell_layout, renderer, FALSE);
+ gtk_cell_layout_pack_start (cell_layout, renderer, TRUE);
gtk_cell_layout_add_attribute (
cell_layout, renderer, "gicon",
@@ -327,11 +341,35 @@ attachment_icon_view_init (EAttachmentIconView *icon_view)
g_object_set (
renderer, "alignment", PANGO_ALIGN_CENTER,
"xalign", 0.5, NULL);
- gtk_cell_layout_pack_start (cell_layout, renderer, FALSE);
+ gtk_cell_layout_pack_start (cell_layout, renderer, TRUE);
gtk_cell_layout_add_attribute (
cell_layout, renderer, "text",
E_ATTACHMENT_STORE_COLUMN_CAPTION);
+
+ renderer = gtk_cell_renderer_progress_new ();
+ g_object_set (renderer, "text", _("Loading"), NULL);
+ gtk_cell_layout_pack_start (cell_layout, renderer, TRUE);
+
+ gtk_cell_layout_add_attribute (
+ cell_layout, renderer, "value",
+ E_ATTACHMENT_STORE_COLUMN_PERCENT);
+
+ gtk_cell_layout_add_attribute (
+ cell_layout, renderer, "visible",
+ E_ATTACHMENT_STORE_COLUMN_LOADING);
+
+ renderer = gtk_cell_renderer_progress_new ();
+ g_object_set (renderer, "text", _("Saving"), NULL);
+ gtk_cell_layout_pack_start (cell_layout, renderer, TRUE);
+
+ gtk_cell_layout_add_attribute (
+ cell_layout, renderer, "value",
+ E_ATTACHMENT_STORE_COLUMN_PERCENT);
+
+ gtk_cell_layout_add_attribute (
+ cell_layout, renderer, "visible",
+ E_ATTACHMENT_STORE_COLUMN_SAVING);
}
GType