~kaozilon/totem/test

« back to all changes in this revision

Viewing changes to src/totem-video-list.c

  • Committer: Bazaar Package Importer
  • Author(s): Sjoerd Simons, Josselin Mouette, Sjoerd Simons, Emilio Pozuelo Monfort
  • Date: 2009-04-19 17:28:51 UTC
  • mfrom: (1.2.52 upstream) (5.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090419172851-epoqimnq62akn294
Tags: 2.26.1-1
[ Josselin Mouette ]
* totem-plugins depends on python-gdbm. Closes: #523582.

[ Sjoerd Simons ]
* New upstream release (2.26.1)
* debian/patches/02_flv.patch: Dropped, fixed upstream
* debian/patches/04_tracker_build.patch: Dropped, fixed upstream
* debian/patches/01_fake_keypresses.patch: Updated and simplified
* debian/patches/70_bbc_plugin.patch: Updated
* debian/patches/90_autotools.patch: Updated

[ Emilio Pozuelo Monfort ]
* Recommend gnome-codec-install rather than gnome-app-install.
  Closes: #523052.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 *
27
27
 */
28
28
 
 
29
/**
 
30
 * SECTION:totem-video-list
 
31
 * @short_description: a #GtkTreeView widget for listing videos
 
32
 * @stability: Unstable
 
33
 * @include: totem-video-list.h
 
34
 * @see_also: #TotemCellRendererVideo
 
35
 *
 
36
 * #TotemVideoList is a #GtkTreeView designed for listing videos by their thumbnails using #TotemCellRendererVideo.
 
37
 * It supports tooltips, loading the videos by activating tree view rows, and #GtkUIManager actions in the popup menu.
 
38
 **/
 
39
 
29
40
#include "config.h"
30
41
 
31
42
#include <glib.h>
79
90
 
80
91
G_DEFINE_TYPE (TotemVideoList, totem_video_list, GTK_TYPE_TREE_VIEW)
81
92
 
 
93
/**
 
94
 * totem_video_list_new:
 
95
 *
 
96
 * Creates a new #TotemVideoList with default properties.
 
97
 *
 
98
 * Return value: a new #TotemVideoList
 
99
 **/
82
100
TotemVideoList *
83
101
totem_video_list_new (void)
84
102
{
103
121
        object_class->set_property = totem_video_list_set_property;
104
122
        object_class->get_property = totem_video_list_get_property;
105
123
        object_class->dispose = totem_video_list_dispose;
 
124
        klass->starting_video = default_starting_video_cb;
106
125
 
 
126
        /**
 
127
         * TotemVideoList:tooltip-column:
 
128
         *
 
129
         * The column number of the #GtkTreeModel column containing tooltips to be displayed by the video list.
 
130
         * If it's set to -1, no tooltips shall be displayed.
 
131
         **/
107
132
        g_object_class_install_property (object_class, PROP_TOOLTIP_COLUMN,
108
133
                                g_param_spec_int ("tooltip-column", NULL, NULL,
109
134
                                        -1, G_MAXINT, -1, G_PARAM_READWRITE));
 
135
 
 
136
        /**
 
137
         * TotemVideoList:mrl-column:
 
138
         *
 
139
         * The column number of the #GtkTreeModel column containing MRLs of the videos in the video list.
 
140
         * If it's set to -1, video rows will not be activatable (e.g. by double-clicking them).
 
141
         **/
110
142
        g_object_class_install_property (object_class, PROP_MRL_COLUMN,
111
143
                                g_param_spec_int ("mrl-column", NULL, NULL,
112
144
                                        -1, G_MAXINT, -1, G_PARAM_READWRITE));
 
145
 
 
146
        /**
 
147
         * TotemVideoList:totem:
 
148
         *
 
149
         * A #TotemObject for integration purposes.
 
150
         **/
 
151
        /* FIXME: Is there no better way to do this? */
113
152
        g_object_class_install_property (object_class, PROP_TOTEM,
114
153
                                g_param_spec_object ("totem", NULL, NULL,
115
154
                                        TOTEM_TYPE_OBJECT, G_PARAM_READWRITE));
116
155
 
117
 
        klass->starting_video = default_starting_video_cb;
 
156
        /**
 
157
         * TotemVideoList::starting-video:
 
158
         * @video_list: the #TotemVideoList which received the signal
 
159
         * @tree_path: the #GtkTreePath of the video row about to be played
 
160
         *
 
161
         * The #TotemVideoList::starting-video signal is emitted when a video row is activated, just before the video is
 
162
         * added to the playlist. It allows for the video's MRL in the #GtkTreeModel to be modified, for example.
 
163
         *
 
164
         * If this returns %TRUE, the video will be played; otherwise, it will not.
 
165
         */
118
166
        totem_video_list_table_signals[STARTING_VIDEO] = g_signal_new ("starting-video",
119
167
                                G_TYPE_FROM_CLASS (object_class),
120
168
                                G_SIGNAL_RUN_LAST,
434
482
        g_list_free (l);
435
483
}
436
484
 
 
485
/**
 
486
 * totem_video_list_get_ui_manager:
 
487
 * @self: a #TotemVideoList
 
488
 *
 
489
 * Returns the #GtkUIManager in use by @self.
 
490
 *
 
491
 * Return value: @self's #GtkUIManager
 
492
 **/
437
493
GtkUIManager *
438
494
totem_video_list_get_ui_manager (TotemVideoList *self)
439
495
{