diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:26:13 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-07-07 02:34:35 +0300 |
commit | 0eb321bf2c1cc0e048faff26a01f86cdd3ec254f (patch) | |
tree | 71cb9bd9ed121156d3382066c0722c73189afe04 /gui | |
parent | 6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff) |
Remove trailing whitespace from most files
Diffstat (limited to 'gui')
-rw-r--r-- | gui/app.c | 6 | ||||
-rw-r--r-- | gui/app.h | 4 | ||||
-rw-r--r-- | gui/bitmap.c | 10 | ||||
-rw-r--r-- | gui/cfg.c | 19 | ||||
-rw-r--r-- | gui/interface.c | 94 | ||||
-rw-r--r-- | gui/interface.h | 6 | ||||
-rw-r--r-- | gui/mplayer/gtk/about.c | 30 | ||||
-rw-r--r-- | gui/mplayer/gtk/eq.c | 45 | ||||
-rw-r--r-- | gui/mplayer/gtk/gtk_common.c | 2 | ||||
-rw-r--r-- | gui/mplayer/gtk/gtk_url.c | 17 | ||||
-rw-r--r-- | gui/mplayer/gtk/mb.c | 8 | ||||
-rw-r--r-- | gui/mplayer/gtk/menu.c | 24 | ||||
-rw-r--r-- | gui/mplayer/gtk/opts.c | 94 | ||||
-rw-r--r-- | gui/mplayer/gtk/pl.c | 17 | ||||
-rw-r--r-- | gui/mplayer/gtk/sb.c | 2 | ||||
-rw-r--r-- | gui/mplayer/gui_common.c | 10 | ||||
-rw-r--r-- | gui/mplayer/mw.c | 32 | ||||
-rw-r--r-- | gui/mplayer/pb.c | 28 | ||||
-rw-r--r-- | gui/mplayer/play.c | 24 | ||||
-rw-r--r-- | gui/mplayer/sw.c | 2 | ||||
-rw-r--r-- | gui/mplayer/widgets.c | 20 | ||||
-rw-r--r-- | gui/skin/cut.c | 5 | ||||
-rw-r--r-- | gui/skin/font.c | 30 | ||||
-rw-r--r-- | gui/skin/skin.c | 26 | ||||
-rw-r--r-- | gui/wm/ws.c | 16 | ||||
-rw-r--r-- | gui/wm/wsxdnd.c | 18 |
26 files changed, 292 insertions, 297 deletions
@@ -72,7 +72,7 @@ static const evName evNames[] = { evSetMoviePosition, "evSetMoviePosition" }, { evSetVolume, "evSetVolume" }, { evSetBalance, "evSetBalance" }, - { evHelp, "evHelp" }, + { evHelp, "evHelp" }, { evLoadSubtitle, "evLoadSubtitle" }, { evPlayDVD, "evPlayDVD" }, { evPlayVCD, "evPlayVCD" }, @@ -108,7 +108,7 @@ void appClearItem( wItem * item ) item->tmp=0; item->key=0; item->key2=0; item->Bitmap.Width=0; item->Bitmap.Height=0; item->Bitmap.BPP=0; item->Bitmap.ImageSize=0; - if ( item->Bitmap.Image ) free( item->Bitmap.Image ); + if ( item->Bitmap.Image ) free( item->Bitmap.Image ); item->Bitmap.Image=NULL; // --- item->fontid=0; @@ -235,5 +235,5 @@ void btnSet( int event,int set ) { appMPlayer.Items[j].pressed=set; appMPlayer.barItems[j].tmp=0; } for ( j=0;j<appMPlayer.NumberOfBarItems + 1;j++ ) if ( appMPlayer.barItems[j].msg == event ) - { appMPlayer.barItems[j].pressed=set; appMPlayer.barItems[j].tmp=0; } + { appMPlayer.barItems[j].pressed=set; appMPlayer.barItems[j].tmp=0; } } @@ -150,7 +150,7 @@ typedef struct char * label; // --- int event; -// --- +// --- int R,G,B; } wItem; @@ -166,7 +166,7 @@ typedef struct wItem bar; wsTWindow barWindow; int barIsPresent; - + wItem menuBase; wItem menuSelected; wsTWindow menuWindow; diff --git a/gui/bitmap.c b/gui/bitmap.c index df937e06c5..6cf7d35d60 100644 --- a/gui/bitmap.c +++ b/gui/bitmap.c @@ -34,9 +34,9 @@ static int pngRead( unsigned char * fname,txSample * bf ) int len; AVCodecContext *avctx; AVFrame *frame; - + FILE *fp=fopen( fname,"rb" ); - if ( !fp ) + if ( !fp ) { mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[png] file read error ( %s )\n",fname ); return 1; @@ -108,10 +108,10 @@ static int conv24to32( txSample * bf ) static void Normalize( txSample * bf ) { int i; -#ifndef WORDS_BIGENDIAN +#ifndef WORDS_BIGENDIAN for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i+3]=0; #else - for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i]=0; + for ( i=0;i < (int)bf->ImageSize;i+=4 ) bf->Image[i]=0; #endif } @@ -146,7 +146,7 @@ int bpRead( char * fname, txSample * bf ) { fname=fExist( fname ); if ( fname == NULL ) return -2; - if ( pngRead( fname,bf ) ) + if ( pngRead( fname,bf ) ) { mp_dbg( MSGT_GPLAYER,MSGL_FATAL,"[bitmap] unknown file type ( %s )\n",fname ); return -5; @@ -106,7 +106,7 @@ static m_config_t * gui_conf; static const m_option_t gui_opts[] = { { "enable_audio_equ",>kEnableAudioEqualizer,CONF_TYPE_FLAG,0,0,1,NULL }, - + { "vo_driver",&video_driver_list,CONF_TYPE_STRING_LIST,0,0,0,NULL }, { "vo_panscan",&vo_panscan,CONF_TYPE_FLOAT,CONF_RANGE,0.0,1.0,NULL }, { "vo_doublebuffering",&vo_doublebuffering,CONF_TYPE_FLAG,0,0,1,NULL }, @@ -153,7 +153,7 @@ static const m_option_t gui_opts[] = { "dvd_device",&dvd_device,CONF_TYPE_STRING,0,0,0,NULL }, { "cdrom_device",&cdrom_device,CONF_TYPE_STRING,0,0,0,NULL }, - + { "osd_level",&osd_level,CONF_TYPE_INT,CONF_RANGE,0,3,NULL }, { "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL }, { "sub_unicode",&sub_unicode,CONF_TYPE_FLAG,0,0,1,NULL }, @@ -182,14 +182,14 @@ static const m_option_t gui_opts[] = { "cache",>kCacheOn,CONF_TYPE_FLAG,0,0,1,NULL }, { "cache_size",>kCacheSize,CONF_TYPE_INT,CONF_RANGE,-1,65535,NULL }, - { "playbar",>kEnablePlayBar,CONF_TYPE_FLAG,0,0,1,NULL }, + { "playbar",>kEnablePlayBar,CONF_TYPE_FLAG,0,0,1,NULL }, { "load_fullscreen",>kLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL }, { "show_videowin", >kShowVideoWindow,CONF_TYPE_FLAG,0,0,1,NULL }, { "stopxscreensaver",&stop_xscreensaver,CONF_TYPE_FLAG,0,0,1,NULL }, { "autosync",>kAutoSyncOn,CONF_TYPE_FLAG,0,0,1,NULL }, { "autosync_size",>kAutoSync,CONF_TYPE_INT,CONF_RANGE,0,10000,NULL }, - + { "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL }, { "gui_save_pos", &gui_save_pos, CONF_TYPE_FLAG,0,0,1,NULL}, @@ -204,7 +204,7 @@ static const m_option_t gui_opts[] = { "equ_channel_4",>kEquChannel4,CONF_TYPE_STRING,0,0,0,NULL }, { "equ_channel_5",>kEquChannel5,CONF_TYPE_STRING,0,0,0,NULL }, { "equ_channel_6",>kEquChannel6,CONF_TYPE_STRING,0,0,0,NULL }, - + #if 1 #define audio_equ_row( i,j ) { "equ_band_"#i#j,>kEquChannels[i][j],CONF_TYPE_FLOAT,CONF_RANGE,-15.0,15.0,NULL }, audio_equ_row( 0,0 ) audio_equ_row( 0,1 ) audio_equ_row( 0,2 ) audio_equ_row( 0,3 ) audio_equ_row( 0,4 ) audio_equ_row( 0,5 ) audio_equ_row( 0,6 ) audio_equ_row( 0,7 ) audio_equ_row( 0,8 ) audio_equ_row( 0,9 ) @@ -240,7 +240,7 @@ int cfg_read( void ) mp_msg( MSGT_GPLAYER,MSGL_V,"[cfg] reading config file: %s\n",cfg ); gui_conf=m_config_new(); m_config_register_options( gui_conf,gui_opts ); - if ( !disable_gui_conf && m_config_parse_config_file( gui_conf,cfg ) < 0 ) + if ( !disable_gui_conf && m_config_parse_config_file( gui_conf,cfg ) < 0 ) { mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_ConfigFileError ); // exit( 1 ); @@ -305,7 +305,7 @@ int cfg_write( void ) FILE * f; int i; -// -- save configuration +// -- save configuration if ( (f=fopen( cfg,"wt+" )) ) { for ( i=0;gui_opts[i].name;i++ ) @@ -323,7 +323,7 @@ int cfg_write( void ) fclose( f ); } free( cfg ); - + // -- save playlist cfg=get_path( "gui.pl" ); if ( (f=fopen( cfg,"wt+" )) ) @@ -332,7 +332,7 @@ int cfg_write( void ) while ( plCurrent ) { if ( plCurrent->path && plCurrent->name ) - { + { fprintf( f,"%s\n",plCurrent->path ); fprintf( f,"%s\n",plCurrent->name ); } @@ -369,4 +369,3 @@ int cfg_write( void ) return 0; } - diff --git a/gui/interface.c b/gui/interface.c index f41c5332bf..4a2103ec84 100644 --- a/gui/interface.c +++ b/gui/interface.c @@ -82,10 +82,10 @@ char * gstrcat( char ** dest,const char * src ) if ( *dest ) { tmp=malloc( strlen( *dest ) + strlen( src ) + 1 ); - + if ( tmp ) /* TODO: advanced error handling */ { - strcpy( tmp,*dest ); strcat( tmp,src ); free( *dest ); + strcpy( tmp,*dest ); strcat( tmp,src ); free( *dest ); } } else @@ -175,7 +175,7 @@ void greplace(char ***list, const char *search, const char *replace) (*list)[i] = gstrdup(replace); (*list)[i + 1] = NULL; } - + void guiInit( void ) { int i; @@ -191,7 +191,7 @@ void guiInit( void ) if ( stream_cache_size > 0 ) { gtkCacheOn=1; gtkCacheSize=stream_cache_size; } else if ( stream_cache_size == 0 ) gtkCacheOn = 0; if ( autosync && autosync != gtkAutoSync ) { gtkAutoSyncOn=1; gtkAutoSync=autosync; } - + #ifdef CONFIG_ASS gtkASS.enabled = ass_enabled; gtkASS.use_margins = ass_use_margins; @@ -200,7 +200,7 @@ void guiInit( void ) #endif gtkInit(); -// --- initialize X +// --- initialize X wsXInit( (void *)mDisplay ); // --- load skin skinDirInHome=get_path("skins"); @@ -245,7 +245,7 @@ void guiInit( void ) appMPlayer.sub.y=0; } if (guiWinID>=0) appMPlayer.mainWindow.Parent=guiWinID; - + wsCreateWindow( &appMPlayer.subWindow, appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"MPlayer - Video" ); @@ -295,11 +295,11 @@ void guiInit( void ) wsSetIcon( wsDisplay,appMPlayer.mainWindow.WindowID,guiIcon,guiIconMask ); wsSetIcon( wsDisplay,appMPlayer.subWindow.WindowID,guiIcon,guiIconMask ); - + guiIntfStruct.Playing=0; if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 ); - + wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow ); #if 0 wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); @@ -369,7 +369,7 @@ void guiDone( void ) gui_main_pos_x=appMPlayer.mainWindow.X; gui_main_pos_y=appMPlayer.mainWindow.Y; gui_sub_pos_x=appMPlayer.subWindow.X; gui_sub_pos_y=appMPlayer.subWindow.Y; } - + #ifdef CONFIG_ASS ass_enabled = gtkASS.enabled; ass_use_margins = gtkASS.use_margins; @@ -426,7 +426,7 @@ void guiLoadFont( void ) { vo_font=read_font_desc( font_name,font_factor,0 ); if ( !vo_font ) mp_msg( MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadFont,font_name ); - } + } else { font_name=gstrdup( get_path( "font/font.desc" ) ); @@ -479,9 +479,9 @@ void guiLoadSubtitle( char * name ) mp_msg( MSGT_GPLAYER,MSGL_INFO,MSGTR_LoadingSubtitles,name ); subdata=sub_read_file( name, guiIntfStruct.FPS ); if ( !subdata ) mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_CantLoadSub,name ); - sub_name = (malloc(2 * sizeof(char*))); //when mplayer will be restarted - sub_name[0] = strdup(name); //sub_name[0] will be read - sub_name[1] = NULL; + sub_name = (malloc(2 * sizeof(char*))); //when mplayer will be restarted + sub_name[0] = strdup(name); //sub_name[0] will be read + sub_name[1] = NULL; } update_set_of_subtitles(); @@ -530,7 +530,7 @@ int guiGetEvent( int type,char * arg ) stream_t * stream = (stream_t *) arg; #ifdef CONFIG_DVDREAD dvd_priv_t * dvdp = (dvd_priv_t *) arg; -#endif +#endif if (guiIntfStruct.mpcontext) { audio_out = mpctx_get_audio_out(guiIntfStruct.mpcontext); @@ -548,7 +548,7 @@ int guiGetEvent( int type,char * arg ) case guiCEvent: switch ( (int)arg ) { - case guiSetPlay: + case guiSetPlay: guiIntfStruct.Playing=1; // if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); break; @@ -612,15 +612,15 @@ int guiGetEvent( int type,char * arg ) switch( stream->type ) { #ifdef CONFIG_DVDREAD - case STREAMTYPE_DVD: + case STREAMTYPE_DVD: guiGetEvent( guiSetDVD,(char *)stream->priv ); break; #endif #ifdef CONFIG_VCD - case STREAMTYPE_VCD: + case STREAMTYPE_VCD: { int i; - + if (!stream->priv) { guiIntfStruct.VCDTracks=0; @@ -678,10 +678,10 @@ int guiGetEvent( int type,char * arg ) } if ( guiIntfStruct.NoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); - + if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,btnDisabled ); else btnSet( evSetMoviePosition,btnReleased ); - + // -- audio if ( audio_out ) { @@ -732,14 +732,14 @@ int guiGetEvent( int type,char * arg ) vcd_track=0; dvd_title=0; force_fps=0; - } + } guiIntfStruct.demuxer=NULL; guiIntfStruct.sh_video=NULL; wsPostRedisplay( &appMPlayer.subWindow ); break; case guiSetParameters: guiGetEvent( guiSetDefaults,NULL ); - switch ( guiIntfStruct.StreamType ) + switch ( guiIntfStruct.StreamType ) { case STREAMTYPE_PLAYLIST: break; @@ -765,32 +765,32 @@ int guiGetEvent( int type,char * arg ) #endif } //if ( guiIntfStruct.StreamType != STREAMTYPE_PLAYLIST ) // Does not make problems anymore! - { + { if ( guiIntfStruct.Filename ) filename=gstrdup( guiIntfStruct.Filename ); else if ( filename ) guiSetFilename( guiIntfStruct.Filename,filename ); } // --- video opts - + if ( !video_driver_list ) { int i = 0; while ( video_out_drivers[i++] ) - if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) + if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) { gaddlist( &video_driver_list,(char *)video_out_drivers[i - 1]->info->short_name ); break; } } - + if ( !video_driver_list && !video_driver_list[0] ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_IDFGCVD ); exit_player( "gui init" ); } { int i = 0; guiIntfStruct.NoWindow=False; while ( video_out_drivers[i++] ) - if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) + if ( video_out_drivers[i - 1]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) { - if ( ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) )&&( video_out_drivers[i - 1]->control( VOCTRL_GUI_NOWINDOW,NULL ) == VO_TRUE ) ) + if ( ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) )&&( video_out_drivers[i - 1]->control( VOCTRL_GUI_NOWINDOW,NULL ) == VO_TRUE ) ) { guiIntfStruct.NoWindow=True; break; } } } @@ -809,10 +809,10 @@ int guiGetEvent( int type,char * arg ) } } #endif -// --- +// --- if ( gtkVfPP ) add_vf( "pp" ); else remove_vf( "pp" ); - + // --- audio opts // if ( ao_plugin_cfg.plugin_list ) { free( ao_plugin_cfg.plugin_list ); ao_plugin_cfg.plugin_list=NULL; } if (gtkAONorm) @@ -891,14 +891,14 @@ int guiGetEvent( int type,char * arg ) gtkSubDumpMPSub=gtkSubDumpSrt=0; guiLoadFont(); -// --- misc +// --- misc if ( gtkCacheOn ) stream_cache_size=gtkCacheSize; if ( gtkAutoSyncOn ) autosync=gtkAutoSync; if ( guiIntfStruct.AudioFile ) audio_stream=gstrdup( guiIntfStruct.AudioFile ); else if ( guiIntfStruct.FilenameChanged ) gfree( (void**)&audio_stream ); //audio_stream=NULL; - + guiIntfStruct.DiskChanged=0; guiIntfStruct.FilenameChanged=0; guiIntfStruct.NewPlay=0; @@ -921,7 +921,7 @@ void guiEventHandling( void ) gtkEventHandling(); } -// --- +// --- float gtkEquChannels[6][10]; @@ -953,7 +953,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) { equalizer_t * eq = (equalizer_t *)vparam; plItem * item = (plItem *)vparam; - + URLItem * url_item = (URLItem *)vparam; int is_added = True; @@ -988,7 +988,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) if ( plCurrent && plCurrent->next) { plCurrent=plCurrent->next; - /*if ( !plCurrent && plList ) + /*if ( !plCurrent && plList ) { plItem * next = plList; while ( next->next ) { if ( !next->next ) break; next=next->next; } @@ -1026,7 +1026,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) // Free it if ( curr->path ) free( curr->path ); if ( curr->name ) free( curr->name ); - free( curr ); + free( curr ); } mplCurr(); // Instead of using mplNext && mplPrev @@ -1040,7 +1040,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) { if ( curr->path ) free( curr->path ); if ( curr->name ) free( curr->name ); - free( curr ); + free( curr ); } else { @@ -1049,7 +1049,7 @@ void * gtkSet( int cmd,float fparam, void * vparam ) next=curr->next; if ( curr->path ) free( curr->path ); if ( curr->name ) free( curr->name ); - free( curr ); + free( curr ); curr=next; } } @@ -1201,7 +1201,7 @@ int import_file_into_gui(char* temp, int insert) { char *filename, *pathname; plItem * item; - + filename = strdup(mp_basename(temp)); pathname = strdup(temp); if (strlen(pathname)-strlen(filename)>0) @@ -1231,10 +1231,10 @@ int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t* confi { play_tree_iter_t* my_pt_iter=NULL; int result=0; - + if (!enqueue) // Delete playlist before "appending" gtkSet(gtkDelPl,0,0); - + if((my_pt_iter=pt_iter_create(&my_playtree,config))) { while ((filename=pt_iter_get_next_file(my_pt_iter))!=NULL) @@ -1250,7 +1250,7 @@ int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t* confi if (!enqueue) filename=guiIntfStruct.Filename; // Backward compatibility; if file is specified on commandline, // gmplayer does directly start in Play-Mode. - else + else filename=NULL; return result; @@ -1262,7 +1262,7 @@ int import_initial_playtree_into_gui(play_tree_t* my_playtree, m_config_t* confi // The file which contained the playlist is thereby replaced with it's contents. int import_playtree_playlist_into_gui(play_tree_t* my_playtree, m_config_t* config) -{ +{ play_tree_iter_t* my_pt_iter=NULL; int result=0; plItem * save=(plItem*)gtkSet( gtkGetCurrPlItem, 0, 0); // Save current item @@ -1271,23 +1271,23 @@ int import_playtree_playlist_into_gui(play_tree_t* my_playtree, m_config_t* conf { while ((filename=pt_iter_get_next_file(my_pt_iter))!=NULL) { - if (import_file_into_gui(filename, 1)) // insert it into the list and set plCurrent=new item + if (import_file_into_gui(filename, 1)) // insert it into the list and set plCurrent=new item result=1; } pt_iter_destroy(&my_pt_iter); } - if (save) + if (save) gtkSet(gtkSetCurrPlItem, 0, (void*)save); else gtkSet(gtkSetCurrPlItem, 0, (void*)plList); // go to head, if plList was empty before if (save && result) gtkSet(gtkDelCurrPlItem, 0, 0); - + mplCurr(); // Update filename filename=NULL; - + return result; } diff --git a/gui/interface.h b/gui/interface.h index 65d9a0abd4..5ac532c481 100644 --- a/gui/interface.h +++ b/gui/interface.h @@ -70,7 +70,7 @@ typedef struct guiResizeStruct resize; guiVideoStruct videodata; guiUnknownErrorStruct error; - + struct MPContext * mpcontext; void * sh_video; void * afilter; @@ -116,10 +116,10 @@ typedef struct char * Subtitlename; int SubtitleChanged; - + char * Othername; int OtherChanged; - + char * AudioFile; int AudioFileChanged; diff --git a/gui/mplayer/gtk/about.c b/gui/mplayer/gtk/about.c index d14d449e5f..ea3adf0717 100644 --- a/gui/mplayer/gtk/about.c +++ b/gui/mplayer/gtk/about.c @@ -69,7 +69,7 @@ GtkWidget * create_About( void ) gtk_widget_realize( About ); gtkAddIcon( About ); - + vbox=AddVBox( AddDialogFrame( About ),0 ); pixmapstyle=gtk_widget_get_style( About ); @@ -94,8 +94,8 @@ GtkWidget * create_About( void ) gtk_text_view_set_editable(GTK_TEXT_VIEW(AboutText), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(AboutText), FALSE); AboutTextBuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (AboutText)); - gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0); -#else + gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0); +#else AboutText=gtk_text_new( NULL,NULL ); gtk_text_set_editable(GTK_TEXT(AboutText), FALSE); #endif @@ -103,15 +103,15 @@ GtkWidget * create_About( void ) gtk_widget_show( AboutText ); gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); #ifdef CONFIG_GTK2 - gtk_text_buffer_insert (AboutTextBuffer, &iter, -#else + gtk_text_buffer_insert (AboutTextBuffer, &iter, +#else gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, #endif - "\n" - MSGTR_ABOUT_UHU - " (http://www.uhulinux.hu/)\n" - "\n" - MSGTR_ABOUT_Contributors + "\n" + MSGTR_ABOUT_UHU + " (http://www.uhulinux.hu/)\n" + "\n" + MSGTR_ABOUT_Contributors "\n" " * Ackermann, Andreas\n" " * adland\n" @@ -267,8 +267,8 @@ GtkWidget * create_About( void ) " * Zealey, Mark\n" " * Ziv-Av, Matan\n" " * Zoltán, Márk Vicián\n" - "\n" - MSGTR_ABOUT_Codecs_libs_contributions + "\n" + MSGTR_ABOUT_Codecs_libs_contributions "\n" " * Bellard, Fabrice\n" " * Chappelier, Vivien and Vincent, Damien\n" @@ -280,7 +280,7 @@ GtkWidget * create_About( void ) " * Lespinasse, Michel\n" " * Podlipec, Mark\n" "\n" - MSGTR_ABOUT_Translations + MSGTR_ABOUT_Translations "\n" " * Biernat, Marcin\n" " * Fargas, Marc\n" @@ -297,8 +297,8 @@ GtkWidget * create_About( void ) " * Schiller, Wacław\n" " * Zubimendi, Andoni\n" "\n" - MSGTR_ABOUT_Skins - "\n" + MSGTR_ABOUT_Skins + "\n" " * Azrael\n" " * Bekesi, Viktor\n" " * Burt.S.\n" diff --git a/gui/mplayer/gtk/eq.c b/gui/mplayer/gtk/eq.c index 6a5e475344..d4ab6c1aea 100644 --- a/gui/mplayer/gtk/eq.c +++ b/gui/mplayer/gtk/eq.c @@ -91,7 +91,7 @@ static void eqSetBands( int channel ) get_video_colors( guiIntfStruct.sh_video,"hue",&vo_gamma_hue ); get_video_colors( guiIntfStruct.sh_video,"saturation",&vo_gamma_saturation ); } - + gtk_adjustment_set_value( VContrastadj,(float)vo_gamma_contrast ); gtk_adjustment_set_value( VBrightnessadj,(float)vo_gamma_brightness ); gtk_adjustment_set_value( VHueadj,(float)vo_gamma_hue ); @@ -177,7 +177,7 @@ void HideEqualizer( void ) static gboolean eqHScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data ) { equalizer_t eq; - switch ( (int)user_data ) + switch ( (int)user_data ) { case 0: eq.gain=A3125adj->value; break; case 1: eq.gain=A6250adj->value; break; @@ -193,13 +193,13 @@ static gboolean eqHScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpoin } eq.gain=0.0f - eq.gain; eq.band=(int)user_data; - if ( Channel == -1 ) + if ( Channel == -1 ) { int i; for ( i=0;i<6;i++ ) { eq.channel=i; gtkSet( gtkSetEqualizer,0,&eq ); } } else { eq.channel=Channel; gtkSet( gtkSetEqualizer,0,&eq ); } - + return FALSE; } @@ -218,16 +218,16 @@ static gboolean eqVScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpoin } static void eqButtonReleased( GtkButton * button,gpointer user_data ) -{ +{ switch( (int)user_data ) { case 0: HideEqualizer(); break; - case 1: + case 1: if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) - { + { if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer ) break; - gtkSet( gtkSetEqualizer,0,NULL ); - eqSetBands( Channel ); + gtkSet( gtkSetEqualizer,0,NULL ); + eqSetBands( Channel ); } else { @@ -324,7 +324,7 @@ GtkWidget * create_Equalizer( void ) A3125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); A3125=AddVScaler( A3125adj,NULL,-1 ); gtk_table_attach( GTK_TABLE( table1 ),A3125,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); - + A6250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) ); A6250=AddVScaler( A6250adj,NULL,-1 ); gtk_table_attach( GTK_TABLE( table1 ),A6250,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 ); @@ -408,7 +408,7 @@ GtkWidget * create_Equalizer( void ) gtk_widget_set_name( table1,"table1" ); gtk_widget_show( table1 ); gtk_container_add( GTK_CONTAINER( Notebook ),table1 ); - + gtk_table_attach( GTK_TABLE( table1 ), AddLabel( MSGTR_EQU_Contrast,NULL ), 0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); @@ -457,7 +457,7 @@ GtkWidget * create_Equalizer( void ) Config=AddButton( MSGTR_Config,hbuttonbox1 ); Clear=AddButton( MSGTR_Clear,hbuttonbox1 ); Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); - + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); @@ -481,7 +481,7 @@ GtkWidget * create_Equalizer( void ) gtk_signal_connect( GTK_OBJECT( VBrightness ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)2 ); gtk_signal_connect( GTK_OBJECT( VHue ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void*)3 ); gtk_signal_connect( GTK_OBJECT( VSaturation ),"motion_notify_event",GTK_SIGNAL_FUNC( eqVScaleMotion ),(void *)4 ); - + gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)0 ); gtk_signal_connect( GTK_OBJECT( Clear ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)1 ); gtk_signal_connect( GTK_OBJECT( Config ),"clicked",GTK_SIGNAL_FUNC( eqButtonReleased ),(void *)2 ); @@ -518,14 +518,14 @@ void ShowEquConfig( void ) if ( EquConfig ) gtkActive( EquConfig ); else EquConfig=create_EquConfig(); - + Items=g_list_append( Items,(gpointer)MSGTR_EQU_Front_Right ); Items=g_list_append( Items,(gpointer)MSGTR_EQU_Front_Left ); Items=g_list_append( Items,(gpointer)MSGTR_EQU_Back_Right ); Items=g_list_append( Items,(gpointer)MSGTR_EQU_Back_Left ); Items=g_list_append( Items,(gpointer)MSGTR_EQU_Center ); Items=g_list_append( Items,(gpointer)MSGTR_EQU_Bass ); - + gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel1 ),Items ); gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel2 ),Items ); gtk_combo_set_popdown_strings( GTK_COMBO( CBChannel3 ),Items ); @@ -550,7 +550,7 @@ void HideEquConfig( void ) { if ( !EquConfig ) return; gtk_widget_hide( EquConfig ); - gtk_widget_destroy( EquConfig ); + gtk_widget_destroy( EquConfig ); EquConfig=NULL; } @@ -634,35 +634,35 @@ GtkWidget * create_EquConfig( void ) CBChannel2=AddComboBox( NULL ); gtk_table_attach( GTK_TABLE( table1 ),CBChannel2,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CEChannel2=GTK_COMBO( CBChannel2 )->entry; gtk_widget_set_name( CEChannel2,"CEChannel2" ); gtk_widget_show( CEChannel2 ); CBChannel3=AddComboBox( NULL ); gtk_table_attach( GTK_TABLE( table1 ),CBChannel3,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CEChannel3=GTK_COMBO( CBChannel3 )->entry; gtk_widget_set_name( CEChannel3,"CEChannel3" ); gtk_widget_show( CEChannel3 ); CBChannel4=AddComboBox( NULL ); gtk_table_attach( GTK_TABLE( table1 ),CBChannel4,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CEChannel4=GTK_COMBO( CBChannel4 )->entry; gtk_widget_set_name( CEChannel4,"CEChannel4" ); gtk_widget_show( CEChannel4 ); CBChannel5=AddComboBox( NULL ); gtk_table_attach( GTK_TABLE( table1 ),CBChannel5,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CEChannel5=GTK_COMBO( CBChannel5 )->entry; gtk_widget_set_name( CEChannel5,"CEChannel5" ); gtk_widget_show( CEChannel5 ); CBChannel6=AddComboBox( NULL ); gtk_table_attach( GTK_TABLE( table1 ),CBChannel6,1,2,5,6,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CEChannel6=GTK_COMBO( CBChannel6 )->entry; gtk_widget_set_name( CEChannel6,"CEChannel6" ); gtk_widget_show( CEChannel6 ); @@ -680,7 +680,7 @@ GtkWidget * create_EquConfig( void ) gtk_widget_add_accelerator( ecCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_signal_connect( GTK_OBJECT( EquConfig ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&EquConfig ); - + gtk_signal_connect( GTK_OBJECT( ecOk ),"clicked",GTK_SIGNAL_FUNC( ecButtonReleased ),(void *)1 ); gtk_signal_connect( GTK_OBJECT( ecCancel ),"clicked",GTK_SIGNAL_FUNC( ecButtonReleased ),(void *)0 ); @@ -688,4 +688,3 @@ GtkWidget * create_EquConfig( void ) return EquConfig; } - diff --git a/gui/mplayer/gtk/gtk_common.c b/gui/mplayer/gtk/gtk_common.c index 2c7ee9aee3..495a5ea637 100644 --- a/gui/mplayer/gtk/gtk_common.c +++ b/gui/mplayer/gtk/gtk_common.c @@ -71,7 +71,7 @@ GtkWidget * AddVBox( GtkWidget * parent,int type ) vbox=gtk_vbox_new( FALSE,0 ); gtk_widget_set_name( vbox,"vbox" ); gtk_widget_show( vbox ); - if ( parent ) + if ( parent ) { if ( type ) gtk_box_pack_start( GTK_BOX( parent ),vbox,FALSE,FALSE,0 ); else gtk_container_add( GTK_CONTAINER( parent ),vbox ); diff --git a/gui/mplayer/gtk/gtk_url.c b/gui/mplayer/gtk/gtk_url.c index e6385f15ee..da1d25aaa6 100644 --- a/gui/mplayer/gtk/gtk_url.c +++ b/gui/mplayer/gtk/gtk_url.c @@ -44,7 +44,7 @@ void ShowURLDialogBox( void ) { if ( URL ) gtkActive( URL ); else URL=create_URL(); - + if ( URLList ) { URLItem * item = URLList; @@ -56,13 +56,13 @@ void ShowURLDialogBox( void ) item=item->next; } } - + if ( URLComboEntrys ) { gtk_entry_set_text( GTK_ENTRY( URLEntry ),URLComboEntrys->data ); gtk_combo_set_popdown_strings( GTK_COMBO( URLCombo ),URLComboEntrys ); } - + gtk_widget_show( URL ); } @@ -75,7 +75,7 @@ void HideURLDialogBox( void ) } static void on_Button_pressed( GtkButton * button,gpointer user_data ) -{ +{ URLItem * item; if ( (int)user_data ) @@ -96,7 +96,7 @@ static void on_Button_pressed( GtkButton * button,gpointer user_data ) free( str ); str=tmp; } URLComboEntrys=g_list_prepend( URLComboEntrys,(gchar *)str ); - + item=calloc( 1,sizeof( URLItem ) ); item->url=gstrdup( str ); gtkSet( gtkAddURLItem,0,(void *)item ); @@ -105,7 +105,7 @@ static void on_Button_pressed( GtkButton * button,gpointer user_data ) mplEventHandling( evPlayNetwork,0 ); } } - HideURLDialogBox(); + HideURLDialogBox(); } GtkWidget * create_URL( void ) @@ -128,7 +128,7 @@ GtkWidget * create_URL( void ) gtk_window_set_position( GTK_WINDOW( URL ),GTK_WIN_POS_CENTER ); gtk_window_set_policy( GTK_WINDOW( URL ),TRUE,TRUE,FALSE ); gtk_window_set_wmclass( GTK_WINDOW( URL ),"Network","MPlayer" ); - + gtk_widget_realize( URL ); gtkAddIcon( URL ); @@ -155,7 +155,7 @@ GtkWidget * create_URL( void ) Ok=AddButton( MSGTR_Ok,hbuttonbox1 ); Cancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); - + gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); @@ -168,4 +168,3 @@ GtkWidget * create_URL( void ) return URL; } - diff --git a/gui/mplayer/gtk/mb.c b/gui/mplayer/gtk/mb.c index 4d2a3fa676..76137d629c 100644 --- a/gui/mplayer/gtk/mb.c +++ b/gui/mplayer/gtk/mb.c @@ -38,9 +38,9 @@ void ShowMessageBox( const char * msg ) } static void on_Ok_released( GtkButton * button,gpointer user_data ) -{ - gtk_widget_hide( MessageBox ); - gtk_widget_destroy( MessageBox ); +{ + gtk_widget_hide( MessageBox ); + gtk_widget_destroy( MessageBox ); MessageBox=NULL; } @@ -66,7 +66,7 @@ GtkWidget * create_MessageBox( int type ) gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE ); gtk_window_set_policy( GTK_WINDOW( MessageBox ),TRUE,TRUE,FALSE ); gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),"Message","MPlayer" ); - + gtk_widget_realize( MessageBox ); gtkAddIcon( MessageBox ); diff --git a/gui/mplayer/gtk/menu.c b/gui/mplayer/gtk/menu.c index a13e85560a..48736ce81b 100644 --- a/gui/mplayer/gtk/menu.c +++ b/gui/mplayer/gtk/menu.c @@ -102,20 +102,20 @@ static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xp Item=gtk_check_menu_item_new(); Label = gtk_label_new (label); - + hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); gtk_container_add (GTK_CONTAINER (Item), hbox); - + gtk_menu_append( GTK_MENU( Menu ),Item ); - + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state); gtk_signal_connect_object( GTK_OBJECT(Item),"activate", GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); gtk_widget_show_all(Item); - + return Item; } GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ) @@ -174,10 +174,10 @@ GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); gtk_container_add (GTK_CONTAINER (SubItem), hbox); - + gtk_menu_append( GTK_MENU( Menu ),SubItem ); gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item ); - + gtk_widget_show_all( SubItem ); return Item; } @@ -451,7 +451,7 @@ GtkWidget * create_PopUpMenu( void ) AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD ); AddSeparator( VCDSubMenu ); VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_MENU_Titles ); - if ( guiIntfStruct.VCDTracks ) + if ( guiIntfStruct.VCDTracks ) { char tmp[32]; int i; for ( i=0;i < guiIntfStruct.VCDTracks;i++ ) @@ -560,7 +560,7 @@ GtkWidget * create_PopUpMenu( void ) for ( i=0;i < MAX_A_STREAMS;i++ ) if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) c++; - + if ( c > 1 ) { SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack ); @@ -576,7 +576,7 @@ GtkWidget * create_PopUpMenu( void ) for ( c=0,i=0;i < MAX_V_STREAMS;i++ ) if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) c++; - + if ( c > 1 ) { SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_VideoTrack ); @@ -590,7 +590,7 @@ GtkWidget * create_PopUpMenu( void ) } } } - + /* cheap subtitle switching for non-DVD streams */ if ( global_sub_size && guiIntfStruct.StreamType != STREAMTYPE_DVD ) { @@ -619,9 +619,9 @@ GtkWidget * create_PopUpMenu( void ) AddSeparator( Menu ); if ( !appMPlayer.subWindow.isFullScreen && guiIntfStruct.Playing ) { - if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&& + if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&& ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1; - else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) && + else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) && ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight / 2 ) ) b_half=1; else b1=1; } else b1=!appMPlayer.subWindow.isFullScreen; diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c index 2fe355c5e1..a1c8d226f3 100644 --- a/gui/mplayer/gtk/opts.c +++ b/gui/mplayer/gtk/opts.c @@ -138,7 +138,7 @@ static GtkWidget * CBSubEncoding, * ESubEncoding; #endif #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV) -static struct +static struct { char * name; char * comment; @@ -167,12 +167,12 @@ static struct { "shift-jis", MSGTR_PREFERENCES_FontEncoding18 }, { "cp949", MSGTR_PREFERENCES_FontEncoding19 }, { "cp874", MSGTR_PREFERENCES_FontEncoding20 }, - { NULL,NULL } + { NULL,NULL } }; char * lCEncoding = NULL; char * lSEncoding = NULL; #endif - + static int old_audio_driver = 0; static char * ao_driver[3]; static char * vo_driver[3]; @@ -199,7 +199,7 @@ void ShowPreferences( void ) if ( Preferences ) gtkActive( Preferences ); else Preferences=create_Preferences(); -// -- 1. page +// -- 1. page gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ),gtkEnableAudioEqualizer ); #if 0 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSurround ),gtkAOSurround ); @@ -259,13 +259,13 @@ void ShowPreferences( void ) { int i = 0, c = 0; char * tmp[3]; tmp[2]=""; - old_video_driver=0; + old_video_driver=0; if ( CLVDrivers ) gtk_clist_clear( GTK_CLIST( CLVDrivers ) ); while ( video_out_drivers[i] ) if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE ) - { + { if ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) ) old_video_driver=c; c++; - tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name; + tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name; gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp ); } gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 ); @@ -275,7 +275,7 @@ void ShowPreferences( void ) if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE ); #endif } - + gtk_adjustment_set_value( HSFPSadj,force_fps ); // -- 3. page @@ -316,7 +316,7 @@ void ShowPreferences( void ) if ( sub_cp ) { int i; - for ( i=0;lEncoding[i].name;i++ ) + for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( sub_cp,lEncoding[i].name ) ) break; if ( lEncoding[i].name ) lSEncoding=lEncoding[i].comment; gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lSEncoding ); @@ -336,7 +336,7 @@ void ShowPreferences( void ) if ( subtitle_font_encoding ) { int i; - for ( i=0;lEncoding[i].name;i++ ) + for ( i=0;lEncoding[i].name;i++ ) if ( !gstrcmp( subtitle_font_encoding,lEncoding[i].name ) ) break; if ( lEncoding[i].name ) lCEncoding=lEncoding[i].comment; gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lCEncoding ); @@ -409,7 +409,7 @@ void ShowPreferences( void ) gtk_adjustment_set_value( SBCacheadj,(float)gtkCacheSize ); if ( !gtkCacheOn ) gtk_widget_set_sensitive( SBCache,FALSE ); else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),TRUE ); - + gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),0 ); gtk_adjustment_set_value( SBAutoSyncadj,(float)gtkAutoSync ); if ( !gtkAutoSyncOn ) gtk_widget_set_sensitive( SBAutoSync,FALSE ); @@ -464,7 +464,7 @@ void ShowPreferences( void ) gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 ); #endif gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 ); - + gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 ); gtk_signal_connect( GTK_OBJECT( CLVDrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)1 ); @@ -472,7 +472,7 @@ void ShowPreferences( void ) gtkSetLayer( Preferences ); { static int visible = 1; - if ( visible ) + if ( visible ) { gtkMessageBox( GTK_MB_WARNING,MSGTR_PREFERENCES_Message ); visible=0; @@ -494,7 +494,7 @@ void HidePreferences( void ) #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV) static void prEntry( GtkContainer * container,gpointer user_data ) -{ +{ const char * comment; int i; @@ -556,7 +556,7 @@ void prButton( GtkButton * button,gpointer user_data ) if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1; force_fps=HSFPSadj->value; - + // -- 3. page suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) ); sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) ); @@ -576,7 +576,7 @@ void prButton( GtkButton * button,gpointer user_data ) 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; - + // --- 4. page guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) ); @@ -602,7 +602,7 @@ void prButton( GtkButton * button,gpointer user_data ) int i; const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) ); for( i=0;mpcodecs_vd_drivers[i];i++ ) - if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) ) + if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) ) { gaddlist( &video_fm_list,(char *)mpcodecs_vd_drivers[i]->info->short_name ); break; } } @@ -615,7 +615,7 @@ void prButton( GtkButton * button,gpointer user_data ) } // --- 6. page - gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) ); + 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 ) ); @@ -625,7 +625,7 @@ void prButton( GtkButton * button,gpointer user_data ) if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; } else gtkCacheOn=0; - + if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=1; } else gtkAutoSyncOn=0; @@ -715,14 +715,14 @@ static void prToggled( GtkToggleButton * togglebutton,gpointer user_data ) switch ( (int)user_data ) { case 0: // extra stereo coefficient - if ( guiIntfStruct.Playing ) + if ( guiIntfStruct.Playing ) gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) ); break; // case 1: // normalize // case 2: // equalizer // if ( guiIntfStruct.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." ); // break; - case 3: + case 3: if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) ) gtk_widget_set_sensitive( CBLoadFullscreen,TRUE ); else { @@ -774,8 +774,8 @@ static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,g { switch ( (int)user_data ) { - case 0: // audio driver - gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver ); + 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 ) || @@ -787,14 +787,14 @@ static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,g gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken); #endif break; - case 1: // video driver - gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); + case 1: // video driver + 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 ); #endif break; - } + } } GtkWidget * create_Preferences( void ) @@ -849,7 +849,7 @@ GtkWidget * create_Preferences( void ) gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER ); // gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE ); gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" ); - + gtk_widget_realize( Preferences ); gtkAddIcon( Preferences ); @@ -888,7 +888,7 @@ GtkWidget * create_Preferences( void ) AConfig=AddButton( MSGTR_ConfigDriver, AddHButtonBox( vbox2 ) ); - vbox3=AddVBox( + vbox3=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox1,0 ),1 ),0 ); gtk_widget_set_usize( vbox3,250,-2 ); @@ -921,7 +921,7 @@ GtkWidget * create_Preferences( void ) hbox2=AddVBox( notebook1,0 ); - vbox4=AddVBox( + vbox4=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,1 ),1 ),0 ); @@ -946,7 +946,7 @@ GtkWidget * create_Preferences( void ) hbuttonbox3=AddHButtonBox( vbox4 ); VConfig=AddButton( MSGTR_ConfigDriver,hbuttonbox3 ); - vbox5=AddVBox( + vbox5=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,0 ),1 ),0 ); gtk_widget_set_usize( vbox5,250,-2 ); @@ -986,7 +986,7 @@ GtkWidget * create_Preferences( void ) vbox6=AddVBox( notebook1,0 ); - vbox600=AddVBox( + vbox600=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_OSD_Level,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); @@ -995,7 +995,7 @@ GtkWidget * create_Preferences( void ) RBOSDIndicator=AddRadioButton( MSGTR_PREFERENCES_OSDProgress,&OSD_group,vbox600 ); RBOSDTPTT=AddRadioButton( MSGTR_PREFERENCES_OSDTimerPercentageTotalTime,&OSD_group,vbox600 ); - vbox7=AddVBox( + vbox7=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Subtitle,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 ); @@ -1025,7 +1025,7 @@ GtkWidget * create_Preferences( void ) gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); label=AddLabel( MSGTR_PREFERENCES_SUB_POS,NULL ); - gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); + gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); @@ -1103,7 +1103,7 @@ GtkWidget * create_Preferences( void ) // --- 4. page - vbox603=AddVBox( + vbox603=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Font,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); @@ -1136,7 +1136,7 @@ GtkWidget * create_Preferences( void ) label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL ); gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 ); - + CBFontEncoding=gtk_combo_new(); gtk_widget_set_name( CBFontEncoding,"CBFontEncoding" ); gtk_widget_show( CBFontEncoding ); @@ -1189,7 +1189,7 @@ GtkWidget * create_Preferences( void ) vbox601=AddVBox( notebook1,0 ); - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_CodecDemuxer,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); @@ -1228,10 +1228,10 @@ GtkWidget * create_Preferences( void ) gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),4 ),label ); vbox601=AddVBox( notebook1,0 ); - + // --- 6. page - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_PostProcess,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); @@ -1245,12 +1245,12 @@ GtkWidget * create_Preferences( void ) else HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0,0,0 ) ); HSPPQuality=AddHScaler( HSPPQualityadj,hbox5,0 ); - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Cache,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 ); CBCache=AddCheckButton( MSGTR_PREFERENCES_Cache,vbox602 ); - + hbox5=AddHBox( vbox602,1 ); AddLabel( MSGTR_PREFERENCES_CacheSize,hbox5 ); @@ -1260,7 +1260,7 @@ GtkWidget * create_Preferences( void ) gtk_widget_show( SBCache ); gtk_box_pack_start( GTK_BOX( hbox5 ),SBCache,TRUE,TRUE,0 ); - vbox602=AddVBox( + vbox602=AddVBox( AddFrame( NULL,GTK_SHADOW_NONE, AddFrame( MSGTR_PREFERENCES_FRAME_Misc,GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 ); @@ -1315,12 +1315,12 @@ GtkWidget * create_Preferences( void ) gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 ); BOk=AddButton( MSGTR_Ok,hbuttonbox1 ); BCancel=AddButton( MSGTR_Cancel,hbuttonbox1 ); - + gtk_widget_add_accelerator( BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); gtk_widget_add_accelerator( BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_signal_connect( GTK_OBJECT( Preferences ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&Preferences ); - + gtk_signal_connect( GTK_OBJECT( AConfig ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bAConfig ); gtk_signal_connect( GTK_OBJECT( BOk ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bOk ); gtk_signal_connect( GTK_OBJECT( BCancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bCancel ); @@ -1470,7 +1470,7 @@ GList *appendESDDevices(GList *l) { } #endif -// Gets text string from a gtk entry, interpreting +// Gets text string from a gtk entry, interpreting // MSGTR_PREFERENCES_DriverDefault as null string. const char *getGtkEntryText(GtkWidget *from) { const char *tmp = gtk_entry_get_text(GTK_ENTRY(from)); @@ -1480,7 +1480,7 @@ const char *getGtkEntryText(GtkWidget *from) { return tmp; } -// Sets text string of a gtk entry, interpreting +// Sets text string of a gtk entry, interpreting // null string as MSGTR_PREFERENCES_DriverDefault. void setGtkEntryText(GtkWidget *dest, char *to) { if (!to) { @@ -1535,7 +1535,7 @@ void ShowAudioConfig( void ) { void HideAudioConfig( void ) { if (!AudioConfig) return; gtk_widget_hide(AudioConfig); - gtk_widget_destroy(AudioConfig); + gtk_widget_destroy(AudioConfig); AudioConfig=NULL; } @@ -1820,7 +1820,7 @@ GtkWidget * create_DXR3Config( void ) gtk_widget_add_accelerator( dxr3BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); gtk_signal_connect( GTK_OBJECT( DXR3Config ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&DXR3Config ); - + gtk_signal_connect( GTK_OBJECT( dxr3BOk ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)0 ); gtk_signal_connect( GTK_OBJECT( dxr3BCancel ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)1 ); diff --git a/gui/mplayer/gtk/pl.c b/gui/mplayer/gtk/pl.c index 58b03d2eaa..2750e233bc 100644 --- a/gui/mplayer/gtk/pl.c +++ b/gui/mplayer/gtk/pl.c @@ -153,7 +153,7 @@ void ShowPlayList( void ) pos=strtok( NULL,"/" ); gtk_ctree_get_node_info( GTK_CTREE( CTDirTree ),node,NULL,NULL,NULL,NULL,NULL,NULL,&leaf,NULL ); if ( !leaf && pos ) gtk_ctree_expand( GTK_CTREE( CTDirTree ),node ); - else + else { DirNodeType * DirNode; gtk_ctree_select( GTK_CTREE( CTDirTree ),node ); @@ -247,7 +247,7 @@ static void plButtonReleased( GtkButton * button,gpointer user_data ) } } case 0: // cancel - HidePlayList(); + HidePlayList(); break; case 2: // remove { @@ -258,7 +258,7 @@ static void plButtonReleased( GtkButton * button,gpointer user_data ) gtk_clist_freeze( GTK_CLIST( CLSelected ) ); for ( i=0;i<NrOfSelected-c;i++ ) - if ( CLListSelected[i] ) + if ( CLListSelected[i] ) { gtk_clist_remove( GTK_CLIST( CLSelected ),i - c ); c++; @@ -341,7 +341,7 @@ static void plCTree( GtkCTree * ctree,GtkCTreeNode * parent_node,gpointer user_d gtk_clist_freeze( GTK_CLIST( ctree ) ); node=gtk_ctree_find_by_row_data( ctree,parent_node,NULL ); gtk_ctree_remove_node( ctree,node ); - + if ( (dir=opendir( DirNode->path ) ) ) { while( (dirent=readdir( dir )) ) @@ -363,7 +363,7 @@ static void plCTree( GtkCTree * ctree,GtkCTreeNode * parent_node,gpointer user_d } closedir( dir ); } - + gtk_ctree_sort_node( ctree,parent_node ); gtk_clist_thaw( GTK_CLIST( ctree ) ); } @@ -443,7 +443,7 @@ GtkWidget * create_PlayList( void ) scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); gtk_widget_show( scrolledwindow1 ); - gtk_container_add( GTK_CONTAINER( + gtk_container_add( GTK_CONTAINER( AddFrame( NULL,0,hbox1,1 ) ),scrolledwindow1 ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); @@ -469,10 +469,10 @@ GtkWidget * create_PlayList( void ) gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent ); gtk_widget_show( CTDirTree ); - + gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0, AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) ); - + vbox2=AddVBox( AddFrame( NULL,1,hbox1,1 ),0 ); @@ -543,4 +543,3 @@ GtkWidget * create_PlayList( void ) return PlayList; } - diff --git a/gui/mplayer/gtk/sb.c b/gui/mplayer/gtk/sb.c index 3709de42af..7b793a73b3 100644 --- a/gui/mplayer/gtk/sb.c +++ b/gui/mplayer/gtk/sb.c @@ -104,7 +104,7 @@ static void prButton( GtkObject * object,gpointer user_data ) ChangeSkin( sbSelectedSkin ); if ( skinName ) free( skinName ); skinName=strdup( sbSelectedSkin ); - break; + break; } } HideSkinBrowser(); diff --git a/gui/mplayer/gui_common.c b/gui/mplayer/gui_common.c index d6df8b0f39..646b76929b 100644 --- a/gui/mplayer/gui_common.c +++ b/gui/mplayer/gui_common.c @@ -54,7 +54,7 @@ static inline void TranslateFilename( int c,char * tmp,size_t tmplen ) { int i; char * p; - + switch ( guiIntfStruct.StreamType ) { case STREAMTYPE_STREAM: @@ -214,16 +214,16 @@ void PutImage( txSample * bf,int x,int y,int max,int ofs ) for ( iy=y;iy < (int)(y+bf->Height / max);iy++ ) for ( ix=x;ix < (int)(x+bf->Width);ix++ ) { - tmp=drw[i++]; + tmp=drw[i++]; if ( tmp != 0x00ff00ff ) buf[iy * image_width + ix]=tmp; } #else - yc=y * image_width; + yc=y * image_width; for ( iy=y;iy < (int)(y+bf->Height / max);iy++ ) { for ( ix=x;ix < (int)(x+bf->Width);ix++ ) { - tmp=drw[i++]; + tmp=drw[i++]; if ( tmp != 0x00ff00ff ) buf[yc + ix]=tmp; } yc+=image_width; @@ -248,7 +248,7 @@ void SimplePotmeterPutImage( txSample * bf,int x,int y,float frac ) { for ( ix=x;ix < (int)(x+w);ix++ ) { - tmp=drw[i++]; + tmp=drw[i++]; if ( tmp != 0x00ff00ff ) buf[iy * image_width + ix]=tmp; } i+=r; diff --git a/gui/mplayer/mw.c b/gui/mplayer/mw.c index 1d9dfbedc8..4e64af3a51 100644 --- a/gui/mplayer/mw.c +++ b/gui/mplayer/mw.c @@ -73,7 +73,7 @@ void mplMainDraw( void ) { if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); - + if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible || !mainVisible ) return; // !appMPlayer.mainWindow.Mapped ) return; @@ -125,7 +125,7 @@ void mplEventHandling( int msg,float param ) goto play; case evSetSubtitle: - mp_property_do("sub",M_PROPERTY_SET,&iparam,guiIntfStruct.mpcontext); + mp_property_do("sub",M_PROPERTY_SET,&iparam,guiIntfStruct.mpcontext); break; #ifdef CONFIG_VCD @@ -192,7 +192,7 @@ play: guiIntfStruct.Chapter=guiIntfStruct.DVD.current_chapter; guiIntfStruct.Angle=guiIntfStruct.DVD.current_angle; guiIntfStruct.DiskChanged=1; - } + } break; #endif } @@ -226,9 +226,9 @@ NoPause: mplPause(); break; - case evStop: - guiIntfStruct.Playing=guiSetStop; - mplState(); + case evStop: + guiIntfStruct.Playing=guiSetStop; + mplState(); guiIntfStruct.NoWindow=False; break; @@ -269,7 +269,7 @@ NoPause: case evSetVolume: guiIntfStruct.Volume=param; goto set_volume; - case evSetBalance: + case evSetBalance: guiIntfStruct.Balance=param; set_volume: { @@ -358,7 +358,7 @@ set_volume: wsClearWindow( appMPlayer.subWindow ); #ifdef CONFIG_DVDREAD if ( guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_VCD ) goto play_dvd_2; - else + else #endif guiIntfStruct.NewPlay=1; break; @@ -424,7 +424,7 @@ void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ) sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton; SelectedItem=currentselected; if ( SelectedItem == -1 ) break; - boxMoved=0; + boxMoved=0; item=&appMPlayer.Items[SelectedItem]; itemtype=item->type; item->pressed=btnPressed; @@ -517,7 +517,7 @@ void mplMainKeyHandle( int KeyCode,int Type,int Key ) int msg = evNone; if ( Type != wsKeyPressed ) return; - + if ( !Key ) { switch ( KeyCode ) @@ -544,11 +544,11 @@ void mplMainKeyHandle( int KeyCode,int Type,int Key ) case wsXF86Prev: msg=evPrev; break; case wsXF86Next: msg=evNext; break; case wsXF86Media: msg=evLoad; break; - case wsEscape: + case wsEscape: if ( appMPlayer.subWindow.isFullScreen ) - { - if ( guiIntfStruct.event_struct ) ((XEvent *)guiIntfStruct.event_struct)->type=None; - mplEventHandling( evNormalSize,0 ); + { + if ( guiIntfStruct.event_struct ) ((XEvent *)guiIntfStruct.event_struct)->type=None; + mplEventHandling( evNormalSize,0 ); return; } default: vo_x11_putkey( Key ); return; @@ -580,7 +580,7 @@ void mplDandDHandler(int num,char** files) if(stat(str,&buf) == 0 && S_ISDIR(buf.st_mode) == 0) { /* this is not a directory so try to play it */ mp_msg( MSGT_GPLAYER,MSGL_V,"Received D&D %s\n",str ); - + /* check if it is a subtitle file */ { char* ext = strrchr(str,'.'); @@ -605,7 +605,7 @@ void mplDandDHandler(int num,char** files) } item = calloc(1,sizeof(plItem)); - + /* FIXME: decompose file name ? */ /* yes -- Pontscho */ if ( strrchr( str,'/' ) ) { diff --git a/gui/mplayer/pb.c b/gui/mplayer/pb.c index 65f28289fe..9238755d91 100644 --- a/gui/mplayer/pb.c +++ b/gui/mplayer/pb.c @@ -59,7 +59,7 @@ int mplPBFade = 0; void mplPBDraw( void ) { int x; - + if ( !appMPlayer.subWindow.isFullScreen ) return; if ( !mplPBVisible || !appMPlayer.barIsPresent ) return; @@ -70,7 +70,7 @@ void mplPBDraw( void ) case -2: x=( appMPlayer.subWindow.Width - appMPlayer.bar.width ); break; default: x=appMPlayer.bar.x; } - + switch ( mplPBFade ) { case 1: // fade in @@ -81,7 +81,7 @@ void mplPBDraw( void ) mplPBFade=0; vo_mouse_autohide=0; } - wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength ); + wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength ); break; case 2: // fade out mplPBLength+=10; @@ -89,11 +89,11 @@ void mplPBDraw( void ) { mplPBLength=appMPlayer.subWindow.Height; mplPBFade=mplPBVisible=0; - vo_mouse_autohide=1; - wsVisibleWindow( &appMPlayer.barWindow,wsHideWindow ); + vo_mouse_autohide=1; + wsVisibleWindow( &appMPlayer.barWindow,wsHideWindow ); return; } - wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength ); + wsMoveWindow( &appMPlayer.barWindow,0,x,mplPBLength ); break; } @@ -102,12 +102,12 @@ void mplPBDraw( void ) { btnModify( evSetMoviePosition,guiIntfStruct.Position ); btnModify( evSetVolume,guiIntfStruct.Volume ); - + vo_mouse_autohide=0; fast_memcpy( mplPBDrawBuffer,appMPlayer.bar.Bitmap.Image,appMPlayer.bar.Bitmap.ImageSize ); Render( &appMPlayer.barWindow,appMPlayer.barItems,appMPlayer.NumberOfBarItems,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize ); - wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize ); + wsConvert( &appMPlayer.barWindow,mplPBDrawBuffer,appMPlayer.bar.Bitmap.ImageSize ); } wsPutImage( &appMPlayer.barWindow ); } @@ -121,7 +121,7 @@ void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY ) int i; wItem * item = NULL; float value = 0.0f; - + static int SelectedItem = -1; int currentselected = -1; @@ -129,7 +129,7 @@ void mplPBMouseHandle( int Button,int X,int Y,int RX,int RY ) if ( ( appMPlayer.barItems[i].pressed != btnDisabled )&& ( wgIsRect( X,Y,appMPlayer.barItems[i].x,appMPlayer.barItems[i].y,appMPlayer.barItems[i].x+appMPlayer.barItems[i].width,appMPlayer.barItems[i].y+appMPlayer.barItems[i].height ) ) ) { currentselected=i; break; } - + switch ( Button ) { case wsPMMouseButton: @@ -230,8 +230,8 @@ void mplPBShow( int x, int y ) if ( !appMPlayer.barIsPresent || !gtkEnablePlayBar ) return; if ( !appMPlayer.subWindow.isFullScreen ) return; - if ( y > appMPlayer.subWindow.Height - appMPlayer.bar.height ) - { + if ( y > appMPlayer.subWindow.Height - appMPlayer.bar.height ) + { if ( !mplPBFade ) wsVisibleWindow( &appMPlayer.barWindow,wsShowWindow ); mplPBFade=1; mplPBVisible=1; wsPostRedisplay( &appMPlayer.barWindow ); } @@ -256,10 +256,10 @@ void mplPBInit( void ) wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsHideWindow,"PlayBar" ); wsSetShape( &appMPlayer.barWindow,appMPlayer.bar.Mask.Image ); - + appMPlayer.barWindow.ReDraw=(void *)mplPBDraw; appMPlayer.barWindow.MouseHandler=mplPBMouseHandle; appMPlayer.barWindow.KeyHandler=mplMainKeyHandle; - + mplPBLength=appMPlayer.subWindow.Height; } diff --git a/gui/mplayer/play.c b/gui/mplayer/play.c index 63b639d5d1..b398f9f901 100644 --- a/gui/mplayer/play.c +++ b/gui/mplayer/play.c @@ -56,8 +56,8 @@ void mplFullScreen( void ) if ( guiIntfStruct.NoWindow && guiIntfStruct.Playing ) return; if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) ) - { - appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight; + { + appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight; switch ( appMPlayer.sub.x ) { case -1: appMPlayer.subWindow.OldX=( wsMaxX / 2 ) - ( appMPlayer.subWindow.OldWidth / 2 ) + wsOrgX; break; @@ -94,7 +94,7 @@ void mplEnd( void ) guiIntfStruct.FilenameChanged=guiIntfStruct.NewPlay=1; gfree( (void **)&guiIntfStruct.AudioFile ); gfree( (void **)&guiIntfStruct.Subtitlename ); - } + } else { if ( guiIntfStruct.FilenameChanged || guiIntfStruct.NewPlay ) return; @@ -187,7 +187,7 @@ void ChangeSkin( char * name ) int bprev = appMPlayer.barIsPresent; mainVisible=0; - + appInitStruct( &tmpList ); skinAppMPlayer=&tmpList; fntFreeFont(); @@ -268,13 +268,13 @@ void ChangeSkin( char * name ) wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen ); wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen ); - + } void mplSetFileName( char * dir,char * name,int type ) { if ( !name ) return; - + if ( !dir ) guiSetFilename( guiIntfStruct.Filename,name ) else guiSetDF( guiIntfStruct.Filename,dir,name ); @@ -288,7 +288,7 @@ void mplCurr( void ) { plItem * curr; int stop = 0; - + if ( guiIntfStruct.Playing == 2 ) return; switch ( guiIntfStruct.StreamType ) { @@ -300,7 +300,7 @@ void mplCurr( void ) case STREAMTYPE_VCD: break; #endif - default: + default: if ( (curr=gtkSet( gtkGetCurrPlItem,0,NULL)) ) { mplSetFileName( curr->path,curr->name,STREAMTYPE_FILE ); @@ -318,7 +318,7 @@ void mplPrev( void ) { plItem * prev; int stop = 0; - + if ( guiIntfStruct.Playing == 2 ) return; switch ( guiIntfStruct.StreamType ) { @@ -337,7 +337,7 @@ void mplPrev( void ) if ( --guiIntfStruct.Track == 0 ) { guiIntfStruct.Track=1; stop=1; } break; #endif - default: + default: if ( (prev=gtkSet( gtkGetPrevPlItem,0,NULL)) ) { mplSetFileName( prev->path,prev->name,STREAMTYPE_FILE ); @@ -374,8 +374,8 @@ void mplNext( void ) break; #endif default: - if ( (next=gtkSet( gtkGetNextPlItem,0,NULL)) ) - { + if ( (next=gtkSet( gtkGetNextPlItem,0,NULL)) ) + { mplSetFileName( next->path,next->name,STREAMTYPE_FILE ); mplGotoTheNext=0; break; diff --git a/gui/mplayer/sw.c b/gui/mplayer/sw.c index e31fda83fb..349847b5b8 100644 --- a/gui/mplayer/sw.c +++ b/gui/mplayer/sw.c @@ -40,7 +40,7 @@ extern int i,pot; void mplSubDraw( void ) { if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); - + if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; if ( appMPlayer.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) SubVisible--; diff --git a/gui/mplayer/widgets.c b/gui/mplayer/widgets.c index 0cf3c1fbd9..d6b0442303 100644 --- a/gui/mplayer/widgets.c +++ b/gui/mplayer/widgets.c @@ -86,7 +86,7 @@ void gtkInit( void ) GtkWidget * win; win=gtk_window_new( GTK_WINDOW_TOPLEVEL ); - if ( !gtkIcon ) + if ( !gtkIcon ) gtkIcon=gdk_pixmap_colormap_create_from_xpm_d( win->window,gdk_colormap_get_system(),>kIconMask,&win->style->bg[GTK_STATE_NORMAL],MPlayer_mini_xpm ); guiIcon=GDK_WINDOW_XWINDOW( gtkIcon ); @@ -94,7 +94,7 @@ void gtkInit( void ) gtk_widget_destroy( win ); } - + gtkInitialized=1; } @@ -166,7 +166,7 @@ void gtkMessageBox( int type,const gchar * str ) } void gtkSetLayer( GtkWidget * wdg ) -{ +{ wsSetLayer( gdk_display,GDK_WINDOW_XWINDOW( wdg->window ),appMPlayer.subWindow.isFullScreen ); gtkActive( wdg ); } @@ -194,8 +194,8 @@ void gtkShow( int type,char * param ) gtk_clist_sort( GTK_CLIST( SkinList ) ); gtk_widget_show( SkinBrowser ); gtkSetLayer( SkinBrowser ); - } - else + } + else { gtk_widget_destroy( SkinBrowser ); gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." ); @@ -231,20 +231,20 @@ void gtkShow( int type,char * param ) case evShowPopUpMenu: gtkPopupMenu=evNone; gtkPopupMenuParam=0; - if ( PopUpMenu ) - { - gtk_widget_hide( PopUpMenu ); + if ( PopUpMenu ) + { + gtk_widget_hide( PopUpMenu ); gtk_widget_destroy( PopUpMenu ); } PopUpMenu=create_PopUpMenu(); gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 ); break; case evHidePopUpMenu: - if ( PopUpMenu ) + if ( PopUpMenu ) { gtk_widget_hide( PopUpMenu ); gtk_widget_destroy( PopUpMenu ); - PopUpMenu=NULL; + PopUpMenu=NULL; } break; case evPlayNetwork: diff --git a/gui/skin/cut.c b/gui/skin/cut.c index c0c114ab20..f101b67f94 100644 --- a/gui/skin/cut.c +++ b/gui/skin/cut.c @@ -34,14 +34,14 @@ void cutItem( char * in,char * out,char sep,int num ) int cutItemToInt( char * in,char sep,int num ) { char tmp[512]; - cutItem( in,tmp,sep,num ); + cutItem( in,tmp,sep,num ); return atoi( tmp ); } float cutItemToFloat( char * in,char sep,int num ) { char tmp[512]; - cutItem( in,tmp,sep,num ); + cutItem( in,tmp,sep,num ); return atof( tmp ); } @@ -50,4 +50,3 @@ void cutChunk( char * in,char * s1 ) cutItem( in,s1,'=',0 ); memmove( in,strchr( in,'=' )+1,strlen( in ) - strlen( s1 ) ); } - diff --git a/gui/skin/font.c b/gui/skin/font.c index b18bf4b689..f565289925 100644 --- a/gui/skin/font.c +++ b/gui/skin/font.c @@ -46,7 +46,7 @@ int fntAddNewFont( char * name ) if ( ( Fonts[id]=calloc( 1,sizeof( bmpFont ) ) ) == NULL ) return -1; av_strlcpy( Fonts[id]->name,name,128 ); // FIXME: as defined in font.h - for ( i=0;i<256;i++ ) + for ( i=0;i<256;i++ ) Fonts[id]->Fnt[i].x=Fonts[id]->Fnt[i].y=Fonts[id]->Fnt[i].sx=Fonts[id]->Fnt[i].sy=-1; return id; @@ -75,14 +75,14 @@ int fntRead( char * path,char * fname ) unsigned char param[256]; int c,linenumber = 0; int id = fntAddNewFont( fname ); - + if ( id < 0 ) return id; av_strlcpy( tmp,path,sizeof( tmp ) ); av_strlcat( tmp,fname,sizeof( tmp ) ); av_strlcat( tmp,".fnt",sizeof( tmp ) ); - if ( ( f=fopen( tmp,"rt" ) ) == NULL ) + if ( ( f=fopen( tmp,"rt" ) ) == NULL ) { free( Fonts[id] ); return -3; } - + while ( !feof( f ) ) { fgets( tmp,255,f ); linenumber++; @@ -189,7 +189,7 @@ txSample * fntRender( wItem * item,int px,const char * fmt,... ) tw=fntTextWidth( id,p ); fbw=Fonts[id]->Bitmap.Width; - if ( item->Bitmap.Image == NULL ) + if ( item->Bitmap.Image == NULL ) { item->Bitmap.Height=item->height=fntTextHeight( id,p ); item->Bitmap.Width=item->width=iw; @@ -203,8 +203,8 @@ txSample * fntRender( wItem * item,int px,const char * fmt,... ) ibuf=(uint32_t *)Fonts[id]->Bitmap.Image; for ( i=0;i < item->Bitmap.ImageSize / 4;i++ ) obuf[i]=0xff00ff; - - if ( tw <= iw ) + + if ( tw <= iw ) { switch ( item->align ) { @@ -213,23 +213,23 @@ txSample * fntRender( wItem * item,int px,const char * fmt,... ) case fntAlignCenter: dx=( iw - fntTextWidth( id,p ) ) / 2; break; case fntAlignRight: dx=iw - fntTextWidth( id,p ); break; } - + } else dx+=px; ofs=dx; - + for ( i=0;i < (int)strlen( p );i++ ) { c=(unsigned int)p[i]; fw=Fonts[id]->Fnt[c].sx; - + if ( fw == -1 ) { c=32; fw=Fonts[id]->Fnt[c].sx; } - + fh=Fonts[id]->Fnt[c].sy; fyc=Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; yc=dx; - - if ( dx >= 0 ) + + if ( dx >= 0 ) for ( y=0;y < fh;y++ ) { for ( x=0; x < fw;x++ ) @@ -247,14 +247,14 @@ txSample * fntRender( wItem * item,int px,const char * fmt,... ) { c=(unsigned int)p[i]; fw=Fonts[id]->Fnt[c].sx; - + if ( fw == -1 ) { c=32; fw=Fonts[id]->Fnt[c].sx; } fh=Fonts[id]->Fnt[c].sy; fyc=Fonts[id]->Fnt[c].y * fbw + Fonts[id]->Fnt[c].x; dx-=fw; yc=dx; - if ( dx >= 0 ) + if ( dx >= 0 ) for ( y=0;y < fh;y++ ) { for ( x=fw - 1;x >= 0;x-- ) diff --git a/gui/skin/skin.c b/gui/skin/skin.c index 064bde68cb..50d31b74d7 100644 --- a/gui/skin/skin.c +++ b/gui/skin/skin.c @@ -165,7 +165,7 @@ int cmd_base( char * in ) defList->main.x=x; defList->main.y=y; defList->main.type=itBase; - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); if ( skinBPRead( tmp,&defList->main.Bitmap ) ) return 1; defList->main.width=defList->main.Bitmap.Width; defList->main.height=defList->main.Bitmap.Height; @@ -180,7 +180,7 @@ int cmd_base( char * in ) if ( !strcmp( window_name,"sub" ) ) { defList->sub.type=itBase; - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); if ( skinBPRead( tmp,&defList->sub.Bitmap ) ) return 1; defList->sub.x=x; defList->sub.y=y; @@ -197,7 +197,7 @@ int cmd_base( char * in ) { defList->menuIsPresent=1; defList->menuBase.type=itBase; - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); if ( skinBPRead( tmp,&defList->menuBase.Bitmap ) ) return 1; defList->menuBase.width=defList->menuBase.Bitmap.Width; defList->menuBase.height=defList->menuBase.Bitmap.Height; @@ -215,7 +215,7 @@ int cmd_base( char * in ) defList->bar.x=x; defList->bar.y=y; defList->bar.type=itBase; - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); if ( skinBPRead( tmp,&defList->bar.Bitmap ) ) return 1; defList->bar.width=defList->bar.Bitmap.Width; defList->bar.height=defList->bar.Bitmap.Height; @@ -237,12 +237,12 @@ int cmd_background( char * in ) CHECK( "menu" ); CHECK( "main" ); - + currSection->R=cutItemToInt( in,',',0 ); currSection->G=cutItemToInt( in,',',1 ); currSection->B=cutItemToInt( in,',',2 ); mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] background color is #%x%x%x.\n",currSection->R,currSection->G,currSection->B ); - + return 0; } @@ -257,7 +257,7 @@ int cmd_button( char * in ) CHECKWINLIST( "button" ); CHECK( "sub" ); - CHECK( "menu" ); + CHECK( "menu" ); cutItem( in,fname,',',0 ); x=cutItemToInt( in,',',1 ); @@ -286,7 +286,7 @@ int cmd_button( char * in ) currSubItems[ *currSubItem ].Bitmap.Image=NULL; if ( strcmp( fname,"NULL" ) ) { - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); if ( skinBPRead( tmp,&currSubItems[ *currSubItem ].Bitmap ) ) return 1; } @@ -307,7 +307,7 @@ int cmd_selected( char * in ) cutItem( in,fname,',',0 ); defList->menuSelected.type=itBase; - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, fname, sizeof( tmp )); mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"\n[skin] selected: %s\n",fname ); if ( skinBPRead( tmp,&defList->menuSelected.Bitmap ) ) return 1; defList->menuSelected.width=defList->menuSelected.Bitmap.Width; @@ -327,7 +327,7 @@ int cmd_menu( char * in ) CHECK( "main" ); CHECK( "sub" ); CHECK( "playbar" ); - + x=cutItemToInt( in,',',0 ); y=cutItemToInt( in,',',1 ); sx=cutItemToInt( in,',',2 ); @@ -399,14 +399,14 @@ int cmd_hpotmeter( char * in ) item->Bitmap.Image=NULL; if ( strcmp( phfname,"NULL" ) ) { - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp )); if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; } item->Mask.Image=NULL; if ( strcmp( pfname,"NULL" ) ) { - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, pfname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, pfname, sizeof( tmp )); if ( skinBPRead( tmp,&item->Mask ) ) return 1; } return 0; @@ -463,7 +463,7 @@ int cmd_potmeter( char * in ) item->Bitmap.Image=NULL; if ( strcmp( phfname,"NULL" ) ) { - av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp )); + av_strlcpy(tmp, path, sizeof( tmp )); av_strlcat(tmp, phfname, sizeof( tmp )); if ( skinBPRead( tmp,&item->Bitmap ) ) return 1; } return 0; diff --git a/gui/wm/ws.c b/gui/wm/ws.c index 65ec992d58..27749be53b 100644 --- a/gui/wm/ws.c +++ b/gui/wm/ws.c @@ -63,7 +63,7 @@ #include <sys/ipc.h> #include <sys/shm.h> -#undef ENABLE_DPMS +#undef ENABLE_DPMS typedef struct { @@ -126,8 +126,8 @@ inline int wsSearch( Window win ); typedef void(*wsTConvFunc)( const unsigned char * in_pixels, unsigned char * out_pixels, unsigned num_pixels ); wsTConvFunc wsConvFunc = NULL; - -void rgb32torgb32( const unsigned char * src, unsigned char * dst,unsigned int src_size ) + +void rgb32torgb32( const unsigned char * src, unsigned char * dst,unsigned int src_size ) { memcpy( dst,src,src_size ); } // --- @@ -166,7 +166,7 @@ void wsWindowDecoration( wsTWindow * win,long d ) if ( wsMotifHints == None ) return; memset( &wsMotifWmHints,0,sizeof( MotifWmHints ) ); - wsMotifWmHints.flags=MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; + wsMotifWmHints.flags=MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; if ( d ) { wsMotifWmHints.functions=MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE | MWM_FUNC_RESIZE; @@ -218,7 +218,7 @@ if(mDisplay){ /* enable DND atoms */ wsXDNDInitialize(); - + { /* on remote display XShm will be disabled - LGB */ char *dispname=DisplayString(wsDisplay); int localdisp=1; @@ -808,7 +808,7 @@ void wsFullScreen( wsTWindow * win ) #ifdef ENABLE_DPMS wsScreenSaverOff( wsDisplay ); #endif - + vo_x11_ewmh_fullscreen( _NET_WM_STATE_ADD ); // adds fullscreen state if wm supports EWMH } @@ -1290,7 +1290,7 @@ void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask ) XWMHints * wm; long data[2]; Atom iconatom; - + wm=XGetWMHints( dsp,win ); if ( !wm ) wm=XAllocWMHints(); @@ -1304,7 +1304,7 @@ void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask ) data[1]=mask; iconatom=XInternAtom( dsp,"KWM_WIN_ICON",0 ); XChangeProperty( dsp,win,iconatom,iconatom,32,PropModeReplace,(unsigned char *)data,2 ); - + XFree( wm ); } diff --git a/gui/wm/wsxdnd.c b/gui/wm/wsxdnd.c index ba2236f868..d06e295b60 100644 --- a/gui/wm/wsxdnd.c +++ b/gui/wm/wsxdnd.c @@ -138,7 +138,7 @@ wsXDNDProcessSelection(wsTWindow* wnd, XEvent *event) if (num >= MAX_DND_FILES) break; } - + /* Handle the files */ if(wnd->DandDHandler){ wnd->DandDHandler(num,files); @@ -187,7 +187,7 @@ wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event) 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); @@ -210,11 +210,11 @@ wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event) } return True; } - + if (event->message_type == XA_XdndLeave) { return True; } - + if (event->message_type == XA_XdndDrop) { if (event->data.l[0] != XGetSelectionOwner(wsDisplay, XA_XdndSelection)){ puts("Wierd selection owner... QT?"); @@ -226,7 +226,7 @@ wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event) } return True; } - + if (event->message_type == XA_XdndPosition) { Window srcwin = event->data.l[0]; if (atom_support == None){ @@ -241,19 +241,19 @@ wsXDNDProcessClientMessage(wsTWindow* wnd, XClientMessageEvent *event) xevent.xany.display = wsDisplay; xevent.xclient.window = srcwin; xevent.xclient.message_type = XA_XdndStatus; - xevent.xclient.format = 32; - + xevent.xclient.format = 32; + XDND_STATUS_TARGET_WIN (&xevent) = event->window; XDND_STATUS_WILL_ACCEPT_SET (&xevent, True); XDND_STATUS_WANT_POSITION_SET(&xevent, True); /* actually need smth real here */ XDND_STATUS_RECT_SET(&xevent, 0, 0, 1024,768); XDND_STATUS_ACTION(&xevent) = XA_XdndActionCopy; - + XSendEvent(wsDisplay, srcwin, 0, 0, &xevent); } return True; } - + return False; } |