[vlc-devel] commit: Use dialog_Question ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Mar 8 11:38:10 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  8 12:15:49 2009 +0200| [f5930fffc2c8694f2e72550b2d9afeb5bad7b2aa] | committer: Rémi Denis-Courmont 

Use dialog_Question

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5930fffc2c8694f2e72550b2d9afeb5bad7b2aa
---

 modules/demux/avi/avi.c |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 160c3fb..9f38f02 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -33,6 +33,7 @@
 #include <vlc_demux.h>
 
 #include <vlc_interface.h>
+#include <vlc_dialog.h>
 
 #include <vlc_meta.h>
 #include <vlc_codecs.h>
@@ -675,23 +676,20 @@ aviindex:
                 b_index = true;
                 goto aviindex;
             }
-            int i_create;
-            i_create = intf_UserYesNo( p_demux, _("AVI Index") ,
-                        _( "This AVI file is broken. Seeking will not "
-                        "work correctly.\nDo you want to "
-                        "try to repair it?\n\nThis might take a long time." ),
-                        _( "Repair" ), _( "Don't repair" ), _( "Cancel") );
-            if( i_create == DIALOG_OK_YES )
+            switch( dialog_Question( p_demux, _("AVI Index") ,
+               _( "This AVI file is broken. Seeking will not work correctly.\n"
+                  "Do you want to try to fix it?\n\n"
+                  "This might take a long time." ),
+                  _( "Repair" ), _( "Don't repair" ), _( "Cancel") ) )
             {
-                b_index = true;
-                msg_Dbg( p_demux, "Fixing AVI index" );
-                goto aviindex;
-            }
-            else if( i_create == DIALOG_CANCELLED )
-            {
-                /* Kill input */
-                vlc_object_kill( p_demux->p_parent );
-                goto error;
+                case 1:
+                    b_index = true;
+                    msg_Dbg( p_demux, "Fixing AVI index" );
+                    goto aviindex;
+                case 3:
+                    /* Kill input */
+                    vlc_object_kill( p_demux->p_parent );
+                    goto error;
             }
         }
     }




More information about the vlc-devel mailing list