Commit 8dcf7d1d authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

remove the disputable memset at the end of gdk_pixmap_new() - on X11 the

2004-11-30  Hans Breuer  <hans@breuer.org>

	* gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
	the end of gdk_pixmap_new() - on X11 the bits are not initialized
	either - fixes bug #145107

	* gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
	when drives are plugged in or removed. Fixes bug #137815
parent 35a3099e
2004-11-30 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
the end of gdk_pixmap_new() - on X11 the bits are not initialized
either - fixes bug #145107
* gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
when drives are plugged in or removed. Fixes bug #137815
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
......
2004-11-30 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
the end of gdk_pixmap_new() - on X11 the bits are not initialized
either - fixes bug #145107
* gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
when drives are plugged in or removed. Fixes bug #137815
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
......
2004-11-30 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
the end of gdk_pixmap_new() - on X11 the bits are not initialized
either - fixes bug #145107
* gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
when drives are plugged in or removed. Fixes bug #137815
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
......
2004-11-30 Hans Breuer <hans@breuer.org>
* gdk/win32/gdkpixmap-win32.c : remove the disputable memset at
the end of gdk_pixmap_new() - on X11 the bits are not initialized
either - fixes bug #145107
* gtk/gtkfilesystemwin32.c : add an idle handler to emit "volumes-changed"
when drives are plugged in or removed. Fixes bug #137815
2004-11-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreesortable.c (gtk_tree_sortable_get_sort_column_id): Update
......
......@@ -304,8 +304,6 @@ gdk_pixmap_new (GdkDrawable *drawable,
}
drawable_impl->handle = hbitmap;
/* initialize */
memset (bits, 0, (bmi.bmiHeader.biBitCount * width * height) / 8);
pixmap_impl->bits = bits;
gdk_win32_handle_table_insert (&GDK_PIXMAP_HBITMAP (pixmap), pixmap);
......
......@@ -64,6 +64,7 @@ struct _GtkFileSystemWin32
{
GObject parent_instance;
guint32 drives; /* bitmask as returned by GetLogicalDrives() */
GHashTable *folder_hash;
};
......@@ -303,15 +304,33 @@ gtk_file_system_win32_finalize (GObject *object)
system_parent_class->finalize (object);
}
static gboolean
check_volumes (gpointer data)
{
GtkFileSystemWin32 *fs_win32 = GTK_FILE_SYSTEM_WIN32 (data);
g_return_val_if_fail (fs_win32, FALSE);
if (fs_win32->drives != GetLogicalDrives())
g_signal_emit_by_name (fs_win32, "volumes-changed", 0);
return TRUE;
}
static GSList *
gtk_file_system_win32_list_volumes (GtkFileSystem *file_system)
{
DWORD drives;
gchar drive[4] = "A:\\";
GSList *list = NULL;
GtkFileSystemWin32 *fs_win32 = (GtkFileSystemWin32 *)file_system;
drives = GetLogicalDrives();
fs_win32->drives = drives;
/* set up an idle handler for volume changes, every second should be enough */
g_timeout_add_full (0, 1000, check_volumes, fs_win32, NULL);
if (!drives)
g_warning ("GetLogicalDrives failed.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment