aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-04-29 22:18:18 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-04-29 22:18:18 +0800
commit2decafb54490e7d5b1c796e5028d271d0fcce57a (patch)
tree91aca07ea71169cc88b85f09bd7f92e0966e2a46 /widgets/misc
parented13004c60129272797415da45cade65bdc859bc (diff)
downloadgsoc2013-evolution-2decafb54490e7d5b1c796e5028d271d0fcce57a.tar.gz
gsoc2013-evolution-2decafb54490e7d5b1c796e5028d271d0fcce57a.tar.zst
gsoc2013-evolution-2decafb54490e7d5b1c796e5028d271d0fcce57a.zip
Port to Windows, initial commit:
2005-04-29 Tor Lillqvist <tml@novell.com> Port to Windows, initial commit: * configure.in: Check for Win32, define Automake conditional OS_WIN32. Check for regexec() perhaps in separate -lregex, define REGEX_LIBS if so. Require glib-2.0 >= 2.6 (and thus also gtk+-2.0 >= 2.6) so that we can use the gstdio wrappers for full support of non-ASCII filenames on Win32. Don't use -D_REENTRANT on Win32, has ne special meaning. * gal.pc.in: Require gtk+-2.0 >= 2.6 also here for consistency. * gal-zip.in: New file, used to build zipfile format distribution of gal for Win32. * configure.in * Makefile.am: Add gal-zip(.in). * */Makefile.am * */*.c: Harmonize -I and #include conventions. (Of course, this hasn't anything to do with Windows porting as such, I just got carried away...) Use only -I$(top_srcdir). Use paths to gal headers staring with "gal", except for headers from the same directory as the .c file, which are included as such. Include all gal headers using doublequotes. Sort #includes and remove duplicates and obvious redundancies. Include config.h first without any HAVE_CONFIG_H, then system headers, then other GNOME lib headers, than gal's own headers. Just include gtk.h instead of separate gtk*.h headers. Don't include gi18n.h, include e-i18n.h to use e_gettext() consistently. * gal/Makefile.am: Use -no-undefined on Win32 so that libtool agrees to build a shared library. Because of the bidirectional dependency between libgal and libgal-a11y we can build libgal-a11y sanely as a shared library on Win32, so we don't install any separate libgal-a11y at all. So, on Win32, link the stuff that goes into libgal-a11y also into libgal. Link with REGEX_LIBS. * gal/a11y/Makefile.am: See above. Just build a dummy static libgal-a11y on Win32 (can't convince Automake not to build the library at all on one platform using Automake ifdef, apparently). Then (this is a gross hack) explicitly remove the library after installation in the install-data-local rule. * gal/e-table/Makefile.am * gal/e-table/e-table-config.c: Rename ETABLE_GLADEDIR to GAL_GLADEDIR for consistency. * gal/e-table/e-cell-date.c: No localtime_r() in Microsoft's C library, but its localtime() *is* thread-safe. * gal/e-table/e-cell-text.c * gal/e-table/e-cell-tree.c * gal/e-table/e-cell-vbox.c * gal/e-text/e-text.c * gal/widgets/e-unicode.c: Remove unnecessary inclusion of gdkx.h. * gal/e-table/e-cell-tree.c (ect_realize): Instead of the Xlib macro None (whose value is zero), use the corresponding zero-valued enums from the appropriate GDK type. * gal/e-table/e-table-config.c * gal/e-table/e-table-field-chooser.c * gal/menus/gal-define-views-dialog.c * gal/menus/gal-view-instance-save-as-dialog.c * gal/menus/gal-view-new-dialog.c * gal/widgets/e-categories-master-list-array.c * gal/widgets/e-categories-master-list-dialog.c * gal/widgets/e-categories.c: Use g_build_filename() to construct pathnames at run-time instead of compile-time. On Windows the macros GAL_GLADEDIR and GAL_IMAGESDIR expand to function calls, in order to support installing in a freely chosen location. * gal/e-table/e-table-item.c * gal/e-table/e-cell-vbox.c: Instrad of the Xlib GrabSuccess, use GDK_GRAB_SUCCESS (which has the same value). * gal/e-table/e-table-specification.c (e_table_specification_load_from_file) * gal/e-table/e-table.c (e_table_load_specification) * gal/e-table/e-tree-table-adapter.c (open_file) * gal/menus/gal-view-instance.c (load_current_view) * gal/menus/gal-view-instance.c (load_current_view): On Win32, convert filename to the locale character set before passing to xmlParseFile() which doesn't use UTF-8 filenames. Use gstdio wrappers. * gal/util/Makefile.am: Define GAL_PREFIX as $prefix. Define GAL_LOCALEDIR, GAL_GLADEDIR and GAL_IMAGESDIR also here for e-win32-reloc.c. Include e-win32-reloc.c on Win32. * gal/util/e-iconv.c (e_iconv_init): Use g_win32_getlocale() on Windows. * gal/util/e-util.c * gal/util/e-xml-utils.c: Use g_mkstemp() instead of non-portable mkstemp(). Use GLib pathname manipulation functions. Use gstdio wrappers. * gal/util/e-util-private.h: New file. Contains just Win32 bits for now that redefine the directory names from the Makefile as functions calls. * gal/util/e-win32-reloc.c: New file. Contains a minimal DllMain() and functions to support freely chosen installation location on Windows. * gal/util/e-xml-utils.c: No fsync() in the Microsoft C library. * gal/windgets/Makefile.am: Add -I$(top_srcdir)/gal for consistency with the sibling Makefile.am files. * gal/widgets/e-canvas.c: Instead of the Xlib AlreadyGrabbed, use GDK_GRAB_ALREADY_GRABBED. svn path=/trunk/; revision=29249
Diffstat (limited to 'widgets/misc')
-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
17 files changed, 95 insertions, 83 deletions
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):