diff options
author | 2002-07-05 23:47:00 +0000 | |
---|---|---|
committer | 2002-07-05 23:47:00 +0000 | |
commit | 4e0bd7f66ac8cecc95301e88c9b0975d53682bb6 (patch) | |
tree | 1bc8bfd3df10bdeb247c9b16e22e1a5d6fa20612 /Gui/mplayer/widgets.c | |
parent | 28dbc3b505b8e1d45163d91b245663a50be59d52 (diff) |
- add icon (nice, but very ugly hakk:)
- move all window to one group
- better multilanguage support
- some small bug fixed
- some warning fixed
- swap the two menu
- fix small network playing bug ( evPlay instead of evPlayNetwork :)
- add channel name selection for equalizer support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6652 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/mplayer/widgets.c')
-rw-r--r-- | Gui/mplayer/widgets.c | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index 146b8c65ec..9bdd59fd53 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -11,6 +11,7 @@ #include <gdk/gdkprivate.h> #include <gdk/gdkkeysyms.h> +#include <gdk/gdkx.h> #include <gdk/gdk.h> #include <gtk/gtk.h> @@ -19,6 +20,8 @@ #include "./mplayer.h" #include "../events.h" #include "../app.h" +#include "../wm/ws.h" + #include "gtk/menu.h" #include "play.h" @@ -48,8 +51,15 @@ int gtkInited = 0; #include "gtk/url.h" #include "gtk/eq.h" +#include "pixmaps/MPlayer_mini.xpm" + // --- init & close gtk +GdkPixmap * gtkIcon = NULL; +GdkBitmap * gtkIconMask = NULL; +Pixmap guiIcon; +Pixmap guiIconMask; + void gtkInit( void ) { mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init gtk ...\n" ); @@ -57,6 +67,20 @@ void gtkInit( void ) // gtk_init( &argc,&argv ); gtk_init( 0,NULL ); // gdk_set_use_xshm( TRUE ); + + { + GtkWidget * win; + win=gtk_window_new( GTK_WINDOW_TOPLEVEL ); + + 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 ); + guiIconMask=GDK_WINDOW_XWINDOW( gtkIconMask ); + + gtk_widget_destroy( win ); + } + gtkInited=1; } @@ -64,6 +88,12 @@ void gtkDone( void ) { } +void gtkAddIcon( GtkWidget * window ) +{ + GdkWindowPrivate * win = (GdkWindowPrivate *)window->window; + wsSetIcon( gdk_display,win->xwindow,guiIcon,guiIconMask ); +} + void gtkClearList( GtkWidget * list ) { gtk_clist_clear( GTK_CLIST( list ) ); } @@ -121,13 +151,13 @@ void gtkMessageBox( int type,gchar * str ) void gtkSetLayer( GtkWidget * wdg ) { - GdkWindowPrivate * win = wdg->window; + GdkWindowPrivate * win = (GdkWindowPrivate *)wdg->window; wsSetLayer( gdk_display,win->xwindow,appMPlayer.subWindow.isFullScreen ); } void gtkActive( GtkWidget * wdg ) { - GdkWindowPrivate * win = wdg->window; + GdkWindowPrivate * win = (GdkWindowPrivate *)wdg->window; wsMoveTopWindow( gdk_display,win->xwindow ); } @@ -145,7 +175,7 @@ void gtkShow( int type,char * param ) if ( gtkFillSkinList( sbMPlayerPrefixDir ) && gtkFillSkinList( sbMPlayerDirInHome ) ) { gtkSetDefaultToCList( SkinList,param ); - gtk_clist_sort( SkinList ); + gtk_clist_sort( GTK_CLIST( SkinList ) ); gtk_widget_show( SkinBrowser ); gtkSetLayer( SkinBrowser ); } |