[evolution/gnome-2-28] Synchronize with attachment logic in Evolution 2.29.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-28] Synchronize with attachment logic in Evolution 2.29.
- Date: Thu, 19 Nov 2009 11:52:35 +0000 (UTC)
commit 9a346d73c432abf557ae46aa09e079b07840a2f3
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Nov 19 05:39:02 2009 -0500
Synchronize with attachment logic in Evolution 2.29.
Reduces diff noise between the two branches.
mail/e-mail-attachment-bar.c | 3 +-
widgets/misc/e-attachment-button.c | 6 ++--
widgets/misc/e-attachment-view.c | 37 +++++++++++++++++++++--------------
3 files changed, 26 insertions(+), 20 deletions(-)
---
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index e3656e1..fd53292 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 d64dcaf..1cd517d 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 3455102..9976f48 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]