~ubuntu-branches/ubuntu/saucy/parole/saucy-proposed

« back to all changes in this revision

Viewing changes to src/parole-player.c

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez, Lionel Le Folgoc, Yves-Alexis Perez
  • Date: 2011-04-24 16:09:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110424160919-rpjwaicrdb8f7un2
Tags: 0.2.0.6-1
[ Lionel Le Folgoc ]
* debian/control:
  - drop unneeded build-dep on xulrunner-dev.   closes: #594073
  - suggests a few useful gstreamer0.10 plugins.
  - build-depends on quilt.
* debian/patches:
  - 01_fix-implicit-dso-linking.patch: added, fixes FTBFS with binutils-gold.
  - series: added.                                            closes: #615760
* debian/rules: pass --with quilt to dh.

[ Yves-Alexis Perez ]
* New upstream release.
* Switch to 3.0 (quilt) source format.
* debian/control:
  - update standards version to 3.9.2.
  - drop browser-plugin-parole package.
  - drop quilt build-dep.
  - add build-dep on hardening-includes
  - bump xfce build-deps to 4.8.
* debian/parole.install updated.
* debian/rules:
  - use --fail-missing and manually remove spurious files.
  - drop quilt addon
  - pick build flags from dpkg-buildflags.
  - add -O1, -z,defs and --as-needed to LDFLAGS.
  - add hardening flags to build flags.
  - stop harcoding the shell to bash, it works fine now.      closes: #623830

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * * Copyright (C) 2009 Ali <aliov@xfce.org>
 
2
 * * Copyright (C) 2009-2011 Ali <aliov@xfce.org>
3
3
 *
4
4
 * Licensed under the GNU General Public License Version 2
5
5
 *
34
34
#include <gdk/gdkkeysyms.h>
35
35
#include <gtk/gtk.h>
36
36
 
 
37
#ifdef XFCE_DISABLE_DEPRECATED
 
38
#undef XFCE_DISABLE_DEPRECATED
 
39
#endif
37
40
#include <libxfce4util/libxfce4util.h>
38
41
#include <libxfcegui4/libxfcegui4.h>
39
42
 
537
540
}
538
541
 
539
542
static void
 
543
parole_player_seekable_notify (ParoleStream *stream, GParamSpec *spec, ParolePlayer *player)
 
544
{
 
545
    gboolean seekable;
 
546
    
 
547
    g_object_get (G_OBJECT (stream),
 
548
                  "seekable", &seekable,
 
549
                  NULL);
 
550
                  
 
551
    gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->range), seekable ? NULL : _("Media stream is not seekable"));
 
552
    gtk_widget_set_sensitive (GTK_WIDGET (player->priv->range), seekable);
 
553
    gtk_widget_set_sensitive (player->priv->seekf, seekable);
 
554
    gtk_widget_set_sensitive (player->priv->seekb, seekable);
 
555
}
 
556
 
 
557
static void
540
558
parole_player_set_playpause_button_image (GtkWidget *widget, const gchar *stock_id)
541
559
{
542
560
    GtkWidget *img;
608
626
    gboolean seekable;
609
627
    gboolean live;
610
628
    
611
 
    player->priv->state = PAROLE_MEDIA_STATE_PLAYING;
612
 
    
613
629
    pix = parole_icon_load ("player_play", 16);
614
630
    
615
631
    if ( !pix )
646
662
        g_object_unref (pix);
647
663
        
648
664
    parole_player_save_uri (player, stream);
649
 
    
 
665
    parole_media_list_select_row (player->priv->list, player->priv->row);
650
666
    gtk_widget_grab_focus (player->priv->gst);
651
667
}
652
668
 
655
671
{
656
672
    GdkPixbuf *pix = NULL;
657
673
    
658
 
    player->priv->state = PAROLE_MEDIA_STATE_PAUSED;
659
 
    
660
674
    TRACE ("Player paused");
661
675
    
662
676
    pix = parole_icon_load (GTK_STOCK_MEDIA_PAUSE, 16);
688
702
{
689
703
    TRACE ("Player stopped");
690
704
    
691
 
    player->priv->state = PAROLE_MEDIA_STATE_STOPPED;
692
 
    
693
705
    gtk_widget_set_sensitive (player->priv->play_pause, 
694
706
                              parole_media_list_is_selected_row (player->priv->list) || 
695
707
                              !parole_media_list_is_empty (player->priv->list));
820
832
                      NULL);
821
833
                      
822
834
        if ( has_video )
 
835
        {
823
836
            parole_screen_saver_inhibit (player->priv->screen_saver);
 
837
        }
824
838
    }
825
839
    else
826
840
        parole_screen_saver_uninhibit (player->priv->screen_saver);
831
845
{
832
846
    PAROLE_DEBUG_ENUM ("State callback", state, GST_ENUM_TYPE_MEDIA_STATE);
833
847
 
 
848
 
 
849
    player->priv->state = state;
 
850
    
834
851
    parole_player_reset_saver_changed (player, stream);
835
852
    
836
853
    if ( state == PAROLE_MEDIA_STATE_PLAYING )
1063
1080
                     rect.height + rect.y - player->priv->play_box->allocation.height);
1064
1081
}
1065
1082
 
1066
 
static void
 
1083
void
1067
1084
parole_player_full_screen (ParolePlayer *player, gboolean fullscreen)
1068
1085
{
1069
1086
    gint npages;
1991
2008
    gtk_widget_realize (player->priv->gst);
1992
2009
    gtk_widget_show (player->priv->gst);
1993
2010
 
 
2011
    g_signal_connect (G_OBJECT (parole_gst_get_stream (PAROLE_GST (player->priv->gst))), "notify::seekable",
 
2012
                      G_CALLBACK (parole_player_seekable_notify), player);
 
2013
 
1994
2014
    parole_player_change_volume (player, 
1995
2015
                                 (gdouble) (parole_rc_read_entry_int ("volume", PAROLE_RC_GROUP_GENERAL, 100)/100.));
1996
2016