Commit e5a02487 authored by Marc Ariberti's avatar Marc Ariberti

* all: enhancements of the familiar interface includes :

    - the interface adapts to the screen size/rotation
    - a playlist
    - a network tab next to te file tab inside the media tab
    - MRL-Combo behaviour changed a bit
    - apply handling in preferences
parent 28484a0e
......@@ -7,6 +7,10 @@ SOURCES_familiar = \
modules/gui/familiar/support.h \
modules/gui/familiar/callbacks.c \
modules/gui/familiar/callbacks.h \
modules/gui/familiar/network.c \
modules/gui/familiar/network.h \
modules/gui/familiar/playlist.c \
modules/gui/familiar/playlist.h \
$(NULL)
EXTRA_DIST += modules/gui/familiar/familiar.glade
......@@ -2,7 +2,7 @@
* callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: callbacks.c,v 1.21 2003/02/26 15:47:26 marcari Exp $
* $Id: callbacks.c,v 1.22 2003/03/13 15:50:17 marcari Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -26,7 +26,6 @@
*****************************************************************************/
#include <sys/types.h> /* off_t */
#include <stdlib.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include <vlc/vout.h>
......@@ -43,12 +42,12 @@
#include <gtk/gtk.h>
#include "playlist.h"
#include "callbacks.h"
#include "interface.h"
#include "support.h"
#include "familiar.h"
static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url );
static char* get_file_perm(const char *path);
/*****************************************************************************
......@@ -88,7 +87,7 @@ void * E_(__GtkGetIntf)( GtkWidget * widget )
/*****************************************************************************
* Helper functions for URL changes in Media and Preferences notebook pages.
****************************************************************************/
static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
{
intf_thread_t *p_intf = GtkGetIntf( widget );
playlist_t *p_playlist;
......@@ -96,6 +95,12 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
// 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)
......@@ -108,7 +113,8 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
playlist_Add( p_playlist, (char*)psz_url,
PLAYLIST_APPEND, PLAYLIST_END );
}
vlc_object_release( p_playlist );
vlc_object_release( p_playlist );
FamiliarRebuildCList( p_intf->p_sys->p_clistplaylist, p_playlist);
}
}
......@@ -129,7 +135,7 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
msg_Err( p_intf, "permision denied" );
}
n = scandir(".", &namelist, 0, alphasort);
if (n<0)
perror("scandir");
else
......@@ -137,24 +143,21 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
int i, ctr=0;
gchar *ppsz_text[5];
// msg_Dbg( p_intf, "updating interface" );
msg_Dbg( p_intf, "updating interface" );
gtk_clist_freeze( clist );
gtk_clist_clear( clist );
/* XXX : kludge temporaire pour yopy */
ppsz_text[0]="..";
ppsz_text[1] = get_file_perm("..");
ppsz_text[2] = "";
ppsz_text[3] = "";
ppsz_text[4] = "";
gtk_clist_insert( GTK_CLIST(clist), ctr++, ppsz_text );
gtk_clist_insert( GTK_CLIST(clist), ctr++, ppsz_text );
/* /kludge */
for (i=0; i<n; i++)
{
if (namelist[i]->d_name[0] != '.')
{
/* This is a list of strings. */
......@@ -166,11 +169,17 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
// msg_Dbg(p_intf, "(%d) file: %s permission: %s", i, ppsz_text[0], ppsz_text[1] );
gtk_clist_insert( GTK_CLIST(clist), ctr++, ppsz_text );
}
free(namelist[i]);
}
gtk_clist_thaw( clist );
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)
......@@ -273,6 +282,11 @@ on_toolbar_open_clicked (GtkButton *button,
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_clist)
{
......@@ -290,7 +304,7 @@ on_toolbar_preferences_clicked (GtkButton *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,1);
gtk_notebook_set_page(p_intf->p_sys->p_notebook,2);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
}
......@@ -382,6 +396,21 @@ on_toolbar_forward_clicked (GtkButton *button,
}
}
void
on_toolbar_playlist_clicked (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
on_toolbar_about_clicked (GtkButton *button,
......@@ -393,7 +422,7 @@ on_toolbar_about_clicked (GtkButton *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);
gtk_notebook_set_page(p_intf->p_sys->p_notebook,3);
}
gdk_window_raise( p_intf->p_sys->p_window->window );
}
......@@ -407,8 +436,9 @@ on_comboURL_entry_changed (GtkEditable *editable,
gchar * psz_url;
struct stat st;
psz_url = gtk_entry_get_text(GTK_ENTRY(editable));
if( (strncmp("file://",(const char *) psz_url,7)==0) ||
/* if( (strncmp("file://",(const char *) psz_url,7)==0) ||
(strncmp("udp://",(const char *) psz_url,6)==0) ||
(strncmp("udp4://",(const char *) psz_url,7)==0) ||
(strncmp("udp6://",(const char *) psz_url,7)==0) ||
......@@ -418,16 +448,18 @@ on_comboURL_entry_changed (GtkEditable *editable,
(strncmp("rtp6://",(const char *) psz_url,7)==0) ||
(strncmp("rtpstream://",(const char *) psz_url,12)==0) ||
(strncmp("ftp://",(const char *) psz_url,6)==0) ||
(strncmp("mms://",(const char *) psz_url,6)==0) ||
(strncmp("http://",(const char *) psz_url,7)==0) )
{
MediaURLOpenChanged(GTK_WIDGET(editable), psz_url);
}
else if (lstat((char*)psz_url, &st)==0)
else */
if (stat((char*)psz_url, &st)==0)
{
if (S_ISDIR(st.st_mode))
{
if (!p_intf->p_sys->p_clist)
msg_Err(p_intf, "p_clist pointer invalid!!" );
if (!p_intf->p_sys->p_clist)
msg_Err(p_intf, "p_clist pointer invalid!!" );
ReadDirectory(p_intf->p_sys->p_clist, psz_url);
}
else if( (S_ISLNK(st.st_mode)) || (S_ISCHR(st.st_mode)) ||
......@@ -436,7 +468,7 @@ on_comboURL_entry_changed (GtkEditable *editable,
{
MediaURLOpenChanged(GTK_WIDGET(editable), psz_url);
}
}
}
}
......@@ -500,8 +532,6 @@ void
on_cbautoplay_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( GTK_WIDGET(togglebutton) );
p_intf->p_sys->b_autoplayfile = !p_intf->p_sys->b_autoplayfile;
}
......@@ -545,3 +575,35 @@ FamiliarSliderPress (GtkWidget *widget,
return FALSE;
}
void
FamiliarMrlGo (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
MediaURLOpenChanged( GTK_WIDGET( button ),
gtk_entry_get_text(p_intf->p_sys->p_mrlentry ) );
}
void
FamiliarPreferencesApply (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( GTK_WIDGET(button) );
GtkToggleButton * p_autopl_button = GTK_GET( TOGGLE_BUTTON, "cbautoplay" );
if (gtk_toggle_button_get_active(p_autopl_button))
{
p_intf->p_sys->b_autoplayfile = 1;
}
else
{
p_intf->p_sys->b_autoplayfile = 0;
}
}
......@@ -2,7 +2,7 @@
* callbacks.h : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: callbacks.h,v 1.8 2003/01/03 20:55:00 jpsaman Exp $
* $Id: callbacks.h,v 1.9 2003/03/13 15:50:17 marcari Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -23,9 +23,13 @@
#include <gtk/gtk.h>
#include "network.h"
#include "playlist.h"
gboolean FamiliarExit ( GtkWidget *, gpointer );
void ReadDirectory(GtkCList *clist, char *psz_dir);
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url );
void
on_toolbar_open_clicked (GtkButton *button,
......@@ -95,3 +99,18 @@ gboolean
FamiliarSliderPress (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
FamiliarMrlGo (GtkButton *button,
gpointer user_data);
void
on_toolbar_playlist_clicked (GtkButton *button,
gpointer user_data);
void
FamiliarPreferencesApply (GtkButton *button,
gpointer user_data);
......@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: familiar.c,v 1.30 2003/02/26 15:44:22 marcari Exp $
* $Id: familiar.c,v 1.31 2003/03/13 15:50:17 marcari Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
......@@ -174,6 +174,9 @@ static void Run( intf_thread_t *p_intf )
add_pixmap_directory("/usr/local/share/pixmaps/vlc");
/* Path for pixmaps under linupy */
add_pixmap_directory("/usr/local/share/pixmaps/vlc");
p_intf->p_sys->p_window = create_familiar();
if (p_intf->p_sys->p_window == NULL)
{
......@@ -188,6 +191,8 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
p_intf->p_sys->p_mediabook = GTK_NOTEBOOK( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "mediabook" ) );
/* Get the slider object */
p_intf->p_sys->p_slider = GTK_HSCALE( gtk_object_get_data(
......@@ -213,16 +218,27 @@ static void Run( intf_thread_t *p_intf )
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));
/* the playlist object */
p_intf->p_sys->p_clistplaylist = GTK_CLIST( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "clistplaylist" ) );
p_intf->p_sys->p_mrlentry = GTK_ENTRY( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "mrl_entry" ) );
/* 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 );
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
"p_intf", p_intf );
/* Show the control window */
gtk_widget_show( p_intf->p_sys->p_window );
ReadDirectory(p_intf->p_sys->p_clist, ".");
/* update the playlist */
FamiliarRebuildCList( p_intf->p_sys->p_clistplaylist,
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ));
#ifdef NEED_GTK_MAIN
msg_Dbg( p_intf, "Manage GTK keyboard events using threads" );
while( !p_intf->b_die )
......@@ -330,8 +346,19 @@ static int Manage( intf_thread_t *p_intf )
/* New input or stream map change */
if( p_input->stream.b_changed )
{
playlist_t *p_playlist;
E_(GtkModeManage)( p_intf );
p_intf->p_sys->b_playing = 1;
/* update playlist interface */
p_playlist = (playlist_t *) vlc_object_find(
p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if (p_playlist != NULL)
{
FamiliarRebuildCList( p_intf->p_sys->p_clistplaylist,
p_playlist );
}
}
/* Manage the slider */
......
......@@ -18,8 +18,6 @@
<widget>
<class>GtkWindow</class>
<name>familiar</name>
<width>240</width>
<height>320</height>
<signal>
<name>delete_event</name>
<handler>on_familiar_delete_event</handler>
......@@ -42,8 +40,8 @@
<widget>
<class>GtkToolbar</class>
<name>toolbar</name>
<width>112</width>
<height>16</height>
<width>240</width>
<height>12</height>
<orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
<type>GTK_TOOLBAR_ICONS</type>
<space_size>5</space_size>
......@@ -51,9 +49,9 @@
<relief>GTK_RELIEF_NORMAL</relief>
<tooltips>True</tooltips>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<padding>5</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
......@@ -66,10 +64,23 @@
<handler>on_toolbar_open_clicked</handler>
<last_modification_time>Wed, 24 Jul 2002 18:28:31 GMT</last_modification_time>
</signal>
<label>Open</label>
<label></label>
<icon>familiar-openb16x16.xpm</icon>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_playlist</name>
<signal>
<name>clicked</name>
<handler>on_toolbar_playlist_clicked</handler>
<last_modification_time>Wed, 05 Mar 2003 22:04:46 GMT</last_modification_time>
</signal>
<label></label>
<icon>familiar-playlistb16x16.xpm</icon>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
......@@ -215,8 +226,8 @@
<page>6.25</page>
<page_size>0</page_size>
<child>
<padding>0</padding>
<expand>True</expand>
<padding>4</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
......@@ -236,56 +247,526 @@
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkFixed</class>
<name>fixedMedia</name>
<class>GtkVBox</class>
<name>vbox1</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkLabel</class>
<name>labelUrl</name>
<x>4</x>
<y>8</y>
<width>38</width>
<height>18</height>
<label>URL:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<class>GtkHBox</class>
<name>hbox1</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkButton</class>
<name>buttonMrlGo</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>FamiliarMrlGo</handler>
<last_modification_time>Wed, 05 Mar 2003 21:47:31 GMT</last_modification_time>
</signal>
<label>Add</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>labelUrl</name>
<label>MRL :</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>mrl_combo</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items>file://
ftp://
http://
udp://@:1234
udp6://@:1234
rtp://
rtp6://
</items>
<child>
<padding>3</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>mrl_entry</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>on_comboURL-entry_changed</handler>
<last_modification_time>Sun, 09 Feb 2003 13:32:46 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text>file://</text>
</widget>
</widget>
</widget>
<widget>
<class>GtkNotebook</class>
<name>mediabook</name>
<can_focus>True</can_focus>
<show_tabs>True</show_tabs>
<show_border>True</show_border>
<tab_pos>GTK_POS_TOP</tab_pos>
<scrollable>False</scrollable>
<tab_hborder>2</tab_hborder>
<tab_vborder>2</tab_vborder>
<popup_enable>False</popup_enable>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow4</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkViewport</class>
<name>viewport2</name>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkCList</class>
<name>clistmedia</name>
<can_focus>True</can_focus>
<signal>
<name>select_row</name>
<handler>on_clistmedia_select_row</handler>
<last_modification_time>Sun, 09 Feb 2003 13:33:18 GMT</last_modification_time>
</signal>
<signal>
<name>click_column</name>
<handler>on_clistmedia_click_column</handler>
<last_modification_time>Sun, 09 Feb 2003 13:33:22 GMT</last_modification_time>
</signal>
<columns>2</columns>
<column_widths>129,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labelname</name>
<label>Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labeltype</name>
<label>Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>Notebook:tab</child_name>
<name>label13</name>
<label>File</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox3</name>
<homogeneous>False</homogeneous>
<spacing>2</spacing>
<widget>
<class>GtkRadioButton</class>
<name>network_multicast</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>on_network_multicast_toggled</handler>
<last_modification_time>Sat, 01 Mar 2003 21:44:26 GMT</last_modification_time>
</signal>
<label>UDP/RTP (Adress when Multicast)</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>network</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkTable</class>
<name>table1</name>
<rows>2</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>5</column_spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label21</name>
<label>Address</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label22</name>
<label>Port</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkSpinButton</class>
<name>network_multicast_port</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>on_network_multicast_port_changed</handler>
<last_modification_time>Sat, 01 Mar 2003 21:45:26 GMT</last_modification_time>
</signal>
<climb_rate>1</climb_rate>
<digits>0</digits>
<numeric>False</numeric>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>1234</value>
<lower>1</lower>
<upper>65536</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>combo2</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>network_multicast_address</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>on_network_multicast_address_changed</handler>
<last_modification_time>Sat, 01 Mar 2003 21:45:32 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator10</name>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox9</name>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkRadioButton</class>
<name>network_http</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>on_network_http_toggled</handler>
<last_modification_time>Sat, 01 Mar 2003 21:45:55 GMT</last_modification_time>
</signal>
<label>HTTP</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>network</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>network_ftp</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>on_network_ftp_toggled</handler>
<last_modification_time>Sat, 01 Mar 2003 21:46:07 GMT</last_modification_time>
</signal>
<label>FTP</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>network</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>network_mms</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>on_network_mms_toggled</handler>
<last_modification_time>Sat, 01 Mar 2003 21:46:17 GMT</last_modification_time>
</signal>
<label>MMS</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>network</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator11</name>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>Placeholder</class>
</widget>
<widget>
<class>Placeholder</class>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>Notebook:tab</child_name>
<name>label20</name>
<label>Network</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>Notebook:tab</child_name>
<name>media2</name>
<label>Media</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox4</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow1</name>
<x>0</x>
<y>32</y>
<width>240</width>
<height>208</height>
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<name>scrolledwindow5</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCList</class>
<name>clistmedia</name>
<name>clistplaylist</name>
<can_focus>True</can_focus>
<signal>
<name>select_row</name>
<handler>on_clistmedia_select_row</handler>
<last_modification_time>Sun, 18 Aug 2002 19:40:44 GMT</last_modification_time>
</signal>
<signal>
<name>click_column</name>
<handler>on_clistmedia_click_column</handler>
<last_modification_time>Sun, 18 Aug 2002 19:41:06 GMT</last_modification_time>
<name>event</name>
<handler>FamiliarPlaylistEvent</handler>
<last_modification_time>Tue, 04 Mar 2003 21:47:16 GMT</last_modification_time>
</signal>
<columns>5</columns>
<column_widths>123,80,80,80,80</column_widths>
<columns>2</columns>
<column_widths>140,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
......@@ -293,48 +774,9 @@
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labelname</name>
<label>Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labeltype</name>
<label>Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labelsize</name>
<label>Size</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labeluid</name>
<label>User</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<name>label25</name>
<label>MRL</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
......@@ -345,9 +787,9 @@
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>labelgid</name>
<label>Group</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<name>label26</name>
<label>Time</label>
<justify>GTK_JUSTIFY_RIGHT</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
......@@ -358,40 +800,68 @@
</widget>
<widget>
<class>GtkCombo</class>
<name>comboURL</name>
<x>40</x>
<y>4</y>
<width>185</width>
<height>24</height>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items>file://
ftp://
http://
udp://:1234
udp6://:1234
rtp://:1234
rtp6://:1234
</items>
<class>GtkHBox</class>
<name>hbox11</name>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>comboURL-entry</name>
<class>GtkButton</class>
<name>update_playlist</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>on_comboURL-entry_changed</handler>
<last_modification_time>Thu, 01 Aug 2002 19:37:06 GMT</last_modification_time>
<name>clicked</name>
<handler>FamiliarPlaylistUpdate</handler>
<last_modification_time>Wed, 05 Mar 2003 16:52:19 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text>file://</text>
<label>Update</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>playlist_del</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>FamiliarPlaylistDel</handler>
<last_modification_time>Wed, 05 Mar 2003 16:44:52 GMT</last_modification_time>
</signal>
<label> Del </label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>5</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>playlist_clear</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>FamiliarPlaylistClear</handler>
<last_modification_time>Wed, 05 Mar 2003 16:26:29 GMT</last_modification_time>
</signal>
<label> Clear </label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>5</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
......@@ -399,8 +869,8 @@ rtp6://:1234
<widget>
<class>GtkLabel</class>
<child_name>Notebook:tab</child_name>
<name>media</name>
<label>Media</label>
<name>playlist</name>
<label>Playlist</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
......@@ -410,61 +880,94 @@ rtp6://:1234
</widget>
<widget>
<class>GtkFixed</class>
<name>fixedPreferences</name>
<widget>
<class>GtkButton</class>
<name>buttonSave</name>
<x>8</x>
<y>216</y>
<width>54</width>
<height>24</height>
<can_focus>True</can_focus>
<label>Save</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>buttonApply</name>
<x>64</x>
<y>216</y>
<width>54</width>
<height>24</height>
<can_focus>True</can_focus>
<label>Apply</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>buttonCancel</name>
<x>176</x>
<y>216</y>
<width>54</width>
<height>24</height>
<can_focus>True</can_focus>
<label>Cancel</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<class>GtkVBox</class>
<name>vbox2</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkCheckButton</class>
<name>cbautoplay</name>
<x>8</x>
<y>8</y>
<width>216</width>
<height>24</height>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>on_cbautoplay_toggled</handler>
<last_modification_time>Sun, 18 Aug 2002 20:00:52 GMT</last_modification_time>
<last_modification_time>Sun, 09 Feb 2003 22:37:17 GMT</last_modification_time>
</signal>
<label>Automatically play file.</label>
<label>Automatically play file</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>Placeholder</class>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox2</name>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>False</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkButton</class>
<name>buttonSave</name>
<can_focus>True</can_focus>
<label> Save </label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>buttonApply</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>FamiliarPreferencesApply</handler>
<last_modification_time>Thu, 13 Mar 2003 15:03:49 GMT</last_modification_time>
</signal>
<label> Apply </label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>Placeholder</class>
</widget>
<widget>
<class>GtkButton</class>
<name>buttonCancel</name>
<can_focus>True</can_focus>
<label> Cancel </label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
<pack>GTK_PACK_END</pack>
</child>
</widget>
</widget>
</widget>
......@@ -482,86 +985,117 @@ rtp6://:1234
</widget>
<widget>
<class>GtkFixed</class>
<name>fixedAbout</name>
<class>GtkScrolledWindow</class>
<name>scrolledwindow3</name>
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkPixmap</class>
<name>logo</name>
<x>8</x>
<y>0</y>
<width>50</width>
<height>50</height>
<filename>vlc32x32.xpm</filename>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<build_insensitive>True</build_insensitive>
</widget>
<class>GtkViewport</class>
<name>viewport1</name>
<shadow_type>GTK_SHADOW_NONE</shadow_type>
<widget>
<class>GtkLabel</class>
<name>labelCopyright</name>
<x>16</x>
<y>56</y>
<width>200</width>
<height>18</height>
<label>(c) 1996-2003 the VideoLAN team</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkFixed</class>
<name>fixed2</name>
<widget>
<class>GtkLabel</class>
<name>labelAuthors</name>
<x>16</x>
<y>80</y>
<width>200</width>
<height>40</height>
<label>Authors: The VideoLAN Team, http://www.videolan.org</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>True</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkPixmap</class>
<name>pixmap2</name>
<x>8</x>
<y>0</y>
<width>50</width>
<height>50</height>
<filename>vlc32x32.xpm</filename>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<build_insensitive>True</build_insensitive>
</widget>
<widget>
<class>GtkLabel</class>
<name>labelAbout</name>
<x>16</x>
<y>128</y>
<width>200</width>
<height>70</height>
<label>The VideoLAN Client is a MPEG, MPEG 2, MP3, DivX player, that accepts input from local or network sources.</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>True</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<name>label8</name>
<x>16</x>
<y>56</y>
<width>200</width>
<height>18</height>
<label>(c) 1996-2003 the VideoLAN team</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<name>labelVlc</name>
<x>64</x>
<y>8</y>
<width>120</width>
<height>40</height>
<label>VLC media player</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>True</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<widget>
<class>GtkLabel</class>
<name>label9</name>
<x>16</x>
<y>80</y>
<width>200</width>
<height>40</height>
<label>Authors: The VideoLAN Team, http://www.videolan.org</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>True</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<name>label11</name>
<x>64</x>
<y>8</y>
<width>120</width>
<height>40</height>
<label>VLC media player</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>True</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<name>label27</name>
<x>16</x>
<y>200</y>
<width>208</width>
<height>16</height>
<label>http://www.videolan.org</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<name>label10</name>
<x>16</x>
<y>128</y>
<width>200</width>
<height>70</height>
<label>The VideoLAN Client is a MPEG, MPEG 2, MP3, DivX player, that accepts input from local or network sources.</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>True</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
</widget>
......
......@@ -2,7 +2,7 @@
* familiar.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: familiar.h,v 1.12 2003/01/04 13:30:02 jpsaman Exp $
* $Id: familiar.h,v 1.13 2003/03/13 15:50:17 marcari Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -32,10 +32,13 @@ struct intf_sys_t
module_t * p_gtk_main;
/* windows and widgets */
GtkWidget * p_window; /* main window */
GtkWidget * p_window; /* main window */
GtkEntry * p_mrlentry;
GtkNotebook * p_notebook;
GtkNotebook * p_mediabook;
GtkHScale * p_slider;
GtkCList * p_clist;
GtkCList * p_clistplaylist;
/* slider */
GtkLabel * p_slider_label;
......@@ -58,5 +61,9 @@ struct intf_sys_t
/*****************************************************************************
* 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 ) E_(__GtkGetIntf)( GTK_WIDGET( widget ) )
void * E_(__GtkGetIntf)( GtkWidget * );
......@@ -22,6 +22,7 @@ create_familiar (void)
GtkWidget *toolbar;
GtkWidget *tmp_toolbar_icon;
GtkWidget *toolbar_open;
GtkWidget *toolbar_playlist;
GtkWidget *toolbar_preferences;
GtkWidget *toolbar_rewind;
GtkWidget *toolbar_pause;
......@@ -32,37 +33,69 @@ create_familiar (void)
GtkWidget *slider_label;
GtkWidget *slider;
GtkWidget *notebook;
GtkWidget *fixedMedia;
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *buttonMrlGo;
GtkWidget *labelUrl;
GtkWidget *scrolledwindow1;
GtkWidget *mrl_combo;
GList *mrl_combo_items = NULL;
GtkWidget *mrl_entry;
GtkWidget *mediabook;
GtkWidget *scrolledwindow4;
GtkWidget *viewport2;
GtkWidget *clistmedia;
GtkWidget *labelname;
GtkWidget *labeltype;
GtkWidget *labelsize;
GtkWidget *labeluid;
GtkWidget *labelgid;
GtkWidget *comboURL;
GList *comboURL_items = NULL;
GtkWidget *comboURL_entry;
GtkWidget *media;
GtkWidget *fixedPreferences;
GtkWidget *label13;
GtkWidget *vbox3;
GSList *network_group = NULL;
GtkWidget *network_multicast;
GtkWidget *table1;
GtkWidget *label21;
GtkWidget *label22;
GtkObject *network_multicast_port_adj;
GtkWidget *network_multicast_port;
GtkWidget *combo2;
GtkWidget *network_multicast_address;
GtkWidget *hseparator10;
GtkWidget *hbox9;
GtkWidget *network_http;
GtkWidget *network_ftp;
GtkWidget *network_mms;
GtkWidget *hseparator11;
GtkWidget *label20;
GtkWidget *media2;
GtkWidget *vbox4;
GtkWidget *scrolledwindow5;
GtkWidget *clistplaylist;
GtkWidget *label25;
GtkWidget *label26;
GtkWidget *hbox11;
GtkWidget *update_playlist;
GtkWidget *playlist_del;
GtkWidget *playlist_clear;
GtkWidget *playlist;
GtkWidget *vbox2;
GtkWidget *cbautoplay;
GtkWidget *hbox2;
GtkWidget *buttonSave;
GtkWidget *buttonApply;
GtkWidget *buttonCancel;
GtkWidget *cbautoplay;
GtkWidget *preferences;
GtkWidget *fixedAbout;
GtkWidget *logo;
GtkWidget *labelCopyright;
GtkWidget *labelAuthors;
GtkWidget *labelAbout;
GtkWidget *labelVlc;
GtkWidget *scrolledwindow3;
GtkWidget *viewport1;
GtkWidget *fixed2;
GtkWidget *pixmap2;
GtkWidget *label8;
GtkWidget *label9;
GtkWidget *label11;
GtkWidget *label27;
GtkWidget *label10;
GtkWidget *about;
familiar = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_name (familiar, "familiar");
gtk_object_set_data (GTK_OBJECT (familiar), "familiar", familiar);
gtk_widget_set_usize (familiar, 240, 320);
gtk_window_set_title (GTK_WINDOW (familiar), _("VLC media player"));
gtk_window_set_policy (GTK_WINDOW (familiar), TRUE, TRUE, TRUE);
......@@ -80,14 +113,14 @@ create_familiar (void)
gtk_object_set_data_full (GTK_OBJECT (familiar), "toolbar", toolbar,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, TRUE, TRUE, 0);
gtk_widget_set_usize (toolbar, 112, 16);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 5);
gtk_widget_set_usize (toolbar, 240, 12);
tmp_toolbar_icon = create_pixmap (familiar, "familiar-openb16x16.xpm");
toolbar_open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("Open"),
"",
_("Open file"), NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_widget_set_name (toolbar_open, "toolbar_open");
......@@ -96,6 +129,19 @@ create_familiar (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_open);
tmp_toolbar_icon = create_pixmap (familiar, "familiar-playlistb16x16.xpm");
toolbar_playlist = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
"",
NULL, NULL,
tmp_toolbar_icon, NULL, NULL);
gtk_widget_set_name (toolbar_playlist, "toolbar_playlist");
gtk_widget_ref (toolbar_playlist);
gtk_object_set_data_full (GTK_OBJECT (familiar), "toolbar_playlist", toolbar_playlist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_playlist);
tmp_toolbar_icon = create_pixmap (familiar, "familiar-preferencesb16x16.xpm");
toolbar_preferences = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
......@@ -207,7 +253,7 @@ create_familiar (void)
gtk_object_set_data_full (GTK_OBJECT (familiar), "slider", slider,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (slider);
gtk_box_pack_start (GTK_BOX (vbox), slider, TRUE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), slider, FALSE, FALSE, 4);
gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
gtk_scale_set_value_pos (GTK_SCALE (slider), GTK_POS_RIGHT);
gtk_scale_set_digits (GTK_SCALE (slider), 3);
......@@ -218,48 +264,99 @@ create_familiar (void)
gtk_object_set_data_full (GTK_OBJECT (familiar), "notebook", notebook,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (notebook);
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox1, "vbox1");
gtk_widget_ref (vbox1);
gtk_object_set_data_full (GTK_OBJECT (familiar), "vbox1", vbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
fixedMedia = gtk_fixed_new ();
gtk_widget_set_name (fixedMedia, "fixedMedia");
gtk_widget_ref (fixedMedia);
gtk_object_set_data_full (GTK_OBJECT (familiar), "fixedMedia", fixedMedia,
hbox1 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox1, "hbox1");
gtk_widget_ref (hbox1);
gtk_object_set_data_full (GTK_OBJECT (familiar), "hbox1", hbox1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (fixedMedia);
gtk_container_add (GTK_CONTAINER (notebook), fixedMedia);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, TRUE, 0);
labelUrl = gtk_label_new (_("URL:"));
buttonMrlGo = gtk_button_new_with_label (_("Add"));
gtk_widget_set_name (buttonMrlGo, "buttonMrlGo");
gtk_widget_ref (buttonMrlGo);
gtk_object_set_data_full (GTK_OBJECT (familiar), "buttonMrlGo", buttonMrlGo,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (buttonMrlGo);
gtk_box_pack_start (GTK_BOX (hbox1), buttonMrlGo, FALSE, FALSE, 0);
labelUrl = gtk_label_new (_("MRL :"));
gtk_widget_set_name (labelUrl, "labelUrl");
gtk_widget_ref (labelUrl);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelUrl", labelUrl,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelUrl);
gtk_fixed_put (GTK_FIXED (fixedMedia), labelUrl, 4, 8);
gtk_widget_set_uposition (labelUrl, 4, 8);
gtk_widget_set_usize (labelUrl, 38, 18);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");
gtk_widget_ref (scrolledwindow1);
gtk_object_set_data_full (GTK_OBJECT (familiar), "scrolledwindow1", scrolledwindow1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow1);
gtk_fixed_put (GTK_FIXED (fixedMedia), scrolledwindow1, 0, 32);
gtk_widget_set_uposition (scrolledwindow1, 0, 32);
gtk_widget_set_usize (scrolledwindow1, 240, 208);
clistmedia = gtk_clist_new (5);
gtk_box_pack_start (GTK_BOX (hbox1), labelUrl, FALSE, FALSE, 2);
mrl_combo = gtk_combo_new ();
gtk_widget_set_name (mrl_combo, "mrl_combo");
gtk_widget_ref (mrl_combo);
gtk_object_set_data_full (GTK_OBJECT (familiar), "mrl_combo", mrl_combo,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (mrl_combo);
gtk_box_pack_start (GTK_BOX (hbox1), mrl_combo, TRUE, TRUE, 3);
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "file://");
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "ftp://");
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "http://");
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "udp://@:1234");
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "udp6://@:1234");
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "rtp://");
mrl_combo_items = g_list_append (mrl_combo_items, (gpointer) "rtp6://");
gtk_combo_set_popdown_strings (GTK_COMBO (mrl_combo), mrl_combo_items);
g_list_free (mrl_combo_items);
mrl_entry = GTK_COMBO (mrl_combo)->entry;
gtk_widget_set_name (mrl_entry, "mrl_entry");
gtk_widget_ref (mrl_entry);
gtk_object_set_data_full (GTK_OBJECT (familiar), "mrl_entry", mrl_entry,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (mrl_entry);
gtk_entry_set_text (GTK_ENTRY (mrl_entry), "file://");
mediabook = gtk_notebook_new ();
gtk_widget_set_name (mediabook, "mediabook");
gtk_widget_ref (mediabook);
gtk_object_set_data_full (GTK_OBJECT (familiar), "mediabook", mediabook,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (mediabook);
gtk_box_pack_start (GTK_BOX (vbox1), mediabook, TRUE, TRUE, 0);
scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow4, "scrolledwindow4");
gtk_widget_ref (scrolledwindow4);
gtk_object_set_data_full (GTK_OBJECT (familiar), "scrolledwindow4", scrolledwindow4,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow4);
gtk_container_add (GTK_CONTAINER (mediabook), scrolledwindow4);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
viewport2 = gtk_viewport_new (NULL, NULL);
gtk_widget_set_name (viewport2, "viewport2");
gtk_widget_ref (viewport2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "viewport2", viewport2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (viewport2);
gtk_container_add (GTK_CONTAINER (scrolledwindow4), viewport2);
clistmedia = gtk_clist_new (2);
gtk_widget_set_name (clistmedia, "clistmedia");
gtk_widget_ref (clistmedia);
gtk_object_set_data_full (GTK_OBJECT (familiar), "clistmedia", clistmedia,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (clistmedia);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), clistmedia);
gtk_clist_set_column_width (GTK_CLIST (clistmedia), 0, 123);
gtk_container_add (GTK_CONTAINER (viewport2), clistmedia);
gtk_clist_set_column_width (GTK_CLIST (clistmedia), 0, 129);
gtk_clist_set_column_width (GTK_CLIST (clistmedia), 1, 80);
gtk_clist_set_column_width (GTK_CLIST (clistmedia), 2, 80);
gtk_clist_set_column_width (GTK_CLIST (clistmedia), 3, 80);
gtk_clist_set_column_width (GTK_CLIST (clistmedia), 4, 80);
gtk_clist_column_titles_show (GTK_CLIST (clistmedia));
labelname = gtk_label_new (_("Name"));
......@@ -278,113 +375,294 @@ create_familiar (void)
gtk_widget_show (labeltype);
gtk_clist_set_column_widget (GTK_CLIST (clistmedia), 1, labeltype);
labelsize = gtk_label_new (_("Size"));
gtk_widget_set_name (labelsize, "labelsize");
gtk_widget_ref (labelsize);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelsize", labelsize,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelsize);
gtk_clist_set_column_widget (GTK_CLIST (clistmedia), 2, labelsize);
labeluid = gtk_label_new (_("User"));
gtk_widget_set_name (labeluid, "labeluid");
gtk_widget_ref (labeluid);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labeluid", labeluid,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labeluid);
gtk_clist_set_column_widget (GTK_CLIST (clistmedia), 3, labeluid);
labelgid = gtk_label_new (_("Group"));
gtk_widget_set_name (labelgid, "labelgid");
gtk_widget_ref (labelgid);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelgid", labelgid,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelgid);
gtk_clist_set_column_widget (GTK_CLIST (clistmedia), 4, labelgid);
comboURL = gtk_combo_new ();
gtk_widget_set_name (comboURL, "comboURL");
gtk_widget_ref (comboURL);
gtk_object_set_data_full (GTK_OBJECT (familiar), "comboURL", comboURL,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (comboURL);
gtk_fixed_put (GTK_FIXED (fixedMedia), comboURL, 40, 4);
gtk_widget_set_uposition (comboURL, 40, 4);
gtk_widget_set_usize (comboURL, 185, 24);
comboURL_items = g_list_append (comboURL_items, (gpointer) "file://");
comboURL_items = g_list_append (comboURL_items, (gpointer) "ftp://");
comboURL_items = g_list_append (comboURL_items, (gpointer) "http://");
comboURL_items = g_list_append (comboURL_items, (gpointer) "udp://:1234");
comboURL_items = g_list_append (comboURL_items, (gpointer) "udp6://:1234");
comboURL_items = g_list_append (comboURL_items, (gpointer) "rtp://:1234");
comboURL_items = g_list_append (comboURL_items, (gpointer) "rtp6://:1234");
gtk_combo_set_popdown_strings (GTK_COMBO (comboURL), comboURL_items);
g_list_free (comboURL_items);
comboURL_entry = GTK_COMBO (comboURL)->entry;
gtk_widget_set_name (comboURL_entry, "comboURL_entry");
gtk_widget_ref (comboURL_entry);
gtk_object_set_data_full (GTK_OBJECT (familiar), "comboURL_entry", comboURL_entry,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (comboURL_entry);
gtk_entry_set_text (GTK_ENTRY (comboURL_entry), "file://");
media = gtk_label_new (_("Media"));
gtk_widget_set_name (media, "media");
gtk_widget_ref (media);
gtk_object_set_data_full (GTK_OBJECT (familiar), "media", media,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (media);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), media);
fixedPreferences = gtk_fixed_new ();
gtk_widget_set_name (fixedPreferences, "fixedPreferences");
gtk_widget_ref (fixedPreferences);
gtk_object_set_data_full (GTK_OBJECT (familiar), "fixedPreferences", fixedPreferences,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (fixedPreferences);
gtk_container_add (GTK_CONTAINER (notebook), fixedPreferences);
buttonSave = gtk_button_new_with_label (_("Save"));
label13 = gtk_label_new (_("File"));
gtk_widget_set_name (label13, "label13");
gtk_widget_ref (label13);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label13", label13,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label13);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (mediabook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mediabook), 0), label13);
vbox3 = gtk_vbox_new (FALSE, 2);
gtk_widget_set_name (vbox3, "vbox3");
gtk_widget_ref (vbox3);
gtk_object_set_data_full (GTK_OBJECT (familiar), "vbox3", vbox3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox3);
gtk_container_add (GTK_CONTAINER (mediabook), vbox3);
network_multicast = gtk_radio_button_new_with_label (network_group, _("UDP/RTP (Adress when Multicast)"));
network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_multicast));
gtk_widget_set_name (network_multicast, "network_multicast");
gtk_widget_ref (network_multicast);
gtk_object_set_data_full (GTK_OBJECT (familiar), "network_multicast", network_multicast,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (network_multicast);
gtk_box_pack_start (GTK_BOX (vbox3), network_multicast, FALSE, FALSE, 0);
table1 = gtk_table_new (2, 2, FALSE);
gtk_widget_set_name (table1, "table1");
gtk_widget_ref (table1);
gtk_object_set_data_full (GTK_OBJECT (familiar), "table1", table1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (table1);
gtk_box_pack_start (GTK_BOX (vbox3), table1, FALSE, TRUE, 0);
gtk_table_set_col_spacings (GTK_TABLE (table1), 5);
label21 = gtk_label_new (_("Address"));
gtk_widget_set_name (label21, "label21");
gtk_widget_ref (label21);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label21", label21,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label21);
gtk_table_attach (GTK_TABLE (table1), label21, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label21), 0, 0.5);
label22 = gtk_label_new (_("Port"));
gtk_widget_set_name (label22, "label22");
gtk_widget_ref (label22);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label22", label22,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label22);
gtk_table_attach (GTK_TABLE (table1), label22, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label22), 0, 0.5);
network_multicast_port_adj = gtk_adjustment_new (1234, 1, 65536, 1, 10, 10);
network_multicast_port = gtk_spin_button_new (GTK_ADJUSTMENT (network_multicast_port_adj), 1, 0);
gtk_widget_set_name (network_multicast_port, "network_multicast_port");
gtk_widget_ref (network_multicast_port);
gtk_object_set_data_full (GTK_OBJECT (familiar), "network_multicast_port", network_multicast_port,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (network_multicast_port);
gtk_table_attach (GTK_TABLE (table1), network_multicast_port, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
combo2 = gtk_combo_new ();
gtk_widget_set_name (combo2, "combo2");
gtk_widget_ref (combo2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "combo2", combo2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo2);
gtk_table_attach (GTK_TABLE (table1), combo2, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
network_multicast_address = GTK_COMBO (combo2)->entry;
gtk_widget_set_name (network_multicast_address, "network_multicast_address");
gtk_widget_ref (network_multicast_address);
gtk_object_set_data_full (GTK_OBJECT (familiar), "network_multicast_address", network_multicast_address,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (network_multicast_address);
hseparator10 = gtk_hseparator_new ();
gtk_widget_set_name (hseparator10, "hseparator10");
gtk_widget_ref (hseparator10);
gtk_object_set_data_full (GTK_OBJECT (familiar), "hseparator10", hseparator10,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hseparator10);
gtk_box_pack_start (GTK_BOX (vbox3), hseparator10, FALSE, TRUE, 0);
hbox9 = gtk_hbox_new (TRUE, 0);
gtk_widget_set_name (hbox9, "hbox9");
gtk_widget_ref (hbox9);
gtk_object_set_data_full (GTK_OBJECT (familiar), "hbox9", hbox9,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox9);
gtk_box_pack_start (GTK_BOX (vbox3), hbox9, FALSE, TRUE, 0);
network_http = gtk_radio_button_new_with_label (network_group, _("HTTP"));
network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http));
gtk_widget_set_name (network_http, "network_http");
gtk_widget_ref (network_http);
gtk_object_set_data_full (GTK_OBJECT (familiar), "network_http", network_http,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (network_http);
gtk_box_pack_start (GTK_BOX (hbox9), network_http, FALSE, TRUE, 0);
gtk_widget_set_sensitive (network_http, FALSE);
network_ftp = gtk_radio_button_new_with_label (network_group, _("FTP"));
network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_ftp));
gtk_widget_set_name (network_ftp, "network_ftp");
gtk_widget_ref (network_ftp);
gtk_object_set_data_full (GTK_OBJECT (familiar), "network_ftp", network_ftp,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (network_ftp);
gtk_box_pack_start (GTK_BOX (hbox9), network_ftp, FALSE, TRUE, 0);
gtk_widget_set_sensitive (network_ftp, FALSE);
network_mms = gtk_radio_button_new_with_label (network_group, _("MMS"));
network_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_mms));
gtk_widget_set_name (network_mms, "network_mms");
gtk_widget_ref (network_mms);
gtk_object_set_data_full (GTK_OBJECT (familiar), "network_mms", network_mms,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (network_mms);
gtk_box_pack_start (GTK_BOX (hbox9), network_mms, FALSE, TRUE, 0);
gtk_widget_set_sensitive (network_mms, FALSE);
hseparator11 = gtk_hseparator_new ();
gtk_widget_set_name (hseparator11, "hseparator11");
gtk_widget_ref (hseparator11);
gtk_object_set_data_full (GTK_OBJECT (familiar), "hseparator11", hseparator11,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hseparator11);
gtk_box_pack_start (GTK_BOX (vbox3), hseparator11, TRUE, TRUE, 0);
label20 = gtk_label_new (_("Network"));
gtk_widget_set_name (label20, "label20");
gtk_widget_ref (label20);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label20", label20,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label20);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (mediabook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mediabook), 1), label20);
media2 = gtk_label_new (_("Media"));
gtk_widget_set_name (media2, "media2");
gtk_widget_ref (media2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "media2", media2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (media2);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), media2);
vbox4 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox4, "vbox4");
gtk_widget_ref (vbox4);
gtk_object_set_data_full (GTK_OBJECT (familiar), "vbox4", vbox4,
(GtkDestroyNotify) gtk_widget_unref);
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_ref (scrolledwindow5);
gtk_object_set_data_full (GTK_OBJECT (familiar), "scrolledwindow5", scrolledwindow5,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow5);
gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow5, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
clistplaylist = gtk_clist_new (2);
gtk_widget_set_name (clistplaylist, "clistplaylist");
gtk_widget_ref (clistplaylist);
gtk_object_set_data_full (GTK_OBJECT (familiar), "clistplaylist", clistplaylist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (clistplaylist);
gtk_container_add (GTK_CONTAINER (scrolledwindow5), clistplaylist);
gtk_clist_set_column_width (GTK_CLIST (clistplaylist), 0, 140);
gtk_clist_set_column_width (GTK_CLIST (clistplaylist), 1, 80);
gtk_clist_column_titles_show (GTK_CLIST (clistplaylist));
label25 = gtk_label_new (_("MRL"));
gtk_widget_set_name (label25, "label25");
gtk_widget_ref (label25);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label25", label25,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label25);
gtk_clist_set_column_widget (GTK_CLIST (clistplaylist), 0, label25);
gtk_label_set_justify (GTK_LABEL (label25), GTK_JUSTIFY_LEFT);
label26 = gtk_label_new (_("Time"));
gtk_widget_set_name (label26, "label26");
gtk_widget_ref (label26);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label26", label26,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label26);
gtk_clist_set_column_widget (GTK_CLIST (clistplaylist), 1, label26);
gtk_label_set_justify (GTK_LABEL (label26), GTK_JUSTIFY_RIGHT);
hbox11 = gtk_hbox_new (TRUE, 0);
gtk_widget_set_name (hbox11, "hbox11");
gtk_widget_ref (hbox11);
gtk_object_set_data_full (GTK_OBJECT (familiar), "hbox11", hbox11,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox11);
gtk_box_pack_start (GTK_BOX (vbox4), hbox11, FALSE, FALSE, 2);
update_playlist = gtk_button_new_with_label (_("Update"));
gtk_widget_set_name (update_playlist, "update_playlist");
gtk_widget_ref (update_playlist);
gtk_object_set_data_full (GTK_OBJECT (familiar), "update_playlist", update_playlist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (update_playlist);
gtk_box_pack_start (GTK_BOX (hbox11), update_playlist, FALSE, FALSE, 0);
playlist_del = gtk_button_new_with_label (_(" Del "));
gtk_widget_set_name (playlist_del, "playlist_del");
gtk_widget_ref (playlist_del);
gtk_object_set_data_full (GTK_OBJECT (familiar), "playlist_del", playlist_del,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_del);
gtk_box_pack_start (GTK_BOX (hbox11), playlist_del, FALSE, FALSE, 5);
playlist_clear = gtk_button_new_with_label (_(" Clear "));
gtk_widget_set_name (playlist_clear, "playlist_clear");
gtk_widget_ref (playlist_clear);
gtk_object_set_data_full (GTK_OBJECT (familiar), "playlist_clear", playlist_clear,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist_clear);
gtk_box_pack_start (GTK_BOX (hbox11), playlist_clear, FALSE, FALSE, 5);
playlist = gtk_label_new (_("Playlist"));
gtk_widget_set_name (playlist, "playlist");
gtk_widget_ref (playlist);
gtk_object_set_data_full (GTK_OBJECT (familiar), "playlist", playlist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (playlist);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), playlist);
vbox2 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox2, "vbox2");
gtk_widget_ref (vbox2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "vbox2", vbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox2);
gtk_container_add (GTK_CONTAINER (notebook), vbox2);
cbautoplay = gtk_check_button_new_with_label (_("Automatically play file"));
gtk_widget_set_name (cbautoplay, "cbautoplay");
gtk_widget_ref (cbautoplay);
gtk_object_set_data_full (GTK_OBJECT (familiar), "cbautoplay", cbautoplay,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (cbautoplay);
gtk_box_pack_start (GTK_BOX (vbox2), cbautoplay, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbautoplay), TRUE);
hbox2 = gtk_hbox_new (TRUE, 0);
gtk_widget_set_name (hbox2, "hbox2");
gtk_widget_ref (hbox2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "hbox2", hbox2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox2);
gtk_box_pack_end (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 2);
buttonSave = gtk_button_new_with_label (_(" Save "));
gtk_widget_set_name (buttonSave, "buttonSave");
gtk_widget_ref (buttonSave);
gtk_object_set_data_full (GTK_OBJECT (familiar), "buttonSave", buttonSave,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (buttonSave);
gtk_fixed_put (GTK_FIXED (fixedPreferences), buttonSave, 8, 216);
gtk_widget_set_uposition (buttonSave, 8, 216);
gtk_widget_set_usize (buttonSave, 54, 24);
gtk_box_pack_start (GTK_BOX (hbox2), buttonSave, FALSE, FALSE, 0);
buttonApply = gtk_button_new_with_label (_("Apply"));
buttonApply = gtk_button_new_with_label (_(" Apply "));
gtk_widget_set_name (buttonApply, "buttonApply");
gtk_widget_ref (buttonApply);
gtk_object_set_data_full (GTK_OBJECT (familiar), "buttonApply", buttonApply,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (buttonApply);
gtk_fixed_put (GTK_FIXED (fixedPreferences), buttonApply, 64, 216);
gtk_widget_set_uposition (buttonApply, 64, 216);
gtk_widget_set_usize (buttonApply, 54, 24);
gtk_box_pack_start (GTK_BOX (hbox2), buttonApply, FALSE, FALSE, 0);
buttonCancel = gtk_button_new_with_label (_("Cancel"));
buttonCancel = gtk_button_new_with_label (_(" Cancel "));
gtk_widget_set_name (buttonCancel, "buttonCancel");
gtk_widget_ref (buttonCancel);
gtk_object_set_data_full (GTK_OBJECT (familiar), "buttonCancel", buttonCancel,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (buttonCancel);
gtk_fixed_put (GTK_FIXED (fixedPreferences), buttonCancel, 176, 216);
gtk_widget_set_uposition (buttonCancel, 176, 216);
gtk_widget_set_usize (buttonCancel, 54, 24);
cbautoplay = gtk_check_button_new_with_label (_("Automatically play file."));
gtk_widget_set_name (cbautoplay, "cbautoplay");
gtk_widget_ref (cbautoplay);
gtk_object_set_data_full (GTK_OBJECT (familiar), "cbautoplay", cbautoplay,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (cbautoplay);
gtk_fixed_put (GTK_FIXED (fixedPreferences), cbautoplay, 8, 8);
gtk_widget_set_uposition (cbautoplay, 8, 8);
gtk_widget_set_usize (cbautoplay, 216, 24);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbautoplay), TRUE);
gtk_box_pack_end (GTK_BOX (hbox2), buttonCancel, FALSE, FALSE, 0);
preferences = gtk_label_new (_("Preference"));
gtk_widget_set_name (preferences, "preferences");
......@@ -392,69 +670,97 @@ create_familiar (void)
gtk_object_set_data_full (GTK_OBJECT (familiar), "preferences", preferences,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (preferences);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), preferences);
fixedAbout = gtk_fixed_new ();
gtk_widget_set_name (fixedAbout, "fixedAbout");
gtk_widget_ref (fixedAbout);
gtk_object_set_data_full (GTK_OBJECT (familiar), "fixedAbout", fixedAbout,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (fixedAbout);
gtk_container_add (GTK_CONTAINER (notebook), fixedAbout);
logo = create_pixmap (familiar, "vlc32x32.xpm");
gtk_widget_set_name (logo, "logo");
gtk_widget_ref (logo);
gtk_object_set_data_full (GTK_OBJECT (familiar), "logo", logo,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (logo);
gtk_fixed_put (GTK_FIXED (fixedAbout), logo, 8, 0);
gtk_widget_set_uposition (logo, 8, 0);
gtk_widget_set_usize (logo, 50, 50);
labelCopyright = gtk_label_new (_("(c) 1996-2003 the VideoLAN team"));
gtk_widget_set_name (labelCopyright, "labelCopyright");
gtk_widget_ref (labelCopyright);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelCopyright", labelCopyright,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelCopyright);
gtk_fixed_put (GTK_FIXED (fixedAbout), labelCopyright, 16, 56);
gtk_widget_set_uposition (labelCopyright, 16, 56);
gtk_widget_set_usize (labelCopyright, 200, 18);
labelAuthors = gtk_label_new (_("Authors: The VideoLAN Team, http://www.videolan.org"));
gtk_widget_set_name (labelAuthors, "labelAuthors");
gtk_widget_ref (labelAuthors);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelAuthors", labelAuthors,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelAuthors);
gtk_fixed_put (GTK_FIXED (fixedAbout), labelAuthors, 16, 80);
gtk_widget_set_uposition (labelAuthors, 16, 80);
gtk_widget_set_usize (labelAuthors, 200, 40);
gtk_label_set_line_wrap (GTK_LABEL (labelAuthors), TRUE);
labelAbout = 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 (labelAbout, "labelAbout");
gtk_widget_ref (labelAbout);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelAbout", labelAbout,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelAbout);
gtk_fixed_put (GTK_FIXED (fixedAbout), labelAbout, 16, 128);
gtk_widget_set_uposition (labelAbout, 16, 128);
gtk_widget_set_usize (labelAbout, 200, 70);
gtk_label_set_justify (GTK_LABEL (labelAbout), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (labelAbout), TRUE);
labelVlc = gtk_label_new (_("VLC media player"));
gtk_widget_set_name (labelVlc, "labelVlc");
gtk_widget_ref (labelVlc);
gtk_object_set_data_full (GTK_OBJECT (familiar), "labelVlc", labelVlc,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (labelVlc);
gtk_fixed_put (GTK_FIXED (fixedAbout), labelVlc, 64, 8);
gtk_widget_set_uposition (labelVlc, 64, 8);
gtk_widget_set_usize (labelVlc, 120, 40);
gtk_label_set_line_wrap (GTK_LABEL (labelVlc), TRUE);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), preferences);
scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow3, "scrolledwindow3");
gtk_widget_ref (scrolledwindow3);
gtk_object_set_data_full (GTK_OBJECT (familiar), "scrolledwindow3", scrolledwindow3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (scrolledwindow3);
gtk_container_add (GTK_CONTAINER (notebook), scrolledwindow3);
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_ref (viewport1);
gtk_object_set_data_full (GTK_OBJECT (familiar), "viewport1", viewport1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (viewport1);
gtk_container_add (GTK_CONTAINER (scrolledwindow3), viewport1);
gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport1), GTK_SHADOW_NONE);
fixed2 = gtk_fixed_new ();
gtk_widget_set_name (fixed2, "fixed2");
gtk_widget_ref (fixed2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "fixed2", fixed2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (fixed2);
gtk_container_add (GTK_CONTAINER (viewport1), fixed2);
pixmap2 = create_pixmap (familiar, "vlc32x32.xpm");
gtk_widget_set_name (pixmap2, "pixmap2");
gtk_widget_ref (pixmap2);
gtk_object_set_data_full (GTK_OBJECT (familiar), "pixmap2", pixmap2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (pixmap2);
gtk_fixed_put (GTK_FIXED (fixed2), pixmap2, 8, 0);
gtk_widget_set_uposition (pixmap2, 8, 0);
gtk_widget_set_usize (pixmap2, 50, 50);
label8 = gtk_label_new (_("(c) 1996-2003 the VideoLAN team"));
gtk_widget_set_name (label8, "label8");
gtk_widget_ref (label8);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label8", label8,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label8);
gtk_fixed_put (GTK_FIXED (fixed2), label8, 16, 56);
gtk_widget_set_uposition (label8, 16, 56);
gtk_widget_set_usize (label8, 200, 18);
label9 = gtk_label_new (_("Authors: The VideoLAN Team, http://www.videolan.org"));
gtk_widget_set_name (label9, "label9");
gtk_widget_ref (label9);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label9", label9,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label9);
gtk_fixed_put (GTK_FIXED (fixed2), label9, 16, 80);
gtk_widget_set_uposition (label9, 16, 80);
gtk_widget_set_usize (label9, 200, 40);
gtk_label_set_line_wrap (GTK_LABEL (label9), TRUE);
label11 = gtk_label_new (_("VLC media player"));
gtk_widget_set_name (label11, "label11");
gtk_widget_ref (label11);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label11", label11,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label11);
gtk_fixed_put (GTK_FIXED (fixed2), label11, 64, 8);
gtk_widget_set_uposition (label11, 64, 8);
gtk_widget_set_usize (label11, 120, 40);
gtk_label_set_line_wrap (GTK_LABEL (label11), TRUE);
label27 = gtk_label_new ("http://www.videolan.org");
gtk_widget_set_name (label27, "label27");
gtk_widget_ref (label27);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label27", label27,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label27);
gtk_fixed_put (GTK_FIXED (fixed2), label27, 16, 200);
gtk_widget_set_uposition (label27, 16, 200);
gtk_widget_set_usize (label27, 208, 16);
label10 = 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 (label10, "label10");
gtk_widget_ref (label10);
gtk_object_set_data_full (GTK_OBJECT (familiar), "label10", label10,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label10);
gtk_fixed_put (GTK_FIXED (fixed2), label10, 16, 128);
gtk_widget_set_uposition (label10, 16, 128);
gtk_widget_set_usize (label10, 200, 70);
gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (label10), TRUE);
about = gtk_label_new (_("About"));
gtk_widget_set_name (about, "about");
......@@ -462,7 +768,7 @@ create_familiar (void)
gtk_object_set_data_full (GTK_OBJECT (familiar), "about", about,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (about);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), about);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 3), about);
gtk_signal_connect (GTK_OBJECT (familiar), "delete_event",
GTK_SIGNAL_FUNC (on_familiar_delete_event),
......@@ -470,6 +776,9 @@ create_familiar (void)
gtk_signal_connect (GTK_OBJECT (toolbar_open), "clicked",
GTK_SIGNAL_FUNC (on_toolbar_open_clicked),
NULL);
gtk_signal_connect (GTK_OBJECT (toolbar_playlist), "clicked",
GTK_SIGNAL_FUNC (on_toolbar_playlist_clicked),
NULL);
gtk_signal_connect (GTK_OBJECT (toolbar_preferences), "clicked",
GTK_SIGNAL_FUNC (on_toolbar_preferences_clicked),
NULL);
......@@ -497,18 +806,54 @@ create_familiar (void)
gtk_signal_connect (GTK_OBJECT (slider), "button_press_event",
GTK_SIGNAL_FUNC (FamiliarSliderPress),
NULL);
gtk_signal_connect (GTK_OBJECT (buttonMrlGo), "clicked",
GTK_SIGNAL_FUNC (FamiliarMrlGo),
NULL);
gtk_signal_connect (GTK_OBJECT (mrl_entry), "changed",
GTK_SIGNAL_FUNC (on_comboURL_entry_changed),
NULL);
gtk_signal_connect (GTK_OBJECT (clistmedia), "select_row",
GTK_SIGNAL_FUNC (on_clistmedia_select_row),
NULL);
gtk_signal_connect (GTK_OBJECT (clistmedia), "click_column",
GTK_SIGNAL_FUNC (on_clistmedia_click_column),
NULL);
gtk_signal_connect (GTK_OBJECT (comboURL_entry), "changed",
GTK_SIGNAL_FUNC (on_comboURL_entry_changed),
gtk_signal_connect (GTK_OBJECT (network_multicast), "toggled",
GTK_SIGNAL_FUNC (on_network_multicast_toggled),
NULL);
gtk_signal_connect (GTK_OBJECT (network_multicast_port), "changed",
GTK_SIGNAL_FUNC (on_network_multicast_port_changed),
NULL);
gtk_signal_connect (GTK_OBJECT (network_multicast_address), "changed",
GTK_SIGNAL_FUNC (on_network_multicast_address_changed),
NULL);
gtk_signal_connect (GTK_OBJECT (network_http), "toggled",
GTK_SIGNAL_FUNC (on_network_http_toggled),
NULL);
gtk_signal_connect (GTK_OBJECT (network_ftp), "toggled",
GTK_SIGNAL_FUNC (on_network_ftp_toggled),
NULL);
gtk_signal_connect (GTK_OBJECT (network_mms), "toggled",
GTK_SIGNAL_FUNC (on_network_mms_toggled),
NULL);
gtk_signal_connect (GTK_OBJECT (clistplaylist), "event",
GTK_SIGNAL_FUNC (FamiliarPlaylistEvent),
NULL);
gtk_signal_connect (GTK_OBJECT (update_playlist), "clicked",
GTK_SIGNAL_FUNC (FamiliarPlaylistUpdate),
NULL);
gtk_signal_connect (GTK_OBJECT (playlist_del), "clicked",
GTK_SIGNAL_FUNC (FamiliarPlaylistDel),
NULL);
gtk_signal_connect (GTK_OBJECT (playlist_clear), "clicked",
GTK_SIGNAL_FUNC (FamiliarPlaylistClear),
NULL);
gtk_signal_connect (GTK_OBJECT (cbautoplay), "toggled",
GTK_SIGNAL_FUNC (on_cbautoplay_toggled),
NULL);
gtk_signal_connect (GTK_OBJECT (buttonApply), "clicked",
GTK_SIGNAL_FUNC (FamiliarPreferencesApply),
NULL);
return familiar;
}
......
/*****************************************************************************
* network.c : Network interface of the gtk-familiar plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: network.c,v 1.1 2003/03/13 15:50:17 marcari Exp $
*
* Authors: 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., 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 "callbacks.h"
#include "interface.h"
#include "support.h"
#include "familiar.h"
static void update_network_multicast(GtkWidget * widget);
static void update_network_multicast(GtkWidget * widget)
{
intf_thread_t * p_intf = GtkGetIntf( widget );
GtkToggleButton * p_network_multicast =
GTK_GET( TOGGLE_BUTTON, "network_multicast" );
GtkEditable * p_network_multicast_address =
GTK_GET( EDITABLE, "network_multicast_address" );
GtkEditable * p_network_multicast_port =
GTK_GET( EDITABLE, "network_multicast_port" );
if (gtk_toggle_button_get_active(p_network_multicast))
{
gchar * str = g_strconcat( "udp://@",
gtk_editable_get_chars(p_network_multicast_address, 0, -1), ":",
gtk_editable_get_chars(p_network_multicast_port, 0, -1), NULL );
gtk_entry_set_text(p_intf->p_sys->p_mrlentry, str);
g_free( str );
}
}
void
on_network_multicast_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
update_network_multicast(GTK_WIDGET(togglebutton));
}
void
on_network_multicast_port_changed (GtkEditable *editable,
gpointer user_data)
{
update_network_multicast(GTK_WIDGET(editable));
}
void
on_network_multicast_address_changed (GtkEditable *editable,
gpointer user_data)
{
update_network_multicast(GTK_WIDGET(editable));
}
void
on_network_http_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( togglebutton );
if (gtk_toggle_button_get_active(togglebutton))
{
gtk_entry_set_text(p_intf->p_sys->p_mrlentry, "http://");
}
}
void
on_network_ftp_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( togglebutton );
if (gtk_toggle_button_get_active(togglebutton))
{
gtk_entry_set_text(p_intf->p_sys->p_mrlentry, "ftp://");
}
}
void
on_network_mms_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( togglebutton );
if (gtk_toggle_button_get_active(togglebutton))
{
gtk_entry_set_text(p_intf->p_sys->p_mrlentry, "mms://");
}
}
/*****************************************************************************
* network.h : Network part of the gtk-familiar plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: network.h,v 1.1 2003/03/13 15:50:17 marcari Exp $
*
* Authors: 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
void
on_network_udp_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_network_udp_port_changed (GtkEditable *editable,
gpointer user_data);
void
on_network_multicast_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_network_multicast_port_changed (GtkEditable *editable,
gpointer user_data);
void
on_network_multicast_address_changed (GtkEditable *editable,
gpointer user_data);
void
on_network_http_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_network_ftp_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_network_mms_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
FamiliarNetworkGo (GtkButton *button,
gpointer user_data);
/*****************************************************************************
* playlist.c : Playlist interface of the gtk-familiar plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: playlist.c,v 1.1 2003/03/13 15:50:17 marcari Exp $
*
* Authors: 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., 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 "interface.h"
#include "support.h"
#include "familiar.h"
#include "playlist.h"
gboolean
FamiliarPlaylistEvent (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( widget );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return FALSE;
}
if( ( event->button ).type == GDK_2BUTTON_PRESS )
{
GtkCList * p_clist;
gint i_row;
gint i_col;
p_clist = p_intf->p_sys->p_clistplaylist;
if( gtk_clist_get_selection_info( p_clist, (event->button).x,
(event->button).y, &i_row, &i_col ) == 1 )
{
playlist_Goto( p_playlist, i_row );
}
vlc_object_release( p_playlist );
FamiliarRebuildCList( p_clist, p_playlist );
return TRUE;
}
vlc_object_release( p_playlist );
return FALSE;
}
void
FamiliarPlaylistClear (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
int item;
if( p_playlist == NULL )
{
return;
}
for(item = p_playlist->i_size - 1 ; item >= 0 ; item-- )
{
playlist_Delete( p_playlist, item);
}
vlc_object_release( p_playlist );
FamiliarRebuildCList( p_intf->p_sys->p_clistplaylist, p_playlist);
}
void FamiliarRebuildCList( GtkCList * p_clist, playlist_t * p_playlist )
{
int i_dummy;
gchar * ppsz_text[2];
GdkColor red;
red.red = 65535;
red.blue = 0;
red.green = 0;
gtk_clist_freeze( p_clist );
gtk_clist_clear( p_clist );
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_clist_insert( p_clist, 0, ppsz_text );
}
vlc_mutex_unlock( &p_playlist->object_lock );
gtk_clist_set_background( p_clist, p_playlist->i_index, &red);
gtk_clist_thaw( p_clist );
}
void
FamiliarPlaylistUpdate (GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
FamiliarRebuildCList( p_intf->p_sys->p_clistplaylist, p_playlist );
}
static void FamiliarDeleteGListItem( gpointer data, gpointer param )
{
int i_cur_row = (long)data;
playlist_t * p_playlist = param;
playlist_Delete( p_playlist, i_cur_row );
}
static gint FamiliarCompareItems( gconstpointer a, gconstpointer b )
{
return (ptrdiff_t) ( (int *)b - (int *)a );
}
void
FamiliarPlaylistDel (GtkButton *button,
gpointer user_data)
{
/* user wants to delete a file in the queue */
GList * p_selection;
intf_thread_t * p_intf = GtkGetIntf( button );
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
/* lock the struct */
vlc_mutex_lock( &p_intf->change_lock );
p_selection = p_intf->p_sys->p_clistplaylist->selection;
if( g_list_length( p_selection ) )
{
/* reverse-sort so that we can delete from the furthest
* to the closest item to delete...
*/
p_selection = g_list_sort( p_selection, FamiliarCompareItems );
g_list_foreach( p_selection, FamiliarDeleteGListItem, p_playlist );
}
vlc_mutex_unlock( &p_intf->change_lock );
vlc_object_release( p_playlist );
FamiliarRebuildCList( p_intf->p_sys->p_clistplaylist, p_playlist );
}
gboolean
FamiliarPlaylistEvent (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void FamiliarRebuildCList( GtkCList * p_clist, playlist_t * p_playlist );
void FamiliarPlaylistClear (GtkButton *button,
gpointer user_data);
void
FamiliarPlaylistUpdate (GtkButton *button,
gpointer user_data);
void
FamiliarPlaylistDel (GtkButton *button,
gpointer user_data);
/* XPM */
static char * familiar_playlistb16x16_xpm[] = {
"16 16 2 1",
" c None",
". c #000000",
" ",
" ............ ",
" ............ ",
" .. .. ",
" .. .. ",
" ............ ",
" ............ ",
" .. .. ",
" .. .. ",
" ............ ",
" ............ ",
" .. .. ",
" .. .. ",
" ............ ",
" ............ ",
" "};
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