[gnome-video-arcade] Bug 669950 - Many popups when copying files into mame dir



commit 6580c67e3e1f96cef9a4812a1a1495549cc8e1c7
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Feb 12 21:52:29 2012 -0600

    Bug 669950 - Many popups when copying files into mame dir
    
    The "Changes detected in ROM files" dialog wouldn't take "no" for an
    answer, and kept prompting for each and every change detected by the
    file monitor.
    
    This is especially bad considering the file monitor reacts TWICE for
    every file change - once with G_FILE_MONITOR_EVENT_CHANGED, and again
    with G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT.
    
    This commit makes the "Skip Audit" option suppress the dialog until
    GNOME Video Arcade is restarted.

 src/main.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 50b5022..c74b089 100644
--- a/src/main.c
+++ b/src/main.c
@@ -192,6 +192,12 @@ rompath_changed_cb (GFileMonitor *monitor,
                 /* Present a helpful dialog if no ROMs were found. */
                 warn_if_no_roms ();
         }
+        else
+        {
+                /* Don't bother the user again during this session. */
+                g_signal_handlers_disconnect_by_func (
+                        monitor, rompath_changed_cb, NULL);
+        }
 
         gtk_widget_destroy (dialog);
         dialog = NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]