[MPlayer-cvslog] r38580 - trunk/gui/dialog/fileselect.c

ib subversion at mplayerhq.hu
Sun Jun 16 14:45:22 EEST 2024


Author: ib
Date: Sun Jun 16 14:45:22 2024
New Revision: 38580

Log:
Add fs_PathClear().

Use it in fs_Destroy() and clear the path list before building one
for the particular file selector type.

Modified:
   trunk/gui/dialog/fileselect.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Sun Jun 16 14:40:19 2024	(r38579)
+++ trunk/gui/dialog/fileselect.c	Sun Jun 16 14:45:22 2024	(r38580)
@@ -727,10 +727,8 @@ static gboolean fs_key_release_event(Gtk
     return FALSE;
 }
 
-static void fs_Destroy(void)
+static void fs_PathClear(void)
 {
-    gtk_widget_destroyed(FileSelector, &FileSelector);
-
     g_hash_table_destroy(fsPathTable);
 
 WARN_OFF(cast_function_type)
@@ -740,6 +738,12 @@ WARN_ON
     fsPathList = NULL;
 }
 
+static void fs_Destroy(void)
+{
+    fs_PathClear();
+    gtk_widget_destroyed(FileSelector, &FileSelector);
+}
+
 static GtkWidget *CreateFileSelect(void)
 {
     gint x, y;
@@ -937,6 +941,9 @@ void ShowFileSelector(int type)
             nfree(dir);
     }
 
+    if (fsPathList)
+        fs_PathClear();
+
     fsPathTable = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
 
     {


More information about the MPlayer-cvslog mailing list