annotate Gui/mplayer/widgets.c @ 5997:b5fb9a927bf3

add WM detection, and wm specific fullscreen code. (???)
author pontscho
date Mon, 06 May 2002 15:05:07 +0000
parents 60cf2bca993f
children 153fc4ed86ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 #include <stdlib.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 #include <stdio.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 #include <sys/types.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6 #include <sys/stat.h>
1700
a0f28ba7c34a gtk exit cleanup
arpi
parents: 1698
diff changeset
7 #include <sys/wait.h>
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 #include <unistd.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
9 #include <string.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
10 #include <signal.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
11
4176
116abdd0aed1 small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder
pontscho
parents: 3586
diff changeset
12 #include <gdk/gdkprivate.h>
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
13 #include <gdk/gdkkeysyms.h>
4176
116abdd0aed1 small gtk bug fix (-display bug, baze gabu, miattad fogok elkarhozni:), and remove gui dependencie in mencoder
pontscho
parents: 3586
diff changeset
14 #include <gdk/gdk.h>
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
15 #include <gtk/gtk.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
16
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
17 #include "widgets.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
18
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19 #include "./mplayer.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 #include "../events.h"
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
21 #include "../app.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
23 #include "gtk/menu.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
24 #include "play.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
25 #include "gtk/fs.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
26
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27 #include "../../config.h"
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1883
diff changeset
28 #include "../../help_mp.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
30 GtkWidget * SkinBrowser;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
31 GtkWidget * PlayList;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32 GtkWidget * FileSelect;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
33 GtkWidget * AboutBox;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
34 GtkWidget * Options;
4950
307a94037c5c bazmeg a playtree - t
pontscho
parents: 4818
diff changeset
35 GtkWidget * PopUpMenu = NULL;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36
1925
633a7f0d72a4 add gui error handling jol.
pontscho
parents: 1907
diff changeset
37 GtkWidget * MessageBox;
633a7f0d72a4 add gui error handling jol.
pontscho
parents: 1907
diff changeset
38
633a7f0d72a4 add gui error handling jol.
pontscho
parents: 1907
diff changeset
39 GtkWidget * WarningPixmap;
633a7f0d72a4 add gui error handling jol.
pontscho
parents: 1907
diff changeset
40 GtkWidget * ErrorPixmap;
633a7f0d72a4 add gui error handling jol.
pontscho
parents: 1907
diff changeset
41
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
42 int gtkPopupMenu = 0;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
43 int gtkPopupMenuParam = 0;
5919
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
44 int gtkInited = 0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
45
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
46 #include "gtk/sb.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
47 #include "gtk/pl.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 #include "gtk/fs.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 #include "gtk/mb.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 #include "gtk/about.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 #include "gtk/opts.h"
2901
f77f8379f28f rewrite ...
pontscho
parents: 1925
diff changeset
52 #include "gtk/menu.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 // --- init & close gtk
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
56 void gtkInit( int argc,char* argv[], char *envp[] )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
57 {
5919
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
58 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init gtk ...\n" );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
59 gtk_set_locale();
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
60 gtk_init( &argc,&argv );
5520
25c43bd75e4c small bugfixes...
pontscho
parents: 4950
diff changeset
61 gdk_set_use_xshm( FALSE );
5919
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
62
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
63 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create about box.\n" ); AboutBox=create_About();
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
64 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create skin browser.\n" ); SkinBrowser=create_SkinBrowser();
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
65 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create playlist.\n" ); PlayList=create_PlayList();
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
66 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create file selector.\n" ); FileSelect=create_FileSelect();
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
67 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create message box.\n" ); MessageBox=create_MessageBox(0);
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
68 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] Create preferences dialog box.\n" ); Options=create_Options();
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
69
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
70 gtkInited=1;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
73 void gtkDone( void )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
74 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
76
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 void gtkClearList( GtkWidget * list )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 { gtk_clist_clear( GTK_CLIST( list ) ); }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80 int gtkFindCList( GtkWidget * list,char * item )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 gint j,t;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
83 gchar * tmpstr;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
84 for( t=0,j=0;j<GTK_CLIST( list )->rows;j++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
85 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
86 gtk_clist_get_text( GTK_CLIST( list ),j,0,&tmpstr );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
87 if ( !strcmp( tmpstr,item ) ) return j;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89 return -1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
90 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92 void gtkSetDefaultToCList( GtkWidget * list,char * item )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
93 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
94 gint i;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
95 if ( ( i=gtkFindCList( list,item ) ) > -1 ) gtk_clist_select_row( GTK_CLIST( list ),i,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
96 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
97
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
98 void gtkEventHandling( void )
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
99 {
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
100 int i;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
101 for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
102 }
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
103
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
104 // --- funcs
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
105
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
106 void gtkMessageBox( int type,gchar * str )
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
107 {
5919
60cf2bca993f some bug fix
pontscho
parents: 5520
diff changeset
108 if ( !gtkInited ) return;
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
109 gtk_label_set_text( GTK_LABEL( gtkMessageBoxText ),str );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
110 gtk_widget_hide( MessageBox );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
111 switch( type)
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
112 {
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
113 case GTK_MB_FATAL:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
114 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_FatalError );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
115 gtk_widget_hide( WarningPixmap );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
116 gtk_widget_show( ErrorPixmap );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
117 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
118 case GTK_MB_ERROR:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
119 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_Error );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
120 gtk_widget_hide( WarningPixmap );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
121 gtk_widget_show( ErrorPixmap );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
122 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
123 case GTK_MB_WARNING:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
124 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_Warning );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
125 gtk_widget_show( WarningPixmap );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
126 gtk_widget_hide( ErrorPixmap );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
127 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
128 }
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
129 gtk_widget_show( MessageBox );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
130 }
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
131
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
132 void gtkSetLayer( GtkWidget * wdg )
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
133 {
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
134 GdkWindowPrivate * win = wdg->window;
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
135 wsSetLayer( gdk_display,win->xwindow,appMPlayer.subWindow.isFullScreen );
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
136 }
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
137
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
138 void gtkShow( int type,char * param )
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
139 {
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
140 switch( type )
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
141 {
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
142 case evSkinBrowser:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
143 gtk_widget_hide( SkinBrowser );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
144 gtkClearList( SkinList );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
145 if ( gtkFillSkinList( sbMPlayerPrefixDir )&&gtkFillSkinList( sbMPlayerDirInHome ) )
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
146 {
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
147 gtkSetDefaultToCList( SkinList,param );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
148 gtk_widget_show( SkinBrowser );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
149 }
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
150 gtkSetLayer( SkinBrowser );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
151 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
152 case evPreferences:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
153 gtk_widget_hide( Options );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
154 gtk_widget_show( Options );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
155 gtkSetLayer( Options );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
156 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
157 case evPlayList:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
158 gtk_widget_hide( PlayList );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
159 gtk_widget_show( PlayList );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
160 gtkSetLayer( PlayList );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
161 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
162 case evLoad:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
163 ShowFileSelect( fsVideoSelector );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
164 gtkSetLayer( FileSelect );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
165 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
166 case evFirstLoad:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
167 ShowFileSelect( fsVideoSelector );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
168 gtkSetLayer( FileSelect );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
169 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
170 case evLoadSubtitle:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
171 ShowFileSelect( fsSubtitleSelector );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
172 gtkSetLayer( FileSelect );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
173 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
174 case evAbout:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
175 gtk_widget_hide( AboutBox );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
176 gtk_widget_show( AboutBox );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
177 gtkSetLayer( AboutBox );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
178 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
179 case evShowPopUpMenu:
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
180 gtkPopupMenu=evNone;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
181 gtkPopupMenuParam=0;
4950
307a94037c5c bazmeg a playtree - t
pontscho
parents: 4818
diff changeset
182 if ( PopUpMenu ) gtk_widget_hide_on_delete( PopUpMenu );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
183 PopUpMenu=create_PopUpMenu();
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
184 gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
185 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
186 case evHidePopUpMenu:
4950
307a94037c5c bazmeg a playtree - t
pontscho
parents: 4818
diff changeset
187 if ( PopUpMenu ) gtk_widget_hide_on_delete( PopUpMenu );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
188 break;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
189 }
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4176
diff changeset
190 }
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
191
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
192