Commit 4343919e authored by Jean-Paul Saman's avatar Jean-Paul Saman

PDA interface:

* Directory browsing works
* Coredump is solved
* Adding files or entire directories to the playlist GUI control works.
parent 1b18a015
......@@ -2,7 +2,7 @@
* callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: callbacks.c,v 1.1 2003/07/23 22:02:56 jpsaman Exp $
* $Id: callbacks.c,v 1.2 2003/11/07 13:01:51 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -425,7 +425,7 @@ on_comboURL_entry_changed (GtkEditable *editable,
{
intf_thread_t * p_intf = GtkGetIntf( GTK_WIDGET(editable) );
gchar * psz_url;
struct stat st;
struct stat st;
psz_url = gtk_entry_get_text(GTK_ENTRY(editable));
/* if( (strncmp("file://",(const char *) psz_url,7)==0) ||
......
......@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.7 2003/11/07 09:24:58 jpsaman Exp $
* $Id: pda.c,v 1.8 2003/11/07 13:01:51 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
......@@ -147,14 +147,15 @@ static void Run( intf_thread_t *p_intf )
#endif
GtkCellRenderer *renderer = NULL;
GtkTreeViewColumn *column = NULL;
GtkListStore *filelist = NULL;
gtk_set_locale ();
#ifndef NEED_GTK2_MAIN
gtk_set_locale ();
msg_Dbg( p_intf, "Starting pda GTK2+ interface" );
gtk_init( &i_args, &pp_args );
#else
/* Initialize Gtk+ */
msg_Dbg( p_intf, "Starting pda GTK+ interface thread" );
msg_Dbg( p_intf, "Starting pda GTK2+ interface thread" );
gdk_threads_enter();
#endif
......@@ -182,9 +183,7 @@ static void Run( intf_thread_t *p_intf )
/* Get the notebook object */
p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
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(
GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) );
......@@ -247,16 +246,16 @@ static void Run( intf_thread_t *p_intf )
/* Get new directory listing */
msg_Dbg(p_intf, "Populating GtkTreeView FileList" );
p_intf->p_sys->p_filelist = gtk_list_store_new (5,
G_TYPE_STRING, /* Filename */
G_TYPE_STRING, /* permissions */
G_TYPE_UINT64, /* File size */
G_TYPE_STRING, /* Owner */
G_TYPE_STRING);/* Group */
ReadDirectory(p_intf, p_intf->p_sys->p_filelist, ".");
filelist = gtk_list_store_new (5,
G_TYPE_STRING, /* Filename */
G_TYPE_STRING, /* permissions */
G_TYPE_UINT64, /* File size */
G_TYPE_STRING, /* Owner */
G_TYPE_STRING);/* Group */
ReadDirectory(filelist, ".");
msg_Dbg(p_intf, "Showing GtkTreeView FileList" );
gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile), GTK_TREE_MODEL(p_intf->p_sys->p_filelist));
g_object_unref(p_intf->p_sys->p_filelist); /* Model will be released by GtkTreeView */
gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile), GTK_TREE_MODEL(filelist));
g_object_unref(filelist); /* Model will be released by GtkTreeView */
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile)),GTK_SELECTION_MULTIPLE);
/* Column properties */
......@@ -278,11 +277,13 @@ static void Run( intf_thread_t *p_intf )
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 0, _("Filename"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 0 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 0 );
gtk_tree_view_column_set_sort_column_id(column, 0);
/* Column 2 */
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 1, _("Time"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 1 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 1 );
gtk_tree_view_column_set_sort_column_id(column, 1);
/* update the playlist */
msg_Dbg(p_intf, "Populating GtkTreeView Playlist" );
......@@ -305,15 +306,11 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_mrlentry = GTK_ENTRY( gtk_object_get_data(
GTK_OBJECT( p_intf->p_sys->p_window ), "mrl_entry" ) );
#if 0
/* Store p_intf to keep an eye on it */
msg_Dbg( p_intf, "trying to store p_intf pointer ... " );
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 );
msg_Dbg( p_intf, "trying to store p_intf pointer ... done" );
#endif
/* Show the control window */
gtk_widget_show( p_intf->p_sys->p_window );
......
......@@ -31,45 +31,6 @@
<property name="toolbar_style">GTK_TOOLBAR_ICONS</property>
<property name="tooltips">True</property>
<child>
<widget class="button" id="tbOpen">
<property name="width_request">22</property>
<property name="height_request">22</property>
<property name="visible">True</property>
<property name="tooltip" translatable="yes">File</property>
<property name="label" translatable="yes">Open</property>
<property name="use_underline">True</property>
<property name="icon">pda-openb16x16.xpm</property>
<signal name="clicked" handler="onFileOpen" last_modification_time="Fri, 26 Sep 2003 12:26:11 GMT"/>
</widget>
</child>
<child>
<widget class="button" id="tbPlaylist">
<property name="width_request">22</property>
<property name="height_request">22</property>
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Playlist</property>
<property name="label" translatable="yes">Playlist</property>
<property name="use_underline">True</property>
<property name="icon">pda-playlistb16x16.xpm</property>
<signal name="clicked" handler="onPlaylist" last_modification_time="Fri, 26 Sep 2003 12:26:23 GMT"/>
</widget>
</child>
<child>
<widget class="button" id="tbPreferences">
<property name="width_request">22</property>
<property name="height_request">22</property>
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Preferences</property>
<property name="label" translatable="yes">Preferences</property>
<property name="use_underline">True</property>
<property name="icon">pda-preferencesb16x16.xpm</property>
<signal name="clicked" handler="onPreferences" last_modification_time="Fri, 26 Sep 2003 12:26:36 GMT"/>
</widget>
</child>
<child>
<widget class="button" id="tbRewind">
<property name="width_request">22</property>
......@@ -157,7 +118,7 @@
<child>
<widget class="GtkLabel" id="timeLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">0:00:00</property>
<property name="label" translatable="yes">00:00:00</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.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: pda.h,v 1.3 2003/10/03 18:04:58 jpsaman Exp $
* $Id: pda.h,v 1.4 2003/11/07 13:01:51 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -35,11 +35,9 @@ struct intf_sys_t
GtkWidget *p_window; /* main window */
GtkEntry *p_mrlentry;
GtkNotebook *p_notebook;
GtkNotebook *p_mediabook;
GtkHScale *p_slider;
GtkTreeView *p_tvfile;
GtkTreeView *p_tvplaylist;
GtkListStore *p_filelist; /* File list widget */
GtkListStore *p_playlist; /* Playlist widget */
/* slider */
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* callbacks.h : pda plugin for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: pda_callbacks.h,v 1.2 2003/11/07 09:24:58 jpsaman Exp $
* $Id: pda_callbacks.h,v 1.3 2003/11/07 13:01:51 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -26,7 +26,7 @@
#include <vlc/vlc.h>
#include <vlc/intf.h>
void ReadDirectory( intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir );
void ReadDirectory( GtkListStore *p_list, char *psz_dir );
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url );
void PlaylistRebuildListStore( GtkListStore *p_list, playlist_t * p_playlist );
......
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