[Xfce4-commits] <parole:master> Added key handling for conrol_o to open the media chooser+XF86XK_OpenURL to open a url location.

Ali Abdallah noreply at xfce.org
Tue Nov 17 09:30:06 CET 2009


Updating branch refs/heads/master
         to 05c96e3578e7f2e8c5c093701b60cf5fe4c5e2b0 (commit)
       from 7227ab7e21e04a21cd76c48199b3868107442f3e (commit)

commit 05c96e3578e7f2e8c5c093701b60cf5fe4c5e2b0
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Tue Nov 17 09:27:37 2009 +0100

    Added key handling for conrol_o to open the media chooser+XF86XK_OpenURL
    to open a url location.

 parole/parole-player.c |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/parole/parole-player.c b/parole/parole-player.c
index 9255ba4..946d042 100644
--- a/parole/parole-player.c
+++ b/parole/parole-player.c
@@ -934,12 +934,12 @@ parole_player_move_fs_window (ParolePlayer *player)
 }
 
 static void
-parole_player_full_screen_menu_item_activate (ParolePlayer *player)
+parole_player_full_screen (ParolePlayer *player, gboolean fullscreen)
 {
     gint npages;
     static gint current_page = 0;
     
-    if ( player->priv->full_screen )
+    if ( player->priv->full_screen && !fullscreen)
     {
 	npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (player->priv->main_nt));
 	gtk_widget_reparent (player->priv->play_box, player->priv->control);
@@ -980,6 +980,12 @@ parole_player_full_screen_menu_item_activate (ParolePlayer *player)
     }
 }
 
+static void
+parole_player_full_screen_menu_item_activate (ParolePlayer *player)
+{
+    parole_player_full_screen (player, !player->priv->full_screen);
+}
+
 void parole_player_full_screen_activated_cb (GtkWidget *widget, ParolePlayer *player)
 {
     parole_player_full_screen_menu_item_activate (player);
@@ -1376,6 +1382,20 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
 	    parole_player_stop_clicked (NULL, player);
 	    ret_val = TRUE;
 	    break;
+#ifdef HAVE_XF86_KEYSYM
+	case XF86XK_OpenURL:
+	    parole_player_full_screen (player, FALSE);
+	    parole_media_list_open_location (player->priv->list);
+	    break;
+#endif
+	case GDK_O:
+	case GDK_o:
+	    if ( ev->state & GDK_CONTROL_MASK )
+	    {
+		parole_player_full_screen (player, FALSE);
+		parole_media_list_open (player->priv->list);
+	    }
+	break;
 	default:
 	    break;
     }



More information about the Xfce4-commits mailing list