~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to gui/ui/gtk/playlist.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include "help_mp.h"
32
32
#include "stream/stream.h"
33
33
 
34
 
#include "gui/interface.h"
 
34
#include "gui/cfg.h"
35
35
#include "gui/ui/widgets.h"
 
36
#include "gui/util/list.h"
 
37
#include "gui/util/mem.h"
36
38
#include "playlist.h"
37
39
#include "tools.h"
38
40
 
156
158
{
157
159
 if ( !PlayList ) return;
158
160
 NrOfSelected=NrOfEntrys=0;
159
 
 gfree( (void **)&CLListSelected ); gfree( (void **)&CLFileSelected );
 
161
 nfree( CLListSelected ); nfree( CLFileSelected );
160
162
 free( old_path );
161
163
 old_path=strdup( current_path );
162
164
 gtk_widget_hide( PlayList );
189
191
  case 1: // ok
190
192
       {
191
193
        int i;
192
 
        if ( plList ) gtkSet( gtkDelPl,0,NULL );
 
194
        if ( plList ) listSet( gtkDelPl,NULL );
193
195
        for ( i=0;i<NrOfSelected;i++ )
194
196
         {
195
197
          plItem * item;
201
203
          if ( !item->name ) item->name = strdup( text[0] );
202
204
          item->path=g_filename_from_utf8( text[1], -1, NULL, NULL, NULL );
203
205
          if ( !item->path ) item->path = strdup( text[1] );
204
 
          gtkSet( gtkAddPlItem,0,(void*)item );
 
206
          listSet( gtkAddPlItem,item );
205
207
         }
206
208
        if ( plCurrent )
207
209
         {
208
210
          uiSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
209
 
//        guiSetDF( guiInfo.Filename,plCurrent->path,plCurrent->name );
210
 
//        guiInfo.FilenameChanged=1;
 
211
//        setddup( &guiInfo.Filename,plCurrent->path,plCurrent->name );
 
212
//        guiInfo.NewPlay=GUI_FILE_NEW;
211
213
//        guiInfo.StreamType=STREAMTYPE_FILE;
212
214
         }
213
215
       }
273
275
 }
274
276
}
275
277
 
 
278
static gboolean plKeyReleased( GtkWidget * widget,
 
279
                               GdkEventKey * event,
 
280
                               gpointer user_data )
 
281
{
 
282
 if (event->keyval == GDK_Return)
 
283
  {
 
284
   if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) plButtonReleased( NULL, user_data );
 
285
   else
 
286
    {
 
287
     switch ( (int) user_data )
 
288
      {
 
289
       case 0:
 
290
            plButtonReleased( NULL, (void *) 3 );
 
291
            break;
 
292
       case 1:
 
293
            plButtonReleased( NULL, (void *) 2 );
 
294
            break;
 
295
      }
 
296
    }
 
297
  }
 
298
 return FALSE;
 
299
}
 
300
 
276
301
static gboolean plEvent ( GtkWidget * widget,
277
302
                          GdkEvent * event,
278
303
                          gpointer user_data )
487
512
  gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent );
488
513
  gtk_widget_show( CTDirTree );
489
514
 
490
 
  old_path = fsHistory[0];
 
515
  if ( fsHistory[0] ) old_path = g_filename_from_utf8( fsHistory[0], -1, NULL, NULL, NULL );
491
516
 
492
517
  gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0,
493
518
    AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) );
494
519
 
 
520
  gtk_clist_column_title_passive( GTK_CLIST( CTDirTree ),0 );
 
521
 
495
522
  vbox2=AddVBox(
496
523
    AddFrame( NULL,1,hbox1,1 ),0 );
497
524
 
511
538
  gtk_clist_set_column_widget( GTK_CLIST( CLFiles ),0,
512
539
    AddLabel( MSGTR_PLAYLIST_Files,NULL ) );
513
540
 
 
541
  gtk_clist_column_title_passive( GTK_CLIST( CLFiles ),0 );
 
542
 
514
543
  AddHSeparator( vbox2 );
515
544
 
516
545
  scrolledwindow3=gtk_scrolled_window_new( NULL,NULL );
533
562
  gtk_clist_set_column_widget( GTK_CLIST( CLSelected ),1,
534
563
    AddLabel( MSGTR_PLAYLIST_Path,NULL ) );
535
564
 
 
565
  gtk_clist_column_title_passive( GTK_CLIST( CLSelected ),0 );
 
566
 
536
567
  AddHSeparator( vbox1 );
537
568
 
538
569
  hbuttonbox1=AddHButtonBox( vbox1 );
551
582
  gtk_signal_connect( GTK_OBJECT( CLFiles ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void *)0 );
552
583
  gtk_signal_connect( GTK_OBJECT( CLFiles ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void *)0 );
553
584
  gtk_signal_connect( GTK_OBJECT( CLFiles ),"event",GTK_SIGNAL_FUNC( plEvent ),(void *)0 );
 
585
  gtk_signal_connect( GTK_OBJECT( CLFiles ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void *)0 );
554
586
  sigSel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void*)1 );
555
587
  sigUnsel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void*)1 );
556
588
  sigEvent=gtk_signal_connect( GTK_OBJECT( CLSelected ),"event",GTK_SIGNAL_FUNC( plEvent ),(void *)1 );
 
589
  gtk_signal_connect( GTK_OBJECT( CLSelected ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void *)1 );
557
590
 
558
 
  gtk_signal_connect( GTK_OBJECT( Add ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)3 );
559
 
  gtk_signal_connect( GTK_OBJECT( Remove ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)2 );
560
 
  gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)1 );
561
 
  gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)0 );
 
591
  gtk_signal_connect( GTK_OBJECT( Add ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)3 );
 
592
  gtk_signal_connect( GTK_OBJECT( Add ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)3 );
 
593
  gtk_signal_connect( GTK_OBJECT( Remove ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)2 );
 
594
  gtk_signal_connect( GTK_OBJECT( Remove ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)2 );
 
595
  gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)1 );
 
596
  gtk_signal_connect( GTK_OBJECT( Ok ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)1 );
 
597
  gtk_signal_connect( GTK_OBJECT( Cancel ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)0 );
 
598
  gtk_signal_connect( GTK_OBJECT( Cancel ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)0 );
562
599
 
563
600
  gtk_window_add_accel_group( GTK_WINDOW( PlayList ),accel_group );
564
601