Commit 85c211fe authored by Jean-Paul Saman's avatar Jean-Paul Saman

Fixes for for Familiar Linux.

parent 78e3c0c4
......@@ -25,7 +25,7 @@
<class>GtkWindow</class>
<name>familiar</name>
<width>240</width>
<height>320</height>
<height>300</height>
<signal>
<name>delete_event</name>
<handler>on_familiar_delete_event</handler>
......@@ -48,6 +48,7 @@
<widget>
<class>GtkToolbar</class>
<name>toolbar</name>
<border_width>2</border_width>
<width>112</width>
<height>16</height>
<orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
......@@ -181,26 +182,6 @@
</widget>
</widget>
<widget>
<class>GtkProgressBar</class>
<name>progress</name>
<value>0</value>
<lower>0</lower>
<upper>100</upper>
<bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
<orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
<activity_mode>True</activity_mode>
<show_text>False</show_text>
<format>%P %%</format>
<text_xalign>0.5</text_xalign>
<text_yalign>0.5</text_yalign>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkNotebook</class>
<name>notebook</name>
......@@ -238,42 +219,6 @@
<ypad>0</ypad>
</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
udpstream://@:1234
</items>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>comboURL-entry</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>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text>file://</text>
</widget>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow1</name>
......@@ -300,21 +245,6 @@ udpstream://@:1234
<handler>on_clistmedia_click_column</handler>
<last_modification_time>Sun, 18 Aug 2002 19:41:06 GMT</last_modification_time>
</signal>
<signal>
<name>start_selection</name>
<handler>on_clistmedia_start_selection</handler>
<last_modification_time>Tue, 01 Oct 2002 19:25:54 GMT</last_modification_time>
</signal>
<signal>
<name>end_selection</name>
<handler>on_clistmedia_end_selection</handler>
<last_modification_time>Tue, 01 Oct 2002 19:26:13 GMT</last_modification_time>
</signal>
<signal>
<name>enter_notify_event</name>
<handler>on_clistmedia_enter_notify_event</handler>
<last_modification_time>Tue, 01 Oct 2002 19:26:50 GMT</last_modification_time>
</signal>
<columns>5</columns>
<column_widths>123,80,80,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
......@@ -387,6 +317,43 @@ udpstream://@:1234
</widget>
</widget>
</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>/mnt
file://
ftp://
http://
udp://@:1234
udpstream://@:1234
</items>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>comboURL-entry</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>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text>/mnt</text>
</widget>
</widget>
</widget>
<widget>
......
......@@ -2,7 +2,7 @@
* familiar_callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: familiar_callbacks.c,v 1.6.2.7 2002/10/02 21:41:50 jpsaman Exp $
* $Id: familiar_callbacks.c,v 1.6.2.8 2002/10/07 21:37:11 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -151,6 +151,8 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
gchar *ppsz_text[2];
int i;
if( p_intf->p_sys->p_clist == NULL )
intf_ErrMsg("ReadDirectory - ERROR p_intf->p_sys->p_clist == NULL");
gtk_clist_freeze( p_intf->p_sys->p_clist );
gtk_clist_clear( p_intf->p_sys->p_clist );
for (i=0; i<n; i++)
......@@ -461,7 +463,8 @@ on_clistmedia_select_row (GtkCList *clist,
GdkEvent *event,
gpointer user_data)
{
intf_thread_t *p_intf = GtkGetIntf( clist );
// intf_thread_t *p_intf = GtkGetIntf( clist );
intf_thread_t *p_intf = p_main->p_intf;
gchar *text[2];
gint ret;
struct stat st;
......@@ -473,10 +476,14 @@ on_clistmedia_select_row (GtkCList *clist,
{
if (S_ISDIR(st.st_mode))
ReadDirectory(p_intf->p_sys->p_clist, text[0]);
else
else if( (S_ISLNK(st.st_mode)) || (S_ISCHR(st.st_mode)) ||
(S_ISBLK(st.st_mode)) || (S_ISFIFO(st.st_mode))||
(S_ISSOCK(st.st_mode))|| (S_ISREG(st.st_mode)) )
{
MediaURLOpenChanged(GTK_WIDGET(p_intf->p_sys->p_clist), text[0]);
}
}
}
}
void
......@@ -496,32 +503,6 @@ on_familiar_delete_event (GtkWidget *widget,
}
void
on_clistmedia_start_selection (GtkCList *clist,
gpointer user_data)
{
g_print( ">>>>start_selection\n" );
}
void
on_clistmedia_end_selection (GtkCList *clist,
gpointer user_data)
{
g_print( ">>>>end_selection\n" );
}
gboolean
on_clistmedia_enter_notify_event (GtkWidget *widget,
GdkEventCrossing *event,
gpointer user_data)
{
g_print( ">>>>enter_notify_event\n" );
return FALSE;
}
void
on_buttonSave_clicked (GtkButton *button,
gpointer user_data)
......
......@@ -2,7 +2,7 @@
* familiar_callbacks.h : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: familiar_callbacks.h,v 1.7.2.4 2002/10/01 21:17:52 jpsaman Exp $
* $Id: familiar_callbacks.h,v 1.7.2.5 2002/10/07 21:37:11 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -86,21 +86,6 @@ on_familiar_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_clistmedia_start_selection (GtkCList *clist,
gpointer user_data);
void
on_clistmedia_end_selection (GtkCList *clist,
gpointer user_data);
gboolean
on_clistmedia_enter_notify_event (GtkWidget *widget,
GdkEventCrossing *event,
gpointer user_data);
void
on_buttonSave_clicked (GtkButton *button,
gpointer user_data);
......
......@@ -33,13 +33,9 @@ create_familiar (void)
GtkWidget *toolbar_stop;
GtkWidget *toolbar_forward;
GtkWidget *toolbar_about;
GtkWidget *progress;
GtkWidget *notebook;
GtkWidget *fixedMedia;
GtkWidget *labelUrl;
GtkWidget *comboURL;
GList *comboURL_items = NULL;
GtkWidget *comboURL_entry;
GtkWidget *scrolledwindow1;
GtkWidget *clistmedia;
GtkWidget *labelname;
......@@ -47,6 +43,9 @@ create_familiar (void)
GtkWidget *labelsize;
GtkWidget *labeluid;
GtkWidget *labelgid;
GtkWidget *comboURL;
GList *comboURL_items = NULL;
GtkWidget *comboURL_entry;
GtkWidget *media;
GtkWidget *fixedPreferences;
GtkWidget *buttonSave;
......@@ -65,7 +64,7 @@ create_familiar (void)
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_widget_set_usize (familiar, 240, 300);
gtk_window_set_title (GTK_WINDOW (familiar), _("vlc (familiar)"));
gtk_window_set_policy (GTK_WINDOW (familiar), TRUE, TRUE, TRUE);
......@@ -85,6 +84,7 @@ create_familiar (void)
gtk_widget_show (toolbar);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, TRUE, TRUE, 0);
gtk_widget_set_usize (toolbar, 112, 16);
gtk_container_set_border_width (GTK_CONTAINER (toolbar), 2);
tmp_toolbar_icon = create_pixmap (familiar, "familiar-openb16x16.xpm");
toolbar_open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
......@@ -194,15 +194,6 @@ create_familiar (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_about);
progress = gtk_progress_bar_new ();
gtk_widget_set_name (progress, "progress");
gtk_widget_ref (progress);
gtk_object_set_data_full (GTK_OBJECT (familiar), "progress", progress,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (progress);
gtk_box_pack_start (GTK_BOX (vbox), progress, FALSE, FALSE, 0);
gtk_progress_set_activity_mode (GTK_PROGRESS (progress), TRUE);
notebook = gtk_notebook_new ();
gtk_widget_set_name (notebook, "notebook");
gtk_widget_ref (notebook);
......@@ -229,31 +220,6 @@ create_familiar (void)
gtk_widget_set_uposition (labelUrl, 4, 8);
gtk_widget_set_usize (labelUrl, 38, 18);
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) _("udpstream://@: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://"));
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");
gtk_widget_ref (scrolledwindow1);
......@@ -318,6 +284,32 @@ create_familiar (void)
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) _("/mnt"));
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) _("udpstream://@: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), _("/mnt"));
media = gtk_label_new (_("Media"));
gtk_widget_set_name (media, "media");
gtk_widget_ref (media);
......@@ -480,23 +472,14 @@ create_familiar (void)
gtk_signal_connect (GTK_OBJECT (toolbar_about), "clicked",
GTK_SIGNAL_FUNC (on_toolbar_about_clicked),
NULL);
gtk_signal_connect (GTK_OBJECT (comboURL_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 (clistmedia), "start_selection",
GTK_SIGNAL_FUNC (on_clistmedia_start_selection),
NULL);
gtk_signal_connect (GTK_OBJECT (clistmedia), "end_selection",
GTK_SIGNAL_FUNC (on_clistmedia_end_selection),
NULL);
gtk_signal_connect (GTK_OBJECT (clistmedia), "enter_notify_event",
GTK_SIGNAL_FUNC (on_clistmedia_enter_notify_event),
gtk_signal_connect (GTK_OBJECT (comboURL_entry), "changed",
GTK_SIGNAL_FUNC (on_comboURL_entry_changed),
NULL);
gtk_signal_connect (GTK_OBJECT (buttonSave), "clicked",
GTK_SIGNAL_FUNC (on_buttonSave_clicked),
......
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