Commit 2f72e38f authored by Jean-Paul Saman's avatar Jean-Paul Saman

Implementing new PDA User Interface design using the GTK2 widget set. This...

Implementing new PDA User Interface design using the GTK2 widget set. This interface is currently in a rewrite and is currently unuseable. However:
- it compiles ;-)
- will have more UI assets to tweak with, then the old interface had
  to name a few: supports stream out, camera's through v4l, use preferences,
  manage playlists, play audio/video local and from a network source
- is not functional (yet)

So expect more functionality to come in and the necessary bug fixes.
parent 699c64c8
SOURCES_pda = \
pda.c \
pda.h \
interface.c \
interface.h \
support.c \
support.h \
callbacks.c \
callbacks.h \
network.c \
network.h \
playlist.c \
playlist.h \
pda_interface.c \
pda_interface.h \
pda_support.c \
pda_support.h \
pda_callbacks.c \
pda_callbacks.h \
$(NULL)
EXTRA_DIST += pda.glade \
......
......@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.2 2003/07/27 21:35:51 jpsaman Exp $
* $Id: pda.c,v 1.3 2003/10/01 20:58:45 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
......@@ -39,9 +39,9 @@
#include <gpe/init.h>
#endif
#include "callbacks.h"
#include "interface.h"
#include "support.h"
#include "pda_callbacks.h"
#include "pda_interface.h"
#include "pda_support.h"
#include "pda.h"
/*****************************************************************************
......@@ -68,7 +68,7 @@ gint E_(GtkModeManage) ( intf_thread_t * p_intf );
*****************************************************************************/
vlc_module_begin();
add_category_hint( N_("Miscellaneous"), NULL, VLC_TRUE );
add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, VLC_TRUE );
// add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, VLC_TRUE );
set_description( _("PDA Linux Gtk2+ interface") );
set_capability( "interface", 70 );
set_callbacks( Open, Close );
......@@ -90,7 +90,7 @@ static int Open( vlc_object_t *p_this )
return VLC_ENOMEM;
}
#ifdef NEED_GTK_MAIN
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Using gui-helper" );
p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gtk2" );
if( p_intf->p_sys->p_gtk_main == NULL )
......@@ -124,7 +124,7 @@ static void Close( vlc_object_t *p_this )
vlc_object_release( p_intf->p_sys->p_input );
}
#ifdef NEED_GTK_MAIN
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Releasing gui-helper" );
module_Unneed( p_intf, p_intf->p_sys->p_gtk_main );
#endif
......@@ -141,7 +141,7 @@ static void Close( vlc_object_t *p_this )
*****************************************************************************/
static void Run( intf_thread_t *p_intf )
{
#ifndef NEED_GTK_MAIN
#ifndef NEED_GTK2_MAIN
/* gtk_init needs to know the command line. We don't care, so we
* give it an empty one */
char *p_args[] = { "", NULL };
......@@ -149,6 +149,8 @@ static void Run( intf_thread_t *p_intf )
int i_args = 1;
int i_dummy;
#endif
GtkListStore *filelist = NULL;
GtkListStore *playlist = NULL;
#ifdef HAVE_GPE_INIT_H
/* Initialize GPE interface */
......@@ -157,7 +159,7 @@ static void Run( intf_thread_t *p_intf )
exit (1);
#else
gtk_set_locale ();
# ifndef NEED_GTK_MAIN
# ifndef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Starting pda GTK2+ interface" );
gtk_init( &i_args, &pp_args );
# else
......@@ -183,8 +185,13 @@ static void Run( intf_thread_t *p_intf )
{
msg_Err( p_intf, "unable to create pda interface" );
}
gtk_widget_set_usize(p_intf->p_sys->p_window,
gdk_screen_width() , gdk_screen_height() - 30 );
#if 0
msg_Dbg( p_intf, "setting main window size ... " );
gtk_widget_set_usize(p_intf->p_sys->p_window,
gdk_screen_width() , gdk_screen_height() - 30 );
msg_Dbg( p_intf, "setting main window size ... done" );
#endif
/* Set the title of the main window */
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
......@@ -201,7 +208,9 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_slider_label = GTK_LABEL( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "slider_label" ) );
#if 0
/* Connect the date display to the slider */
msg_Dbg( p_intf, "setting slider adjustment ... " );
#define P_SLIDER GTK_RANGE( gtk_object_get_data( \
GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
......@@ -211,36 +220,62 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->f_adj_oldvalue = 0;
p_intf->p_sys->i_adj_oldvalue = 0;
#undef P_SLIDER
msg_Dbg( p_intf, "setting slider adjustment ... done" );
#endif
p_intf->p_sys->p_clist = GTK_CLIST( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "clistmedia" ) );
gtk_clist_set_column_visibility (GTK_CLIST (p_intf->p_sys->p_clist), 2, FALSE);
gtk_clist_set_column_visibility (GTK_CLIST (p_intf->p_sys->p_clist), 3, FALSE);
gtk_clist_set_column_visibility (GTK_CLIST (p_intf->p_sys->p_clist), 4, FALSE);
gtk_clist_column_titles_show (GTK_CLIST (p_intf->p_sys->p_clist));
msg_Dbg(p_intf, "Getting GtkTreeView FileList" );
p_intf->p_sys->p_tvfile = NULL;
p_intf->p_sys->p_tvfile = (GtkTreeView *) lookup_widget( p_intf->p_sys->p_window,
"tvFileList");
if (NULL == p_intf->p_sys->p_tvfile)
msg_Err(p_intf, "Error obtaining pointer to File List");
/* the playlist object */
p_intf->p_sys->p_clistplaylist = GTK_CLIST( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "clistplaylist" ) );
msg_Dbg(p_intf, "Getting GtkTreeView PlayList" );
p_intf->p_sys->p_tvplaylist = NULL;
p_intf->p_sys->p_tvplaylist = (GtkTreeView *) lookup_widget( p_intf->p_sys->p_window,
"tvPlaylist");
if (NULL == p_intf->p_sys->p_tvplaylist)
msg_Err(p_intf, "Error obtaining pointer to Play List");
p_intf->p_sys->p_mrlentry = GTK_ENTRY( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "mrl_entry" ) );
#if 0
/* Store p_intf to keep an eye on it */
msg_Dbg( p_intf, "trying to store p_intf pointer ... " );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
"p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
"p_intf", p_intf );
msg_Dbg( p_intf, "trying to store p_intf pointer ... done" );
#endif
/* Show the control window */
gtk_widget_show( p_intf->p_sys->p_window );
ReadDirectory(p_intf->p_sys->p_clist, ".");
/* Get new directory listing */
msg_Dbg(p_intf, "Populating GtkTreeView FileList" );
filelist = gtk_list_store_new (5,
G_TYPE_STRING, /* Filename */
G_TYPE_STRING, /* permissions */
G_TYPE_STRING, /* File size */
G_TYPE_STRING, /* Owner */
G_TYPE_STRING);/* Group */
ReadDirectory(p_intf, filelist, ".");
msg_Dbg(p_intf, "Showing GtkTreeView FileList" );
gtk_tree_view_set_model(p_intf->p_sys->p_tvfile, (GtkTreeModel*) filelist);
/* update the playlist */
PDARebuildCList( p_intf->p_sys->p_clistplaylist,
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ));
#ifdef NEED_GTK_MAIN
msg_Dbg(p_intf, "Populating GtkTreeView Playlist" );
playlist = gtk_list_store_new (2,
G_TYPE_STRING,
G_TYPE_STRING);
PlaylistRebuildListStore( playlist, vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ));
msg_Dbg(p_intf, "Showing GtkTreeView Playlist" );
gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) playlist);
#ifdef NEED_GTK2_MAIN
msg_Dbg( p_intf, "Manage GTK keyboard events using threads" );
while( !p_intf->b_die )
{
......@@ -271,7 +306,7 @@ static void Run( intf_thread_t *p_intf )
#endif
gtk_object_destroy( GTK_OBJECT(p_intf->p_sys->p_window) );
#ifdef NEED_GTK_MAIN
#ifdef NEED_GTK2_MAIN
gdk_threads_leave();
#endif
}
......@@ -323,6 +358,7 @@ void GtkAutoPlayFile( vlc_object_t *p_this )
*****************************************************************************/
static int Manage( intf_thread_t *p_intf )
{
GtkListStore *p_liststore;
vlc_mutex_lock( &p_intf->change_lock );
/* Update the input */
......@@ -357,8 +393,13 @@ static int Manage( intf_thread_t *p_intf )
p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if (p_playlist != NULL)
{
PDARebuildCList( p_intf->p_sys->p_clistplaylist,
p_playlist );
msg_Dbg(p_intf, "Manage: Populating GtkTreeView Playlist" );
p_liststore = gtk_list_store_new (2,
G_TYPE_STRING,
G_TYPE_STRING);
PlaylistRebuildListStore(p_liststore, p_playlist);
msg_Dbg(p_intf, "Manage: Updating GtkTreeView Playlist" );
gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore);
}
}
......@@ -444,7 +485,7 @@ static int Manage( intf_thread_t *p_intf )
p_intf->p_sys->b_playing = 0;
}
#ifndef NEED_GTK_MAIN
#ifndef NEED_GTK2_MAIN
if( p_intf->b_die )
{
vlc_mutex_unlock( &p_intf->change_lock );
......@@ -530,9 +571,9 @@ gint E_(GtkModeManage)( intf_thread_t * p_intf )
}
/* set control items */
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_rewind"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_pause"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "toolbar_forward"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "tbRewind"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "tbPause"), b_control );
gtk_widget_set_sensitive( GETWIDGET(p_window, "tbForward"), b_control );
#undef GETWIDGET
return TRUE;
......
......@@ -1889,7 +1889,7 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="tbPlaylist">
<widget class="GtkTreeView" id="tvPlaylist">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
......
......@@ -2,7 +2,7 @@
* pda.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: pda.h,v 1.1 2003/07/23 22:02:56 jpsaman Exp $
* $Id: pda.h,v 1.2 2003/10/01 20:58:45 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -29,16 +29,16 @@
struct intf_sys_t
{
/* The gtk_main module */
module_t * p_gtk_main;
module_t *p_gtk_main;
/* windows and widgets */
GtkWidget * p_window; /* main window */
GtkEntry * p_mrlentry;
GtkNotebook * p_notebook;
GtkNotebook * p_mediabook;
GtkHScale * p_slider;
GtkCList * p_clist;
GtkCList * p_clistplaylist;
GtkWidget *p_window; /* main window */
GtkEntry *p_mrlentry;
GtkNotebook *p_notebook;
GtkNotebook *p_mediabook;
GtkHScale *p_slider;
GtkTreeView *p_tvfile;
GtkTreeView *p_tvplaylist;
/* slider */
GtkLabel * p_slider_label;
......
/*****************************************************************************
* pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: pda_callbacks.c,v 1.1 2003/10/01 20:58:45 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
* 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 <sys/types.h> /* off_t */
#include <stdlib.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include <vlc/vout.h>
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "pda_callbacks.h"
#include "pda_interface.h"
#include "pda_support.h"
#include "pda.h"
static char* get_file_perm(const char *path);
/*****************************************************************************
* Useful function to retrieve p_intf
****************************************************************************/
void * E_(__GtkGetIntf)( GtkWidget * widget )
{
void *p_data;
if( GTK_IS_MENU_ITEM( widget ) )
{
/* Look for a GTK_MENU */
while( widget->parent && !GTK_IS_MENU( widget ) )
{
widget = widget->parent;
}
/* Maybe this one has the data */
p_data = gtk_object_get_data( GTK_OBJECT( widget ), "p_intf" );
if( p_data )
{
return p_data;
}
/* Otherwise, the parent widget has it */
widget = gtk_menu_get_attach_widget( GTK_MENU( widget ) );
}
/* We look for the top widget */
widget = gtk_widget_get_toplevel( GTK_WIDGET( widget ) );
p_data = gtk_object_get_data( GTK_OBJECT( widget ), "p_intf" );
return p_data;
}
void PlaylistRebuildListStore( GtkListStore * p_list, playlist_t * p_playlist )
{
GtkTreeIter iter;
int i_dummy;
gchar * ppsz_text[2];
GdkColor red;
red.red = 65535;
red.blue = 0;
red.green = 0;
vlc_mutex_lock( &p_playlist->object_lock );
for( i_dummy = p_playlist->i_size ; i_dummy-- ; )
{
ppsz_text[0] = p_playlist->pp_items[i_dummy]->psz_name;
ppsz_text[1] = "no info";
gtk_list_store_append (p_list, &iter);
gtk_list_store_set (p_list, &iter,
0, ppsz_text[0],
1, ppsz_text[1],
-1);
}
vlc_mutex_unlock( &p_playlist->object_lock );
}
/*****************************************************************************
* Helper functions for URL changes in Media and Preferences notebook pages.
****************************************************************************/
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
{
intf_thread_t *p_intf = GtkGetIntf( widget );
playlist_t *p_playlist;
GtkListStore *p_liststore;
// Add p_url to playlist .... but how ?
p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL)
{
return;
}
if( p_playlist )
{
if (p_intf->p_sys->b_autoplayfile)
{
playlist_Add( p_playlist, (char*)psz_url, 0, 0,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END);
}
else
{
playlist_Add( p_playlist, (char*)psz_url, 0, 0,
PLAYLIST_APPEND, PLAYLIST_END );
}
vlc_object_release( p_playlist );
msg_Dbg(p_intf, "MediaURLOpenChange: Populating GtkTreeView Playlist" );
p_liststore = gtk_list_store_new (2,
G_TYPE_STRING,
G_TYPE_STRING);
PlaylistRebuildListStore(p_liststore, p_playlist);
msg_Dbg(p_intf, "MediaURLOpenChange: Updating GtkTreeView Playlist" );
gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore);
}
}
/*****************************************************************
* Read directory helper function.
****************************************************************/
void ReadDirectory( intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir )
{
// intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(p_list) );
GtkTreeIter iter;
struct dirent **namelist;
int n=-1, status=-1;
msg_Dbg(p_intf, "changing to dir %s", psz_dir);
if (psz_dir)
{
status = chdir(psz_dir);
if (status<0)
msg_Err( p_intf, "permision denied" );
}
n = scandir(".", &namelist, 0, alphasort);
if (n<0)
perror("scandir");
else
{
int i;
gchar *ppsz_text[5];
msg_Dbg( p_intf, "updating interface" );
/* XXX : kludge temporaire pour yopy */
ppsz_text[0]="..";
ppsz_text[1] = get_file_perm("..");
ppsz_text[2] = "";
ppsz_text[3] = "";
ppsz_text[4] = "";
/* Add a new row to the model */
gtk_list_store_append (p_list, &iter);
gtk_list_store_set (p_list, &iter,
0, ppsz_text[0],
1, ppsz_text[1],
2, ppsz_text[2],
3, ppsz_text[3],
4, ppsz_text[4],
-1);
/* kludge */
for (i=0; i<n; i++)
{
if (namelist[i]->d_name[0] != '.')
{
/* This is a list of strings. */
ppsz_text[0] = namelist[i]->d_name;
ppsz_text[1] = get_file_perm(namelist[i]->d_name);
ppsz_text[2] = "";
ppsz_text[3] = "";
ppsz_text[4] = "";
msg_Dbg(p_intf, "(%d) file: %s permission: %s", i, ppsz_text[0], ppsz_text[1] );
gtk_list_store_append (p_list, &iter);
gtk_list_store_set (p_list, &iter,
0, ppsz_text[0],
1, ppsz_text[1],
2, ppsz_text[2],
3, ppsz_text[3],
4, ppsz_text[4],
-1);
}
}
free(namelist);
}
/* now switch to the "file" tab */
if (p_intf->p_sys->p_mediabook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_mediabook) );
gtk_notebook_set_page(p_intf->p_sys->p_mediabook,0);
}
}
static char* get_file_perm(const char *path)
{
struct stat st;
char *perm;
perm = (char *) malloc(sizeof(char)*10);
strncpy( perm, "----------", sizeof("----------"));
if (lstat(path, &st)==0)
{
if (S_ISLNK(st.st_mode))
perm[0]= 'l';
else if (S_ISDIR(st.st_mode))
perm[0]= 'd';
else if (S_ISCHR(st.st_mode))
perm[0]= 'c';
else if (S_ISBLK(st.st_mode))
perm[0]= 'b';
else if (S_ISFIFO(st.st_mode))
perm[0]= 'f';
else if (S_ISSOCK(st.st_mode))
perm[0]= 's';
else if (S_ISREG(st.st_mode))
perm[0]= '-';
else /* Unknown type is an error */
perm[0]= '?';
/* Get file permissions */
/* User */
if (st.st_mode & S_IRUSR)
perm[1]= 'r';
if (st.st_mode & S_IWUSR)
perm[2]= 'w';
if (st.st_mode & S_IXUSR)
{
if (st.st_mode & S_ISUID)
perm[3] = 's';
else
perm[3]= 'x';
}
else if (st.st_mode & S_ISUID)
perm[3] = 'S';
/* Group */
if (st.st_mode & S_IRGRP)
perm[4]= 'r';
if (st.st_mode & S_IWGRP)
perm[5]= 'w';
if (st.st_mode & S_IXGRP)
{
if (st.st_mode & S_ISGID)
perm[6] = 's';
else
perm[6]= 'x';
}
else if (st.st_mode & S_ISGID)
perm[6] = 'S';
/* Other */
if (st.st_mode & S_IROTH)
perm[7]= 'r';
if (st.st_mode & S_IWOTH)
perm[8]= 'w';
if (st.st_mode & S_IXOTH)
{
// 'sticky' bit
if (st.st_mode &S_ISVTX)
perm[9] = 't';
else
perm[9]= 'x';
}
else if (st.st_mode &S_ISVTX)
perm[9]= 'T';
}
return perm;
}
/*
* Main interface callbacks
*/
gboolean
onPDADeleteEvent (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( widget );
vlc_mutex_lock( &p_intf->change_lock );
p_intf->p_vlc->b_die = VLC_TRUE;
vlc_mutex_unlock( &p_intf->change_lock );
return TRUE;
}
void
onFileOpen (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
GtkListStore *list;
if (p_intf->p_sys->p_notebook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gtk_notebook_set_page(p_intf->p_sys->p_notebook,0);
}
if (p_intf->p_sys->p_mediabook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_mediabook) );
gtk_notebook_set_page(p_intf->p_sys->p_mediabook,0);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
if (p_intf->p_sys->p_tvfile)
{
/* Get new directory listing */
list = gtk_list_store_new (5,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING);
ReadDirectory(p_intf, list, ".");
/* Update TreeView */
gtk_tree_view_set_model(p_intf->p_sys->p_tvfile, (GtkTreeModel*) list);
}
}
void
onPlaylist (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(button) );
// Toggle notebook
if (p_intf->p_sys->p_notebook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gtk_notebook_set_page(p_intf->p_sys->p_notebook,1);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
}
void
onPreferences (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
if (p_intf->p_sys->p_notebook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gtk_notebook_set_page(p_intf->p_sys->p_notebook,2);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
}
void
onRewind (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input != NULL )
{
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_SLOWER );
}
}
void
onPause (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input != NULL )
{
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
}
}
void
onPlay (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( GTK_WIDGET( button ) );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL )
{
/* Display open page */
onFileOpen(button,user_data);
}
/* If the playlist is empty, open a file requester instead */
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->i_size )
{
vlc_mutex_unlock( &p_playlist->object_lock );
playlist_Play( p_playlist );
vlc_object_release( p_playlist );
gdk_window_lower( p_intf->p_sys->p_window->window );
}
else
{
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
/* Display open page */
onFileOpen(button,user_data);
}
}
void
onStop (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( GTK_WIDGET( button ) );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist)
{
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
gdk_window_raise( p_intf->p_sys->p_window->window );
}
}
void
onForward (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
if( p_intf->p_sys->p_input != NULL )
{
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_FASTER );
}
}
void
onAbout (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(button) );
// Toggle notebook
if (p_intf->p_sys->p_notebook)
{
gtk_widget_show( GTK_WIDGET(p_intf->p_sys->p_notebook) );
gtk_notebook_set_page(p_intf->p_sys->p_notebook,3);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
}
gboolean
SliderRelease (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( widget );
vlc_mutex_lock( &p_intf->change_lock );
p_intf->p_sys->b_slider_free = 1;
vlc_mutex_unlock( &p_intf->change_lock );
return TRUE;
}
gboolean
SliderPress (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( widget );
vlc_mutex_lock( &p_intf->change_lock );
p_intf->p_sys->b_slider_free = 0;
vlc_mutex_unlock( &p_intf->change_lock );
return TRUE;
}
void
onFileListRow (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data)
{
g_print("onFileListRow\n");
}
void
onFileListColumns (GtkTreeView *treeview,
gpointer user_data)
{
g_print("onFileListColumn\n");
}
gboolean
onFileListRowSelected (GtkTreeView *treeview,
gboolean start_editing,
gpointer user_data)
{
g_print("onFileListRowSelected\n");
return FALSE;
}
void
onAddFileToPlaylist (GtkButton *button,
gpointer user_data)
{
}
void
onEntryMRLChanged (GtkEditable *editable,
gpointer user_data)
{
g_print("onMRLChanged\n");
}
void
onEntryMRLEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
g_print("onMRLEditingDone\n");
}
void
onNetworkPortChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryNetworkPortEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onNetworkAddressChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryNetworkAddressEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onNetworkTypeChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryNetworkTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onProtocolTypeChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryProtocolTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onMRLTypeChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryMRLTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onStreamTypeChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryStreamTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAddNetworkPlaylist (GtkButton *button,
gpointer user_data)
{
}
void
onV4LAudioChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryV4LAudioEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onV4LVideoChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryV4LVideoEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAddCameraToPlaylist (GtkButton *button,
gpointer user_data)
{
}
void
onVideoDeviceChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryVideoDeviceEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onVideoCodecChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryVideoCodecEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onVideoBitrateChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onVideoBitrateEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAudioDeviceChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryAudioDeviceEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAudioCodecChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryAudioCodecEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAudioBitrateChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onAudioBitrateEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAddServerToPlaylist (GtkButton *button,
gpointer user_data)
{
}
gboolean
PlaylistEvent (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
g_print("onPlaylistEvent\n");
return FALSE;
}
void
onPlaylistColumnsChanged (GtkTreeView *treeview,
gpointer user_data)
{
g_print("onPlaylistColumnsChanged\n");
}
gboolean
onPlaylistRowSelected (GtkTreeView *treeview,
gboolean start_editing,
gpointer user_data)
{
g_print("onPlaylistRowSelected\n");
return FALSE;
}
void
onPlaylistRow (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data)
{
g_print("onPlaylistRow\n");
}
void
onUpdatePlaylist (GtkButton *button,
gpointer user_data)
{
}
void
onDeletePlaylist (GtkButton *button,
gpointer user_data)
{
}
void
onClearPlaylist (GtkButton *button,
gpointer user_data)
{
}
void
onPreferenceSave (GtkButton *button,
gpointer user_data)
{
}
void
onPreferenceApply (GtkButton *button,
gpointer user_data)
{
}
void
onPreferenceCancel (GtkButton *button,
gpointer user_data)
{
}
/*****************************************************************************
* callbacks.h : pda plugin for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: pda_callbacks.h,v 1.1 2003/10/01 20:58:45 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
* 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.
*****************************************************************************/
#include <gtk/gtk.h>
void ReadDirectory( intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir );
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url );
void PlaylistRebuildListStore( GtkListStore *p_list, playlist_t * p_playlist );
gboolean
onPDADeleteEvent (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
onFileOpen (GtkButton *button,
gpointer user_data);
void
onPlaylist (GtkButton *button,
gpointer user_data);
void
onPreferences (GtkButton *button,
gpointer user_data);
void
onRewind (GtkButton *button,
gpointer user_data);
void
onPause (GtkButton *button,
gpointer user_data);
void
onPlay (GtkButton *button,
gpointer user_data);
void
onStop (GtkButton *button,
gpointer user_data);
void
onForward (GtkButton *button,
gpointer user_data);
void
onAbout (GtkButton *button,
gpointer user_data);
gboolean
SliderRelease (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean
SliderPress (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
onFileListRow (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data);
void
onFileListColumns (GtkTreeView *treeview,
gpointer user_data);
gboolean
onFileListRowSelected (GtkTreeView *treeview,
gboolean start_editing,
gpointer user_data);
void
onAddFileToPlaylist (GtkButton *button,
gpointer user_data);
void
onEntryMRLChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryMRLEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onNetworkPortChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryNetworkPortEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onNetworkAddressChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryNetworkAddressEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onNetworkTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryNetworkTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onProtocolTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryProtocolTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onMRLTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryMRLTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onStreamTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryStreamTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAddNetworkPlaylist (GtkButton *button,
gpointer user_data);
void
onV4LAudioChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryV4LAudioEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onV4LVideoChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryV4LVideoEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAddCameraToPlaylist (GtkButton *button,
gpointer user_data);
void
onVideoDeviceChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryVideoDeviceEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onVideoCodecChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryVideoCodecEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onVideoBitrateChanged (GtkEditable *editable,
gpointer user_data);
void
onVideoBitrateEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAudioDeviceChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryAudioDeviceEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAudioCodecChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryAudioCodecEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAudioBitrateChanged (GtkEditable *editable,
gpointer user_data);
void
onAudioBitrateEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAddServerToPlaylist (GtkButton *button,
gpointer user_data);
gboolean
PlaylistEvent (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
onPlaylistColumnsChanged (GtkTreeView *treeview,
gpointer user_data);
gboolean
onPlaylistRowSelected (GtkTreeView *treeview,
gboolean start_editing,
gpointer user_data);
void
onPlaylistRow (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data);
void
onUpdatePlaylist (GtkButton *button,
gpointer user_data);
void
onDeletePlaylist (GtkButton *button,
gpointer user_data);
void
onClearPlaylist (GtkButton *button,
gpointer user_data);
void
onPreferenceSave (GtkButton *button,
gpointer user_data);
void
onPreferenceApply (GtkButton *button,
gpointer user_data);
void
onPreferenceCancel (GtkButton *button,
gpointer user_data);
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "pda_callbacks.h"
#include "pda_interface.h"
#include "pda_support.h"
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
g_object_set_data (G_OBJECT (component), name, widget)
GtkWidget*
create_pda (void)
{
GtkWidget *pda;
GdkPixbuf *pda_icon_pixbuf;
GtkWidget *vbox;
GtkWidget *toolbar;
GtkWidget *tmp_toolbar_icon;
GtkWidget *tbOpen;
GtkWidget *tbPlaylist;
GtkWidget *tbPreferences;
GtkWidget *tbRewind;
GtkWidget *tbPause;
GtkWidget *tbPlay;
GtkWidget *tbStop;
GtkWidget *tbForward;
GtkWidget *tbAbout;
GtkWidget *timeLabel;
GtkWidget *timeSlider;
GtkWidget *notebook;
GtkWidget *scrolledwindow6;
GtkWidget *viewport3;
GtkWidget *vbox8;
GtkWidget *scrolledwindow7;
GtkWidget *tvFileList;
GtkWidget *hbox;
GtkWidget *AddFileToPlaylist;
GtkWidget *File;
GtkWidget *vbox5;
GtkWidget *hbox12;
GtkWidget *labelNetworkMRL;
GtkWidget *comboMRL;
GList *comboMRL_items = NULL;
GtkWidget *entryMRL;
GtkWidget *hseparator15;
GtkWidget *table2;
GtkWidget *labelNetworkPort;
GtkWidget *labelNetworkAddress;
GtkObject *entryNetworkPort_adj;
GtkWidget *entryNetworkPort;
GtkWidget *comboNetworkAddress;
GtkWidget *entryNetworkAddress;
GtkWidget *comboNetworkType;
GList *comboNetworkType_items = NULL;
GtkWidget *entryNetworkType;
GtkWidget *labelNetworkType;
GtkWidget *comboProtocolType;
GList *comboProtocolType_items = NULL;
GtkWidget *entryProtocolType;
GtkWidget *labelNetworkProtocol;
GtkWidget *labeNetworkMRLType;
GtkWidget *comboMRLType;
GList *comboMRLType_items = NULL;
GtkWidget *entryMRLType;
GtkWidget *labelNetworkStreamType;
GtkWidget *comboStreamType;
GList *comboStreamType_items = NULL;
GtkWidget *entryStreamType;
GtkWidget *hbox13;
GtkWidget *AddNetworkPlaylist;
GtkWidget *Network;
GtkWidget *vbox7;
GtkWidget *table;
GtkWidget *labelV4LAudio;
GtkWidget *labelV4LVideo;
GtkWidget *comboV4LAudio;
GtkWidget *entryV4LAudio;
GtkWidget *comboV4LVideo;
GtkWidget *entryV4LVideo;
GtkWidget *hbox16;
GtkWidget *AddCameraToPlaylist;
GtkWidget *Camera;
GtkWidget *vbox1;
GtkWidget *vbox6;
GtkWidget *frameVideo;
GtkWidget *table4;
GtkWidget *labelVideoDevice;
GtkWidget *labelVideoCodec;
GtkWidget *labelVideoBitrate;
GtkWidget *comboVideoDevice;
GtkWidget *entryVideoDevice;
GtkWidget *comboVideoCodec;
GtkWidget *entryVideoCodec;
GtkObject *spinVideoBitrate_adj;
GtkWidget *spinVideoBitrate;
GtkWidget *label42;
GtkWidget *frameAudio;
GtkWidget *table3;
GtkWidget *labelAudioDevice;
GtkWidget *labelAudioCodec;
GtkWidget *labelAudioBitrate;
GtkWidget *comboAudioDevice;
GtkWidget *entryAudioDevice;
GtkWidget *comboAudioCodec;
GtkWidget *entryAudioCodec;
GtkObject *spinAudioBitrate_adj;
GtkWidget *spinAudioBitrate;
GtkWidget *label41;
GtkWidget *hbox14;
GtkWidget *AddServerToPlaylist;
GtkWidget *Server;
GtkWidget *vbox4;
GtkWidget *scrolledwindow5;
GtkWidget *tvPlaylist;
GtkWidget *hbox11;
GtkWidget *UpdatePlaylist;
GtkWidget *DeletePlaylist;
GtkWidget *ClearPlaylist;
GtkWidget *playlist;
GtkWidget *vbox2;
GtkWidget *hbox2;
GtkWidget *PreferenceSave;
GtkWidget *PreferenceApply;
GtkWidget *PreferenceCancel;
GtkWidget *preferences;
GtkWidget *scrolledwindow3;
GtkWidget *viewport1;
GtkWidget *fixed2;
GtkWidget *pixmap2;
GtkWidget *labelCopyright;
GtkWidget *labelProgramName;
GtkWidget *labelAuthors;
GtkWidget *labelDescription;
GtkWidget *labelWebSite;
GtkWidget *about;
pda = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_name (pda, "pda");
gtk_widget_set_size_request (pda, 240, 320);
gtk_window_set_title (GTK_WINDOW (pda), _("VLC media player"));
pda_icon_pixbuf = create_pixbuf ("vlc16x16.png");
if (pda_icon_pixbuf)
{
gtk_window_set_icon (GTK_WINDOW (pda), pda_icon_pixbuf);
gdk_pixbuf_unref (pda_icon_pixbuf);
}
vbox = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox, "vbox");
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (pda), vbox);
toolbar = gtk_toolbar_new ();
gtk_widget_set_name (toolbar, "toolbar");
gtk_widget_show (toolbar);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 5);
gtk_widget_set_size_request (toolbar, 240, 22);
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
tmp_toolbar_icon = create_pixmap (pda, "pda-openb16x16.xpm");
tbOpen = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Open"),
_("File"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbOpen, "tbOpen");
gtk_widget_show (tbOpen);
gtk_widget_set_size_request (tbOpen, 22, 22);
tmp_toolbar_icon = create_pixmap (pda, "pda-playlistb16x16.xpm");
tbPlaylist = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Playlist"),
_("Playlist"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbPlaylist, "tbPlaylist");
gtk_widget_show (tbPlaylist);
gtk_widget_set_size_request (tbPlaylist, 22, 22);
tmp_toolbar_icon = create_pixmap (pda, "pda-preferencesb16x16.xpm");
tbPreferences = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Preferences"),
_("Preferences"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbPreferences, "tbPreferences");
gtk_widget_show (tbPreferences);
gtk_widget_set_size_request (tbPreferences, 22, 22);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
tmp_toolbar_icon = create_pixmap (pda, "pda-rewindb16x16.xpm");
tbRewind = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Rewind"),
_("Rewind"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbRewind, "tbRewind");
gtk_widget_show (tbRewind);
gtk_widget_set_size_request (tbRewind, 22, 22);
tmp_toolbar_icon = create_pixmap (pda, "pda-pauseb16x16.xpm");
tbPause = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Pause"),
_("Pause"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbPause, "tbPause");
gtk_widget_show (tbPause);
gtk_widget_set_size_request (tbPause, 22, 22);
tmp_toolbar_icon = create_pixmap (pda, "pda-playb16x16.xpm");
tbPlay = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Play"),
_("Play"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbPlay, "tbPlay");
gtk_widget_show (tbPlay);
gtk_widget_set_size_request (tbPlay, 22, 22);
tmp_toolbar_icon = create_pixmap (pda, "pda-stopb16x16.xpm");
tbStop = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Stop"),
_("Stop"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbStop, "tbStop");
gtk_widget_show (tbStop);
gtk_widget_set_size_request (tbStop, 22, 22);
tmp_toolbar_icon = create_pixmap (pda, "pda-forwardb16x16.xpm");
tbForward = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Forward"),
_("Forward"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbForward, "tbForward");
gtk_widget_show (tbForward);
gtk_widget_set_size_request (tbForward, 22, 22);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
tmp_toolbar_icon = create_pixmap (pda, "vlc16x16.png");
tbAbout = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("About"),
_("About"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
gtk_widget_set_name (tbAbout, "tbAbout");
gtk_widget_show (tbAbout);
gtk_widget_set_size_request (tbAbout, 22, 22);
timeLabel = gtk_label_new (_("0:00:00"));
gtk_widget_set_name (timeLabel, "timeLabel");
gtk_widget_show (timeLabel);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar), timeLabel, NULL, NULL);
timeSlider = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (3, 0, 100, 1, 6.25, 0)));
gtk_widget_set_name (timeSlider, "timeSlider");
gtk_widget_show (timeSlider);
gtk_box_pack_start (GTK_BOX (vbox), timeSlider, FALSE, FALSE, 4);
gtk_scale_set_draw_value (GTK_SCALE (timeSlider), FALSE);
gtk_scale_set_value_pos (GTK_SCALE (timeSlider), GTK_POS_RIGHT);
gtk_scale_set_digits (GTK_SCALE (timeSlider), 3);
notebook = gtk_notebook_new ();
gtk_widget_set_name (notebook, "notebook");
gtk_widget_show (notebook);
gtk_box_pack_end (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow6, "scrolledwindow6");
gtk_widget_show (scrolledwindow6);
gtk_container_add (GTK_CONTAINER (notebook), scrolledwindow6);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
viewport3 = gtk_viewport_new (NULL, NULL);
gtk_widget_set_name (viewport3, "viewport3");
gtk_widget_show (viewport3);
gtk_container_add (GTK_CONTAINER (scrolledwindow6), viewport3);
vbox8 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox8, "vbox8");
gtk_widget_show (vbox8);
gtk_container_add (GTK_CONTAINER (viewport3), vbox8);
scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow7, "scrolledwindow7");
gtk_widget_show (scrolledwindow7);
gtk_box_pack_start (GTK_BOX (vbox8), scrolledwindow7, TRUE, TRUE, 0);
tvFileList = gtk_tree_view_new ();
gtk_widget_set_name (tvFileList, "tvFileList");
gtk_widget_show (tvFileList);
gtk_container_add (GTK_CONTAINER (scrolledwindow7), tvFileList);
hbox = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox, "hbox");
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (vbox8), hbox, FALSE, FALSE, 0);
AddFileToPlaylist = gtk_button_new_with_mnemonic (_("Add to Playlist"));
gtk_widget_set_name (AddFileToPlaylist, "AddFileToPlaylist");
gtk_widget_show (AddFileToPlaylist);
gtk_box_pack_start (GTK_BOX (hbox), AddFileToPlaylist, FALSE, FALSE, 0);
File = gtk_label_new (_("File"));
gtk_widget_set_name (File, "File");
gtk_widget_show (File);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), File);
vbox5 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox5, "vbox5");
gtk_widget_show (vbox5);
gtk_container_add (GTK_CONTAINER (notebook), vbox5);
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (notebook), vbox5,
TRUE, TRUE, GTK_PACK_START);
hbox12 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox12, "hbox12");
gtk_widget_show (hbox12);
gtk_box_pack_start (GTK_BOX (vbox5), hbox12, FALSE, FALSE, 0);
gtk_widget_set_size_request (hbox12, 247, 26);
labelNetworkMRL = gtk_label_new (_("MRL :"));
gtk_widget_set_name (labelNetworkMRL, "labelNetworkMRL");
gtk_widget_show (labelNetworkMRL);
gtk_box_pack_start (GTK_BOX (hbox12), labelNetworkMRL, FALSE, FALSE, 0);
gtk_widget_set_size_request (labelNetworkMRL, 35, 16);
comboMRL = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboMRL)->popwin),
"GladeParentKey", comboMRL);
gtk_widget_set_name (comboMRL, "comboMRL");
gtk_widget_show (comboMRL);
gtk_box_pack_start (GTK_BOX (hbox12), comboMRL, TRUE, TRUE, 0);
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("file://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("ftp://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("http://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("udp://@:1234"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("udp6://@:1234"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("rtp://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("rtp6://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) "");
gtk_combo_set_popdown_strings (GTK_COMBO (comboMRL), comboMRL_items);
g_list_free (comboMRL_items);
entryMRL = GTK_COMBO (comboMRL)->entry;
gtk_widget_set_name (entryMRL, "entryMRL");
gtk_widget_show (entryMRL);
gtk_widget_set_size_request (entryMRL, 158, 24);
hseparator15 = gtk_hseparator_new ();
gtk_widget_set_name (hseparator15, "hseparator15");
gtk_widget_show (hseparator15);
gtk_box_pack_start (GTK_BOX (vbox5), hseparator15, FALSE, FALSE, 0);
gtk_widget_set_size_request (hseparator15, -2, 10);
table2 = gtk_table_new (6, 2, FALSE);
gtk_widget_set_name (table2, "table2");
gtk_widget_show (table2);
gtk_box_pack_start (GTK_BOX (vbox5), table2, TRUE, TRUE, 0);
labelNetworkPort = gtk_label_new (_("Port:"));
gtk_widget_set_name (labelNetworkPort, "labelNetworkPort");
gtk_widget_show (labelNetworkPort);
gtk_table_attach (GTK_TABLE (table2), labelNetworkPort, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelNetworkPort), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkPort), 0, 0.5);
labelNetworkAddress = gtk_label_new (_("Address:"));
gtk_widget_set_name (labelNetworkAddress, "labelNetworkAddress");
gtk_widget_show (labelNetworkAddress);
gtk_table_attach (GTK_TABLE (table2), labelNetworkAddress, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelNetworkAddress), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkAddress), 0, 0.5);
entryNetworkPort_adj = gtk_adjustment_new (1234, 0, 100, 1, 10, 10);
entryNetworkPort = gtk_spin_button_new (GTK_ADJUSTMENT (entryNetworkPort_adj), 1, 0);
gtk_widget_set_name (entryNetworkPort, "entryNetworkPort");
gtk_widget_show (entryNetworkPort);
gtk_table_attach (GTK_TABLE (table2), entryNetworkPort, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (entryNetworkPort), TRUE);
comboNetworkAddress = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboNetworkAddress)->popwin),
"GladeParentKey", comboNetworkAddress);
gtk_widget_set_name (comboNetworkAddress, "comboNetworkAddress");
gtk_widget_show (comboNetworkAddress);
gtk_table_attach (GTK_TABLE (table2), comboNetworkAddress, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryNetworkAddress = GTK_COMBO (comboNetworkAddress)->entry;
gtk_widget_set_name (entryNetworkAddress, "entryNetworkAddress");
gtk_widget_show (entryNetworkAddress);
comboNetworkType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboNetworkType)->popwin),
"GladeParentKey", comboNetworkType);
gtk_widget_set_name (comboNetworkType, "comboNetworkType");
gtk_widget_show (comboNetworkType);
gtk_table_attach (GTK_TABLE (table2), comboNetworkType, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboNetworkType_items = g_list_append (comboNetworkType_items, (gpointer) _("unicast"));
comboNetworkType_items = g_list_append (comboNetworkType_items, (gpointer) _("multicast"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboNetworkType), comboNetworkType_items);
g_list_free (comboNetworkType_items);
entryNetworkType = GTK_COMBO (comboNetworkType)->entry;
gtk_widget_set_name (entryNetworkType, "entryNetworkType");
gtk_widget_show (entryNetworkType);
labelNetworkType = gtk_label_new (_("Network: "));
gtk_widget_set_name (labelNetworkType, "labelNetworkType");
gtk_widget_show (labelNetworkType);
gtk_table_attach (GTK_TABLE (table2), labelNetworkType, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelNetworkType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkType), 0, 0.5);
comboProtocolType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboProtocolType)->popwin),
"GladeParentKey", comboProtocolType);
gtk_widget_set_name (comboProtocolType, "comboProtocolType");
gtk_widget_show (comboProtocolType);
gtk_table_attach (GTK_TABLE (table2), comboProtocolType, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboProtocolType_items = g_list_append (comboProtocolType_items, (gpointer) _("IPv4"));
comboProtocolType_items = g_list_append (comboProtocolType_items, (gpointer) _("IPv6"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboProtocolType), comboProtocolType_items);
g_list_free (comboProtocolType_items);
entryProtocolType = GTK_COMBO (comboProtocolType)->entry;
gtk_widget_set_name (entryProtocolType, "entryProtocolType");
gtk_widget_show (entryProtocolType);
labelNetworkProtocol = gtk_label_new (_("Protocol:"));
gtk_widget_set_name (labelNetworkProtocol, "labelNetworkProtocol");
gtk_widget_show (labelNetworkProtocol);
gtk_table_attach (GTK_TABLE (table2), labelNetworkProtocol, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelNetworkProtocol), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkProtocol), 0, 0.5);
labeNetworkMRLType = gtk_label_new (_("MRL:"));
gtk_widget_set_name (labeNetworkMRLType, "labeNetworkMRLType");
gtk_widget_show (labeNetworkMRLType);
gtk_table_attach (GTK_TABLE (table2), labeNetworkMRLType, 0, 1, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labeNetworkMRLType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labeNetworkMRLType), 0, 0.5);
comboMRLType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboMRLType)->popwin),
"GladeParentKey", comboMRLType);
gtk_widget_set_name (comboMRLType, "comboMRLType");
gtk_widget_show (comboMRLType);
gtk_table_attach (GTK_TABLE (table2), comboMRLType, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("http"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("ftp"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("mms"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("rtp"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("udp"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboMRLType), comboMRLType_items);
g_list_free (comboMRLType_items);
entryMRLType = GTK_COMBO (comboMRLType)->entry;
gtk_widget_set_name (entryMRLType, "entryMRLType");
gtk_widget_show (entryMRLType);
labelNetworkStreamType = gtk_label_new (_("Stream:"));
gtk_widget_set_name (labelNetworkStreamType, "labelNetworkStreamType");
gtk_widget_show (labelNetworkStreamType);
gtk_table_attach (GTK_TABLE (table2), labelNetworkStreamType, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelNetworkStreamType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkStreamType), 0, 0.5);
comboStreamType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboStreamType)->popwin),
"GladeParentKey", comboStreamType);
gtk_widget_set_name (comboStreamType, "comboStreamType");
gtk_widget_show (comboStreamType);
gtk_table_attach (GTK_TABLE (table2), comboStreamType, 1, 2, 5, 6,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboStreamType_items = g_list_append (comboStreamType_items, (gpointer) _("server"));
comboStreamType_items = g_list_append (comboStreamType_items, (gpointer) _("client"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboStreamType), comboStreamType_items);
g_list_free (comboStreamType_items);
entryStreamType = GTK_COMBO (comboStreamType)->entry;
gtk_widget_set_name (entryStreamType, "entryStreamType");
gtk_widget_show (entryStreamType);
hbox13 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox13, "hbox13");
gtk_widget_show (hbox13);
gtk_box_pack_start (GTK_BOX (vbox5), hbox13, FALSE, FALSE, 0);
AddNetworkPlaylist = gtk_button_new_with_mnemonic (_("Add to Playlist"));
gtk_widget_set_name (AddNetworkPlaylist, "AddNetworkPlaylist");
gtk_widget_show (AddNetworkPlaylist);
gtk_box_pack_start (GTK_BOX (hbox13), AddNetworkPlaylist, FALSE, FALSE, 0);
Network = gtk_label_new (_("Network"));
gtk_widget_set_name (Network, "Network");
gtk_widget_show (Network);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), Network);
vbox7 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox7, "vbox7");
gtk_widget_show (vbox7);
gtk_container_add (GTK_CONTAINER (notebook), vbox7);
table = gtk_table_new (3, 2, FALSE);
gtk_widget_set_name (table, "table");
gtk_widget_show (table);
gtk_box_pack_start (GTK_BOX (vbox7), table, TRUE, TRUE, 0);
labelV4LAudio = gtk_label_new (_("Audio:"));
gtk_widget_set_name (labelV4LAudio, "labelV4LAudio");
gtk_widget_show (labelV4LAudio);
gtk_table_attach (GTK_TABLE (table), labelV4LAudio, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelV4LAudio), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelV4LAudio), 0, 0.5);
labelV4LVideo = gtk_label_new (_("Video:"));
gtk_widget_set_name (labelV4LVideo, "labelV4LVideo");
gtk_widget_show (labelV4LVideo);
gtk_table_attach (GTK_TABLE (table), labelV4LVideo, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelV4LVideo), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelV4LVideo), 0, 0.5);
comboV4LAudio = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboV4LAudio)->popwin),
"GladeParentKey", comboV4LAudio);
gtk_widget_set_name (comboV4LAudio, "comboV4LAudio");
gtk_widget_show (comboV4LAudio);
gtk_table_attach (GTK_TABLE (table), comboV4LAudio, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryV4LAudio = GTK_COMBO (comboV4LAudio)->entry;
gtk_widget_set_name (entryV4LAudio, "entryV4LAudio");
gtk_widget_show (entryV4LAudio);
gtk_entry_set_text (GTK_ENTRY (entryV4LAudio), _("/dev/dsp"));
gtk_entry_set_activates_default (GTK_ENTRY (entryV4LAudio), TRUE);
comboV4LVideo = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboV4LVideo)->popwin),
"GladeParentKey", comboV4LVideo);
gtk_widget_set_name (comboV4LVideo, "comboV4LVideo");
gtk_widget_show (comboV4LVideo);
gtk_table_attach (GTK_TABLE (table), comboV4LVideo, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryV4LVideo = GTK_COMBO (comboV4LVideo)->entry;
gtk_widget_set_name (entryV4LVideo, "entryV4LVideo");
gtk_widget_show (entryV4LVideo);
gtk_entry_set_text (GTK_ENTRY (entryV4LVideo), _("/dev/video"));
gtk_entry_set_activates_default (GTK_ENTRY (entryV4LVideo), TRUE);
hbox16 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox16, "hbox16");
gtk_widget_show (hbox16);
gtk_box_pack_start (GTK_BOX (vbox7), hbox16, FALSE, FALSE, 0);
AddCameraToPlaylist = gtk_button_new_with_mnemonic (_("Add to Playlist"));
gtk_widget_set_name (AddCameraToPlaylist, "AddCameraToPlaylist");
gtk_widget_show (AddCameraToPlaylist);
gtk_box_pack_start (GTK_BOX (hbox16), AddCameraToPlaylist, FALSE, FALSE, 0);
Camera = gtk_label_new (_("Camera"));
gtk_widget_set_name (Camera, "Camera");
gtk_widget_show (Camera);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), Camera);
gtk_label_set_justify (GTK_LABEL (Camera), GTK_JUSTIFY_LEFT);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox1, "vbox1");
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
vbox6 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox6, "vbox6");
gtk_widget_show (vbox6);
gtk_box_pack_start (GTK_BOX (vbox1), vbox6, TRUE, TRUE, 0);
frameVideo = gtk_frame_new (NULL);
gtk_widget_set_name (frameVideo, "frameVideo");
gtk_widget_show (frameVideo);
gtk_box_pack_start (GTK_BOX (vbox6), frameVideo, TRUE, TRUE, 0);
table4 = gtk_table_new (3, 2, FALSE);
gtk_widget_set_name (table4, "table4");
gtk_widget_show (table4);
gtk_container_add (GTK_CONTAINER (frameVideo), table4);
labelVideoDevice = gtk_label_new (_("Device :"));
gtk_widget_set_name (labelVideoDevice, "labelVideoDevice");
gtk_widget_show (labelVideoDevice);
gtk_table_attach (GTK_TABLE (table4), labelVideoDevice, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelVideoDevice), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelVideoDevice), 0, 0.5);
labelVideoCodec = gtk_label_new (_("Codec :"));
gtk_widget_set_name (labelVideoCodec, "labelVideoCodec");
gtk_widget_show (labelVideoCodec);
gtk_table_attach (GTK_TABLE (table4), labelVideoCodec, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelVideoCodec), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelVideoCodec), 0, 0.5);
labelVideoBitrate = gtk_label_new (_("Bitrate :"));
gtk_widget_set_name (labelVideoBitrate, "labelVideoBitrate");
gtk_widget_show (labelVideoBitrate);
gtk_table_attach (GTK_TABLE (table4), labelVideoBitrate, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelVideoBitrate), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelVideoBitrate), 0, 0.5);
comboVideoDevice = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboVideoDevice)->popwin),
"GladeParentKey", comboVideoDevice);
gtk_widget_set_name (comboVideoDevice, "comboVideoDevice");
gtk_widget_show (comboVideoDevice);
gtk_table_attach (GTK_TABLE (table4), comboVideoDevice, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryVideoDevice = GTK_COMBO (comboVideoDevice)->entry;
gtk_widget_set_name (entryVideoDevice, "entryVideoDevice");
gtk_widget_show (entryVideoDevice);
gtk_entry_set_text (GTK_ENTRY (entryVideoDevice), _("/dev/video"));
comboVideoCodec = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboVideoCodec)->popwin),
"GladeParentKey", comboVideoCodec);
gtk_widget_set_name (comboVideoCodec, "comboVideoCodec");
gtk_widget_show (comboVideoCodec);
gtk_table_attach (GTK_TABLE (table4), comboVideoCodec, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryVideoCodec = GTK_COMBO (comboVideoCodec)->entry;
gtk_widget_set_name (entryVideoCodec, "entryVideoCodec");
gtk_widget_show (entryVideoCodec);
gtk_entry_set_text (GTK_ENTRY (entryVideoCodec), _("huff"));
spinVideoBitrate_adj = gtk_adjustment_new (64, 0, 100, 1, 10, 10);
spinVideoBitrate = gtk_spin_button_new (GTK_ADJUSTMENT (spinVideoBitrate_adj), 1, 0);
gtk_widget_set_name (spinVideoBitrate, "spinVideoBitrate");
gtk_widget_show (spinVideoBitrate);
gtk_table_attach (GTK_TABLE (table4), spinVideoBitrate, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
label42 = gtk_label_new (_("Video"));
gtk_widget_set_name (label42, "label42");
gtk_widget_show (label42);
gtk_frame_set_label_widget (GTK_FRAME (frameVideo), label42);
gtk_label_set_justify (GTK_LABEL (label42), GTK_JUSTIFY_LEFT);
frameAudio = gtk_frame_new (NULL);
gtk_widget_set_name (frameAudio, "frameAudio");
gtk_widget_show (frameAudio);
gtk_box_pack_start (GTK_BOX (vbox6), frameAudio, TRUE, TRUE, 0);
table3 = gtk_table_new (3, 2, FALSE);
gtk_widget_set_name (table3, "table3");
gtk_widget_show (table3);
gtk_container_add (GTK_CONTAINER (frameAudio), table3);
labelAudioDevice = gtk_label_new (_("Device :"));
gtk_widget_set_name (labelAudioDevice, "labelAudioDevice");
gtk_widget_show (labelAudioDevice);
gtk_table_attach (GTK_TABLE (table3), labelAudioDevice, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelAudioDevice), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelAudioDevice), 0, 0.5);
labelAudioCodec = gtk_label_new (_("Codec :"));
gtk_widget_set_name (labelAudioCodec, "labelAudioCodec");
gtk_widget_show (labelAudioCodec);
gtk_table_attach (GTK_TABLE (table3), labelAudioCodec, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelAudioCodec), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelAudioCodec), 0, 0.5);
labelAudioBitrate = gtk_label_new (_("Bitrate :"));
gtk_widget_set_name (labelAudioBitrate, "labelAudioBitrate");
gtk_widget_show (labelAudioBitrate);
gtk_table_attach (GTK_TABLE (table3), labelAudioBitrate, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelAudioBitrate), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelAudioBitrate), 0, 0.5);
comboAudioDevice = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboAudioDevice)->popwin),
"GladeParentKey", comboAudioDevice);
gtk_widget_set_name (comboAudioDevice, "comboAudioDevice");
gtk_widget_show (comboAudioDevice);
gtk_table_attach (GTK_TABLE (table3), comboAudioDevice, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryAudioDevice = GTK_COMBO (comboAudioDevice)->entry;
gtk_widget_set_name (entryAudioDevice, "entryAudioDevice");
gtk_widget_show (entryAudioDevice);
gtk_entry_set_text (GTK_ENTRY (entryAudioDevice), _("/dev/dsp"));
comboAudioCodec = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboAudioCodec)->popwin),
"GladeParentKey", comboAudioCodec);
gtk_widget_set_name (comboAudioCodec, "comboAudioCodec");
gtk_widget_show (comboAudioCodec);
gtk_table_attach (GTK_TABLE (table3), comboAudioCodec, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
entryAudioCodec = GTK_COMBO (comboAudioCodec)->entry;
gtk_widget_set_name (entryAudioCodec, "entryAudioCodec");
gtk_widget_show (entryAudioCodec);
gtk_entry_set_text (GTK_ENTRY (entryAudioCodec), _("alaw"));
spinAudioBitrate_adj = gtk_adjustment_new (64, 0, 100, 1, 10, 10);
spinAudioBitrate = gtk_spin_button_new (GTK_ADJUSTMENT (spinAudioBitrate_adj), 1, 0);
gtk_widget_set_name (spinAudioBitrate, "spinAudioBitrate");
gtk_widget_show (spinAudioBitrate);
gtk_table_attach (GTK_TABLE (table3), spinAudioBitrate, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinAudioBitrate), TRUE);
label41 = gtk_label_new (_("Audio"));
gtk_widget_set_name (label41, "label41");
gtk_widget_show (label41);
gtk_frame_set_label_widget (GTK_FRAME (frameAudio), label41);
gtk_label_set_justify (GTK_LABEL (label41), GTK_JUSTIFY_LEFT);
hbox14 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox14, "hbox14");
gtk_widget_show (hbox14);
gtk_box_pack_start (GTK_BOX (vbox1), hbox14, FALSE, FALSE, 0);
AddServerToPlaylist = gtk_button_new_with_mnemonic (_("Add to Playlist"));
gtk_widget_set_name (AddServerToPlaylist, "AddServerToPlaylist");
gtk_widget_show (AddServerToPlaylist);
gtk_box_pack_start (GTK_BOX (hbox14), AddServerToPlaylist, FALSE, FALSE, 0);
Server = gtk_label_new (_("Server"));
gtk_widget_set_name (Server, "Server");
gtk_widget_show (Server);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 3), Server);
vbox4 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox4, "vbox4");
gtk_widget_show (vbox4);
gtk_container_add (GTK_CONTAINER (notebook), vbox4);
scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow5, "scrolledwindow5");
gtk_widget_show (scrolledwindow5);
gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow5, TRUE, TRUE, 0);
GTK_WIDGET_UNSET_FLAGS (scrolledwindow5, GTK_CAN_FOCUS);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
tvPlaylist = gtk_tree_view_new ();
gtk_widget_set_name (tvPlaylist, "tvPlaylist");
gtk_widget_show (tvPlaylist);
gtk_container_add (GTK_CONTAINER (scrolledwindow5), tvPlaylist);
hbox11 = gtk_hbox_new (TRUE, 0);
gtk_widget_set_name (hbox11, "hbox11");
gtk_widget_show (hbox11);
gtk_box_pack_start (GTK_BOX (vbox4), hbox11, FALSE, FALSE, 2);
UpdatePlaylist = gtk_button_new_with_mnemonic (_("Update"));
gtk_widget_set_name (UpdatePlaylist, "UpdatePlaylist");
gtk_widget_show (UpdatePlaylist);
gtk_box_pack_start (GTK_BOX (hbox11), UpdatePlaylist, FALSE, FALSE, 0);
DeletePlaylist = gtk_button_new_with_mnemonic (_("Delete"));
gtk_widget_set_name (DeletePlaylist, "DeletePlaylist");
gtk_widget_show (DeletePlaylist);
gtk_box_pack_start (GTK_BOX (hbox11), DeletePlaylist, FALSE, FALSE, 5);
ClearPlaylist = gtk_button_new_with_mnemonic (_(" Clear "));
gtk_widget_set_name (ClearPlaylist, "ClearPlaylist");
gtk_widget_show (ClearPlaylist);
gtk_box_pack_start (GTK_BOX (hbox11), ClearPlaylist, FALSE, FALSE, 5);
playlist = gtk_label_new (_("Playlist"));
gtk_widget_set_name (playlist, "playlist");
gtk_widget_show (playlist);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 4), playlist);
vbox2 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox2, "vbox2");
gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (notebook), vbox2);
hbox2 = gtk_hbox_new (TRUE, 0);
gtk_widget_set_name (hbox2, "hbox2");
gtk_widget_show (hbox2);
gtk_box_pack_end (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 2);
PreferenceSave = gtk_button_new_with_mnemonic (_(" Save "));
gtk_widget_set_name (PreferenceSave, "PreferenceSave");
gtk_widget_show (PreferenceSave);
gtk_box_pack_start (GTK_BOX (hbox2), PreferenceSave, FALSE, FALSE, 0);
PreferenceApply = gtk_button_new_with_mnemonic (_(" Apply "));
gtk_widget_set_name (PreferenceApply, "PreferenceApply");
gtk_widget_show (PreferenceApply);
gtk_box_pack_start (GTK_BOX (hbox2), PreferenceApply, FALSE, FALSE, 0);
PreferenceCancel = gtk_button_new_with_mnemonic (_(" Cancel "));
gtk_widget_set_name (PreferenceCancel, "PreferenceCancel");
gtk_widget_show (PreferenceCancel);
gtk_box_pack_end (GTK_BOX (hbox2), PreferenceCancel, FALSE, FALSE, 0);
preferences = gtk_label_new (_("Preference"));
gtk_widget_set_name (preferences, "preferences");
gtk_widget_show (preferences);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 5), preferences);
scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow3, "scrolledwindow3");
gtk_widget_show (scrolledwindow3);
gtk_container_add (GTK_CONTAINER (notebook), scrolledwindow3);
GTK_WIDGET_UNSET_FLAGS (scrolledwindow3, GTK_CAN_FOCUS);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
viewport1 = gtk_viewport_new (NULL, NULL);
gtk_widget_set_name (viewport1, "viewport1");
gtk_widget_show (viewport1);
gtk_container_add (GTK_CONTAINER (scrolledwindow3), viewport1);
fixed2 = gtk_fixed_new ();
gtk_widget_set_name (fixed2, "fixed2");
gtk_widget_show (fixed2);
gtk_container_add (GTK_CONTAINER (viewport1), fixed2);
pixmap2 = create_pixmap (pda, "vlc48x48.png");
gtk_widget_set_name (pixmap2, "pixmap2");
gtk_widget_show (pixmap2);
gtk_fixed_put (GTK_FIXED (fixed2), pixmap2, 0, 0);
gtk_widget_set_size_request (pixmap2, 0, 0);
labelCopyright = gtk_label_new (_("(c) 1996-2003 the VideoLAN team"));
gtk_widget_set_name (labelCopyright, "labelCopyright");
gtk_widget_show (labelCopyright);
gtk_fixed_put (GTK_FIXED (fixed2), labelCopyright, 16, 48);
gtk_widget_set_size_request (labelCopyright, 0, 0);
labelProgramName = gtk_label_new (_("VLC media player"));
gtk_widget_set_name (labelProgramName, "labelProgramName");
gtk_widget_show (labelProgramName);
gtk_fixed_put (GTK_FIXED (fixed2), labelProgramName, 64, 16);
gtk_widget_set_size_request (labelProgramName, 0, 0);
gtk_label_set_line_wrap (GTK_LABEL (labelProgramName), TRUE);
labelAuthors = gtk_label_new (_("Authors: The VideoLAN Team, http://www.videolan.org"));
gtk_widget_set_name (labelAuthors, "labelAuthors");
gtk_widget_show (labelAuthors);
gtk_fixed_put (GTK_FIXED (fixed2), labelAuthors, 16, 72);
gtk_widget_set_size_request (labelAuthors, 208, 32);
gtk_label_set_justify (GTK_LABEL (labelAuthors), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (labelAuthors), TRUE);
labelDescription = gtk_label_new (_("The VideoLAN Client is a MPEG, MPEG 2, MP3, DivX player, that accepts input from local or network sources."));
gtk_widget_set_name (labelDescription, "labelDescription");
gtk_widget_show (labelDescription);
gtk_fixed_put (GTK_FIXED (fixed2), labelDescription, 16, 112);
gtk_widget_set_size_request (labelDescription, 208, 72);
gtk_label_set_justify (GTK_LABEL (labelDescription), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (labelDescription), TRUE);
labelWebSite = gtk_label_new (_("http://www.videolan.org"));
gtk_widget_set_name (labelWebSite, "labelWebSite");
gtk_widget_show (labelWebSite);
gtk_fixed_put (GTK_FIXED (fixed2), labelWebSite, 16, 192);
gtk_widget_set_size_request (labelWebSite, 208, 16);
about = gtk_label_new (_("About"));
gtk_widget_set_name (about, "about");
gtk_widget_show (about);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 6), about);
g_signal_connect ((gpointer) pda, "delete_event",
G_CALLBACK (onPDADeleteEvent),
NULL);
g_signal_connect ((gpointer) tbOpen, "clicked",
G_CALLBACK (onFileOpen),
NULL);
g_signal_connect ((gpointer) tbPlaylist, "clicked",
G_CALLBACK (onPlaylist),
NULL);
g_signal_connect ((gpointer) tbPreferences, "clicked",
G_CALLBACK (onPreferences),
NULL);
g_signal_connect ((gpointer) tbRewind, "clicked",
G_CALLBACK (onRewind),
NULL);
g_signal_connect ((gpointer) tbPause, "clicked",
G_CALLBACK (onPause),
NULL);
g_signal_connect ((gpointer) tbPlay, "clicked",
G_CALLBACK (onPlay),
NULL);
g_signal_connect ((gpointer) tbStop, "clicked",
G_CALLBACK (onStop),
NULL);
g_signal_connect ((gpointer) tbForward, "clicked",
G_CALLBACK (onForward),
NULL);
g_signal_connect ((gpointer) tbAbout, "clicked",
G_CALLBACK (onAbout),
NULL);
g_signal_connect ((gpointer) timeSlider, "button_release_event",
G_CALLBACK (SliderRelease),
NULL);
g_signal_connect ((gpointer) timeSlider, "button_press_event",
G_CALLBACK (SliderPress),
NULL);
g_signal_connect ((gpointer) tvFileList, "row_activated",
G_CALLBACK (onFileListRow),
NULL);
g_signal_connect ((gpointer) tvFileList, "columns_changed",
G_CALLBACK (onFileListColumns),
NULL);
g_signal_connect ((gpointer) tvFileList, "select_cursor_row",
G_CALLBACK (onFileListRowSelected),
NULL);
g_signal_connect ((gpointer) AddFileToPlaylist, "pressed",
G_CALLBACK (onAddFileToPlaylist),
NULL);
g_signal_connect ((gpointer) entryMRL, "changed",
G_CALLBACK (onEntryMRLChanged),
NULL);
g_signal_connect ((gpointer) entryMRL, "editing_done",
G_CALLBACK (onEntryMRLEditingDone),
NULL);
g_signal_connect ((gpointer) entryNetworkPort, "changed",
G_CALLBACK (onNetworkPortChanged),
NULL);
g_signal_connect ((gpointer) entryNetworkPort, "editing_done",
G_CALLBACK (onEntryNetworkPortEditingDone),
NULL);
g_signal_connect ((gpointer) entryNetworkAddress, "changed",
G_CALLBACK (onNetworkAddressChanged),
NULL);
g_signal_connect ((gpointer) entryNetworkAddress, "editing_done",
G_CALLBACK (onEntryNetworkAddressEditingDone),
NULL);
g_signal_connect ((gpointer) entryNetworkType, "changed",
G_CALLBACK (onNetworkTypeChanged),
NULL);
g_signal_connect ((gpointer) entryNetworkType, "editing_done",
G_CALLBACK (onEntryNetworkTypeEditingDone),
NULL);
g_signal_connect ((gpointer) entryProtocolType, "changed",
G_CALLBACK (onProtocolTypeChanged),
NULL);
g_signal_connect ((gpointer) entryProtocolType, "editing_done",
G_CALLBACK (onEntryProtocolTypeEditingDone),
NULL);
g_signal_connect ((gpointer) entryMRLType, "changed",
G_CALLBACK (onMRLTypeChanged),
NULL);
g_signal_connect ((gpointer) entryMRLType, "editing_done",
G_CALLBACK (onEntryMRLTypeEditingDone),
NULL);
g_signal_connect ((gpointer) entryStreamType, "changed",
G_CALLBACK (onStreamTypeChanged),
NULL);
g_signal_connect ((gpointer) entryStreamType, "editing_done",
G_CALLBACK (onEntryStreamTypeEditingDone),
NULL);
g_signal_connect ((gpointer) AddNetworkPlaylist, "pressed",
G_CALLBACK (onAddNetworkPlaylist),
NULL);
g_signal_connect ((gpointer) entryV4LAudio, "changed",
G_CALLBACK (onV4LAudioChanged),
NULL);
g_signal_connect ((gpointer) entryV4LAudio, "editing_done",
G_CALLBACK (onEntryV4LAudioEditingDone),
NULL);
g_signal_connect ((gpointer) entryV4LVideo, "changed",
G_CALLBACK (onV4LVideoChanged),
NULL);
g_signal_connect ((gpointer) entryV4LVideo, "editing_done",
G_CALLBACK (onEntryV4LVideoEditingDone),
NULL);
g_signal_connect ((gpointer) AddCameraToPlaylist, "pressed",
G_CALLBACK (onAddCameraToPlaylist),
NULL);
g_signal_connect ((gpointer) entryVideoDevice, "changed",
G_CALLBACK (onVideoDeviceChanged),
NULL);
g_signal_connect ((gpointer) entryVideoDevice, "editing_done",
G_CALLBACK (onEntryVideoDeviceEditingDone),
NULL);
g_signal_connect ((gpointer) entryVideoCodec, "changed",
G_CALLBACK (onVideoCodecChanged),
NULL);
g_signal_connect ((gpointer) entryVideoCodec, "editing_done",
G_CALLBACK (onEntryVideoCodecEditingDone),
NULL);
g_signal_connect ((gpointer) spinVideoBitrate, "changed",
G_CALLBACK (onVideoBitrateChanged),
NULL);
g_signal_connect ((gpointer) spinVideoBitrate, "editing_done",
G_CALLBACK (onVideoBitrateEditingDone),
NULL);
g_signal_connect ((gpointer) entryAudioDevice, "changed",
G_CALLBACK (onAudioDeviceChanged),
NULL);
g_signal_connect ((gpointer) entryAudioDevice, "editing_done",
G_CALLBACK (onEntryAudioDeviceEditingDone),
NULL);
g_signal_connect ((gpointer) entryAudioCodec, "changed",
G_CALLBACK (onAudioCodecChanged),
NULL);
g_signal_connect ((gpointer) entryAudioCodec, "editing_done",
G_CALLBACK (onEntryAudioCodecEditingDone),
NULL);
g_signal_connect ((gpointer) spinAudioBitrate, "changed",
G_CALLBACK (onAudioBitrateChanged),
NULL);
g_signal_connect ((gpointer) spinAudioBitrate, "editing_done",
G_CALLBACK (onAudioBitrateEditingDone),
NULL);
g_signal_connect ((gpointer) AddServerToPlaylist, "pressed",
G_CALLBACK (onAddServerToPlaylist),
NULL);
g_signal_connect ((gpointer) tvPlaylist, "event",
G_CALLBACK (PlaylistEvent),
NULL);
g_signal_connect ((gpointer) tvPlaylist, "columns_changed",
G_CALLBACK (onPlaylistColumnsChanged),
NULL);
g_signal_connect ((gpointer) tvPlaylist, "select_cursor_row",
G_CALLBACK (onPlaylistRowSelected),
NULL);
g_signal_connect ((gpointer) tvPlaylist, "row_activated",
G_CALLBACK (onPlaylistRow),
NULL);
g_signal_connect ((gpointer) UpdatePlaylist, "pressed",
G_CALLBACK (onUpdatePlaylist),
NULL);
g_signal_connect ((gpointer) DeletePlaylist, "pressed",
G_CALLBACK (onDeletePlaylist),
NULL);
g_signal_connect ((gpointer) ClearPlaylist, "pressed",
G_CALLBACK (onClearPlaylist),
NULL);
g_signal_connect ((gpointer) PreferenceSave, "pressed",
G_CALLBACK (onPreferenceSave),
NULL);
g_signal_connect ((gpointer) PreferenceApply, "pressed",
G_CALLBACK (onPreferenceApply),
NULL);
g_signal_connect ((gpointer) PreferenceCancel, "pressed",
G_CALLBACK (onPreferenceCancel),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (pda, pda, "pda");
GLADE_HOOKUP_OBJECT (pda, vbox, "vbox");
GLADE_HOOKUP_OBJECT (pda, toolbar, "toolbar");
GLADE_HOOKUP_OBJECT (pda, tbOpen, "tbOpen");
GLADE_HOOKUP_OBJECT (pda, tbPlaylist, "tbPlaylist");
GLADE_HOOKUP_OBJECT (pda, tbPreferences, "tbPreferences");
GLADE_HOOKUP_OBJECT (pda, tbRewind, "tbRewind");
GLADE_HOOKUP_OBJECT (pda, tbPause, "tbPause");
GLADE_HOOKUP_OBJECT (pda, tbPlay, "tbPlay");
GLADE_HOOKUP_OBJECT (pda, tbStop, "tbStop");
GLADE_HOOKUP_OBJECT (pda, tbForward, "tbForward");
GLADE_HOOKUP_OBJECT (pda, tbAbout, "tbAbout");
GLADE_HOOKUP_OBJECT (pda, timeLabel, "timeLabel");
GLADE_HOOKUP_OBJECT (pda, timeSlider, "timeSlider");
GLADE_HOOKUP_OBJECT (pda, notebook, "notebook");
GLADE_HOOKUP_OBJECT (pda, scrolledwindow6, "scrolledwindow6");
GLADE_HOOKUP_OBJECT (pda, viewport3, "viewport3");
GLADE_HOOKUP_OBJECT (pda, vbox8, "vbox8");
GLADE_HOOKUP_OBJECT (pda, scrolledwindow7, "scrolledwindow7");
GLADE_HOOKUP_OBJECT (pda, tvFileList, "tvFileList");
GLADE_HOOKUP_OBJECT (pda, hbox, "hbox");
GLADE_HOOKUP_OBJECT (pda, AddFileToPlaylist, "AddFileToPlaylist");
GLADE_HOOKUP_OBJECT (pda, File, "File");
GLADE_HOOKUP_OBJECT (pda, vbox5, "vbox5");
GLADE_HOOKUP_OBJECT (pda, hbox12, "hbox12");
GLADE_HOOKUP_OBJECT (pda, labelNetworkMRL, "labelNetworkMRL");
GLADE_HOOKUP_OBJECT (pda, comboMRL, "comboMRL");
GLADE_HOOKUP_OBJECT (pda, entryMRL, "entryMRL");
GLADE_HOOKUP_OBJECT (pda, hseparator15, "hseparator15");
GLADE_HOOKUP_OBJECT (pda, table2, "table2");
GLADE_HOOKUP_OBJECT (pda, labelNetworkPort, "labelNetworkPort");
GLADE_HOOKUP_OBJECT (pda, labelNetworkAddress, "labelNetworkAddress");
GLADE_HOOKUP_OBJECT (pda, entryNetworkPort, "entryNetworkPort");
GLADE_HOOKUP_OBJECT (pda, comboNetworkAddress, "comboNetworkAddress");
GLADE_HOOKUP_OBJECT (pda, entryNetworkAddress, "entryNetworkAddress");
GLADE_HOOKUP_OBJECT (pda, comboNetworkType, "comboNetworkType");
GLADE_HOOKUP_OBJECT (pda, entryNetworkType, "entryNetworkType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkType, "labelNetworkType");
GLADE_HOOKUP_OBJECT (pda, comboProtocolType, "comboProtocolType");
GLADE_HOOKUP_OBJECT (pda, entryProtocolType, "entryProtocolType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkProtocol, "labelNetworkProtocol");
GLADE_HOOKUP_OBJECT (pda, labeNetworkMRLType, "labeNetworkMRLType");
GLADE_HOOKUP_OBJECT (pda, comboMRLType, "comboMRLType");
GLADE_HOOKUP_OBJECT (pda, entryMRLType, "entryMRLType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkStreamType, "labelNetworkStreamType");
GLADE_HOOKUP_OBJECT (pda, comboStreamType, "comboStreamType");
GLADE_HOOKUP_OBJECT (pda, entryStreamType, "entryStreamType");
GLADE_HOOKUP_OBJECT (pda, hbox13, "hbox13");
GLADE_HOOKUP_OBJECT (pda, AddNetworkPlaylist, "AddNetworkPlaylist");
GLADE_HOOKUP_OBJECT (pda, Network, "Network");
GLADE_HOOKUP_OBJECT (pda, vbox7, "vbox7");
GLADE_HOOKUP_OBJECT (pda, table, "table");
GLADE_HOOKUP_OBJECT (pda, labelV4LAudio, "labelV4LAudio");
GLADE_HOOKUP_OBJECT (pda, labelV4LVideo, "labelV4LVideo");
GLADE_HOOKUP_OBJECT (pda, comboV4LAudio, "comboV4LAudio");
GLADE_HOOKUP_OBJECT (pda, entryV4LAudio, "entryV4LAudio");
GLADE_HOOKUP_OBJECT (pda, comboV4LVideo, "comboV4LVideo");
GLADE_HOOKUP_OBJECT (pda, entryV4LVideo, "entryV4LVideo");
GLADE_HOOKUP_OBJECT (pda, hbox16, "hbox16");
GLADE_HOOKUP_OBJECT (pda, AddCameraToPlaylist, "AddCameraToPlaylist");
GLADE_HOOKUP_OBJECT (pda, Camera, "Camera");
GLADE_HOOKUP_OBJECT (pda, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (pda, vbox6, "vbox6");
GLADE_HOOKUP_OBJECT (pda, frameVideo, "frameVideo");
GLADE_HOOKUP_OBJECT (pda, table4, "table4");
GLADE_HOOKUP_OBJECT (pda, labelVideoDevice, "labelVideoDevice");
GLADE_HOOKUP_OBJECT (pda, labelVideoCodec, "labelVideoCodec");
GLADE_HOOKUP_OBJECT (pda, labelVideoBitrate, "labelVideoBitrate");
GLADE_HOOKUP_OBJECT (pda, comboVideoDevice, "comboVideoDevice");
GLADE_HOOKUP_OBJECT (pda, entryVideoDevice, "entryVideoDevice");
GLADE_HOOKUP_OBJECT (pda, comboVideoCodec, "comboVideoCodec");
GLADE_HOOKUP_OBJECT (pda, entryVideoCodec, "entryVideoCodec");
GLADE_HOOKUP_OBJECT (pda, spinVideoBitrate, "spinVideoBitrate");
GLADE_HOOKUP_OBJECT (pda, label42, "label42");
GLADE_HOOKUP_OBJECT (pda, frameAudio, "frameAudio");
GLADE_HOOKUP_OBJECT (pda, table3, "table3");
GLADE_HOOKUP_OBJECT (pda, labelAudioDevice, "labelAudioDevice");
GLADE_HOOKUP_OBJECT (pda, labelAudioCodec, "labelAudioCodec");
GLADE_HOOKUP_OBJECT (pda, labelAudioBitrate, "labelAudioBitrate");
GLADE_HOOKUP_OBJECT (pda, comboAudioDevice, "comboAudioDevice");
GLADE_HOOKUP_OBJECT (pda, entryAudioDevice, "entryAudioDevice");
GLADE_HOOKUP_OBJECT (pda, comboAudioCodec, "comboAudioCodec");
GLADE_HOOKUP_OBJECT (pda, entryAudioCodec, "entryAudioCodec");
GLADE_HOOKUP_OBJECT (pda, spinAudioBitrate, "spinAudioBitrate");
GLADE_HOOKUP_OBJECT (pda, label41, "label41");
GLADE_HOOKUP_OBJECT (pda, hbox14, "hbox14");
GLADE_HOOKUP_OBJECT (pda, AddServerToPlaylist, "AddServerToPlaylist");
GLADE_HOOKUP_OBJECT (pda, Server, "Server");
GLADE_HOOKUP_OBJECT (pda, vbox4, "vbox4");
GLADE_HOOKUP_OBJECT (pda, scrolledwindow5, "scrolledwindow5");
GLADE_HOOKUP_OBJECT (pda, tvPlaylist, "tvPlaylist");
GLADE_HOOKUP_OBJECT (pda, hbox11, "hbox11");
GLADE_HOOKUP_OBJECT (pda, UpdatePlaylist, "UpdatePlaylist");
GLADE_HOOKUP_OBJECT (pda, DeletePlaylist, "DeletePlaylist");
GLADE_HOOKUP_OBJECT (pda, ClearPlaylist, "ClearPlaylist");
GLADE_HOOKUP_OBJECT (pda, playlist, "playlist");
GLADE_HOOKUP_OBJECT (pda, vbox2, "vbox2");
GLADE_HOOKUP_OBJECT (pda, hbox2, "hbox2");
GLADE_HOOKUP_OBJECT (pda, PreferenceSave, "PreferenceSave");
GLADE_HOOKUP_OBJECT (pda, PreferenceApply, "PreferenceApply");
GLADE_HOOKUP_OBJECT (pda, PreferenceCancel, "PreferenceCancel");
GLADE_HOOKUP_OBJECT (pda, preferences, "preferences");
GLADE_HOOKUP_OBJECT (pda, scrolledwindow3, "scrolledwindow3");
GLADE_HOOKUP_OBJECT (pda, viewport1, "viewport1");
GLADE_HOOKUP_OBJECT (pda, fixed2, "fixed2");
GLADE_HOOKUP_OBJECT (pda, pixmap2, "pixmap2");
GLADE_HOOKUP_OBJECT (pda, labelCopyright, "labelCopyright");
GLADE_HOOKUP_OBJECT (pda, labelProgramName, "labelProgramName");
GLADE_HOOKUP_OBJECT (pda, labelAuthors, "labelAuthors");
GLADE_HOOKUP_OBJECT (pda, labelDescription, "labelDescription");
GLADE_HOOKUP_OBJECT (pda, labelWebSite, "labelWebSite");
GLADE_HOOKUP_OBJECT (pda, about, "about");
return pda;
}
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_pda (void);
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include "pda_support.h"
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (!parent)
parent = g_object_get_data (G_OBJECT (widget), "GladeParentKey");
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
static GList *pixmaps_directories = NULL;
/* Use this function to set the directory containing installed pixmaps. */
void
add_pixmap_directory (const gchar *directory)
{
pixmaps_directories = g_list_prepend (pixmaps_directories,
g_strdup (directory));
}
/* This is an internally used function to find pixmap files. */
static gchar*
find_pixmap_file (const gchar *filename)
{
GList *elem;
/* We step through each of the pixmaps directory to find it. */
elem = pixmaps_directories;
while (elem)
{
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
G_DIR_SEPARATOR_S, filename);
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
return pathname;
g_free (pathname);
elem = elem->next;
}
return NULL;
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
gchar *pathname = NULL;
GtkWidget *pixmap;
if (!filename || !filename[0])
return gtk_image_new ();
pathname = find_pixmap_file (filename);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return gtk_image_new ();
}
pixmap = gtk_image_new_from_file (pathname);
g_free (pathname);
return pixmap;
}
/* This is an internally used function to create pixmaps. */
GdkPixbuf*
create_pixbuf (const gchar *filename)
{
gchar *pathname = NULL;
GdkPixbuf *pixbuf;
GError *error = NULL;
if (!filename || !filename[0])
return NULL;
pathname = find_pixmap_file (filename);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return NULL;
}
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
if (!pixbuf)
{
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
pathname, error->message);
g_error_free (error);
}
g_free (pathname);
return pixbuf;
}
/* This is used to set ATK action descriptions. */
void
glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description)
{
gint n_actions, i;
n_actions = atk_action_get_n_actions (action);
for (i = 0; i < n_actions; i++)
{
if (!strcmp (atk_action_get_name (action, i), action_name))
atk_action_set_description (action, i, description);
}
}
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
/*
* Standard gettext macros.
*/
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
#endif
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory);
/*
* Private Functions.
*/
/* This is used to create the pixmaps used in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename);
/* This is used to create the pixbufs used in the interface. */
GdkPixbuf* create_pixbuf (const gchar *filename);
/* This is used to set ATK action descriptions. */
void glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description);
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