annotate gui/mplayer/widgets.c @ 25604:11cae072ab88

Whitespace-only cosmetics: get rid of tabs
author reimar
date Sun, 06 Jan 2008 20:27:14 +0000
parents 17bf4f4b0715
children afa125da85cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
2 #include <stdlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
3 #include <stdio.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
5 #include <sys/types.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
6 #include <sys/stat.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
7 #include <sys/wait.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
8 #include <unistd.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
9 #include <string.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
10 #include <signal.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
11
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
12 #include <gdk/gdkprivate.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
13 #include <gdk/gdkkeysyms.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
14 #include <gdk/gdkx.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
15 #include <gdk/gdk.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
16 #include <gtk/gtk.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
18 #include "widgets.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
19 #include "app.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
20 #include "wm/ws.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 #include "gtk/menu.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 #include "play.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 #include "gtk/fs.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #include "../config.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 #include "../help_mp.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 #include "../mp_msg.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 GtkWidget * PopUpMenu = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 GtkWidget * WarningPixmap;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 GtkWidget * ErrorPixmap;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 int gtkPopupMenu = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 int gtkPopupMenuParam = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 int gtkInited = 0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 #include "gtk/sb.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 #include "gtk/pl.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 #include "gtk/fs.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 #include "gtk/mb.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 #include "gtk/about.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 #include "gtk/opts.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 #include "gtk/menu.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 #include "gtk/url.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 #include "gtk/eq.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 #include "pixmaps/MPlayer_mini.xpm"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 // --- init & close gtk
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 GdkPixmap * gtkIcon = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 GdkBitmap * gtkIconMask = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 Pixmap guiIcon;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 Pixmap guiIconMask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 void gtkInit( void )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init GTK ...\n" );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 #ifdef HAVE_GTK2_GUI
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 gtk_disable_setlocale();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 gtk_init( 0,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 // gdk_set_use_xshm( TRUE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 GtkWidget * win;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 win=gtk_window_new( GTK_WINDOW_TOPLEVEL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 if ( !gtkIcon )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 gtkIcon=gdk_pixmap_colormap_create_from_xpm_d( win->window,gdk_colormap_get_system(),&gtkIconMask,&win->style->bg[GTK_STATE_NORMAL],MPlayer_mini_xpm );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 guiIcon=GDK_WINDOW_XWINDOW( gtkIcon );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 guiIconMask=GDK_WINDOW_XWINDOW( gtkIconMask );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 gtk_widget_destroy( win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 gtkInited=1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 void gtkAddIcon( GtkWidget * window )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 { wsSetIcon( gdk_display,GDK_WINDOW_XWINDOW( window->window ),guiIcon,guiIconMask ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 void gtkClearList( GtkWidget * list )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 { gtk_clist_clear( GTK_CLIST( list ) ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 int gtkFindCList( GtkWidget * list,char * item )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 gint j,t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 gchar * tmpstr;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 for( t=0,j=0;j<GTK_CLIST( list )->rows;j++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 gtk_clist_get_text( GTK_CLIST( list ),j,0,&tmpstr );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 if ( !strcmp( tmpstr,item ) ) return j;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 return -1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 void gtkSetDefaultToCList( GtkWidget * list,char * item )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 gint i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 if ( ( i=gtkFindCList( list,item ) ) > -1 ) gtk_clist_select_row( GTK_CLIST( list ),i,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 void gtkEventHandling( void )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 int i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 // --- funcs
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116 void gtkMessageBox( int type,const gchar * str )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 if ( !gtkInited ) return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 ShowMessageBox( str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 gtk_label_set_text( GTK_LABEL( gtkMessageBoxText ),str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 /* enable linewrapping by alex */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 // GTK_LABEL(gtkMessageBoxText)->max_width = 80;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 if (strlen(str) > 80)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 gtk_label_set_line_wrap(GTK_LABEL(gtkMessageBoxText), TRUE);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 else
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 gtk_label_set_line_wrap(GTK_LABEL(gtkMessageBoxText), FALSE);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 switch( type)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 case GTK_MB_FATAL:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_FatalError );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 gtk_widget_hide( WarningPixmap );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 gtk_widget_show( ErrorPixmap );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 case GTK_MB_ERROR:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_Error );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 gtk_widget_hide( WarningPixmap );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 gtk_widget_show( ErrorPixmap );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139 case GTK_MB_WARNING:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MSGBOX_LABEL_Warning );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 gtk_widget_show( WarningPixmap );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 gtk_widget_hide( ErrorPixmap );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 gtk_widget_show( MessageBox );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 gtkSetLayer( MessageBox );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 if ( type == GTK_MB_FATAL )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 while ( MessageBox ) gtk_main_iteration_do( 0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 void gtkSetLayer( GtkWidget * wdg )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 wsSetLayer( gdk_display,GDK_WINDOW_XWINDOW( wdg->window ),appMPlayer.subWindow.isFullScreen );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 gtkActive( wdg );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 void gtkActive( GtkWidget * wdg )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 { wsMoveTopWindow( gdk_display,GDK_WINDOW_XWINDOW( wdg->window )); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 void gtkShow( int type,char * param )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162 switch( type )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 case evEqualizer:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 ShowEqualizer();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 gtkSetLayer( Equalizer );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168 case evSkinBrowser:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 ShowSkinBrowser();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 // gtkClearList( SkinList );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 if ( gtkFillSkinList( sbMPlayerPrefixDir ) &&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 gtkFillSkinList( sbMPlayerPrefixDir_obsolete ) &&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 gtkFillSkinList( sbMPlayerDirInHome ) &&
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174 gtkFillSkinList( sbMPlayerDirInHome_obsolete ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 gtkSetDefaultToCList( SkinList,param );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 gtk_clist_sort( GTK_CLIST( SkinList ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 gtk_widget_show( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 gtkSetLayer( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 else
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 gtk_widget_destroy( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184 gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 case evPreferences:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 ShowPreferences();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190 case evPlayList:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 ShowPlayList();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192 gtkSetLayer( PlayList );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194 case evLoad:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195 ShowFileSelect( fsVideoSelector,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196 gtkSetLayer( fsFileSelect );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198 case evFirstLoad:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 ShowFileSelect( fsVideoSelector,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 gtkSetLayer( fsFileSelect );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 case evLoadSubtitle:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 ShowFileSelect( fsSubtitleSelector,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 gtkSetLayer( fsFileSelect );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206 case evLoadAudioFile:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207 ShowFileSelect( fsAudioSelector,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 gtkSetLayer( fsFileSelect );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 case evAbout:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 ShowAboutBox();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 gtkSetLayer( About );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
214 case evShowPopUpMenu:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215 gtkPopupMenu=evNone;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
216 gtkPopupMenuParam=0;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217 if ( PopUpMenu )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
218 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
219 gtk_widget_hide( PopUpMenu );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
220 gtk_widget_destroy( PopUpMenu );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
221 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
222 PopUpMenu=create_PopUpMenu();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223 gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
224 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
225 case evHidePopUpMenu:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
226 if ( PopUpMenu )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
227 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
228 gtk_widget_hide( PopUpMenu );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
229 gtk_widget_destroy( PopUpMenu );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
230 PopUpMenu=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
231 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
232 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
233 case evPlayNetwork:
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
234 ShowURLDialogBox();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
235 gtkSetLayer( URL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
236 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
237 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
238 }