Mercurial > mplayer.hg
changeset 37023:1236a692d0c6
Cosmetic: Remove tabs.
author | ib |
---|---|
date | Thu, 03 Apr 2014 07:55:12 +0000 |
parents | 11dcd89b22ae |
children | 0790f864cea2 |
files | gui/dialog/about.c gui/dialog/equalizer.c gui/dialog/menu.c gui/dialog/playlist.c gui/dialog/preferences.c gui/dialog/skinbrowser.c gui/ui/main.c gui/ui/playbar.c gui/ui/video.c gui/wm/wsxdnd.c gui/wm/wsxdnd.h |
diffstat | 11 files changed, 740 insertions(+), 740 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/about.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/dialog/about.c Thu Apr 03 07:55:12 2014 +0000 @@ -107,232 +107,232 @@ gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, title, -1 ); gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, #endif - "\n" - MSGTR_GUI_Sponsored":\n" - " http://www.uhulinux.hu/\n" - "\n" - MSGTR_GUI_Contributors":\n" - "\n" - " * Andreas Ackermann\n" - " * adland\n" - " * Eric Anholt\n" - " * Folke Ashberg\n" - " * Dénes Balatoni\n" - " * Zsolt Barat\n" - " * Luca Barbato\n" - " * Dmitry Baryshkov\n" - " * Bertrand Baudet\n" - " * Alban Bedel\n" - " * Michael Behrisch\n" - " * Luchezar Belev\n" - " * Gábor Bérczi\n" - " * Szabolcs Berecz\n" - " * Alex Beregszászi\n" - " * Tilmann Bitterberg\n" - " * Diego Biurrun\n" - " * Marcsu Blomenkamp\n" - " * Ingo Brückl\n" - " * Andrew Buehler\n" - " * Eviv Bulgroz\n" - " * Felix Bünemann\n" - " * Moritz Bunkus\n" - " * Dan Villiom Podlaski Christiansen\n" - " * Jeff Clagg\n" - " * compn\n" - " * Marcus Comstedt\n" - " * Kees Cook\n" - " * Stephen Davies\n" - " * Piero Di Vita\n" - " * Tobias Diedrich\n" - " * Florian Dietrich\n" - " * Jeroen Dobbelaere\n" - " * Reimar Döffinger\n" - " * Romain Dolbeau\n" - " * Ismail Dönmez\n" - " * Robert Edele\n" - " * Christoph Egger\n" - " * Paul Wilhelm Elsinghorst\n" - " * Bernd Ernesti\n" - " * Salvatore Falco\n" - " * Johannes Feigl\n" - " * D Richard III Felker\n" - " * Tim Ferguson\n" - " * Ross Finlayson\n" - " * Daniele Forghieri\n" - " * Kilian A. Foth\n" - " * Fabian Franz\n" - " * Martin Gansser\n" - " * Árpád Gereöffy\n" - " * Matteo Giani\n" - " * Sven Goethel\n" - " * German Gomez Garcia\n" - " * Alexander Gottwald\n" - " * Michael Graffam\n" - " * Andriy N. Gritsenko\n" - " * Rémi Guyomarch\n" - " * Jürgen Hammelmann\n" - " * Christopher R. Hertel\n" - " * Andreas Hess\n" - " * Corey Hickey\n" - " * Zoltán Hidvégi\n" - " * Jens Hoffmann\n" - " * David Holm\n" - " * Bohdan Horst\n" - " * Hampa Hug\n" - " * Tomas Hurka\n" - " * Sidik Isani\n" - " * Panagiotis Issaris\n" - " * Aurelien Jacobs\n" - " * Reza Jelveh\n" - " * Jonas Jermann\n" - " * Anders Johansson\n" - " * Nicholas Kain\n" - " * Filip Kalinski\n" - " * Ivan Kalvachev\n" - " * Wojtek Kaniewski\n" - " * Kim Minh Kaplan\n" - " * Samuli Kärkkäinen\n" - " * Jürgen Keil\n" - " * Robert Kesterson\n" - " * Attila Kinali\n" - " * Gregory Kovriga\n" - " * David Kühling\n" - " * Fredrik Kuivinen\n" - " * Nick Kurshev\n" - " * Brian Kuschak\n" - " * Vladimir Kushnir\n" - " * Dave Lambley\n" - " * Gyula László\n" - " * Nicolas Le Gaillart\n" - " * Gábor Lénárt\n" - " * Colin Leroy\n" - " * Oskar Liljeblad\n" - " * Sam Lin\n" - " * Pierre Lombard\n" - " * Puk Madick\n" - " * Jindrich Makovicka\n" - " * Rudolf Marek\n" - " * László Megyer\n" - " * Mike Melanson\n" - " * Arwed von Merkatz\n" - " * Loren Merritt\n" - " * Dominik Mierzejewski\n" - " * Mihail Milushev\n" - " * Nehal Mistry\n" - " * András Mohari\n" - " * Steven Mueller\n" - " * Alexander Neundorf\n" - " * Michael Niedermayer\n" - " * Fredrik Noring\n" - " * Christian Ohm\n" - " * Joey Parrish\n" - " * Dariusz Pietrzak\n" - " * Nicolas Plourde\n" - " * Lennart Poettering\n" - " * Guillaume Poirier\n" - " * Zoltán Ponekker\n" - " * Ivo van Poorten\n" - " * Lu Ran\n" - " * Uwe Reder\n" - " * rgselk\n" - " * Rune Petersen\n" - " * Ville Saari\n" - " * Nico Sabbi\n" - " * Björn Sandell\n" - " * Tilman Sauerbeck\n" - " * Frank Scherthan\n" - " * Florian Schneider\n" - " * Oliver Schoenbrunner\n" - " * Oded Shimon\n" - " * Peter Simon\n" - " * Rik Snel\n" - " * Sascha Sommer\n" - " * Alexander Strasser\n" - " * Kamil Strzelecki\n" - " * Jiri Svoboda\n" - " * Robert Swain\n" - " * Ville Syrjälä\n" - " * Gabor Szecsi\n" - " * Jason Tackaberry\n" - " * Howell Tam\n" - " * Adam Tlalka\n" - " * Gianluigi Tiesi\n" - " * Roberto Togni\n" - " * Salvador Eduardo Tropea\n" - " * Miklós Vajna\n" - " * Reynaldo H. Verdejo Pinochet\n" - " * Per Wigren\n" - " * Derek J Witt\n" - " * Alan Young\n" - " * Artur Zaprzala\n" - " * Mark Zealey\n" - " * Matan Ziv-Av\n" - " * Márk Vicián Zoltán\n" - "\n" - MSGTR_GUI_CodecsAndLibraries":\n" - "\n" - " * Fabrice Bellard\n" - " * Vivien Chappelier\n" - " * Michael Hipp\n" - " * Aaron Holtzman\n" - " * Jake Janovetz\n" - " * Zdenek Kabelac\n" - " * Eugene Kuznetsov\n" - " * Michel Lespinasse\n" - " * Mark Podlipec\n" - " * Damien Vincent\n" - "\n" - MSGTR_GUI_Translations":\n" - "\n" - " * Marcin Biernat\n" - " * Ingo Brückl\n" - " * Marc Fargas\n" - " * Jiri Heryan\n" - " * Marek Jarycki\n" - " * Leszek Kaplita\n" - " * Sebastian Krämer\n" - " * Juan Martin López\n" - " * Piotr Michniewski\n" - " * Jakub Misiorny\n" - " * Gábor Mizda\n" - " * Maciej Paszta\n" - " * Łukasz Proszek\n" - " * Wacław Schiller\n" - " * Andoni Zubimendi\n" - "\n" - MSGTR_GUI_Skins":\n" - "\n" - " * Azrael\n" - " * Viktor Bekesi\n" - " * Ingo Brückl\n" - " * Andrew Carpenter\n" - " * Charles Foucault\n" - " * Attila Gyimesi\n" - " * Alban Hertroys\n" - " * Balint Kiss\n" - " * Andre Kuehne\n" - " * Rüdiger Kuhlmann\n" - " * Dan Naumov\n" - " * Ryan Northam\n" - " * Juan Pablo Oyarzun Arroyo\n" - " * DongCheon Park\n" - " * Jurgen Pehrson\n" - " * Nikola Pizurica\n" - " * Oliwier Ptak\n" - " * Pasquale Riccio\n" - " * Burt.S.\n" - " * Jesper Schultz\n" - " * Marcin Szumiela\n" - " * Massimo Tisi\n" - " * Jiri jun. Tyr\n" - " * Ognian Vasilev\n" - " * Imre Veres\n" - " * Radic Vesko\n" - " * Balasz Vigvary\n" - " * Andrew Weber\n" - " * Gary Jr. Whitmore\n" - " * Franciszek Wilamowski\n" - " * Michael Zeising", -1 ); + "\n" + MSGTR_GUI_Sponsored":\n" + " http://www.uhulinux.hu/\n" + "\n" + MSGTR_GUI_Contributors":\n" + "\n" + " * Andreas Ackermann\n" + " * adland\n" + " * Eric Anholt\n" + " * Folke Ashberg\n" + " * Dénes Balatoni\n" + " * Zsolt Barat\n" + " * Luca Barbato\n" + " * Dmitry Baryshkov\n" + " * Bertrand Baudet\n" + " * Alban Bedel\n" + " * Michael Behrisch\n" + " * Luchezar Belev\n" + " * Gábor Bérczi\n" + " * Szabolcs Berecz\n" + " * Alex Beregszászi\n" + " * Tilmann Bitterberg\n" + " * Diego Biurrun\n" + " * Marcsu Blomenkamp\n" + " * Ingo Brückl\n" + " * Andrew Buehler\n" + " * Eviv Bulgroz\n" + " * Felix Bünemann\n" + " * Moritz Bunkus\n" + " * Dan Villiom Podlaski Christiansen\n" + " * Jeff Clagg\n" + " * compn\n" + " * Marcus Comstedt\n" + " * Kees Cook\n" + " * Stephen Davies\n" + " * Piero Di Vita\n" + " * Tobias Diedrich\n" + " * Florian Dietrich\n" + " * Jeroen Dobbelaere\n" + " * Reimar Döffinger\n" + " * Romain Dolbeau\n" + " * Ismail Dönmez\n" + " * Robert Edele\n" + " * Christoph Egger\n" + " * Paul Wilhelm Elsinghorst\n" + " * Bernd Ernesti\n" + " * Salvatore Falco\n" + " * Johannes Feigl\n" + " * D Richard III Felker\n" + " * Tim Ferguson\n" + " * Ross Finlayson\n" + " * Daniele Forghieri\n" + " * Kilian A. Foth\n" + " * Fabian Franz\n" + " * Martin Gansser\n" + " * Árpád Gereöffy\n" + " * Matteo Giani\n" + " * Sven Goethel\n" + " * German Gomez Garcia\n" + " * Alexander Gottwald\n" + " * Michael Graffam\n" + " * Andriy N. Gritsenko\n" + " * Rémi Guyomarch\n" + " * Jürgen Hammelmann\n" + " * Christopher R. Hertel\n" + " * Andreas Hess\n" + " * Corey Hickey\n" + " * Zoltán Hidvégi\n" + " * Jens Hoffmann\n" + " * David Holm\n" + " * Bohdan Horst\n" + " * Hampa Hug\n" + " * Tomas Hurka\n" + " * Sidik Isani\n" + " * Panagiotis Issaris\n" + " * Aurelien Jacobs\n" + " * Reza Jelveh\n" + " * Jonas Jermann\n" + " * Anders Johansson\n" + " * Nicholas Kain\n" + " * Filip Kalinski\n" + " * Ivan Kalvachev\n" + " * Wojtek Kaniewski\n" + " * Kim Minh Kaplan\n" + " * Samuli Kärkkäinen\n" + " * Jürgen Keil\n" + " * Robert Kesterson\n" + " * Attila Kinali\n" + " * Gregory Kovriga\n" + " * David Kühling\n" + " * Fredrik Kuivinen\n" + " * Nick Kurshev\n" + " * Brian Kuschak\n" + " * Vladimir Kushnir\n" + " * Dave Lambley\n" + " * Gyula László\n" + " * Nicolas Le Gaillart\n" + " * Gábor Lénárt\n" + " * Colin Leroy\n" + " * Oskar Liljeblad\n" + " * Sam Lin\n" + " * Pierre Lombard\n" + " * Puk Madick\n" + " * Jindrich Makovicka\n" + " * Rudolf Marek\n" + " * László Megyer\n" + " * Mike Melanson\n" + " * Arwed von Merkatz\n" + " * Loren Merritt\n" + " * Dominik Mierzejewski\n" + " * Mihail Milushev\n" + " * Nehal Mistry\n" + " * András Mohari\n" + " * Steven Mueller\n" + " * Alexander Neundorf\n" + " * Michael Niedermayer\n" + " * Fredrik Noring\n" + " * Christian Ohm\n" + " * Joey Parrish\n" + " * Dariusz Pietrzak\n" + " * Nicolas Plourde\n" + " * Lennart Poettering\n" + " * Guillaume Poirier\n" + " * Zoltán Ponekker\n" + " * Ivo van Poorten\n" + " * Lu Ran\n" + " * Uwe Reder\n" + " * rgselk\n" + " * Rune Petersen\n" + " * Ville Saari\n" + " * Nico Sabbi\n" + " * Björn Sandell\n" + " * Tilman Sauerbeck\n" + " * Frank Scherthan\n" + " * Florian Schneider\n" + " * Oliver Schoenbrunner\n" + " * Oded Shimon\n" + " * Peter Simon\n" + " * Rik Snel\n" + " * Sascha Sommer\n" + " * Alexander Strasser\n" + " * Kamil Strzelecki\n" + " * Jiri Svoboda\n" + " * Robert Swain\n" + " * Ville Syrjälä\n" + " * Gabor Szecsi\n" + " * Jason Tackaberry\n" + " * Howell Tam\n" + " * Adam Tlalka\n" + " * Gianluigi Tiesi\n" + " * Roberto Togni\n" + " * Salvador Eduardo Tropea\n" + " * Miklós Vajna\n" + " * Reynaldo H. Verdejo Pinochet\n" + " * Per Wigren\n" + " * Derek J Witt\n" + " * Alan Young\n" + " * Artur Zaprzala\n" + " * Mark Zealey\n" + " * Matan Ziv-Av\n" + " * Márk Vicián Zoltán\n" + "\n" + MSGTR_GUI_CodecsAndLibraries":\n" + "\n" + " * Fabrice Bellard\n" + " * Vivien Chappelier\n" + " * Michael Hipp\n" + " * Aaron Holtzman\n" + " * Jake Janovetz\n" + " * Zdenek Kabelac\n" + " * Eugene Kuznetsov\n" + " * Michel Lespinasse\n" + " * Mark Podlipec\n" + " * Damien Vincent\n" + "\n" + MSGTR_GUI_Translations":\n" + "\n" + " * Marcin Biernat\n" + " * Ingo Brückl\n" + " * Marc Fargas\n" + " * Jiri Heryan\n" + " * Marek Jarycki\n" + " * Leszek Kaplita\n" + " * Sebastian Krämer\n" + " * Juan Martin López\n" + " * Piotr Michniewski\n" + " * Jakub Misiorny\n" + " * Gábor Mizda\n" + " * Maciej Paszta\n" + " * Łukasz Proszek\n" + " * Wacław Schiller\n" + " * Andoni Zubimendi\n" + "\n" + MSGTR_GUI_Skins":\n" + "\n" + " * Azrael\n" + " * Viktor Bekesi\n" + " * Ingo Brückl\n" + " * Andrew Carpenter\n" + " * Charles Foucault\n" + " * Attila Gyimesi\n" + " * Alban Hertroys\n" + " * Balint Kiss\n" + " * Andre Kuehne\n" + " * Rüdiger Kuhlmann\n" + " * Dan Naumov\n" + " * Ryan Northam\n" + " * Juan Pablo Oyarzun Arroyo\n" + " * DongCheon Park\n" + " * Jurgen Pehrson\n" + " * Nikola Pizurica\n" + " * Oliwier Ptak\n" + " * Pasquale Riccio\n" + " * Burt.S.\n" + " * Jesper Schultz\n" + " * Marcin Szumiela\n" + " * Massimo Tisi\n" + " * Jiri jun. Tyr\n" + " * Ognian Vasilev\n" + " * Imre Veres\n" + " * Radic Vesko\n" + " * Balasz Vigvary\n" + " * Andrew Weber\n" + " * Gary Jr. Whitmore\n" + " * Franciszek Wilamowski\n" + " * Michael Zeising", -1 ); gtkAddHSeparator( vbox ); Ok=gtkAddButton( MSGTR_GUI_Ok,gtkAddHButtonBox( vbox ) );
--- a/gui/dialog/equalizer.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/dialog/equalizer.c Thu Apr 03 07:55:12 2014 +0000 @@ -168,7 +168,7 @@ { case 1: mplayer( MPLAYER_SET_CONTRAST,VContrastadj->value,0 ); break; case 2: mplayer( MPLAYER_SET_BRIGHTNESS,VBrightnessadj->value,0 ); break; - case 3: mplayer( MPLAYER_SET_HUE,VHueadj->value,0 ); break; + case 3: mplayer( MPLAYER_SET_HUE,VHueadj->value,0 ); break; case 4: mplayer( MPLAYER_SET_SATURATION,VSaturationadj->value,0 ); break; } @@ -186,25 +186,25 @@ if ( EquConfig ) gtk_widget_destroy( EquConfig ); break; case 1: - if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) - { - if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) break; - mplayer( MPLAYER_SET_EQUALIZER,0,NULL ); - eqSetBands( Channel ); - } - else - { - if ( !guiInfo.Playing ) break; - mplayer( MPLAYER_SET_CONTRAST,0,0 ); - mplayer( MPLAYER_SET_BRIGHTNESS,0,0 ); - mplayer( MPLAYER_SET_HUE,0,0 ); - mplayer( MPLAYER_SET_SATURATION,0,0 ); - eqSetBands( Channel ); - } - break; + if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) + { + if ( !guiInfo.Playing || !gtkEnableAudioEqualizer ) break; + mplayer( MPLAYER_SET_EQUALIZER,0,NULL ); + eqSetBands( Channel ); + } + else + { + if ( !guiInfo.Playing ) break; + mplayer( MPLAYER_SET_CONTRAST,0,0 ); + mplayer( MPLAYER_SET_BRIGHTNESS,0,0 ); + mplayer( MPLAYER_SET_HUE,0,0 ); + mplayer( MPLAYER_SET_SATURATION,0,0 ); + eqSetBands( Channel ); + } + break; case 2: - ShowEquConfig(); - break; + ShowEquConfig(); + break; } }
--- a/gui/dialog/menu.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/dialog/menu.c Thu Apr 03 07:55:12 2014 +0000 @@ -401,9 +401,9 @@ }; static char * ChannelTypes[] = - { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; + { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; static char * ChannelNumbers[] = - { "","Stereo","","","","5.1" }; + { "","Stereo","","","","5.1" }; enum { @@ -525,8 +525,8 @@ { snprintf( tmp,32,MSGTR_GUI_TitleNN,i); AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp, - guiInfo.Track == i, - (i << 16) + ivSetDVDTitle ); + guiInfo.Track == i, + (i << 16) + ivSetDVDTitle ); } } else @@ -542,7 +542,7 @@ { snprintf( tmp,32,MSGTR_GUI_ChapterNN,i ); AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i, - ( i << 16 ) + ivSetDVDChapter ); + ( i << 16 ) + ivSetDVDChapter ); } } else @@ -556,12 +556,12 @@ char tmp[64]; int i; for ( i=0;i < guiInfo.AudioStreams;i++ ) { - snprintf( tmp,64,"%s - %s %s",GetLanguage( &guiInfo.AudioStream[i].language, GET_LANG_INT ), - ChannelTypes[ guiInfo.AudioStream[i].type ], - ChannelNumbers[ guiInfo.AudioStream[i].channels ] ); + snprintf( tmp,64,"%s - %s %s",GetLanguage( &guiInfo.AudioStream[i].language, GET_LANG_INT ), + ChannelTypes[ guiInfo.AudioStream[i].type ], + ChannelNumbers[ guiInfo.AudioStream[i].channels ] ); AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, - demuxer->audio->id == guiInfo.AudioStream[i].id, - ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio ); + demuxer->audio->id == guiInfo.AudioStream[i].id, + ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio ); } } else @@ -578,8 +578,8 @@ { av_strlcpy( tmp,GetLanguage( &guiInfo.Subtitle[i].language, GET_LANG_INT ),sizeof(tmp) ); AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp, - dvdsub_id == guiInfo.Subtitle[i].id, - ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle ); + dvdsub_id == guiInfo.Subtitle[i].id, + ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle ); } } else
--- a/gui/dialog/playlist.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/dialog/playlist.c Thu Apr 03 07:55:12 2014 +0000 @@ -126,55 +126,55 @@ { case 1: // ok { - int i; - plItem curr, * item, * old; - item = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); - if (item) - { - curr.path = gstrdup(item->path); - curr.name = gstrdup(item->name); - } - else - { - curr.path = NULL; - curr.name = NULL; - } - listMgr( PLAYLIST_DELETE,0 ); - for ( i=0;i<NrOfSelected;i++ ) - { - char * text[2]; - item=calloc( 1,sizeof( plItem ) ); - gtk_clist_get_text( GTK_CLIST( CLSelected ),i,2,&text[0] ); - gtk_clist_get_text( GTK_CLIST( CLSelected ),i,3,&text[1] ); - item->name = strdup( text[0] ); - item->path = strdup( text[1] ); - listMgr( PLAYLIST_ITEM_APPEND,item ); - } - item = listMgr( PLAYLIST_GET,0 ); - if ( item ) - { - if ( guiInfo.Playing ) - { - old = listMgr( PLAYLIST_ITEM_FIND,&curr ); - if ( old ) - { - listMgr( PLAYLIST_ITEM_SET_CURR,old ); - guiInfo.Track = (uintptr_t) listMgr( PLAYLIST_ITEM_GET_POS,old ); - item = NULL; - } - } - if ( item ) - { - uiSetFile( item->path,item->name,STREAMTYPE_FILE ); - guiInfo.MediumChanged = GUI_MEDIUM_NEW; - guiInfo.PlaylistNext = !guiInfo.Playing; - guiInfo.Track = 1; - } - } - else if (isPlaylistStreamtype && !guiInfo.Playing) uiUnsetFile(); - guiInfo.Tracks = (uintptr_t) listMgr( PLAYLIST_ITEM_GET_POS,0 ); - free(curr.path); - free(curr.name); + int i; + plItem curr, * item, * old; + item = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); + if (item) + { + curr.path = gstrdup(item->path); + curr.name = gstrdup(item->name); + } + else + { + curr.path = NULL; + curr.name = NULL; + } + listMgr( PLAYLIST_DELETE,0 ); + for ( i=0;i<NrOfSelected;i++ ) + { + char * text[2]; + item=calloc( 1,sizeof( plItem ) ); + gtk_clist_get_text( GTK_CLIST( CLSelected ),i,2,&text[0] ); + gtk_clist_get_text( GTK_CLIST( CLSelected ),i,3,&text[1] ); + item->name = strdup( text[0] ); + item->path = strdup( text[1] ); + listMgr( PLAYLIST_ITEM_APPEND,item ); + } + item = listMgr( PLAYLIST_GET,0 ); + if ( item ) + { + if ( guiInfo.Playing ) + { + old = listMgr( PLAYLIST_ITEM_FIND,&curr ); + if ( old ) + { + listMgr( PLAYLIST_ITEM_SET_CURR,old ); + guiInfo.Track = (uintptr_t) listMgr( PLAYLIST_ITEM_GET_POS,old ); + item = NULL; + } + } + if ( item ) + { + uiSetFile( item->path,item->name,STREAMTYPE_FILE ); + guiInfo.MediumChanged = GUI_MEDIUM_NEW; + guiInfo.PlaylistNext = !guiInfo.Playing; + guiInfo.Track = 1; + } + } + else if (isPlaylistStreamtype && !guiInfo.Playing) uiUnsetFile(); + guiInfo.Tracks = (uintptr_t) listMgr( PLAYLIST_ITEM_GET_POS,0 ); + free(curr.path); + free(curr.name); } case 0: // cancel NrOfSelected=NrOfEntrys=0; @@ -186,30 +186,30 @@ break; case 2: // remove { - int i; int j; + int i; int j; - gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigSel ); - gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigUnsel ); - gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigEvent ); + gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigSel ); + gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigUnsel ); + gtk_signal_handler_block( GTK_OBJECT( CLSelected ),sigEvent ); gtk_clist_freeze( GTK_CLIST( CLSelected ) ); i = 0; while ( i<NrOfSelected ) { - if ( CLListSelected[i] ) - { - gtk_clist_remove( GTK_CLIST( CLSelected ),i ); - NrOfSelected--; - for ( j=i;j<NrOfSelected;j++ ) - CLListSelected[j] = CLListSelected[j+1]; - } - else i++; + if ( CLListSelected[i] ) + { + gtk_clist_remove( GTK_CLIST( CLSelected ),i ); + NrOfSelected--; + for ( j=i;j<NrOfSelected;j++ ) + CLListSelected[j] = CLListSelected[j+1]; + } + else i++; } - gtk_clist_thaw( GTK_CLIST( CLSelected ) ); + gtk_clist_thaw( GTK_CLIST( CLSelected ) ); - gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigSel ); - gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigUnsel ); - gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigEvent ); + gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigSel ); + gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigUnsel ); + gtk_signal_handler_unblock( GTK_OBJECT( CLSelected ),sigEvent ); } break; @@ -224,23 +224,23 @@ { if ( CLFileSelected[i] ) { - NrOfSelected++; - p=realloc( CLListSelected,NrOfSelected * sizeof( int ) ); - if ( !p ) NrOfSelected--; - else - { - CLListSelected=p; - CLListSelected[NrOfSelected - 1]=False; - gtk_clist_get_text( GTK_CLIST( CLFiles ),i,0,&itext[0] ); - gtk_clist_get_text( GTK_CLIST( CLFiles ),i,1,&itext[1] ); - text[0][0]=itext[0]; text[0][1]=g_filename_display_name( current_path ); - text[0][2]=itext[1]; text[0][3]=current_path; - gtk_clist_append( GTK_CLIST( CLSelected ),text[0] ); - g_free( text[0][1] ); - } - } - } - gtk_clist_thaw( GTK_CLIST( CLSelected ) ); + NrOfSelected++; + p=realloc( CLListSelected,NrOfSelected * sizeof( int ) ); + if ( !p ) NrOfSelected--; + else + { + CLListSelected=p; + CLListSelected[NrOfSelected - 1]=False; + gtk_clist_get_text( GTK_CLIST( CLFiles ),i,0,&itext[0] ); + gtk_clist_get_text( GTK_CLIST( CLFiles ),i,1,&itext[1] ); + text[0][0]=itext[0]; text[0][1]=g_filename_display_name( current_path ); + text[0][2]=itext[1]; text[0][3]=current_path; + gtk_clist_append( GTK_CLIST( CLSelected ),text[0] ); + g_free( text[0][1] ); + } + } + } + gtk_clist_thaw( GTK_CLIST( CLSelected ) ); } break; } @@ -303,10 +303,10 @@ static int check_for_subdir( gchar * path ) { - DIR * dir; + DIR * dir; struct dirent * dirent; struct stat statbuf; - gchar * npath; + gchar * npath; if ( (dir=opendir( path )) ) { @@ -330,13 +330,13 @@ { GtkCTreeNode * node; DirNodeType * DirNode; - gchar * text, * utf8name = NULL; - gchar * dummy = "dummy"; - int subdir = True; - DIR * dir = NULL; + gchar * text, * utf8name = NULL; + gchar * dummy = "dummy"; + int subdir = True; + DIR * dir = NULL; struct dirent * dirent; - gchar * path; - struct stat statbuf; + gchar * path; + struct stat statbuf; (void) user_data; @@ -354,19 +354,19 @@ { path=calloc( 1,strlen( DirNode->path ) + strlen( dirent->d_name ) + 2 ); if ( !strcmp( current_path,"/" ) ) sprintf( path,"/%s",dirent->d_name ); - else sprintf( path,"%s/%s",current_path,dirent->d_name ); + else sprintf( path,"%s/%s",current_path,dirent->d_name ); text=dirent->d_name; g_free( utf8name ); utf8name=g_filename_display_name( text ); if ( stat( path,&statbuf ) != -1 && S_ISDIR( statbuf.st_mode ) && dirent->d_name[0] != '.' ) - { - DirNode=malloc( sizeof( DirNodeType ) ); DirNode->scaned=False; DirNode->path=strdup( path ); - subdir=check_for_subdir( path ); - node=gtk_ctree_insert_node( ctree,parent_node,NULL,&utf8name,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,!subdir,FALSE ); - gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL ); - if ( subdir ) gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE ); - } + { + DirNode=malloc( sizeof( DirNodeType ) ); DirNode->scaned=False; DirNode->path=strdup( path ); + subdir=check_for_subdir( path ); + node=gtk_ctree_insert_node( ctree,parent_node,NULL,&utf8name,4,pxOpenedBook,msOpenedBook,pxClosedBook,msClosedBook,!subdir,FALSE ); + gtk_ctree_node_set_row_data_full( ctree,node,DirNode,NULL ); + if ( subdir ) gtk_ctree_insert_node( ctree,node,NULL,&dummy,4,NULL,NULL,NULL,NULL,FALSE,FALSE ); + } free( path ); path=NULL; } closedir( dir ); @@ -381,11 +381,11 @@ static void scan_dir( char * path ) { - DIR * dir = NULL; - char * curr; + DIR * dir = NULL; + char * curr; struct dirent * dirent; - struct stat statbuf; - char * text[1][3]; text[0][2]=""; + struct stat statbuf; + char * text[1][3]; text[0][2]=""; gtk_clist_clear( GTK_CLIST( CLFiles ) ); if ( (dir=opendir( path )) ) @@ -393,17 +393,17 @@ NrOfEntrys=0; while( (dirent=readdir( dir )) ) { - curr=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); sprintf( curr,"%s/%s",path,dirent->d_name ); - if ( stat( curr,&statbuf ) != -1 && ( S_ISREG( statbuf.st_mode ) || S_ISLNK( statbuf.st_mode ) ) ) - { - text[0][0]=g_filename_display_name( dirent->d_name ); - text[0][1]=dirent->d_name; - gtk_clist_append( GTK_CLIST( CLFiles ), text[0] ); - g_free( text[0][0] ); - NrOfEntrys++; - } - free( curr ); - } + curr=calloc( 1,strlen( path ) + strlen( dirent->d_name ) + 3 ); sprintf( curr,"%s/%s",path,dirent->d_name ); + if ( stat( curr,&statbuf ) != -1 && ( S_ISREG( statbuf.st_mode ) || S_ISLNK( statbuf.st_mode ) ) ) + { + text[0][0]=g_filename_display_name( dirent->d_name ); + text[0][1]=dirent->d_name; + gtk_clist_append( GTK_CLIST( CLFiles ), text[0] ); + g_free( text[0][0] ); + NrOfEntrys++; + } + free( curr ); + } closedir( dir ); gtk_clist_sort( GTK_CLIST( CLFiles ) ); } @@ -429,18 +429,18 @@ static GtkWidget * CreatePlaylist( void ) { - GtkWidget * vbox1; - GtkWidget * hbox1; - GtkWidget * scrolledwindow1; - GtkWidget * vbox2; - GtkWidget * scrolledwindow2; - GtkWidget * scrolledwindow3; - GtkWidget * hbuttonbox1; + GtkWidget * vbox1; + GtkWidget * hbox1; + GtkWidget * scrolledwindow1; + GtkWidget * vbox2; + GtkWidget * scrolledwindow2; + GtkWidget * scrolledwindow3; + GtkWidget * hbuttonbox1; GtkAccelGroup * accel_group; - GdkColor transparent = { 0,0,0,0 }; - gchar * root = "/"; - gchar * dummy = "dummy"; - DirNodeType * DirNode; + GdkColor transparent = { 0,0,0,0 }; + gchar * root = "/"; + gchar * dummy = "dummy"; + DirNodeType * DirNode; plItem * last; accel_group=gtk_accel_group_new(); @@ -612,12 +612,12 @@ { DirNodeType * DirNode; gtk_ctree_select( GTK_CTREE( CTDirTree ),node ); - DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( CTDirTree ),node ); - current_path=DirNode->path; + DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( CTDirTree ),node ); + current_path=DirNode->path; scan_dir( DirNode->path ); - free( CLFileSelected ); - CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) ); - break; + free( CLFileSelected ); + CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) ); + break; } } while( pos ); free( tpath );
--- a/gui/dialog/preferences.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/dialog/preferences.c Thu Apr 03 07:55:12 2014 +0000 @@ -233,26 +233,26 @@ case 0: // font encoding comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) - if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; - if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_FONT_ENCODING,0,lEncoding[i].name ); - else mplayer( MPLAYER_SET_FONT_ENCODING,0,(char *)comment ); - break; + if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; + if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_FONT_ENCODING,0,lEncoding[i].name ); + else mplayer( MPLAYER_SET_FONT_ENCODING,0,(char *)comment ); + break; #endif #ifdef CONFIG_ICONV case 1: // sub encoding comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) ); for ( i=0;lEncoding[i].name;i++ ) - if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; - if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_SUB_ENCODING,0,lEncoding[i].name ); - else - { - if ( strcmp( comment,MSGTR_GUI__Default_ ) == 0 ) comment=NULL; - mplayer( MPLAYER_SET_SUB_ENCODING,0,(char *)comment ); - } - if ( !comment) gtk_widget_set_sensitive( CBSubEncoding,(!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBSubUtf8)) && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBSubUnicode))) ); - gtk_widget_set_sensitive( CBSubUtf8,(comment == NULL) ); - gtk_widget_set_sensitive( CBSubUnicode,((comment == NULL) && !gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(CBSubUtf8) )) ); - break; + if ( !gstrcmp( lEncoding[i].comment,comment ) ) break; + if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_SUB_ENCODING,0,lEncoding[i].name ); + else + { + if ( strcmp( comment,MSGTR_GUI__Default_ ) == 0 ) comment=NULL; + mplayer( MPLAYER_SET_SUB_ENCODING,0,(char *)comment ); + } + if ( !comment) gtk_widget_set_sensitive( CBSubEncoding,(!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBSubUtf8)) && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(CBSubUnicode))) ); + gtk_widget_set_sensitive( CBSubUtf8,(comment == NULL) ); + gtk_widget_set_sensitive( CBSubUnicode,((comment == NULL) && !gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(CBSubUtf8) )) ); + break; #endif } } @@ -260,7 +260,7 @@ #define bAConfig 0 #define bVconfig 1 -#define bOk 2 +#define bOk 2 #define bCancel 3 #define bLSubtitle 4 #define bLFont 5 @@ -285,123 +285,123 @@ switch ( GPOINTER_TO_INT(user_data) ) { case bOk: - /* 1st page */ + /* 1st page */ gtkEnableAudioEqualizer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ) ); - gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ); - gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) ); - soft_vol=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ) ); - mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 ); - audio_delay=HSAudioDelayadj->value; + gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ); + gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) ); + soft_vol=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ) ); + mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 ); + audio_delay=HSAudioDelayadj->value; - listSet( &audio_driver_list,ao_driver[0] ); - listSet( &video_driver_list,vo_driver[0] ); + listSet( &audio_driver_list,ao_driver[0] ); + listSet( &video_driver_list,vo_driver[0] ); - /* 2nd page */ - vo_doublebuffering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ) ); - vo_directrendering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDR ) ); + /* 2nd page */ + vo_doublebuffering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ) ); + vo_directrendering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDR ) ); frame_dropping=0; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFramedrop ) ) == TRUE ) frame_dropping=1; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBHFramedrop ) ) == TRUE ) frame_dropping=2; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFramedrop ) ) == TRUE ) frame_dropping=1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBHFramedrop ) ) == TRUE ) frame_dropping=2; - flip=-1; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1; + flip=-1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1; - force_fps=HSFPSadj->value; + force_fps=HSFPSadj->value; - /* 3rd page */ - suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) ); - sub_auto=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); - gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) ); - gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) ); - sub_utf8=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUtf8 ) ); - sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) ); + /* 3rd page */ + suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) ); + sub_auto=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); + gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) ); + gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) ); + sub_utf8=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUtf8 ) ); + sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) ); #ifdef CONFIG_ASS - gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ); - gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) ); - gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) ); - gtkASS.bottom_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSBottomMargin ) ); + gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ); + gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) ); + gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) ); + gtkASS.bottom_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSBottomMargin ) ); #endif - sub_delay=HSSubDelayadj->value; - sub_fps=HSSubFPSadj->value; - sub_pos=(int)HSSubPositionadj->value; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3; + sub_delay=HSSubDelayadj->value; + sub_fps=HSSubFPSadj->value; + sub_pos=(int)HSSubPositionadj->value; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3; /* 4th page */ - setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); + setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); #ifdef CONFIG_FREETYPE - mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); - mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); - mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); - mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,0,0 ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,1,0 ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,2,0 ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,3,0 ); + mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); + mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); + mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); + mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,0,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,1,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,2,0 ); + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,3,0 ); #else - mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); + mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); #endif - /* -- 5th page */ - force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) ); - index_mode=-1; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1; + /* -- 5th page */ + force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) ); + index_mode=-1; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1; - { - int i; - const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); + { + int i; + const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); for( i=0;mpcodecs_vd_drivers[i];i++ ) if ( !gstrcmp( tmp,mpcodecs_vd_drivers[i]->info->name ) ) - { listSet( &video_fm_list,mpcodecs_vd_drivers[i]->info->short_name ); break; } - } + { listSet( &video_fm_list,mpcodecs_vd_drivers[i]->info->short_name ); break; } + } - { - int i; - const char * tmp = gtk_entry_get_text( GTK_ENTRY( EAFM ) ); + { + int i; + const char * tmp = gtk_entry_get_text( GTK_ENTRY( EAFM ) ); for( i=0;mpcodecs_ad_drivers[i];i++ ) if ( !gstrcmp( tmp,mpcodecs_ad_drivers[i]->info->name ) ) - { listSet( &audio_fm_list,mpcodecs_ad_drivers[i]->info->short_name ); break; } - } + { listSet( &audio_fm_list,mpcodecs_ad_drivers[i]->info->short_name ); break; } + } - /* 6th page */ - gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); - gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); - gui_save_pos=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ) ); - gtkShowVideoWindow=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ); - stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); - gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); - gui_tv_digital=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBTVDigital ) ); - player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) ); - mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); + /* 6th page */ + gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); + gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) ); + gui_save_pos=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ) ); + gtkShowVideoWindow=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ); + stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) ); + gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) ); + gui_tv_digital=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBTVDigital ) ); + player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) ); + mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=True; } - else gtkCacheOn=False; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=True; } + else gtkCacheOn=False; - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=True; } - else gtkAutoSyncOn=False; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=True; } + else gtkAutoSyncOn=False; - setdup( &dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) ); - setdup( &cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) ); + setdup( &dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) ); + setdup( &cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) ); - if ( guiInfo.Playing && inform ) - { - gtkMessageBox( MSGBOX_INFORMATION,MSGTR_GUI_MSG_PlaybackNeedsRestart ); - inform = False; - } + if ( guiInfo.Playing && inform ) + { + gtkMessageBox( MSGBOX_INFORMATION,MSGTR_GUI_MSG_PlaybackNeedsRestart ); + inform = False; + } case bCancel: - gtk_widget_destroy( Preferences ); - if ( AudioConfig ) gtk_widget_destroy( AudioConfig ); + gtk_widget_destroy( Preferences ); + if ( AudioConfig ) gtk_widget_destroy( AudioConfig ); #ifdef CONFIG_DXR3 - if ( DXR3Config ) gtk_widget_destroy( DXR3Config ); + if ( DXR3Config ) gtk_widget_destroy( DXR3Config ); #endif - break; + break; case bAConfig: - if ( !ao_driver[0] ) break; + if ( !ao_driver[0] ) break; gtk_widget_set_sensitive( AConfig,FALSE ); if ( !strncmp( ao_driver[0],"oss",3 ) || !strncmp( ao_driver[0],"alsa",4 ) || @@ -410,22 +410,22 @@ ShowAudioConfig(); gtk_widget_set_sensitive( AConfig,TRUE ); } - break; + break; case bVconfig: - if ( !vo_driver[0] ) break; + if ( !vo_driver[0] ) break; gtk_widget_set_sensitive( VConfig,FALSE ); #ifdef CONFIG_DXR3 - if ( !gstrcmp( vo_driver[0],"dxr3" ) ) { ShowDXR3Config(); gtk_widget_set_sensitive( VConfig,TRUE ); } + if ( !gstrcmp( vo_driver[0],"dxr3" ) ) { ShowDXR3Config(); gtk_widget_set_sensitive( VConfig,TRUE ); } #endif - break; + break; #if 0 case bLSubtitle: - break; + break; #endif case bLFont: ShowFileSelector( FILESELECT_FONT ); - gtkSetLayer( FileSelector ); - break; + gtkSetLayer( FileSelector ); + break; } } @@ -437,42 +437,42 @@ switch ( GPOINTER_TO_INT(user_data) ) { case 0: // extra stereo coefficient - if ( !guiInfo.Playing ) break; - mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 ); - break; + if ( !guiInfo.Playing ) break; + mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 ); + break; case 1: // audio delay - audio_delay=HSAudioDelayadj->value; - break; + audio_delay=HSAudioDelayadj->value; + break; case 2: // panscan mplayer( MPLAYER_SET_PANSCAN,HSPanscanadj->value,0 ); - break; + break; case 3: // sub delay sub_delay=HSSubDelayadj->value; - break; + break; case 4: // sub position sub_pos=(int)HSSubPositionadj->value; - break; + break; #ifdef CONFIG_FREETYPE case 6: // font blur - mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); + mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 ); break; case 7: // font outline mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 ); break; case 8: // text scale mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 ); - break; + break; case 9: // osd scale mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 ); - break; + break; #else case 5: // font factor mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 ); - break; + break; #endif case 10: // auto quality - mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); - break; + mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 ); + break; } return FALSE; } @@ -486,51 +486,51 @@ switch ( GPOINTER_TO_INT(user_data) ) { case 0: // extra stereo coefficient - if ( guiInfo.Playing ) - gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) ); - break; + if ( guiInfo.Playing ) + gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) ); + break; // case 1: // normalize // case 2: // equalizer -// if ( guiInfo.Playing ) gtkMessageBox( MSGBOX_WARNING,"Please remember, this function need restart the playing." ); -// break; +// if ( guiInfo.Playing ) gtkMessageBox( MSGBOX_WARNING,"Please remember, this function need restart the playing." ); +// break; case 3: - if ( !gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) - { - window=wsShowWindow; - gtkRaise( Preferences ); - } else window=wsHideWindow; - // NOTE TO MYSELF: doesn't work with a fullscreen window - if ( !guiInfo.Playing ) wsWindowVisibility( &guiApp.videoWindow,window ); - break; + if ( !gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) + { + window=wsShowWindow; + gtkRaise( Preferences ); + } else window=wsHideWindow; + // NOTE TO MYSELF: doesn't work with a fullscreen window + if ( !guiInfo.Playing ) wsWindowVisibility( &guiApp.videoWindow,window ); + break; case 4: case 5: case 6: case 7: - mplayer( MPLAYER_SET_FONT_AUTOSCALE,GPOINTER_TO_INT(user_data) - 4,0 ); - break; + mplayer( MPLAYER_SET_FONT_AUTOSCALE,GPOINTER_TO_INT(user_data) - 4,0 ); + break; case 8: - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtk_widget_set_sensitive( SBCache,TRUE ); - else gtk_widget_set_sensitive( SBCache,FALSE ); - break; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtk_widget_set_sensitive( SBCache,TRUE ); + else gtk_widget_set_sensitive( SBCache,FALSE ); + break; case 9: - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE ); - else gtk_widget_set_sensitive( SBAutoSync,FALSE ); - break; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE ); + else gtk_widget_set_sensitive( SBAutoSync,FALSE ); + break; #ifdef CONFIG_ASS case 10: - if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) ) - { - gtk_widget_set_sensitive( CBASSUseMargins,TRUE ); - gtk_widget_set_sensitive( SBASSTopMargin,TRUE ); - gtk_widget_set_sensitive( SBASSBottomMargin,TRUE ); - } - else - { - gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); - gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); - gtk_widget_set_sensitive( SBASSBottomMargin,FALSE ); - } - break; + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) ) + { + gtk_widget_set_sensitive( CBASSUseMargins,TRUE ); + gtk_widget_set_sensitive( SBASSTopMargin,TRUE ); + gtk_widget_set_sensitive( SBASSBottomMargin,TRUE ); + } + else + { + gtk_widget_set_sensitive( CBASSUseMargins,FALSE ); + gtk_widget_set_sensitive( SBASSTopMargin,FALSE ); + gtk_widget_set_sensitive( SBASSBottomMargin,FALSE ); + } + break; #endif } } @@ -544,25 +544,25 @@ switch ( GPOINTER_TO_INT(user_data) ) { case 0: // audio driver - gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); - gtk_widget_set_sensitive( AConfig,FALSE ); - if ( !strncmp( ao_driver[0],"oss",3 ) || - !strncmp( ao_driver[0],"alsa",4 ) || - !strncmp( ao_driver[0],"esd",3 ) || - !strncmp( ao_driver[0],"sdl",3 ) ) - gtk_widget_set_sensitive( AConfig,TRUE ); + gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); + gtk_widget_set_sensitive( AConfig,FALSE ); + if ( !strncmp( ao_driver[0],"oss",3 ) || + !strncmp( ao_driver[0],"alsa",4 ) || + !strncmp( ao_driver[0],"esd",3 ) || + !strncmp( ao_driver[0],"sdl",3 ) ) + gtk_widget_set_sensitive( AConfig,TRUE ); #ifndef CONFIG_GTK2 if ( !strncmp( ao_driver[0],"arts",4 ) ) gtkMessageBox(MSGBOX_WARNING, MSGTR_GUI_MSG_aRtsBroken); #endif - break; + break; case 1: // video driver - gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); - gtk_widget_set_sensitive( VConfig,FALSE ); + gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); + gtk_widget_set_sensitive( VConfig,FALSE ); #ifdef CONFIG_DXR3 - if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); + if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); #endif - break; + break; } } @@ -596,7 +596,7 @@ #endif #ifdef CONFIG_ICONV iconv_t cd; - GList * CBSubEncoding_items = NULL; + GList * CBSubEncoding_items = NULL; #endif GtkWidget * vbox7; GtkWidget * vbox8; @@ -870,13 +870,13 @@ gtk_box_pack_start( GTK_BOX( hbox9 ),hbox91,TRUE,FALSE,0 ); gtk_widget_show( hbox91 ); SBASSTopMargin=gtkAddSpinButton( MSGTR_GUI_Top":", - (GtkAdjustment *)gtk_adjustment_new(0,0,2000,1,8,0),hbox91 ); + (GtkAdjustment *)gtk_adjustment_new(0,0,2000,1,8,0),hbox91 ); hbox92=gtk_hbox_new( FALSE,0 ); gtk_box_pack_start( GTK_BOX( hbox9 ),hbox92,TRUE,FALSE,0 ); gtk_widget_show( hbox92 ); SBASSBottomMargin=gtkAddSpinButton( MSGTR_GUI_Bottom":", - (GtkAdjustment *)gtk_adjustment_new(0,0,2000,1,8,0),hbox92 ); + (GtkAdjustment *)gtk_adjustment_new(0,0,2000,1,8,0),hbox92 ); label=gtkAddLabel( MSGTR_GUI_OSD_Subtitles,NULL ); gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),2 ),label );
--- a/gui/dialog/skinbrowser.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/dialog/skinbrowser.c Thu Apr 03 07:55:12 2014 +0000 @@ -54,13 +54,13 @@ switch ( GPOINTER_TO_INT(user_data) ) { case 0: // cancel - if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) uiChangeSkin( gtkOldSkin ); - break; + if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) uiChangeSkin( gtkOldSkin ); + break; case 1: // ok - uiChangeSkin( sbSelectedSkin ); // NOTE TO MYSELF: skin already changed! - free( skinName ); - skinName=strdup( sbSelectedSkin ); - break; + uiChangeSkin( sbSelectedSkin ); // NOTE TO MYSELF: skin already changed! + free( skinName ); + skinName=strdup( sbSelectedSkin ); + break; } } gtk_widget_destroy( SkinBrowser );
--- a/gui/ui/main.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/ui/main.c Thu Apr 03 07:55:12 2014 +0000 @@ -107,7 +107,7 @@ switch ( Button ) { case wsPMMouseButton: - gtkShow( ivHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); uiMenuShow( RX,RY ); itemtype=itPRMButton; break; @@ -116,7 +116,7 @@ break; case wsPLMouseButton: - gtkShow( ivHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); sx=X; sy=Y; boxMoved=True; itemtype=itPLMButton; SelectedItem=currentselected; if ( SelectedItem == -1 ) break; @@ -150,7 +150,7 @@ case itHPotmeter: value=100.0 * ( X - item->x ) / item->width; break; - case itVPotmeter: + case itVPotmeter: value=100.0 - 100.0 * ( Y - item->y ) / item->height; break; } @@ -215,12 +215,12 @@ { // NOTE TO MYSELF: This is only for the Acer AirKey V keyboard. /*case wsXFMMPrev: msg=evPrev; break; - case wsXFMMStop: msg=evStop; break; - case wsXFMMPlay: msg=evPlaySwitchToPause; break; - case wsXFMMNext: msg=evNext; break; - case wsXFMMVolUp: msg=evIncVolume; break; + case wsXFMMStop: msg=evStop; break; + case wsXFMMPlay: msg=evPlaySwitchToPause; break; + case wsXFMMNext: msg=evNext; break; + case wsXFMMVolUp: msg=evIncVolume; break; case wsXFMMVolDown: msg=evDecVolume; break; - case wsXFMMMute: msg=evMute; break;*/ + case wsXFMMMute: msg=evMute; break;*/ } } else @@ -238,11 +238,11 @@ case wsXF86Next: msg=evNext; break; case wsXF86Media: msg=evLoad; break; case wsEscape: - if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.videoWindow.isFullScreen ) - { - uiEvent( evNormalSize,0 ); - return; - } + if ( guiInfo.VideoWindow && guiInfo.Playing && guiApp.videoWindow.isFullScreen ) + { + uiEvent( evNormalSize,0 ); + return; + } default: vo_x11_putkey( Key ); return; } } @@ -276,25 +276,25 @@ /* check if it is a subtitle file */ { - char* ext = strrchr(str,'.'); - if (ext) { - static char supported[] = "utf/sub/srt/smi/rt//txt/ssa/aqt/"; - char* type; - int len; - if((len=strlen(++ext)) && (type=strstr(supported,ext)) &&\ - (type-supported)%4 == 0 && *(type+len) == '/'){ - /* handle subtitle file */ - nfree(subtitles); - subtitles = str; - continue; - } - } + char* ext = strrchr(str,'.'); + if (ext) { + static char supported[] = "utf/sub/srt/smi/rt//txt/ssa/aqt/"; + char* type; + int len; + if((len=strlen(++ext)) && (type=strstr(supported,ext)) &&\ + (type-supported)%4 == 0 && *(type+len) == '/'){ + /* handle subtitle file */ + nfree(subtitles); + subtitles = str; + continue; + } + } } /* clear playlist */ if (file == NULL) { - file = files[f]; - listMgr(PLAYLIST_DELETE,0); + file = files[f]; + listMgr(PLAYLIST_DELETE,0); } item = calloc(1,sizeof(plItem)); @@ -304,13 +304,13 @@ /* FIXME: decompose file name ? */ /* yes -- Pontscho */ if ( s ) { - *s=0; s++; - item->name = gstrdup( s ); - item->path = gstrdup( str ); + *s=0; s++; + item->name = gstrdup( s ); + item->path = gstrdup( str ); } else { - // NOTE TO MYSELF: this shouldn't happen, make sure we have a full path - item->name = strdup(str); - item->path = strdup("."); + // NOTE TO MYSELF: this shouldn't happen, make sure we have a full path + item->name = strdup(str); + item->path = strdup("."); } listMgr(PLAYLIST_ITEM_APPEND,item); } else {
--- a/gui/ui/playbar.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/ui/playbar.c Thu Apr 03 07:55:12 2014 +0000 @@ -55,9 +55,9 @@ unsigned int GetTimer( void ); unsigned char * playbarDrawBuffer = NULL; -int playbarVisible = False; -int playbarLength = 0; -int uiPlaybarFade = 0; +int playbarVisible = False; +int playbarLength = 0; +int uiPlaybarFade = 0; static void uiPlaybarDraw( void ) { @@ -79,26 +79,26 @@ case 1: // fade in playbarLength--; if ( guiApp.videoWindow.Height - guiApp.playbar.height >= playbarLength ) - { - playbarLength=guiApp.videoWindow.Height - guiApp.playbar.height; - uiPlaybarFade=0; - wsMouseVisibility(&guiApp.videoWindow, wsShowMouseCursor); - } + { + playbarLength=guiApp.videoWindow.Height - guiApp.playbar.height; + uiPlaybarFade=0; + wsMouseVisibility(&guiApp.videoWindow, wsShowMouseCursor); + } wsWindowMove( &guiApp.playbarWindow,True,x,playbarLength ); - break; + break; case 2: // fade out - playbarLength+=10; - if ( playbarLength > guiApp.videoWindow.Height ) - { - playbarLength=guiApp.videoWindow.Height; - uiPlaybarFade=0; - playbarVisible=False; + playbarLength+=10; + if ( playbarLength > guiApp.videoWindow.Height ) + { + playbarLength=guiApp.videoWindow.Height; + uiPlaybarFade=0; + playbarVisible=False; wsMouseVisibility(&guiApp.videoWindow, wsHideMouseCursor); wsWindowVisibility( &guiApp.playbarWindow,wsHideWindow ); - return; - } + return; + } wsWindowMove( &guiApp.playbarWindow,True,x,playbarLength ); - break; + break; } /* render */ @@ -122,10 +122,10 @@ static int itemtype = 0; int i; guiItem * item = NULL; - float value = 0.0f; + float value = 0.0f; static int SelectedItem = -1; - int currentselected = -1; + int currentselected = -1; for ( i=0;i <= guiApp.IndexOfPlaybarItems;i++ ) if ( ( guiApp.playbarItems[i].pressed != btnDisabled )&& @@ -143,50 +143,50 @@ break; case wsRRMouseButton: gtkShow( ivShowPopUpMenu,NULL ); - break; + break; /* --- */ case wsPLMouseButton: - gtkShow( ivHidePopUpMenu,NULL ); + gtkShow( ivHidePopUpMenu,NULL ); SelectedItem=currentselected; if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window item=&guiApp.playbarItems[SelectedItem]; - itemtype=item->type; - item->pressed=btnPressed; + itemtype=item->type; + item->pressed=btnPressed; - switch( item->type ) - { - case itButton: - if ( ( SelectedItem > -1 ) && - ( ( ( item->message == evPlaySwitchToPause && item->message == evPauseSwitchToPlay ) ) || - ( ( item->message == evPauseSwitchToPlay && item->message == evPlaySwitchToPause ) ) ) ) - { item->pressed=btnDisabled; } - break; - } + switch( item->type ) + { + case itButton: + if ( ( SelectedItem > -1 ) && + ( ( ( item->message == evPlaySwitchToPause && item->message == evPauseSwitchToPlay ) ) || + ( ( item->message == evPauseSwitchToPlay && item->message == evPlaySwitchToPause ) ) ) ) + { item->pressed=btnDisabled; } + break; + } - break; + break; case wsRLMouseButton: if ( SelectedItem != -1 ) // NOTE TO MYSELF: only if itButton, itHPotmeter or itVPotmeter { item=&guiApp.playbarItems[SelectedItem]; item->pressed=btnReleased; } - if ( currentselected == - 1 || SelectedItem == -1 ) { itemtype=0; break; } - SelectedItem=-1; - value=0; + if ( currentselected == - 1 || SelectedItem == -1 ) { itemtype=0; break; } + SelectedItem=-1; + value=0; - switch( itemtype ) - { - case itHPotmeter: - value=100.0 * ( X - item->x ) / item->width; - break; - case itVPotmeter: - value=100.0 - 100.0 * ( Y - item->y ) / item->height; - break; - } - uiEvent( item->message,value ); + switch( itemtype ) + { + case itHPotmeter: + value=100.0 * ( X - item->x ) / item->width; + break; + case itVPotmeter: + value=100.0 - 100.0 * ( Y - item->y ) / item->height; + break; + } + uiEvent( item->message,value ); - itemtype=0; - break; + itemtype=0; + break; /* --- */ case wsP5MouseButton: value=-2.5f; goto rollerhandled; case wsP4MouseButton: value= 2.5f; @@ -199,27 +199,27 @@ item->value+=value; uiEvent( item->message,item->value ); } - } - break; + } + break; /* --- */ case wsMoveMouse: item=&guiApp.playbarItems[SelectedItem]; - switch ( itemtype ) - { - case itPRMButton: - if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 ); - break; - case itVPotmeter: - item->value=100.0 - 100.0 * ( Y - item->y ) / item->height; - goto potihandled; - case itHPotmeter: - item->value=100.0 * ( X - item->x ) / item->width; + switch ( itemtype ) + { + case itPRMButton: + if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 ); + break; + case itVPotmeter: + item->value=100.0 - 100.0 * ( Y - item->y ) / item->height; + goto potihandled; + case itHPotmeter: + item->value=100.0 * ( X - item->x ) / item->width; potihandled: - if ( item->value > 100.0f ) item->value=100.0f; - if ( item->value < 0.0f ) item->value=0.0f; - uiEvent( item->message,item->value ); - break; - } + if ( item->value > 100.0f ) item->value=100.0f; + if ( item->value < 0.0f ) item->value=0.0f; + uiEvent( item->message,item->value ); + break; + } break; } }
--- a/gui/ui/video.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/ui/video.c Thu Apr 03 07:55:12 2014 +0000 @@ -94,7 +94,7 @@ case wsPMMouseButton: if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 ); break; - default: uiPlaybarShow( Y ); break; + default: uiPlaybarShow( Y ); break; } break; case wsRLMouseButton: @@ -103,7 +103,7 @@ // NOTE TO MYSELF: this doesn't work, fix later with wsWindowLayer()? if( videoVisible++%2 ) wsWindowRaiseTop( wsDisplay,guiApp.mainWindow.WindowID ); else wsWindowRaiseTop( wsDisplay,guiApp.videoWindow.WindowID ); - } + } msButton=0; mplVideoMoved=0; break;
--- a/gui/wm/wsxdnd.c Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/wm/wsxdnd.c Thu Apr 03 07:55:12 2014 +0000 @@ -111,37 +111,37 @@ int num = 0; while(retain < delme + ret_items) { - if (!strncmp(retain,"file:",5)) { - /* add more 2 chars while removing 5 is harmless */ - retain+=5; - } + if (!strncmp(retain,"file:",5)) { + /* add more 2 chars while removing 5 is harmless */ + retain+=5; + } - /* add the "retain" to the list */ - files[num++]=retain; + /* add the "retain" to the list */ + files[num++]=retain; - /* now check for special characters */ - { - int newone = 0; - while(retain < (delme + ret_items)){ - if(*retain == '\r' || *retain == '\n'){ - *retain=0; - newone = 1; - } else { - if (newone) - break; - } - retain++; - } - } + /* now check for special characters */ + { + int newone = 0; + while(retain < (delme + ret_items)){ + if(*retain == '\r' || *retain == '\n'){ + *retain=0; + newone = 1; + } else { + if (newone) + break; + } + retain++; + } + } - if (num >= MAX_DND_FILES) - break; + if (num >= MAX_DND_FILES) + break; } /* Handle the files */ if(win->DNDHandler){ - win->DNDHandler(num,files); + win->DNDHandler(num,files); } } @@ -165,12 +165,12 @@ if ((event->data.l[1] & 1) == 0){ int index; for(index = 0; index <= 2 ; index++){ - if ((Atom) event->data.l[2+index] == ok) { - atom_support = ok; - } + if ((Atom) event->data.l[2+index] == ok) { + atom_support = ok; + } } if (atom_support == None) { - mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_GUI_MSG_NotAFile0 ); + mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_GUI_MSG_NotAFile0 ); } } else { /* need to check the whole list here */ @@ -183,29 +183,29 @@ /* while there is data left...*/ while(ret_left && atom_support == None){ - XGetWindowProperty(wsDisplay,event->data.l[0],XA_XdndTypeList, - offset,256,False,XA_ATOM,&ret_type, - &ret_format,&ret_items,&ret_left, - (unsigned char**)&ret_buff); + XGetWindowProperty(wsDisplay,event->data.l[0],XA_XdndTypeList, + offset,256,False,XA_ATOM,&ret_type, + &ret_format,&ret_items,&ret_left, + (unsigned char**)&ret_buff); - /* sanity checks...*/ - if(ret_buff == NULL || ret_type != XA_ATOM || ret_format != 8*sizeof(Atom)){ - XFree(ret_buff); - break; - } - /* now chek what we've got */ - { - unsigned long i; - for(i=0; i<ret_items; i++){ - if(ret_buff[i] == ok){ - atom_support = ok; - break; - } - } - } - /* maybe next time ... */ - XFree(ret_buff); - offset += 256; + /* sanity checks...*/ + if(ret_buff == NULL || ret_type != XA_ATOM || ret_format != 8*sizeof(Atom)){ + XFree(ret_buff); + break; + } + /* now chek what we've got */ + { + unsigned long i; + for(i=0; i<ret_items; i++){ + if(ret_buff[i] == ok){ + atom_support = ok; + break; + } + } + } + /* maybe next time ... */ + XFree(ret_buff); + offset += 256; } } return True; @@ -221,8 +221,8 @@ } if (atom_support != None) { XConvertSelection(wsDisplay, XA_XdndSelection, atom_support, - XA_XdndSelection, event->window, - CurrentTime); + XA_XdndSelection, event->window, + CurrentTime); } return True; }
--- a/gui/wm/wsxdnd.h Wed Apr 02 20:16:31 2014 +0000 +++ b/gui/wm/wsxdnd.h Thu Apr 03 07:55:12 2014 +0000 @@ -33,42 +33,42 @@ /* header was ripped from xdnd's example on its page */ #define XDND_THREE 3 -#define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0]) -#define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0) -#define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) -#define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24) -#define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24) -#define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + (i)]) /* i => (0, 1, 2) */ +#define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0) +#define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) +#define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24) +#define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24) +#define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + (i)]) /* i => (0, 1, 2) */ /* XdndPosition */ -#define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0]) -#define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16) -#define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL) -#define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL) -#define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3]) -#define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4]) +#define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16) +#define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL) +#define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL) +#define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3]) +#define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4]) /* XdndStatus */ -#define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0]) -#define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L) +#define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L) #define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL) -#define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL) +#define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL) #define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL) -#define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16) -#define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL) -#define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16) -#define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL) -#define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); } -#define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4]) +#define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16) +#define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL) +#define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16) +#define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL) +#define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); } +#define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4]) /* XdndLeave */ -#define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0]) /* XdndDrop */ -#define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0]) -#define XDND_DROP_TIME(e) ((e)->xclient.data.l[2]) +#define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_DROP_TIME(e) ((e)->xclient.data.l[2]) /* XdndFinished */ -#define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0]) +#define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0]) #endif /* MPLAYER_GUI_WSXDND_H */