aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-19 18:39:02 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-19 18:45:17 +0800
commit9a346d73c432abf557ae46aa09e079b07840a2f3 (patch)
treea4f1e2d4218068a6daeef9cacc5764f73bf6adc3
parent626664739f79c12e46c3fdc31f29ddcad31fe4f7 (diff)
downloadgsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.tar
gsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.tar.gz
gsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.tar.bz2
gsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.tar.lz
gsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.tar.xz
gsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.tar.zst
gsoc2013-evolution-9a346d73c432abf557ae46aa09e079b07840a2f3.zip
Synchronize with attachment logic in Evolution 2.29.
Reduces diff noise between the two branches.
-rw-r--r--mail/e-mail-attachment-bar.c3
-rw-r--r--widgets/misc/e-attachment-button.c6
-rw-r--r--widgets/misc/e-attachment-view.c37
3 files changed, 26 insertions, 20 deletions
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index e3656e1223..fd53292610 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -98,6 +98,7 @@ mail_attachment_bar_update_status (EMailAttachmentBar *bar)
{
EAttachmentView *view;
EAttachmentStore *store;
+ GtkActivatable *activatable;
GtkExpander *expander;
GtkAction *action;
GtkLabel *label;
@@ -106,8 +107,6 @@ mail_attachment_bar_update_status (EMailAttachmentBar *bar)
gchar *display_size;
gchar *markup;
- GtkActivatable *activatable;
-
view = E_ATTACHMENT_VIEW (bar);
store = e_attachment_view_get_store (view);
expander = GTK_EXPANDER (bar->priv->expander);
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index d64dcafb4a..1cd517d3e2 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -199,7 +199,7 @@ exit:
static void
attachment_button_update_pixbufs (EAttachmentButton *button)
{
- GtkCellView *cell_view;
+ GtkCellLayout *cell_layout;
GtkCellRenderer *renderer;
GtkIconTheme *icon_theme;
GdkPixbuf *pixbuf_expander_open;
@@ -209,8 +209,8 @@ attachment_button_update_pixbufs (EAttachmentButton *button)
icon_theme = gtk_icon_theme_get_default ();
/* Grab the first cell renderer. */
- cell_view = GTK_CELL_VIEW (button->priv->cell_view);
- list = gtk_cell_view_get_cell_renderers (cell_view);
+ cell_layout = GTK_CELL_LAYOUT (button->priv->cell_view);
+ list = gtk_cell_layout_get_cells (cell_layout);
renderer = GTK_CELL_RENDERER (list->data);
g_list_free (list);
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 345510230b..9976f480e3 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -682,6 +682,26 @@ attachment_view_update_actions (EAttachmentView *view)
}
static void
+attachment_view_add_handler (GType type,
+ EAttachmentView *view)
+{
+ EAttachmentViewPrivate *priv;
+ EAttachmentHandler *handler;
+ const GtkTargetEntry *targets;
+ guint n_targets;
+
+ priv = e_attachment_view_get_private (view);
+
+ handler = g_object_new (type, "view", view, NULL);
+
+ targets = e_attachment_handler_get_target_table (handler, &n_targets);
+ gtk_target_list_add_table (priv->target_list, targets, n_targets);
+ priv->drag_actions |= e_attachment_handler_get_drag_actions (handler);
+
+ g_ptr_array_add (priv->handlers, handler);
+}
+
+static void
attachment_view_init_handlers (EAttachmentView *view)
{
EAttachmentViewPrivate *priv;
@@ -702,21 +722,8 @@ attachment_view_init_handlers (EAttachmentView *view)
children = g_type_children (E_TYPE_ATTACHMENT_HANDLER, NULL);
- for (ii = 0; children[ii] != G_TYPE_INVALID; ii++) {
- EAttachmentHandler *handler;
- const GtkTargetEntry *targets;
- guint n_targets;
-
- handler = g_object_new (children[ii], "view", view, NULL);
-
- targets = e_attachment_handler_get_target_table (
- handler, &n_targets);
- gtk_target_list_add_table (target_list, targets, n_targets);
- priv->drag_actions |=
- e_attachment_handler_get_drag_actions (handler);
-
- g_ptr_array_add (priv->handlers, handler);
- }
+ for (ii = 0; children[ii] != G_TYPE_INVALID; ii++)
+ attachment_view_add_handler (children[ii], view);
g_free (children);
}