aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--a11y/e-table/gal-a11y-e-cell-popup.c14
-rw-r--r--a11y/e-table/gal-a11y-e-cell-popup.h2
-rw-r--r--a11y/e-table/gal-a11y-e-cell-registry.c3
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.c16
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.h2
-rw-r--r--a11y/e-table/gal-a11y-e-cell-toggle.c9
-rw-r--r--a11y/e-table/gal-a11y-e-cell-tree.c11
-rw-r--r--a11y/e-table/gal-a11y-e-cell-vbox.c10
-rw-r--r--a11y/e-table/gal-a11y-e-cell.c16
-rw-r--r--a11y/e-table/gal-a11y-e-table-click-to-add-factory.c12
-rw-r--r--a11y/e-table/gal-a11y-e-table-click-to-add.c16
-rw-r--r--a11y/e-table/gal-a11y-e-table-factory.c3
-rw-r--r--a11y/e-table/gal-a11y-e-table-item-factory.c12
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.c26
-rw-r--r--a11y/e-table/gal-a11y-e-table.c14
-rw-r--r--a11y/e-table/gal-a11y-e-tree-factory.c3
-rw-r--r--a11y/e-table/gal-a11y-e-tree.c10
-rw-r--r--a11y/e-text/gal-a11y-e-text.c18
-rw-r--r--a11y/gal-a11y-util.c1
-rw-r--r--e-util/e-bit-array.c6
-rw-r--r--e-util/e-iconv.c14
-rw-r--r--e-util/e-sorter-array.c4
-rw-r--r--e-util/e-sorter.c4
-rw-r--r--e-util/e-text-event-processor-emacs-like.c6
-rw-r--r--e-util/e-text-event-processor.c8
-rw-r--r--e-util/e-util-private.h46
-rw-r--r--e-util/e-util.c58
-rw-r--r--e-util/e-win32-reloc.c115
-rw-r--r--e-util/e-xml-utils.c57
-rw-r--r--widgets/menus/gal-define-views-dialog.c18
-rw-r--r--widgets/menus/gal-define-views-model.c7
-rw-r--r--widgets/menus/gal-view-collection.c24
-rw-r--r--widgets/menus/gal-view-etable.c4
-rw-r--r--widgets/menus/gal-view-factory-etable.c4
-rw-r--r--widgets/menus/gal-view-factory.c4
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.c19
-rw-r--r--widgets/menus/gal-view-instance.c33
-rw-r--r--widgets/menus/gal-view-new-dialog.c21
-rw-r--r--widgets/menus/gal-view.c4
-rw-r--r--widgets/misc/e-canvas-background.c16
-rw-r--r--widgets/misc/e-canvas-vbox.c14
-rw-r--r--widgets/misc/e-canvas.c15
-rw-r--r--widgets/misc/e-colors.c4
-rw-r--r--widgets/misc/e-cursors.c5
-rw-r--r--widgets/misc/e-gui-utils.c10
-rw-r--r--widgets/misc/e-popup-menu.c16
-rw-r--r--widgets/misc/e-printable.c5
-rw-r--r--widgets/misc/e-reflow-model.c4
-rw-r--r--widgets/misc/e-reflow.c17
-rw-r--r--widgets/misc/e-selection-model-array.c7
-rw-r--r--widgets/misc/e-selection-model-simple.c4
-rw-r--r--widgets/misc/e-selection-model.c5
-rw-r--r--widgets/misc/e-unicode.c21
-rw-r--r--widgets/misc/gal-combo-box.c16
-rw-r--r--widgets/misc/gal-combo-text.c11
-rw-r--r--widgets/misc/test-color.c8
-rw-r--r--widgets/table/e-cell-checkbox.c10
-rw-r--r--widgets/table/e-cell-combo.c8
-rw-r--r--widgets/table/e-cell-date.c16
-rw-r--r--widgets/table/e-cell-float.c7
-rw-r--r--widgets/table/e-cell-number.c7
-rw-r--r--widgets/table/e-cell-pixbuf.c7
-rw-r--r--widgets/table/e-cell-popup.c9
-rw-r--r--widgets/table/e-cell-progress.c12
-rw-r--r--widgets/table/e-cell-size.c5
-rw-r--r--widgets/table/e-cell-spin-button.c18
-rw-r--r--widgets/table/e-cell-text.c19
-rw-r--r--widgets/table/e-cell-toggle.c14
-rw-r--r--widgets/table/e-cell-tree.c24
-rw-r--r--widgets/table/e-cell-vbox.c13
-rw-r--r--widgets/table/e-cell.c4
-rw-r--r--widgets/table/e-table-click-to-add.c26
-rw-r--r--widgets/table/e-table-col.c6
-rw-r--r--widgets/table/e-table-column-specification.c6
-rw-r--r--widgets/table/e-table-column.c1
-rw-r--r--widgets/table/e-table-config-field.c7
-rw-r--r--widgets/table/e-table-config.c34
-rw-r--r--widgets/table/e-table-example-2.c2
-rw-r--r--widgets/table/e-table-extras.c22
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c7
-rw-r--r--widgets/table/e-table-field-chooser-item.c10
-rw-r--r--widgets/table/e-table-field-chooser.c17
-rw-r--r--widgets/table/e-table-group-container.c16
-rw-r--r--widgets/table/e-table-group-leaf.c15
-rw-r--r--widgets/table/e-table-group.c7
-rw-r--r--widgets/table/e-table-header-item.c25
-rw-r--r--widgets/table/e-table-header-utils.c15
-rw-r--r--widgets/table/e-table-header.c11
-rw-r--r--widgets/table/e-table-item.c30
-rw-r--r--widgets/table/e-table-memory-callbacks.c4
-rw-r--r--widgets/table/e-table-memory-store.c5
-rw-r--r--widgets/table/e-table-memory.c6
-rw-r--r--widgets/table/e-table-model.c7
-rw-r--r--widgets/table/e-table-one.c4
-rw-r--r--widgets/table/e-table-scrolled.c8
-rw-r--r--widgets/table/e-table-search.c6
-rw-r--r--widgets/table/e-table-selection-model.c4
-rw-r--r--widgets/table/e-table-simple.c4
-rw-r--r--widgets/table/e-table-sort-info.c5
-rw-r--r--widgets/table/e-table-sorted-variable.c3
-rw-r--r--widgets/table/e-table-sorted.c3
-rw-r--r--widgets/table/e-table-sorter.c3
-rw-r--r--widgets/table/e-table-sorting-utils.c7
-rw-r--r--widgets/table/e-table-specification.c17
-rw-r--r--widgets/table/e-table-state.c5
-rw-r--r--widgets/table/e-table-subset-variable.c3
-rw-r--r--widgets/table/e-table-subset.c3
-rw-r--r--widgets/table/e-table-utils.c5
-rw-r--r--widgets/table/e-table-without.c3
-rw-r--r--widgets/table/e-table.c31
-rw-r--r--widgets/table/e-tree-memory-callbacks.c5
-rw-r--r--widgets/table/e-tree-memory.c1
-rw-r--r--widgets/table/e-tree-model.c4
-rw-r--r--widgets/table/e-tree-scrolled.c10
-rw-r--r--widgets/table/e-tree-selection-model.c9
-rw-r--r--widgets/table/e-tree-simple.c2
-rw-r--r--widgets/table/e-tree-sorted-variable.c3
-rw-r--r--widgets/table/e-tree-sorted.c5
-rw-r--r--widgets/table/e-tree-table-adapter.c18
-rw-r--r--widgets/table/e-tree.c42
-rw-r--r--widgets/table/table-test.c4
-rw-r--r--widgets/table/test-check.c12
-rw-r--r--widgets/table/test-cols.c4
-rw-r--r--widgets/table/test-table.c6
-rw-r--r--widgets/text/e-completion-callbacks.c4
-rw-r--r--widgets/text/e-completion-match.c5
-rw-r--r--widgets/text/e-completion-view.c12
-rw-r--r--widgets/text/e-completion.c8
-rw-r--r--widgets/text/e-entry-test.c7
-rw-r--r--widgets/text/e-entry.c11
-rw-r--r--widgets/text/e-table-text-model.c8
-rw-r--r--widgets/text/e-text-model-test.c6
-rw-r--r--widgets/text/e-text-model-uri.c8
-rw-r--r--widgets/text/e-text-model.c11
-rw-r--r--widgets/text/e-text-test.c4
-rw-r--r--widgets/text/e-text.c30
136 files changed, 1042 insertions, 595 deletions
diff --git a/a11y/e-table/gal-a11y-e-cell-popup.c b/a11y/e-table/gal-a11y-e-cell-popup.c
index 15cae2effb..d819a2fcc8 100644
--- a/a11y/e-table/gal-a11y-e-cell-popup.c
+++ b/a11y/e-table/gal-a11y-e-cell-popup.c
@@ -24,14 +24,16 @@
*/
#include <config.h>
-#include <gal/e-table/e-cell-popup.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "gal/a11y/gal-a11y-util.h"
+#include "gal/e-table/e-cell-popup.h"
+#include "gal/util/e-i18n.h"
+
#include "gal-a11y-e-cell-popup.h"
#include "gal-a11y-e-cell-registry.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkwidget.h>
-#include <glib/gi18n.h>
static AtkObjectClass *parent_class = NULL;
#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
diff --git a/a11y/e-table/gal-a11y-e-cell-popup.h b/a11y/e-table/gal-a11y-e-cell-popup.h
index 5809f9b4f4..4162ed21cc 100644
--- a/a11y/e-table/gal-a11y-e-cell-popup.h
+++ b/a11y/e-table/gal-a11y-e-cell-popup.h
@@ -28,7 +28,7 @@
#include <glib-object.h>
#include <gal/e-table/e-table-item.h>
-#include <a11y/e-table/gal-a11y-e-cell.h>
+#include <gal/a11y/e-table/gal-a11y-e-cell.h>
#include <atk/atkgobjectaccessible.h>
#define GAL_A11Y_TYPE_E_CELL_POPUP (gal_a11y_e_cell_popup_get_type ())
diff --git a/a11y/e-table/gal-a11y-e-cell-registry.c b/a11y/e-table/gal-a11y-e-cell-registry.c
index 7110179554..e6fc3a8e18 100644
--- a/a11y/e-table/gal-a11y-e-cell-registry.c
+++ b/a11y/e-table/gal-a11y-e-cell-registry.c
@@ -7,8 +7,9 @@
*/
#include <config.h>
-#include "gal-a11y-e-cell-registry.h"
+
#include "gal-a11y-e-cell.h"
+#include "gal-a11y-e-cell-registry.h"
static GObjectClass *parent_class;
static GalA11yECellRegistry *default_registry;
diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c
index 89c1b3a813..37785bfbf5 100644
--- a/a11y/e-table/gal-a11y-e-cell-text.c
+++ b/a11y/e-table/gal-a11y-e-cell-text.c
@@ -7,16 +7,16 @@
*/
#include <config.h>
+
#include <string.h>
+
+#include <atk/atk.h>
+
+#include "gal/a11y/gal-a11y-util.h"
+#include "gal/e-table/e-cell-text.h"
+#include "gal/util/e-i18n.h"
+
#include "gal-a11y-e-cell-text.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-cell-text.h>
-#include <atk/atkobject.h>
-#include <atk/atktext.h>
-#include <atk/atkeditabletext.h>
-#include <atk/atkaction.h>
-#include <atk/atkstateset.h>
-#include <glib/gi18n.h>
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellTextClass))
static AtkObjectClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-cell-text.h b/a11y/e-table/gal-a11y-e-cell-text.h
index 50056476c3..b2cfef2bd4 100644
--- a/a11y/e-table/gal-a11y-e-cell-text.h
+++ b/a11y/e-table/gal-a11y-e-cell-text.h
@@ -12,7 +12,7 @@
#include <glib-object.h>
#include <gal/e-table/e-table-item.h>
#include <gal/e-table/e-cell-text.h>
-#include <a11y/e-table/gal-a11y-e-cell.h>
+#include <gal/a11y/e-table/gal-a11y-e-cell.h>
#define GAL_A11Y_TYPE_E_CELL_TEXT (gal_a11y_e_cell_text_get_type ())
#define GAL_A11Y_E_CELL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_TEXT, GalA11yECellText))
diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.c b/a11y/e-table/gal-a11y-e-cell-toggle.c
index 21f4955d1d..4c9e47bbaf 100644
--- a/a11y/e-table/gal-a11y-e-cell-toggle.c
+++ b/a11y/e-table/gal-a11y-e-cell-toggle.c
@@ -1,9 +1,10 @@
#include <gtk/gtk.h>
+
+#include "gal/e-table/e-cell-toggle.h"
+#include "gal/e-table/e-table-model.h"
+#include "gal/util/e-i18n.h"
+
#include "gal-a11y-e-cell-toggle.h"
-#include <gal/e-table/e-cell-toggle.h>
-#include <gal/e-table/e-table-model.h>
-#include <atk/atkcomponent.h>
-#include <glib/gi18n.h>
#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
static GObjectClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-cell-tree.c b/a11y/e-table/gal-a11y-e-cell-tree.c
index 126bbcfbe5..64ebfffb89 100644
--- a/a11y/e-table/gal-a11y-e-cell-tree.c
+++ b/a11y/e-table/gal-a11y-e-cell-tree.c
@@ -7,14 +7,17 @@
*/
#include <config.h>
+
#include <atk/atk.h>
-#include "gal-a11y-e-cell-tree.h"
-#include "gal-a11y-e-cell-registry.h"
-#include "gal-a11y-util.h"
+
+#include "gal/a11y/gal-a11y-util.h"
#include "gal/e-table/e-cell-tree.h"
#include "gal/e-table/e-table.h"
#include "gal/e-table/e-tree-table-adapter.h"
-#include <glib/gi18n.h>
+#include "gal/util/e-i18n.h"
+
+#include "gal-a11y-e-cell-tree.h"
+#include "gal-a11y-e-cell-registry.h"
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellTreeClass))
static AtkObjectClass *a11y_parent_class;
diff --git a/a11y/e-table/gal-a11y-e-cell-vbox.c b/a11y/e-table/gal-a11y-e-cell-vbox.c
index 4f2c156da8..6363b8c5c1 100644
--- a/a11y/e-table/gal-a11y-e-cell-vbox.c
+++ b/a11y/e-table/gal-a11y-e-cell-vbox.c
@@ -19,10 +19,14 @@
* Author: Eric Zhao <eric.zhao@sun.com> Sun Microsystem Inc., 2004
*
*/
-#include "gal-a11y-e-cell-vbox.h"
+#include <config.h>
+
+#include <atk/atk.h>
+
+#include "gal/e-table/e-cell-vbox.h"
+
#include "gal-a11y-e-cell-registry.h"
-#include <gal/e-table/e-cell-vbox.h>
-#include <atk/atkcomponent.h>
+#include "gal-a11y-e-cell-vbox.h"
static GObjectClass *parent_class;
static AtkComponentIface *component_parent_iface;
diff --git a/a11y/e-table/gal-a11y-e-cell.c b/a11y/e-table/gal-a11y-e-cell.c
index 8718713a44..30ea1b6915 100644
--- a/a11y/e-table/gal-a11y-e-cell.c
+++ b/a11y/e-table/gal-a11y-e-cell.c
@@ -7,19 +7,19 @@
*/
#include <config.h>
+
#include <string.h>
+
+#include <gtk/gtk.h>
+
+#include "gal/a11y/gal-a11y-util.h"
#include "gal/e-table/e-table.h"
#include "gal/e-table/e-tree.h"
-#include "gal-a11y-e-table-item.h"
+#include "gal/util/e-i18n.h"
+
#include "gal-a11y-e-cell.h"
#include "gal-a11y-e-cell-vbox.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkaction.h>
-#include <atk/atkstateset.h>
-#include <gtk/gtkwindow.h>
-#include <glib/gi18n.h>
+#include "gal-a11y-e-table-item.h"
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellClass))
static GObjectClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c b/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
index 9c46b2badc..c959003a8b 100644
--- a/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
@@ -5,13 +5,15 @@
*/
#include <config.h>
-#include "gal-a11y-e-table-click-to-add-factory.h"
-#include "gal-a11y-e-table-click-to-add.h"
-#include "gal-a11y-e-table.h"
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-click-to-add.h>
+
#include <atk/atk.h>
+#include "gal/e-table/e-table.h"
+#include "gal/e-table/e-table-click-to-add.h"
+
+#include "gal-a11y-e-table.h"
+#include "gal-a11y-e-table-click-to-add.h"
+#include "gal-a11y-e-table-click-to-add-factory.h"
#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableClickToAddFactoryClass))
static AtkObjectFactoryClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add.c b/a11y/e-table/gal-a11y-e-table-click-to-add.c
index d8400b7ebb..5d7eba16e3 100644
--- a/a11y/e-table/gal-a11y-e-table-click-to-add.c
+++ b/a11y/e-table/gal-a11y-e-table-click-to-add.c
@@ -6,15 +6,17 @@
*/
#include <config.h>
-#include "gal-a11y-util.h"
+
+#include <atk/atk.h>
+
+#include "gal/a11y/gal-a11y-util.h"
+#include "gal/e-table/e-table-click-to-add.h"
+#include "gal/e-table/e-table-group.h"
+#include "gal/e-table/e-table-group-leaf.h"
+#include "gal/util/e-i18n.h"
+
#include "gal-a11y-e-table-click-to-add.h"
#include "gal-a11y-e-table-click-to-add-factory.h"
-#include <gal/e-table/e-table-group.h>
-#include <gal/e-table/e-table-group-leaf.h>
-#include <gal/e-table/e-table-click-to-add.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkaction.h>
-#include <glib/gi18n.h>
static AtkObjectClass *parent_class;
static GType parent_type;
diff --git a/a11y/e-table/gal-a11y-e-table-factory.c b/a11y/e-table/gal-a11y-e-table-factory.c
index 14eaca3d19..8e207716ce 100644
--- a/a11y/e-table/gal-a11y-e-table-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-factory.c
@@ -7,8 +7,9 @@
*/
#include <config.h>
-#include "gal-a11y-e-table-factory.h"
+
#include "gal-a11y-e-table.h"
+#include "gal-a11y-e-table-factory.h"
#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableFactoryClass))
static AtkObjectFactoryClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-table-item-factory.c b/a11y/e-table/gal-a11y-e-table-item-factory.c
index 3c8e60a4bb..f773471772 100644
--- a/a11y/e-table/gal-a11y-e-table-item-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-item-factory.c
@@ -5,13 +5,15 @@
*/
#include <config.h>
-#include "gal-a11y-e-table-item-factory.h"
-#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-e-table.h"
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-tree.h>
+
#include <atk/atk.h>
+#include "gal/e-table/e-table.h"
+#include "gal/e-table/e-tree.h"
+
+#include "gal-a11y-e-table.h"
+#include "gal-a11y-e-table-item.h"
+#include "gal-a11y-e-table-item-factory.h"
#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableItemFactoryClass))
static AtkObjectFactoryClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c
index 20bd94316e..a6945d351c 100644
--- a/a11y/e-table/gal-a11y-e-table-item.c
+++ b/a11y/e-table/gal-a11y-e-table-item.c
@@ -8,26 +8,24 @@
*/
#include <config.h>
+
#include <string.h>
+
+#include <atk/atk.h>
+
+#include "gal/a11y/gal-a11y-util.h"
+#include "gal/e-table/e-table-click-to-add.h"
+#include "gal/e-table/e-table-subset.h"
+#include "gal/e-table/e-table.h"
+#include "gal/e-table/e-tree.h"
+#include "gal/widgets/e-canvas.h"
+#include "gal/widgets/e-selection-model.h"
+
#include "gal-a11y-e-table-item.h"
#include "gal-a11y-e-table-item-factory.h"
#include "gal-a11y-e-table-click-to-add.h"
#include "gal-a11y-e-cell-registry.h"
#include "gal-a11y-e-cell.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-table-subset.h>
-#include <gal/widgets/e-selection-model.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-click-to-add.h>
-#include <gal/e-table/e-tree.h>
-
-#include <atk/atkobject.h>
-#include <atk/atktable.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkobjectfactory.h>
-#include <atk/atkregistry.h>
-#include <atk/atkgobjectaccessible.h>
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableItemClass))
static GObjectClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-table.c b/a11y/e-table/gal-a11y-e-table.c
index b49a8a653a..fc5033c31d 100644
--- a/a11y/e-table/gal-a11y-e-table.c
+++ b/a11y/e-table/gal-a11y-e-table.c
@@ -7,15 +7,17 @@
*/
#include <config.h>
+
+#include "gal/a11y/gal-a11y-util.h"
+#include "gal/e-table/e-table.h"
+#include "gal/e-table/e-table-click-to-add.h"
+#include "gal/e-table/e-table-group.h"
+#include "gal/e-table/e-table-group-container.h"
+#include "gal/e-table/e-table-group-leaf.h"
+
#include "gal-a11y-e-table.h"
#include "gal-a11y-e-table-factory.h"
#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-group.h>
-#include <gal/e-table/e-table-group-container.h>
-#include <gal/e-table/e-table-group-leaf.h>
-#include <gal/e-table/e-table-click-to-add.h>
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableClass))
static AtkObjectClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-tree-factory.c b/a11y/e-table/gal-a11y-e-tree-factory.c
index 2fa34c5fbc..d5c7f80669 100644
--- a/a11y/e-table/gal-a11y-e-tree-factory.c
+++ b/a11y/e-table/gal-a11y-e-tree-factory.c
@@ -5,8 +5,9 @@
*/
#include <config.h>
-#include "gal-a11y-e-tree-factory.h"
+
#include "gal-a11y-e-tree.h"
+#include "gal-a11y-e-tree-factory.h"
#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETreeFactoryClass))
static AtkObjectFactoryClass *parent_class;
diff --git a/a11y/e-table/gal-a11y-e-tree.c b/a11y/e-table/gal-a11y-e-tree.c
index de468398ea..b4b6f5b45d 100644
--- a/a11y/e-table/gal-a11y-e-tree.c
+++ b/a11y/e-table/gal-a11y-e-tree.c
@@ -5,12 +5,14 @@
*/
#include <config.h>
+
+#include "gal/a11y/gal-a11y-util.h"
+#include "gal/e-table/e-table-item.h"
+#include "gal/e-table/e-tree.h"
+
+#include "gal-a11y-e-table-item.h"
#include "gal-a11y-e-tree.h"
#include "gal-a11y-e-tree-factory.h"
-#include "gal-a11y-util.h"
-#include "gal-a11y-e-table-item.h"
-#include <gal/e-table/e-tree.h>
-#include <gal/e-table/e-table-item.h>
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETreeClass))
static AtkObjectClass *parent_class;
diff --git a/a11y/e-text/gal-a11y-e-text.c b/a11y/e-text/gal-a11y-e-text.c
index 2463126afa..1ad9c33665 100644
--- a/a11y/e-text/gal-a11y-e-text.c
+++ b/a11y/e-text/gal-a11y-e-text.c
@@ -7,19 +7,17 @@
*/
#include <config.h>
+
#include <string.h>
-#include "gal-a11y-e-text.h"
-#include "gal-a11y-e-text-factory.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atktable.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkobjectfactory.h>
-#include <atk/atkregistry.h>
-#include <atk/atkgobjectaccessible.h>
+
+#include <gtk/gtk.h>
+
+#include "gal/a11y/gal-a11y-util.h"
#include "gal/e-text/e-text.h"
#include "gal/e-text/e-text-model-repos.h"
-#include <gtk/gtkmain.h>
+
+#include "gal-a11y-e-text.h"
+#include "gal-a11y-e-text-factory.h"
#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETextClass))
static GObjectClass *parent_class;
diff --git a/a11y/gal-a11y-util.c b/a11y/gal-a11y-util.c
index 0cf7c69dbb..29a9dbc37d 100644
--- a/a11y/gal-a11y-util.c
+++ b/a11y/gal-a11y-util.c
@@ -7,6 +7,7 @@
*/
#include <config.h>
+
#include "gal-a11y-util.h"
GType
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index bb98a3f465..8fa7af134e 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+
+#include <gtk/gtk.h>
+
#include "e-bit-array.h"
-#include "gal/util/e-util.h"
+#include "e-util.h"
#define PARENT_TYPE G_TYPE_OBJECT
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index 3236521438..6cf3987021 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -22,25 +22,21 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-
-#include <glib.h>
-#include "e-iconv.h"
-
#include <locale.h>
-
#ifdef HAVE_CODESET
#include <langinfo.h>
#endif
+#include <glib.h>
+
#include "iconv-detect.h"
+#include "e-iconv.h"
#define cd(x)
@@ -289,7 +285,11 @@ e_iconv_init(int keep)
iconv_cache = g_hash_table_new(g_str_hash, g_str_equal);
iconv_cache_open = g_hash_table_new(NULL, NULL);
+#ifndef G_OS_WIN32
locale = setlocale (LC_ALL, NULL);
+#else
+ locale = g_win32_getlocale ();
+#endif
if (!locale || !strcmp (locale, "C") || !strcmp (locale, "POSIX")) {
/* The locale "C" or "POSIX" is a portable locale; its
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index ab1e748d9a..7b7e6ab4ea 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -22,10 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
-#include "gal/util/e-util.h"
+
#include "e-sorter-array.h"
+#include "e-util.h"
#define d(x)
diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c
index adee6d0d98..4ac07809be 100644
--- a/e-util/e-sorter.c
+++ b/e-util/e-sorter.c
@@ -22,10 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
-#include "gal/util/e-util.h"
+
#include "e-sorter.h"
+#include "e-util.h"
#define d(x)
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index 478dc2d68b..5fa248fe75 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -21,10 +21,14 @@
* 02111-1307, USA.
*/
+#include <config.h>
+
#include <string.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gal/util/e-util.h>
+
#include "e-text-event-processor-emacs-like.h"
+#include "e-util.h"
static void e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *card);
static void e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass);
diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c
index 6b974d894e..9a9dfb3368 100644
--- a/e-util/e-text-event-processor.c
+++ b/e-util/e-text-event-processor.c
@@ -21,10 +21,12 @@
* 02111-1307, USA.
*/
+#include <config.h>
+
+#include "e-i18n.h"
+#include "e-marshal.h"
#include "e-text-event-processor.h"
-#include <gal/util/e-util.h>
-#include <gal/util/e-i18n.h>
-#include "gal/util/e-marshal.h"
+#include "e-util.h"
static void e_text_event_processor_init (ETextEventProcessor *card);
static void e_text_event_processor_class_init (ETextEventProcessorClass *klass);
diff --git a/e-util/e-util-private.h b/e-util/e-util-private.h
new file mode 100644
index 0000000000..10a1194a9b
--- /dev/null
+++ b/e-util/e-util-private.h
@@ -0,0 +1,46 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * e-util-private.h
+ * Copyright 2005, Novell, Inc.
+ *
+ * Authors:
+ * Tor Lillqvist <tml@novell.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License, version 2, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef _E_UTIL_PRIVATE_H_
+#define _E_UTIL_PRIVATE_H_
+
+#include <glib.h>
+
+#ifdef G_OS_WIN32
+
+const char *_gal_get_localedir (void) G_GNUC_CONST;
+const char *_gal_get_gladedir (void) G_GNUC_CONST;
+const char *_gal_get_imagesdir (void) G_GNUC_CONST;
+
+#undef GAL_LOCALEDIR
+#define GAL_LOCALEDIR _gal_get_localedir ()
+
+#undef GAL_GLADEDIR
+#define GAL_GLADEDIR _gal_get_gladedir ()
+
+#undef GAL_IMAGESDIR
+#define GAL_IMAGESDIR _gal_get_imagesdir ()
+
+#endif /* G_OS_WIN32 */
+
+#endif /* _E_UTIL_PRIVATE_H_ */
diff --git a/e-util/e-util.c b/e-util/e-util.c
index 2514cfc931..1a4fd13fd2 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -22,27 +22,27 @@
*/
#include <config.h>
-#include "e-util.h"
-#include "e-i18n.h"
-#include <glib.h>
-#include <gtk/gtkobject.h>
+#include <stdlib.h>
+#include <stdio.h>
#include <errno.h>
-#include <fcntl.h>
#include <unistd.h>
#include <ctype.h>
-#include <sys/stat.h>
+#include <math.h>
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <time.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <gtk/gtk.h>
#include <libgnome/gnome-util.h>
-#include <math.h>
-#if 0
-#include <libgnomevfs/gnome-vfs.h>
-#endif
+#include "e-i18n.h"
+#include "e-util.h"
+#include "e-util-private.h"
int
g_str_compare (const void *x, const void *y)
@@ -154,7 +154,7 @@ e_read_file(const char *filename)
int bytes;
char *ret_val;
- fd = open(filename, O_RDONLY);
+ fd = g_open(filename, O_RDONLY, 0);
if (fd == -1)
return NULL;
bytes = read(fd, buffer, BUFF_SIZE);
@@ -198,7 +198,7 @@ e_write_file(const char *filename, const char *data, int flags)
int fd;
int length = strlen(data);
int bytes;
- fd = open(filename, flags | O_WRONLY, 0666);
+ fd = g_open(filename, flags | O_WRONLY, 0666);
if (fd == -1)
return errno;
while (length > 0) {
@@ -226,7 +226,7 @@ e_write_file_mkstemp(char *filename, const char *data)
int fd;
int length = strlen(data);
int bytes;
- fd = mkstemp (filename);
+ fd = g_mkstemp (filename);
if (fd == -1)
return errno;
while (length > 0) {
@@ -264,25 +264,37 @@ e_mkdir_hier(const char *path, mode_t mode)
{
char *copy, *p;
- if (path[0] == '/') {
+ if (g_path_is_absolute (path)) {
p = copy = g_strdup (path);
} else {
gchar *current_dir = g_get_current_dir();
- p = copy = g_concat_dir_and_file (current_dir, path);
+ p = copy = g_build_filename (current_dir, path, NULL);
+ g_free (current_dir);
}
+ p = g_path_skip_root (p);
do {
- p = strchr (p + 1, '/');
+ char *p1 = strchr (p, '/');
+#ifdef G_OS_WIN32
+ {
+ char *p2 = strchr (p, '\\');
+ if (p1 == NULL ||
+ (p2 != NULL && p2 < p1))
+ p1 = p2;
+ }
+#endif
+ p = p1;
if (p)
*p = '\0';
- if (access (copy, F_OK) == -1) {
- if (mkdir (copy, mode) == -1) {
+ if (!g_file_test (copy, G_FILE_TEST_IS_DIR)) {
+ if (g_mkdir (copy, mode) == -1) {
g_free (copy);
return -1;
}
}
- if (p)
- *p = '/';
+ if (p) {
+ *p++ = '/';
+ }
} while (p);
g_free (copy);
@@ -1220,7 +1232,7 @@ e_gettext (const char *msgid)
static gboolean initialized = FALSE;
if (!initialized) {
- bindtextdomain (E_I18N_DOMAIN, GNOMELOCALEDIR);
+ bindtextdomain (E_I18N_DOMAIN, GAL_LOCALEDIR);
bind_textdomain_codeset (E_I18N_DOMAIN, "UTF-8");
initialized = TRUE;
}
diff --git a/e-util/e-win32-reloc.c b/e-util/e-win32-reloc.c
new file mode 100644
index 0000000000..20db453381
--- /dev/null
+++ b/e-util/e-win32-reloc.c
@@ -0,0 +1,115 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * e-win32-reloc.c: Support relocatable installation on Win32
+ * Copyright 2005, Novell, Inc.
+ *
+ * Authors:
+ * Tor Lillqvist <tml@novell.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License, version 2, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <config.h>
+
+#include <windows.h>
+#include <string.h>
+
+#include <glib.h>
+#include <libgnome/gnome-init.h>
+
+/* localedir uses system codepage as it is passed to the non-UTF8ified
+ * gettext library
+ */
+static char *localedir = NULL;
+
+/* The others are in UTF-8 */
+static char *gladedir;
+static char *imagesdir;
+
+static HMODULE hmodule;
+G_LOCK_DEFINE_STATIC (mutex);
+
+/* Silence gcc with a prototype. Yes, this is silly. */
+BOOL WINAPI DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved);
+
+/* Minimal DllMain that just tucks away the DLL's HMODULE */
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+{
+ switch (fdwReason) {
+ case DLL_PROCESS_ATTACH:
+ hmodule = hinstDLL;
+ break;
+ }
+ return TRUE;
+}
+
+static char *
+replace_prefix (const char *runtime_prefix,
+ const char *configure_time_path)
+{
+ if (runtime_prefix &&
+ strncmp (configure_time_path, GAL_PREFIX "/",
+ strlen (GAL_PREFIX) + 1) == 0) {
+ return g_strconcat (runtime_prefix,
+ configure_time_path + strlen (GAL_PREFIX),
+ NULL);
+ } else
+ return g_strdup (configure_time_path);
+}
+
+static void
+setup (void)
+{
+ char *full_prefix;
+ char *cp_prefix;
+
+ G_LOCK (mutex);
+ if (localedir != NULL) {
+ G_UNLOCK (mutex);
+ return;
+ }
+
+ gnome_win32_get_prefixes (hmodule, &full_prefix, &cp_prefix);
+
+ localedir = replace_prefix (cp_prefix, GAL_LOCALEDIR);
+ g_free (cp_prefix);
+
+ gladedir = replace_prefix (full_prefix, GAL_GLADEDIR);
+ imagesdir = replace_prefix (full_prefix, GAL_IMAGESDIR);
+ g_free (full_prefix);
+
+ G_UNLOCK (mutex);
+}
+
+#include "e-util-private.h" /* For prototypes */
+
+#define GETTER(varbl) \
+const char * \
+_gal_get_##varbl (void) \
+{ \
+ setup (); \
+ return varbl; \
+}
+
+GETTER(localedir)
+GETTER(gladedir)
+GETTER(imagesdir)
+
+
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 437934be65..0382d684a9 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -21,12 +21,7 @@
* 02111-1307, USA.
*/
-
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include "e-xml-utils.h"
#include <stdio.h>
#include <stdlib.h>
@@ -39,11 +34,19 @@
#include <errno.h>
#include <math.h>
#include <string.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
-#include "gal/util/e-i18n.h"
-#include "gal/util/e-util.h"
+#include "e-i18n.h"
+#include "e-util.h"
+#include "e-xml-utils.h"
+
+#ifdef G_OS_WIN32
+#define fsync(fd) 0 /* No fsync() in Microsoft's C library */
+#endif
xmlNode *
e_xml_get_child_by_name (const xmlNode *parent, const xmlChar *child_name)
@@ -440,27 +443,34 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar *
int
e_xml_save_file (const char *filename, xmlDocPtr doc)
{
- char *filesave, *slash, *xmlbuf;
+ char *filesave, *xmlbuf;
size_t n, written = 0;
int ret, fd, size;
int errnosave;
ssize_t w;
- filesave = alloca (strlen (filename) + 5);
- slash = strrchr (filename, '/');
- if (slash)
- sprintf (filesave, "%.*s.#%s", slash - filename + 1, filename, slash + 1);
- else
- sprintf (filesave, ".#%s", filename);
+ {
+ gchar *dirname = g_path_get_dirname (filename);
+ gchar *basename = g_path_get_basename (filename);
+ gchar *savebasename = g_strconcat (".#", basename);
+
+ g_free (basename);
+ filesave = g_build_filename (dirname, savebasename, NULL);
+ g_free (savebasename);
+ g_free (dirname);
+ }
- fd = open (filesave, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (fd == -1)
+ fd = g_open (filesave, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ if (fd == -1) {
+ g_free (filesave);
return -1;
+ }
xmlDocDumpFormatMemory (doc, (xmlChar **) &xmlbuf, &size, TRUE);
if (size <= 0) {
close (fd);
- unlink (filesave);
+ g_unlink (filesave);
+ g_free (filesave);
errno = ENOMEM;
return -1;
}
@@ -480,7 +490,8 @@ e_xml_save_file (const char *filename, xmlDocPtr doc)
if (written < n || fsync (fd) == -1) {
errnosave = errno;
close (fd);
- unlink (filesave);
+ g_unlink (filesave);
+ g_free (filesave);
errno = errnosave;
return -1;
}
@@ -488,15 +499,19 @@ e_xml_save_file (const char *filename, xmlDocPtr doc)
while ((ret = close (fd)) == -1 && errno == EINTR)
;
- if (ret == -1)
+ if (ret == -1) {
+ g_free (filesave);
return -1;
+ }
- if (rename (filesave, filename) == -1) {
+ if (g_rename (filesave, filename) == -1) {
errnosave = errno;
- unlink (filesave);
+ g_unlink (filesave);
+ g_free (filesave);
errno = errnosave;
return -1;
}
+ g_free (filesave);
return 0;
}
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index a535c79601..43edcef690 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -23,14 +23,16 @@
#include <config.h>
-#include "gal-define-views-dialog.h"
-
#include <gtk/gtk.h>
+
+#include "gal/e-table/e-table-scrolled.h"
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/util/e-util-private.h"
+
+#include "gal-define-views-dialog.h"
#include "gal-define-views-model.h"
#include "gal-view-new-dialog.h"
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-util.h>
static void gal_define_views_dialog_init (GalDefineViewsDialog *card);
static void gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass);
@@ -242,10 +244,14 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
GladeXML *gui;
GtkWidget *widget;
GtkWidget *etable;
+ gchar *filename = g_build_filename (GAL_GLADEDIR,
+ "gal-define-views.glade",
+ NULL);
dialog->collection = NULL;
- gui = glade_xml_new (GAL_GLADEDIR "/gal-define-views.glade", NULL, E_I18N_DOMAIN);
+ gui = glade_xml_new (filename, NULL, E_I18N_DOMAIN);
+ g_free (filename);
dialog->gui = gui;
widget = glade_xml_get_widget(gui, "table-top");
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index 40e54a53b6..318992cc56 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -22,12 +22,15 @@
*/
#include <config.h>
+
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
#include "gal-define-views-model.h"
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-util.h>
#define PARENT_TYPE E_TABLE_MODEL_TYPE
static ETableModelClass *parent_class;
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 5e97419270..826951b9e3 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -23,16 +23,19 @@
#include <config.h>
-#include <util/e-i18n.h>
-#include <sys/stat.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
+
+#include <glib.h>
#include <libxml/parser.h>
#include <libgnome/gnome-util.h>
-#include <gal/util/e-util.h>
-#include <gal/util/e-xml-utils.h>
-#include <gal/widgets/e-unicode.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/util/e-xml-utils.h"
+#include "gal/widgets/e-unicode.h"
+
#include "gal-view-collection.h"
#define PARENT_TYPE G_TYPE_OBJECT
@@ -392,10 +395,17 @@ load_single_dir (GalViewCollection *collection,
xmlNode *child;
char *filename = g_concat_dir_and_file(dir, "galview.xml");
char *default_view;
- struct stat st;
- if (stat (filename, &st) != -1 && S_ISREG (st.st_mode))
+ if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
+#ifdef G_OS_WIN32
+ gchar *locale_filename = gnome_win32_locale_filename_from_utf8 (filename);
+ if (locale_filename != NULL)
+ doc = xmlParseFile (locale_filename);
+ g_free (locale_filename);
+#else
doc = xmlParseFile (filename);
+#endif
+ }
if (!doc) {
g_free (filename);
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index a46368559e..3f23981fe7 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -22,8 +22,10 @@
*/
#include <config.h>
+
+#include "gal/e-table/e-table-config.h"
+
#include "gal-view-etable.h"
-#include <gal/e-table/e-table-config.h>
#define PARENT_TYPE GAL_VIEW_TYPE
diff --git a/widgets/menus/gal-view-factory-etable.c b/widgets/menus/gal-view-factory-etable.c
index c0d68fe006..3de27833ec 100644
--- a/widgets/menus/gal-view-factory-etable.c
+++ b/widgets/menus/gal-view-factory-etable.c
@@ -22,10 +22,12 @@
*/
#include <config.h>
+
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
-#include "gal-view-factory-etable.h"
+
#include "gal-view-etable.h"
+#include "gal-view-factory-etable.h"
#define PARENT_TYPE GAL_VIEW_FACTORY_TYPE
diff --git a/widgets/menus/gal-view-factory.c b/widgets/menus/gal-view-factory.c
index 5bc2c9f11d..3a644606f6 100644
--- a/widgets/menus/gal-view-factory.c
+++ b/widgets/menus/gal-view-factory.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include "gal-view-factory.h"
+
#include "gal/util/e-util.h"
+#include "gal-view-factory.h"
+
#define PARENT_TYPE G_TYPE_OBJECT
#define d(x)
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c
index b65d4acba2..d2ce6e9ac3 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.c
+++ b/widgets/menus/gal-view-instance-save-as-dialog.c
@@ -23,16 +23,15 @@
#include <config.h>
-#include "gal-view-instance-save-as-dialog.h"
+#include <gtk/gtk.h>
+
+#include "gal/e-table/e-table-scrolled.h"
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util-private.h"
#include "gal-define-views-model.h"
+#include "gal-view-instance-save-as-dialog.h"
#include "gal-view-new-dialog.h"
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/util/e-i18n.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkstock.h>
static GtkDialogClass *parent_class = NULL;
#define PARENT_TYPE GTK_TYPE_DIALOG
@@ -192,10 +191,14 @@ gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog)
GladeXML *gui;
GtkWidget *widget;
GtkWidget *table;
+ gchar *filename = g_build_filename (GAL_GLADEDIR,
+ "gal-view-instance-save-as-dialog.glade",
+ NULL);
dialog->instance = NULL;
- gui = glade_xml_new_with_domain (GAL_GLADEDIR "/gal-view-instance-save-as-dialog.glade", NULL, E_I18N_DOMAIN);
+ gui = glade_xml_new_with_domain (filename , NULL, E_I18N_DOMAIN);
+ g_free (filename);
dialog->gui = gui;
widget = glade_xml_get_widget(gui, "vbox-top");
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 6ce8a2ab86..5cc3c696a3 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -23,21 +23,25 @@
#include <config.h>
-#include <util/e-i18n.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libgnome/gnome-util.h>
-#include <gal/util/e-util.h>
-#include <gal/util/e-xml-utils.h>
-#include <gal/widgets/e-unicode.h>
+#include <glib/gstdio.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/util/e-xml-utils.h"
+#include "gal/widgets/e-unicode.h"
+
+#include "gal-define-views-dialog.h"
#include "gal-view-instance.h"
#include "gal-view-instance-save-as-dialog.h"
-#include "gal-define-views-dialog.h"
-#include <sys/stat.h>
-#include <unistd.h>
-#include <gtk/gtkcheckmenuitem.h>
#define PARENT_TYPE G_TYPE_OBJECT
@@ -242,10 +246,17 @@ load_current_view (GalViewInstance *instance)
xmlDoc *doc = NULL;
xmlNode *root;
GalView *view = NULL;
- struct stat st;
- if (stat (instance->current_view_filename, &st) != -1 && S_ISREG (st.st_mode))
+ if (g_file_test (instance->current_view_filename, G_FILE_TEST_IS_REGULAR)) {
+#ifdef G_OS_WIN32
+ gchar *locale_filename = gnome_win32_locale_filename_from_utf8 (instance->current_view_filename);
+ if (locale_filename != NULL)
+ doc = xmlParseFile(locale_filename);
+ g_free (locale_filename);
+#else
doc = xmlParseFile(instance->current_view_filename);
+#endif
+ }
if (doc == NULL) {
instance->current_id = g_strdup (gal_view_instance_get_default_view (instance));
@@ -454,7 +465,7 @@ gal_view_instance_exists (GalViewInstance *instance)
{
struct stat st;
- if (instance->current_view_filename && stat (instance->current_view_filename, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode))
+ if (instance->current_view_filename && g_stat (instance->current_view_filename, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode))
return TRUE;
else
return FALSE;
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 00ef874e40..7de74c69a8 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -22,14 +22,17 @@
*/
#include <config.h>
+
#include <gtk/gtk.h>
-#include <gtk/gtktreeselection.h>
-#include "gal-view-new-dialog.h"
+
+#include "gal/e-table/e-table-scrolled.h"
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/util/e-util-private.h"
+#include "gal/widgets/e-unicode.h"
+
#include "gal-define-views-model.h"
-#include <gal/widgets/e-unicode.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-util.h>
+#include "gal-view-new-dialog.h"
static void gal_view_new_dialog_init (GalViewNewDialog *card);
static void gal_view_new_dialog_class_init (GalViewNewDialogClass *klass);
@@ -85,8 +88,12 @@ gal_view_new_dialog_init (GalViewNewDialog *dialog)
{
GladeXML *gui;
GtkWidget *widget;
+ gchar *filename = g_build_filename (GAL_GLADEDIR,
+ "gal-view-new-dialog.glade",
+ NULL);
- gui = glade_xml_new (GAL_GLADEDIR "/gal-view-new-dialog.glade", NULL, E_I18N_DOMAIN);
+ gui = glade_xml_new (filename, NULL, E_I18N_DOMAIN);
+ g_free (filename);
dialog->gui = gui;
widget = glade_xml_get_widget(gui, "table-top");
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
index fa1402fae4..c375b4323f 100644
--- a/widgets/menus/gal-view.c
+++ b/widgets/menus/gal-view.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include "gal-view.h"
+
#include "gal/util/e-util.h"
+#include "gal-view.h"
+
#define PARENT_TYPE G_TYPE_OBJECT
#define d(x)
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 26d9d37de2..ad9f2b002b 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -23,18 +23,20 @@
#include <config.h>
-#include "e-canvas-background.h"
-
#include <math.h>
#include <stdio.h>
-#include <gtk/gtksignal.h>
+#include <string.h>
+
#include <gdk/gdkkeysyms.h>
-#include "gal/widgets/e-hsv-utils.h"
+#include <gtk/gtk.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-utils.h"
-#include "gal/util/e-util.h"
-#include "gal/util/e-i18n.h"
-#include <string.h>
+#include "gal/widgets/e-hsv-utils.h"
+
+#include "e-canvas-background.h"
#define PARENT_OBJECT_TYPE gnome_canvas_item_get_type ()
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 354da5d872..4c7969ff66 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -22,14 +22,18 @@
*/
#include <config.h>
+
#include <math.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
-#include "e-canvas-vbox.h"
-#include "e-canvas-utils.h"
-#include "e-canvas.h"
-#include "gal/util/e-util.h"
+#include <gtk/gtk.h>
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
+#include "e-canvas.h"
+#include "e-canvas-utils.h"
+#include "e-canvas-vbox.h"
static void e_canvas_vbox_init (ECanvasVbox *CanvasVbox);
static void e_canvas_vbox_class_init (ECanvasVboxClass *klass);
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 8be100fb4a..d7c2832e9b 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -21,12 +21,13 @@
* 02111-1307, USA.
*/
-#include <gtk/gtksignal.h>
-#include "e-canvas.h"
+#include <config.h>
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
-#include <X11/Xlib.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkimmulticontext.h>
+
+#include "e-canvas.h"
static void e_canvas_init (ECanvas *card);
static void e_canvas_dispose (GObject *object);
@@ -1061,10 +1062,10 @@ e_canvas_item_grab (ECanvas *canvas,
gpointer cancelled_data)
{
if (gtk_grab_get_current ()) {
- return AlreadyGrabbed;
+ return GDK_GRAB_ALREADY_GRABBED;
} else {
int ret_val = gnome_canvas_item_grab (item, event_mask, cursor, etime);
- if (ret_val == GrabSuccess) {
+ if (ret_val == GDK_GRAB_SUCCESS) {
canvas->grab_cancelled_cb = cancelled_cb;
canvas->grab_cancelled_check_id =
g_timeout_add_full (G_PRIORITY_LOW,
diff --git a/widgets/misc/e-colors.c b/widgets/misc/e-colors.c
index 3f16437bee..3db1aac633 100644
--- a/widgets/misc/e-colors.c
+++ b/widgets/misc/e-colors.c
@@ -26,7 +26,9 @@
*/
#include <config.h>
-#include <gtk/gtkwidget.h>
+
+#include <gtk/gtk.h>
+
#include "e-colors.h"
GdkColor e_white, e_dark_gray, e_black;
diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c
index 3b44ab809e..25a37b8b6e 100644
--- a/widgets/misc/e-cursors.c
+++ b/widgets/misc/e-cursors.c
@@ -23,15 +23,16 @@
#include <config.h>
-#include "e-cursors.h"
+#include <stdio.h>
#include "e-colors.h"
+#include "e-cursors.h"
+
#include "pixmaps/cursor_cross.xpm"
#include "pixmaps/cursor_zoom_in.xpm"
#include "pixmaps/cursor_zoom_out.xpm"
#include "pixmaps/cursor_hand_open.xpm"
#include "pixmaps/cursor_hand_closed.xpm"
-#include <stdio.h>
#define GDK_INTERNAL_CURSOR -1
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c
index 886fb3d7ca..af6fa31083 100644
--- a/widgets/misc/e-gui-utils.c
+++ b/widgets/misc/e-gui-utils.c
@@ -21,18 +21,14 @@
* 02111-1307, USA.
*/
-
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include "e-gui-utils.h"
-#include <gtk/gtkentry.h>
-#include <gtk/gtksignal.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas-pixbuf.h>
+#include "e-gui-utils.h"
+
void
e_auto_kill_popup_menu_on_selection_done (GtkMenu *menu)
{
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index 8607cd1b01..86e2e20021 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -24,21 +24,15 @@
*/
#include <config.h>
+
+#include <libintl.h>
#include <string.h>
-#include <gtk/gtkimage.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkaccellabel.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkradiomenuitem.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkimagemenuitem.h>
+#include <gtk/gtk.h>
-#include "e-popup-menu.h"
#include "e-gui-utils.h"
-
-#include <gal/util/e-i18n.h>
+#include "e-popup-menu.h"
/*
* Creates an item with an optional icon
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index 534f153823..d4f2da36c9 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -22,8 +22,11 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
+
#include "e-printable.h"
#define EP_CLASS(e) ((EPrintableClass *)((GtkObject *)e)->klass)
diff --git a/widgets/misc/e-reflow-model.c b/widgets/misc/e-reflow-model.c
index 33a5498df5..340cd04736 100644
--- a/widgets/misc/e-reflow-model.c
+++ b/widgets/misc/e-reflow-model.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include "e-reflow-model.h"
+
#include "gal/util/e-util.h"
+#include "e-reflow-model.h"
+
#define PARENT_TYPE G_TYPE_OBJECT
#define d(x)
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 4c48505c38..afbc3ca781 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -23,20 +23,21 @@
#include <config.h>
-#include "e-reflow.h"
-
#include <math.h>
+#include <string.h>
+
#include <gdk/gdkkeysyms.h>
-#include "e-canvas-utils.h"
-#include "e-canvas.h"
+#include <gtk/gtk.h>
+
#include "gal/e-text/e-text.h"
-#include "gal/util/e-util.h"
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
#include "gal/widgets/e-unicode.h"
-#include <gtk/gtksignal.h>
-#include "e-selection-model-simple.h"
-#include <string.h>
+#include "e-canvas.h"
+#include "e-canvas-utils.h"
+#include "e-reflow.h"
+#include "e-selection-model-simple.h"
static gboolean e_reflow_event (GnomeCanvasItem *item, GdkEvent *event);
static void e_reflow_realize (GnomeCanvasItem *item);
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index e6e96702a3..782dd30d69 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -22,11 +22,14 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
-#include "e-selection-model-array.h"
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
+#include "e-selection-model-array.h"
+
#define PARENT_TYPE e_selection_model_get_type ()
static ESelectionModelClass *parent_class;
diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c
index 51a0d86623..ea03b74b75 100644
--- a/widgets/misc/e-selection-model-simple.c
+++ b/widgets/misc/e-selection-model-simple.c
@@ -22,7 +22,9 @@
*/
#include <config.h>
-#include <gal/util/e-util.h>
+
+#include "gal/util/e-util.h"
+
#include "e-selection-model-array.h"
#include "e-selection-model-simple.h"
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index 7694b90432..8ab880f848 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -22,11 +22,14 @@
*/
#include <config.h>
+
#include <gdk/gdkkeysyms.h>
-#include "e-selection-model.h"
+
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
+#include "e-selection-model.h"
+
#define PARENT_TYPE G_TYPE_OBJECT
static GObjectClass *e_selection_model_parent_class;
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index d7bd33caa7..1d41c28e25 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -27,24 +27,23 @@
#include <config.h>
-#include "e-unicode.h"
-
-#include "gal/util/e-i18n.h"
-#include <ctype.h>
+#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <ctype.h>
#include <iconv.h>
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkmenuitem.h>
+#include <gtk/gtk.h>
#include <libxml/xmlmemory.h>
-#include <stdlib.h>
+
+#include "gal/util/e-i18n.h"
#include "gal/util/e-iconv.h"
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
+#include "e-unicode.h"
#define d(x) x
diff --git a/widgets/misc/gal-combo-box.c b/widgets/misc/gal-combo-box.c
index ad941a7133..c27ead20bf 100644
--- a/widgets/misc/gal-combo-box.c
+++ b/widgets/misc/gal-combo-box.c
@@ -25,20 +25,14 @@
*/
#include <config.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkarrow.h>
-#include <gtk/gtkeventbox.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtktearoffmenuitem.h>
+
#include <gdk/gdkkeysyms.h>
-#include "gal-combo-box.h"
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
+#include "gal-combo-box.h"
+
#define PARENT_TYPE GTK_TYPE_HBOX
static GObjectClass *gal_combo_box_parent_class;
diff --git a/widgets/misc/gal-combo-text.c b/widgets/misc/gal-combo-text.c
index ba3b4ad7c5..41d61145b6 100644
--- a/widgets/misc/gal-combo-text.c
+++ b/widgets/misc/gal-combo-text.c
@@ -21,12 +21,13 @@
*/
#include <config.h>
+
#include <ctype.h>
-#include <gal/util/e-util.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklist.h>
-#include <gtk/gtkscrolledwindow.h>
+
+#include <gtk/gtk.h>
+
+#include "gal/util/e-util.h"
+
#include "gal-combo-text.h"
#define PARENT_TYPE GAL_COMBO_BOX_TYPE
diff --git a/widgets/misc/test-color.c b/widgets/misc/test-color.c
index 364e0644de..9bb6fe1cf2 100644
--- a/widgets/misc/test-color.c
+++ b/widgets/misc/test-color.c
@@ -21,11 +21,15 @@
*/
#include <config.h>
-#include <gal/util/e-i18n.h>
+
#include <gnome.h>
-#include "widget-color-combo.h"
+
+#include "gal/util/e-i18n.h"
+
#include "color-palette.h"
#include "e-colors.h"
+#include "widget-color-combo.h"
+
#include "pixmaps/cursor_hand_open.xpm"
/* To compile (from src/widgets):
diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c
index 5ef4b23a96..5310d27fc0 100644
--- a/widgets/table/e-cell-checkbox.c
+++ b/widgets/table/e-cell-checkbox.c
@@ -21,15 +21,15 @@
* 02111-1307, USA.
*/
#include <config.h>
-#include <gtk/gtkenums.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtksignal.h>
+
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
-#include "e-cell-checkbox.h"
+
#include "gal/util/e-util.h"
+
#include "e-table-item.h"
+#include "e-cell-checkbox.h"
#include "check-empty.xpm"
#include "check-filled.xpm"
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 3ff3488ae5..0688f7068f 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -53,12 +53,16 @@
*/
#include <config.h>
-#include <string.h> /* strcmp() */
+
+#include <string.h>
+
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
-#include <glib/gi18n.h>
+
+#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
#include "gal/widgets/e-unicode.h"
+
#include "e-table-item.h"
#include "e-cell-combo.h"
#include "e-cell-text.h"
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index 64d9b8132b..4366b8cd81 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -22,18 +22,24 @@
#include <config.h>
-#include "e-cell-date.h"
-
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/util/e-i18n.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/widgets/e-unicode.h"
+
+#include "e-cell-date.h"
#define PARENT_TYPE e_cell_text_get_type ()
+#ifdef G_OS_WIN32
+/* The localtime() in Microsoft's C library *is* thread-safe */
+#define localtime_r(timep, result) (localtime (timep) ? memcpy ((result), localtime (timep), sizeof (*(result))) : 0)
+#endif
+
static ECellTextClass *parent_class;
static char *
diff --git a/widgets/table/e-cell-float.c b/widgets/table/e-cell-float.c
index 133be063b3..be2b47bd5d 100644
--- a/widgets/table/e-cell-float.c
+++ b/widgets/table/e-cell-float.c
@@ -25,10 +25,13 @@
*/
#include <config.h>
+
#include <sys/time.h>
#include <unistd.h>
-#include <gal/util/e-util.h>
-#include <gal/util/e-i18n.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
#include "e-cell-float.h"
#define PARENT_TYPE e_cell_text_get_type ()
diff --git a/widgets/table/e-cell-number.c b/widgets/table/e-cell-number.c
index 8c8887df5a..d8890af4b2 100644
--- a/widgets/table/e-cell-number.c
+++ b/widgets/table/e-cell-number.c
@@ -21,10 +21,13 @@
*/
#include <config.h>
+
#include <sys/time.h>
#include <unistd.h>
-#include <gal/util/e-util.h>
-#include <gal/util/e-i18n.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
#include "e-cell-number.h"
#define PARENT_TYPE e_cell_text_get_type ()
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c
index 50c3b2cc7a..03c476185f 100644
--- a/widgets/table/e-cell-pixbuf.c
+++ b/widgets/table/e-cell-pixbuf.c
@@ -21,10 +21,15 @@
* 02111-1307, USA.
*/
+#include <config.h>
+
#include <stdio.h>
+
#include <libgnomecanvas/gnome-canvas.h>
+
+#include "gal/util/e-i18n.h"
+
#include "e-cell-pixbuf.h"
-#include <gal/util/e-i18n.h>
#define PARENT_TYPE E_CELL_TYPE
static ECellClass *parent_class;
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 50943d6004..42b04f3984 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -29,12 +29,15 @@
*/
#include <config.h>
+
#include <gdk/gdkkeysyms.h>
-#include "gal/util/e-util.h"
-#include "e-table-item.h"
-#include "e-cell-popup.h"
+
#include "gal/a11y/e-table/gal-a11y-e-cell-popup.h"
#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
+#include "gal/util/e-util.h"
+
+#include "e-cell-popup.h"
+#include "e-table-item.h"
#define E_CELL_POPUP_ARROW_WIDTH 16
#define E_CELL_POPUP_ARROW_XPAD 3
diff --git a/widgets/table/e-cell-progress.c b/widgets/table/e-cell-progress.c
index bf7fdd9951..cf07db84dc 100644
--- a/widgets/table/e-cell-progress.c
+++ b/widgets/table/e-cell-progress.c
@@ -26,21 +26,17 @@
* 02111-1307, USA.
*/
-
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <string.h>
-#include <gtk/gtkenums.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtksignal.h>
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
-#include "e-cell-progress.h"
+
#include "gal/util/e-util.h"
+
+#include "e-cell-progress.h"
#include "e-table-item.h"
#define PARENT_TYPE e_cell_get_type ()
diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c
index 1ba8f6d2e6..7651a0bdfc 100644
--- a/widgets/table/e-cell-size.c
+++ b/widgets/table/e-cell-size.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <sys/time.h>
#include <unistd.h>
-#include <gal/util/e-util.h>
+
+#include "gal/util/e-util.h"
+
#include "e-cell-size.h"
#define PARENT_TYPE e_cell_text_get_type ()
diff --git a/widgets/table/e-cell-spin-button.c b/widgets/table/e-cell-spin-button.c
index b2af02c44d..59ee3d98a3 100644
--- a/widgets/table/e-cell-spin-button.c
+++ b/widgets/table/e-cell-spin-button.c
@@ -27,16 +27,16 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-table-model.h>
-#include <gal/e-table/e-cell-float.h>
-#include <gal/e-table/e-cell-number.h>
-#include <gal/util/e-util.h>
+
+#include <gtk/gtk.h>
+
+#include "gal/e-table/e-cell-float.h"
+#include "gal/e-table/e-cell-number.h"
+#include "gal/e-table/e-table-item.h"
+#include "gal/e-table/e-table-model.h"
+#include "gal/util/e-util.h"
+
#include "e-cell-spin-button.h"
#define E_CELL_SPIN_BUTTON_ARROW_WIDTH 16
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 00292254e9..1ecd71f638 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -35,27 +35,30 @@
*/
#include <config.h>
+
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
-#include <gdk/gdkx.h> /* for BlackPixel */
+
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include "e-cell-text.h"
+
+#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
+#include "gal/a11y/e-table/gal-a11y-e-cell-text.h"
+#include "gal/e-text/e-text.h"
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-text-event-processor.h"
+#include "gal/util/e-text-event-processor-emacs-like.h"
#include "gal/util/e-util.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-unicode.h"
+
+#include "e-cell-text.h"
#include "e-table-item.h"
-#include "gal/util/e-text-event-processor.h"
-#include "gal/e-text/e-text.h"
-#include "gal/util/e-text-event-processor-emacs-like.h"
-#include "gal/util/e-i18n.h"
#include "e-table-tooltip.h"
-#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
-#include "gal/a11y/e-table/gal-a11y-e-cell-text.h"
#define d(x)
#define DO_SELECTION 1
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 34e8a8b76d..395ec05f6b 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -22,18 +22,18 @@
*/
#include <config.h>
-#include <gtk/gtkenums.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtksignal.h>
+
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
-#include "e-cell-toggle.h"
+
+#include "gal/a11y/e-table/gal-a11y-e-cell-toggle.h"
+#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
#include "gal/util/e-util.h"
#include "gal/widgets/e-hsv-utils.h"
+
+#include "e-cell-toggle.h"
#include "e-table-item.h"
-#include "gal/a11y/e-table/gal-a11y-e-cell-toggle.h"
-#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
#define PARENT_TYPE e_cell_get_type ()
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index a0be81e889..95e7764cdf 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -33,27 +33,23 @@
#include <math.h>
#include <stdio.h>
-#include <gdk/gdkx.h> /* for BlackPixel */
-#include <gtk/gtkenums.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkinvisible.h>
-#include <gtk/gtksignal.h>
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
-#include "e-tree-table-adapter.h"
-#include "e-tree.h"
-#include "e-tree-model.h"
+#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
+#include "gal/a11y/e-table/gal-a11y-e-cell-tree.h"
#include "gal/util/e-util.h"
-#include "e-table-item.h"
+
#include "e-cell-tree.h"
+#include "e-table-item.h"
+#include "e-tree.h"
+#include "e-tree-model.h"
+#include "e-tree-table-adapter.h"
#include "tree-expanded.xpm"
#include "tree-unexpanded.xpm"
-#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
-#include "gal/a11y/e-table/gal-a11y-e-cell-tree.h"
#define PARENT_TYPE e_cell_get_type ()
@@ -174,7 +170,9 @@ ect_realize (ECellView *ecell_view)
tree_view->gc = gdk_gc_new (GTK_WIDGET (tree_view->canvas)->window);
gdk_gc_set_line_attributes (tree_view->gc, 1,
- GDK_LINE_ON_OFF_DASH, None, None);
+ GDK_LINE_ON_OFF_DASH,
+ GDK_CAP_NOT_LAST,
+ GDK_JOIN_MITER);
gdk_gc_set_dashes (tree_view->gc, 0, "\1\1", 2);
if (parent_class->realize)
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index ee18694742..7ab1b561a2 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -33,19 +33,14 @@
#include <math.h>
#include <stdio.h>
-#include <gdk/gdkx.h> /* for BlackPixel */
-#include <gtk/gtkenums.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtkinvisible.h>
-#include <gtk/gtksignal.h>
-#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
-#include "gal/util/e-util.h"
#include "gal/a11y/e-table/gal-a11y-e-cell-registry.h"
#include "gal/a11y/e-table/gal-a11y-e-cell-vbox.h"
-#include "e-table-item.h"
+#include "gal/util/e-util.h"
+
#include "e-cell-vbox.h"
+#include "e-table-item.h"
#define PARENT_TYPE e_cell_get_type ()
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index 8deeaa654c..e3fe5af23a 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -23,9 +23,11 @@
*/
#include <config.h>
-#include "e-cell.h"
+
#include "gal/util/e-util.h"
+#include "e-cell.h"
+
#define PARENT_TYPE GTK_TYPE_OBJECT
#define ECVIEW_EC_CLASS(v) (E_CELL_GET_CLASS (v->ecell))
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 544cbcbd86..01eb6ab671 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -22,26 +22,26 @@
*/
#include <config.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
-#include <libgnomecanvas/gnome-canvas-util.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
+#include <libgnomecanvas/gnome-canvas-util.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <atk/atkregistry.h>
-#include <atk/atkutil.h>
-#include <atk/atkgobjectaccessible.h>
-#include "e-table-header.h"
-#include "e-table-click-to-add.h"
-#include "e-table-defines.h"
-#include "e-table-one.h"
+
+#include "gal/a11y/e-table/gal-a11y-e-table-click-to-add.h"
#include "gal/e-text/e-text.h"
-#include "gal/widgets/e-canvas.h"
-#include "gal/widgets/e-canvas-utils.h"
-#include "gal/util/e-util.h"
#include "gal/util/e-i18n.h"
#include "gal/util/e-marshal.h"
-#include "gal/a11y/e-table/gal-a11y-e-table-click-to-add.h"
+#include "gal/util/e-util.h"
+#include "gal/widgets/e-canvas-utils.h"
+#include "gal/widgets/e-canvas.h"
+
+#include "e-table-click-to-add.h"
+#include "e-table-defines.h"
+#include "e-table-header.h"
+#include "e-table-one.h"
enum {
CURSOR_CHANGE,
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c
index 9acc0ba4fd..ccc6665547 100644
--- a/widgets/table/e-table-col.c
+++ b/widgets/table/e-table-col.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include "e-table-col.h"
-#include "gal/util/e-util.h"
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
+#include "e-table-col.h"
static GObjectClass *parent_class;
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index 2e992414d5..a8f8f3fb54 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -22,11 +22,15 @@
*/
#include <config.h>
+
#include <stdlib.h>
+
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
-#include "gal/util/e-xml-utils.h"
+
#include "gal/util/e-util.h"
+#include "gal/util/e-xml-utils.h"
+
#include "e-table-column-specification.h"
static GObjectClass *etcs_parent_class;
diff --git a/widgets/table/e-table-column.c b/widgets/table/e-table-column.c
index 514a25e74e..54fdb1525a 100644
--- a/widgets/table/e-table-column.c
+++ b/widgets/table/e-table-column.c
@@ -22,6 +22,7 @@
*/
#include <config.h>
+
#include "e-table-column.h"
enum {
diff --git a/widgets/table/e-table-config-field.c b/widgets/table/e-table-config-field.c
index 7c23e10046..a3a833580e 100644
--- a/widgets/table/e-table-config-field.c
+++ b/widgets/table/e-table-config-field.c
@@ -22,11 +22,14 @@
*/
#include <config.h>
+
#include <stdlib.h>
+
#include <gtk/gtk.h>
-#include <gtk/gtkbox.h>
-#include "gal/util/e-util.h"
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
#include "e-table-config-field.h"
#define PARENT_TYPE (gtk_vbox_get_type())
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 4e40c150fd..3c508565ce 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -29,24 +29,22 @@
#include <config.h>
-#include "e-table-config.h"
-
#include <stdlib.h>
#include <string.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktogglebutton.h>
+
+#include <gtk/gtk.h>
#include <libgnomeui/gnome-propertybox.h>
#include <glade/glade.h>
-#include "gal/util/e-util.h"
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util-private.h"
+#include "gal/util/e-util.h"
#include "gal/widgets/e-unicode.h"
-#include <e-table-scrolled.h>
-#include <e-table-without.h>
-#include <e-table-memory-store.h>
-
+#include "e-table-config.h"
+#include "e-table-memory-store.h"
+#include "e-table-scrolled.h"
+#include "e-table-without.h"
static GObjectClass *config_parent_class;
@@ -1079,9 +1077,19 @@ setup_gui (ETableConfig *config)
create_global_store (config);
if (e_table_sort_info_get_can_group (config->state->sort_info)) {
- gui = glade_xml_new (ETABLE_GLADEDIR "/e-table-config.glade", NULL, E_I18N_DOMAIN);
+ gchar *filename =
+ g_build_filename (GAL_GLADEDIR,
+ "e-table-config.glade",
+ NULL);
+ gui = glade_xml_new (filename, NULL, E_I18N_DOMAIN);
+ g_free (filename);
} else {
- gui = glade_xml_new (ETABLE_GLADEDIR "/e-table-config-no-group.glade", NULL, E_I18N_DOMAIN);
+ gchar *filename =
+ g_build_filename (GAL_GLADEDIR,
+ "e-table-config-no-group.glade",
+ NULL);
+ gui = glade_xml_new (filename, NULL, E_I18N_DOMAIN);
+ g_free (filename);
}
g_object_unref (global_store);
diff --git a/widgets/table/e-table-example-2.c b/widgets/table/e-table-example-2.c
index 2321e4e7dd..e00265650f 100644
--- a/widgets/table/e-table-example-2.c
+++ b/widgets/table/e-table-example-2.c
@@ -23,9 +23,11 @@
#include <stdio.h>
#include <string.h>
+
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "gal/e-util/e-cursors.h"
+
#include "e-table-simple.h"
#include "e-table-header.h"
#include "e-table-header-item.h"
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index 81947a6e94..de91862bea 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -22,18 +22,22 @@
*/
#include <config.h>
+
#include <stdlib.h>
-#include <gtk/gtksignal.h>
+#include <string.h>
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
-#include "gal/e-table/e-cell-text.h"
-#include "gal/e-table/e-cell-checkbox.h"
-#include "gal/e-table/e-cell-date.h"
-#include "gal/e-table/e-cell-number.h"
-#include "gal/e-table/e-cell-pixbuf.h"
-#include "gal/e-table/e-cell-size.h"
-#include "gal/e-table/e-cell-tree.h"
+
+#include "e-cell-checkbox.h"
+#include "e-cell-date.h"
+#include "e-cell-number.h"
+#include "e-cell-pixbuf.h"
+#include "e-cell-size.h"
+#include "e-cell-text.h"
+#include "e-cell-tree.h"
#include "e-table-extras.h"
-#include <string.h>
static GObjectClass *ete_parent_class;
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index d7e725fd12..f079703441 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -22,10 +22,13 @@
*/
#include <config.h>
-#include "e-table-field-chooser-dialog.h"
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
-#include <gtk/gtkstock.h>
+
+#include "e-table-field-chooser-dialog.h"
static void e_table_field_chooser_dialog_init (ETableFieldChooserDialog *card);
static void e_table_field_chooser_dialog_class_init (ETableFieldChooserDialogClass *klass);
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index cfc73fc102..86f3f87d2c 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -22,9 +22,10 @@
*/
#include <config.h>
+
#include <string.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkdnd.h>
+
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
#include <libgnomecanvas/gnome-canvas-util.h>
#include <libgnomecanvas/gnome-canvas-polygon.h>
@@ -36,12 +37,11 @@
#include "gal/util/e-xml-utils.h"
#include "gal/widgets/e-canvas.h"
-#include "e-table-header.h"
#include "e-table-col-dnd.h"
#include "e-table-defines.h"
-#include "e-table-header-utils.h"
-
#include "e-table-field-chooser-item.h"
+#include "e-table-header-utils.h"
+#include "e-table-header.h"
#define d(x)
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index 25b94b2aca..333827fd48 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -22,14 +22,16 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+
#include <gtk/gtk.h>
-#include <gtk/gtkbox.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/util/e-util-private.h"
+
#include "e-table-field-chooser.h"
#include "e-table-field-chooser-item.h"
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-util.h>
static void e_table_field_chooser_init (ETableFieldChooser *card);
static void e_table_field_chooser_class_init (ETableFieldChooserClass *klass);
@@ -153,8 +155,11 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
{
GladeXML *gui;
GtkWidget *widget;
-
- gui = glade_xml_new (ETABLE_GLADEDIR "/e-table-field-chooser.glade", NULL, E_I18N_DOMAIN);
+ gchar *filename = g_build_filename (GAL_GLADEDIR,
+ "e-table-field-chooser.glade",
+ NULL);
+ gui = glade_xml_new (filename, NULL, E_I18N_DOMAIN);
+ g_free (filename);
etfc->gui = gui;
widget = glade_xml_get_widget(gui, "vbox-top");
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 2fc0617e8f..30e7bed520 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -22,19 +22,23 @@
*/
#include <config.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include <libgnome/libgnome.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include "e-table-group-container.h"
-#include "e-table-group-leaf.h"
-#include "e-table-item.h"
+
+#include "gal/e-text/e-text.h"
+#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
-#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-utils.h"
+#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-unicode.h"
-#include "gal/e-text/e-text.h"
+
#include "e-table-defines.h"
+#include "e-table-group-container.h"
+#include "e-table-group-leaf.h"
+#include "e-table-item.h"
#define TITLE_HEIGHT 16
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index 083345ed74..597cfe0724 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -22,16 +22,19 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include "e-table-group-leaf.h"
-#include "e-table-item.h"
-#include "e-table-sorted-variable.h"
-#include "e-table-sorted.h"
-#include "gal/util/e-util.h"
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
#include "gal/widgets/e-canvas.h"
+#include "e-table-item.h"
+#include "e-table-group-leaf.h"
+#include "e-table-sorted.h"
+#include "e-table-sorted-variable.h"
+
#define PARENT_TYPE e_table_group_get_type ()
static GnomeCanvasGroupClass *etgl_parent_class;
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 5bc8841cb4..4dca53c3f9 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -22,13 +22,16 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
+
+#include "gal/util/e-util.h"
+
#include "e-table-group.h"
#include "e-table-group-container.h"
#include "e-table-group-leaf.h"
#include "e-table-item.h"
-#include "gal/util/e-util.h"
#define PARENT_TYPE gnome_canvas_group_get_type ()
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 265d29fed0..14438f39d2 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -24,33 +24,34 @@
#include <config.h>
-#include "e-table-header-item.h"
-
#include <string.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkimage.h>
+
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
#include <libgnomecanvas/gnome-canvas-util.h>
#include <libgnomecanvas/gnome-canvas-polygon.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdkkeysyms.h>
-#include "gal/widgets/e-cursors.h"
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-marshal.h"
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
-#include "gal/util/e-marshal.h"
#include "gal/widgets/e-canvas.h"
-#include "gal/widgets/e-popup-menu.h"
+#include "gal/widgets/e-cursors.h"
#include "gal/widgets/e-gui-utils.h"
-#include "e-table-header.h"
-#include "e-table-header-utils.h"
+#include "gal/widgets/e-popup-menu.h"
+
+#include "e-table.h"
#include "e-table-col-dnd.h"
+#include "e-table-config.h"
#include "e-table-defines.h"
#include "e-table-field-chooser-dialog.h"
-#include "e-table-config.h"
-#include "e-table.h"
+#include "e-table-header.h"
+#include "e-table-header-utils.h"
+
+#include "e-table-header-item.h"
#include "add-col.xpm"
#include "remove-col.xpm"
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index cf99e8ecba..de5e00549c 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -23,20 +23,17 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include "e-table-header-utils.h"
#include <string.h> /* strlen() */
#include <glib.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkwindow.h>
-#include "e-table-defines.h"
-#include <gal/widgets/e-unicode.h>
-
+#include <gtk/gtk.h>
+
+#include "gal/widgets/e-unicode.h"
+
+#include "e-table-defines.h"
+#include "e-table-header-utils.h"
static PangoLayout*
build_header_layout (GtkWidget *widget, const char *str)
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index d810d61bd1..0dac60d73a 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -23,14 +23,17 @@
*/
#include <config.h>
+
#include <string.h>
+
#include <glib-object.h>
-#include <gtk/gtkimage.h>
-#include <gal/util/e-util.h>
-#include "e-table-header.h"
-#include "e-table-defines.h"
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
+#include "e-table-defines.h"
+#include "e-table-header.h"
+
/* The arguments we take */
enum {
PROP_0,
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 33798cc716..87ca7432dc 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -28,27 +28,25 @@
*/
#include <config.h>
-#include "e-table-item.h"
-
-#include <X11/Xlib.h>
-
#include <math.h>
#include <stdio.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkmain.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#include "e-table-subset.h"
-#include "e-cell.h"
+
#include "gal/a11y/e-table/gal-a11y-e-table-item-factory.h"
-#include "gal/widgets/e-hsv-utils.h"
-#include "gal/widgets/e-canvas.h"
-#include "gal/widgets/e-canvas-utils.h"
-#include "gal/util/e-util.h"
#include "gal/a11y/e-table/gal-a11y-e-table-item.h"
#include "gal/util/e-i18n.h"
-#include <string.h>
-#include <stdlib.h>
-#include <atk/atk.h>
+#include "gal/util/e-util.h"
+#include "gal/widgets/e-canvas.h"
+#include "gal/widgets/e-canvas-utils.h"
+#include "gal/widgets/e-hsv-utils.h"
+
+#include "e-cell.h"
+#include "e-table-item.h"
+#include "e-table-subset.h"
#define PARENT_OBJECT_TYPE gnome_canvas_item_get_type ()
@@ -202,7 +200,7 @@ eti_grab (ETableItem *eti, guint32 time)
| GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK,
NULL, time,
grab_cancelled,
- eti) != GrabSuccess) {
+ eti) != GDK_GRAB_SUCCESS) {
d(g_print ("%s: gtk_grab_add\n", __FUNCTION__));
gtk_grab_add (GTK_WIDGET (item->canvas));
eti->gtk_grabbed = TRUE;
diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c
index 6cd1b9c8a1..f5803366b5 100644
--- a/widgets/table/e-table-memory-callbacks.c
+++ b/widgets/table/e-table-memory-callbacks.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include "e-table-memory-callbacks.h"
+
#include "gal/util/e-util.h"
+#include "e-table-memory-callbacks.h"
+
static int
etmc_column_count (ETableModel *etm)
{
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 69765b32ab..bd29ef8d48 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -22,10 +22,13 @@
*/
#include <config.h>
+
#include <string.h>
-#include "e-table-memory-store.h"
+
#include "gal/util/e-util.h"
+#include "e-table-memory-store.h"
+
#define STORE_LOCATOR(etms, col, row) (*((etms)->priv->store + (row) * (etms)->priv->col_count + (col)))
static ETableMemoryClass *parent_class;
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index 7d9958bbd6..62f7850eca 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -23,20 +23,20 @@
#include <config.h>
-#include "e-table-memory.h"
-
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
+#include <string.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
-#include <string.h>
+
+#include "e-table-memory.h"
static ETableModel *parent_class;
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 67c443c8c6..b2291fb171 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -22,10 +22,13 @@
*/
#include <config.h>
+
#include <glib-object.h>
-#include "e-table-model.h"
-#include "gal/util/e-util.h"
+
#include "gal/util/e-marshal.h"
+#include "gal/util/e-util.h"
+
+#include "e-table-model.h"
#define ETM_CLASS(e) (E_TABLE_MODEL_GET_CLASS (e))
#define ETM_FROZEN(e) (GPOINTER_TO_INT (g_object_get_data (G_OBJECT(e), "frozen")) != 0)
diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c
index 486f14862f..2d71a6e505 100644
--- a/widgets/table/e-table-one.c
+++ b/widgets/table/e-table-one.c
@@ -22,9 +22,11 @@
*/
#include <config.h>
-#include "e-table-one.h"
+
#include "gal/util/e-util.h"
+#include "e-table-one.h"
+
static ETableModelClass *parent_class = NULL;
static int
diff --git a/widgets/table/e-table-scrolled.c b/widgets/table/e-table-scrolled.c
index 1786148c78..548fafa90f 100644
--- a/widgets/table/e-table-scrolled.c
+++ b/widgets/table/e-table-scrolled.c
@@ -22,18 +22,20 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <stdio.h>
+
#include <libgnomecanvas/gnome-canvas.h>
-#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
+#include "gal/util/e-i18n.h"
+
#include "e-table.h"
#include "e-table-scrolled.h"
-#include "gal/util/e-i18n.h"
#define COLUMN_HEADER_HEIGHT 16
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index c0460e4524..d49f993d08 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -22,11 +22,13 @@
*/
#include <config.h>
-#include "e-table-search.h"
-#include "gal/util/e-util.h"
#include <string.h>
+#include "gal/util/e-util.h"
+
+#include "e-table-search.h"
+
#define d(x)
d(static gint depth = 0);
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 14edf3d6de..521e8eb413 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -22,14 +22,16 @@
*/
#include <config.h>
-#include "e-table-selection-model.h"
#include <string.h>
+
#include <gdk/gdkkeysyms.h>
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
+#include "e-table-selection-model.h"
+
#define PARENT_TYPE e_selection_model_array_get_type ()
static ESelectionModelArray *parent_class;
diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c
index b7cf8f66be..53ef4abe43 100644
--- a/widgets/table/e-table-simple.c
+++ b/widgets/table/e-table-simple.c
@@ -23,9 +23,11 @@
*/
#include <config.h>
-#include "e-table-simple.h"
+
#include "gal/util/e-util.h"
+#include "e-table-simple.h"
+
static int
simple_column_count (ETableModel *etm)
{
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index ba8f9050ab..d37cb2bf91 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -23,11 +23,12 @@
#include <config.h>
-#include "e-table-sort-info.h"
+#include <string.h>
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
-#include <string.h>
+
+#include "e-table-sort-info.h"
#define ETM_CLASS(e) (E_TABLE_SORT_INFO_GET_CLASS (e))
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index ac3a7d5067..5b3237ae42 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "gal/util/e-util.h"
+
#include "e-table-sorted-variable.h"
#include "e-table-sorting-utils.h"
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index a5b5acb8cf..462045b563 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "gal/util/e-util.h"
+
#include "e-table-sorted.h"
#include "e-table-sorting-utils.h"
diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c
index a92af49f4d..a38647a48a 100644
--- a/widgets/table/e-table-sorter.c
+++ b/widgets/table/e-table-sorter.c
@@ -22,10 +22,13 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
+
#include "e-table-sorter.h"
#define d(x)
diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c
index 80a9564a36..9a7a1f9b26 100644
--- a/widgets/table/e-table-sorting-utils.c
+++ b/widgets/table/e-table-sorting-utils.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <string.h>
-#include <e-table-sorting-utils.h>
-#include <gal/util/e-util.h>
+
+#include "gal/util/e-util.h"
+
+#include "e-table-sorting-utils.h"
#define d(x)
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index 3fcc28689d..31a58e5401 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -21,20 +21,21 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include "e-table-specification.h"
#include <stdlib.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
+
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
+#include "e-table-specification.h"
+
static GObjectClass *etsp_parent_class;
static void
@@ -133,7 +134,15 @@ e_table_specification_load_from_file (ETableSpecification *specification,
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
return FALSE;
+#ifdef G_OS_WIN32
+ {
+ gchar *locale_filename = gnome_win32_locale_filename_from_utf8 (filename);
+ doc = xmlParseFile (locale_filename);
+ g_free (locale_filename);
+ }
+#else
doc = xmlParseFile (filename);
+#endif
if (doc) {
xmlNode *node = xmlDocGetRootElement (doc);
e_table_specification_load_from_node (specification, node);
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c
index c66e5933e0..fe581af0bd 100644
--- a/widgets/table/e-table-state.c
+++ b/widgets/table/e-table-state.c
@@ -21,19 +21,18 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <stdlib.h>
#include <string.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
+
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
-#include "e-table-state.h"
+#include "e-table-state.h"
#define STATE_VERSION 0.1
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index efe6529806..6cc28e540b 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "gal/util/e-util.h"
+
#include "e-table-subset-variable.h"
#define ETSSV_CLASS(e) (E_TABLE_SUBSET_VARIABLE_GET_CLASS (e))
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index a237ba2d94..200dec6d9a 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -23,8 +23,11 @@
*/
#include <config.h>
+
#include <stdlib.h>
+
#include "gal/util/e-util.h"
+
#include "e-table-subset.h"
static void etss_proxy_model_pre_change_real (ETableSubset *etss, ETableModel *etm);
diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c
index eec4fc79d5..af4e32de33 100644
--- a/widgets/table/e-table-utils.c
+++ b/widgets/table/e-table-utils.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
-#include "gal/util/e-i18n.h"
+
+#include <libintl.h> /* This file uses dgettext() but no _() */
+
#include "gal/util/e-util.h"
#include "gal/widgets/e-unicode.h"
+
#include "e-table-utils.h"
#include "e-table-header-utils.h"
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index e49076be0f..8fb12844b1 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "gal/util/e-util.h"
+
#include "e-table-without.h"
#define PARENT_TYPE E_TABLE_SUBSET_TYPE
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 3a849fbf26..e604657abf 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -22,41 +22,36 @@
* 02111-1307, USA.
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <gdk/gdk.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
+#include "gal/a11y/e-table/gal-a11y-e-table.h"
#include "gal/util/e-i18n.h"
#include "gal/util/e-util.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-background.h"
#include "gal/widgets/e-canvas-vbox.h"
#include "gal/widgets/e-unicode.h"
+
#include "e-table.h"
+#include "e-table-click-to-add.h"
+#include "e-table-column-specification.h"
+#include "e-table-group-leaf.h"
#include "e-table-header-item.h"
#include "e-table-header-utils.h"
#include "e-table-subset.h"
-#include "e-table-item.h"
-#include "e-table-group.h"
-#include "e-table-group-leaf.h"
-#include "e-table-click-to-add.h"
-#include "e-table-specification.h"
-#include "e-table-state.h"
-#include "e-table-column-specification.h"
-
#include "e-table-utils.h"
-#include <atk/atk.h>
-#include "gal/a11y/e-table/gal-a11y-e-table.h"
#define COLUMN_HEADER_HEIGHT 16
@@ -1946,7 +1941,15 @@ e_table_load_specification (ETable *e_table, gchar *filename)
g_return_val_if_fail(filename != NULL, -1);
/* doesn't work yet, yay */
+#ifdef G_OS_WIN32
+ {
+ gchar *locale_filename = gnome_win32_locale_filename_from_utf8 (filename);
+ xmlSpec = xmlParseFile (locale_filename);
+ g_free (locale_filename);
+ }
+#else
xmlSpec = xmlParseFile (filename);
+#endif
ret = et_real_set_specification(e_table, xmlSpec);
xmlFreeDoc (xmlSpec);
diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c
index b6fe3fc375..72212116ef 100644
--- a/widgets/table/e-tree-memory-callbacks.c
+++ b/widgets/table/e-tree-memory-callbacks.c
@@ -22,8 +22,11 @@
*/
#include <config.h>
-#include <gtk/gtksignal.h>
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
+
#include "e-tree-memory-callbacks.h"
#define PARENT_TYPE E_TREE_MEMORY_TYPE
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 3f178455df..554e308def 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -35,6 +35,7 @@
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
+
#include "e-tree-memory.h"
#define TREEPATH_CHUNK_AREA_SIZE (30 * sizeof (ETreeMemoryPath))
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 6ca0e17af9..32a890daae 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -25,17 +25,17 @@
#include <config.h>
#include <stdio.h>
-#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
+#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
-#include <gtk/gtksignal.h>
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
+
#include "e-tree-model.h"
#define ETM_CLASS(e) (E_TREE_MODEL_GET_CLASS(e))
diff --git a/widgets/table/e-tree-scrolled.c b/widgets/table/e-tree-scrolled.c
index a72a246b69..8d9857058f 100644
--- a/widgets/table/e-tree-scrolled.c
+++ b/widgets/table/e-tree-scrolled.c
@@ -22,16 +22,18 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <stdio.h>
+
#include <libgnomecanvas/gnome-canvas.h>
-#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
-#include <gal/util/e-util.h>
-#include <gal/util/e-i18n.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
#include "e-tree-scrolled.h"
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 6d45b6257c..bc781daad5 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -23,11 +23,12 @@
*/
#include <config.h>
+
+#include "gal/e-table/e-tree-table-adapter.h"
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+
#include "e-tree-selection-model.h"
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-util.h>
-#include <gdk/gdkkeysyms.h>
-#include <gal/e-table/e-tree-table-adapter.h>
#define PARENT_TYPE e_selection_model_get_type ()
diff --git a/widgets/table/e-tree-simple.c b/widgets/table/e-tree-simple.c
index e8dff1e05a..be7f09fa45 100644
--- a/widgets/table/e-tree-simple.c
+++ b/widgets/table/e-tree-simple.c
@@ -22,7 +22,9 @@
*/
#include <config.h>
+
#include "gal/util/e-util.h"
+
#include "e-tree-simple.h"
static int
diff --git a/widgets/table/e-tree-sorted-variable.c b/widgets/table/e-tree-sorted-variable.c
index bb73b8b776..9943c9d7ea 100644
--- a/widgets/table/e-tree-sorted-variable.c
+++ b/widgets/table/e-tree-sorted-variable.c
@@ -22,9 +22,12 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
+
#include "gal/util/e-util.h"
+
#include "e-tree-sorted-variable.h"
#define d(x)
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index 20ecdad63f..6854bd445c 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -26,11 +26,8 @@
/* FIXME: Overall e-tree-sorted.c needs to be made more efficient. */
-
#include <config.h>
-#include "e-tree-sorted.h"
-
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
@@ -43,7 +40,9 @@
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
+
#include "e-table-sorting-utils.h"
+#include "e-tree-sorted.h"
/* maximum insertions between an idle event that we will do without scheduling an idle sort */
#define ETS_INSERT_MAX (4)
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index e1bda25eba..6b2f0fefd8 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -22,20 +22,21 @@
* 02111-1307, USA.
*/
-
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <stdlib.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
+
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
-#include "e-tree-table-adapter.h"
+
#include "e-table-sorting-utils.h"
+#include "e-tree-table-adapter.h"
#define PARENT_TYPE E_TABLE_MODEL_TYPE
#define d(x)
@@ -928,7 +929,16 @@ open_file (ETreeTableAdapter *etta, const char *filename)
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
return NULL;
+#ifdef G_OS_WIN32
+ {
+ gchar *locale_filename = gnome_win32_locale_filename_from_utf8 (filename);
+ doc = xmlParseFile (locale_filename);
+ g_free (locale_filename);
+ }
+#else
doc = xmlParseFile (filename);
+#endif
+
if (!doc)
return NULL;
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index fa3dafa2fa..718444bb2b 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -22,39 +22,35 @@
*/
#include <config.h>
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <stdio.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <atk/atkregistry.h>
-
-#include <gal/util/e-i18n.h>
-#include <gal/util/e-util.h>
-#include <gal/util/e-marshal.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-canvas-background.h>
-
-#include <gal/e-table/e-table-column-specification.h>
-#include <gal/e-table/e-table-header-item.h>
-#include <gal/e-table/e-table-header.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-table-sort-info.h>
-#include <gal/e-table/e-table-utils.h>
+#include "gal/a11y/e-table/gal-a11y-e-tree.h"
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
+#include "gal/util/e-marshal.h"
+#include "gal/widgets/e-canvas.h"
+#include "gal/widgets/e-canvas-background.h"
+
+#include "e-table-column-specification.h"
+#include "e-table-header-item.h"
+#include "e-table-header.h"
+#include "e-table-item.h"
+#include "e-table-sort-info.h"
+#include "e-table-utils.h"
#ifdef E_TREE_USE_TREE_SELECTION
-#include <gal/e-table/e-tree-selection-model.h>
+#include "e-tree-selection-model.h"
#else
-#include <gal/e-table/e-table-selection-model.h>
+#include "e-table-selection-model.h"
#endif
-
-#include <gal/e-table/e-tree-table-adapter.h>
-
#include "e-tree.h"
-#include "gal/util/e-marshal.h"
-#include "gal/a11y/e-table/gal-a11y-e-tree.h"
+#include "e-tree-table-adapter.h"
#define COLUMN_HEADER_HEIGHT 16
diff --git a/widgets/table/table-test.c b/widgets/table/table-test.c
index fe211e9d21..c087161458 100644
--- a/widgets/table/table-test.c
+++ b/widgets/table/table-test.c
@@ -22,11 +22,15 @@
*/
#include <config.h>
+
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
+
#include <gnome.h>
+
#include "gal/widgets/e-cursors.h"
+
#include "table-test.h"
int
diff --git a/widgets/table/test-check.c b/widgets/table/test-check.c
index 7fe4c126e6..237566ab27 100644
--- a/widgets/table/test-check.c
+++ b/widgets/table/test-check.c
@@ -22,17 +22,21 @@
*/
#include <config.h>
+
#include <stdio.h>
#include <string.h>
+
#include <gnome.h>
-#include "e-table-simple.h"
-#include "e-table-header.h"
-#include "e-table-header-item.h"
-#include "e-table-item.h"
+
#include "gal/widgets/e-cursors.h"
#include "gal/widgets/e-canvas-utils.h"
#include "gal/widgets/e-canvas.h"
#include "gal/util/e-util.h"
+
+#include "e-table-simple.h"
+#include "e-table-header.h"
+#include "e-table-header-item.h"
+#include "e-table-item.h"
#include "e-cell-text.h"
#include "e-cell-checkbox.h"
diff --git a/widgets/table/test-cols.c b/widgets/table/test-cols.c
index e4873633e5..70fa9d9534 100644
--- a/widgets/table/test-cols.c
+++ b/widgets/table/test-cols.c
@@ -22,13 +22,17 @@
*/
#include <config.h>
+
#include <stdio.h>
#include <string.h>
+
#include <gnome.h>
+
#include "gal/widgets/e-canvas-utils.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-cursors.h"
#include "gal/util/e-util.h"
+
#include "e-table-simple.h"
#include "e-table-header.h"
#include "e-table-header-item.h"
diff --git a/widgets/table/test-table.c b/widgets/table/test-table.c
index b44b62bf42..510f6ef2c8 100644
--- a/widgets/table/test-table.c
+++ b/widgets/table/test-table.c
@@ -22,11 +22,15 @@
*/
#include <config.h>
+
#include <stdio.h>
#include <string.h>
+
#include <gnome.h>
+
#include "gal/widgets/e-cursors.h"
#include "gal/widgets/e-canvas.h"
+
#include "e-table-simple.h"
#include "e-table-header.h"
#include "e-table-header-item.h"
@@ -37,8 +41,6 @@
#include "table-test.h"
-
-
char buffer [1024];
char **column_labels;
char ***table_data;
diff --git a/widgets/text/e-completion-callbacks.c b/widgets/text/e-completion-callbacks.c
index bccc400fab..a7c3c48d97 100644
--- a/widgets/text/e-completion-callbacks.c
+++ b/widgets/text/e-completion-callbacks.c
@@ -22,10 +22,14 @@
*/
#include <config.h>
+
#include <string.h>
#include <stdio.h>
+
#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
+
#include "e-completion-callbacks.h"
static void e_completion_callbacks_class_init (ECompletionCallbacksClass *klass);
diff --git a/widgets/text/e-completion-match.c b/widgets/text/e-completion-match.c
index d13ba15973..180a16e657 100644
--- a/widgets/text/e-completion-match.c
+++ b/widgets/text/e-completion-match.c
@@ -22,8 +22,11 @@
*/
#include <config.h>
+
#include <string.h>
-#include <gal/widgets/e-unicode.h>
+
+#include "gal/widgets/e-unicode.h"
+
#include "e-completion-match.h"
static void
diff --git a/widgets/text/e-completion-view.c b/widgets/text/e-completion-view.c
index f9728de60c..13c9ca2860 100644
--- a/widgets/text/e-completion-view.c
+++ b/widgets/text/e-completion-view.c
@@ -24,15 +24,17 @@
#include <config.h>
-#include "e-completion-view.h"
-
#include <math.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gal/e-table/e-table-simple.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/util/e-i18n.h>
+
+#include "gal/e-table/e-table-scrolled.h"
+#include "gal/e-table/e-table-simple.h"
+#include "gal/util/e-i18n.h"
#include "gal/util/e-marshal.h"
+#include "e-completion-view.h"
+
enum {
E_COMPLETION_VIEW_NONEMPTY,
E_COMPLETION_VIEW_ADDED,
diff --git a/widgets/text/e-completion.c b/widgets/text/e-completion.c
index 6e455cb619..5146170ccc 100644
--- a/widgets/text/e-completion.c
+++ b/widgets/text/e-completion.c
@@ -23,12 +23,16 @@
*/
#include <config.h>
+
#include <string.h>
#include <stdio.h>
+
#include <gtk/gtk.h>
-#include "e-completion.h"
-#include "gal/util/e-util.h"
+
#include "gal/util/e-marshal.h"
+#include "gal/util/e-util.h"
+
+#include "e-completion.h"
enum {
COMPLETION_STARTED,
diff --git a/widgets/text/e-entry-test.c b/widgets/text/e-entry-test.c
index d30ba20a9f..c5e5687396 100644
--- a/widgets/text/e-entry-test.c
+++ b/widgets/text/e-entry-test.c
@@ -24,8 +24,11 @@
#include <config.h>
#include <gnome.h>
+
+#include "gal/util/e-i18n.h"
+#include "gal/util/e-util-private.h"
+
#include "e-entry.h"
-#include <gal/util/e-i18n.h>
static void destroy_callback(gpointer data, GObject *where_object_was)
{
@@ -57,7 +60,7 @@ int main( int argc, char *argv[] )
GtkWidget *app;
GtkWidget *entry;
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ /* bindtextdomain (PACKAGE, GAL_LOCALEDIR);
textdomain (PACKAGE);*/
gnome_init( "EEntry Test", VERSION, argc, argv);
diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c
index f66a066921..8b41d952f0 100644
--- a/widgets/text/e-entry.c
+++ b/widgets/text/e-entry.c
@@ -23,24 +23,27 @@
*/
#include <config.h>
+
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
+
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktypebuiltins.h>
+#include <gtk/gtk.h>
#include <libxml/parser.h>
#include <libgnomecanvas/gnome-canvas.h>
-#include "gal/util/e-util.h"
+
#include "gal/util/e-i18n.h"
+#include "gal/util/e-util.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-utils.h"
+
#include "e-completion-view.h"
-#include "e-text.h"
#include "e-entry.h"
+#include "e-text.h"
#define MIN_ENTRY_WIDTH 150
#define INNER_BORDER 2
diff --git a/widgets/text/e-table-text-model.c b/widgets/text/e-table-text-model.c
index 909a982528..ba71bcf002 100644
--- a/widgets/text/e-table-text-model.c
+++ b/widgets/text/e-table-text-model.c
@@ -22,9 +22,13 @@
*/
#include <config.h>
+
#include <ctype.h>
-#include <gtk/gtksignal.h>
-#include <gal/util/e-util.h>
+
+#include <gtk/gtk.h>
+
+#include "gal/util/e-util.h"
+
#include "e-table-text-model.h"
static void e_table_text_model_class_init (ETableTextModelClass *class);
diff --git a/widgets/text/e-text-model-test.c b/widgets/text/e-text-model-test.c
index 4913b7774e..1fec3a182d 100644
--- a/widgets/text/e-text-model-test.c
+++ b/widgets/text/e-text-model-test.c
@@ -22,11 +22,13 @@
*/
#include <gnome.h>
-#include <gal/widgets/e-canvas.h>
+
+#include "gal/util/e-util.h"
+#include "gal/widgets/e-canvas.h"
+
#include "e-text-model.h"
#include "e-text-model-uri.h"
#include "e-text.h"
-#include <gal/util/e-util.h>
#if 0
static void
diff --git a/widgets/text/e-text-model-uri.c b/widgets/text/e-text-model-uri.c
index 858771b481..d919b8cc94 100644
--- a/widgets/text/e-text-model-uri.c
+++ b/widgets/text/e-text-model-uri.c
@@ -23,14 +23,16 @@
#include <config.h>
-#include "e-text-model-uri.h"
-
#include <ctype.h>
#include <sys/types.h>
#include <regex.h>
+
#include <gtk/gtkmain.h>
#include <libgnome/gnome-url.h>
-#include <gal/util/e-util.h>
+
+#include "gal/util/e-util.h"
+
+#include "e-text-model-uri.h"
static void e_text_model_uri_class_init (ETextModelURIClass *class);
static void e_text_model_uri_init (ETextModelURI *model);
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index ed6be10672..72562eaa49 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -24,14 +24,17 @@
#undef PARANOID_DEBUGGING
#include <config.h>
+
#include <ctype.h>
#include <string.h>
-#include <gtk/gtksignal.h>
-#include <gal/util/e-util.h>
-#include "e-text-model-repos.h"
-#include "e-text-model.h"
+
+#include <gtk/gtk.h>
+
#include "gal/util/e-util.h"
+#include "e-text-model.h"
+#include "e-text-model-repos.h"
+
enum {
E_TEXT_MODEL_CHANGED,
E_TEXT_MODEL_REPOSITION,
diff --git a/widgets/text/e-text-test.c b/widgets/text/e-text-test.c
index d10a745d85..2c9a8c2dec 100644
--- a/widgets/text/e-text-test.c
+++ b/widgets/text/e-text-test.c
@@ -21,11 +21,13 @@
* 02111-1307, USA.
*/
-#include "e-text.h"
#include <gnome.h>
+
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-unicode.h"
+#include "e-text.h"
+
GnomeCanvasItem *rect;
static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, GnomeCanvasItem *item)
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 8bf0ffcfc1..7bafb5d58c 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -36,39 +36,27 @@
#include <config.h>
-#include "e-text.h"
-
#include <math.h>
#include <ctype.h>
#include <string.h>
+
#include <glib-object.h>
-#include <gdk/gdkx.h> /* for BlackPixel */
#include <gdk/gdkkeysyms.h>
-#include <gtk/gtkclipboard.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkselection.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkwindow.h>
-#include <gtk/gtktypebuiltins.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkimagemenuitem.h>
-#include <gtk/gtkimmulticontext.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkseparatormenuitem.h>
+#include <gtk/gtk.h>
#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <libgnome/gnome-i18n.h>
-#include "gal/util/e-util.h"
+#include <libart_lgpl/art_affine.h>
+#include <libart_lgpl/art_rgb.h>
+#include <libart_lgpl/art_rgb_bitmap_affine.h>
+
+#include "gal/a11y/e-text/gal-a11y-e-text.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-utils.h"
#include "gal/widgets/e-unicode.h"
+#include "gal/util/e-i18n.h"
#include "gal/util/e-text-event-processor-emacs-like.h"
#include "gal/util/e-util.h"
-#include <libart_lgpl/art_affine.h>
-#include <libart_lgpl/art_rgb.h>
-#include <libart_lgpl/art_rgb_bitmap_affine.h>
-#include <atk/atk.h>
-#include "gal/a11y/e-text/gal-a11y-e-text.h"
+#include "e-text.h"
#define PARENT_TYPE (gnome_canvas_item_get_type())