Commit 28521d8e authored by Jean-Paul Saman's avatar Jean-Paul Saman

PDA Interface

* simplefied network tabpage
parent 6b4fa4aa
......@@ -653,7 +653,7 @@
<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>
......@@ -667,143 +667,63 @@
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem21">
<widget class="GtkListItem" id="listitem1101">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">IPv4</property>
<property name="label" translatable="yes">udp</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem22">
<widget class="GtkListItem" id="listitem1102">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">IPv6</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="labelNetworkProtocol">
<property name="visible">True</property>
<property name="label" translatable="yes">Protocol:</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>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="labeNetworkMRLType">
<property name="visible">True</property>
<property name="label" translatable="yes">MRL:</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>
<property name="label" translatable="yes">udp6</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkCombo" id="comboNetworkMRLType">
<property name="visible">True</property>
<property name="value_in_list">False</property>
<property name="allow_empty">True</property>
<property name="case_sensitive">False</property>
<property name="enable_arrow_keys">True</property>
<property name="enable_arrows_always">False</property>
<child internal-child="entry">
<widget class="GtkEntry" id="entryNetworkMRLType">
<widget class="GtkListItem" id="listitem1103">
<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">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="NetworkBuildMRL" last_modification_time="Sat, 08 Nov 2003 13:35:14 GMT"/>
<property name="label" translatable="yes">rtp</property>
</widget>
</child>
<child internal-child="list">
<widget class="GtkList" id="listNetworkMRLType">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem630">
<widget class="GtkListItem" id="listitem1104">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">udp</property>
<property name="label" translatable="yes">rtp4</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem631">
<widget class="GtkListItem" id="listitem1105">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">rtp</property>
<property name="label" translatable="yes">ftp</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem632">
<widget class="GtkListItem" id="listitem1106">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">ftp</property>
<property name="label" translatable="yes">http</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem633">
<widget class="GtkListItem" id="listitem1107">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">http</property>
<property name="label" translatable="yes">sout</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem634">
<widget class="GtkListItem" id="listitem1108">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">mms</property>
......@@ -815,16 +735,16 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="labelNetworkStreamType">
<widget class="GtkLabel" id="labelNetworkProtocol">
<property name="visible">True</property>
<property name="label" translatable="yes">Stream:</property>
<property name="label" translatable="yes">Protocol:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
......@@ -838,68 +758,12 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkCombo" id="comboNetworkStreamType">
<property name="visible">True</property>
<property name="value_in_list">False</property>
<property name="allow_empty">True</property>
<property name="case_sensitive">False</property>
<property name="enable_arrow_keys">True</property>
<property name="enable_arrows_always">False</property>
<child internal-child="entry">
<widget class="GtkEntry" id="entryNetworkStreamType">
<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="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
<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="listNetworkStreamType">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem80">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">server</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem81">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">client</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
......@@ -1341,7 +1205,7 @@
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes">huff</property>
<property name="text" translatable="yes">raw</property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
......@@ -1354,6 +1218,30 @@
<widget class="GtkList" id="listVideoCodec">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem1141">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">raw</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem1142">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">huff</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem1143">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes"></property>
</widget>
</child>
</widget>
</child>
</widget>
......@@ -1562,7 +1450,7 @@
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes">alaw</property>
<property name="text" translatable="yes">raw</property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
......@@ -1575,6 +1463,30 @@
<widget class="GtkList" id="listAudioCodec">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="listitem1129">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">raw</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem1130">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">alaw</property>
</widget>
</child>
<child>
<widget class="GtkListItem" id="listitem1131">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">ulaw</property>
</widget>
</child>
</widget>
</child>
</widget>
......
......@@ -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.7 2003/11/08 16:04:05 jpsaman Exp $
* $Id: pda_callbacks.c,v 1.8 2003/11/08 18:31:01 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -588,53 +588,36 @@ NetworkBuildMRL (GtkEditable *editable,
{
GtkSpinButton *networkPort = NULL;
GtkEntry *entryMRL = NULL;
GtkEntry *networkMRLType = NULL;
GtkEntry *networkType = NULL;
GtkEntry *networkAddress = NULL;
GtkEntry *networkProtocol = NULL;
GtkEntry *networkType = NULL;
const gchar *mrlType;
const gchar *mrlNetworkType;
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" );
networkMRLType = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkMRLType" );
networkType = (GtkEntry*) lookup_widget( GTK_WIDGET(editable), "entryNetworkType" );
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));
mrlNetworkType = gtk_entry_get_text(GTK_ENTRY(networkType));
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, "://" );
pos = snprintf( &text[0], VLC_MAX_MRL, "%s://", (char*)mrlProtocol);
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 );
}
if (pos >= VLC_MAX_MRL)
text[VLC_MAX_MRL-1]='\0';
......
......@@ -73,14 +73,6 @@ create_pda (void)
GList *comboNetworkProtocolType_items = NULL;
GtkWidget *entryNetworkProtocolType;
GtkWidget *labelNetworkProtocol;
GtkWidget *labeNetworkMRLType;
GtkWidget *comboNetworkMRLType;
GList *comboNetworkMRLType_items = NULL;
GtkWidget *entryNetworkMRLType;
GtkWidget *labelNetworkStreamType;
GtkWidget *comboNetworkStreamType;
GList *comboNetworkStreamType_items = NULL;
GtkWidget *entryNetworkStreamType;
GtkWidget *hbox13;
GtkWidget *AddNetworkPlaylist;
GtkWidget *Network;
......@@ -434,14 +426,21 @@ create_pda (void)
gtk_table_attach (GTK_TABLE (table2), comboNetworkProtocolType, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("IPv4"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("IPv6"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("udp"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("udp6"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("rtp"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("rtp4"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("ftp"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("http"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("sout"));
comboNetworkProtocolType_items = g_list_append (comboNetworkProtocolType_items, (gpointer) _("mms"));
gtk_combo_set_popdown_strings (GTK_COMBO (comboNetworkProtocolType), comboNetworkProtocolType_items);
g_list_free (comboNetworkProtocolType_items);
entryNetworkProtocolType = GTK_COMBO (comboNetworkProtocolType)->entry;
gtk_widget_set_name (entryNetworkProtocolType, "entryNetworkProtocolType");
gtk_widget_show (entryNetworkProtocolType);
gtk_entry_set_text (GTK_ENTRY (entryNetworkProtocolType), _("udp"));
labelNetworkProtocol = gtk_label_new (_("Protocol:"));
gtk_widget_set_name (labelNetworkProtocol, "labelNetworkProtocol");
......@@ -452,62 +451,6 @@ create_pda (void)
gtk_label_set_justify (GTK_LABEL (labelNetworkProtocol), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkProtocol), 0, 0.5);
labeNetworkMRLType = gtk_label_new (_("MRL:"));
gtk_widget_set_name (labeNetworkMRLType, "labeNetworkMRLType");
gtk_widget_show (labeNetworkMRLType);
gtk_table_attach (GTK_TABLE (table2), labeNetworkMRLType, 0, 1, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labeNetworkMRLType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labeNetworkMRLType), 0, 0.5);
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);
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");
gtk_widget_show (labelNetworkStreamType);
gtk_table_attach (GTK_TABLE (table2), labelNetworkStreamType, 0, 1, 5, 6,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (labelNetworkStreamType), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (labelNetworkStreamType), 0, 0.5);
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);
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);
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");
gtk_widget_show (hbox13);
......@@ -962,12 +905,6 @@ create_pda (void)
g_signal_connect ((gpointer) entryNetworkProtocolType, "changed",
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryNetworkMRLType, "changed",
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) entryNetworkStreamType, "changed",
G_CALLBACK (NetworkBuildMRL),
NULL);
g_signal_connect ((gpointer) AddNetworkPlaylist, "pressed",
G_CALLBACK (onAddNetworkPlaylist),
NULL);
......@@ -1095,12 +1032,6 @@ create_pda (void)
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, comboNetworkMRLType, "comboNetworkMRLType");
GLADE_HOOKUP_OBJECT (pda, entryNetworkMRLType, "entryNetworkMRLType");
GLADE_HOOKUP_OBJECT (pda, labelNetworkStreamType, "labelNetworkStreamType");
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");
......
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