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

List:       helix-player-dev
Subject:    [Player-dev] CR/CN-Client: Hooked up View menu navigation items to
From:       Daniel Yek <dyek () real ! com>
Date:       2008-09-24 0:34:58
Message-ID: 48D98B32.7020302 () 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.


Modified by: dyek@real.com
Date: 9/23/2008
Project: RealPlayer for Netbook.
Bug: 8680

Synopsis: Hooked up View menu navigation items to enable keyboard 
navigation.

Overview:
Hooked up View menu navigation items with activate-callback to enable
keyboard navigation.


I just found the keyboard up and down keys stopped working in
My Library Category tree view (at the left hand column and
the tree view widget has the keyboard focus).
That used to work before.
I'm not sure what broke it and what the fix is, at this time.

Files Modified:
player/app/gtk/mainapp.cpp
player/app/gtk/mainapp-private.h
player/netbook/chrome/netbook.glade

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_define
Platform: Fedora

Platforms and Profiles Functionality verified:
Profile: helix_client_all_define
Platform: Fedora

Branch: 310Atlas

Copyright assignment: I am a RealNetworks employee.

-- 
Daniel Yek.


["navigate_with_view_menu[1].diff" (text/x-patch)]

Index: player/app/gtk/mainapp.cpp
===================================================================
RCS file: /cvsroot/player/app/gtk/mainapp.cpp,v
retrieving revision 1.141.2.19
diff -u -w -r1.141.2.19 mainapp.cpp
--- player/app/gtk/mainapp.cpp	13 Sep 2008 23:55:44 -0000	1.141.2.19
+++ player/app/gtk/mainapp.cpp	24 Sep 2008 00:24:34 -0000
@@ -246,6 +246,13 @@
 void     hmw_favorites_menu_update(GtkWidget* widget);
 void     hmw_player_reset       (GtkWidget* widget);    
 
+void     hmw_view_now_playing(GtkWidget* widget);
+void     hmw_view_music_library(GtkWidget* widget);
+void     hmw_view_videos_library(GtkWidget* widget);
+void     hmw_view_photos_library(GtkWidget* widget);
+void     hmw_view_playlist(GtkWidget* widget);
+
+
 #ifdef HELIX_FEATURE_RP_SIGN_IN
 void     hmw_sign_in            (GtkWidget* widget);
 #endif
@@ -3766,6 +3773,67 @@
     }
 }
 
+void
+hmw_view_now_playing(GtkWidget* widget)
+{
+    HXMainWindow* window = hxwindow_get_from_widget(widget);
+
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->navigation_notebook), 
+                                  0);   // For now, hardcoding GtkNotebook Tab for \
Now Playing. +
+    return;
+}
+
+void
+hmw_view_music_library(GtkWidget* widget)
+{
+    HXMainWindow* window = hxwindow_get_from_widget(widget);
+
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->navigation_notebook), 
+                                  1);   // For now, hardcoding GtkNotebook Tab for \
my library. +    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->media_lib_category_notebook), \
 +                                  0);   // Music library
+
+    return;
+}
+
+void
+hmw_view_videos_library(GtkWidget* widget)
+{
+    HXMainWindow* window = hxwindow_get_from_widget(widget);
+
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->navigation_notebook), 
+                                  1);   // For now, hardcoding GtkNotebook Tab for \
my library. +    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->media_lib_category_notebook), \
 +                                  1);   // Videos library
+
+    return;
+}
+
+void
+hmw_view_photos_library(GtkWidget* widget)
+{
+    HXMainWindow* window = hxwindow_get_from_widget(widget);
+
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->navigation_notebook), 
+                                  1);   // For now, hardcoding GtkNotebook Tab for \
my library. +    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->media_lib_category_notebook), \
 +                                  2);   // Photos library
+
+    return;
+}
+
+void
+hmw_view_playlist(GtkWidget* widget)
+{
+    HXMainWindow* window = hxwindow_get_from_widget(widget);
+
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(window->navigation_notebook), 
+                                  2);   // For now, hardcoding GtkNotebook Tab for \
Playlist. +
+    return;
+}
+
 
 /* HXMainWindow widget callbacks
  * =========================
@@ -4697,6 +4765,9 @@
     window->favorites_menu_item_separator = glade_xml_get_widget((GladeXML \
                *)window->xml, "hmw_menu_item_separator_favorites");
     g_return_val_if_fail(window->favorites_menu_item_separator != NULL, FALSE);
 
+    window->navigation_notebook = glade_xml_get_widget((GladeXML *)window->xml, \
"hmw_navigation_notebook_with_hxgtkwidget"); +    \
g_return_val_if_fail(window->navigation_notebook != NULL, FALSE); +
     GQuark tooltips_id = g_quark_from_static_string("GladeXML::tooltips");
     window->tooltips = (GtkTooltips*) g_object_get_qdata (G_OBJECT(window->window), \
tooltips_id);  g_return_val_if_fail(window->tooltips != NULL, FALSE);


Index: player/app/gtk/mainapp-private.h
===================================================================
RCS file: /cvsroot/player/app/gtk/mainapp-private.h,v
retrieving revision 1.6.2.9
diff -u -w -r1.6.2.9 mainapp-private.h
--- player/app/gtk/mainapp-private.h	13 Sep 2008 22:24:43 -0000	1.6.2.9
+++ player/app/gtk/mainapp-private.h	24 Sep 2008 00:24:34 -0000
@@ -242,7 +242,9 @@
     GtkWidget* status_hbox;
     GtkWidget* status_bar;
 
-    GtkWidget* media_lib_category_notebook;  
+    GtkWidget* navigation_notebook;         // Contains Now Playing, Media Lib., \
Playlist. +    GtkWidget* media_lib_category_notebook; // Contains Music, Videos, \
Photos. +
     GtkWidget* rewind_button;
     GtkWidget* fast_forward_button;
 // END Cache Widget Pointers


Index: player/netbook/chrome/netbook.glade
===================================================================
RCS file: /cvsroot/player/netbook/chrome/netbook.glade,v
retrieving revision 1.2.2.19
diff -u -w -r1.2.2.19 netbook.glade
--- player/netbook/chrome/netbook.glade	18 Sep 2008 17:19:48 -0000	1.2.2.19
+++ player/netbook/chrome/netbook.glade	24 Sep 2008 00:24:34 -0000
@@ -6,8 +6,6 @@
     <property name="title" translatable="yes">RealPlayer</property>
     <property name="default_width">800</property>
     <property name="default_height">450</property>
-    <property name="icon">./share/images/r1logo.png</property>
-    <property name="icon_name">hxplayer_title_bar_logo</property>
     <child>
       <widget class="GtkVBox" id="hmw_vbox">
         <property name="visible">True</property>
@@ -294,38 +292,43 @@
                             <property name="tooltip" translatable="yes">Go to Now \
                Playing</property>
                             <property name="label" translatable="yes">No_w \
                Playing</property>
                             <property name="use_underline">True</property>
+                            <signal name="activate" handler="hmw_view_now_playing"/>
                           </widget>
                         </child>
                         <child>
                           <widget class="GtkMenuItem" id="hmw_menu_item_music_lib">
                             <property name="visible">True</property>
                             <property name="tooltip" translatable="yes">Go to Music \
                Library</property>
-                            <property name="label" translatable="yes">Music \
Library</property> +                            <property name="label" \
                translatable="yes">_Music Library</property>
                             <property name="use_underline">True</property>
+                            <signal name="activate" \
handler="hmw_view_music_library"/>  </widget>
                         </child>
                         <child>
                           <widget class="GtkMenuItem" id="hmw_menu_item_video_lib">
                             <property name="visible">True</property>
                             <property name="tooltip" translatable="yes">Go to video \
                library</property>
-                            <property name="label" translatable="yes">Video \
Library</property> +                            <property name="label" \
                translatable="yes">_Video Library</property>
                             <property name="use_underline">True</property>
+                            <signal name="activate" \
handler="hmw_view_videos_library"/>  </widget>
                         </child>
                         <child>
                           <widget class="GtkMenuItem" id="hmw_menu_item_photo_lib">
                             <property name="visible">True</property>
                             <property name="tooltip" translatable="yes">Go to photo \
                library</property>
-                            <property name="label" translatable="yes">Photo \
Library</property> +                            <property name="label" \
                translatable="yes">P_hoto Library</property>
                             <property name="use_underline">True</property>
+                            <signal name="activate" \
handler="hmw_view_photos_library"/>  </widget>
                         </child>
                         <child>
                           <widget class="GtkMenuItem" id="hmw_menu_item_playlists">
                             <property name="visible">True</property>
                             <property name="tooltip" translatable="yes">Go to \
                playlists</property>
-                            <property name="label" translatable="yes">Playlists \
_Editor</property> +                            <property name="label" \
                translatable="yes">_Playlists</property>
                             <property name="use_underline">True</property>
+                            <signal name="activate" handler="hmw_view_playlist"/>
                           </widget>
                         </child>
                       </widget>



_______________________________________________
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