Changeset 43e9ac1b1221037bc56627c6ebbadfafb7678027

Show
Ignore:
Timestamp:
07/12/03 19:58:38 (5 years ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1070823518 +0000
git-parent:

[f52f267ac45531f5c539724cbf63cddfeca49e3c]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1070823518 +0000
Message:

PDA Interface:
- some cleanup
- reinstated automatic lowering of interface when play button was pressed.
- double click in playlist window play selected items.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/pda/pda_callbacks.c

    r0c6e14d r43e9ac1  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000, 2001 VideoLAN 
    5  * $Id: pda_callbacks.c,v 1.22 2003/12/06 22:41:40 jpsaman Exp $ 
     5 * $Id: pda_callbacks.c,v 1.23 2003/12/07 18:58:38 jpsaman Exp $ 
    66 * 
    77 * Authors: Jean-Paul Saman <jpsaman@wxs.nl> 
     
    381381            vlc_mutex_unlock( &p_playlist->object_lock ); 
    382382            playlist_Play( p_playlist ); 
     383            gdk_window_lower( p_intf->p_sys->p_window->window ); 
    383384        } 
    384385        else 
     
    400401        playlist_Stop( p_playlist ); 
    401402        vlc_object_release( p_playlist ); 
     403        gdk_window_raise( p_intf->p_sys->p_window->window ); 
    402404    } 
    403405} 
     
    519521                } 
    520522            } 
    521             else 
    522             { 
    523                 gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) treeview); 
    524             } 
    525         } 
    526     } 
    527     else 
    528     { 
    529         gtk_tree_selection_selected_foreach(p_selection, (GtkTreeSelectionForeachFunc) &addSelectedToPlaylist, (gpointer) treeview); 
     523        } 
    530524    } 
    531525} 
     
    750744                   GtkTreeViewColumn *column, gpointer user_data) 
    751745{ 
     746    intf_thread_t *p_intf = GtkGetIntf( GTK_WIDGET(treeview) ); 
     747    GtkTreeSelection *p_selection = gtk_tree_view_get_selection(treeview); 
     748    playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, 
     749                                                       FIND_ANYWHERE ); 
     750 
     751    if( p_playlist == NULL ) 
     752    { 
     753        return; // FALSE; 
     754    } 
     755 
     756    if (gtk_tree_selection_count_selected_rows(p_selection) == 1) 
     757    { 
     758        GtkTreeModel *p_model; 
     759        GtkTreeIter   iter; 
     760        int           i_row; 
     761 
     762        /* This might be a directory selection */ 
     763        p_model = gtk_tree_view_get_model(treeview); 
     764        if (!p_model) 
     765        { 
     766            msg_Err(p_intf, "PDA: Playlist model contains a NULL pointer\n" ); 
     767            return; 
     768        } 
     769        if (!gtk_tree_model_get_iter(p_model, &iter, path)) 
     770        { 
     771            msg_Err( p_intf, "PDA: Playlist could not get iter from model" ); 
     772            return; 
     773        } 
     774 
     775        gtk_tree_model_get(p_model, &iter, 2, &i_row, -1); 
     776        playlist_Goto( p_playlist, i_row ); 
     777    } 
     778    vlc_object_release( p_playlist ); 
    752779} 
    753780 
  • modules/gui/pda/pda_callbacks.h

    r0c6e14d r43e9ac1  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: pda_callbacks.h,v 1.11 2003/12/06 22:41:40 jpsaman Exp $ 
     5 * $Id: pda_callbacks.h,v 1.12 2003/12/07 18:58:38 jpsaman Exp $ 
    66 * 
    77 * Authors: Jean-Paul Saman <jpsaman@wxs.nl> 
     
    2828 
    2929void ReadDirectory( intf_thread_t *p_intf, GtkListStore *p_list, char *psz_dir ); 
    30 #if 0 
    31 void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url ); 
    32 #endif 
    3330void PlaylistRebuildListStore( GtkListStore *p_list, playlist_t * p_playlist ); 
    3431