aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
commit4ec46cc05fcb94d181fb9c2412984a1446647c85 (patch)
treed16ce30e77dd539c03509237dd4c723d46aea97a /widgets
parent5ea7e23aef0c239af2600c95419ba0bda0f08b3c (diff)
parent19163c2b71e6128fc9b32287b99b1f4422324c2d (diff)
downloadgsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.gz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.bz2
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.lz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.xz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.zst
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.zip
Merge from master
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-timezone-dialog/Makefile.am7
-rw-r--r--widgets/menus/Makefile.am8
-rw-r--r--widgets/misc/Makefile.am29
-rw-r--r--widgets/misc/e-account-tree-view.c32
-rw-r--r--widgets/misc/e-attachment-handler.h2
-rw-r--r--widgets/misc/e-attachment-icon-view.c2
-rw-r--r--widgets/misc/e-attachment-store.c11
-rw-r--r--widgets/misc/e-attachment-tree-view.c2
-rw-r--r--widgets/misc/e-calendar-item.c3
-rw-r--r--widgets/misc/e-dateedit.c2
-rw-r--r--widgets/misc/e-import-assistant.c2
-rw-r--r--widgets/misc/e-url-entry.c2
-rw-r--r--widgets/misc/e-url-entry.h3
-rw-r--r--widgets/misc/e-web-view.c2
-rw-r--r--widgets/table/Makefile.am14
-rw-r--r--widgets/table/e-table-field-chooser-item.c32
-rw-r--r--widgets/table/e-table-group-container.c5
-rw-r--r--widgets/table/e-table-header-item.c49
-rw-r--r--widgets/table/e-table-header-utils.c254
-rw-r--r--widgets/table/e-table-header-utils.h4
-rw-r--r--widgets/table/e-table-memory.c2
-rw-r--r--widgets/table/e-table-utils.c5
-rw-r--r--widgets/table/e-tree-memory.c5
-rw-r--r--widgets/table/e-tree-model.c3
-rw-r--r--widgets/table/e-tree-sorted.c8
-rw-r--r--widgets/table/e-tree.c5
-rw-r--r--widgets/text/Makefile.am7
-rw-r--r--widgets/text/e-reflow.c4
-rw-r--r--widgets/text/e-text.c11
29 files changed, 176 insertions, 339 deletions
diff --git a/widgets/e-timezone-dialog/Makefile.am b/widgets/e-timezone-dialog/Makefile.am
index fe5d468b3a..396ce6a4a5 100644
--- a/widgets/e-timezone-dialog/Makefile.am
+++ b/widgets/e-timezone-dialog/Makefile.am
@@ -6,8 +6,8 @@ libetimezonedialog_la_CPPFLAGS = \
-I$(top_srcdir)/widgets \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DG_LOG_DOMAIN=__FILE__ \
- $(GNOME_PLATFORM_CFLAGS) \
- $(TZDIALOG_CFLAGS)
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS)
libetimezonedialog_la_SOURCES = \
e-timezone-dialog.c \
@@ -18,8 +18,7 @@ libetimezonedialog_la_LDFLAGS = $(NO_UNDEFINED)
libetimezonedialog_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(EVOLUTION_CALENDAR_LIBS)
- $(TZDIALOG_LIBS) \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS)
ui_DATA = e-timezone-dialog.ui
diff --git a/widgets/menus/Makefile.am b/widgets/menus/Makefile.am
index 3a33e64651..0dc38fce28 100644
--- a/widgets/menus/Makefile.am
+++ b/widgets/menus/Makefile.am
@@ -6,8 +6,8 @@ libmenus_la_CPPFLAGS = \
-I$(top_srcdir)/widgets \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DG_LOG_DOMAIN=\"menus\" \
- $(GNOME_PLATFORM_CFLAGS) \
- $(E_UTIL_CFLAGS)
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS)
libmenus_la_SOURCES = \
gal-define-views-dialog.c \
@@ -46,8 +46,8 @@ libmenus_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/table/libetable.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(GNOME_PLATFORM_LIBS) \
- $(E_UTIL_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
icons =
EXTRA_DIST = \
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index 33bde9301c..cd5cada041 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -78,15 +78,15 @@ libemiscwidgets_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/filter \
-I$(top_srcdir)/widgets \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
+ -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
-DEVOLUTION_UIDIR=\""$(uidir)"\" \
-DG_LOG_DOMAIN=__FILE__ \
- $(EVOLUTION_MAIL_CFLAGS) \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
$(CHAMPLAIN_CFLAGS) \
$(GEOCLUE_CFLAGS) \
- $(CLUTTER_CFLAGS)
-
+ $(CLUTTER_CFLAGS) \
+ $(GTKHTML_CFLAGS)
libemiscwidgets_la_SOURCES = \
$(widgetsinclude_HEADERS) \
@@ -165,13 +165,14 @@ libemiscwidgets_la_LIBADD = \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/a11y/libevolution-a11y.la \
$(top_builddir)/libgnomecanvas/libgnomecanvas.la \
- $(EVOLUTION_MAIL_LIBS) \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(MATH_LIB) \
$(ICONV_LIBS) \
$(CHAMPLAIN_LIBS) \
$(GEOCLUE_LIBS) \
- $(CLUTTER_LIBS)
+ $(CLUTTER_LIBS) \
+ $(GTKHTML_LIBS)
noinst_PROGRAMS = \
test-calendar \
@@ -183,9 +184,9 @@ test_widgets_misc_CPPFLAGS= \
-I$(top_srcdir) \
-I$(top_srcdir)/filter \
-I$(top_srcdir)/widgets \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
+ -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
-DG_LOG_DOMAIN=__FILE__ \
- $(EVOLUTION_MAIL_CFLAGS) \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS)
# test-calendar
@@ -199,8 +200,8 @@ test_calendar_LDADD = \
libemiscwidgets.la \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/filter/libfilter.la \
- $(GNOME_PLATFORM_LIBS) \
- $(E_WIDGETS_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
# test-dateedit
@@ -213,8 +214,8 @@ test_dateedit_LDADD = \
libemiscwidgets.la \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/filter/libfilter.la \
- $(GNOME_PLATFORM_LIBS) \
- $(E_WIDGETS_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
# test-preferences-window
@@ -227,8 +228,8 @@ test_preferences_window_LDADD = \
libemiscwidgets.la \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/filter/libfilter.la \
- $(GNOME_PLATFORM_LIBS) \
- $(E_WIDGETS_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
EXTRA_DIST = $(ui_DATA)
diff --git a/widgets/misc/e-account-tree-view.c b/widgets/misc/e-account-tree-view.c
index a2136433d4..7eae4e14aa 100644
--- a/widgets/misc/e-account-tree-view.c
+++ b/widgets/misc/e-account-tree-view.c
@@ -941,7 +941,8 @@ e_account_tree_view_get_selected_type (EAccountTreeView *tree_view)
* Since: 3.4
**/
void
-e_account_tree_view_set_selected_type (EAccountTreeView *tree_view, EAccountTreeViewSelectedType select)
+e_account_tree_view_set_selected_type (EAccountTreeView *tree_view,
+ EAccountTreeViewSelectedType select)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
@@ -994,7 +995,8 @@ e_account_tree_view_set_selected_type (EAccountTreeView *tree_view, EAccountTree
}
static guint
-account_tree_view_get_slist_index (const GSList *account_uids, const gchar *uid)
+account_tree_view_get_slist_index (const GSList *account_uids,
+ const gchar *uid)
{
guint res = 0;
@@ -1021,7 +1023,8 @@ account_tree_view_get_slist_index (const GSList *account_uids, const gchar *uid)
* Since: 3.4
**/
void
-e_account_tree_view_set_sort_order (EAccountTreeView *tree_view, const GSList *account_uids)
+e_account_tree_view_set_sort_order (EAccountTreeView *tree_view,
+ const GSList *account_uids)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -1064,7 +1067,9 @@ e_account_tree_view_set_sort_order (EAccountTreeView *tree_view, const GSList *a
}
static gint
-eval_order_by_sort_hash_cb (gconstpointer a, gconstpointer b, gpointer user_data)
+eval_order_by_sort_hash_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer user_data)
{
guint asortorder = GPOINTER_TO_UINT (g_hash_table_lookup (user_data, a));
guint bsortorder = GPOINTER_TO_UINT (g_hash_table_lookup (user_data, b));
@@ -1173,7 +1178,8 @@ e_account_tree_view_sort_changed (EAccountTreeView *tree_view)
}
static void
-account_tree_view_swap_sort_order (EAccountTreeView *tree_view, gint direction)
+account_tree_view_swap_sort_order (EAccountTreeView *tree_view,
+ gint direction)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
@@ -1239,7 +1245,8 @@ e_account_tree_view_move_down (EAccountTreeView *tree_view)
}
void
-e_account_tree_view_set_sort_alpha (EAccountTreeView *tree_view, gboolean sort_alpha)
+e_account_tree_view_set_sort_alpha (EAccountTreeView *tree_view,
+ gboolean sort_alpha)
{
g_return_if_fail (tree_view != NULL);
g_return_if_fail (E_IS_ACCOUNT_TREE_VIEW (tree_view));
@@ -1265,7 +1272,8 @@ e_account_tree_view_get_sort_alpha (EAccountTreeView *tree_view)
}
void
-e_account_tree_view_set_express_mode (EAccountTreeView *tree_view, gboolean express_mode)
+e_account_tree_view_set_express_mode (EAccountTreeView *tree_view,
+ gboolean express_mode)
{
g_return_if_fail (tree_view != NULL);
g_return_if_fail (E_IS_ACCOUNT_TREE_VIEW (tree_view));
@@ -1291,7 +1299,9 @@ e_account_tree_view_get_express_mode (EAccountTreeView *tree_view)
}
static void
-update_special_enable_state (EAccountTreeView *tree_view, const gchar *display_name, gboolean enabled)
+update_special_enable_state (EAccountTreeView *tree_view,
+ const gchar *display_name,
+ gboolean enabled)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -1332,7 +1342,8 @@ update_special_enable_state (EAccountTreeView *tree_view, const gchar *display_n
}
void
-e_account_tree_view_set_enable_local_folders (EAccountTreeView *tree_view, gboolean enabled)
+e_account_tree_view_set_enable_local_folders (EAccountTreeView *tree_view,
+ gboolean enabled)
{
g_return_if_fail (tree_view != NULL);
g_return_if_fail (E_IS_ACCOUNT_TREE_VIEW (tree_view));
@@ -1359,7 +1370,8 @@ e_account_tree_view_get_enable_local_folders (EAccountTreeView *tree_view)
}
void
-e_account_tree_view_set_enable_search_folders (EAccountTreeView *tree_view, gboolean enabled)
+e_account_tree_view_set_enable_search_folders (EAccountTreeView *tree_view,
+ gboolean enabled)
{
g_return_if_fail (tree_view != NULL);
g_return_if_fail (E_IS_ACCOUNT_TREE_VIEW (tree_view));
diff --git a/widgets/misc/e-attachment-handler.h b/widgets/misc/e-attachment-handler.h
index e85cd9b2ee..81a883deeb 100644
--- a/widgets/misc/e-attachment-handler.h
+++ b/widgets/misc/e-attachment-handler.h
@@ -22,7 +22,7 @@
#ifndef E_ATTACHMENT_HANDLER_H
#define E_ATTACHMENT_HANDLER_H
-#include <e-util/e-extension.h>
+#include <libebackend/e-extension.h>
#include <misc/e-attachment-view.h>
/* Standard GObject macros */
diff --git a/widgets/misc/e-attachment-icon-view.c b/widgets/misc/e-attachment-icon-view.c
index 9dd782529b..cf14d97746 100644
--- a/widgets/misc/e-attachment-icon-view.c
+++ b/widgets/misc/e-attachment-icon-view.c
@@ -26,7 +26,7 @@
#include "e-attachment-icon-view.h"
#include <glib/gi18n.h>
-#include <e-util/e-extensible.h>
+#include <libebackend/e-extensible.h>
#include "e-attachment.h"
#include "e-attachment-store.h"
diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c
index 8db9f2af80..691fd518b8 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -1080,7 +1080,7 @@ struct _SaveContext {
static SaveContext *
attachment_store_save_context_new (EAttachmentStore *store,
GFile *destination,
- const gchar *filename_prefix,
+ const gchar *filename_prefix,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1128,7 +1128,7 @@ attachment_store_save_context_free (SaveContext *save_context)
g_free (save_context->filename_prefix);
save_context->filename_prefix = NULL;
-
+
if (save_context->fresh_directory) {
g_object_unref (save_context->fresh_directory);
save_context->fresh_directory = NULL;
@@ -1145,7 +1145,10 @@ attachment_store_save_context_free (SaveContext *save_context)
}
static void
-attachment_store_move_file (SaveContext *save_context, GFile *source, GFile *destination, GError **error)
+attachment_store_move_file (SaveContext *save_context,
+ GFile *source,
+ GFile *destination,
+ GError **error)
{
gchar *tmpl;
gchar *path;
@@ -1311,7 +1314,7 @@ attachment_store_save_cb (EAttachment *attachment,
void
e_attachment_store_save_async (EAttachmentStore *store,
GFile *destination,
- const gchar *filename_prefix,
+ const gchar *filename_prefix,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/widgets/misc/e-attachment-tree-view.c b/widgets/misc/e-attachment-tree-view.c
index 529312006f..7c67fdb917 100644
--- a/widgets/misc/e-attachment-tree-view.c
+++ b/widgets/misc/e-attachment-tree-view.c
@@ -26,7 +26,7 @@
#include "e-attachment-tree-view.h"
#include <glib/gi18n.h>
-#include <e-util/e-extensible.h>
+#include <libebackend/e-extensible.h>
#include "e-attachment.h"
#include "e-attachment-store.h"
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index d3f42fd359..c7f2e049d9 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -25,6 +25,8 @@
#include <config.h>
#endif
+#include <libebackend/e-extensible.h>
+
#include "e-calendar-item.h"
#include "ea-widgets.h"
@@ -36,7 +38,6 @@
#include <glib/gi18n.h>
#include <libedataserver/e-data-server-util.h>
#include <e-util/e-util.h>
-#include <e-util/e-extensible.h>
static const gint e_calendar_item_days_in_month[12] = {
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 2a9eb7f457..970a06b402 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -37,10 +37,10 @@
#include <atk/atkrelation.h>
#include <atk/atkrelationset.h>
#include <glib/gi18n.h>
+#include <libebackend/e-extensible.h>
#include <libedataserver/e-time-utils.h>
#include <libedataserver/e-data-server-util.h>
#include <e-util/e-util.h>
-#include <e-util/e-extensible.h>
#include "e-calendar.h"
struct _EDateEditPrivate {
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 06dff88e29..a2588cd075 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -32,9 +32,9 @@
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
+#include <libebackend/e-extensible.h>
#include <e-util/e-import.h>
-#include <e-util/e-extensible.h>
#include <e-util/e-util-private.h>
typedef struct _ImportFilePage ImportFilePage;
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index c4a174c0a6..c59cf0739c 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -118,8 +118,6 @@ mnemonic_activate (GtkWidget *widget,
return gtk_widget_mnemonic_activate (priv->entry, group_cycling);
}
-
-
GtkWidget *
e_url_entry_new (void)
{
diff --git a/widgets/misc/e-url-entry.h b/widgets/misc/e-url-entry.h
index 7b50f79f7a..119fe47b18 100644
--- a/widgets/misc/e-url-entry.h
+++ b/widgets/misc/e-url-entry.h
@@ -33,7 +33,6 @@ G_BEGIN_DECLS
#define E_IS_URL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_URL_ENTRY))
#define E_IS_URL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_URL_ENTRY))
-
typedef struct _EUrlEntry EUrlEntry;
typedef struct _EUrlEntryPrivate EUrlEntryPrivate;
typedef struct _EUrlEntryClass EUrlEntryClass;
@@ -48,8 +47,6 @@ struct _EUrlEntryClass {
GtkHBoxClass parent_class;
};
-
-
GType e_url_entry_get_type (void);
GtkWidget *e_url_entry_new (void);
GtkWidget *e_url_entry_get_entry (EUrlEntry *url_entry);
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index 8e037ac66c..c35bbcc123 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -26,11 +26,11 @@
#include <glib/gi18n-lib.h>
#include <camel/camel.h>
+#include <libebackend/e-extensible.h>
#include <e-util/e-util.h>
#include <e-util/e-alert-dialog.h>
#include <e-util/e-alert-sink.h>
-#include <e-util/e-extensible.h>
#include <e-util/e-plugin-ui.h>
#include "e-popup-action.h"
diff --git a/widgets/table/Makefile.am b/widgets/table/Makefile.am
index 0ae1e2b7e9..36af5ec2bf 100644
--- a/widgets/table/Makefile.am
+++ b/widgets/table/Makefile.am
@@ -7,11 +7,10 @@ libetable_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/widgets \
- $(E_UTIL_CFLAGS) \
- $(E_WIDGETS_CFLAGS) \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
- -DEVOLUTION_UIDIR=\"$(uidir)\" \
- -DG_LOG_DOMAIN=\"e-table\"
+ -DEVOLUTION_UIDIR=\"$(uidir)\" \
+ -DG_LOG_DOMAIN=\"e-table\"
libetable_la_SOURCES = \
e-cell.c \
@@ -173,10 +172,9 @@ libetable_la_LIBADD = \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(top_builddir)/widgets/text/libetext.la \
$(top_builddir)/libgnomecanvas/libgnomecanvas.la \
- $(E_UTIL_LIBS) \
- $(E_WIDGETS_LIBS) \
- $(MATH_LIB) \
- $(GNOME_PLATFORM_LIBS)
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS) \
+ $(MATH_LIB)
icons = \
arrow-down.xpm \
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index ecc414853c..78d8461b5f 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -491,17 +491,12 @@ etfci_draw (GnomeCanvasItem *item,
gint rows;
gint y1, y2;
gint row;
- GtkStyle *style;
- GtkStateType state;
if (etfci->combined_header == NULL)
return;
rows = e_table_header_count (etfci->combined_header);
- style = gtk_widget_get_style (GTK_WIDGET (canvas));
- state = gtk_widget_get_state (GTK_WIDGET (canvas));
-
y1 = y2 = 0;
for (row = 0; row < rows; row++, y1 = y2) {
ETableCol *ecol;
@@ -519,10 +514,7 @@ etfci_draw (GnomeCanvasItem *item,
if (y2 < y)
continue;
- cairo_save (cr);
-
e_table_header_draw_button (cr, ecol,
- style, state,
GTK_WIDGET (canvas),
-x, y1 - y,
width, height,
@@ -567,9 +559,6 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas);
GtkTargetList *list;
GdkDragContext *context;
- GdkWindow *window;
- GtkStyle *style;
- GtkStateType state;
ETableCol *ecol;
cairo_surface_t *cs;
cairo_t *cr;
@@ -604,28 +593,19 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
g_free ((gpointer) etfci_drag_types[0].target);
button_height = e_table_header_compute_height (ecol, widget);
- window = gtk_widget_get_window (widget);
- cs = gdk_window_create_similar_surface (
- window, CAIRO_CONTENT_COLOR, etfci->width, button_height);
-
- style = gtk_widget_get_style (widget);
- state = gtk_widget_get_state (widget);
+ cs = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+ etfci->width, button_height);
+ cr = cairo_create (cs);
cr = cairo_create (cs);
e_table_header_draw_button (
- cr, ecol, style,
- state, widget, 0, 0,
+ cr, ecol,
+ widget, 0, 0,
etfci->width, button_height,
etfci->width, button_height,
E_TABLE_COL_ARROW_NONE);
- pixbuf = gdk_pixbuf_get_from_window (window, 0, 0, etfci->width, button_height);
- gtk_drag_set_icon_pixbuf (
- context,
- pixbuf,
- etfci->width / 2,
- button_height / 2);
- g_object_unref (pixbuf);
+ gtk_drag_set_icon_surface (context, cs);
cairo_surface_destroy (cs);
cairo_destroy (cr);
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index d874834db1..7d04eda9d9 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -1252,7 +1252,7 @@ e_table_group_container_print_page (EPrintable *ep,
gboolean quantize,
ETGCPrintContext *groupcontext)
{
- cairo_t *cr;
+ cairo_t *cr = NULL;
GtkPageSetup *setup;
gdouble yd;
gdouble page_height, page_margin;
@@ -1301,8 +1301,7 @@ e_table_group_container_print_page (EPrintable *ep,
child_height = e_printable_height (child_printable, context, width,yd, quantize);
if (child_height < 0)
child_height = -child_height;
- if (yd < 2 * TEXT_AREA_HEIGHT + 20 + child_height )
- {
+ if (cr && yd < 2 * TEXT_AREA_HEIGHT + 20 + child_height) {
cairo_show_page (cr);
cairo_translate (cr, -2 * TEXT_AREA_HEIGHT, -TEXT_AREA_HEIGHT);
break;
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 11d8f31f81..b8aa55f369 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -996,9 +996,7 @@ ethi_draw (GnomeCanvasItem *item,
gint x1, x2;
gint col;
GHashTable *arrows = g_hash_table_new (NULL, NULL);
- GtkStyle *style;
-
- style = gtk_widget_get_style (GTK_WIDGET (canvas));
+ GtkStyleContext *context;
if (ethi->sort_info) {
gint length;
@@ -1040,10 +1038,13 @@ ethi_draw (GnomeCanvasItem *item,
ethi->width = e_table_header_total_width (ethi->eth) + ethi->group_indent_width;
x1 = x2 = 0;
x2 += ethi->group_indent_width;
+
+ context = gtk_widget_get_style_context (GTK_WIDGET (canvas));
+
for (col = 0; col < cols; col++, x1 = x2) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, col);
- GtkStateType state;
gint col_width;
+ GtkRegionFlags flags = 0;
col_width = ecol->width;
@@ -1058,15 +1059,29 @@ ethi_draw (GnomeCanvasItem *item,
if (x2 <= x1)
continue;
- state = gtk_widget_get_state (GTK_WIDGET (canvas));
+ if (((col + 1) % 2) == 0)
+ flags |= GTK_REGION_EVEN;
+ else
+ flags |= GTK_REGION_ODD;
+
+ if (col == 0)
+ flags |= GTK_REGION_FIRST;
+
+ if (col + 1 == cols)
+ flags |= GTK_REGION_LAST;
+
+ gtk_style_context_save (context);
+ gtk_style_context_add_region (
+ context, GTK_STYLE_REGION_COLUMN_HEADER, flags);
e_table_header_draw_button (
- cr, ecol,
- style, state, GTK_WIDGET (canvas),
+ cr, ecol, GTK_WIDGET (canvas),
x1 - x, -y, width, height,
x2 - x1, ethi->height,
(ETableColArrow) g_hash_table_lookup (
arrows, GINT_TO_POINTER (ecol->col_idx)));
+
+ gtk_style_context_restore (context);
}
g_hash_table_destroy (arrows);
@@ -1209,22 +1224,16 @@ ethi_start_drag (ETableHeaderItem *ethi,
ETableCol *ecol;
gint col_width;
cairo_surface_t *s;
- GdkPixbuf *pixbuf;
cairo_t *cr;
gint group_indent = 0;
GHashTable *arrows = g_hash_table_new (NULL, NULL);
- GtkStateType state;
- GtkStyle *style;
GtkTargetEntry ethi_drag_types[] = {
{ (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
widget = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
- state = gtk_widget_get_state (widget);
- style = gtk_widget_get_style (widget);
-
ethi->drag_col = ethi_find_col_by_x (ethi, event->motion.x);
if (ethi->drag_col == -1)
@@ -1269,27 +1278,17 @@ ethi_start_drag (ETableHeaderItem *ethi,
ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
col_width = ecol->width;
- s = cairo_image_surface_create (CAIRO_FORMAT_A1, col_width, ethi->height);
+ s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, col_width, ethi->height);
cr = cairo_create (s);
- pixbuf = gdk_pixbuf_get_from_surface (
- s, 0, 0, col_width, ethi->height);
-
- state = gtk_widget_get_state (widget);
e_table_header_draw_button (
cr, ecol,
- style, state,
widget, 0, 0,
col_width, ethi->height,
col_width, ethi->height,
(ETableColArrow) g_hash_table_lookup (
arrows, GINT_TO_POINTER (ecol->col_idx)));
- gtk_drag_set_icon_pixbuf (
- context,
- pixbuf,
- col_width / 2,
- ethi->height / 2);
- g_object_unref (pixbuf);
+ gtk_drag_set_icon_surface (context, s);
cairo_surface_destroy (s);
ethi->maybe_drag = FALSE;
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 34f93a701b..df5ee66b56 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -35,29 +35,21 @@
#include "e-table-defines.h"
#include "e-table-header-utils.h"
-static PangoLayout *
-build_header_layout (GtkWidget *widget,
- const gchar *str)
+static void
+get_button_padding (GtkWidget *widget,
+ GtkBorder *padding)
{
- PangoLayout *layout;
-
- layout = gtk_widget_create_pango_layout (widget, str);
-
-#ifdef FROB_FONT_DESC
- {
- PangoFontDescription *desc;
- desc = pango_font_description_copy (gtk_widget_get_style (widget)->font_desc);
- pango_font_description_set_size (desc,
- pango_font_description_get_size (desc) * 1.2);
+ GtkStyleContext *context;
+ GtkStateFlags state_flags;
- pango_font_description_set_weight (desc, PANGO_WEIGHT_BOLD);
- pango_layout_set_font_description (layout, desc);
+ context = gtk_widget_get_style_context (widget);
+ state_flags = gtk_widget_get_state_flags (widget);
- pango_font_description_free (desc);
- }
-#endif
+ gtk_style_context_save (context);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_BUTTON);
+ gtk_style_context_get_padding (context, state_flags, padding);
- return layout;
+ gtk_style_context_restore (context);
}
/**
@@ -73,17 +65,17 @@ gdouble
e_table_header_compute_height (ETableCol *ecol,
GtkWidget *widget)
{
- gint ythick;
gint height;
PangoLayout *layout;
+ GtkBorder padding;
g_return_val_if_fail (ecol != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_COL (ecol), -1);
g_return_val_if_fail (GTK_IS_WIDGET (widget), -1);
- ythick = gtk_widget_get_style (widget)->ythickness;
+ get_button_padding (widget, &padding);
- layout = build_header_layout (widget, ecol->text);
+ layout = gtk_widget_create_pango_layout (widget, ecol->text);
pango_layout_get_pixel_size (layout, NULL, &height);
@@ -93,8 +85,7 @@ e_table_header_compute_height (ETableCol *ecol,
}
height = MAX (height, MIN_ARROW_SIZE);
-
- height += 2 * (ythick + HEADER_PADDING);
+ height += padding.top + padding.bottom + 2 * HEADER_PADDING;
g_object_unref (layout);
@@ -102,139 +93,18 @@ e_table_header_compute_height (ETableCol *ecol,
}
gdouble
-e_table_header_width_extras (GtkStyle *style)
+e_table_header_width_extras (GtkWidget *widget)
{
- g_return_val_if_fail (style != NULL, -1);
+ GtkBorder padding;
- return 2 * (style->xthickness + HEADER_PADDING);
+ get_button_padding (widget, &padding);
+ return padding.left + padding.right + 2 * HEADER_PADDING;
}
-/* Creates a pixmap that is a composite of a background color and the upper-left
- * corner rectangle of a pixbuf.
- */
-#if 0
-static GdkPixmap *
-make_composite_pixmap (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPixbuf *pixbuf,
- GdkColor *bg,
- gint width,
- gint height,
- gint dither_xofs,
- gint dither_yofs)
-{
- gint pwidth, pheight;
- GdkPixmap *pixmap;
- GdkPixbuf *tmp;
- gint color;
-
- pwidth = gdk_pixbuf_get_width (pixbuf);
- pheight = gdk_pixbuf_get_height (pixbuf);
- g_return_val_if_fail (width <= pwidth && height <= pheight, NULL);
-
- color = ((bg->red & 0xff00) << 8) |
- (bg->green & 0xff00) |
- ((bg->blue & 0xff00) >> 8);
-
- if (width >= pwidth && height >= pheight) {
- tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
- if (!tmp)
- return NULL;
-
- gdk_pixbuf_composite_color (pixbuf, tmp,
- 0, 0,
- width, height,
- 0, 0,
- 1.0, 1.0,
- GDK_INTERP_NEAREST,
- 255,
- 0, 0,
- 16,
- color, color);
- } else {
- gint x, y, rowstride;
- GdkPixbuf *fade;
- guchar *pixels;
-
- /* Do a nice fade of the pixbuf down and to the right */
-
- fade = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height);
- if (!fade)
- return NULL;
-
- gdk_pixbuf_copy_area (pixbuf,
- 0, 0,
- width, height,
- fade,
- 0, 0);
-
- rowstride = gdk_pixbuf_get_rowstride (fade);
- pixels = gdk_pixbuf_get_pixels (fade);
-
- for (y = 0; y < height; y++) {
- guchar *p;
- gint yfactor;
-
- p = pixels + y * rowstride;
-
- if (height < pheight)
- yfactor = height - y;
- else
- yfactor = height;
-
- for (x = 0; x < width; x++) {
- gint xfactor;
-
- if (width < pwidth)
- xfactor = width - x;
- else
- xfactor = width;
-
- p[3] = ((gint) p[3] * xfactor * yfactor / (width * height));
- p += 4;
- }
- }
-
- tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
- if (!tmp) {
- g_object_unref (fade);
- return NULL;
- }
-
- gdk_pixbuf_composite_color (fade, tmp,
- 0, 0,
- width, height,
- 0, 0,
- 1.0, 1.0,
- GDK_INTERP_NEAREST,
- 255,
- 0, 0,
- 16,
- color, color);
-
- g_object_unref (fade);
- }
-
- pixmap = gdk_pixmap_new (drawable, width, height, -1);
- gdk_draw_rgb_image_dithalign (pixmap, gc,
- 0, 0,
- width, height,
- GDK_RGB_DITHER_NORMAL,
- gdk_pixbuf_get_pixels (tmp),
- gdk_pixbuf_get_rowstride (tmp),
- dither_xofs, dither_yofs);
- g_object_unref (tmp);
-
- return pixmap;
-}
-#endif
-
/**
* e_table_header_draw_button:
* @drawable: Destination drawable.
* @ecol: Table column for the header information.
- * @style: Style to use for drawing the button.
- * @state: State of the table widget.
* @widget: The table widget.
* @x: Leftmost coordinate of the button.
* @y: Topmost coordinate of the button.
@@ -249,8 +119,6 @@ make_composite_pixmap (GdkDrawable *drawable,
void
e_table_header_draw_button (cairo_t *cr,
ETableCol *ecol,
- GtkStyle *style,
- GtkStateType state,
GtkWidget *widget,
gint x,
gint y,
@@ -260,58 +128,49 @@ e_table_header_draw_button (cairo_t *cr,
gint button_height,
ETableColArrow arrow)
{
- gint xthick, ythick;
gint inner_x, inner_y;
gint inner_width, inner_height;
gint arrow_width = 0, arrow_height = 0;
PangoLayout *layout;
- static gpointer g_label = NULL;
+ GtkStyleContext *context;
+ GtkBorder padding;
+ GtkStateFlags state_flags;
g_return_if_fail (cr != NULL);
g_return_if_fail (ecol != NULL);
g_return_if_fail (E_IS_TABLE_COL (ecol));
- g_return_if_fail (style != NULL);
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (button_width > 0 && button_height > 0);
- if (g_label == NULL) {
- GtkWidget *button = gtk_button_new_with_label("Hi");
- GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_container_add (GTK_CONTAINER (window), button);
- gtk_widget_ensure_style (window);
- gtk_widget_ensure_style (button);
- g_label = gtk_bin_get_child (GTK_BIN (button));
- g_object_add_weak_pointer (G_OBJECT (g_label), &g_label);
- gtk_widget_ensure_style (g_label);
- gtk_widget_realize (g_label);
- }
-
- cairo_save (cr);
- gdk_cairo_set_source_color (
- cr, &gtk_widget_get_style (GTK_WIDGET (g_label))->fg[state]);
+ /* Button bevel */
+ context = gtk_widget_get_style_context (widget);
+ state_flags = gtk_widget_get_state_flags (widget);
- xthick = style->xthickness;
- ythick = style->ythickness;
+ gtk_style_context_save (context);
+ gtk_style_context_set_state (context, state_flags);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_BUTTON);
- /* Button bevel */
+ gtk_style_context_get_padding (context, state_flags, &padding);
- gtk_paint_box (style, cr, state, GTK_SHADOW_OUT,
- widget, "button",
- x, y, button_width, button_height);
+ gtk_render_background (
+ context, cr, x, y,
+ button_width, button_height);
+ gtk_render_frame (
+ context, cr, x, y,
+ button_width, button_height);
/* Inside area */
- inner_width = button_width - 2 * (xthick + HEADER_PADDING);
- inner_height = button_height - 2 * (ythick + HEADER_PADDING);
+ inner_width = button_width - (padding.left + padding.right + 2 * HEADER_PADDING);
+ inner_height = button_height - (padding.top + padding.bottom + 2 * HEADER_PADDING);
if (inner_width < 1 || inner_height < 1) {
- cairo_restore (cr);
return; /* nothing fits */
}
- inner_x = x + xthick + HEADER_PADDING;
- inner_y = y + ythick + HEADER_PADDING;
+ inner_x = x + padding.left + HEADER_PADDING;
+ inner_y = y + padding.top + HEADER_PADDING;
/* Arrow space */
@@ -333,11 +192,11 @@ e_table_header_draw_button (cairo_t *cr,
}
if (inner_width < 1) {
- cairo_restore (cr);
+ gtk_style_context_restore (context);
return; /* nothing else fits */
}
- layout = build_header_layout (widget, ecol->text);
+ layout = gtk_widget_create_pango_layout (widget, ecol->text);
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
/* Pixbuf or label */
@@ -370,18 +229,19 @@ e_table_header_draw_button (cairo_t *cr,
layout, (inner_width - (xpos - inner_x)) *
PANGO_SCALE);
- cairo_move_to (cr, xpos + pwidth + 1, ypos);
- pango_cairo_show_layout (cr, layout);
+ gtk_render_layout (
+ context, cr, xpos + pwidth + 1,
+ ypos, layout);
}
- gdk_cairo_set_source_pixbuf (cr, ecol->pixbuf,
- xpos, inner_y + (inner_height - clip_height) / 2);
- cairo_paint (cr);
+ gtk_render_icon (
+ context, cr, ecol->pixbuf, xpos,
+ inner_y + (inner_height - clip_height) / 2);
+
} else {
pango_layout_set_width (layout, inner_width * PANGO_SCALE);
- cairo_move_to (cr, inner_x, inner_y);
- pango_cairo_show_layout (cr, layout);
+ gtk_render_layout (context, cr, inner_x, inner_y, layout);
}
switch (arrow) {
@@ -393,13 +253,13 @@ e_table_header_draw_button (cairo_t *cr,
if (ecol->icon_name == NULL)
inner_width += arrow_width + HEADER_PADDING;
- gtk_paint_arrow (style, cr, state,
- GTK_SHADOW_NONE, widget, "header",
- (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN,
- (ecol->icon_name == NULL),
- inner_x + inner_width - arrow_width,
- inner_y + (inner_height - arrow_height) / 2,
- arrow_width, arrow_height);
+ gtk_render_arrow (
+ context, cr,
+ (arrow == E_TABLE_COL_ARROW_UP) ? 0 : G_PI,
+ inner_x + inner_width - arrow_width,
+ inner_y + (inner_height - arrow_height) / 2,
+ MAX (arrow_width, arrow_height));
+
break;
}
@@ -409,5 +269,5 @@ e_table_header_draw_button (cairo_t *cr,
}
g_object_unref (layout);
- cairo_restore (cr);
+ gtk_style_context_restore (context);
}
diff --git a/widgets/table/e-table-header-utils.h b/widgets/table/e-table-header-utils.h
index c3b2de89c7..e6d2aaba1d 100644
--- a/widgets/table/e-table-header-utils.h
+++ b/widgets/table/e-table-header-utils.h
@@ -32,11 +32,9 @@ G_BEGIN_DECLS
gdouble e_table_header_compute_height (ETableCol *ecol,
GtkWidget *widget);
-gdouble e_table_header_width_extras (GtkStyle *style);
+gdouble e_table_header_width_extras (GtkWidget *widget);
void e_table_header_draw_button (cairo_t *cr,
ETableCol *ecol,
- GtkStyle *style,
- GtkStateType state,
GtkWidget *widget,
gint x,
gint y,
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index 28f10264f8..6fe853e6bb 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -176,8 +176,6 @@ e_table_memory_insert (ETableMemory *etmm,
e_table_model_row_inserted (E_TABLE_MODEL (etmm), row);
}
-
-
/**
* e_table_memory_remove:
* @etable:
diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c
index 007803585e..a534f22f07 100644
--- a/widgets/table/e-table-utils.c
+++ b/widgets/table/e-table-utils.c
@@ -40,7 +40,6 @@ e_table_state_to_header (GtkWidget *widget,
ETableState *state)
{
ETableHeader *nh;
- GtkStyle *style;
const gint max_cols = e_table_header_count (full_header);
gint column;
GValue *val = g_new0 (GValue, 1);
@@ -49,11 +48,9 @@ e_table_state_to_header (GtkWidget *widget,
g_return_val_if_fail (full_header, NULL);
g_return_val_if_fail (state, NULL);
- style = gtk_widget_get_style (widget);
-
nh = e_table_header_new ();
g_value_init (val, G_TYPE_DOUBLE);
- g_value_set_double (val, e_table_header_width_extras (style));
+ g_value_set_double (val, e_table_header_width_extras (widget));
g_object_set_property (G_OBJECT(nh), "width_extras", val);
g_free (val);
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 43fb41b29c..4f279aabb9 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -77,7 +77,6 @@ struct _ETreeMemoryPrivate {
gpointer destroy_user_data;
};
-
/* ETreeMemoryPath functions */
static inline void
@@ -169,8 +168,6 @@ e_tree_path_unlink (ETreeMemoryPath *path)
path->prev_sibling = NULL;
}
-
-
/**
* e_tree_memory_freeze:
* @etmm: the ETreeModel to freeze.
@@ -212,7 +209,6 @@ e_tree_memory_thaw (ETreeMemory *etmm)
}
}
-
/* virtual methods */
static void
@@ -363,7 +359,6 @@ etmm_node_request_collapse (ETreeModel *etm,
parent_class->node_request_collapse (etm, node);
}
-
static void
e_tree_memory_class_init (ETreeMemoryClass *class)
{
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index b37ce4bf17..24221418c0 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -61,7 +61,6 @@ enum {
static guint e_tree_model_signals[LAST_SIGNAL] = {0, };
-
static void
e_tree_model_class_init (ETreeModelClass *class)
{
@@ -419,8 +418,6 @@ e_tree_model_node_request_collapse (ETreeModel *tree_model,
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_REQUEST_COLLAPSE], 0, collapsed_node);
}
-
-
/**
* e_tree_model_new
*
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 72b4cba091..4d95fcc74b 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -119,8 +119,6 @@ static void free_path (ETreeSortedPath *path);
static void generate_children (ETreeSorted *ets, ETreeSortedPath *path);
static void regenerate_children (ETreeSorted *ets, ETreeSortedPath *path);
-
-
/* idle callbacks */
static gboolean
@@ -162,8 +160,6 @@ ets_insert_idle (ETreeSorted *ets)
return FALSE;
}
-
-
/* Helper functions */
#define CHECK_AROUND_LAST_ACCESS
@@ -597,8 +593,6 @@ schedule_resort (ETreeSorted *ets,
}
}
-
-
/* virtual methods */
static void
@@ -1210,8 +1204,6 @@ ets_sort_info_changed (ETableSortInfo *sort_info,
schedule_resort (ets, ets->priv->root, TRUE, TRUE);
}
-
-
/* Initialization and creation */
static void
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 41818652bd..effd1e9aa6 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -472,6 +472,11 @@ et_dispose (GObject *object)
priv->table_canvas = NULL;
}
+ if (priv->item != NULL) {
+ g_object_unref (G_OBJECT (priv->item));
+ priv->item = NULL;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_tree_parent_class)->dispose (object);
}
diff --git a/widgets/text/Makefile.am b/widgets/text/Makefile.am
index 2577c6fe14..d7c62af74e 100644
--- a/widgets/text/Makefile.am
+++ b/widgets/text/Makefile.am
@@ -4,7 +4,7 @@ libetext_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/widgets \
- $(E_UTIL_CFLAGS) \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
-DG_LOG_DOMAIN=\"e-text\"
@@ -35,8 +35,9 @@ libetext_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(top_builddir)/libgnomecanvas/libgnomecanvas.la \
- $(E_UTIL_LIBS) \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
- $(REGEX_LIBS)
+ $(REGEX_LIBS) \
+ $(MATH_LIB)
-include $(top_srcdir)/git.mk
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 02535d7b34..296d732590 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -746,8 +746,6 @@ column_width_changed (EReflow *reflow)
g_signal_emit (reflow, signals[COLUMN_WIDTH_CHANGED], 0, reflow->column_width);
}
-
-
/* Virtual functions */
static void
e_reflow_set_property (GObject *object,
@@ -1400,7 +1398,7 @@ e_reflow_point (GnomeCanvasItem *item,
gint cx,
gint cy)
{
- GnomeCanvasItem *child;
+ GnomeCanvasItem *child = NULL;
if (GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->point)
child = GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->point (item, x, y, cx, cy);
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index b57cec835d..d7afd1df5d 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -174,7 +174,16 @@ static gboolean e_text_delete_surrounding_cb (GtkIMContext *context,
static GdkAtom clipboard_atom = GDK_NONE;
-
+static void
+disconnect_im_context (EText *text)
+{
+ if (!text || !text->im_context)
+ return;
+
+ g_signal_handlers_disconnect_matched (
+ text->im_context, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, text);
+ text->im_context_signals_registered = FALSE;
+}
static void
disconnect_im_context (EText *text)