summaryrefslogtreecommitdiffstats
path: root/gui/mplayer/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gui/mplayer/gtk')
-rw-r--r--gui/mplayer/gtk/about.c346
-rw-r--r--gui/mplayer/gtk/about.h29
-rw-r--r--gui/mplayer/gtk/eq.c691
-rw-r--r--gui/mplayer/gtk/eq.h29
-rw-r--r--gui/mplayer/gtk/fs.c656
-rw-r--r--gui/mplayer/gtk/fs.h39
-rw-r--r--gui/mplayer/gtk/gtk_common.c197
-rw-r--r--gui/mplayer/gtk/gtk_common.h41
-rw-r--r--gui/mplayer/gtk/gtk_url.c171
-rw-r--r--gui/mplayer/gtk/gtk_url.h30
-rw-r--r--gui/mplayer/gtk/mb.c114
-rw-r--r--gui/mplayer/gtk/mb.h29
-rw-r--r--gui/mplayer/gtk/menu.c645
-rw-r--r--gui/mplayer/gtk/menu.h31
-rw-r--r--gui/mplayer/gtk/opts.c1832
-rw-r--r--gui/mplayer/gtk/opts.h33
-rw-r--r--gui/mplayer/gtk/pl.c546
-rw-r--r--gui/mplayer/gtk/pl.h29
-rw-r--r--gui/mplayer/gtk/sb.c211
-rw-r--r--gui/mplayer/gtk/sb.h30
20 files changed, 0 insertions, 5729 deletions
diff --git a/gui/mplayer/gtk/about.c b/gui/mplayer/gtk/about.c
deleted file mode 100644
index ea3adf0717..0000000000
--- a/gui/mplayer/gtk/about.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include "config.h"
-#include "gui/app.h"
-#include "help_mp.h"
-
-#include "gui/mplayer/pixmaps/about.xpm"
-#include "gui/mplayer/widgets.h"
-#include "about.h"
-#include "gtk_common.h"
-
-GtkWidget * About = NULL;
-
-void ShowAboutBox( void )
-{
- if ( About ) gtkActive( About );
- else About=create_About();
- gtk_widget_show( About );
-}
-
-void abWidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer )
-{ WidgetDestroy( NULL,&About ); }
-
-GtkWidget * create_About( void )
-{
- GtkWidget * vbox;
- GtkWidget * pixmap1;
- GtkWidget * scrolledwindow1;
- GtkWidget * AboutText;
- GtkWidget * Ok;
-
-#ifdef CONFIG_GTK2
- GtkTextBuffer * AboutTextBuffer;
- GtkTextIter iter;
-#endif /* CONFIG_GTK2 */
-
- GtkStyle * pixmapstyle;
- GdkPixmap * pixmapwid;
- GdkBitmap * mask;
-
- GtkAccelGroup * accel_group;
-
- accel_group=gtk_accel_group_new();
-
- About=gtk_window_new( GTK_WINDOW_TOPLEVEL );
- gtk_widget_set_name( About,MSGTR_About );
- gtk_object_set_data( GTK_OBJECT( About ),MSGTR_About,About );
- gtk_widget_set_usize( About,340,415 );
- gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About );
- gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER );
- gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE );
- gtk_window_set_wmclass( GTK_WINDOW( About ),"About","MPlayer" );
-
- gtk_widget_realize( About );
- gtkAddIcon( About );
-
- vbox=AddVBox( AddDialogFrame( About ),0 );
-
- pixmapstyle=gtk_widget_get_style( About );
- pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],about_xpm );
- pixmap1=gtk_pixmap_new( pixmapwid,mask );
-
- gtk_widget_set_name( pixmap1,"pixmap1" );
- gtk_widget_show( pixmap1 );
- gtk_box_pack_start( GTK_BOX( vbox ),pixmap1,FALSE,FALSE,0 );
- gtk_widget_set_usize( pixmap1,-2,174 );
-
- AddHSeparator( vbox );
-
- scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
- gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
- gtk_widget_show( scrolledwindow1 );
- gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 );
- gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
-
-#ifdef CONFIG_GTK2
- AboutText = gtk_text_view_new();
- 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
- AboutText=gtk_text_new( NULL,NULL );
- gtk_text_set_editable(GTK_TEXT(AboutText), FALSE);
-#endif
- gtk_widget_set_name( AboutText,"AboutText" );
- gtk_widget_show( AboutText );
- gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
-#ifdef CONFIG_GTK2
- 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"
- " * Ackermann, Andreas\n"
- " * adland\n"
- " * Anholt, Eric\n"
- " * Ashberg, Folke\n"
- " * Balatoni, Dénes\n"
- " * Barat, Zsolt\n"
- " * Barbato, Luca\n"
- " * Baryshkov, Dmitry\n"
- " * Baudet, Bertrand\n"
- " * Bedel, Alban\n"
- " * Behrisch, Michael\n"
- " * Belev, Luchezar\n"
- " * Bérczi, Gábor\n"
- " * Berecz, Szabolcs\n"
- " * Beregszászi, Alex\n"
- " * Bitterberg, Tilmann\n"
- " * Biurrun, Diego\n"
- " * Blomenkamp, Marcsu\n"
- " * Buehler, Andrew\n"
- " * Bulgroz, Eviv\n"
- " * Bünemann, Felix\n"
- " * Bunkus, Moritz\n"
- " * Christiansen, Dan Villiom Podlaski\n"
- " * Clagg, Jeff\n"
- " * Compn\n"
- " * Comstedt, Marcus\n"
- " * Cook, Kees\n"
- " * Davies, Stephen\n"
- " * Di Vita, Piero\n"
- " * Diedrich, Tobias\n"
- " * Dietrich, Florian\n"
- " * Dobbelaere, Jeroen\n"
- " * Döffinger, Reimar\n"
- " * Dolbeau, Romain\n"
- " * Dönmez, Ismail\n"
- " * Edele, Robert\n"
- " * Egger, Christoph\n"
- " * Elsinghorst, Paul Wilhelm\n"
- " * Ernesti, Bernd\n"
- " * Falco, Salvatore\n"
- " * Feigl, Johannes\n"
- " * Felker, D Richard III\n"
- " * Ferguson, Tim\n"
- " * Finlayson, Ross\n"
- " * Forghieri, Daniele\n"
- " * Foth, Kilian A.\n"
- " * Franz, Fabian\n"
- " * Gansser, Martin\n"
- " * Gereöffy, Árpád\n"
- " * Giani, Matteo\n"
- " * Goethel, Sven\n"
- " * Gomez Garcia, German\n"
- " * Gottwald, Alexander\n"
- " * Graffam, Michael\n"
- " * Gritsenko, Andriy N.\n"
- " * Guyomarch, Rémi\n"
- " * Hammelmann, Jürgen\n"
- " * Hertel, Christopher R.\n"
- " * Hess, Andreas\n"
- " * Hickey, Corey\n"
- " * Hidvégi, Zoltán\n"
- " * Hoffmann, Jens\n"
- " * Holm, David\n"
- " * Horst, Bohdan\n"
- " * Hug, Hampa\n"
- " * Hurka, Tomas\n"
- " * Isani, Sidik\n"
- " * Issaris, Panagiotis\n"
- " * Jacobs, Aurelien\n"
- " * Jelveh, Reza\n"
- " * Jermann, Jonas\n"
- " * Johansson, Anders\n"
- " * Kain, Nicholas\n"
- " * Kalinski, Filip\n"
- " * Kalvachev, Ivan\n"
- " * Kaniewski, Wojtek\n"
- " * Kaplan, Kim Minh\n"
- " * Kärkkäinen, Samuli\n"
- " * Keil, Jürgen\n"
- " * Kesterson, Robert\n"
- " * Kinali, Attila\n"
- " * Kovriga, Gregory\n"
- " * Kühling, David\n"
- " * Kuivinen, Fredrik\n"
- " * Kurshev, Nick\n"
- " * Kuschak, Brian\n"
- " * Kushnir, Vladimir\n"
- " * Lambley, Dave\n"
- " * László, Gyula\n"
- " * Le Gaillart, Nicolas\n"
- " * Lénárt, Gábor\n"
- " * Leroy, Colin\n"
- " * Liljeblad, Oskar\n"
- " * Lin, Sam\n"
- " * Lombard, Pierre\n"
- " * Madick, Puk\n"
- " * Makovicka, Jindrich\n"
- " * Marek, Rudolf\n"
- " * Megyer, László\n"
- " * Melanson, Mike\n"
- " * von Merkatz, Arwed\n"
- " * Merritt, Loren\n"
- " * Mierzejewski, Dominik\n"
- " * Milushev, Mihail\n"
- " * Mistry, Nehal\n"
- " * Mohari, András\n"
- " * Mueller, Steven\n"
- " * Neundorf, Alexander\n"
- " * Niedermayer, Michael\n"
- " * Noring, Fredrik\n"
- " * Ohm, Christian\n"
- " * Parrish, Joey\n"
- " * Pietrzak, Dariusz\n"
- " * Plourde, Nicolas\n"
- " * Poettering, Lennart\n"
- " * Poirier, Guillaume\n"
- " * Ponekker, Zoltán\n"
- " * van Poorten, Ivo\n"
- " * Ran, Lu\n"
- " * Reder, Uwe\n"
- " * rgselk\n"
- " * Rune Petersen\n"
- " * Saari, Ville\n"
- " * Sabbi, Nico\n"
- " * Sandell, Björn\n"
- " * Sauerbeck, Tilman\n"
- " * Scherthan, Frank\n"
- " * Schneider, Florian\n"
- " * Schoenbrunner, Oliver\n"
- " * Shimon, Oded\n"
- " * Simon, Peter\n"
- " * Snel, Rik\n"
- " * Sommer, Sascha\n"
- " * Strasser, Alexander\n"
- " * Strzelecki, Kamil\n"
- " * Svoboda, Jiri\n"
- " * Swain, Robert\n"
- " * Syrjälä, Ville\n"
- " * Szecsi, Gabor\n"
- " * Tackaberry, Jason\n"
- " * Tam, Howell\n"
- " * Tlalka, Adam\n"
- " * Tiesi, Gianluigi\n"
- " * Togni, Roberto\n"
- " * Tropea, Salvador Eduardo\n"
- " * Vajna, Miklós\n"
- " * Verdejo Pinochet, Reynaldo H.\n"
- " * Wigren, Per\n"
- " * Witt, Derek J\n"
- " * Young, Alan\n"
- " * Zaprzala, Artur\n"
- " * Zealey, Mark\n"
- " * Ziv-Av, Matan\n"
- " * Zoltán, Márk Vicián\n"
- "\n"
- MSGTR_ABOUT_Codecs_libs_contributions
- "\n"
- " * Bellard, Fabrice\n"
- " * Chappelier, Vivien and Vincent, Damien\n"
- " * Hipp, Michael\n"
- " * Holtzman, Aaron\n"
- " * Janovetz, Jake\n"
- " * Kabelac, Zdenek\n"
- " * Kuznetsov, Eugene\n"
- " * Lespinasse, Michel\n"
- " * Podlipec, Mark\n"
- "\n"
- MSGTR_ABOUT_Translations
- "\n"
- " * Biernat, Marcin\n"
- " * Fargas, Marc\n"
- " * Heryan, Jiri\n"
- " * Jarycki, Marek\n"
- " * Kaplita, Leszek\n"
- " * Krämer, Sebastian\n"
- " * López, Juan Martin\n"
- " * Michniewski, Piotr\n"
- " * Misiorny, Jakub\n"
- " * Mizda, Gábor\n"
- " * Paszta, Maciej\n"
- " * Proszek, Łukasz\n"
- " * Schiller, Wacław\n"
- " * Zubimendi, Andoni\n"
- "\n"
- MSGTR_ABOUT_Skins
- "\n"
- " * Azrael\n"
- " * Bekesi, Viktor\n"
- " * Burt.S.\n"
- " * Carpenter, Andrew\n"
- " * Foucault, Charles\n"
- " * Gyimesi, Attila\n"
- " * Hertroys, Alban\n"
- " * Juan Pablo\n"
- " * Kiss, Balint\n"
- " * Kuehne, Andre\n"
- " * Kuhlmann, Rüdiger\n"
- " * Naumov, Dan\n"
- " * Northam, Ryan\n"
- " * Oyarzun Arroyo\n"
- " * Park, DongCheon\n"
- " * Pehrson, Jurgen\n"
- " * Pizurica, Nikola\n"
- " * Ptak, Oliwier\n"
- " * Riccio, Pasquale\n"
- " * Schultz, Jesper\n"
- " * Szumiela, Marcin\n"
- " * Tisi, Massimo\n"
- " * Tyr, Jiri jun.\n"
- " * Vasilev, Ognian\n"
- " * Veres, Imre\n"
- " * Vesko, Radic\n"
- " * Vigvary, Balasz\n"
- " * Weber, Andrew\n"
- " * Whitmore, Gary Jr.\n"
- " * Wilamowski, Franciszek\n"
- " * Zeising, Michael\n"
- "\n",-1 );
-
- AddHSeparator( vbox );
- Ok=AddButton( MSGTR_Ok,AddHButtonBox( vbox ) );
-
- gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&About );
- gtk_signal_connect_object( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( abWidgetDestroy ),NULL );
-
- 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 );
- gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group );
-
- return About;
-}
diff --git a/gui/mplayer/gtk/about.h b/gui/mplayer/gtk/about.h
deleted file mode 100644
index 68997ac51b..0000000000
--- a/gui/mplayer/gtk/about.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_GUI_ABOUT_H
-#define MPLAYER_GUI_ABOUT_H
-
-#include <gtk/gtk.h>
-
-extern GtkWidget * About;
-
-GtkWidget * create_About( void );
-void ShowAboutBox( void );
-
-#endif /* MPLAYER_GUI_ABOUT_H */
diff --git a/gui/mplayer/gtk/eq.c b/gui/mplayer/gtk/eq.c
deleted file mode 100644
index a344e741ab..0000000000
--- a/gui/mplayer/gtk/eq.c
+++ /dev/null
@@ -1,691 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * MPlayer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
-
-#include "config.h"
-#include "gui/app.h"
-#include "gui/cfg.h"
-#include "help_mp.h"
-#include "libaf/equalizer.h"
-#include "libvo/video_out.h"
-#include "stream/stream.h"
-#include "libmpdemux/demuxer.h"
-#include "libmpdemux/stheader.h"
-#include "libmpcodecs/dec_video.h"
-#include "gui/mplayer/widgets.h"
-
-#include "eq.h"
-#include "gtk_common.h"
-
-#define eqRange 15
-
-GtkWidget * Equalizer = NULL;
-static GtkWidget * EquConfig;
-
-static GtkWidget * Notebook;
-static GtkWidget * ChannelsList;
-static GtkWidget * VContrast, * VBrightness, * VHue, * VSaturation;
-static GtkAdjustment * VContrastadj, * VBrightnessadj, * VHueadj, * VSaturationadj;
-static GtkWidget * Ok, * Clear, * Config;
-static GtkWidget * A3125, * A125, * A6250, * A250, * A500, * A1000, * A2000, * A4000, * A8000, * A16000;
-static GtkAdjustment * A3125adj, * A125adj, * A6250adj, * A250adj, * A500adj, * A1000adj, * A2000adj, * A4000adj, * A8000adj, * A16000adj;
-
-static int Channel = -1;
-
-// ---
-
-char * gtkEquChannel1 = NULL;
-char * gtkEquChannel2 = NULL;
-char * gtkEquChannel3 = NULL;
-char * gtkEquChannel4 = NULL;
-char * gtkEquChannel5 = NULL;
-char * gtkEquChannel6 = NULL;
-
-// ---
-
-void ShowEquConfig( void );
-void HideEquConfig( void );
-
-static void eqSetBands( int channel )
-{
- if ( channel < 0 ) channel=0;
- gtk_adjustment_set_value( A3125adj,0.0f - gtkEquChannels[channel][0] );
- gtk_adjustment_set_value( A6250adj,0.0f - gtkEquChannels[channel][1] );
- gtk_adjustment_set_value( A125adj,0.0f - gtkEquChannels[channel][2] );
- gtk_adjustment_set_value( A250adj,0.0f - gtkEquChannels[channel][3] );
- gtk_adjustment_set_value( A500adj,0.0f - gtkEquChannels[channel][4] );
- gtk_adjustment_set_value( A1000adj,0.0f - gtkEquChannels[channel][5] );
- gtk_adjustment_set_value( A2000adj,0.0f - gtkEquChannels[channel][6] );
- gtk_adjustment_set_value( A4000adj,0.0f - gtkEquChannels[channel][7] );
- gtk_adjustment_set_value( A8000adj,0.0f - gtkEquChannels[channel][8] );
- gtk_adjustment_set_value( A16000adj,0.0f - gtkEquChannels[channel][9] );
-
- if ( guiIntfStruct.sh_video )
- {
- get_video_colors( guiIntfStruct.sh_video,"brightness",&vo_gamma_brightness );
- get_video_colors( guiIntfStruct.sh_video,"contrast",&vo_gamma_contrast );
- 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 );
- gtk_adjustment_set_value( VSaturationadj,(float)vo_gamma_saturation );
-}
-
-static void eqSetChannelNames( void )
-{
- gchar * str[2];
- gtk_clist_clear( GTK_CLIST( ChannelsList ) );
- str[1]="";
- str[0]=MSGTR_EQU_All;
- gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- if ( guiIntfStruct.AudioType > 1 )
- {
- str[0]=gtkEquChannel1; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- str[0]=gtkEquChannel2; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- }
- if ( guiIntfStruct.AudioType > 2 )
- {
- str[0]=gtkEquChannel3; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- str[0]=gtkEquChannel4; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- }
- if ( guiIntfStruct.AudioType > 4 )
- {
- str[0]=gtkEquChannel5; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- str[0]=gtkEquChannel6; gtk_clist_append( GTK_CLIST( ChannelsList ) ,str);
- }
- gtk_clist_select_row( GTK_CLIST( ChannelsList ),0,0 );
-}
-
-void ShowEqualizer( void )
-{
- if ( Equalizer ) gtkActive( Equalizer );
- else Equalizer=create_Equalizer();
-
- if ( !gtkEquChannel1 ) gtkEquChannel1=strdup( MSGTR_EQU_Front_Right );
- if ( !gtkEquChannel2 ) gtkEquChannel2=strdup( MSGTR_EQU_Front_Left );
- if ( !gtkEquChannel3 ) gtkEquChannel3=strdup( MSGTR_EQU_Back_Right );
- if ( !gtkEquChannel4 ) gtkEquChannel4=strdup( MSGTR_EQU_Back_Left );
- if ( !gtkEquChannel5 ) gtkEquChannel5=strdup( MSGTR_EQU_Center );
- if ( !gtkEquChannel6 ) gtkEquChannel6=strdup( MSGTR_EQU_Bass );
-
- eqSetChannelNames();
-
- if ( !guiIntfStruct.Playing || !guiIntfStruct.sh_video )
- {
- gtk_widget_set_sensitive( VContrast,FALSE );
- gtk_widget_set_sensitive( VBrightness,FALSE );
- gtk_widget_set_sensitive( VHue,FALSE );
- gtk_widget_set_sensitive( VSaturation,FALSE );
- }
- Channel=-1;
- eqSetBands( 0 );
- if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer )
- {
- gtk_widget_set_sensitive( ChannelsList,FALSE );
- gtk_widget_set_sensitive( A3125,FALSE );
- gtk_widget_set_sensitive( A125,FALSE );
- gtk_widget_set_sensitive( A6250,FALSE );
- gtk_widget_set_sensitive( A250,FALSE );
- gtk_widget_set_sensitive( A500,FALSE );
- gtk_widget_set_sensitive( A1000,FALSE );
- gtk_widget_set_sensitive( A2000,FALSE );
- gtk_widget_set_sensitive( A4000,FALSE );
- gtk_widget_set_sensitive( A8000,FALSE );
- gtk_widget_set_sensitive( A16000,FALSE );
- }
-
- if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 ) gtk_widget_show( Config );
- gtk_widget_show( Equalizer );
-}
-
-void HideEqualizer( void )
-{
- if ( !Equalizer ) return;
- gtk_widget_hide( Equalizer );
- gtk_widget_destroy( Equalizer );
- Equalizer=NULL;
- if ( EquConfig ) HideEquConfig();
-}
-
-static gboolean eqHScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data )
-{
- equalizer_t eq;
- switch ( (int)user_data )
- {
- case 0: eq.gain=A3125adj->value; break;
- case 1: eq.gain=A6250adj->value; break;
- case 2: eq.gain=A125adj->value; break;
- case 3: eq.gain=A250adj->value; break;
- case 4: eq.gain=A500adj->value; break;
- case 5: eq.gain=A1000adj->value; break;
- case 6: eq.gain=A2000adj->value; break;
- case 7: eq.gain=A4000adj->value; break;
- case 8: eq.gain=A8000adj->value; break;
- case 9: eq.gain=A16000adj->value; break;
- default: return FALSE;
- }
- eq.gain=0.0f - eq.gain;
- eq.band=(int)user_data;
- 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;
-}
-
-static gboolean eqVScaleMotion( GtkWidget * widget,GdkEventMotion * event,gpointer user_data )
-{
-
- switch( (int)user_data )
- {
- case 1: gtkSet( gtkSetContrast,VContrastadj->value,NULL ); break;
- case 2: gtkSet( gtkSetBrightness,VBrightnessadj->value,NULL ); break;
- case 3: gtkSet( gtkSetHue,VHueadj->value,NULL ); break;
- case 4: gtkSet( gtkSetSaturation,VSaturationadj->value,NULL ); break;
- }
-
- return FALSE;
-}
-
-static void eqButtonReleased( GtkButton * button,gpointer user_data )
-{
- switch( (int)user_data )
- {
- case 0: HideEqualizer(); break;
- case 1:
- if ( gtk_notebook_get_current_page( GTK_NOTEBOOK( Notebook ) ) == 0 )
- {
- if ( !guiIntfStruct.Playing || !gtkEnableAudioEqualizer ) break;
- gtkSet( gtkSetEqualizer,0,NULL );
- eqSetBands( Channel );
- }
- else
- {
- if ( !guiIntfStruct.Playing ) break;
- gtkSet( gtkSetContrast,0.0f,NULL );
- gtkSet( gtkSetBrightness,0.0f,NULL );
- gtkSet( gtkSetHue,0.0f,NULL );
- gtkSet( gtkSetSaturation,0.0f,NULL );
- eqSetBands( Channel );
- }
- break;
- case 2:
- ShowEquConfig();
- break;
- }
-}
-
-static void eqFocus( GtkWindow * window,GtkWidget * widget,gpointer user_data )
-{ eqSetBands( Channel ); }
-
-static void eqSelectChannelsListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
-{
- Channel=row - 1;
- eqSetBands( Channel );
- if ( Channel == -1 )
- {
- int i,j; equalizer_t eq;
- for ( i=1;i<6;i++ )
- for ( j=0;j<10;j++ )
- { eq.band=j; eq.channel=i; eq.gain=gtkEquChannels[0][j]; gtkSet( gtkSetEqualizer,0,&eq ); }
- }
-}
-
-void eqNotebook( GtkNotebook * notebook,GtkNotebookPage * page,gint page_num,gpointer user_data )
-{
- if ( page_num ) gtk_widget_hide( Config );
- else gtk_widget_show( Config );
-}
-
-GtkWidget * create_Equalizer( void )
-{
- GtkWidget * vbox1;
- GtkWidget * hbox1;
- GtkWidget * scrolledwindow1;
- GtkWidget * table1;
- GtkWidget * hbuttonbox1;
- GtkAccelGroup * accel_group;
-
- accel_group=gtk_accel_group_new();
-
- Equalizer=gtk_window_new( GTK_WINDOW_TOPLEVEL );
- gtk_widget_set_name( Equalizer,MSGTR_Equalizer );
- gtk_object_set_data( GTK_OBJECT( Equalizer ),MSGTR_Equalizer,Equalizer );
- gtk_widget_set_usize( Equalizer,-1,256 );
- gtk_window_set_title( GTK_WINDOW( Equalizer ),MSGTR_Equalizer );
- gtk_window_set_position( GTK_WINDOW( Equalizer ),GTK_WIN_POS_CENTER );
- gtk_window_set_policy( GTK_WINDOW( Equalizer ),FALSE,FALSE,FALSE );
- gtk_window_set_wmclass( GTK_WINDOW( Equalizer ),"Equalizer","MPlayer" );
-
- gtk_widget_realize( Equalizer );
- gtkAddIcon( Equalizer );
-
- vbox1=AddVBox( AddDialogFrame( Equalizer ),0 );
-
- Notebook=gtk_notebook_new();
- gtk_widget_set_name( Notebook,"Notebook" );
- gtk_widget_show( Notebook );
- gtk_box_pack_start( GTK_BOX( vbox1 ),Notebook,TRUE,TRUE,0 );
- gtk_container_set_border_width( GTK_CONTAINER( Notebook ),1 );
-
- hbox1=AddHBox( Notebook,0 );
-
- scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
- gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
- gtk_widget_show( scrolledwindow1 );
- gtk_box_pack_start( GTK_BOX( hbox1 ),scrolledwindow1,FALSE,FALSE,0 );
- gtk_widget_set_usize( scrolledwindow1,106,-2 );
- gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
-
- ChannelsList=gtk_clist_new( 1 );
- gtk_widget_set_name( ChannelsList,"ChannelsList" );
- gtk_widget_show( ChannelsList );
- gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),ChannelsList );
- gtk_clist_set_column_width( GTK_CLIST( ChannelsList ),0,80 );
- gtk_clist_column_titles_hide( GTK_CLIST( ChannelsList ) );
-
- table1=gtk_table_new( 2,10,FALSE );
- gtk_widget_set_name( table1,"table1" );
- gtk_widget_show( table1 );
- gtk_box_pack_start( GTK_BOX( hbox1 ),table1,FALSE,FALSE,0 );
- gtk_table_set_row_spacings( GTK_TABLE( table1 ),4 );
- gtk_table_set_col_spacings( GTK_TABLE( table1 ),9 );
-
- 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 );
-
- A125adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A125=AddVScaler( A125adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A125,2,3,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A250adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A250=AddVScaler( A250adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A250,3,4,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A500adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A500=AddVScaler( A500adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A500,4,5,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A1000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A1000=AddVScaler( A1000adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A1000,5,6,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A2000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A2000=AddVScaler( A2000adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A2000,6,7,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A4000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A4000=AddVScaler( A4000adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A4000,7,8,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A8000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A8000=AddVScaler( A8000adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A8000,8,9,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- A16000adj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-eqRange,eqRange,0.5,0,0 ) );
- A16000=AddVScaler( A16000adj,NULL,-1 );
- gtk_table_attach( GTK_TABLE( table1 ),A16000,9,10,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "31.25",NULL ),
- 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "62.50",NULL ),
- 1,2,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "125",NULL ),
- 2,3,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "250",NULL ),
- 3,4,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "500",NULL ),
- 4,5,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "1000",NULL ),
- 5,6,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "2000",NULL ),
- 6,7,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "4000",NULL ),
- 7,8,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "8000",NULL ),
- 8,9,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( "16000",NULL ),
- 9,10,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),0 ),
- AddLabel( MSGTR_EQU_Audio,NULL ) );
-
- table1=gtk_table_new( 4,2,FALSE );
- 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 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( MSGTR_EQU_Brightness,NULL ),
- 0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( MSGTR_EQU_Hue,NULL ),
- 0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- gtk_table_attach( GTK_TABLE( table1 ),
- AddLabel( MSGTR_EQU_Saturation,NULL ),
- 0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
-
- VContrastadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) );
- VContrast=AddHScaler( VContrastadj,NULL,1 );
- gtk_table_attach( GTK_TABLE( table1 ),VContrast,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- gtk_widget_set_usize( VContrast,-1,45 );
-
- VBrightnessadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) );
- VBrightness=AddHScaler( VBrightnessadj,NULL,1 );
- gtk_table_attach( GTK_TABLE( table1 ),VBrightness,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- gtk_widget_set_usize( VBrightness,-1,45 );
-
- VHueadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) );
- VHue=AddHScaler( VHueadj,NULL,1 );
- gtk_table_attach( GTK_TABLE( table1 ),VHue,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- gtk_widget_set_usize( VHue,-1,45 );
-
- VSaturationadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-100,100,1,0,0 ) );
- VSaturation=AddHScaler( VSaturationadj,NULL,1 );
- gtk_table_attach( GTK_TABLE( table1 ),VSaturation,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
- gtk_widget_set_usize( VSaturation,-1,45 );
-
- gtk_notebook_set_tab_label( GTK_NOTEBOOK( Notebook ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( Notebook ),1 ),
- AddLabel( MSGTR_EQU_Video,NULL ) );
-
- AddHSeparator( vbox1 );
-
- hbuttonbox1=AddHButtonBox( vbox1 );
- gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
- gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
-
- Config=AddButton( MSGTR_Config,hbuttonbox1 );