Commit 78da8d7d authored by Jean-Paul Saman's avatar Jean-Paul Saman

PDA interface:

* Network tabpage works
* cleanup of code
parent 5a58a1ef
......@@ -331,6 +331,7 @@
<property name="case_sensitive">False</property>
<property name="enable_arrow_keys">True</property>
<property name="enable_arrows_always">False</property>
<signal name="add" handler="onNetworkMRLAdd" last_modification_time="Fri, 07 Nov 2003 14:35:58 GMT"/>
<child internal-child="entry">
<widget class="GtkEntry" id="entryMRL">
......@@ -345,8 +346,6 @@
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="onEntryMRLChanged" last_modification_time="Fri, 26 Sep 2003 12:32:12 GMT"/>
<signal name="editing_done" handler="onEntryMRLEditingDone" last_modification_time="Fri, 26 Sep 2003 13:31:56 GMT"/>
</widget>
</child>
......@@ -356,178 +355,58 @@
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem1">
<widget class="GtkListItem" id="listitem340">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label31">
<property name="visible">True</property>
<property name="label" translatable="yes">file://</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem2">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label32">
<property name="visible">True</property>
<property name="label" translatable="yes">ftp://</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">udp://@:1234</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem3">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label33">
<widget class="GtkListItem" id="listitem341">
<property name="visible">True</property>
<property name="label" translatable="yes">http://</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">udp6://@:1234</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem4">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label34">
<widget class="GtkListItem" id="listitem342">
<property name="visible">True</property>
<property name="label" translatable="yes">udp://@:1234</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">rtp://</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem5">
<widget class="GtkListItem" id="listitem343">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label35">
<property name="visible">True</property>
<property name="label" translatable="yes">udp6://@:1234</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">rtp6://</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem6">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label36">
<widget class="GtkListItem" id="listitem344">
<property name="visible">True</property>
<property name="label" translatable="yes">rtp://</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">ftp://</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem7">
<widget class="GtkListItem" id="listitem345">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label37">
<property name="visible">True</property>
<property name="label" translatable="yes">rtp6://</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">http://</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem8">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="label38">
<widget class="GtkListItem" id="listitem346">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="can_focus">True</property>
<property name="label" translatable="yes">mms://</property>
</widget>
</child>
</widget>
......@@ -626,9 +505,8 @@
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
<property name="adjustment">1234 0 100 1 10 10</property>
<signal name="changed" handler="onNetworkPortChanged" last_modification_time="Fri, 26 Sep 2003 12:32:28 GMT"/>
<signal name="editing_done" handler="onEntryNetworkPortEditingDone" last_modification_time="Fri, 26 Sep 2003 13:32:11 GMT"/>
<property name="adjustment">1233 0 65535 1 10 10</property>
<signal name="changed" handler="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:34:10 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
......@@ -659,8 +537,7 @@
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="onNetworkAddressChanged" last_modification_time="Fri, 26 Sep 2003 12:33:42 GMT"/>
<signal name="editing_done" handler="onEntryNetworkAddressEditingDone" last_modification_time="Fri, 26 Sep 2003 13:32:33 GMT"/>
<signal name="changed" handler="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:34:30 GMT"/>
</widget>
</child>
......@@ -700,8 +577,7 @@
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="onNetworkTypeChanged" last_modification_time="Fri, 26 Sep 2003 12:34:45 GMT"/>
<signal name="editing_done" handler="onEntryNetworkTypeEditingDone" last_modification_time="Fri, 26 Sep 2003 13:32:50 GMT"/>
<signal name="changed" handler="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:34:45 GMT"/>
</widget>
</child>
......@@ -762,7 +638,7 @@
</child>
<child>
<widget class="GtkCombo" id="comboProtocolType">
<widget class="GtkCombo" id="comboNetworkProtocolType">
<property name="visible">True</property>
<property name="value_in_list">False</property>
<property name="allow_empty">True</property>
......@@ -771,7 +647,7 @@
<property name="enable_arrows_always">False</property>
<child internal-child="entry">
<widget class="GtkEntry" id="entryProtocolType">
<widget class="GtkEntry" id="entryNetworkProtocolType">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
......@@ -781,13 +657,12 @@
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="onProtocolTypeChanged" last_modification_time="Fri, 26 Sep 2003 12:35:31 GMT"/>
<signal name="editing_done" handler="onEntryProtocolTypeEditingDone" last_modification_time="Fri, 26 Sep 2003 13:33:06 GMT"/>
<signal name="changed" handler="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:35:01 GMT"/>
</widget>
</child>
<child internal-child="list">
<widget class="GtkList" id="listProtocolType">
<widget class="GtkList" id="listNetworkProtocolType">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
......@@ -867,7 +742,7 @@
</child>
<child>
<widget class="GtkCombo" id="comboMRLType">
<widget class="GtkCombo" id="comboNetworkMRLType">
<property name="visible">True</property>
<property name="value_in_list">False</property>
<property name="allow_empty">True</property>
......@@ -876,63 +751,62 @@
<property name="enable_arrows_always">False</property>
<child internal-child="entry">
<widget class="GtkEntry" id="entryMRLType">
<widget class="GtkEntry" id="entryNetworkMRLType">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="text" translatable="yes">udp</property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="onMRLTypeChanged" last_modification_time="Fri, 26 Sep 2003 12:36:22 GMT"/>
<signal name="editing_done" handler="onEntryMRLTypeEditingDone" last_modification_time="Fri, 26 Sep 2003 13:33:23 GMT"/>
<signal name="changed" handler="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:35:14 GMT"/>
</widget>
</child>
<child internal-child="list">
<widget class="GtkList" id="listMRLType">
<widget class="GtkList" id="listNetworkMRLType">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem59">
<widget class="GtkListItem" id="listitem630">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">http</property>
<property name="label" translatable="yes">udp</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem60">
<widget class="GtkListItem" id="listitem631">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">ftp</property>
<property name="label" translatable="yes">rtp</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem61">
<widget class="GtkListItem" id="listitem632">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">mms</property>
<property name="label" translatable="yes">ftp</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem62">
<widget class="GtkListItem" id="listitem633">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">rtp</property>
<property name="label" translatable="yes">http</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem63">
<widget class="GtkListItem" id="listitem634">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">udp</property>
<property name="label" translatable="yes">mms</property>
</widget>
</child>
</widget>
......@@ -972,7 +846,7 @@
</child>
<child>
<widget class="GtkCombo" id="comboStreamType">
<widget class="GtkCombo" id="comboNetworkStreamType">
<property name="visible">True</property>
<property name="value_in_list">False</property>
<property name="allow_empty">True</property>
......@@ -981,7 +855,7 @@
<property name="enable_arrows_always">False</property>
<child internal-child="entry">
<widget class="GtkEntry" id="entryStreamType">
<widget class="GtkEntry" id="entryNetworkStreamType">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
......@@ -991,13 +865,12 @@
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<signal name="changed" handler="onStreamTypeChanged" last_modification_time="Fri, 26 Sep 2003 12:37:04 GMT"/>
<signal name="editing_done" handler="onEntryStreamTypeEditingDone" last_modification_time="Fri, 26 Sep 2003 13:33:39 GMT"/>
<signal name="changed" handler="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:35:27 GMT"/>
</widget>
</child>
<child internal-child="list">
<widget class="GtkList" id="listStreamType">
<widget class="GtkList" id="listNetworkStreamType">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
......@@ -1293,9 +1166,9 @@
</child>
<child>
<widget class="GtkLabel" id="Camera">
<widget class="GtkLabel" id="Server">
<property name="visible">True</property>
<property name="label" translatable="yes">Camera</property>
<property name="label" translatable="yes">Server</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
......@@ -1816,9 +1689,9 @@
</child>
<child>
<widget class="GtkLabel" id="Server">
<widget class="GtkLabel" id="Camera">
<property name="visible">True</property>
<property name="label" translatable="yes">Server</property>
<property name="label" translatable="yes">Camera</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
......
......@@ -2,7 +2,7 @@
* pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: pda_callbacks.c,v 1.6 2003/11/07 14:15:23 jpsaman Exp $
* $Id: pda_callbacks.c,v 1.7 2003/11/08 16:04:05 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -107,6 +107,7 @@ void PlaylistRebuildListStore( GtkListStore * p_list, playlist_t * p_playlist )
vlc_mutex_unlock( &p_playlist->object_lock );
}
/*****************************************************************************
* Helper functions for URL changes in Media and Preferences notebook pages.
****************************************************************************/
......@@ -570,7 +571,6 @@ void
onEntryMRLChanged (GtkEditable *editable,
gpointer user_data)
{
g_print("onMRLChanged\n");
}
......@@ -583,133 +583,94 @@ onEntryMRLEditingDone (GtkCellEditable *celleditable,
void
onNetworkPortChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryNetworkPortEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onNetworkAddressChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryNetworkAddressEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onNetworkTypeChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryNetworkTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onProtocolTypeChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
onEntryProtocolTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onMRLTypeChanged (GtkEditable *editable,
NetworkBuildMRL (GtkEditable *editable,
gpointer user_data)
{
GtkSpinButton *networkPort = NULL;
GtkEntry *entryMRL = NULL;
GtkEntry *networkMRLType = NULL;
GtkEntry *networkAddress = NULL;
GtkEntry *networkProtocol = NULL;
GtkEntry *networkType = NULL;
const gchar *mrlType;
const gchar *mrlAddress;
gint mrlPort;
const gchar *mrlProtocol;
const gchar *mrlNetworkType;
#define VLC_MAX_MRL 256
char text[VLC_MAX_MRL];
int pos = 0;
}
entryMRL = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryMRL" );
void
onEntryMRLTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
networkMRLType = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkMRLType" );
networkAddress = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkAddress" );
networkPort = (GtkSpinButton*) lookup_widget( GTK_WIDGET(editable), "entryNetworkPort" );
networkProtocol = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkProtocolType" );
networkType = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkType" );
}
mrlType = gtk_entry_get_text(GTK_ENTRY(networkMRLType));
mrlAddress = gtk_entry_get_text(GTK_ENTRY(networkAddress));
mrlPort = gtk_spin_button_get_value_as_int(networkPort);
mrlProtocol = gtk_entry_get_text(GTK_ENTRY(networkProtocol));
mrlNetworkType = gtk_entry_get_text(GTK_ENTRY(networkType));
/* Build MRL from parts ;-) */
pos = snprintf( &text[0], VLC_MAX_MRL, "%s", (char*)mrlType);
if (strncasecmp( (char*)mrlProtocol, "IPv6",4)==0 )
{
pos += snprintf( &text[pos], VLC_MAX_MRL - pos, "6://" );
if (strncasecmp( (char*)mrlNetworkType, "multicast",9)==0)
{
pos += snprintf( &text[pos], VLC_MAX_MRL - pos, "@" );
}
pos += snprintf( &text[pos], VLC_MAX_MRL - pos, "[%s]:%d", (char*)mrlAddress, (int)mrlPort );
}
else
{
pos += snprintf( &text[pos], VLC_MAX_MRL - pos, "://" );
if (strncasecmp( (char*)mrlNetworkType, "multicast",9)==0)
{
pos += snprintf( &text[pos], VLC_MAX_MRL - pos, "@" );
}
pos += snprintf( &text[pos], VLC_MAX_MRL - pos, "%s:%d", (char*)mrlAddress, (int)mrlPort );
}
void
onStreamTypeChanged (GtkEditable *editable,
gpointer user_data)
{
if (pos >= VLC_MAX_MRL)
text[VLC_MAX_MRL-1]='\0';
gtk_entry_set_text(entryMRL,text);
#undef VLC_MAX_MRL
}
void
onEntryStreamTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data)
{
}
void
onAddNetworkPlaylist (GtkButton *button,
gpointer user_data)
{
#if 0
GtkEntry *p_mrl;
p_mrl = (GtkEntry*) lookup_widget(GTK_WIDGET(button),"" );
if (NULL != p_mrl)
{
GtkEntry *p_mrl = NULL;
GtkTreeView *p_tvplaylist = NULL;
GtkTreeModel *p_play_model;
GtkTreeIter p_play_iter;
gchar *name;
const gchar *mrl_name;
p_mrl = (GtkEntry*) lookup_widget(GTK_WIDGET(button),"entryMRL" );
if (NULL != p_mrl)
{
mrl_name = gtk_entry_get_text(p_mrl);
p_tvplaylist = (GtkTreeView *) lookup_widget( GTK_WIDGET(button), "tvPlaylist");
if (p_tvplaylist)
if (NULL != p_tvplaylist)
{
p_play_model = gtk_tree_view_get_model(p_tvplaylist);
/* Add a new row to the playlist treeview model */
gtk_list_store_append (p_play_model, &p_play_iter);
gtk_list_store_set (p_play_model, &p_play_iter,
0, name, /* Add path to it !!! */
1, "00:00:00",
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, mrl_name, /* Add path to it !!! */
1, "no info",
-1 );
/* do we need to unref ?? */
}
else
// msg_Err(p_intf, "Error obtaining pointer to Play List");
g_print("Error obtaining pointer to Play List");
}
#endif
}
......@@ -943,3 +904,13 @@ onPreferenceCancel (GtkButton *button,
}
void
onNetworkMRLAdd (GtkContainer *container,
GtkWidget *widget,
gpointer user_data)
{
}
......@@ -2,7 +2,7 @@
* callbacks.h : pda plugin for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: pda_callbacks.h,v 1.4 2003/11/07 14:15:23 jpsaman Exp $
* $Id: pda_callbacks.h,v 1.5 2003/11/08 16:04:05 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -30,6 +30,7 @@ void ReadDirectory( GtkListStore *p_list, char *psz_dir );
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url );
void PlaylistRebuildListStore( GtkListStore *p_list, playlist_t * p_playlist );
gboolean
onPDADeleteEvent (GtkWidget *widget,
GdkEvent *event,
......@@ -96,54 +97,6 @@ void
onEntryMRLEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onNetworkPortChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryNetworkPortEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onNetworkAddressChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryNetworkAddressEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onNetworkTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryNetworkTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onProtocolTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryProtocolTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onMRLTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryMRLTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onStreamTypeChanged (GtkEditable *editable,
gpointer user_data);
void
onEntryStreamTypeEditingDone (GtkCellEditable *celleditable,
gpointer user_data);
void
onAddNetworkPlaylist (GtkButton *button,
gpointer user_data);
......@@ -264,3 +217,12 @@ void
onPreferenceCancel (GtkButton *button,
gpointer user_data);
void
onNetworkMRLAdd (GtkContainer *container,
GtkWidget *widget,
gpointer user_data);
void
NetworkBuildMRL (GtkEditable *editable,
gpointer user_data);
......@@ -69,18 +69,18 @@ create_pda (void)
GList *comboNetworkType_items = NULL;
GtkWidget *entryNetworkType;
GtkWidget *labelNetworkType;
GtkWidget *comboProtocolType;
GList *comboProtocolType_items = NULL;
GtkWidget *entryProtocolType;
GtkWidget *comboNetworkProtocolType;
GList *comboNetworkProtocolType_items = NULL;
GtkWidget *entryNetworkProtocolType;
GtkWidget *labelNetworkProtocol;
GtkWidget *labeNetworkMRLType;
GtkWidget *comboMRLType;
GList *comboMRLType_items = NULL;
GtkWidget *entryMRLType;
GtkWidget *comboNetworkMRLType;
GList *comboNetworkMRLType_items = NULL;
GtkWidget *entryNetworkMRLType;
GtkWidget *labelNetworkStreamType;
GtkWidget *comboStreamType;
GList *comboStreamType_items = NULL;
GtkWidget *entryStreamType;
GtkWidget *comboNetworkStreamType;
GList *comboNetworkStreamType_items = NULL;
GtkWidget *entryNetworkStreamType;
GtkWidget *hbox13;
GtkWidget *AddNetworkPlaylist;
GtkWidget *Network;
......@@ -94,7 +94,7 @@ create_pda (void)
GtkWidget *entryV4LVideo;
GtkWidget *hbox16;
GtkWidget *AddCameraToPlaylist;
GtkWidget *Camera;
GtkWidget *Server;
GtkWidget *vbox1;
GtkWidget *vbox6;
GtkWidget *frameVideo;
......@@ -123,7 +123,7 @@ create_pda (void)
GtkWidget *label41;
GtkWidget *hbox14;
GtkWidget *AddServerToPlaylist;
GtkWidget *Server;
GtkWidget *Camera;
GtkWidget *vbox4;
GtkWidget *scrolledwindow5;
GtkWidget *tvPlaylist;
......@@ -334,14 +334,13 @@ create_pda (void)
gtk_widget_set_name (comboMRL, "comboMRL");
gtk_widget_show (comboMRL);
gtk_box_pack_start (GTK_BOX (hbox12), comboMRL, TRUE, TRUE, 0);
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("file://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("ftp://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("http://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("udp://@:1234"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("udp6://@:1234"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("rtp://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) _("rtp6://"));
comboMRL_items = g_list_append (comboMRL_items, (gpointer) "");
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);
......@@ -379,7 +378,7 @@ create_pda (void)
gtk_label_set_justify (GTK_LABEL (labelNetworkAddress), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkAddress), 0, 0.5);
entryNetworkPort_adj = gtk_adjustment_new (1234, 0, 100, 1, 10, 10);
entryNetworkPort_adj = gtk_adjustment_new (1233, 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);
......@@ -427,22 +426,22 @@ create_pda (void)
gtk_label_set_justify (GTK_LABEL (labelNetworkType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkType), 0, 0.5);
comboProtocolType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboProtocolType)->popwin),
"GladeParentKey", comboProtocolType);
gtk_widget_set_name (comboProtocolType, "comboProtocolType");
gtk_widget_show (comboProtocolType);
gtk_table_attach (GTK_TABLE (table2), comboProtocolType, 1, 2, 3, 4,
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);
comboProtocolType_items = g_list_append (comboProtocolType_items, (gpointer) _("IPv4"));
comboProtocolType_items = g_list_append (comboProtocolType_items, (gpointer) _("IPv6"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboProtocolType), comboProtocolType_items);
g_list_free (comboProtocolType_items);
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("IPv4"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("IPv6"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboNetworkProtocolType), comboNetworkProtocolType_items);
g_list_free (comboNetworkProtocolType_items);
entryProtocolType = GTK_COMBO (comboProtocolType)->entry;
gtk_widget_set_name (entryProtocolType, "entryProtocolType");
gtk_widget_show (entryProtocolType);
entryNetworkProtocolType = GTK_COMBO (comboNetworkProtocolType)->entry;
gtk_widget_set_name (entryNetworkProtocolType, "entryNetworkProtocolType");
gtk_widget_show (entryNetworkProtocolType);
labelNetworkProtocol = gtk_label_new (_("Protocol:"));
gtk_widget_set_name (labelNetworkProtocol, "labelNetworkProtocol");
......@@ -462,25 +461,26 @@ create_pda (void)
gtk_label_set_justify (GTK_LABEL (labeNetworkMRLType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labeNetworkMRLType), 0, 0.5);
comboMRLType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboMRLType)->popwin),
"GladeParentKey", comboMRLType);
gtk_widget_set_name (comboMRLType, "comboMRLType");
gtk_widget_show (comboMRLType);
gtk_table_attach (GTK_TABLE (table2), comboMRLType, 1, 2, 4, 5,
comboNetworkMRLType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboNetworkMRLType)->popwin),
"GladeParentKey", comboNetworkMRLType);
gtk_widget_set_name (comboNetworkMRLType, "comboNetworkMRLType");
gtk_widget_show (comboNetworkMRLType);
gtk_table_attach (GTK_TABLE (table2), comboNetworkMRLType, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("http"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("ftp"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("mms"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("rtp"));
comboMRLType_items = g_list_append (comboMRLType_items, (gpointer) _("udp"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboMRLType), comboMRLType_items);
g_list_free (comboMRLType_items);
entryMRLType = GTK_COMBO (comboMRLType)->entry;
gtk_widget_set_name (entryMRLType, "entryMRLType");
gtk_widget_show (entryMRLType);
comboNetworkMRLType_items = g_list_append (comboNetworkMRLType_items, (gpointer) _("udp"));
comboNetworkMRLType_items = g_list_append (comboNetworkMRLType_items, (gpointer) _("rtp"));
comboNetworkMRLType_items = g_list_append (comboNetworkMRLType_items, (gpointer) _("ftp"));
comboNetworkMRLType_items = g_list_append (comboNetworkMRLType_items, (gpointer) _("http"));
comboNetworkMRLType_items = g_list_append (comboNetworkMRLType_items, (gpointer) _("mms"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboNetworkMRLType), comboNetworkMRLType_items);
g_list_free (comboNetworkMRLType_items);
entryNetworkMRLType = GTK_COMBO (comboNetworkMRLType)->entry;
gtk_widget_set_name (entryNetworkMRLType, "entryNetworkMRLType");
gtk_widget_show (entryNetworkMRLType);
gtk_entry_set_text (GTK_ENTRY (entryNetworkMRLType), _("udp"));
labelNetworkStreamType = gtk_label_new (_("Stream:"));
gtk_widget_set_name (labelNetworkStreamType, "labelNetworkStreamType");
......@@ -491,22 +491,22 @@ create_pda (void)
gtk_label_set_justify (GTK_LABEL (labelNetworkStreamType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkStreamType), 0, 0.5);
comboStreamType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboStreamType)->popwin),
"GladeParentKey", comboStreamType);
gtk_widget_set_name (comboStreamType, "comboStreamType");
gtk_widget_show (comboStreamType);
gtk_table_attach (GTK_TABLE (table2), comboStreamType, 1, 2, 5, 6,
comboNetworkStreamType = gtk_combo_new ();
g_object_set_data (G_OBJECT (GTK_COMBO (comboNetworkStreamType)->popwin),
"GladeParentKey", comboNetworkStreamType);
gtk_widget_set_name (comboNetworkStreamType, "comboNetworkStreamType");
gtk_widget_show (comboNetworkStreamType);
gtk_table_attach (GTK_TABLE (table2), comboNetworkStreamType, 1, 2, 5, 6,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboStreamType_items = g_list_append (comboStreamType_items, (gpointer) _("server"));
comboStreamType_items = g_list_append (comboStreamType_items, (gpointer) _("client"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboStreamType), comboStreamType_items);
g_list_free (comboStreamType_items);
comboNetworkStreamType_items = g_list_append (comboNetworkStreamType_items, (gpointer) _("server"));
comboNetworkStreamType_items = g_list_append (comboNetworkStreamType_items, (gpointer) _("client"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboNetworkStreamType), comboNetworkStreamType_items);
g_list_free (comboNetworkStreamType_items);
entryStreamType = GTK_COMBO (comboStreamType)->entry;
gtk_widget_set_name (entryStreamType, "entryStreamType");
gtk_widget_show (entryStreamType);
entryNetworkStreamType = GTK_COMBO (comboNetworkStreamType)->entry;
gtk_widget_set_name (entryNetworkStreamType, "entryNetworkStreamType");
gtk_widget_show (entryNetworkStreamType);
hbox13 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox13, "hbox13");
......@@ -591,11 +591,11 @@ create_pda (void)
gtk_widget_show (AddCameraToPlaylist);
gtk_box_pack_start (GTK_BOX (hbox16), AddCameraToPlaylist, FALSE, FALSE, 0);
Camera = gtk_label_new (_("Camera"));
gtk_widget_set_name (Camera, "Camera");
gtk_widget_show (Camera);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), Camera);
gtk_label_set_justify (GTK_LABEL (Camera), GTK_JUSTIFY_LEFT);
Server = gtk_label_new (_("Server"));
gtk_widget_set_name (Server, "Server");
gtk_widget_show (Server);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 2), Server);
gtk_label_set_justify (GTK_LABEL (Server), GTK_JUSTIFY_LEFT);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox1, "vbox1");
......@@ -776,10 +776,10 @@ create_pda (void)
gtk_widget_show (AddServerToPlaylist);
gtk_box_pack_start (GTK_BOX (hbox14), AddServerToPlaylist, FALSE, FALSE, 0);
Server = gtk_label_new (_("Server"));
gtk_widget_set_name (Server, "Server");
gtk_widget_show (Server);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 3), Server);
Camera = gtk_label_new (_("Camera"));
gtk_widget_set_name (Camera, "Camera");
gtk_widget_show (Camera);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 3), Camera);
vbox4 = gtk_vbox_new (FALSE, 0);
gtk_widget_set_name (vbox4, "vbox4");
......@@ -947,47 +947,26 @@ create_pda (void)
g_signal_connect ((gpointer) AddFileToPlaylist, "pressed",
G_CALLBACK (onAddFileToPlaylist),
NULL);
g_signal_connect ((gpointer) entryMRL, "changed",
G_CALLBACK (onEntryMRLChanged),
NULL);
g_signal_connect ((gpointer) entryMRL, "editing_done",
G_CALLBACK (onEntryMRLEditingDone),
g_signal_connect ((gpointer) comboMRL, "add",
G_CALLBACK (onNetworkMRLAdd),
NULL);
g_signal_connect ((gpointer) entryNetworkPort, "changed",
G_CALLBACK (onNetworkPortChanged),
NULL);
g_signal_connect ((gpointer) entryNetworkPort, "editing_done",
G_CALLBACK (onEntryNetworkPortEditingDone),
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryNetworkAddress, "changed",
G_CALLBACK (onNetworkAddressChanged),
NULL);
g_signal_connect ((gpointer) entryNetworkAddress, "editing_done",
G_CALLBACK (onEntryNetworkAddressEditingDone),
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryNetworkType, "changed",
G_CALLBACK (onNetworkTypeChanged),
NULL);
g_signal_connect ((gpointer) entryNetworkType, "editing_done",
G_CALLBACK (onEntryNetworkTypeEditingDone),
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryProtocolType, "changed",
G_CALLBACK (onProtocolTypeChanged),
g_signal_connect ((gpointer) entryNetworkProtocolType, "changed",
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryProtocolType, "editing_done",
G_CALLBACK (onEntryProtocolTypeEditingDone),
g_signal_connect ((gpointer) entryNetworkMRLType, "changed",
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryMRLType, "changed",
G_CALLBACK (onMRLTypeChanged),
NULL);
g_signal_connect ((gpointer) entryMRLType, "editing_done",
G_CALLBACK (onEntryMRLTypeEditingDone),
NULL);
g_signal_connect ((gpointer) entryStreamType, "changed",
G_CALLBACK (onStreamTypeChanged),
NULL);
g_signal_connect ((gpointer) entryStreamType, "editing_done",
G_CALLBACK (onEntryStreamTypeEditingDone),
g_signal_connect ((gpointer) entryNetworkStreamType, "changed",
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) AddNetworkPlaylist, "pressed",
G_CALLBACK (onAddNetworkPlaylist),
......@@ -1113,15 +1092,15 @@ create_pda (void)
GLADE_HOOKUP_OBJECT (pda, comboNetworkType, "comboNetworkType");
GLADE_HOOKUP_OBJECT (pda, entryNetworkType, "entryNetworkType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkType, "labelNetworkType");
GLADE_HOOKUP_OBJECT (pda, comboProtocolType, "comboProtocolType");
GLADE_HOOKUP_OBJECT (pda, entryProtocolType, "entryProtocolType");
GLADE_HOOKUP_OBJECT (pda, comboNetworkProtocolType, "comboNetworkProtocolType");
GLADE_HOOKUP_OBJECT (pda, entryNetworkProtocolType, "entryNetworkProtocolType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkProtocol, "labelNetworkProtocol");
GLADE_HOOKUP_OBJECT (pda, labeNetworkMRLType, "labeNetworkMRLType");
GLADE_HOOKUP_OBJECT (pda, comboMRLType, "comboMRLType");
GLADE_HOOKUP_OBJECT (pda, entryMRLType, "entryMRLType");
GLADE_HOOKUP_OBJECT (pda, comboNetworkMRLType, "comboNetworkMRLType");
GLADE_HOOKUP_OBJECT (pda, entryNetworkMRLType, "entryNetworkMRLType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkStreamType, "labelNetworkStreamType");
GLADE_HOOKUP_OBJECT (pda, comboStreamType, "comboStreamType");
GLADE_HOOKUP_OBJECT (pda, entryStreamType, "entryStreamType");
GLADE_HOOKUP_OBJECT (pda, comboNetworkStreamType, "comboNetworkStreamType");
GLADE_HOOKUP_OBJECT (pda, entryNetworkStreamType, "entryNetworkStreamType");
GLADE_HOOKUP_OBJECT (pda, hbox13, "hbox13");
GLADE_HOOKUP_OBJECT (pda, AddNetworkPlaylist, "AddNetworkPlaylist");
GLADE_HOOKUP_OBJECT (pda, Network, "Network");
......@@ -1135,7 +1114,7 @@ create_pda (void)
GLADE_HOOKUP_OBJECT (pda, entryV4LVideo, "entryV4LVideo");
GLADE_HOOKUP_OBJECT (pda, hbox16, "hbox16");
GLADE_HOOKUP_OBJECT (pda, AddCameraToPlaylist, "AddCameraToPlaylist");
GLADE_HOOKUP_OBJECT (pda, Camera, "Camera");
GLADE_HOOKUP_OBJECT (pda, Server, "Server");
GLADE_HOOKUP_OBJECT (pda, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (pda, vbox6, "vbox6");
GLADE_HOOKUP_OBJECT (pda, frameVideo, "frameVideo");
......@@ -1162,7 +1141,7 @@ create_pda (void)
GLADE_HOOKUP_OBJECT (pda, label41, "label41");
GLADE_HOOKUP_OBJECT (pda, hbox14, "hbox14");
GLADE_HOOKUP_OBJECT (pda, AddServerToPlaylist, "AddServerToPlaylist");
GLADE_HOOKUP_OBJECT (pda, Server, "Server");
GLADE_HOOKUP_OBJECT (pda, Camera, "Camera");
GLADE_HOOKUP_OBJECT (pda, vbox4, "vbox4");
GLADE_HOOKUP_OBJECT (pda, scrolledwindow5, "scrolledwindow5");
GLADE_HOOKUP_OBJECT (pda, tvPlaylist, "tvPlaylist");
......
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