Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removal of gnome_main, gnome2_main, gtk_main, gtk2_main, pda modules

Those hardly build and do not work anymore since a long time. Noone seems to care...
Farewell!
  • Loading branch information...
commit 58ca65ac04493f432e3e61990b8d6c4ea34fec88 1 parent e982566
Jean-Baptiste Kempf authored
1  NEWS
View
@@ -45,6 +45,7 @@ Removed modules:
* showintf
* transrate
* x11, xvideo, xvid
+ * gtk_main, gtk_main2, gnome_main, gnome_main2 and pda interface
Changes between 1.0.0 and 1.0.1:
64 configure.ac
View
@@ -479,7 +479,7 @@ if test "${SYS}" = "mingw32"
then
AC_CHECK_LIB(mingwex,opendir,
AC_CHECK_LIB(mingw32,opendir,,
- [VLC_ADD_LIBS([libvlccore gtk],[-lmingwex])])
+ [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
)
fi
@@ -987,12 +987,6 @@ fi
;;
esac
-dnl Build the gtk_main plugins?
-NEED_GTK_MAIN=no
-NEED_GNOME_MAIN=no
-NEED_GTK2_MAIN=no
-NEED_GNOME2_MAIN=no
-
dnl build the qte plugin ?
NEED_QTE_MAIN=no
@@ -4270,28 +4264,6 @@ AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no")])
dnl
-dnl PDA Gtk+2 module
-dnl
-AC_ARG_ENABLE(pda,
- [ --enable-pda PDA interface needs Gtk2 support (default disabled)])
-if test "${enable_pda}" = "yes"
-then
- PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
- VLC_ADD_CFLAGS([gtk2],[${GTK2_CFLAGS}])
- VLC_ADD_LIBS([gtk2],[${GTK2_LIBS}])
- VLC_ADD_CFLAGS([pda],[${GTK2_CFLAGS} ${CFLAGS_pda}])
- VLC_ADD_LIBS([pda],[${LDFLAGS_pda}])
- VLC_ADD_LIBS([pda],[${GTK2_LIBS}])
- VLC_ADD_PLUGIN([pda])
- if test "${SYS}" != "mingw32"; then
- NEED_GTK2_MAIN=yes
- VLC_ADD_CFLAGS([gtk2_main],[$GTK2_CFLAGS])
- VLC_ADD_LIBS([gtk2_main],[$GTK2_LIBS])
- fi
-fi
-AM_CONDITIONAL(BUILD_PDA, [test "${enable_pda}" = "yes"])
-
-dnl
dnl Maemo
dnl
AC_ARG_ENABLE(maemo,
@@ -4973,39 +4945,6 @@ then
fi
dnl
-dnl gtk_main plugin
-dnl
-if test "${NEED_GTK_MAIN}" != "no"
-then
- VLC_ADD_PLUGIN([gtk_main])
- VLC_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
- VLC_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
-fi
-
-if test "${NEED_GNOME_MAIN}" != "no"
-then
- VLC_ADD_PLUGIN([gnome_main])
- VLC_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}])
- VLC_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}])
-fi
-
-if test "${NEED_GTK2_MAIN}" != "no"
-then
- VLC_ADD_PLUGIN([gtk2_main])
- VLC_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])
- VLC_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
- VLC_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
- VLC_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
-fi
-
-if test "${NEED_GNOME2_MAIN}" != "no"
-then
- VLC_ADD_PLUGIN([gnome2_main])
- VLC_ADD_CFLAGS([gnome2_main],[${CFLAGS_gtk2} ${CFLAGS_gnome2}])
- VLC_ADD_LDFLAGS([gnome2_main],[${LDFLAGS_gtk2} ${LDFLAGS_gnome2}])
-fi
-
-dnl
dnl qte_main plugin
dnl
if test "${NEED_QTE_MAIN}" != "no"
@@ -5194,7 +5133,6 @@ AC_CONFIG_FILES([
modules/demux/playlist/Makefile
modules/gui/Makefile
modules/gui/beos/Makefile
- modules/gui/pda/Makefile
modules/gui/macosx/Makefile
modules/gui/maemo/Makefile
modules/gui/minimal_macosx/Makefile
5 modules/LIST
View
@@ -124,8 +124,6 @@ $Id$
* glwin32: a opengl provider using DirectX OpenGL
* glx: a opengl provider using X11 OpenGL
* gme: game music files demuxer
- * gnome2_main: Gtk+ wrapper for gtk_main
- * gnome_main: Gtk+ wrapper for gtk_main
* gnutls: GNU TLS encryption/decryption module
* goom: visualisation plugin based on goom
* gradient: Gradient and edge detection video effects filter
@@ -133,8 +131,6 @@ $Id$
* grey_yuv: grayscale to others conversion module
* growl: announce currently playing stream to growl
* growl_udp: growl UDP notification plugin
- * gtk2_main: Gtk+ wrapper for gtk_main
- * gtk_main: Gtk+ wrapper for gtk_main
* h264: H264 decoder
* hal: Linux HAL services discovery module
* hd1000a: audio output module for the Roku HD1000 Set-Top-Box
@@ -240,7 +236,6 @@ $Id$
* packetizer_vc1: VC-1 video packetizer
* panoramix: image wall panoramic video with edge blending filter
* param_eq: parametric equalizer
- * pda: interface for iPaq using the Gtk2+ widget set
* playlist: playlist import module
* png: PNG images decoder
* podcast: podcast feed parser
3  modules/gui/Modules.am
View
@@ -10,9 +10,6 @@ endif
if BUILD_MAEMO
SUBDIRS += maemo
endif
-if BUILD_PDA
-SUBDIRS += pda
-endif
SUBDIRS += qnx
if ENABLE_QT4
SUBDIRS += qt4
14 modules/gui/pda/Modules.am
View
@@ -1,14 +0,0 @@
-SOURCES_pda = \
- pda.c \
- pda.h \
- pda_interface.c \
- pda_interface.h \
- pda_support.c \
- pda_support.h \
- pda_callbacks.c \
- pda_callbacks.h \
- $(NULL)
-
-EXTRA_DIST += pda.glade \
- pda.gladep \
- $(NULL)
559 modules/gui/pda/pda.c
View
@@ -1,559 +0,0 @@
-/*****************************************************************************
- * pda.c : PDA Gtk2 plugin for vlc
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * Authors: Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
- * Marc Ariberti <marcari@videolan.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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <errno.h> /* ENOMEM */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-#include <vlc_plugin.h>
-#include <vlc_input.h>
-#include <vlc_interface.h>
-#include <vlc_playlist.h>
-
-#include <gtk/gtk.h>
-
-#include "pda_callbacks.h"
-#include "pda_interface.h"
-#include "pda_support.h"
-#include "pda.h"
-
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-static int Open ( vlc_object_t * );
-static void Close ( vlc_object_t * );
-static void Run ( intf_thread_t * );
-
-static int Manage ( intf_thread_t *p_intf );
-void GtkDisplayDate ( GtkAdjustment *p_adj, gpointer userdata );
-gint GtkModeManage ( intf_thread_t * p_intf );
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-#define AUTOPLAYFILE_TEXT N_("Autoplay selected file")
-#define AUTOPLAYFILE_LONGTEXT N_("Automatically play a file when selected in the "\
- "file selection list")
-
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-vlc_module_begin ()
- set_description( N_("PDA Linux Gtk2+ interface") )
- set_category( CAT_INTERFACE )
- set_subcategory( SUBCAT_INTERFACE_MAIN )
- set_capability( "interface", 0 )
- set_callbacks( Open, Close )
- add_shortcut( "pda" )
-vlc_module_end ()
-
-/*****************************************************************************
- * Open: initialize and create window
- *****************************************************************************/
-static int Open( vlc_object_t *p_this )
-{
- intf_thread_t *p_intf = (intf_thread_t *)p_this;
-
- /* Allocate instance and initialize some members */
- p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
- if( p_intf->p_sys == NULL )
- return VLC_ENOMEM;
-
-#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", true );
- if( p_intf->p_sys->p_gtk_main == NULL )
- {
- free( p_intf->p_sys );
- return VLC_ENOMOD;
- }
-#endif
-
- /* Initialize Gtk+ thread */
- p_intf->p_sys->p_input = NULL;
-
- p_intf->p_sys->b_autoplayfile = 1;
- p_intf->p_sys->b_playing = 0;
- p_intf->p_sys->b_slider_free = 1;
-
- p_intf->pf_run = Run;
-
- return VLC_SUCCESS;
-}
-
-/*****************************************************************************
- * Close: destroy interface window
- *****************************************************************************/
-static void Close( vlc_object_t *p_this )
-{
- intf_thread_t *p_intf = (intf_thread_t *)p_this;
-
- if( p_intf->p_sys->p_input )
- {
- vlc_object_release( p_intf->p_sys->p_input );
- }
-
-#ifdef NEED_GTK2_MAIN
- msg_Dbg( p_intf, "Releasing gui-helper" );
- module_unneed( p_intf, p_intf->p_sys->p_gtk_main );
-#endif
-
- /* Destroy structure */
- free( p_intf->p_sys );
-}
-
-/*****************************************************************************
- * Run: Gtk+ thread
- *****************************************************************************
- * this part of the interface is in a separate thread so that we can call
- * gtk_main() from within it without annoying the rest of the program.
- *****************************************************************************/
-static void Run( intf_thread_t *p_intf )
-{
-#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 };
- char **pp_args = p_args;
- int i_args = 1;
- int i_dummy;
-#endif
- playlist_t *p_playlist;
- GtkCellRenderer *p_renderer = NULL;
- GtkTreeViewColumn *p_column = NULL;
- GtkListStore *p_filelist = NULL;
- GtkListStore *p_playlist_store = NULL;
- int canc = vlc_savecancel();
-
-#ifndef NEED_GTK2_MAIN
- gtk_set_locale ();
- msg_Dbg( p_intf, "Starting pda GTK2+ interface" );
- gtk_init( &i_args, &pp_args );
-#else
- /* Initialize Gtk+ */
- msg_Dbg( p_intf, "Starting pda GTK2+ interface thread" );
- gdk_threads_enter();
-#endif
-
- /* Create some useful widgets that will certainly be used */
- add_pixmap_directory(config_GetDataDir());
-
- p_intf->p_sys->p_window = create_pda();
- if (p_intf->p_sys->p_window == NULL)
- {
- msg_Err( p_intf, "unable to create pda interface" );
- }
-
- /* Store p_intf to keep an eye on it */
- gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
- "p_intf", p_intf );
-
- /* Set the title of the main window */
- gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
- VOUT_TITLE " (PDA Linux interface)");
-
- /* Get the notebook object */
- p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data(
- GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
-
- /* Get the slider object */
- p_intf->p_sys->p_slider = (GtkHScale*) lookup_widget( p_intf->p_sys->p_window, "timeSlider" );
- p_intf->p_sys->p_slider_label = (GtkLabel*) lookup_widget( p_intf->p_sys->p_window, "timeLabel" );
- if (p_intf->p_sys->p_slider == NULL)
- msg_Err( p_intf, "Time slider widget not found." );
- if (p_intf->p_sys->p_slider_label == NULL)
- msg_Err( p_intf, "Time label widget not found." );
-
- /* Connect the date display to the slider */
- p_intf->p_sys->p_adj = gtk_range_get_adjustment( GTK_RANGE(p_intf->p_sys->p_slider) );
- if (p_intf->p_sys->p_adj == NULL)
- msg_Err( p_intf, "Adjustment range not found." );
- g_signal_connect( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
- G_CALLBACK( GtkDisplayDate ), p_intf );
- p_intf->p_sys->f_adj_oldvalue = 0;
- p_intf->p_sys->i_adj_oldvalue = 0;
-
- /* BEGIN OF FILEVIEW GTK_TREE_VIEW */
- 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");
-
- /* Insert columns 0 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 0, (gchar *) N_("Filename"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 0 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 0 );
- gtk_tree_view_column_set_sort_column_id(p_column, 0);
- /* Insert columns 1 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 1, (gchar *) N_("Permissions"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 1 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 1 );
- gtk_tree_view_column_set_sort_column_id(p_column, 1);
- /* Insert columns 2 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 2, (gchar *) N_("Size"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 2 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 2 );
- gtk_tree_view_column_set_sort_column_id(p_column, 2);
- /* Insert columns 3 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 3, (gchar *) N_("Owner"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 3 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 3 );
- gtk_tree_view_column_set_sort_column_id(p_column, 3);
- /* Insert columns 4 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 4, (gchar *) N_("Group"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 4 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 4 );
- gtk_tree_view_column_set_sort_column_id(p_column, 4);
-
- /* Get new directory listing */
- p_filelist = gtk_list_store_new (5,
- G_TYPE_STRING, /* Filename */
- G_TYPE_STRING, /* permissions */
- G_TYPE_UINT64, /* File size */
- G_TYPE_STRING, /* Owner */
- G_TYPE_STRING);/* Group */
- ReadDirectory(p_intf, p_filelist, (char*)".");
- gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile), GTK_TREE_MODEL(p_filelist));
- g_object_unref(p_filelist); /* Model will be released by GtkTreeView */
- gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile)),GTK_SELECTION_MULTIPLE);
-
- /* Column properties */
- gtk_tree_view_set_headers_visible(p_intf->p_sys->p_tvfile, TRUE);
- gtk_tree_view_columns_autosize(p_intf->p_sys->p_tvfile);
- gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile),TRUE);
- /* END OF FILEVIEW GTK_TREE_VIEW */
-
- /* BEGIN OF PLAYLIST GTK_TREE_VIEW */
- 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");
-
- /* Columns 1 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 0, (gchar *) N_("Filename"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 0 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 0 );
- gtk_tree_view_column_set_sort_column_id(p_column, 0);
- /* Column 2 */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 1, (gchar *) N_("Time"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 1 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 1 );
- gtk_tree_view_column_set_sort_column_id(p_column, 1);
-#if 0
- /* Column 3 - is a hidden column used for reliable deleting items from the underlying playlist */
- p_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 2, (gchar *) N_("Index"), p_renderer, NULL);
- p_column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 2 );
- gtk_tree_view_column_add_attribute(p_column, p_renderer, "text", 2 );
- gtk_tree_view_column_set_sort_column_id(p_column, 2);
-#endif
- /* update the playlist */
- p_playlist = pl_Hold( p_intf );
- p_playlist_store = gtk_list_store_new (3,
- G_TYPE_STRING, /* Filename */
- G_TYPE_STRING, /* Time */
- G_TYPE_UINT); /* Hidden index */
- PlaylistRebuildListStore(p_intf,p_playlist_store, p_playlist);
- gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist), GTK_TREE_MODEL(p_playlist_store));
- g_object_unref(p_playlist_store);
- pl_Release( p_intf ); /* Free the playlist */
- gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist)),GTK_SELECTION_MULTIPLE);
-
- /* Column properties */
- gtk_tree_view_set_headers_visible(p_intf->p_sys->p_tvplaylist, TRUE);
- gtk_tree_view_columns_autosize(p_intf->p_sys->p_tvplaylist);
- gtk_tree_view_set_headers_clickable(p_intf->p_sys->p_tvplaylist, TRUE);
- /* END OF PLAYLIST GTK_TREE_VIEW */
-
- /* Hide the Preference TAB for now. */
- GtkWidget *p_preference_tab = NULL;
- p_preference_tab = gtk_notebook_get_nth_page(p_intf->p_sys->p_notebook,5);
- if (p_preference_tab != NULL)
- gtk_widget_hide(p_preference_tab);
-
- /* Show the control window */
- gtk_widget_show( p_intf->p_sys->p_window );
-
-#ifdef NEED_GTK2_MAIN
- msg_Dbg( p_intf, "Manage GTK keyboard events using threads" );
- while( vlc_object_alive( p_intf ) )
- {
- Manage( p_intf );
-
- /* Sleep to avoid using all CPU - since some interfaces need to
- * access keyboard events, a 100ms delay is a good compromise */
- gdk_threads_leave();
- if (vlc_CPU() & CPU_CAPABILITY_FPU)
- msleep( INTF_IDLE_SLEEP );
- else
- msleep( 1000 );
- gdk_threads_enter();
- }
-#else
- msg_Dbg( p_intf, "Manage GTK keyboard events using timeouts" );
- /* Sleep to avoid using all CPU - since some interfaces needs to access
- * keyboard events, a 1000ms delay is a good compromise */
- if (vlc_CPU() & CPU_CAPABILITY_FPU)
- i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, (GtkFunction)Manage, p_intf );
- else
- i_dummy = gtk_timeout_add( 1000, (GtkFunction)Manage, p_intf );
-
- /* Enter Gtk mode */
- gtk_main();
- /* Remove the timeout */
- gtk_timeout_remove( i_dummy );
-#endif
-
- gtk_object_destroy( GTK_OBJECT(p_intf->p_sys->p_window) );
-#ifdef NEED_GTK2_MAIN
- gdk_threads_leave();
-#endif
- vlc_restorecancel(canc);
-}
-
-/* following functions are local */
-
-/*****************************************************************************
- * Manage: manage main thread messages
- *****************************************************************************
- * In this function, called approx. 10 times a second, we check what the
- * main program wanted to tell us.
- *****************************************************************************/
-static int Manage( intf_thread_t *p_intf )
-{
- GtkListStore *p_liststore;
-
- /* Update the input */
- if( p_intf->p_sys->p_input == NULL )
- {
- p_intf->p_sys->p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
- FIND_ANYWHERE );
- }
- else if( p_intf->p_sys->p_input->b_dead )
- {
- vlc_object_release( p_intf->p_sys->p_input );
- p_intf->p_sys->p_input = NULL;
- }
-
- if( p_intf->p_sys->p_input )
- {
- input_thread_t *p_input = p_intf->p_sys->p_input;
- int64_t i_time = 0, i_length = 0;
-
- if( vlc_object_alive (p_input) )
- {
- playlist_t *p_playlist;
-
- GtkModeManage( p_intf );
- p_intf->p_sys->b_playing = 1;
-
- /* update playlist interface */
- p_playlist = pl_Hold( p_intf );
- if (p_playlist != NULL)
- {
- p_liststore = gtk_list_store_new (3,
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_UINT); /* Hidden index */
- PlaylistRebuildListStore(p_intf, p_liststore, p_playlist);
- gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore);
- g_object_unref(p_liststore);
- pl_Release( p_intf );
- }
-
- /* Manage the slider */
- i_time = var_GetTime( p_intf->p_sys->p_input, "time" );
- i_length = var_GetTime( p_intf->p_sys->p_input, "length" );
-
- if (vlc_CPU() & CPU_CAPABILITY_FPU)
- {
- /* Manage the slider for CPU_CAPABILITY_FPU hardware */
- if( p_intf->p_sys->b_playing )
- {
- float newvalue = p_intf->p_sys->p_adj->value;
-
- /* If the user hasn't touched the slider since the last time,
- * then the input can safely change it */
- if( newvalue == p_intf->p_sys->f_adj_oldvalue )
- {
- /* Update the value */
- p_intf->p_sys->p_adj->value =
- p_intf->p_sys->f_adj_oldvalue =
- ( 100 * i_time ) / i_length;
- g_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
- "value_changed" );
- }
- /* Otherwise, send message to the input if the user has
- * finished dragging the slider */
- else if( p_intf->p_sys->b_slider_free )
- {
- double f_pos = (double)newvalue / 100.0;
-
- /* release the lock to be able to seek */
- var_SetFloat( p_input, "position", f_pos );
-
- /* Update the old value */
- p_intf->p_sys->f_adj_oldvalue = newvalue;
- }
- }
- }
- else
- {
- /* Manage the slider without CPU_CAPABILITY_FPU hardware */
- if( p_intf->p_sys->b_playing )
- {
- off_t newvalue = p_intf->p_sys->p_adj->value;
-
- /* If the user hasn't touched the slider since the last time,
- * then the input can safely change it */
- if( newvalue == p_intf->p_sys->i_adj_oldvalue )
- {
- /* Update the value */
- p_intf->p_sys->p_adj->value =
- p_intf->p_sys->i_adj_oldvalue =
- ( 100 * i_time ) / i_length;
- g_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
- "value_changed" );
- }
- /* Otherwise, send message to the input if the user has
- * finished dragging the slider */
- else if( p_intf->p_sys->b_slider_free )
- {
- double f_pos = (double)newvalue / 100.0;
-
- /* release the lock to be able to seek */
- var_SetFloat( p_input, "position", f_pos );
-
- /* Update the old value */
- p_intf->p_sys->i_adj_oldvalue = newvalue;
- }
- }
- }
- }
- }
- else if( p_intf->p_sys->b_playing && vlc_object_alive( p_intf ) )
- {
- GtkModeManage( p_intf );
- p_intf->p_sys->b_playing = 0;
- }
-
-#ifndef NEED_GTK2_MAIN
- if( !vlc_object_alive( p_intf ) )
- {
- /* Prepare to die, young Skywalker */
- gtk_main_quit();
-
- return FALSE;
- }
-#endif
-
- return TRUE;
-}
-
-/*****************************************************************************
- * GtkDisplayDate: display stream date
- *****************************************************************************
- * This function displays the current date related to the position in
- * the stream. It is called whenever the slider changes its value.
- * The lock has to be taken before you call the function.
- *****************************************************************************/
-void GtkDisplayDate( GtkAdjustment *p_adj, gpointer userdata )
-{
- (void)p_adj;
-
- intf_thread_t *p_intf;
-
- p_intf = (intf_thread_t*) userdata;
- if (p_intf == NULL)
- return;
-
- if( p_intf->p_sys->p_input )
- {
- char psz_time[ MSTRTIME_MAX_SIZE ];
- int64_t i_seconds;
-
- i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) / INT64_C(1000000 );
- secstotimestr( psz_time, i_seconds );
-
- gtk_label_set_text( GTK_LABEL( p_intf->p_sys->p_slider_label ),
- psz_time );
- }
-}
-
-/*****************************************************************************
- * GtkModeManage: actualize the aspect of the interface whenever the input
- * changes.
- *****************************************************************************
- * The lock has to be taken before you call the function.
- *****************************************************************************/
-gint GtkModeManage( intf_thread_t * p_intf )
-{
- GtkWidget * p_slider = NULL;
- bool b_control;
-
- if ( p_intf->p_sys->p_window == NULL )
- msg_Err( p_intf, "Main widget not found" );
-
- p_slider = lookup_widget( p_intf->p_sys->p_window, "timeSlider");
- if (p_slider == NULL)
- msg_Err( p_intf, "Slider widget not found" );
-
- /* controls unavailable */
- b_control = 0;
-
- /* show the box related to current input mode */
- if( p_intf->p_sys->p_input )
- {
- /* initialize and show slider for seekable streams */
- {
- gtk_widget_show( GTK_WIDGET( p_slider ) );
- }
-
- /* control buttons for free pace streams */
- b_control = var_GetBool( p_intf->p_sys->p_input, "can-rate" );
-
- msg_Dbg( p_intf, "stream has changed, refreshing interface" );
- }
-
- /* set control items */
- gtk_widget_set_sensitive( lookup_widget( p_intf->p_sys->p_window, "tbRewind"), b_control );
- gtk_widget_set_sensitive( lookup_widget( p_intf->p_sys->p_window, "tbPause"), b_control );
- gtk_widget_set_sensitive( lookup_widget( p_intf->p_sys->p_window, "tbForward"), b_control );
- return TRUE;
-}
3,355 modules/gui/pda/pda.glade
View
0 additions, 3,355 deletions not shown
19 modules/gui/pda/pda.gladep
View
@@ -1,19 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
- <name>Pda</name>
- <program_name>pda</program_name>
- <source_directory></source_directory>
- <pixmaps_directory>../../../share</pixmaps_directory>
- <gnome_support>FALSE</gnome_support>
- <use_widget_names>TRUE</use_widget_names>
- <output_main_file>FALSE</output_main_file>
- <output_build_files>FALSE</output_build_files>
- <main_source_file>pda_interface.c</main_source_file>
- <main_header_file>pda_interface.h</main_header_file>
- <handler_source_file>pda_callbacks.c</handler_source_file>
- <handler_header_file>pda_callbacks.h</handler_header_file>
- <support_source_file>pda_support.c</support_source_file>
- <support_header_file>pda_support.h</support_header_file>
-</glade-project>
67 modules/gui/pda/pda.h
View
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * pda.h: private Gtk+ interface description
- *****************************************************************************
- * Copyright (C) 1999, 2000 the VideoLAN team
- * $Id$
- *
- * Authors: Jean-Paul Saman <jpsaman _at_ videolan _dot_ 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#define MAX_ATEXIT 10
-
-/*****************************************************************************
- * intf_sys_t: description and status of Gtk+ interface
- *****************************************************************************/
-struct intf_sys_t
-{
- /* The gtk_main module */
- module_t *p_gtk_main;
-
- /* windows and widgets */
- GtkWidget *p_window; /* main window */
- GtkNotebook *p_notebook;
- GtkHScale *p_slider;
- GtkTreeView *p_tvfile;
- GtkTreeView *p_tvplaylist;
-
- /* slider */
- GtkLabel * p_slider_label;
- GtkAdjustment * p_adj; /* slider adjustment object */
- off_t i_adj_oldvalue; /* previous value -no FPU hardware */
- float f_adj_oldvalue; /* previous value -with FPU hardware*/
-
- /* special actions */
- bool b_playing;
- bool b_window_changed; /* window display toggled ? */
- bool b_slider_free; /* slider status */
-
- /* Preference settings */
- bool b_autoplayfile;
-
- /* The input thread */
- input_thread_t * p_input;
-};
-
-/*****************************************************************************
- * Useful macro
- ****************************************************************************/
-#define GTK_GET( type, nom ) GTK_##type( gtk_object_get_data( \
- GTK_OBJECT( p_intf->p_sys->p_window ), nom ) )
-
-
-#define GtkGetIntf( widget ) __GtkGetIntf( GTK_WIDGET( widget ) )
-void * __GtkGetIntf( GtkWidget * );
1,160 modules/gui/pda/pda_callbacks.c
View
@@ -1,1160 +0,0 @@
-/*****************************************************************************
- * pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
- *****************************************************************************
- * Copyright (C) 2000, 2001 the VideoLAN team
- * $Id$
- *
- * Authors: Jean-Paul Saman <jpsaman _at_ videolan _dot_ 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#include <sys/types.h> /* off_t */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-#include <vlc_input.h>
-#include <vlc_interface.h>
-#include <vlc_playlist.h>
-#include <vlc_vout.h>
-
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <grp.h>
-
-#include <gtk/gtk.h>
-
-#include "pda_callbacks.h"
-#include "pda_interface.h"
-#include "pda_support.h"
-#include "pda.h"
-
-#define VLC_MAX_MRL 256
-
-static char *get_file_perms(struct stat st);
-
-/*****************************************************************************
- * Useful function to retrieve p_intf
- ****************************************************************************/
-void * __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;
-}
-
-static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_size)
-{
- intf_thread_t *p_intf = GtkGetIntf( widget );
- playlist_t *p_playlist;
- int i_pos=0;
- GtkTreeView *p_tvplaylist = NULL;
-
- p_playlist = pl_Hold( p_intf );
-
- if( p_playlist == NULL)
- { /* Bail out when VLC's playlist object is not found. */
- return;
- }
-
- /* Add to playlist object. */
- p_tvplaylist = (GtkTreeView *) lookup_widget( GTK_WIDGET(widget), "tvPlaylist");
- if (p_tvplaylist)
- {
- GtkTreeModel *p_play_model;
- GtkTreeIter p_play_iter;
-
- p_play_model = gtk_tree_view_get_model(p_tvplaylist);
-
- if (p_play_model)
- {
- int i;
-
- /* Add a new row to the playlist treeview model */
- gtk_list_store_append (GTK_LIST_STORE(p_play_model), &p_play_iter);
- gtk_list_store_set (GTK_LIST_STORE(p_play_model), &p_play_iter,
- 0, name, /* Add path to it !!! */
- 1, "no info",
- 2, playlist_CurrentSize(p_playlist), /* Hidden index. */
- -1 );
-
- /* Add to VLC's playlist */
-#if 0
- if (p_intf->p_sys->b_autoplayfile)
- {
- playlist_Add( p_playlist, (const char*)name, (const char**)ppsz_options, i_size,
- PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END);
- }
- else
-#endif
- {
- playlist_AddExt( p_playlist, (const char*)name,
- (const char*)name,
- PLAYLIST_APPEND, PLAYLIST_END,
- (mtime_t) 0,
- i_size, (const char **) ppsz_options, VLC_INPUT_OPTION_TRUSTED,
- true, pl_Unlocked );
- }
-
- /* Cleanup memory */
- for (i=0; i<i_size; i++)
- free(ppsz_options[i]);
- free(ppsz_options);
- }
- }
- pl_Release( p_intf );
-}
-
-void PlaylistRebuildListStore( intf_thread_t *p_intf,
- GtkListStore * p_list, playlist_t * p_playlist )
-{
- GtkTreeIter iter;
- int i_dummy;
- gchar * ppsz_text[2];
-#if 0
- GdkColor red;
- red.red = 65535;
- red.blue = 0;
- red.green = 0;
-#endif
- PL_LOCK;
- for( i_dummy = 0; i_dummy < playlist_CurrentSize(p_playlist) ; i_dummy++ )
- {
- playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_dummy );
- if( p_item )
- {
- ppsz_text[0] = p_item->p_input->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],
- 2, i_dummy, /* Hidden index */
- -1);
- }
- }
- PL_UNLOCK;
-}
-
-/*****************************************************************
- * Read directory helper function.
- ****************************************************************/
-void ReadDirectory(intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir )
-{
- GtkTreeIter iter;
- struct dirent **pp_namelist;
- struct passwd *p_pw;
- struct group *p_grp;
- struct stat st;
- 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_Dbg(p_intf, "permision denied" );
- }
- n = scandir(".", &pp_namelist, 0, alphasort);
-
- if (n<0)
- perror("scandir");
- else
- {
- int i;
- gchar *ppsz_text[4];
-
- if (lstat("..", &st)==0)
- {
- /* user, group */
- p_pw = getpwuid(st.st_uid);
- p_grp = getgrgid(st.st_gid);
-
- /* XXX : kludge temporaire pour yopy */
- ppsz_text[0] = "..";
- ppsz_text[1] = get_file_perms(st);
- ppsz_text[2] = p_pw->pw_name;
- ppsz_text[3] = p_grp->gr_name;
-
- /* 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, st.st_size,
- 3, ppsz_text[2],
- 4, ppsz_text[3],
- -1);
-
- free(ppsz_text[1]);
- }
- /* kludge */
- for (i=0; i<n; i++)
- {
- if ((pp_namelist[i]->d_name[0] != '.') &&
- (lstat(pp_namelist[i]->d_name, &st)==0))
- {
- /* user, group */
- p_pw = getpwuid(st.st_uid);
- p_grp = getgrgid(st.st_gid);
-
- /* This is a list of strings. */
- ppsz_text[0] = pp_namelist[i]->d_name;
- ppsz_text[1] = get_file_perms(st);
- ppsz_text[2] = p_pw->pw_name;
- ppsz_text[3] = p_grp->gr_name;
-#if 0
- msg_Dbg(p_intf, "(%d) file: %s permission: %s user: %s group: %s", i, ppsz_text[0], ppsz_text[1], ppsz_text[2], ppsz_text[3] );
-#endif
- gtk_list_store_append (p_list, &iter);
- gtk_list_store_set (p_list, &iter,
- 0, ppsz_text[0],
- 1, ppsz_text[1],
- 2, st.st_size,
- 3, ppsz_text[2],
- 4, ppsz_text[3],
- -1);
-
- free(ppsz_text[1]);
- }
- }
- free(pp_namelist);
- }
-}
-
-static char *get_file_perms(const struct stat st)
-{
- char *psz_perm;
-
- psz_perm = (char *) malloc(10);
- strncpy( psz_perm, "----------", sizeof("----------"));
-
- /* determine permission modes */
- if (S_ISLNK(st.st_mode))
- psz_perm[0]= 'l';
- else if (S_ISDIR(st.st_mode))
- psz_perm[0]= 'd';
- else if (S_ISCHR(st.st_mode))
- psz_perm[0]= 'c';
- else if (S_ISBLK(st.st_mode))
- psz_perm[0]= 'b';
- else if (S_ISFIFO(st.st_mode))
- psz_perm[0]= 'f';
- else if (S_ISSOCK(st.st_mode))
- psz_perm[0]= 's';
- else if (S_ISREG(st.st_mode))
- psz_perm[0]= '-';
- else /* Unknown type is an error */
- psz_perm[0]= '?';
- /* Get file permissions */
- /* User */
- if (st.st_mode & S_IRUSR)
- psz_perm[1]= 'r';
- if (st.st_mode & S_IWUSR)
- psz_perm[2]= 'w';
- if (st.st_mode & S_IXUSR)
- {
- if (st.st_mode & S_ISUID)
- psz_perm[3] = 's';
- else
- psz_perm[3]= 'x';
- }
- else if (st.st_mode & S_ISUID)
- psz_perm[3] = 'S';
- /* Group */
- if (st.st_mode & S_IRGRP)
- psz_perm[4]= 'r';
- if (st.st_mode & S_IWGRP)
- psz_perm[5]= 'w';
- if (st.st_mode & S_IXGRP)
- {
- if (st.st_mode & S_ISGID)
- psz_perm[6] = 's';
- else
- psz_perm[6]= 'x';
- }
- else if (st.st_mode & S_ISGID)
- psz_perm[6] = 'S';
- /* Other */
- if (st.st_mode & S_IROTH)
- psz_perm[7]= 'r';
- if (st.st_mode & S_IWOTH)
- psz_perm[8]= 'w';
- if (st.st_mode & S_IXOTH)
- {
- /* 'sticky' bit */
- if (st.st_mode &S_ISVTX)
- psz_perm[9] = 't';
- else
- psz_perm[9]= 'x';
- }
- else if (st.st_mode &S_ISVTX)
- psz_perm[9]= 'T';
-
- return psz_perm;
-}
-
-/*
- * Main interface callbacks
- */
-
-gboolean onPDADeleteEvent(GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( widget );
-
- libvlc_Quit( p_intf->p_libvlc );
- msg_Dbg( p_intf, "about to exit vlc ... signaled" );
-
- return TRUE;
-}
-
-void onRewind(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- if (p_intf->p_sys->p_input != NULL)
- {
- var_TriggerCallback( p_intf->p_sys->p_input, "rate-slower" );
- }
-}
-
-void onPause(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- if (p_intf->p_sys->p_input != NULL)
- {
- var_SetInteger( p_intf->p_sys->p_input, "state", PAUSE_S );
- }
-}
-
-
-void onPlay(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
- playlist_t *p_playlist = pl_Hold( p_intf );
-
- if (p_playlist)
- {
- int s;
-
- PL_LOCK;
- s = playlist_CurrentSize(p_playlist);
- PL_UNLOCK;
- /* FIXME: This is racy... */
- if (s)
- {
- playlist_Play( p_playlist );
- gdk_window_lower( p_intf->p_sys->p_window->window );
- }
- pl_Release( p_intf );
- }
-}
-
-void onStop(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET( button ) );
- playlist_t *p_playlist = pl_Hold( p_intf );
- if (p_playlist)
- {
- playlist_Stop( p_playlist );
- pl_Release( p_intf );
- 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)
- {
- var_TriggerCallback( p_intf->p_sys->p_input, "rate-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,6);
- }
-}
-
-gboolean SliderRelease(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( widget );
-
- msg_Dbg( p_intf, "SliderButton Release" );
- p_intf->p_sys->b_slider_free = 1;
-
- return TRUE;
-}
-
-gboolean SliderPress(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( widget );
-
- msg_Dbg( p_intf, "SliderButton Press" );
- p_intf->p_sys->b_slider_free = 0;
-
- return FALSE;
-}
-
-void SliderMove(GtkRange *range, GtkScrollType scroll, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( range );
- msg_Dbg( p_intf, "SliderButton Move" );
-}
-
-
-static void addSelectedToPlaylist(GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, gpointer *userdata)
-{
- gchar *psz_filename;
-
- gtk_tree_model_get(model, iter, 0, &psz_filename, -1);
-
- PlaylistAddItem(GTK_WIDGET(userdata), psz_filename, 0, 0);
-}
-
-void onFileListRow(GtkTreeView *treeview, GtkTreePath *path,
- GtkTreeViewColumn *column, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(treeview) );
- GtkTreeSelection *p_selection = gtk_tree_view_get_selection(treeview);
-
- if (gtk_tree_selection_count_selected_rows(p_selection) == 1)
- {
- struct stat st;
- GtkTreeModel *p_model;
- GtkTreeIter iter;
- char *psz_filename;
-
- /* This might be a directory selection */
- p_model = gtk_tree_view_get_model(treeview);
- if (!p_model)
- {
- msg_Err(p_intf, "PDA: Filelist model contains a NULL pointer" );
- return;
- }
- if (!gtk_tree_model_get_iter(p_model, &iter, path))
- {
- msg_Err( p_intf, "PDA: Could not get iter from model" );
- return;
- }
-
- gtk_tree_model_get(p_model, &iter, 0, &psz_filename, -1);
- if (stat((char*)psz_filename, &st)==0)
- {
- if (S_ISDIR(st.st_mode))
- {
- GtkListStore *p_store = NULL;
-
- /* Get new directory listing */
- p_store = gtk_list_store_new (5,
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_UINT64,
- G_TYPE_STRING,
- G_TYPE_STRING);
- if (p_store)
- {
- ReadDirectory(p_intf, p_store, psz_filename);
-
- /* Update TreeView with new model */
- gtk_tree_view_set_model(treeview, (GtkTreeModel*) p_store);
- g_object_unref(p_store);
- }
- }
- }
- }
-}
-
-void onAddFileToPlaylist(GtkButton *button, gpointer user_data)
-{
- GtkTreeView *p_treeview = NULL;
-
- p_treeview = (GtkTreeView *) lookup_widget( GTK_WIDGET(button), "tvFileList");
- if (p_treeview)
- {
- GtkTreeSelection *p_selection = gtk_tree_view_get_selection(p_treeview);
-
- gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) p_treeview);
- }
-}
-
-
-void NetworkBuildMRL(GtkEditable *editable, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(editable) );
- GtkSpinButton *p_networkPort = NULL;
- GtkEntry *p_entryMRL = NULL;
- GtkEntry *p_networkType = NULL;
- GtkEntry *p_networkAddress = NULL;
- GtkEntry *p_networkProtocol = NULL;
- const gchar *psz_mrlNetworkType;
- const gchar *psz_mrlAddress;
- const gchar *psz_mrlProtocol;
- gint i_mrlPort;
- char text[VLC_MAX_MRL];
- int i_pos = 0;
-
- p_entryMRL = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryMRL" );
-
- p_networkType = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkType" );
- p_networkAddress = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkAddress" );
- p_networkPort = (GtkSpinButton*) lookup_widget( GTK_WIDGET(editable), "entryNetworkPort" );
- p_networkProtocol = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkProtocolType" );
-
- psz_mrlNetworkType = gtk_entry_get_text(GTK_ENTRY(p_networkType));
- psz_mrlAddress = gtk_entry_get_text(GTK_ENTRY(p_networkAddress));
- i_mrlPort = gtk_spin_button_get_value_as_int(p_networkPort);
- psz_mrlProtocol = gtk_entry_get_text(GTK_ENTRY(p_networkProtocol));
-
- /* Build MRL from parts ;-) */
- i_pos = snprintf( &text[0], VLC_MAX_MRL, "%s://", (char*)psz_mrlProtocol);
- if (strncasecmp( (char*)psz_mrlNetworkType, "multicast",9)==0)
- {
- i_pos += snprintf( &text[i_pos], VLC_MAX_MRL - i_pos, "@" );
- }
- i_pos += snprintf( &text[i_pos], VLC_MAX_MRL - i_pos, "%s:%d", (char*)psz_mrlAddress, (int)i_mrlPort );
-
- if (i_pos >= VLC_MAX_MRL)
- {
- text[VLC_MAX_MRL-1]='\0';
- msg_Err( p_intf, "Media Resource Locator is truncated to: %s", text);
- }
-
- gtk_entry_set_text(p_entryMRL,text);
-}
-
-void onAddNetworkPlaylist(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- GtkEntry *p_mrl = NULL;
- GtkCheckButton *p_network_transcode = NULL;
- gboolean b_network_transcode;
- const gchar *psz_mrl_name;
-
- p_mrl = (GtkEntry*) lookup_widget(GTK_WIDGET(button),"entryMRL" );
- psz_mrl_name = gtk_entry_get_text(p_mrl);
-
- p_network_transcode = (GtkCheckButton*) lookup_widget(GTK_WIDGET(button), "checkNetworkTranscode" );
- b_network_transcode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_network_transcode));
- if (b_network_transcode)
- {
- msg_Dbg( p_intf, "Network transcode option selected." );
- onAddTranscodeToPlaylist(button, (gchar *)psz_mrl_name);
- }
- else
- {
- msg_Dbg( p_intf, "Network receiving selected." );
- PlaylistAddItem(GTK_WIDGET(button), (gchar *)psz_mrl_name, 0, 0);
- }
-}
-
-
-void onAddCameraToPlaylist(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- GtkSpinButton *entryV4LChannel = NULL;
- GtkSpinButton *entryV4LFrequency = NULL;
- GtkSpinButton *entryV4LSampleRate = NULL;
- GtkSpinButton *entryV4LQuality = NULL;
- GtkSpinButton *entryV4LTuner = NULL;
- gint i_v4l_channel;
- gint i_v4l_frequency;
- gint i_v4l_samplerate;
- gint i_v4l_quality;
- gint i_v4l_tuner;
-
- GtkEntry *entryV4LVideoDevice = NULL;
- GtkEntry *entryV4LAudioDevice = NULL;
- GtkEntry *entryV4LNorm = NULL;
- GtkEntry *entryV4LSize = NULL;
- GtkEntry *entryV4LSoundDirection = NULL;
- const gchar *p_v4l_video_device;
- const gchar *p_v4l_audio_device;
- const gchar *p_v4l_norm;
- const gchar *p_v4l_size;
- const gchar *p_v4l_sound_direction;
-
- /* MJPEG only */
- GtkCheckButton *checkV4LMJPEG = NULL;
- GtkSpinButton *entryV4LDecimation = NULL;
- gboolean b_v4l_mjpeg;
- gint i_v4l_decimation;
- /* end MJPEG only */
-
- GtkCheckButton *p_check_v4l_transcode = NULL;
- gboolean b_v4l_transcode;
-
- char **ppsz_options = NULL; /* list of options */
- int i_options=0;
- char v4l_mrl[6];
- int i_pos;
- int i;
-
- ppsz_options = (char **) malloc(11 *sizeof(char*));
- if (ppsz_options == NULL)
- return;
- for (i=0; i<11; i++)
- {
- ppsz_options[i] = (char *) malloc(VLC_MAX_MRL);
- if (ppsz_options[i] == NULL)
- {
- for (i-=1; i>=0; i--)
- free(ppsz_options[i]);
- free(ppsz_options);
- return;
- }
- }
-
- i_pos = snprintf( &v4l_mrl[0], 6, "v4l");
- v4l_mrl[5]='\0';
-
- entryV4LChannel = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LChannel" );
- entryV4LFrequency = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LFrequency" );
- entryV4LSampleRate = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LSampleRate" );
- entryV4LQuality = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LQuality" );
- entryV4LTuner = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LTuner" );
-
- entryV4LVideoDevice = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryV4LVideoDevice" );
- entryV4LAudioDevice = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryV4LAudioDevice" );
- entryV4LNorm = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryV4LNorm" );
- entryV4LSize = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryV4LSize" );
- entryV4LSoundDirection = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryV4LSoundDirection" );
-
- i_v4l_channel = gtk_spin_button_get_value_as_int(entryV4LChannel);
- i_v4l_frequency = gtk_spin_button_get_value_as_int(entryV4LFrequency);
- i_v4l_samplerate = gtk_spin_button_get_value_as_int(entryV4LSampleRate);
- i_v4l_quality = gtk_spin_button_get_value_as_int(entryV4LQuality);
- i_v4l_tuner = gtk_spin_button_get_value_as_int(entryV4LTuner);
-
- p_v4l_video_device = gtk_entry_get_text(GTK_ENTRY(entryV4LVideoDevice));
- p_v4l_audio_device = gtk_entry_get_text(GTK_ENTRY(entryV4LAudioDevice));
- p_v4l_norm = gtk_entry_get_text(GTK_ENTRY(entryV4LNorm));
- p_v4l_size = gtk_entry_get_text(GTK_ENTRY(entryV4LSize));
- p_v4l_sound_direction = gtk_entry_get_text(GTK_ENTRY(entryV4LSoundDirection));
-
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "%s", (char*)p_v4l_video_device );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "adev=%s", (char*)p_v4l_audio_device );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "norm=%s", (char*)p_v4l_norm );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "size=%s", (char*)p_v4l_size );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "%s", (char*)p_v4l_sound_direction );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "channel=%d", (int)i_v4l_channel );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "frequency=%d", (int)i_v4l_frequency );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "samplerate=%d", (int)i_v4l_samplerate );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "quality=%d", (int)i_v4l_quality );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "tuner=%d", (int)i_v4l_tuner );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- /* MJPEG only */
- checkV4LMJPEG = (GtkCheckButton*) lookup_widget( GTK_WIDGET(button), "checkV4LMJPEG" );
- b_v4l_mjpeg = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkV4LMJPEG));
- if (b_v4l_mjpeg)
- {
- entryV4LDecimation = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryV4LDecimation" );
- i_v4l_decimation = gtk_spin_button_get_value_as_int(entryV4LDecimation);
-
- i_pos = snprintf( &ppsz_options[i_options++][0], VLC_MAX_MRL, "mjpeg:%d", (int)i_v4l_decimation );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- }
- /* end MJPEG only */
-
- p_check_v4l_transcode = (GtkCheckButton*) lookup_widget(GTK_WIDGET(button), "checkV4LTranscode" );
- b_v4l_transcode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_check_v4l_transcode));
- if (b_v4l_transcode)
- {
- msg_Dbg( p_intf, "Camera transcode option selected." );
- onAddTranscodeToPlaylist(button, (gchar *)v4l_mrl);
- }
- else
- {
- msg_Dbg( p_intf, "Camera reception option selected." );
- PlaylistAddItem(GTK_WIDGET(button), (gchar*) &v4l_mrl, ppsz_options, i_options);
- }
-}
-
-
-gboolean PlaylistEvent(GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
- return FALSE;
-}
-
-
-void onPlaylistColumnsChanged(GtkTreeView *treeview, gpointer user_data)
-{
-}
-
-
-gboolean onPlaylistRowSelected(GtkTreeView *treeview, gboolean start_editing, gpointer user_data)
-{
- return FALSE;
-}
-
-
-void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
- GtkTreeViewColumn *column, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(treeview) );
- GtkTreeSelection *p_selection = gtk_tree_view_get_selection(treeview);
- playlist_t * p_playlist = pl_Hold( p_intf );
-
- if( p_playlist == NULL )
- {
- return; // FALSE;
- }
-
- if (gtk_tree_selection_count_selected_rows(p_selection) == 1)
- {
- GtkTreeModel *p_model;
- GtkTreeIter iter;
- int i_row;
- int i_skip;
-
- /* This might be a directory selection */
- p_model = gtk_tree_view_get_model(treeview);
- if (!p_model)
- {
- msg_Err(p_intf, "PDA: Playlist model contains a NULL pointer" );
- pl_Release( p_intf );
- return;
- }
- if (!gtk_tree_model_get_iter(p_model, &iter, path))
- {
- msg_Err( p_intf, "PDA: Playlist could not get iter from model" );
- pl_Release( p_intf );
- return;
- }
-
- gtk_tree_model_get(p_model, &iter, 2, &i_row, -1);
- i_skip = i_row - p_playlist->i_current_index;
- playlist_Skip( p_playlist, i_skip );
- }
- pl_Release( p_intf );
-}
-
-
-void onUpdatePlaylist(GtkButton *button, gpointer user_data)
-{
- intf_thread_t * p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = pl_Hold( p_intf );
- GtkTreeView *p_tvplaylist = NULL;
-
- if( p_playlist == NULL )
- {
- return;
- }
-
- p_tvplaylist = (GtkTreeView*) lookup_widget( GTK_WIDGET(button), "tvPlaylist");
- if (p_tvplaylist)
- {
- GtkListStore *p_model = NULL;
-
- /* Rebuild the playlist then. */
- p_model = gtk_list_store_new (3,
- G_TYPE_STRING, /* Filename */
- G_TYPE_STRING, /* Time */
- G_TYPE_UINT); /* Hidden field */
- if (p_model)
- {
- PlaylistRebuildListStore(p_intf, p_model, p_playlist);
- gtk_tree_view_set_model(GTK_TREE_VIEW(p_tvplaylist), GTK_TREE_MODEL(p_model));
- g_object_unref(p_model);
- }
- }
- pl_Release( p_intf );
-}
-
-static void deleteItemFromPlaylist(gpointer data, gpointer user_data)
-{
- gtk_tree_path_free((GtkTreePath*) data); // removing an item.
-}
-
-void onDeletePlaylist(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = pl_Hold( p_intf );
- GtkTreeView *p_tvplaylist;
-
- /* Delete an arbitrary item from the playlist */
- p_tvplaylist = (GtkTreeView *) lookup_widget( GTK_WIDGET(button), "tvPlaylist" );
- if (p_tvplaylist != NULL)
- {
- GList *p_rows = NULL;
- GList *p_node;
- GtkTreeModel *p_model = NULL;
- GtkListStore *p_store = NULL;
- GtkTreeSelection *p_selection = gtk_tree_view_get_selection(p_tvplaylist);
-
- p_model = gtk_tree_view_get_model(p_tvplaylist);
- if (p_model)
- {
- p_rows = gtk_tree_selection_get_selected_rows(p_selection, &p_model);
-
- if( g_list_length( p_rows ) )
- {
- /* reverse-sort so that we can delete from the furthest
- * to the closest item to delete...
- */
- p_rows = g_list_reverse( p_rows );
- }
-
- for (p_node=p_rows; p_node!=NULL; p_node = p_node->next)
- {
- GtkTreeIter iter;
- GtkTreePath *p_path = NULL;
-
- p_path = (GtkTreePath *)p_node->data;
- if (p_path)
- {
- if (gtk_tree_model_get_iter(p_model, &iter, p_path))
- {
- gint item;
-
- gtk_tree_model_get(p_model, &iter, 2, &item, -1);
- msg_Err( p_playlist, "PDA delete broken");
- }
- }
- }
-#if 0
- g_list_foreach (p_rows, (GFunc*)gtk_tree_path_free, NULL);
-#endif /* Testing the next line */
- g_list_foreach (p_rows, deleteItemFromPlaylist, NULL);
- g_list_free (p_rows);
- }
-
- /* Rebuild the playlist then. */
- p_store = gtk_list_store_new (3,
- G_TYPE_STRING, /* Filename */
- G_TYPE_STRING, /* Time */
- G_TYPE_UINT); /* Hidden field */
- if (p_store)
- {
- PlaylistRebuildListStore(p_intf, p_store, p_playlist);
- gtk_tree_view_set_model(GTK_TREE_VIEW(p_tvplaylist), GTK_TREE_MODEL(p_store));
- g_object_unref(p_store);
- }
- }
- pl_Release( p_intf );
-}
-
-
-void onClearPlaylist(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
- playlist_t * p_playlist = pl_Hold( p_intf );
- GtkTreeView *p_tvplaylist;
- int item;
-
- if( p_playlist == NULL )
- {
- return;
- }
-
- for(item = playlist_CurrentSize(p_playlist) - 1; item >= 0 ;item-- )
- {
- msg_Err( p_playlist, "fix pda delete" );
- }
- pl_Release( p_intf );
-
- // Remove all entries from the Playlist widget.
- p_tvplaylist = (GtkTreeView*) lookup_widget( GTK_WIDGET(button), "tvPlaylist");
- if (p_tvplaylist)
- {
- GtkTreeModel *p_play_model;
-
- p_play_model = gtk_tree_view_get_model(p_tvplaylist);
- if (p_play_model)
- {
- gtk_list_store_clear(GTK_LIST_STORE(p_play_model));
- }
- }
-}
-
-
-void onPreferenceSave(GtkButton *button, gpointer user_data)
-{
-#if 0
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- msg_Dbg(p_intf, "Preferences Save" );
- config_SaveConfigFile( p_intf, NULL );
-#endif
-}
-
-
-void onPreferenceApply(GtkButton *button, gpointer user_data)
-{
-#if 0
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- msg_Dbg(p_intf, "Preferences Apply" );
-#endif
-}
-
-
-void onPreferenceCancel(GtkButton *button, gpointer user_data)
-{
-#if 0
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- msg_Dbg(p_intf, "Preferences Cancel" );
- config_ResetAll( p_intf );
- /* Cancel interface changes. */
- config_SaveConfigFile( p_intf, NULL );
-#endif
-}
-
-
-void onAddTranscodeToPlaylist(GtkButton *button, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( button );
-
- GtkEntry *p_entryVideoCodec = NULL;
- GtkSpinButton *p_entryVideoBitrate = NULL;
- GtkSpinButton *p_entryVideoBitrateTolerance = NULL;
- GtkSpinButton *p_entryVideoKeyFrameInterval = NULL;
- GtkCheckButton *p_checkVideoDeinterlace = NULL;
- GtkEntry *p_entryAudioCodec = NULL;
- GtkSpinButton *p_entryAudioBitrate = NULL;
- const gchar *p_video_codec;
- gint i_video_bitrate;
- gint i_video_bitrate_tolerance;
- gint i_video_keyframe_interval;
- gboolean b_video_deinterlace;
- const gchar *p_audio_codec;
- gint i_audio_bitrate;
-
- GtkEntry *p_entryStdAccess = NULL;
- GtkEntry *p_entryStdMuxer = NULL;
- GtkEntry *p_entryStdURL = NULL;
- GtkEntry *p_entryStdAnnounce = NULL;
- GtkSpinButton *p_entryStdTTL = NULL;
- GtkCheckButton *p_checkSAP = NULL;
- GtkCheckButton *p_checkSLP = NULL;
- const gchar *p_std_announce;
- const gchar *p_std_access;
- const gchar *p_std_muxer;
- const gchar *p_std_url;
- gboolean b_sap_announce;
- gboolean b_slp_announce;
- gint i_std_ttl;
-
- char **ppsz_options = NULL; /* list of options */
- int i_options=0;
- int i;
-
- gchar mrl[7];
- int i_pos;
-
- ppsz_options = (char **) malloc(3 *sizeof(char*));
- if (ppsz_options == NULL)
- return;
- for (i=0; i<3; i++)
- {
- ppsz_options[i] = (char *) malloc(VLC_MAX_MRL);
- if (ppsz_options[i] == NULL)
- {
- for (i-=1; i>=0; i--)
- free(ppsz_options[i]);
- free(ppsz_options);
- return;
- }
- }
-
- /* Update the playlist */
- playlist_t *p_playlist = pl_Hold( p_intf );
- if( p_playlist == NULL ) return;
- pl_Release( p_intf );
-
- /* Get all the options. */
- i_pos = snprintf( &mrl[0], VLC_MAX_MRL, "sout");
- mrl[6] = '\0';
- /* option 1 */
- i_pos = snprintf( &ppsz_options[i_options][0], VLC_MAX_MRL, "sout='#transcode{");
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- p_entryVideoCodec = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryVideoCodec" );
- p_entryVideoBitrate = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryVideoBitrate" );
- p_entryVideoBitrateTolerance = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryVideoBitrateTolerance" );
- p_entryVideoKeyFrameInterval = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryVideoKeyFrameInterval" );
-
- p_video_codec = gtk_entry_get_text(GTK_ENTRY(p_entryVideoCodec));
- i_video_bitrate = gtk_spin_button_get_value_as_int(p_entryVideoBitrate);
- i_video_bitrate_tolerance = gtk_spin_button_get_value_as_int(p_entryVideoBitrateTolerance);
- i_video_keyframe_interval = gtk_spin_button_get_value_as_int(p_entryVideoKeyFrameInterval);
-
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "vcodec=%s,", (char*)p_video_codec );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "vb=%d,", (int)i_video_bitrate );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "vt=%d,", (int)i_video_bitrate_tolerance );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "keyint=%d,", (int)i_video_keyframe_interval );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- p_checkVideoDeinterlace = (GtkCheckButton*) lookup_widget( GTK_WIDGET(button), "checkVideoDeinterlace" );
- b_video_deinterlace = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_checkVideoDeinterlace));
- if (b_video_deinterlace)
- {
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "deinterlace," );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- }
- p_entryAudioCodec = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryAudioCodec" );
- p_entryAudioBitrate = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryAudioBitrate" );
-
- p_audio_codec = gtk_entry_get_text(GTK_ENTRY(p_entryAudioCodec));
- i_audio_bitrate = gtk_spin_button_get_value_as_int(p_entryAudioBitrate);
-
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "acodec=%s,", (char*)p_audio_codec );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "ab=%d,", (int)i_audio_bitrate );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "channels=1}"/*, (int)i_audio_channels*/ );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- /* option 2 */
- i_pos = 0;
- i_pos = snprintf( &ppsz_options[i_options++][i_pos], VLC_MAX_MRL - i_pos, "#" );
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- p_entryStdAccess = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryStdAccess" );
- p_entryStdMuxer = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryStdMuxer" );
- p_entryStdURL = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryStdURL" );
- p_entryStdAnnounce = (GtkEntry*) lookup_widget( GTK_WIDGET(button), "entryAnnounceChannel" );
- p_entryStdTTL = (GtkSpinButton*) lookup_widget( GTK_WIDGET(button), "entryStdTTL" );
-
- p_std_access = gtk_entry_get_text(GTK_ENTRY(p_entryStdAccess));
- p_std_muxer = gtk_entry_get_text(GTK_ENTRY(p_entryStdMuxer));
- p_std_url = gtk_entry_get_text(GTK_ENTRY(p_entryStdURL));
- p_std_announce = gtk_entry_get_text(GTK_ENTRY(p_entryStdAnnounce));
- b_sap_announce = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_checkSAP));
- b_slp_announce = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p_checkSLP));
-
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "std{access=%s,", (char*)p_std_access);
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "mux=%s,", (char*)p_std_muxer);
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "dst=%s", (char*)p_std_url);
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- if (strncasecmp( (const char*)p_std_access, "udp", 3)==0)
- {
- if (b_sap_announce)
- {
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "sap=%s", (char*)p_std_announce);
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- }
- if (b_slp_announce)
- {
- i_pos += snprintf( &ppsz_options[i_options][i_pos], VLC_MAX_MRL - i_pos, "slp=%s", (char*)p_std_announce);
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
- }
- }
-
- i_std_ttl = gtk_spin_button_get_value_as_int(p_entryStdTTL);
-
- i_pos += snprintf( &ppsz_options[i_options++][i_pos], VLC_MAX_MRL - i_pos, "ttl=%d}", (int)i_std_ttl);
- if (i_pos>=VLC_MAX_MRL) ppsz_options[i_options][VLC_MAX_MRL-1] = '\0';
-
- if (user_data != NULL)
- {
- msg_Dbg(p_intf, "Adding transcoding options to playlist item." );
- }
- else
- {
- msg_Dbg(p_intf, "Adding --sout to playlist." );
- PlaylistAddItem(GTK_WIDGET(button), (gchar*) &mrl, ppsz_options, i_options);
- }
-}
-
-void onEntryStdAccessChanged(GtkEditable *editable, gpointer user_data)
-{
- intf_thread_t *p_intf = GtkGetIntf( editable );
-
- GtkCheckButton *p_checkSAP = NULL;
- GtkCheckButton *p_checkSLP = NULL;
- GtkEntry *p_entryStdAccess = NULL;
- const gchar *p_std_access = NULL;
- gboolean b_announce = FALSE;
-
- p_entryStdAccess = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryStdAccess" );
- p_checkSAP = (GtkCheckButton*) lookup_widget( GTK_WIDGET(editable), "checkSAP" );
- p_checkSLP = (GtkCheckButton*) lookup_widget( GTK_WIDGET(editable), "checkSLP" );
-
- if ( (p_std_access == NULL) || (p_checkSAP == NULL) || (p_checkSLP == NULL))
- {
- msg_Err( p_intf, "Access, SAP and SLP widgets not found." );
- return;
- }
- p_std_access = gtk_entry_get_text(GTK_ENTRY(p_entryStdAccess));
-
- b_announce = (strncasecmp( (const char*)p_std_access, "udp", 3) == 0);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p_checkSAP), b_announce);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p_checkSLP), b_announce);
-}
-
153 modules/gui/pda/pda_callbacks.h
View
@@ -1,153 +0,0 @@
-/*****************************************************************************
- * callbacks.h : pda plugin for vlc
- *****************************************************************************
- * Copyright (C) 2003 the VideoLAN team
- * $Id$
- *
- * Authors: Jean-Paul Saman <jpsaman _at_ videolan _dot_ 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#include <gtk/gtk.h>
-
-#include <vlc_common.h>
-#include <vlc_interface.h>
-
-void ReadDirectory( intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir );
-void PlaylistRebuildListStore( intf_thread_t *p_intf, GtkListStore *p_list, playlist_t * p_playlist );
-
-
-gboolean
-onPDADeleteEvent (GtkWidget *widget,
- GdkEvent *event,
- 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
-onAddFileToPlaylist (GtkButton *button,
- gpointer user_data);
-
-void
-onAddNetworkPlaylist (GtkButton *button,
- gpointer user_data);
-
-void
-onAddCameraToPlaylist (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);
-
-
-void
-NetworkBuildMRL (GtkEditable *editable,
- gpointer user_data);
-
-
-void
-onAddTranscodeToPlaylist (GtkButton *button,
- gpointer user_data);
-
-
-void
-onEntryStdAccessChanged (GtkEditable *editable,
- gpointer user_data);
-
-void
-SliderMove (GtkRange *range,
- GtkScrollType scroll,
- gpointer user_data);
-
1,608 modules/gui/pda/pda_interface.c
View
@@ -1,1608 +0,0 @@
-/*
- * 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 <gdk/gdkkeysyms.h>
-#include <gtk/gtk.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 *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 *comboNetworkProtocolType;
- GList *comboNetworkProtocolType_items = NULL;
- GtkWidget *entryNetworkProtocolType;
- GtkWidget *labelNetworkProtocol;
- GtkWidget *labelNetworkTranscode;
- GtkWidget *checkNetworkTranscode;
- GtkWidget *hbox13;
- GtkWidget *AddNetworkPlaylist;
- GtkWidget *Network;
- GtkWidget *vbox7;
- GtkWidget *scrolledV4Lwindow;
- GtkWidget *viewportV4L;
- GtkWidget *tableV4L;
- GtkWidget *labelV4lVideDevice;
- GtkWidget *labelV4LAudioDevice;
- GtkWidget *labelV4LChannel;
- GtkWidget *labelV4LNorm;
- GtkWidget *labelV4LSize;
- GtkWidget *labelV4LFrequency;
- GtkWidget *labelV4LSampleRate;
- GtkWidget *labelV4LQuality;
- GtkWidget *labelV4LTuner;
- GtkWidget *labelV4LSoundDirection;
- GtkWidget *labelV4LMJPEG;
- GtkWidget *labelV4LDecimation;
- GtkWidget *comboV4lVideoDevice;
- GList *comboV4lVideoDevice_items = NULL;
- GtkWidget *entryV4LVideoDevice;
- GtkWidget *comboV4lAudioDevice;
- GList *comboV4lAudioDevice_items = NULL;
- GtkWidget *entryV4LAudioDevice;
- GtkObject *entryV4LChannel_adj;
- GtkWidget *entryV4LChannel;
- GtkWidget *comboV4LNorm;
- GList *comboV4LNorm_items = NULL;
- GtkWidget *entryV4LNorm;
- GtkWidget *comboV4LSize;
- GList *comboV4LSize_items = NULL;
- GtkWidget *entryV4LSize;
- GtkObject *entryV4LFrequency_adj;
- GtkWidget *entryV4LFrequency;
- GtkObject *entryV4LSampleRate_adj;
- GtkWidget *entryV4LSampleRate;
- GtkObject *entryV4LQuality_adj;
- GtkWidget *entryV4LQuality;
- GtkWidget *comboV4LSoundDirection;
- GList *comboV4LSoundDirection_items = NULL;
- GtkWidget *entryV4LSoundDirection;
- GtkObject *entryV4LTuner_adj;
- GtkWidget *entryV4LTuner;
- GtkWidget *checkV4LMJPEG;
- GtkObject *entryV4LDecimation_adj;
- GtkWidget *entryV4LDecimation;
- GtkWidget *labelV4LTranscode;
- GtkWidget *checkV4LTranscode;
- GtkWidget *hbox16;
- GtkWidget *AddCameraToPlaylist;
- GtkWidget *Camera;
- GtkWidget *vbox1;
- GtkWidget *scrolledwindowTranscode;
- GtkWidget *viewport5;
- GtkWidget *tableTranscode;
- GtkWidget *labelVideoCodec;
- GtkWidget *comboVideoCodec;
- GList *comboVideoCodec_items = NULL;
- GtkWidget *entryVideoCodec;
- GtkWidget *labelVideoBitrate;
- GtkWidget *labelVideoBitrateTolerance;
- GtkWidget *labelVideoKeyInterval;
- GtkWidget *labelAudioCodec;
- GtkWidget *labelVideoDeinterlace;
- GtkWidget *labelStdAccess;
- GtkWidget *labelStdMuxer;
- GtkWidget *labelStdUrl;
- GtkWidget *labelStdTimeToLive;
- GtkObject *entryStdTTL_adj;
- GtkWidget *entryStdTTL;
- GtkWidget *comboStdURL;
- GList *comboStdURL_items = NULL;
- GtkWidget *entryStdURL;
- GtkWidget *comboStdMuxer;
- GList *comboStdMuxer_items = NULL;
- GtkWidget *entryStdMuxer;
- GtkObject *entryAudioBitrate_adj;
- GtkWidget *entryAudioBitrate;
- GtkWidget *comboAudioCodec;
- GList *comboAudioCodec_items = NULL;
- GtkWidget *entryAudioCodec;
- GtkWidget *checkVideoDeinterlace;
- GtkObject *entryVideoKeyFrameInterval_adj;
- GtkWidget *entryVideoKeyFrameInterval;
- GtkObject *entryVideoBitrateTolerance_adj;
- GtkWidget *entryVideoBitrateTolerance;
- GtkObject *entryVideoBitrate_adj;
- GtkWidget *entryVideoBitrate;
- GtkWidget *labelAudioBitrate;
- GtkWidget *comboStdAccess;
- GtkWidget *entryStdAccess;
- GtkWidget *labelSAP;
- GtkWidget *checkSAP;
- GtkWidget *checkSLP;
- GtkWidget *labelSLP_;
- GtkWidget *labelAnounceChannel;
- GtkWidget *comboAnnounceChannel;
- GtkWidget *entryAnnounceChannel;
- GtkWidget *hbox14;
- GtkWidget *AddTranscodeToPlaylist;
- GtkWidget *Transcode;
- GtkWidget *vbox4;
- GtkWidget *scrolledwindow5;
- GtkWidget *tvPlaylist;
- GtkWidget *hbox11;
- GtkWidget *UpdatePlaylist;
- GtkWidget *DeletePlaylist;
- GtkWidget *ClearPlaylist;
- GtkWidget *playlist;
- GtkWidget *vbox2;
- GtkWidget *scrolledwindowPreference;
- GtkWidget *tvPreferences;
- GtkWidget *hbox2;
- GtkWidget *PreferenceSave;
- GtkWidget *PreferenceApply;
- GtkWidget *PreferenceCancel;
- GtkWidget *preferences;
- GtkWidget *scrolledwindow3;
- GtkWidget *viewport1;
- GtkWidget *fixed2;
- GtkWidget *aboutImage;
- GtkWidget *labelDescription;
- GtkWidget *labelAuthors;
- GtkWidget *labelCopyright;
- GtkWidget *labelProgramName;
- GtkWidget *about;
- GtkTooltips *tooltips;
-
- tooltips = gtk_tooltips_new ();
-
- 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);
-
- 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 (_("00: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 (0, 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, TRUE, 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);
- gtk_range_set_update_policy (GTK_RANGE (timeSlider), GTK_UPDATE_DISCONTINUOUS);
-
- 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) "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) "ftp://");
- comboMRL_items = g_list_append (comboMRL_items, (gpointer) "http://");
- comboMRL_items = g_list_append (comboMRL_items, (gpointer) "mms://");
- 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);
- gtk_entry_set_activates_default (GTK_ENTRY (entryMRL), TRUE);
-
- 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, 65535, 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);
- gtk_entry_set_activates_default (GTK_ENTRY (entryNetworkType), TRUE);
-
- 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);
-
- comboNetworkProtocolType = gtk_combo_new ();
- g_object_set_data (G_OBJECT (GTK_COMBO (comboNetworkProtocolType)->popwin),
- "GladeParentKey", comboNetworkProtocolType);
- gtk_widget_set_name (comboNetworkProtocolType, "comboNetworkProtocolType");
- gtk_widget_show (comboNetworkProtocolType);
- gtk_table_attach (GTK_TABLE (table2), comboNetworkProtocolType, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("udp"));
- comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _(&q