+2004-03-20 Hans Breuer <hans@breuer.org>
+
+ * gtk/gtkfilesystemwin32.c : applied the undisputable and
+ required [due to recent gtkfilesystem internal api semantic
+ changes] part of patches to fix bug #137543 (Tor Lillqvist,
+ J. Ali Harlow)
+
+ * gdk/gdkevents-win32.c (handle_configure_event) :
+ (gdk_event_translate), WM_WINDOWPOSCHANGED : initialize
+ GdkWindowObject::x, y with screen coords to make
+ gdk_window_get_position () return the right thing and thus fix
+ drag and drop positioning (e.g. Gimp tabs, fixes bug #137192)
+
2004-03-19 Federico Mena Quintero <federico@ximian.com>
* Revert the patch to #137520, as 2.4.1 is for conservative bug
+2004-03-20 Hans Breuer <hans@breuer.org>
+
+ * gtk/gtkfilesystemwin32.c : applied the undisputable and
+ required [due to recent gtkfilesystem internal api semantic
+ changes] part of patches to fix bug #137543 (Tor Lillqvist,
+ J. Ali Harlow)
+
+ * gdk/gdkevents-win32.c (handle_configure_event) :
+ (gdk_event_translate), WM_WINDOWPOSCHANGED : initialize
+ GdkWindowObject::x, y with screen coords to make
+ gdk_window_get_position () return the right thing and thus fix
+ drag and drop positioning (e.g. Gimp tabs, fixes bug #137192)
+
2004-03-19 Federico Mena Quintero <federico@ximian.com>
* Revert the patch to #137520, as 2.4.1 is for conservative bug
+2004-03-20 Hans Breuer <hans@breuer.org>
+
+ * gtk/gtkfilesystemwin32.c : applied the undisputable and
+ required [due to recent gtkfilesystem internal api semantic
+ changes] part of patches to fix bug #137543 (Tor Lillqvist,
+ J. Ali Harlow)
+
+ * gdk/gdkevents-win32.c (handle_configure_event) :
+ (gdk_event_translate), WM_WINDOWPOSCHANGED : initialize
+ GdkWindowObject::x, y with screen coords to make
+ gdk_window_get_position () return the right thing and thus fix
+ drag and drop positioning (e.g. Gimp tabs, fixes bug #137192)
+
2004-03-19 Federico Mena Quintero <federico@ximian.com>
* Revert the patch to #137520, as 2.4.1 is for conservative bug
+2004-03-20 Hans Breuer <hans@breuer.org>
+
+ * gtk/gtkfilesystemwin32.c : applied the undisputable and
+ required [due to recent gtkfilesystem internal api semantic
+ changes] part of patches to fix bug #137543 (Tor Lillqvist,
+ J. Ali Harlow)
+
+ * gdk/gdkevents-win32.c (handle_configure_event) :
+ (gdk_event_translate), WM_WINDOWPOSCHANGED : initialize
+ GdkWindowObject::x, y with screen coords to make
+ gdk_window_get_position () return the right thing and thus fix
+ drag and drop positioning (e.g. Gimp tabs, fixes bug #137192)
+
2004-03-19 Federico Mena Quintero <federico@ximian.com>
* Revert the patch to #137520, as 2.4.1 is for conservative bug
+2004-03-20 Hans Breuer <hans@breuer.org>
+
+ * gtk/gtkfilesystemwin32.c : applied the undisputable and
+ required [due to recent gtkfilesystem internal api semantic
+ changes] part of patches to fix bug #137543 (Tor Lillqvist,
+ J. Ali Harlow)
+
+ * gdk/gdkevents-win32.c (handle_configure_event) :
+ (gdk_event_translate), WM_WINDOWPOSCHANGED : initialize
+ GdkWindowObject::x, y with screen coords to make
+ gdk_window_get_position () return the right thing and thus fix
+ drag and drop positioning (e.g. Gimp tabs, fixes bug #137192)
+
2004-03-19 Federico Mena Quintero <federico@ximian.com>
* Revert the patch to #137520, as 2.4.1 is for conservative bug
GdkWindow *window)
{
RECT client_rect;
+ POINT point;
GetClientRect (msg->hwnd, &client_rect);
-
+ point.x = client_rect.left; /* always 0 */
+ point.y = client_rect.top;
+ /* top level windows need screen coords */
+ if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
+ ClientToScreen (msg->hwnd, &point);
+
GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->width = client_rect.right - client_rect.left;
GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->height = client_rect.bottom - client_rect.top;
- ((GdkWindowObject *) window)->x = client_rect.left;
- ((GdkWindowObject *) window)->y = client_rect.top;
+ ((GdkWindowObject *) window)->x = point.x;
+ ((GdkWindowObject *) window)->y = point.y;
if (((GdkWindowObject *) window)->event_mask & GDK_STRUCTURE_MASK)
{
- POINT point;
GdkEvent *event = gdk_event_new (GDK_CONFIGURE);
- point.x = point.y = 0;
- ClientToScreen (msg->hwnd, &point);
-
event->configure.window = window;
event->configure.width = client_rect.right - client_rect.left;
!GDK_WINDOW_DESTROYED (window))
{
RECT client_rect;
+ POINT point;
GetClientRect (msg->hwnd, &client_rect);
+ point.x = client_rect.left; /* always 0 */
+ point.y = client_rect.top;
+ /* top level windows need screen coords */
+ if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
+ ClientToScreen (msg->hwnd, &point);
GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->width = client_rect.right - client_rect.left;
GDK_WINDOW_IMPL_WIN32 (((GdkWindowObject *) window)->impl)->height = client_rect.bottom - client_rect.top;
- ((GdkWindowObject *) window)->x = client_rect.left;
- ((GdkWindowObject *) window)->y = client_rect.top;
+ ((GdkWindowObject *) window)->x = point.x;
+ ((GdkWindowObject *) window)->y = point.y;
if (((GdkWindowObject *) window)->event_mask & GDK_STRUCTURE_MASK)
{
- POINT point;
GdkEvent *event = gdk_event_new (GDK_CONFIGURE);
- point.x = point.y = 0;
- ClientToScreen (msg->hwnd, &point);
-
event->configure.window = window;
event->configure.width = client_rect.right - client_rect.left;
#define mkdir(p,m) _mkdir(p)
#include <gdk/win32/gdkwin32.h> /* gdk_win32_hdc_get */
#else
-#error "The implementation is win32 only yet."
+#error "The implementation is win32 only."
#endif /* G_OS_WIN32 */
typedef struct _GtkFileSystemWin32Class GtkFileSystemWin32Class;
if (p[0] == 'a' || p[0] == 'b')
vol->is_mounted = FALSE; /* skip floppy */
else
- vol->is_mounted = TRUE;
+ vol->is_mounted = TRUE; /* handle other removable drives special, too? */
/*FIXME: gtk_file_path_compare() is case sensitive, we are not*/
- p[0] = toupper (p[0]);
+ p[0] = g_ascii_toupper (p[0]);
vol->drive = g_strdup (p);
list = g_slist_append (list, vol);
g_return_val_if_fail (p != NULL, NULL);
/*FIXME: gtk_file_path_compare() is case sensitive, we are not*/
- p[0] = toupper (p[0]);
+ p[0] = g_ascii_toupper (p[0]);
vol->drive = p;
- vol->is_mounted = (p[0] != 'a' && p[0] != 'b');
+ vol->is_mounted = (p[0] != 'A' && p[0] != 'B');
return vol;
}
GtkFileSystemVolume *volume)
{
gchar display_name[80];
+ gunichar2 *wdrive = g_utf8_to_utf16 (volume->drive, -1, NULL, NULL, NULL);
+ gunichar2 wname[80];
- if (GetVolumeInformation (volume->drive,
+ g_return_val_if_fail (wdrive != NULL, NULL);
+
+ if (GetVolumeInformationW (wdrive, wname, sizeof(wname),
+ NULL, NULL, NULL, NULL, 0))
+ {
+ gchar *name = g_utf16_to_utf8 (wname, -1, NULL, NULL, NULL);
+ gchar *real_display_name = g_strconcat (name, " (", volume->drive, ")", NULL);
+
+ g_free (name);
+ g_free (wdrive);
+ GTK_NOTE (MISC, g_print ("Wide volume display name: %s\n", real_display_name));
+
+ return real_display_name;
+ }
+ else if (GetVolumeInformation (volume->drive,
display_name, sizeof(display_name),
NULL, /* serial number */
NULL, /* max. component length */
NULL, /* fs flags */
NULL, 0)) /* fs type like FAT, NTFS */
{
- gchar* real_display_name = g_strconcat (display_name, " (", volume->drive, ")", NULL);
+ gchar *name = g_locale_to_utf8 (display_name, -1, NULL, NULL, NULL);
+ gchar *real_display_name = g_strconcat (name, " (", volume->drive, ")", NULL);
+
+ g_free (name);
+ GTK_NOTE (MISC, g_print ("Locale volume display name: %s\n", real_display_name));
return real_display_name;
}
gchar *dirname;
gchar *filename;
+ if (!path)
+ {
+ g_return_val_if_fail (filename_is_root (folder_win32->filename), NULL);
+
+ /* ??? */
+ info = filename_get_info (folder_win32->filename, folder_win32->types, error);
+
+ return info;
+ }
+
filename = filename_from_path (path);
g_return_val_if_fail (filename != NULL, NULL);
/* accept both forms */
return ( (len == 2 && filename[1] == ':')
- || (len == 3 && filename[1] == ':' && filename[2] == '\\'));
+ || (len == 3 && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')));
}