[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-player-dev
Subject:    [Player-dev] CR/CN: Fix for bug 8656 [RP4NB Project]
From:       "Deepak Jain" <deepakj () real ! com>
Date:       2008-09-30 12:30:05
Message-ID: 35824.61.246.1.170.1222777805.squirrel () mailone ! real ! com
[Download RAW message or body]

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not support MIME-formatted messages.


Project: RealPlayer for Netbook

Synopsis: Fix for Bug 8656--> After selecting files in "Media Library" or
"My Playlist", "Play" button should become active.

Synopsis;
In Real Player for windows, after selecting a file in the media library,
the play button becomes active so that clicking that button plays that
file.

Earlier the functionality has been implemented once for initializing the
media Library but the requirement is that once a user STOP a running file
and then click a music/video entry, that entry too gets played.

Now that has been implemented.

Also some indentation issues fixed in medialib.cpp

Files Modified:
player/app/gtk/mainapp.cpp
player/app/gtk/medialib.cpp

Image Size and Heap Use impact (Client -Only):
None.

Platforms and Profiles Affected:
Linux

Distribution Libraries Affected:
None.

Distribution library impact and planned action:
None.

Platforms and Profiles Build Verified:
Profile: helix_client_all_defines
Target: linux_realplayer
BIF: realplay_gtk_atlas_restricted

Branch:
Atlas310

Files Attached:
gtk.diff

Thanks,
Deepak Jain
["gtk.diff" (text/x-patch)]

Index: gtk/mainapp.cpp
===================================================================
RCS file: /cvsroot/player/app/gtk/mainapp.cpp,v
retrieving revision 1.141.2.25
diff -u -r1.141.2.25 mainapp.cpp
--- gtk/mainapp.cpp	29 Sep 2008 07:42:08 -0000	1.141.2.25
+++ gtk/mainapp.cpp	30 Sep 2008 12:17:29 -0000
@@ -2162,6 +2162,10 @@
 hxwindow_play(HXMainWindow* window)
 {
     window->set_url_only = FALSE;
+    if ((window->hxmedia_lib->selected_type == MEDIATYPE_VIDEO) && \
(window->hxmedia_lib->bFileSelected == FALSE)) +    {
+        gtk_notebook_set_current_page(GTK_NOTEBOOK(window->hxmedia_lib->main_notebook), \
0); +    }
     hx_basic_playback_play(window->active_player);    
 }
 
@@ -2202,6 +2206,7 @@
 hmw_stop(GtkWidget* widget)
 {
     HXMainWindow* window = hxwindow_get_from_widget(widget);
+    window->hxmedia_lib->bFileSelected = FALSE;
     hxwindow_stop(window);
 }
 
Index: gtk/medialib.cpp
===================================================================
RCS file: /cvsroot/player/app/gtk/Attic/medialib.cpp,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 medialib.cpp
--- gtk/medialib.cpp	26 Sep 2008 17:46:15 -0000	1.1.2.13
+++ gtk/medialib.cpp	30 Sep 2008 12:17:30 -0000
@@ -97,7 +97,7 @@
     {
         selectedname = gtk_file_chooser_get_filename(filechooser);
         gtk_widget_destroy (GTK_WIDGET(filechooser));
-        gtk_widget_set_sensitive(pMedialib->medialib_scan, FALSE);	
+        gtk_widget_set_sensitive(pMedialib->medialib_scan, FALSE);
         pMedialib->media_library->ScanForMedia((char*)selectedname, \
pMedialib->media_helper);    g_free(selectedname);
     }
@@ -283,19 +283,19 @@
     
     selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
     if (gtk_tree_selection_count_selected_rows(selection)  <= 1)
-        {
+    {
         if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), (gint) event->x, \
                (gint) event->y,&path, NULL, NULL, NULL))
-            {
-                gtk_tree_selection_unselect_all(selection);
-                gtk_tree_selection_select_path(selection, path);
-                gtk_tree_model_get_iter(model, &window->hxmedia_lib->selected_iter, \
                path);
-                window->hxmedia_lib->selected_type = MEDIATYPE_AUDIO;
-                gtk_tree_path_free(path);
+        {
+            gtk_tree_selection_unselect_all(selection);
+            gtk_tree_selection_select_path(selection, path);
+            gtk_tree_model_get_iter(model, &window->hxmedia_lib->selected_iter, \
path); +            window->hxmedia_lib->selected_type = MEDIATYPE_AUDIO;
+            gtk_tree_path_free(path);
             if(event->button == 3) 
             {      
-        view_music_popup_menu(widget, event, user_data);
-        return TRUE; 
-    } 
+                view_music_popup_menu(widget, event, user_data);
+                return TRUE; 
+            } 
             else if(event->button == 1 && !window->hxmedia_lib->bFileSelected)
             {          
                 hxmediamanager_Select(window, \
window->hxmedia_lib->media_library->GetList(MEDIATYPE_AUDIO), \
window->hxmedia_lib->selected_iter,  window->hxmedia_lib->musictreeview, \
HXAUDIO_LISTVIEW); @@ -363,30 +363,30 @@
 
     HXMainWindow* window = (HXMainWindow*)user_data;
     GtkTreeModel *model = gtk_icon_view_get_model (GTK_ICON_VIEW(widget));
-        GList *selected_items= NULL;	  
-        selected_items = gtk_icon_view_get_selected_items (GTK_ICON_VIEW(widget));
-        if (g_list_length(selected_items) <=1)
-        {
-           GtkTreePath *path;
-           // Get tree path for row that was clicked 
-           path = gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget),
+    GList *selected_items= NULL;	  
+    selected_items = gtk_icon_view_get_selected_items (GTK_ICON_VIEW(widget));
+    if (g_list_length(selected_items) <=1)
+    {
+       GtkTreePath *path;
+       // Get tree path for row that was clicked 
+       path = gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget),
                                              (gint) event->x, 
                                              (gint) event->y);
-           if (path)
-           {
-               gtk_icon_view_select_path(GTK_ICON_VIEW(widget), path);
-               gtk_tree_model_get_iter(model, &window->hxmedia_lib->selected_iter, \
                path);
-               window->hxmedia_lib->selected_type = MEDIATYPE_VIDEO;
-               gtk_tree_path_free(path);
+       if (path)
+       {
+           gtk_icon_view_select_path(GTK_ICON_VIEW(widget), path);
+           gtk_tree_model_get_iter(model, &window->hxmedia_lib->selected_iter, \
path); +           window->hxmedia_lib->selected_type = MEDIATYPE_VIDEO;
+           gtk_tree_path_free(path);
             if (event->button == 3) 
             {  
-        view_video_popup_menu(widget, event, user_data);
-        return TRUE; 
-    } 
+                view_video_popup_menu(widget, event, user_data);
+                return TRUE; 
+            } 
             else if(event->button == 1 && !window->hxmedia_lib->bFileSelected)
             { 
                 hxmediamanager_Select(window, \
window->hxmedia_lib->media_library->GetList(MEDIATYPE_VIDEO), \
window->hxmedia_lib->selected_iter,  window->hxmedia_lib->videoiconview, \
                HXVIDEO_ICON_VIEW);
-               return FALSE;
+                return FALSE;
             }
         }
     } 
@@ -602,7 +602,7 @@
     }
     window->hxmedia_lib = pMedialib;
     window->hxmedia_lib->media_library = phxMed;	
-	pMedialib->bFileSelected = FALSE;
+    pMedialib->bFileSelected = FALSE;
     pMedialib->medialib_scan = glade_xml_get_widget((GladeXML *)window->xml, \
"hmw_my_lib_scan_for_media");  HX_ASSERT(pMedialib->medialib_scan);
     pMedialib->musictreeview = glade_xml_get_widget((GladeXML *)window->xml, \
"hmw_my_lib_music_tree_view"); @@ -672,7 +672,7 @@
     gtk_tree_view_set_model(GTK_TREE_VIEW(pMedialib->musictreeview), \
                GTK_TREE_MODEL(pList));
     g_signal_connect (GTK_WIDGET(pMedialib->musictreeview), "row-activated", \
G_CALLBACK (play_selected_audio), window);  
-   //Video Section
+    //Video Section
     pList = (GtkListStore*)phxMed->GetList(MEDIATYPE_VIDEO);
     //Initialize video icon view	
     gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(pMedialib->videoiconview), \
COLUMN_THUMBPIX); @@ -683,7 +683,7 @@
     Init_MediaLibPlaylist(window);
     hxmediamanager_Init(window);
 	
-   // Scan for Media	
+    // Scan for Media	
     pMedialib->media_helper = new ScanForMediaHelp(pMedialib);
     g_signal_connect (G_OBJECT(pMedialib->medialib_scan), "clicked", \
G_CALLBACK(hmw_player_scanformedia),  pMedialib);  
@@ -703,7 +703,7 @@
 					G_CALLBACK (MyAudioLibKeyUp), 
 					(gpointer)window);
 
-   g_signal_connect (G_OBJECT(pMedialib->videoiconview), 
+    g_signal_connect (G_OBJECT(pMedialib->videoiconview), 
 					"key-release-event", 
 					G_CALLBACK (MyVideoLibKeyUp), 
 					(gpointer)window);



_______________________________________________
Player-dev mailing list
Player-dev@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/player-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic