Changeset 54cfbbc8db822f49819f2230c74c7e8865772d7f
- Timestamp:
- 03/08/06 08:10:57 (2 years ago)
- git-parent:
- Files:
-
- extras/make.pl (modified) (3 diffs)
- include/vlc_interaction.h (modified) (1 diff)
- modules/demux/avi/avi.c (modified) (1 diff)
- modules/demux/avi/libavi.c (modified) (5 diffs)
- modules/gui/qt4/dialogs/interaction.cpp (modified) (6 diffs)
- modules/gui/qt4/util/qvlcframe.hpp (modified) (2 diffs)
- modules/gui/wxwidgets/dialogs/interaction.cpp (modified) (2 diffs)
- src/interface/interaction.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
extras/make.pl
r9ec36c9 r54cfbbc 24 24 chomp $line; 25 25 # Skip entering/leaving directories and incomplete lines 26 if( 26 if( 27 27 $line =~ /make\[([0-9]*)\]:.*/ || 28 # $line =~ /.*\s\\$/ ||29 $line =~ /^test\s\-z\s/ || 28 # $line =~ /.*\s\\$/ || 29 $line =~ /^test\s\-z\s/ || 30 30 $line =~ /^Making\sclean\sin\s\./ || 31 31 $line =~ /then\smv\s-f/ || 32 $line =~ /.*make\s\s.*/ || 32 33 $line =~ /make\s\sall-recursive/ || 33 34 $line =~ /[A-z0-9-]*ar\s[A-z0-9]*\s([A-z0-9\-_\/\.]*)\s.*/ || … … 35 36 $line =~ /^touch.*/ || 36 37 $line =~ /^srcdir=.*/ || 37 $line =~ /^.* (lib[A-z0-9-_]*plugin.so).*/ || 38 $line =~ /^.* (lib[A-z0-9-_]*plugin.so).*/ || 38 39 $line =~ s/^rm\s\-f\s(.*)//g ) 39 40 {} 40 # Info 41 elsif( 41 # Info 42 elsif( 42 43 $line =~ s/^.* (lib.*\.so).*/ LINK : $1/g || 43 44 $line =~ s/^.* (lib.*\.o)\s\.\/(.*)/ COMPILE : $2/g || 44 45 $line =~ s/^.* (lib.*\.o)\s`.*`(.*);\ \\/ COMPILE : $2/ || 46 $line =~ s/.*\-o\s([^\s]*)\s`.*`([^\s]*);.*/ COMPILE : $2/g || 45 47 $line =~ s/^[A-z0-9-]*ranlib\s(.*)/ RANLIB : $1/g || 46 48 $line =~ s/^Making\sall\sin\s(.*)/MAKE : $1/g || 47 $line =~ s/^Making\sclean\sin\s(.*)/CLEAN : $1/g || 48 $line =~ s/.*\-o\s([^\s]*)\s.*/ BUILD : $1/g) 49 49 $line =~ s/^Making\sclean\sin\s(.*)/CLEAN : $1/g ) 50 50 { 51 51 print $info.$line.$reset."\n"; … … 64 64 print $error.$line.$reset."\n"; 65 65 } 66 # Print unmatched lines 66 # Print unmatched lines 67 67 else 68 68 { 69 69 print $line."\n"; 70 70 } 71 72 71 } include/vlc_interaction.h
r093de85 r54cfbbc 82 82 83 83 /** 84 * Possible flags . Reusable and buttontypes84 * Possible flags . Dialog types 85 85 */ 86 #define DIALOG_REUSABLE 0x01 87 #define DIALOG_YES_NO_CANCEL 0x04 88 #define DIALOG_CLEAR_NOSHOW 0x08 89 #define DIALOG_GOT_ANSWER 0x10 90 #define DIALOG_LOGIN_PW_OK_CANCEL 0x20 91 #define DIALOG_BLOCKING_ERROR 0x24 92 #define DIALOG_NONBLOCKING_ERROR 0x200 93 #define DIALOG_USER_PROGRESS 0x40 94 #define DIALOG_PSZ_INPUT_OK_CANCEL 0x80 86 #define DIALOG_GOT_ANSWER 0x01 87 #define DIALOG_YES_NO_CANCEL 0x02 88 #define DIALOG_LOGIN_PW_OK_CANCEL 0x04 89 #define DIALOG_PSZ_INPUT_OK_CANCEL 0x08 90 #define DIALOG_BLOCKING_ERROR 0x10 91 #define DIALOG_NONBLOCKING_ERROR 0x20 92 #define DIALOG_WARNING 0x40 93 #define DIALOG_USER_PROGRESS 0x80 95 94 #define DIALOG_INTF_PROGRESS 0x100 96 #define DIALOG_WARNING 0x40097 95 98 96 /** modules/demux/avi/avi.c
r093de85 r54cfbbc 560 560 "work correctly.\nDo you want to " 561 561 "try to repair it (this might take a long time) ?" ), 562 _( "Repair" ), _( "Don't repair" ), NULL);562 _( "Repair" ), _( "Don't repair" ), _( "Cancel") ); 563 563 if( i_create == DIALOG_OK_YES ) 564 564 { modules/demux/avi/libavi.c
r2cb472d r54cfbbc 30 30 31 31 #define AVI_DEBUG 1 32 33 #define FREE( p ) \34 if( p ) {free( p ); p = NULL; }35 32 36 33 #define __EVEN( x ) ( (x)&0x01 ? (x)+1 : (x) ) … … 418 415 if( p_strf->common.i_cat == AUDIO_ES ) 419 416 { 420 FREE ( p_strf->auds.p_wf );417 FREENULL( p_strf->auds.p_wf ); 421 418 } 422 419 else if( p_strf->common.i_cat == VIDEO_ES ) 423 420 { 424 FREE ( p_strf->vids.p_bih );421 FREENULL( p_strf->vids.p_bih ); 425 422 } 426 423 } … … 472 469 p_chk->idx1.i_entry_count = 0; 473 470 p_chk->idx1.i_entry_max = 0; 474 FREE ( p_chk->idx1.entry )471 FREENULL( p_chk->idx1.entry ) 475 472 } 476 473 … … 557 554 avi_chunk_indx_t *p_indx = (avi_chunk_indx_t*)p_chk; 558 555 559 FREE ( p_indx->idx.std );560 FREE ( p_indx->idx.field );561 FREE ( p_indx->idx.super );556 FREENULL( p_indx->idx.std ); 557 FREENULL( p_indx->idx.field ); 558 FREENULL( p_indx->idx.super ); 562 559 } 563 560 … … 630 627 { 631 628 avi_chunk_STRING_t *p_strz = (avi_chunk_STRING_t*)p_chk; 632 FREE ( p_strz->p_type );633 FREE ( p_strz->p_str );629 FREENULL( p_strz->p_type ); 630 FREENULL( p_strz->p_str ); 634 631 } 635 632 modules/gui/qt4/dialogs/interaction.cpp
r14e11ab r54cfbbc 21 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ 22 22 23 #include <QMessageBox> 23 24 #include "dialogs/interaction.hpp" 24 25 #include "util/qvlcframe.hpp" … … 30 31 p_intf( _p_intf), p_dialog( _p_dialog ) 31 32 { 32 QVBoxLayout *layout = new QVBoxLayout; 33 QVBoxLayout *layout = new QVBoxLayout( this ); 34 int i_ret = -1; 33 35 uiLogin = NULL; 34 36 uiProgress = NULL; 35 37 uiInput = NULL; 36 38 37 38 39 if( p_dialog->i_flags & DIALOG_BLOCKING_ERROR ) 39 40 { 40 41 41 } 42 42 else if( p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR ) … … 46 46 else if( p_dialog->i_flags & DIALOG_YES_NO_CANCEL ) 47 47 { 48 description = new QLabel( 0 ); 49 description->setText( qfu(p_dialog->psz_description) ); 50 layout->addWidget(description); 48 i_ret = QMessageBox::question( this, 49 qfu( p_dialog->psz_title), qfu( p_dialog->psz_description ), 50 p_dialog->psz_default_button ? 51 qfu( p_dialog->psz_default_button ) : QString::null, 52 p_dialog->psz_alternate_button ? 53 qfu( p_dialog->psz_alternate_button ) : QString::null, 54 p_dialog->psz_other_button ? 55 qfu( p_dialog->psz_other_button ) : QString::null, 0, 56 p_dialog->psz_other_button ? 2 : -1 ); 51 57 } 52 58 else if( p_dialog->i_flags & DIALOG_LOGIN_PW_OK_CANCEL ) … … 66 72 msg_Err( p_intf, "unknown dialog type" ); 67 73 68 QVLCFrame::doButtons( this, layout, 69 defaultButton, p_dialog->psz_default_button, 70 altButton, p_dialog->psz_alternate_button, 71 otherButton, p_dialog->psz_other_button ); 72 if( p_dialog->psz_default_button ) 73 connect( defaultButton, SIGNAL( clicked() ), this, SLOT( defaultB() ) ); 74 if( p_dialog->psz_alternate_button ) 75 connect( altButton, SIGNAL( clicked() ), this, SLOT( altB() ) ); 76 if( p_dialog->psz_other_button ) 77 connect( otherButton, SIGNAL( clicked() ), this, SLOT( otherB() ) ); 78 79 setLayout( layout ); 80 setWindowTitle( qfu( p_dialog->psz_title ) ); 74 /* We used a message box */ 75 if( i_ret != -1 ) 76 { 77 if( i_ret == 0 ) Finish( DIALOG_OK_YES ); 78 else if ( i_ret == 1 ) Finish( DIALOG_NO ); 79 else Finish( DIALOG_CANCELLED ); 80 } 81 else 82 /* Custom box, finish it */ 83 { 84 QVLCFrame::doButtons( this, layout, 85 &defaultButton, p_dialog->psz_default_button, 86 &altButton, p_dialog->psz_alternate_button, 87 &otherButton, p_dialog->psz_other_button ); 88 if( p_dialog->psz_default_button ) 89 connect( defaultButton, SIGNAL( clicked() ), 90 this, SLOT( defaultB() ) ); 91 if( p_dialog->psz_alternate_button ) 92 connect( altButton, SIGNAL( clicked() ), this, SLOT( altB() ) ); 93 if( p_dialog->psz_other_button ) 94 connect( otherButton, SIGNAL( clicked() ), this, SLOT( otherB() ) ); 95 setLayout( layout ); 96 setWindowTitle( qfu( p_dialog->psz_title ) ); 97 } 81 98 } 82 99 … … 107 124 void InteractionDialog::Finish( int i_ret ) 108 125 { 109 vlc_mutex_lock( &p_dialog->p_interaction->object_lock ); 126 vlc_mutex_lock( &p_dialog->p_interaction->object_lock ); 110 127 111 128 if( p_dialog->i_flags & DIALOG_LOGIN_PW_OK_CANCEL ) … … 124 141 p_dialog->i_return = i_ret; 125 142 hide(); 126 vlc_mutex_unlock( &p_dialog->p_interaction->object_lock ); 143 vlc_mutex_unlock( &p_dialog->p_interaction->object_lock ); 127 144 } modules/gui/qt4/util/qvlcframe.hpp
r14e11ab r54cfbbc 58 58 } 59 59 static void doButtons( QWidget *w, QBoxLayout *l, 60 QPushButton * defaul, char *psz_default,61 QPushButton * alt, char *psz_alt,62 QPushButton * other, char *psz_other )60 QPushButton **defaul, char *psz_default, 61 QPushButton **alt, char *psz_alt, 62 QPushButton **other, char *psz_other ) 63 63 { 64 64 #ifdef QT42 … … 71 71 if( psz_default ) 72 72 { 73 defaul = new QPushButton;74 buttons_layout->addWidget( defaul );75 defaul->setText( qfu( psz_default ) );73 *defaul = new QPushButton(0); 74 buttons_layout->addWidget( *defaul ); 75 (*defaul)->setText( qfu( psz_default ) ); 76 76 } 77 77 if( psz_alt ) 78 78 { 79 alt = new QPushButton;80 buttons_layout->addWidget( alt );81 alt->setText( qfu( psz_alt ) );79 *alt = new QPushButton(0); 80 buttons_layout->addWidget( *alt ); 81 (*alt)->setText( qfu( psz_alt ) ); 82 82 } 83 83 if( psz_other ) 84 84 { 85 other = new QPushButton;86 buttons_layout->addWidget( other );87 other->setText( qfu( psz_other ) );85 *other = new QPushButton( 0 ); 86 buttons_layout->addWidget( *other ); 87 (*other)->setText( qfu( psz_other ) ); 88 88 } 89 89 l->addLayout( buttons_layout ); modules/gui/wxwidgets/dialogs/interaction.cpp
r765427d r54cfbbc 179 179 buttons_sizer->AddButton( cancel ); 180 180 } 181 #if 0 181 182 else if( p_dialog->i_flags & DIALOG_CLEAR_NOSHOW ) 182 183 { … … 197 198 buttons_sizer->SetAffirmativeButton( close ); 198 199 } 200 #endif 199 201 widgets_sizer->Layout(); 200 202 widgets_panel->SetSizerAndFit( widgets_sizer ); src/interface/interaction.c
r093de85 r54cfbbc 137 137 case HIDDEN_DIALOG: 138 138 if( !(p_dialog->i_flags & DIALOG_GOT_ANSWER) ) break; 139 if( !(p_dialog->i_flags & DIALOG_REUSABLE) ) 140 { 141 p_dialog->i_action = INTERACT_DESTROY; 142 val.p_address = p_dialog; 143 if( p_interaction->p_intf ) 144 var_Set( p_interaction->p_intf, "interaction", val ); 145 } 139 p_dialog->i_action = INTERACT_DESTROY; 140 val.p_address = p_dialog; 141 if( p_interaction->p_intf ) 142 var_Set( p_interaction->p_intf, "interaction", val ); 146 143 break; 147 144 case DESTROYED_DIALOG: … … 176 173 p_new->b_cancelled = VLC_FALSE; \ 177 174 p_new->i_status = NEW_DIALOG; \ 175 p_new->i_flags = 0; \ 178 176 p_new->i_type = INTERACT_DIALOG_##type; \ 179 177 p_new->psz_returned[0] = NULL; \ … … 197 195 va_list args; 198 196 DIALOG_INIT( ONEWAY ); 199 197 200 198 p_new->psz_title = strdup( psz_title ); 201 199 FORMAT_DESC;
