diff options
author | Hans Breuer <hans@breuer.org> | 2004-11-30 22:56:35 +0000 |
---|---|---|
committer | Hans Breuer <hans@src.gnome.org> | 2004-11-30 22:56:35 +0000 |
commit | 8dcf7d1d8a8fa69e21f318953c62b1aa49584c94 (patch) | |
tree | 28873528240f2316b97546579cfa04c8b144cac9 | |
parent | 35a3099ec676f0e4b62173154c377084c9f80640 (diff) | |
download | gtk+-8dcf7d1d8a8fa69e21f318953c62b1aa49584c94.tar.gz |
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
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gdk/win32/gdkpixmap-win32.c | 2 | ||||
-rw-r--r-- | gtk/gtkfilesystemwin32.c | 19 |
6 files changed, 55 insertions, 2 deletions
@@ -1,3 +1,12 @@ +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 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b237166984..62ec62879a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +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 diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b237166984..62ec62879a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +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 diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b237166984..62ec62879a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +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 diff --git a/gdk/win32/gdkpixmap-win32.c b/gdk/win32/gdkpixmap-win32.c index d62b565455..22515c5548 100644 --- a/gdk/win32/gdkpixmap-win32.c +++ b/gdk/win32/gdkpixmap-win32.c @@ -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); diff --git a/gtk/gtkfilesystemwin32.c b/gtk/gtkfilesystemwin32.c index 9062888df0..f70fee98b2 100644 --- a/gtk/gtkfilesystemwin32.c +++ b/gtk/gtkfilesystemwin32.c @@ -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."); |