Commit 8da122f0 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Basic functionality of File tabpage is working.

parent 40693f98
......@@ -2,7 +2,7 @@
* pda.c : PDA Gtk2 plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: pda.c,v 1.6 2003/11/07 07:59:00 jpsaman Exp $
* $Id: pda.c,v 1.7 2003/11/07 09:24:58 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* Marc Ariberti <marcari@videolan.org>
......@@ -175,13 +175,6 @@ static void Run( intf_thread_t *p_intf )
msg_Err( p_intf, "unable to create pda interface" );
}
#if 0
msg_Dbg( p_intf, "setting main window size ... " );
gtk_widget_set_usize(p_intf->p_sys->p_window,
gdk_screen_width() , gdk_screen_height() - 30 );
msg_Dbg( p_intf, "setting main window size ... done" );
#endif
/* Set the title of the main window */
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
VOUT_TITLE " (PDA Linux interface)");
......@@ -226,26 +219,31 @@ static void Run( intf_thread_t *p_intf )
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 0, _("Filename"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 0 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 0 );
gtk_tree_view_column_set_sort_column_id(column, 0);
/* Insert columns 1 */
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 1, _("Permissions"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 1 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 1 );
gtk_tree_view_column_set_sort_column_id(column, 1);
/* Insert columns 2 */
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 2, _("Size"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 2 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 2 );
gtk_tree_view_column_set_sort_column_id(column, 2);
/* Insert columns 3 */
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 3, _("Owner"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 3 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 3 );
gtk_tree_view_column_set_sort_column_id(column, 3);
/* Insert columns 4 */
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 4, _("Group"), renderer, NULL);
column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 4 );
gtk_tree_view_column_add_attribute(column, renderer, "text", 4 );
gtk_tree_view_column_set_sort_column_id(column, 4);
/* Get new directory listing */
msg_Dbg(p_intf, "Populating GtkTreeView FileList" );
......
......@@ -248,7 +248,6 @@
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<signal name="row_activated" handler="onFileListRow" last_modification_time="Fri, 26 Sep 2003 13:30:40 GMT"/>
<signal name="columns_changed" handler="onFileListColumns" last_modification_time="Fri, 26 Sep 2003 13:30:01 GMT"/>
<signal name="select_cursor_row" handler="onFileListRowSelected" last_modification_time="Fri, 26 Sep 2003 13:31:20 GMT"/>
</widget>
</child>
......@@ -2115,23 +2114,6 @@
<widget class="GtkFixed" id="fixed2">
<property name="visible">True</property>
<child>
<widget class="GtkImage" id="pixmap2">
<property name="width_request">0</property>
<property name="height_request">0</property>
<property name="visible">True</property>
<property name="pixbuf">vlc48x48.png</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="x">0</property>
<property name="y">0</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="labelCopyright">
<property name="width_request">0</property>
......@@ -2241,6 +2223,23 @@
<property name="y">192</property>
</packing>
</child>
<child>
<widget class="GtkImage" id="aboutImage">
<property name="width_request">48</property>
<property name="height_request">48</property>
<property name="visible">True</property>
<property name="pixbuf">vlc48x48.png</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="x">0</property>
<property name="y">0</property>
</packing>
</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.3 2003/11/07 07:59:00 jpsaman Exp $
* $Id: pda_callbacks.c,v 1.4 2003/11/07 09:24:58 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -598,7 +598,14 @@ void
onAddFileToPlaylist (GtkButton *button,
gpointer user_data)
{
GtkTreeView *treeview = NULL;
g_print("onAddFileToPlaylist\n");
treeview = (GtkTreeView *) lookup_widget( GTK_WIDGET(button), "tvFileList");
if (treeview)
{
onFileListRow(treeview, NULL, NULL, NULL );
}
}
......@@ -978,3 +985,4 @@ onPreferenceCancel (GtkButton *button,
}
......@@ -2,7 +2,7 @@
* callbacks.h : pda plugin for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: pda_callbacks.h,v 1.1 2003/10/01 20:58:45 jpsaman Exp $
* $Id: pda_callbacks.h,v 1.2 2003/11/07 09:24:58 jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
......@@ -23,6 +23,9 @@
#include <gtk/gtk.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
void ReadDirectory( intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir );
void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url );
void PlaylistRebuildListStore( GtkListStore *p_list, playlist_t * p_playlist );
......@@ -272,3 +275,4 @@ onPreferenceApply (GtkButton *button,
void
onPreferenceCancel (GtkButton *button,
gpointer user_data);
......@@ -15,9 +15,6 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "pda_callbacks.h"
#include "pda_interface.h"
#include "pda_support.h"
......@@ -147,12 +144,12 @@ create_pda (void)
GtkWidget *scrolledwindow3;
GtkWidget *viewport1;
GtkWidget *fixed2;
GtkWidget *pixmap2;
GtkWidget *labelCopyright;
GtkWidget *labelProgramName;
GtkWidget *labelAuthors;
GtkWidget *labelDescription;
GtkWidget *labelWebSite;
GtkWidget *aboutImage;
GtkWidget *about;
pda = gtk_window_new (GTK_WINDOW_TOPLEVEL);
......@@ -914,12 +911,6 @@ create_pda (void)
gtk_widget_show (fixed2);
gtk_container_add (GTK_CONTAINER (viewport1), fixed2);
pixmap2 = create_pixmap (pda, "vlc48x48.png");
gtk_widget_set_name (pixmap2, "pixmap2");
gtk_widget_show (pixmap2);
gtk_fixed_put (GTK_FIXED (fixed2), pixmap2, 0, 0);
gtk_widget_set_size_request (pixmap2, 0, 0);
labelCopyright = gtk_label_new (_("(c) 1996-2003 the VideoLAN team"));
gtk_widget_set_name (labelCopyright, "labelCopyright");
gtk_widget_show (labelCopyright);
......@@ -955,6 +946,12 @@ create_pda (void)
gtk_fixed_put (GTK_FIXED (fixed2), labelWebSite, 16, 192);
gtk_widget_set_size_request (labelWebSite, 208, 16);
aboutImage = create_pixmap (pda, "vlc48x48.png");
gtk_widget_set_name (aboutImage, "aboutImage");
gtk_widget_show (aboutImage);
gtk_fixed_put (GTK_FIXED (fixed2), aboutImage, 0, 0);
gtk_widget_set_size_request (aboutImage, 48, 48);
about = gtk_label_new (_("About"));
gtk_widget_set_name (about, "about");
gtk_widget_show (about);
......@@ -999,9 +996,6 @@ create_pda (void)
g_signal_connect ((gpointer) tvFileList, "row_activated",
G_CALLBACK (onFileListRow),
NULL);
g_signal_connect ((gpointer) tvFileList, "columns_changed",
G_CALLBACK (onFileListColumns),
NULL);
g_signal_connect ((gpointer) tvFileList, "select_cursor_row",
G_CALLBACK (onFileListRowSelected),
NULL);
......@@ -1244,12 +1238,12 @@ create_pda (void)
GLADE_HOOKUP_OBJECT (pda, scrolledwindow3, "scrolledwindow3");
GLADE_HOOKUP_OBJECT (pda, viewport1, "viewport1");
GLADE_HOOKUP_OBJECT (pda, fixed2, "fixed2");
GLADE_HOOKUP_OBJECT (pda, pixmap2, "pixmap2");
GLADE_HOOKUP_OBJECT (pda, labelCopyright, "labelCopyright");
GLADE_HOOKUP_OBJECT (pda, labelProgramName, "labelProgramName");
GLADE_HOOKUP_OBJECT (pda, labelAuthors, "labelAuthors");
GLADE_HOOKUP_OBJECT (pda, labelDescription, "labelDescription");
GLADE_HOOKUP_OBJECT (pda, labelWebSite, "labelWebSite");
GLADE_HOOKUP_OBJECT (pda, aboutImage, "aboutImage");
GLADE_HOOKUP_OBJECT (pda, about, "about");
return pda;
......
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