7
7
****************************************************************************/
10
* This program is free software; you can redistribute it and/or modify
10
* Brasero is free software; you can redistribute it and/or modify
11
11
* it under the terms of the GNU General Public License as published by
12
12
* the Free Software Foundation; either version 2 of the License, or
13
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
15
* Brasero is distributed in the hope that it will be useful,
16
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
18
* GNU Library General Public License for more details.
20
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
* along with this program; if not, write to:
22
* The Free Software Foundation, Inc.,
23
* 51 Franklin Street, Fifth Floor
24
* Boston, MA 02110-1301, USA.
25
27
#ifdef HAVE_CONFIG_H
32
34
#include <glib/gi18n-lib.h>
34
#include <gtk/gtkwidget.h>
35
#include <gtk/gtklabel.h>
36
#include <gtk/gtkhbox.h>
37
#include <gtk/gtkbutton.h>
38
#include <gtk/gtkstock.h>
39
#include <gtk/gtkscale.h>
40
#include <gtk/gtkrange.h>
41
#include <gtk/gtkhscale.h>
42
#include <gtk/gtkwindow.h>
43
#include <gtk/gtkdialog.h>
44
#include <gtk/gtkalignment.h>
45
#include <gtk/gtkmessagedialog.h>
47
38
#include <gconf/gconf-client.h>
266
257
adjustment = gtk_range_get_adjustment (GTK_RANGE (player->priv->progress));
267
len_string = brasero_utils_get_time_string (player->priv->end - player->priv->start, FALSE, FALSE);
258
len_string = brasero_units_get_time_string (player->priv->end - player->priv->start, FALSE, FALSE);
269
260
value = gtk_range_get_value (GTK_RANGE (player->priv->progress));
270
pos_string = brasero_utils_get_time_string (value, FALSE, FALSE);
261
pos_string = brasero_units_get_time_string (value, FALSE, FALSE);
264
* Translators: this is the position being played in the stream. The
265
* first %s is the position and the second %s is the whole length of
266
* the stream. I chose to make that translatable in case some languages
267
* don't allow the "/" */
272
268
result = g_strdup_printf (_("%s / %s"), pos_string, len_string);
273
269
g_free (len_string);
274
270
g_free (pos_string);
297
293
brasero_player_set_length (BraseroPlayer *player)
299
if (player->priv->progress)
295
if (player->priv->progress && player->priv->end - player->priv->start != 0)
300
296
gtk_range_set_range (GTK_RANGE (player->priv->progress),
302
298
(gdouble) player->priv->end - player->priv->start);
804
800
BRASERO_GET_BASENAME_FOR_DISPLAY (path, name);
807
string = g_strdup_printf (_("<span weight=\"bold\">Name:</span>\t %s"), name);
803
string = g_strdup_printf ("<span weight=\"bold\">%s</span>\t %s",
810
808
gtk_label_set_markup (GTK_LABEL (player->priv->header), string);
843
841
else if (title) {
844
header = g_markup_printf_escaped (_("<span weight=\"bold\">%s</span>\n"),
842
header = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>\n", title);
846
843
gtk_label_set_ellipsize (GTK_LABEL (player->priv->header),
847
844
PANGO_ELLIPSIZE_END);
852
849
BRASERO_GET_BASENAME_FOR_DISPLAY (player->priv->uri, name);
853
header = g_markup_printf_escaped (_("<span weight=\"bold\">%s</span>\n"),
850
header = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>\n", name);
856
852
gtk_label_set_ellipsize (GTK_LABEL (player->priv->header),
857
853
PANGO_ELLIPSIZE_END);
914
913
gtk_widget_set_sensitive (player->priv->progress, FALSE);
916
else if (!strncmp ("image/", g_file_info_get_content_type (info), 6)) {
917
brasero_player_image (player);
915
else if (mime && !strncmp ("image/", mime, 6)) {
916
/* Only do that if the image is < 20 M otherwise that's crap
917
* FIXME: maybe a sort of error message here? or use thumbnail? */
918
if (g_file_info_get_size (info) > 100000000) {
919
brasero_player_no_multimedia_stream (player);
920
g_signal_emit (player,
921
brasero_player_signals [ERROR_SIGNAL],
925
brasero_player_image (player);