forked from AuroraMiddleware/gtk
applied the undisputable and required [due to recent gtkfilesystem
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)
This commit is contained in:
parent
3483a90d40
commit
f0afa3a497
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
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
|
||||
|
@ -1,3 +1,16 @@
|
||||
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
|
||||
|
@ -1,3 +1,16 @@
|
||||
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
|
||||
|
@ -1,3 +1,16 @@
|
||||
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
|
||||
|
@ -1,3 +1,16 @@
|
||||
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
|
||||
|
@ -1685,23 +1685,25 @@ handle_configure_event (MSG *msg,
|
||||
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;
|
||||
@ -2980,23 +2982,25 @@ gdk_event_translate (GdkDisplay *display,
|
||||
!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;
|
||||
|
@ -40,7 +40,7 @@
|
||||
#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;
|
||||
@ -305,10 +305,10 @@ gtk_file_system_win32_list_volumes (GtkFileSystem *file_system)
|
||||
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);
|
||||
@ -328,9 +328,9 @@ gtk_file_system_win32_get_volume_for_path (GtkFileSystem *file_system,
|
||||
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;
|
||||
}
|
||||
@ -423,15 +423,35 @@ gtk_file_system_win32_volume_get_display_name (GtkFileSystem *file_system,
|
||||
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;
|
||||
}
|
||||
@ -1095,6 +1115,16 @@ gtk_file_folder_win32_get_info (GtkFileFolder *folder,
|
||||
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);
|
||||
|
||||
@ -1291,6 +1321,6 @@ filename_is_root (const char *filename)
|
||||
/* accept both forms */
|
||||
|
||||
return ( (len == 2 && filename[1] == ':')
|
||||
|| (len == 3 && filename[1] == ':' && filename[2] == '\\'));
|
||||
|| (len == 3 && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user