+#ifdef __CYGWIN32__
+/*
+ * Take the path currently in the file selection
+ * entry field and translate as necessary from
+ * a WIN32 style to CYGWIN32 style path. For
+ * instance translate:
+ * x:\somepath\file.jpg
+ * to:
+ * //x/somepath/file.jpg
+ *
+ * Replace the path in the selection text field.
+ * Return a boolean value concerning whether a
+ * translation had to be made.
+ */
+int
+translate_win32_path(GtkFileSelection *filesel)
+{
+ int updated = 0;
+ gchar *path;
+
+ /*
+ * Retrieve the current path
+ */
+ path = gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry));
+
+ /*
+ * Translate only if this looks like a DOS-ish
+ * path... First handle any drive letters.
+ */
+ if (isalpha(path[0]) && (path[1] == ':')) {
+ /*
+ * This part kind of stinks... It isn't possible
+ * to know if there is enough space in the current
+ * string for the extra character required in this
+ * conversion. Assume that there isn't enough space
+ * and use the set function on the text field to
+ * set the newly created string.
+ */
+ gchar *newPath;
+
+ newPath = g_malloc(strlen(path) + 2);
+ sprintf(newPath, "//%c/%s", path[0], (path + 3));
+ gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), newPath);
+
+ path = newPath;
+ updated = 1;
+ }
+
+ /*
+ * Now, replace backslashes with forward slashes
+ * if necessary.
+ */
+ if (strchr(path, '\\')) {
+ int index;
+ for (index = 0; path[index] != '\0'; index++)
+ if (path[index] == '\\')
+ path[index] = '/';
+
+ updated = 1;
+ }
+
+ return updated;
+}
+#endif
+
+GtkType
+gtk_file_selection_get_type (void)