Commit 02d21f72 authored by Sam Hocevar's avatar Sam Hocevar

 * The pure Gnome part of the Gnome interface has been rewritten from
   scratch, and the .glade file included as well. You can edit it by
   installing glade-gnome and doing `glade plugins/gnome/intf_gnome.glade',
   or directly by hand if you grok XML.
 * Files can now be loaded into vlc using the `Open' buttons. But for the
   moment you still have to launch vlc with at least one file, because it
   quits when the end of the playlist is reached.
 * Idle screen was disabled because it eats a lot of CPU and is mostly
   useless for the moment. And it gets activated when pause lasts for too
   long.
parent 95967459
Rgis Duchesne <regis@via.ecp.fr> Rgis Duchesne <regis@via.ecp.fr>
Michel Lespinasse <walken@wrs.com> Michel Lespinasse <walken@zoy.org>
Olivier Pomel <pomel@via.ecp.fr> Olivier Pomel <pomel@via.ecp.fr>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
Jean-Marc Dressler <polux@via.ecp.fr> Jean-Marc Dressler <polux@via.ecp.fr>
Gal Hendryckx <jimmy@via.ecp.fr> Gal Hendryckx <jimmy@via.ecp.fr>
Samuel Hocevar <sam@via.ecp.fr> Samuel Hocevar <sam@zoy.org
Brieuc Jeunhomme <bbp@via.ecp.fr> Brieuc Jeunhomme <bbp@via.ecp.fr>
Michel Kaempf <maxx@via.ecp.fr> Michel Kaempf <maxx@via.ecp.fr>
......
/*****************************************************************************
* gnome_callbacks.c : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h" #include "defs.h"
#include <gnome.h>
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
#include "threads.h" #include "threads.h"
#include "mtime.h" #include "mtime.h"
#include <gnome.h>
#include "stream_control.h" #include "stream_control.h"
#include "input_ext-intf.h" #include "input_ext-intf.h"
#include "interface.h" #include "interface.h"
#include "intf_plst.h"
#include "gnome_sys.h" #include "gnome_sys.h"
#include "gnome_callbacks.h" #include "gnome_callbacks.h"
#include "gnome_interface.h" #include "gnome_interface.h"
#include "gnome_support.h" #include "gnome_support.h"
#define GET_GNOME_STRUCT( item, parent ) \ #include "main.h"
gtk_object_get_data( \
GTK_OBJECT( lookup_widget(GTK_WIDGET(item), parent) ), \
"p_intf" );
void /*****************************************************************************
on_modules_activate (GtkMenuItem *menuitem, * Inline function to retrieve the interface structure
gpointer user_data) *****************************************************************************/
static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
{ {
return( gtk_object_get_data( GTK_OBJECT( lookup_widget(item, psz_parent) ),
"p_intf" ) );
} }
/*****************************************************************************
* Callbacks
******************************************************************************/
void void
on_exit_activate (GtkMenuItem *menuitem, on_menubar_open_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
p_intf = GET_GNOME_STRUCT( menuitem, "intf_window" );
p_intf->b_die = 1; /* If we have never used the file selector, open it */
} if( p_intf->p_sys->p_fileopen == NULL)
{
p_intf->p_sys->p_fileopen = create_intf_fileopen();
void gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
on_open_activate (GtkMenuItem *menuitem, "p_intf", p_intf );
gpointer user_data) }
{
gtk_widget_show( p_intf->p_sys->p_fileopen );
gdk_window_raise( p_intf->p_sys->p_fileopen->window );
} }
void void
on_preferences_activate (GtkMenuItem *menuitem, on_menubar_exit_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
p_intf->b_die = 1;
} }
void void
on_plugins_activate (GtkMenuItem *menuitem, on_menubar_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
...@@ -67,258 +95,98 @@ on_plugins_activate (GtkMenuItem *menuitem, ...@@ -67,258 +95,98 @@ on_plugins_activate (GtkMenuItem *menuitem,
void void
on_about_activate (GtkMenuItem *menuitem, on_menubar_plugins_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( menuitem, "intf_window" );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
{
p_intf->p_sys->p_about = create_intf_about ();
}
gtk_widget_show( p_intf->p_sys->p_about );
} }
void void
on_stop_clicked (GtkButton *button, on_menubar_preferences_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( button, "intf_window" );
} }
void void
on_control_activate (GtkMenuItem *menuitem, on_menubar_about_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
p_intf = GET_GNOME_STRUCT( menuitem, "intf_window" );
/* lock the change structure */ if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
vlc_mutex_lock( &p_intf->p_sys->change_lock );
if( p_intf->p_sys->b_window )
{
gtk_widget_hide( p_intf->p_sys->p_window );
p_intf->p_sys->b_window = 0;
}
else
{
if( !GTK_IS_WIDGET( p_intf->p_sys->p_window ) )
{ {
p_intf->p_sys->p_window = create_intf_window (); p_intf->p_sys->p_about = create_intf_about();
}
gtk_widget_show( p_intf->p_sys->p_window );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
"p_intf", p_intf );
p_intf->p_sys->b_window = 1;
} }
gtk_widget_show( p_intf->p_sys->p_about );
/* unlock the change structure */
vlc_mutex_unlock( &p_intf->p_sys->change_lock );
} }
void void
on_playlist_activate (GtkMenuItem *menuitem, on_toolbar_open_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
p_intf = GET_GNOME_STRUCT( menuitem, "intf_window" );
/* lock the change structure */ /* If we have never used the file selector, open it */
vlc_mutex_lock( &p_intf->p_sys->change_lock ); if( p_intf->p_sys->p_fileopen == NULL)
if( p_intf->p_sys->b_playlist )
{
gtk_widget_hide( p_intf->p_sys->p_playlist );
p_intf->p_sys->b_playlist = 0;
}
else
{ {
if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) ) p_intf->p_sys->p_fileopen = create_intf_fileopen();
{ gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
p_intf->p_sys->p_playlist = create_intf_playlist ();
}
gtk_widget_show( p_intf->p_sys->p_playlist );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_playlist),
"p_intf", p_intf ); "p_intf", p_intf );
p_intf->p_sys->b_playlist = 1;
} }
/* unlock the change structure */ gtk_widget_show( p_intf->p_sys->p_fileopen );
vlc_mutex_unlock( &p_intf->p_sys->change_lock ); gdk_window_raise( p_intf->p_sys->p_fileopen->window );
}
void
on_popup_control_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( menuitem, "intf_popup" );
/* lock the change structure */
vlc_mutex_lock( &p_intf->p_sys->change_lock );
if( p_intf->p_sys->b_window )
{
gtk_widget_hide( p_intf->p_sys->p_window );
p_intf->p_sys->b_window = 0;
}
else
{
if( !GTK_IS_WIDGET( p_intf->p_sys->p_window ) )
{
p_intf->p_sys->p_window = create_intf_window ();
}
gtk_widget_show( p_intf->p_sys->p_window );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
"p_intf", p_intf );
p_intf->p_sys->b_window = 1;
}
/* unlock the change structure */
vlc_mutex_unlock( &p_intf->p_sys->change_lock );
} }
void void
on_popup_playlist_activate (GtkMenuItem *menuitem, on_toolbar_back_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( menuitem, "intf_popup" );
/* lock the change structure */
vlc_mutex_lock( &p_intf->p_sys->change_lock );
if( p_intf->p_sys->b_playlist )
{
gtk_widget_hide( p_intf->p_sys->p_playlist );
p_intf->p_sys->b_playlist = 0;
}
else
{
if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
{
p_intf->p_sys->p_playlist = create_intf_playlist ();
}
gtk_widget_show( p_intf->p_sys->p_playlist );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_playlist),
"p_intf", p_intf );
p_intf->p_sys->b_playlist = 1;
}
/* unlock the change structure */
vlc_mutex_unlock( &p_intf->p_sys->change_lock );
} }
void void
on_popup_exit_activate (GtkMenuItem *menuitem, on_toolbar_stop_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( menuitem, "intf_popup" );
p_intf->b_die = 1;
} }
void void
on_popup_about_activate (GtkMenuItem *menuitem, on_toolbar_play_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
p_intf = GET_GNOME_STRUCT( menuitem, "intf_popup" ); if( p_intf->p_input != NULL )
if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
{ {
p_intf->p_sys->p_about = create_intf_about (); input_Play( p_intf->p_input );
} }
gtk_widget_show( p_intf->p_sys->p_about );
}
void
on_intf_window_destroy (GtkObject *object,
gpointer user_data)
{
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( object, "intf_window" );
/* FIXME don't destroy the window, just hide it */
p_intf->p_sys->p_window = NULL;
p_intf->b_die = 1;
}
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data)
{
;
}
void
on_channel1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_channel2_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_channel3_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
} }
void void
on_channel4_activate (GtkMenuItem *menuitem, on_toolbar_pause_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_channel5_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
if( p_intf->p_input != NULL )
{
input_Pause( p_intf->p_input );
}
} }
void void
on_popup_channel1_activate (GtkMenuItem *menuitem, on_toolbar_playlist_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
...@@ -326,7 +194,7 @@ on_popup_channel1_activate (GtkMenuItem *menuitem, ...@@ -326,7 +194,7 @@ on_popup_channel1_activate (GtkMenuItem *menuitem,
void void
on_popup_channel2_activate (GtkMenuItem *menuitem, on_toolbar_prev_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
...@@ -334,7 +202,7 @@ on_popup_channel2_activate (GtkMenuItem *menuitem, ...@@ -334,7 +202,7 @@ on_popup_channel2_activate (GtkMenuItem *menuitem,
void void
on_popup_channel3_activate (GtkMenuItem *menuitem, on_toolbar_next_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
...@@ -342,163 +210,115 @@ on_popup_channel3_activate (GtkMenuItem *menuitem, ...@@ -342,163 +210,115 @@ on_popup_channel3_activate (GtkMenuItem *menuitem,
void void
on_popup_channel4_activate (GtkMenuItem *menuitem, on_popup_play_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
if( p_intf->p_input != NULL )
{
input_Play( p_intf->p_input );
}
} }
void void
on_popup_channel5_activate (GtkMenuItem *menuitem, on_popup_pause_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
if( p_intf->p_input != NULL )
{
input_Pause( p_intf->p_input );
}
} }
void void
on_popup_config_channels_activate (GtkMenuItem *menuitem, on_popup_exit_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
p_intf->b_die = 1;
} }
void void
on_config_channels_activate (GtkMenuItem *menuitem, on_intf_window_destroy (GtkObject *object,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_window" );
/* FIXME don't destroy the window, just hide it */
p_intf->b_die = 1;
p_intf->p_sys->p_window = NULL;
} }
void void
on_user_guide_activate (GtkMenuItem *menuitem, on_fileopen_ok_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
GtkWidget *filesel;
gchar *filename;
} filesel = gtk_widget_get_toplevel (GTK_WIDGET (button));
gtk_widget_hide (filesel);
filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel));
void
on_popup_stop_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, (char*)filename );
} }
void void
on_popup_play_activate (GtkMenuItem *menuitem, on_fileopen_cancel_clicked (GtkButton *button,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf; gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
p_intf = GET_GNOME_STRUCT( menuitem, "intf_popup" );
input_Play( p_intf->p_input );
} }
void void
on_playlist_close_clicked (GtkButton *button, on_intf_fileopen_destroy (GtkObject *object,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_fileopen" );
p_intf->p_sys->p_fileopen = NULL;
} }
void void
on_play_clicked (GtkButton *button, on_popup_open_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf; intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
p_intf = GET_GNOME_STRUCT( button, "intf_window" ); /* If we have never used the file selector, open it */
if( p_intf->p_sys->p_fileopen == NULL)
input_Play( p_intf->p_input );
}
void
on_channel0_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_popup_channel0_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_open_clicked (GtkButton *button,
gpointer user_data)
{
GnomeUIInfo test_uiinfo[] =
{
{ {
GNOME_APP_UI_ITEM, N_( "Barf" ), p_intf->p_sys->p_fileopen = create_intf_fileopen();
NULL, gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
on_exit_activate, NULL, NULL, "p_intf", p_intf );
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
} }
};
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( button, "intf_window" );
gnome_app_insert_menus (GNOME_APP (p_intf->p_sys->p_window),
"_View/Channel/None",
test_uiinfo);
}
void
on_pause_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( button, "intf_window" );
input_Pause( p_intf->p_input );
}
void
on_popup_pause_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf;
p_intf = GET_GNOME_STRUCT( menuitem, "intf_popup" );
input_Pause( p_intf->p_input );
}
void
on_mute_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_show( p_intf->p_sys->p_fileopen );
gdk_window_raise( p_intf->p_sys->p_fileopen->window );
} }
void void
on_popup_mute_activate (GtkMenuItem *menuitem, on_popup_about_activate (GtkMenuItem *menuitem,
gpointer user_data) gpointer user_data)
{ {
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
{
p_intf->p_sys->p_about = create_intf_about();
}
gtk_widget_show( p_intf->p_sys->p_about );
} }
/* make VERSION visible to all Gnome components */ /*****************************************************************************
* gnome_callbacks.h : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "config.h" #include "config.h"
#include <gnome.h> #include <gnome.h>
/*****************************************************************************
void * Callback prototypes
on_open_activate (GtkMenuItem *menuitem, *****************************************************************************/
gpointer user_data);
void void
on_preferences_activate (GtkMenuItem *menuitem, on_menubar_open_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_modules_activate (GtkMenuItem *menuitem, on_menubar_exit_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_about_activate (GtkMenuItem *menuitem, on_menubar_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_exit_activate (GtkMenuItem *menuitem, on_menubar_plugins_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_open_activate (GtkMenuItem *menuitem, on_menubar_preferences_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_hide_activate (GtkMenuItem *menuitem, on_menubar_about_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_exit_activate (GtkMenuItem *menuitem, on_toolbar_open_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_preferences_activate (GtkMenuItem *menuitem, on_toolbar_back_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_plugins_activate (GtkMenuItem *menuitem, on_toolbar_stop_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_about_activate (GtkMenuItem *menuitem, on_toolbar_play_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_show_activate (GtkMenuItem *menuitem, on_toolbar_pause_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_stop_clicked (GtkButton *button, on_toolbar_playlist_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_popup_control_activate (GtkMenuItem *menuitem, on_toolbar_prev_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_popup_playlist_activate (GtkMenuItem *menuitem, on_toolbar_next_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_control_activate (GtkMenuItem *menuitem, on_popup_play_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_playlist_activate (GtkMenuItem *menuitem, on_popup_pause_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_popup_exit_activate (GtkMenuItem *menuitem, on_popup_exit_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void
on_popup_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void void
on_intf_window_destroy (GtkObject *object, on_intf_window_destroy (GtkObject *object,
gpointer user_data); gpointer user_data);
void void
on_intf_playlist_destroy (GtkObject *object, on_fileopen_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_control_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_channel1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_channel2_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_channel3_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_channel4_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_channel5_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_channel1_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_channel2_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_channel3_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_channel4_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_channel5_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_config_channels_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_channel1_activate (GtkMenuItem *menuitem, on_fileopen_cancel_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_channel2_activate (GtkMenuItem *menuitem, on_intf_fileopen_destroy (GtkObject *object,
gpointer user_data); gpointer user_data);
void void
on_channel3_activate (GtkMenuItem *menuitem, on_popup_open_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_channel4_activate (GtkMenuItem *menuitem, on_popup_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_channel5_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_config_channels_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_user_guide_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_stop_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_play_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data);
void
on_play_clicked (GtkButton *button,
gpointer user_data);
void
on_channel0_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_channel0_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_open_clicked (GtkButton *button,
gpointer user_data);
void
on_pause_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_pause_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_stop_clicked (GtkButton *button,
gpointer user_data);
void
on_mute_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_mute_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
...@@ -17,126 +17,51 @@ ...@@ -17,126 +17,51 @@
#include "gnome_interface.h" #include "gnome_interface.h"
#include "gnome_support.h" #include "gnome_support.h"
static GnomeUIInfo file_menu_menu_uiinfo[] = static GnomeUIInfo menubar_file_menu_uiinfo[] =
{ {
GNOMEUIINFO_MENU_OPEN_ITEM (on_open_activate, NULL), GNOMEUIINFO_MENU_OPEN_ITEM (on_menubar_open_activate, NULL),
GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_MENU_EXIT_ITEM (on_exit_activate, NULL), GNOMEUIINFO_MENU_EXIT_ITEM (on_menubar_exit_activate, NULL),
GNOMEUIINFO_END GNOMEUIINFO_END
}; };
static GnomeUIInfo channel_menu_uiinfo[] = static GnomeUIInfo menubar_view_menu_uiinfo[] =
{ {
{ {
GNOME_APP_UI_ITEM, N_("None"), GNOME_APP_UI_ITEM, N_("P_laylist"),
NULL, NULL,
on_channel0_activate, NULL, NULL, (gpointer) on_menubar_playlist_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("1"),
NULL,
on_channel1_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("2"),
NULL,
on_channel2_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("3"),
NULL,
on_channel3_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("4"),
NULL,
on_channel4_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("5"),
NULL,
on_channel5_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Configure..."),
NULL,
on_config_channels_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
GNOMEUIINFO_END
};
static GnomeUIInfo view_menu_menu_uiinfo[] =
{
{
GNOME_APP_UI_ITEM, N_("Control window"),
NULL,
on_control_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_EXEC,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Playlist"),
NULL,
on_playlist_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_INDEX, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_INDEX,
0, 0, NULL 0, (GdkModifierType) 0, NULL
}, },
{ {
GNOME_APP_UI_SUBTREE, N_("Channel"), GNOME_APP_UI_ITEM, N_("_Plugins"),
NULL, NULL,
channel_menu_uiinfo, NULL, NULL, (gpointer) on_menubar_plugins_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ATTACH,
0, 0, NULL 0, (GdkModifierType) 0, NULL
}, },
GNOMEUIINFO_END GNOMEUIINFO_END
}; };
static GnomeUIInfo settings_menu_menu_uiinfo[] = static GnomeUIInfo menubar_settings_menu_uiinfo[] =
{ {
GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_preferences_activate, NULL), GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_menubar_preferences_activate, NULL),
{
GNOME_APP_UI_ITEM, N_("Plugins..."),
NULL,
on_plugins_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
GNOMEUIINFO_END GNOMEUIINFO_END
}; };
static GnomeUIInfo help_menu_menu_uiinfo[] = static GnomeUIInfo menubar_help_menu_uiinfo[] =
{ {
{ GNOMEUIINFO_MENU_ABOUT_ITEM (on_menubar_about_activate, NULL),
GNOME_APP_UI_ITEM, N_("User guide"),
NULL,
on_user_guide_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
GNOMEUIINFO_MENU_ABOUT_ITEM (on_about_activate, NULL),
GNOMEUIINFO_END GNOMEUIINFO_END
}; };
static GnomeUIInfo menubar_uiinfo[] = static GnomeUIInfo menubar_uiinfo[] =
{ {
GNOMEUIINFO_MENU_FILE_TREE (file_menu_menu_uiinfo), GNOMEUIINFO_MENU_FILE_TREE (menubar_file_menu_uiinfo),
GNOMEUIINFO_MENU_VIEW_TREE (view_menu_menu_uiinfo), GNOMEUIINFO_MENU_VIEW_TREE (menubar_view_menu_uiinfo),
GNOMEUIINFO_MENU_SETTINGS_TREE (settings_menu_menu_uiinfo), GNOMEUIINFO_MENU_SETTINGS_TREE (menubar_settings_menu_uiinfo),
GNOMEUIINFO_MENU_HELP_TREE (help_menu_menu_uiinfo), GNOMEUIINFO_MENU_HELP_TREE (menubar_help_menu_uiinfo),
GNOMEUIINFO_END GNOMEUIINFO_END
}; };
...@@ -144,138 +69,86 @@ GtkWidget* ...@@ -144,138 +69,86 @@ GtkWidget*
create_intf_window (void) create_intf_window (void)
{ {
GtkWidget *intf_window; GtkWidget *intf_window;
GtkWidget *dock; GtkWidget *dock1;
GtkWidget *toolbar; GtkWidget *toolbar;
GtkWidget *tmp_toolbar_icon; GtkWidget *tmp_toolbar_icon;
GtkWidget *open; GtkWidget *toolbar_open;
GtkWidget *jump; GtkWidget *toolbar_back;
GtkWidget *vseparator1; GtkWidget *toolbar_stop;
GtkWidget *prev; GtkWidget *toolbar_play;
GtkWidget *rewind; GtkWidget *toolbar_pause;
GtkWidget *stop;
GtkWidget *play;
GtkWidget *next;
GtkWidget *vseparator2; GtkWidget *vseparator2;
GtkWidget *pause; GtkWidget *toolbar_playlist;
GtkWidget *mute; GtkWidget *toolbar_prev;
GtkWidget *table1; GtkWidget *toolbar_next;
GtkWidget *hscale1; GtkWidget *scrolledwindow1;
GtkWidget *text1;
GtkWidget *appbar; GtkWidget *appbar;
intf_window = gnome_app_new ("Vlc", _("VideoLAN Client")); intf_window = gnome_app_new ("VideoLAN Client", _("VideoLAN Client"));
gtk_object_set_data (GTK_OBJECT (intf_window), "intf_window", intf_window); gtk_object_set_data (GTK_OBJECT (intf_window), "intf_window", intf_window);
dock = GNOME_APP (intf_window)->dock; dock1 = GNOME_APP (intf_window)->dock;
gtk_widget_ref (dock); gtk_widget_ref (dock1);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "dock", dock, gtk_object_set_data_full (GTK_OBJECT (intf_window), "dock1", dock1,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (dock); gtk_widget_show (dock1);
gnome_app_create_menus (GNOME_APP (intf_window), menubar_uiinfo); gnome_app_create_menus (GNOME_APP (intf_window), menubar_uiinfo);
gtk_widget_ref (menubar_uiinfo[0].widget); gtk_widget_ref (menubar_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "file_menu", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_file",
menubar_uiinfo[0].widget, menubar_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (file_menu_menu_uiinfo[0].widget); gtk_widget_ref (menubar_file_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "open", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_open",
file_menu_menu_uiinfo[0].widget, menubar_file_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (file_menu_menu_uiinfo[1].widget); gtk_widget_ref (menubar_file_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator1", gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator1",
file_menu_menu_uiinfo[1].widget, menubar_file_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (file_menu_menu_uiinfo[2].widget); gtk_widget_ref (menubar_file_menu_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "exit", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_exit",
file_menu_menu_uiinfo[2].widget, menubar_file_menu_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (menubar_uiinfo[1].widget); gtk_widget_ref (menubar_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "view_menu", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_view",
menubar_uiinfo[1].widget, menubar_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (view_menu_menu_uiinfo[0].widget); gtk_widget_ref (menubar_view_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "control", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_playlist",
view_menu_menu_uiinfo[0].widget, menubar_view_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (view_menu_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "playlist",
view_menu_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (view_menu_menu_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel",
view_menu_menu_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel0",
channel_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel1",
channel_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel2",
channel_menu_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel3",
channel_menu_uiinfo[3].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[4].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel4",
channel_menu_uiinfo[4].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[5].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "channel5",
channel_menu_uiinfo[5].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (channel_menu_uiinfo[6].widget); gtk_widget_ref (menubar_view_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "config_channels", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_plugins",
channel_menu_uiinfo[6].widget, menubar_view_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (menubar_uiinfo[2].widget); gtk_widget_ref (menubar_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "settings_menu", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_settings",
menubar_uiinfo[2].widget, menubar_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (settings_menu_menu_uiinfo[0].widget); gtk_widget_ref (menubar_settings_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "preferences", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_preferences",
settings_menu_menu_uiinfo[0].widget, menubar_settings_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (settings_menu_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "plugins",
settings_menu_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (menubar_uiinfo[3].widget); gtk_widget_ref (menubar_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "help_menu", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_help",
menubar_uiinfo[3].widget, menubar_uiinfo[3].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (help_menu_menu_uiinfo[0].widget); gtk_widget_ref (menubar_help_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "user_guide", gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_about",
help_menu_menu_uiinfo[0].widget, menubar_help_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (help_menu_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "about",
help_menu_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
...@@ -285,100 +158,73 @@ create_intf_window (void) ...@@ -285,100 +158,73 @@ create_intf_window (void)
gtk_widget_show (toolbar); gtk_widget_show (toolbar);
gnome_app_add_toolbar (GNOME_APP (intf_window), GTK_TOOLBAR (toolbar), "toolbar", gnome_app_add_toolbar (GNOME_APP (intf_window), GTK_TOOLBAR (toolbar), "toolbar",
GNOME_DOCK_ITEM_BEH_EXCLUSIVE, GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
GNOME_DOCK_TOP, 1, 0, 0); GNOME_DOCK_TOP, 1, 0, 2);
gtk_container_set_border_width (GTK_CONTAINER (toolbar), 1);
gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar), 16);
gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_SPACE_LINE);
gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NONE); gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NONE);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_OPEN); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_OPEN);
open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), toolbar_open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Open"), _("Open"),
NULL, NULL, _("Open File"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (open);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "open", open,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (open);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_JUMP_TO);
jump = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Jump"),
NULL, NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (jump); gtk_widget_ref (toolbar_open);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "jump", jump, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_open", toolbar_open,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (jump); gtk_widget_show (toolbar_open);
vseparator1 = gtk_vseparator_new (); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_widget_ref (vseparator1);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "vseparator1", vseparator1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vseparator1);
gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator1, NULL, NULL);
gtk_widget_set_usize (vseparator1, 16, 32);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FIRST);
prev = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Prev"),
NULL, NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (prev);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "prev", prev,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (prev);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_BACK); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_BACK);
rewind = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), toolbar_back = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Back"), _("Back"),
NULL, NULL, _("Go Backwards"), NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (rewind); gtk_widget_ref (toolbar_back);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "rewind", rewind, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_back", toolbar_back,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (rewind); gtk_widget_show (toolbar_back);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_STOP); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_STOP);
stop = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), toolbar_stop = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Stop"), _("Stop"),
NULL, NULL, _("Stop Stream"), NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (stop); gtk_widget_ref (toolbar_stop);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "stop", stop, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_stop", toolbar_stop,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (stop); gtk_widget_show (toolbar_stop);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FORWARD); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FORWARD);
play = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), toolbar_play = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Play"), _("Play"),
NULL, NULL, _("Play Stream"), NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (play); gtk_widget_ref (toolbar_play);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "play", play, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_play", toolbar_play,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (play); gtk_widget_show (toolbar_play);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_LAST); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER_STOP);
next = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), toolbar_pause = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Next"), _("Pause"),
NULL, NULL, _("Pause Stream"), NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (next); gtk_widget_ref (toolbar_pause);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "next", next, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_pause", toolbar_pause,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (next); gtk_widget_show (toolbar_pause);
vseparator2 = gtk_vseparator_new (); vseparator2 = gtk_vseparator_new ();
gtk_widget_ref (vseparator2); gtk_widget_ref (vseparator2);
...@@ -386,47 +232,61 @@ create_intf_window (void) ...@@ -386,47 +232,61 @@ create_intf_window (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vseparator2); gtk_widget_show (vseparator2);
gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator2, NULL, NULL); gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), vseparator2, NULL, NULL);
gtk_widget_set_usize (vseparator2, 16, 32);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TIMER_STOP); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
pause = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_INDEX);
toolbar_playlist = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Pause"), _("Playlist"),
NULL, NULL, _("Open Playlist"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (toolbar_playlist);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_playlist", toolbar_playlist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_playlist);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FIRST);
toolbar_prev = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Prev"),
_("Previous File"), NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (pause); gtk_widget_ref (toolbar_prev);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "pause", pause, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_prev", toolbar_prev,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (pause); gtk_widget_show (toolbar_prev);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_VOLUME); tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_LAST);
mute = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), toolbar_next = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_BUTTON,
NULL, NULL,
_("Mute"), _("Next"),
NULL, NULL, _("Next File"), NULL,
tmp_toolbar_icon, NULL, NULL); tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (mute); gtk_widget_ref (toolbar_next);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "mute", mute, gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_next", toolbar_next,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (mute); gtk_widget_show (toolbar_next);
table1 = gtk_table_new (4, 3, FALSE); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_ref (table1); gtk_widget_ref (scrolledwindow1);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "table1", table1, gtk_object_set_data_full (GTK_OBJECT (intf_window), "scrolledwindow1", scrolledwindow1,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (table1); gtk_widget_show (scrolledwindow1);
gnome_app_set_contents (GNOME_APP (intf_window), table1); gnome_app_set_contents (GNOME_APP (intf_window), scrolledwindow1);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 12, 0.1, 1, 1))); text1 = gtk_text_new (NULL, NULL);
gtk_widget_ref (hscale1); gtk_widget_ref (text1);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "hscale1", hscale1, gtk_object_set_data_full (GTK_OBJECT (intf_window), "text1", text1,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hscale1); gtk_widget_show (text1);
gtk_table_attach (GTK_TABLE (table1), hscale1, 1, 2, 1, 2, gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1);
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); _("This is some random text. Nah."), 30);
appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER); appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
gtk_widget_ref (appbar); gtk_widget_ref (appbar);
...@@ -438,152 +298,53 @@ create_intf_window (void) ...@@ -438,152 +298,53 @@ create_intf_window (void)
gtk_signal_connect (GTK_OBJECT (intf_window), "destroy", gtk_signal_connect (GTK_OBJECT (intf_window), "destroy",
GTK_SIGNAL_FUNC (on_intf_window_destroy), GTK_SIGNAL_FUNC (on_intf_window_destroy),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (open), "clicked", gnome_app_install_menu_hints (GNOME_APP (intf_window), menubar_uiinfo);
GTK_SIGNAL_FUNC (on_open_clicked), gtk_signal_connect (GTK_OBJECT (toolbar_open), "clicked",
GTK_SIGNAL_FUNC (on_toolbar_open_clicked),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (stop), "clicked", gtk_signal_connect (GTK_OBJECT (toolbar_back), "clicked",
GTK_SIGNAL_FUNC (on_stop_clicked), GTK_SIGNAL_FUNC (on_toolbar_back_clicked),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (play), "clicked", gtk_signal_connect (GTK_OBJECT (toolbar_stop), "clicked",
GTK_SIGNAL_FUNC (on_play_clicked), GTK_SIGNAL_FUNC (on_toolbar_stop_clicked),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (pause), "clicked", gtk_signal_connect (GTK_OBJECT (toolbar_play), "clicked",
GTK_SIGNAL_FUNC (on_pause_clicked), GTK_SIGNAL_FUNC (on_toolbar_play_clicked),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (mute), "clicked", gtk_signal_connect (GTK_OBJECT (toolbar_pause), "clicked",
GTK_SIGNAL_FUNC (on_mute_clicked), GTK_SIGNAL_FUNC (on_toolbar_pause_clicked),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (toolbar_playlist), "clicked",
return intf_window; GTK_SIGNAL_FUNC (on_toolbar_playlist_clicked),
} NULL);
gtk_signal_connect (GTK_OBJECT (toolbar_prev), "clicked",
GtkWidget* GTK_SIGNAL_FUNC (on_toolbar_prev_clicked),
create_intf_about (void) NULL);
{ gtk_signal_connect (GTK_OBJECT (toolbar_next), "clicked",
const gchar *authors[] = { GTK_SIGNAL_FUNC (on_toolbar_next_clicked),
"too many to list here ...",
"see http://www.videolan.org/ for more details",
NULL
};
GtkWidget *intf_about;
intf_about = gnome_about_new ("Vlc", VERSION,
_("(C) 1996-2000 the VideoLAN Team"),
authors,
_("This is the VideoLAN client.\nIt plays MPEG streams from a file or a network source."),
NULL); NULL);
gtk_object_set_data (GTK_OBJECT (intf_about), "intf_about", intf_about);
return intf_about; return intf_window;
} }
static GnomeUIInfo popup_channel_menu_uiinfo[] =
{
{
GNOME_APP_UI_ITEM, N_("None"),
NULL,
on_popup_channel0_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("1"),
NULL,
on_popup_channel1_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("2"),
NULL,
on_popup_channel2_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("3"),
NULL,
on_popup_channel3_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("4"),
NULL,
on_popup_channel4_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("5"),
NULL,
on_popup_channel5_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Configure..."),
NULL,
on_popup_config_channels_activate, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
},
GNOMEUIINFO_END
};
static GnomeUIInfo intf_popup_uiinfo[] = static GnomeUIInfo intf_popup_uiinfo[] =
{ {
{ {
GNOME_APP_UI_ITEM, N_("Play"), GNOME_APP_UI_ITEM, N_("_Play"),
NULL, NULL,
on_popup_play_activate, NULL, NULL, (gpointer) on_popup_play_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_FORWARD, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_FORWARD,
0, 0, NULL 0, (GdkModifierType) 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Stop"),
NULL,
on_popup_stop_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_STOP,
0, 0, NULL
}, },
GNOMEUIINFO_SEPARATOR,
{ {
GNOME_APP_UI_ITEM, N_("Pause"), GNOME_APP_UI_ITEM, N_("Pause"),
NULL, NULL,
on_popup_pause_activate, NULL, NULL, (gpointer) on_popup_pause_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TIMER_STOP, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TIMER_STOP,
0, 0, NULL 0, (GdkModifierType) 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Mute"),
NULL,
on_popup_mute_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_VOLUME,
0, 0, NULL
},
{
GNOME_APP_UI_SUBTREE, N_("Channel"),
NULL,
popup_channel_menu_uiinfo, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, 0, NULL
}, },
GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_SEPARATOR,
{ GNOMEUIINFO_MENU_OPEN_ITEM (on_popup_open_activate, NULL),
GNOME_APP_UI_ITEM, N_("Control window"),
NULL,
on_popup_control_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_EXEC,
0, 0, NULL
},
{
GNOME_APP_UI_ITEM, N_("Playlist"),
NULL,
on_popup_playlist_activate, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_INDEX,
0, 0, NULL
},
GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_MENU_ABOUT_ITEM (on_popup_about_activate, NULL), GNOMEUIINFO_MENU_ABOUT_ITEM (on_popup_about_activate, NULL),
GNOMEUIINFO_MENU_EXIT_ITEM (on_popup_exit_activate, NULL), GNOMEUIINFO_MENU_EXIT_ITEM (on_popup_exit_activate, NULL),
...@@ -606,7 +367,7 @@ create_intf_popup (void) ...@@ -606,7 +367,7 @@ create_intf_popup (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[1].widget); gtk_widget_ref (intf_popup_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_stop", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_pause",
intf_popup_uiinfo[1].widget, intf_popup_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
...@@ -616,196 +377,93 @@ create_intf_popup (void) ...@@ -616,196 +377,93 @@ create_intf_popup (void)
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[3].widget); gtk_widget_ref (intf_popup_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_pause", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_open",
intf_popup_uiinfo[3].widget, intf_popup_uiinfo[3].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[4].widget); gtk_widget_ref (intf_popup_uiinfo[4].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_mute", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3",
intf_popup_uiinfo[4].widget, intf_popup_uiinfo[4].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[5].widget); gtk_widget_ref (intf_popup_uiinfo[5].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about",
intf_popup_uiinfo[5].widget, intf_popup_uiinfo[5].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel0",
popup_channel_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel1",
popup_channel_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel2",
popup_channel_menu_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel3",
popup_channel_menu_uiinfo[3].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[4].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel4",
popup_channel_menu_uiinfo[4].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[5].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_channel5",
popup_channel_menu_uiinfo[5].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (popup_channel_menu_uiinfo[6].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_config_channels",
popup_channel_menu_uiinfo[6].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[6].widget); gtk_widget_ref (intf_popup_uiinfo[6].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator3", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_exit",
intf_popup_uiinfo[6].widget, intf_popup_uiinfo[6].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[7].widget); return intf_popup;
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_control", }
intf_popup_uiinfo[7].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[8].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_playlist",
intf_popup_uiinfo[8].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[9].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator2",
intf_popup_uiinfo[9].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[10].widget); GtkWidget*
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_about", create_intf_about (void)
intf_popup_uiinfo[10].widget, {
(GtkDestroyNotify) gtk_widget_unref); const gchar *authors[] = {
"Rgis Duchesne <regis@via.ecp.fr>",
"Michel Lespinasse <walken@zoy.org>",
"Olivier Pomel <pomel@via.ecp.fr>",
"Jean-Philippe Grimaldi <jeanphi@via.ecp.fr>",
"Andres Krapf <dae@via.ecp.fr>",
"Christophe Massiot <massiot@via.ecp.fr>",
"Vincent Seguin <seguin@via.ecp.fr>",
"Benoit Steiner <benny@via.ecp.fr>",
"Jean-Marc Dressler <polux@via.ecp.fr>",
"Gal Hendryckx <jimmy@via.ecp.fr>",
"Samuel Hocevar <sam@zoy.org>",
"Brieuc Jeunhomme <bbp@via.ecp.fr>",
"Michel Kaempf <maxx@via.ecp.fr>",
"Stphane Borel <stef@via.ecp.fr>",
"Renaud Dartus <reno@via.ecp.fr>",
"Henri Fallon <henri@via.ecp.fr>",
NULL
};
GtkWidget *intf_about;
gtk_widget_ref (intf_popup_uiinfo[11].widget); intf_about = gnome_about_new ("VideoLAN Client", VERSION,
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_exit", _("(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team"),
intf_popup_uiinfo[11].widget, authors,
(GtkDestroyNotify) gtk_widget_unref); _("This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and MPEG 2 files from a file or from a network source."),
NULL);
gtk_object_set_data (GTK_OBJECT (intf_about), "intf_about", intf_about);
return intf_popup; return intf_about;
} }
GtkWidget* GtkWidget*
create_intf_playlist (void) create_intf_fileopen (void)
{ {
GtkWidget *intf_playlist; GtkWidget *intf_fileopen;
GtkWidget *vbox1; GtkWidget *fileopen_ok;
GtkWidget *scrolledwindow; GtkWidget *fileopen_cancel;
GtkWidget *clist;
GtkWidget *label_name; intf_fileopen = gtk_file_selection_new (_("Open File"));
GtkWidget *label_type; gtk_object_set_data (GTK_OBJECT (intf_fileopen), "intf_fileopen", intf_fileopen);
GtkWidget *label_length; gtk_container_set_border_width (GTK_CONTAINER (intf_fileopen), 10);
GtkWidget *hbuttonbox;
GtkWidget *playlist_load; fileopen_ok = GTK_FILE_SELECTION (intf_fileopen)->ok_button;
GtkWidget *playlist_close; gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_ok", fileopen_ok);
GtkWidget *playlist_help; gtk_widget_show (fileopen_ok);
GTK_WIDGET_SET_FLAGS (fileopen_ok, GTK_CAN_DEFAULT);
intf_playlist = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (intf_playlist), "intf_playlist", intf_playlist); fileopen_cancel = GTK_FILE_SELECTION (intf_fileopen)->cancel_button;
gtk_window_set_title (GTK_WINDOW (intf_playlist), _("Playlist")); gtk_object_set_data (GTK_OBJECT (intf_fileopen), "fileopen_cancel", fileopen_cancel);
gtk_window_set_default_size (GTK_WINDOW (intf_playlist), -1, 400); gtk_widget_show (fileopen_cancel);
gtk_window_set_policy (GTK_WINDOW (intf_playlist), TRUE, TRUE, FALSE); GTK_WIDGET_SET_FLAGS (fileopen_cancel, GTK_CAN_DEFAULT);
vbox1 = gtk_vbox_new (FALSE, 0); gtk_signal_connect (GTK_OBJECT (intf_fileopen), "destroy",
gtk_widget_ref (vbox1); GTK_SIGNAL_FUNC (on_intf_fileopen_destroy),
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "vbox1", vbox1, NULL);
(GtkDestroyNotify) gtk_widget_unref); gtk_signal_connect (GTK_OBJECT (fileopen_ok), "clicked",
gtk_widget_show (vbox1); GTK_SIGNAL_FUNC (on_fileopen_ok_clicked),
gtk_container_add (GTK_CONTAINER (intf_playlist), vbox1);
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_ref (scrolledwindow);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "scrolledwindow", scrolledwindow,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow);
gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
clist = gtk_clist_new (3);
gtk_widget_ref (clist);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "clist", clist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (clist);
gtk_container_add (GTK_CONTAINER (scrolledwindow), clist);
gtk_clist_set_column_width (GTK_CLIST (clist), 0, 147);
gtk_clist_set_column_width (GTK_CLIST (clist), 1, 76);
gtk_clist_set_column_width (GTK_CLIST (clist), 2, 98);
gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_MULTIPLE);
gtk_clist_column_titles_show (GTK_CLIST (clist));
label_name = gtk_label_new (_("Name"));
gtk_widget_ref (label_name);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label_name", label_name,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label_name);
gtk_clist_set_column_widget (GTK_CLIST (clist), 0, label_name);
label_type = gtk_label_new (_("Type"));
gtk_widget_ref (label_type);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label_type", label_type,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label_type);
gtk_clist_set_column_widget (GTK_CLIST (clist), 1, label_type);
label_length = gtk_label_new (_("Length"));
gtk_widget_ref (label_length);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "label_length", label_length,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label_length);
gtk_clist_set_column_widget (GTK_CLIST (clist), 2, label_length);
hbuttonbox = gtk_hbutton_box_new ();
gtk_widget_ref (hbuttonbox);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "hbuttonbox", hbuttonbox,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbuttonbox);
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox), 5);
playlist_load = gtk_button_new_with_label (_("Load"));
gtk_widget_ref (playlist_load);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "playlist_load", playlist_load,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_load);
gtk_container_add (GTK_CONTAINER (hbuttonbox), playlist_load);
GTK_WIDGET_SET_FLAGS (playlist_load, GTK_CAN_DEFAULT);
playlist_close = gnome_stock_button (GNOME_STOCK_BUTTON_CLOSE);
gtk_widget_ref (playlist_close);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "playlist_close", playlist_close,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_close);
gtk_container_add (GTK_CONTAINER (hbuttonbox), playlist_close);
GTK_WIDGET_SET_FLAGS (playlist_close, GTK_CAN_DEFAULT);
playlist_help = gnome_stock_button (GNOME_STOCK_BUTTON_HELP);
gtk_widget_ref (playlist_help);
gtk_object_set_data_full (GTK_OBJECT (intf_playlist), "playlist_help", playlist_help,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_help);
gtk_container_add (GTK_CONTAINER (hbuttonbox), playlist_help);
GTK_WIDGET_SET_FLAGS (playlist_help, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (intf_playlist), "destroy",
GTK_SIGNAL_FUNC (on_intf_playlist_destroy),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (playlist_close), "clicked", gtk_signal_connect (GTK_OBJECT (fileopen_cancel), "clicked",
GTK_SIGNAL_FUNC (on_playlist_close_clicked), GTK_SIGNAL_FUNC (on_fileopen_cancel_clicked),
NULL); NULL);
return intf_playlist; return intf_fileopen;
} }
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
*/ */
GtkWidget* create_intf_window (void); GtkWidget* create_intf_window (void);
GtkWidget* create_intf_about (void);
GtkWidget* create_intf_popup (void); GtkWidget* create_intf_popup (void);
GtkWidget* create_intf_playlist (void); GtkWidget* create_intf_about (void);
GtkWidget* create_intf_fileopen (void);
...@@ -91,6 +91,9 @@ create_pixmap (GtkWidget *widget, ...@@ -91,6 +91,9 @@ create_pixmap (GtkWidget *widget,
GdkBitmap *mask; GdkBitmap *mask;
gchar *pathname; gchar *pathname;
if (!filename || !filename[0])
return create_dummy_pixmap (widget, gnome_pixmap);
pathname = gnome_pixmap_file (filename); pathname = gnome_pixmap_file (filename);
if (!pathname) if (!pathname)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome_sys.h: private Gnome interface description * gnome_sys.h: private Gnome interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: gnome_sys.h,v 1.1 2001/02/11 01:15:10 sam Exp $ * $Id: gnome_sys.h,v 1.2 2001/02/12 00:20:37 sam Exp $
* *
* Authors: * Authors:
* *
...@@ -48,6 +48,7 @@ typedef struct intf_sys_s ...@@ -48,6 +48,7 @@ typedef struct intf_sys_s
GtkWidget * p_popup; /* popup menu */ GtkWidget * p_popup; /* popup menu */
GtkWidget * p_playlist; /* playlist */ GtkWidget * p_playlist; /* playlist */
GtkWidget * p_about; /* about window */ GtkWidget * p_about; /* about window */
GtkWidget * p_fileopen; /* file open window */
/* XXX: ugly kludge */ /* XXX: ugly kludge */
void ( *pf_gtk_callback ) ( void ); void ( *pf_gtk_callback ) ( void );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_gnome.c: Gnome interface * intf_gnome.c: Gnome interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gnome.c,v 1.8 2001/02/11 01:15:10 sam Exp $ * $Id: intf_gnome.c,v 1.9 2001/02/12 00:20:37 sam Exp $
* *
* Authors: * Authors:
* *
...@@ -180,6 +180,7 @@ static void intf_Run( intf_thread_t *p_intf ) ...@@ -180,6 +180,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* we don't create these ones yet because we perhaps won't need them */ /* we don't create these ones yet because we perhaps won't need them */
p_intf->p_sys->p_about = NULL; p_intf->p_sys->p_about = NULL;
p_intf->p_sys->p_playlist = NULL; p_intf->p_sys->p_playlist = NULL;
p_intf->p_sys->p_fileopen = NULL;
/* store p_sys to keep an eye on it */ /* store p_sys to keep an eye on it */
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window), gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
......
<?xml version="1.0"?>
<GTK-Interface>
<project>
<name>VideoLAN Client</name>
<program_name>vlc</program_name>
<directory></directory>
<source_directory></source_directory>
<pixmaps_directory>pixmaps</pixmaps_directory>
<language>C</language>
<gnome_support>True</gnome_support>
<gettext_support>True</gettext_support>
<output_main_file>False</output_main_file>
<output_build_files>False</output_build_files>
<main_source_file>gnome_interface.c</main_source_file>
<main_header_file>gnome_interface.h</main_header_file>
<handler_source_file>gnome_callbacks.c</handler_source_file>
<handler_header_file>gnome_callbacks.h</handler_header_file>
<support_source_file>gnome_support.c</support_source_file>
<support_header_file>gnome_support.h</support_header_file>
</project>
<widget>
<class>GnomeApp</class>
<name>intf_window</name>
<signal>
<name>destroy</name>
<handler>on_intf_window_destroy</handler>
<last_modification_time>Sun, 11 Feb 2001 17:41:57 GMT</last_modification_time>
</signal>
<title>VideoLAN Client</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<enable_layout_config>True</enable_layout_config>
<widget>
<class>GnomeDock</class>
<child_name>GnomeApp:dock</child_name>
<name>dock1</name>
<allow_floating>True</allow_floating>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GnomeDockItem</class>
<name>dockitem_menubar</name>
<border_width>2</border_width>
<placement>GNOME_DOCK_TOP</placement>
<band>0</band>
<position>0</position>
<offset>0</offset>
<locked>False</locked>
<exclusive>True</exclusive>
<never_floating>False</never_floating>
<never_vertical>True</never_vertical>
<never_horizontal>False</never_horizontal>
<shadow_type>GTK_SHADOW_OUT</shadow_type>
<widget>
<class>GtkMenuBar</class>
<name>menubar</name>
<shadow_type>GTK_SHADOW_NONE</shadow_type>
<widget>
<class>GtkMenuItem</class>
<name>menubar_file</name>
<stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>
<widget>
<class>GtkMenu</class>
<name>menubar_file_menu</name>
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_open</name>
<signal>
<name>activate</name>
<handler>on_menubar_open_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_OPEN_ITEM</stock_item>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator1</name>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_exit</name>
<signal>
<name>activate</name>
<handler>on_menubar_exit_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
</widget>
</widget>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_view</name>
<stock_item>GNOMEUIINFO_MENU_VIEW_TREE</stock_item>
<widget>
<class>GtkMenu</class>
<name>menubar_view_menu</name>
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_playlist</name>
<signal>
<name>activate</name>
<handler>on_menubar_playlist_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal>
<label>P_laylist</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_INDEX</stock_icon>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_plugins</name>
<signal>
<name>activate</name>
<handler>on_menubar_plugins_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal>
<label>_Plugins</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_ATTACH</stock_icon>
</widget>
</widget>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_settings</name>
<stock_item>GNOMEUIINFO_MENU_SETTINGS_TREE</stock_item>
<widget>
<class>GtkMenu</class>
<name>menubar_settings_menu</name>
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_preferences</name>
<signal>
<name>activate</name>
<handler>on_menubar_preferences_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_PREFERENCES_ITEM</stock_item>
</widget>
</widget>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>menubar_help</name>
<stock_item>GNOMEUIINFO_MENU_HELP_TREE</stock_item>
<widget>
<class>GtkMenu</class>
<name>menubar_help_menu</name>
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_about</name>
<signal>
<name>activate</name>
<handler>on_menubar_about_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:55:04 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
</widget>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GnomeDockItem</class>
<name>dockitem_toolbar</name>
<border_width>1</border_width>
<placement>GNOME_DOCK_TOP</placement>
<band>1</band>
<position>0</position>
<offset>2</offset>
<locked>False</locked>
<exclusive>True</exclusive>
<never_floating>False</never_floating>
<never_vertical>False</never_vertical>
<never_horizontal>False</never_horizontal>
<shadow_type>GTK_SHADOW_OUT</shadow_type>
<widget>
<class>GtkToolbar</class>
<name>toolbar</name>
<border_width>1</border_width>
<orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
<type>GTK_TOOLBAR_BOTH</type>
<space_size>16</space_size>
<space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
<relief>GTK_RELIEF_NONE</relief>
<tooltips>True</tooltips>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_open</name>
<tooltip>Open File</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_open_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:24 GMT</last_modification_time>
</signal>
<label>Open</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_OPEN</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_back</name>
<tooltip>Go Backwards</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_back_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:28 GMT</last_modification_time>
</signal>
<label>Back</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_BACK</stock_pixmap>
<child>
<new_group>True</new_group>
</child>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_stop</name>
<tooltip>Stop Stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_stop_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:33 GMT</last_modification_time>
</signal>
<label>Stop</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_STOP</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_play</name>
<tooltip>Play Stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_play_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:39 GMT</last_modification_time>
</signal>
<label>Play</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_FORWARD</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_pause</name>
<tooltip>Pause Stream</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_pause_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:43 GMT</last_modification_time>
</signal>
<label>Pause</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_TIMER_STOP</stock_pixmap>
</widget>
<widget>
<class>GtkVSeparator</class>
<name>vseparator2</name>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_playlist</name>
<tooltip>Open Playlist</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_playlist_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:48 GMT</last_modification_time>
</signal>
<label>Playlist</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_INDEX</stock_pixmap>
<child>
<new_group>True</new_group>
</child>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_prev</name>
<tooltip>Previous File</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_prev_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:52 GMT</last_modification_time>
</signal>
<label>Prev</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_FIRST</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_next</name>
<tooltip>Next File</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_next_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 17:06:56 GMT</last_modification_time>
</signal>
<label>Next</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_LAST</stock_pixmap>
</widget>
</widget>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<child_name>GnomeDock:contents</child_name>
<name>scrolledwindow1</name>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkText</class>
<name>text1</name>
<can_focus>True</can_focus>
<editable>False</editable>
<text>This is some random text. Nah.</text>
</widget>
</widget>
</widget>
<widget>
<class>GnomeAppBar</class>
<child_name>GnomeApp:appbar</child_name>
<name>appbar</name>
<has_progress>True</has_progress>
<has_status>True</has_status>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkMenu</class>
<name>intf_popup</name>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_play</name>
<signal>
<name>activate</name>
<handler>on_popup_play_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:52:11 GMT</last_modification_time>
</signal>
<label>_Play</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_FORWARD</stock_icon>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_pause</name>
<signal>
<name>activate</name>
<handler>on_popup_pause_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:52:11 GMT</last_modification_time>
</signal>
<label>Pause</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_TIMER_STOP</stock_icon>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator2</name>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_open</name>
<signal>
<name>activate</name>
<handler>on_popup_open_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 23:49:08 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_OPEN_ITEM</stock_item>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator3</name>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_about</name>
<signal>
<name>activate</name>
<handler>on_popup_about_activate</handler>
<last_modification_time>Mon, 12 Feb 2001 00:00:08 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_exit</name>
<signal>
<name>activate</name>
<handler>on_popup_exit_activate</handler>
<last_modification_time>Sun, 11 Feb 2001 16:49:30 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
</widget>
</widget>
<widget>
<class>GnomeAbout</class>
<name>intf_about</name>
<modal>False</modal>
<copyright>(C) 1996, 1997, 1998, 1999, 2000, 2001 - the VideoLAN Team</copyright>
<authors>Rgis Duchesne &lt;regis@via.ecp.fr&gt;
Michel Lespinasse &lt;walken@zoy.org&gt;
Olivier Pomel &lt;pomel@via.ecp.fr&gt;
Jean-Philippe Grimaldi &lt;jeanphi@via.ecp.fr&gt;
Andres Krapf &lt;dae@via.ecp.fr&gt;
Christophe Massiot &lt;massiot@via.ecp.fr&gt;
Vincent Seguin &lt;seguin@via.ecp.fr&gt;
Benoit Steiner &lt;benny@via.ecp.fr&gt;
Jean-Marc Dressler &lt;polux@via.ecp.fr&gt;
Gal Hendryckx &lt;jimmy@via.ecp.fr&gt;
Samuel Hocevar &lt;sam@zoy.org&gt;
Brieuc Jeunhomme &lt;bbp@via.ecp.fr&gt;
Michel Kaempf &lt;maxx@via.ecp.fr&gt;
Stphane Borel &lt;stef@via.ecp.fr&gt;
Renaud Dartus &lt;reno@via.ecp.fr&gt;
Henri Fallon &lt;henri@via.ecp.fr&gt;
</authors>
<comments>This is the VideoLAN client, a DVD and MPEG player. It can play MPEG and MPEG 2 files from a file or from a network source.</comments>
</widget>
<widget>
<class>GtkFileSelection</class>
<name>intf_fileopen</name>
<border_width>10</border_width>
<signal>
<name>destroy</name>
<handler>on_intf_fileopen_destroy</handler>
<last_modification_time>Sun, 11 Feb 2001 18:36:13 GMT</last_modification_time>
</signal>
<title>Open File</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<show_file_op_buttons>True</show_file_op_buttons>
<widget>
<class>GtkButton</class>
<child_name>FileSel:ok_button</child_name>
<name>fileopen_ok</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_fileopen_ok_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 18:22:44 GMT</last_modification_time>
</signal>
<label>OK</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<child_name>FileSel:cancel_button</child_name>
<name>fileopen_cancel</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_fileopen_cancel_clicked</handler>
<last_modification_time>Sun, 11 Feb 2001 18:22:50 GMT</last_modification_time>
</signal>
<label>Cancel</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</GTK-Interface>
...@@ -320,6 +320,8 @@ int vout_Manage( vout_thread_t *p_vout ) ...@@ -320,6 +320,8 @@ int vout_Manage( vout_thread_t *p_vout )
/* FIXME : this is temporary */ /* FIXME : this is temporary */
case SDLK_p: case SDLK_p:
if( p_input != NULL )
{
if( p_input->stream.control.i_status == PLAYING_S ) if( p_input->stream.control.i_status == PLAYING_S )
{ {
input_Pause( p_input ); input_Pause( p_input );
...@@ -328,17 +330,23 @@ int vout_Manage( vout_thread_t *p_vout ) ...@@ -328,17 +330,23 @@ int vout_Manage( vout_thread_t *p_vout )
{ {
input_Play( p_input ); input_Play( p_input );
} }
}
break; break;
case SDLK_a: case SDLK_a:
if( p_input != NULL )
{
i_rate = p_input->stream.control.i_rate/2; i_rate = p_input->stream.control.i_rate/2;
if ( i_rate >= MINIMAL_RATE ) if ( i_rate >= MINIMAL_RATE )
{ {
input_Forward( p_input, i_rate ); input_Forward( p_input, i_rate );
} }
}
break; break;
case SDLK_z: case SDLK_z:
if( p_input != NULL )
{
i_rate = p_input->stream.control.i_rate*2; i_rate = p_input->stream.control.i_rate*2;
if ( i_rate <= MAXIMAL_RATE ) if ( i_rate <= MAXIMAL_RATE )
{ {
...@@ -347,19 +355,26 @@ int vout_Manage( vout_thread_t *p_vout ) ...@@ -347,19 +355,26 @@ int vout_Manage( vout_thread_t *p_vout )
i_rate = 1000; i_rate = 1000;
input_Forward( p_input, i_rate ); input_Forward( p_input, i_rate );
} }
}
break; break;
case SDLK_j: case SDLK_j:
if( p_input != NULL )
{
/* Jump forwards */ /* Jump forwards */
input_Seek( p_input, p_input->stream.i_tell input_Seek( p_input, p_input->stream.i_tell
+ p_input->stream.i_size / 20 ); + p_input->stream.i_size / 20 );
/* gabuzomeu */ /* gabuzomeu */
}
break; break;
case SDLK_b: case SDLK_b:
if( p_input != NULL )
{
/* Jump backwards */ /* Jump backwards */
input_Seek( p_input, p_input->stream.i_tell input_Seek( p_input, p_input->stream.i_tell
- p_input->stream.i_size / 20 ); - p_input->stream.i_size / 20 );
}
break; break;
default: default:
......
...@@ -1833,12 +1833,14 @@ int RenderSplash( vout_thread_t *p_vout ) ...@@ -1833,12 +1833,14 @@ int RenderSplash( vout_thread_t *p_vout )
*****************************************************************************/ *****************************************************************************/
int RenderIdle( vout_thread_t *p_vout ) int RenderIdle( vout_thread_t *p_vout )
{ {
#if 0
int i_x = 0, i_y = 0; /* text position */ int i_x = 0, i_y = 0; /* text position */
int i_width, i_height; /* text size */ int i_width, i_height; /* text size */
mtime_t current_date; /* current date */
int i_amount = 0; /* amount to draw */ int i_amount = 0; /* amount to draw */
char *psz_text = "Waiting for stream"; /* text to display */ char *psz_text = "Waiting for stream"; /* text to display */
char *psz_wtext = "[................]"; char *psz_wtext = "[................]";
#endif
mtime_t current_date; /* current date */
memset( p_vout->p_buffer[ p_vout->i_buffer_index ].p_data, memset( p_vout->p_buffer[ p_vout->i_buffer_index ].p_data,
...@@ -1850,6 +1852,8 @@ int RenderIdle( vout_thread_t *p_vout ) ...@@ -1850,6 +1852,8 @@ int RenderIdle( vout_thread_t *p_vout )
// && (current_date - p_vout->last_idle_date) > VOUT_IDLE_DELAY // && (current_date - p_vout->last_idle_date) > VOUT_IDLE_DELAY
) )
{ {
/* FIXME: idle screen disabled */
#if 0
SetBufferPicture( p_vout, NULL ); SetBufferPicture( p_vout, NULL );
vout_TextSize( p_vout->p_large_font, WIDE_TEXT | OUTLINED_TEXT, psz_text, vout_TextSize( p_vout->p_large_font, WIDE_TEXT | OUTLINED_TEXT, psz_text,
&i_width, &i_height ); &i_width, &i_height );
...@@ -1873,6 +1877,7 @@ int RenderIdle( vout_thread_t *p_vout ) ...@@ -1873,6 +1877,7 @@ int RenderIdle( vout_thread_t *p_vout )
SetBufferArea( p_vout, i_x, i_y, i_width, i_height * 2 ); SetBufferArea( p_vout, i_x, i_y, i_width, i_height * 2 );
} }
#endif
return( 1 ); return( 1 );
} }
return( 0 ); return( 0 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment