~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to src/brasero-project-name.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-07-14 14:13:00 UTC
  • mfrom: (1.1.25 upstream)
  • Revision ID: james.westby@ubuntu.com-20090714141300-e08q13sp48b2xzwd
Tags: 2.27.4-0ubuntu1
* New upstream release: (LP: #399112)
  - Hal support removed, now relies on GIO only for drives/media probing
  - New layout for size reporting in data/audio/video project
  - Lot's of bug fixes
  - Fixed some memleaks
  - Bump libbrasero-media version to reflect changes (important to packagers)
  - Fix #582261 – brasero shows 0% done, while continues burning disc
  - Fix #582513 – Bogus VIDEO_TS directory error if AUDIO_TS directory present
  - Fix #573805 – "Increase compatibility with Windows systems"?
  - Fix #585190 – remove 0 from 03 % status
  - Fix #586744 – Use AS_HELP_STRING for configure switches
  - Fix #584793 – Poor language in warning dialog when attempting to burn an audio CD onto a CDRW
  - Fix #580617 – Brasero floods .xsession-errors log with "Unknown (or already deleted) monitored directory" warnings
  - Fix #563501 – Brasero burning window shouldn't try to show drive speed while is converting audio files
  - Fix #485719 – Burn dialog CD icon
  - Fix #585481 – Deep hierarchy warning
  - Fix #554070 – The need of a "replace all" and "replace non" button
  - Fix #582461 – Brasero hangs at normalizing tracks
  - Fix #587284 – nautilus hangs every time
  - Fix #574093 – Caret visible in instructions for project creation
  - Fix #581742 – port from HAL to DeviceKit-disks
  - Fix #573801 – Bad error message when burning empty burn:///
  - Fix #573486 – Various i18n and string issues for good
  - Fix #587399 – License clarification
  - Fix #587554 – Unclear meaning of text
  - Fix #582979 – brasero should not include Categories in mime handler .desktop files
  - Fix #586040 – duplicated command listed in open-with dialog
  - Fixes for #573486 – Various i18n and string issues
* debian/control.in:
  - Add in missing comma in brasero suggests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2
2
/*
3
 
 * brasero
4
 
 * Copyright (C) Philippe Rouquier 2008 <bonfire-app@wanadoo.fr>
5
 
 * 
6
 
 * brasero is free software: you can redistribute it and/or modify it
7
 
 * under the terms of the GNU General Public License as published by the
8
 
 * Free Software Foundation, either version 3 of the License, or
9
 
 * (at your option) any later version.
10
 
 * 
11
 
 * brasero is distributed in the hope that it will be useful, but
12
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
3
 * Brasero
 
4
 * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr>
 
5
 * 
 
6
 *  Brasero is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 * 
 
11
 * brasero is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
14
 * See the GNU General Public License for more details.
15
15
 * 
16
 
 * You should have received a copy of the GNU General Public License along
17
 
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with brasero.  If not, write to:
 
18
 *      The Free Software Foundation, Inc.,
 
19
 *      51 Franklin Street, Fifth Floor
 
20
 *      Boston, MA  02110-1301, USA.
18
21
 */
19
22
 
20
23
#ifdef HAVE_CONFIG_H
29
32
 
30
33
#include <gtk/gtk.h>
31
34
 
 
35
#include "brasero-misc.h"
 
36
 
32
37
#include "brasero-medium.h"
33
38
#include "brasero-volume.h"
34
39
 
 
40
#include "brasero-session.h"
 
41
#include "brasero-track-data-cfg.h"
 
42
 
35
43
#include "brasero-project-name.h"
36
44
#include "brasero-project-type-chooser.h"
37
45
 
38
46
typedef struct _BraseroProjectNamePrivate BraseroProjectNamePrivate;
39
47
struct _BraseroProjectNamePrivate
40
48
{
 
49
        BraseroBurnSession *session;
 
50
 
41
51
        BraseroProjectType type;
42
 
        BraseroMedium *medium;
43
52
 
44
53
        guint label_modified:1;
45
54
};
55
64
 
56
65
G_DEFINE_TYPE (BraseroProjectName, brasero_project_name, GTK_TYPE_ENTRY);
57
66
 
 
67
enum {
 
68
        PROP_0,
 
69
        PROP_SESSION
 
70
};
 
71
 
 
72
static void
 
73
brasero_project_name_data_icon_error (BraseroProjectName *project,
 
74
                                      GError *error)
 
75
{
 
76
        GtkWidget *toplevel;
 
77
 
 
78
        toplevel = gtk_widget_get_toplevel (GTK_WIDGET (project));
 
79
        brasero_utils_message_dialog (toplevel,
 
80
                                      /* Translators: this is a picture not
 
81
                                       * a disc image */
 
82
                                      C_("picture", "Please select another image."),
 
83
                                      error? error->message:_("Unknown error"),
 
84
                                      GTK_MESSAGE_ERROR);
 
85
}
 
86
 
 
87
static void
 
88
brasero_project_name_icon_update (BraseroProjectName *self,
 
89
                                  BraseroTrackDataCfg *track)
 
90
{
 
91
        GError *error = NULL;
 
92
        GdkPixbuf *pixbuf;
 
93
        const gchar *icon; 
 
94
 
 
95
        gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (self),
 
96
                                        GTK_ENTRY_ICON_PRIMARY,
 
97
                                        NULL);  
 
98
        gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self),
 
99
                                           GTK_ENTRY_ICON_PRIMARY,
 
100
                                           NULL);
 
101
 
 
102
        icon = brasero_track_data_cfg_get_icon_path (track);
 
103
        if (!icon) {
 
104
                gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self),
 
105
                                                   GTK_ENTRY_ICON_PRIMARY,
 
106
                                                   "media-optical");
 
107
                return;
 
108
        }
 
109
 
 
110
        /* Load and convert the image into a pixbuf */
 
111
        pixbuf = gdk_pixbuf_new_from_file_at_scale (icon,
 
112
                                                    24,
 
113
                                                    24,
 
114
                                                    FALSE,
 
115
                                                    &error);
 
116
        if (!pixbuf) {
 
117
                gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self),
 
118
                                                   GTK_ENTRY_ICON_PRIMARY,
 
119
                                                   "media-optical");
 
120
                brasero_project_name_data_icon_error (self, error);
 
121
                g_error_free (error);
 
122
                return;
 
123
        }
 
124
 
 
125
        gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (self),
 
126
                                        GTK_ENTRY_ICON_PRIMARY,
 
127
                                        pixbuf);
 
128
        g_object_unref (pixbuf);
 
129
}
 
130
 
 
131
static void
 
132
brasero_project_name_icon_changed_cb (BraseroTrackDataCfg *track,
 
133
                                      BraseroProjectName *self)
 
134
{
 
135
        brasero_project_name_icon_update (self, track);
 
136
}
 
137
 
 
138
static BraseroTrackDataCfg *
 
139
brasero_project_name_get_track_data_cfg (BraseroProjectName *self)
 
140
{
 
141
        BraseroProjectNamePrivate *priv;
 
142
        GSList *tracks;
 
143
 
 
144
        priv = BRASERO_PROJECT_NAME_PRIVATE (self);
 
145
 
 
146
        tracks = brasero_burn_session_get_tracks (priv->session);
 
147
        for (; tracks; tracks = tracks->next) {
 
148
                BraseroTrackDataCfg *track;
 
149
 
 
150
                track = tracks->data;
 
151
                if (BRASERO_IS_TRACK_DATA_CFG (track))
 
152
                        return BRASERO_TRACK_DATA_CFG (track);
 
153
        }
 
154
 
 
155
        return NULL;
 
156
}
 
157
 
 
158
static void
 
159
brasero_project_name_icon_button_clicked (BraseroProjectName *project,
 
160
                                          GtkEntryIconPosition position,
 
161
                                          GdkEvent *event,
 
162
                                          gpointer NULL_data)
 
163
{
 
164
        BraseroProjectNamePrivate *priv;
 
165
        BraseroTrackDataCfg *track;
 
166
        GtkFileFilter *filter;
 
167
        const gchar *filename;
 
168
        GError *error = NULL;
 
169
        GtkWidget *chooser;
 
170
        gchar *path;
 
171
        gint res;
 
172
 
 
173
        priv = BRASERO_PROJECT_NAME_PRIVATE (project);
 
174
 
 
175
        track = brasero_project_name_get_track_data_cfg (project);
 
176
        if (!track)
 
177
                return;
 
178
 
 
179
        filename = brasero_track_data_cfg_get_icon_path (track);
 
180
 
 
181
        chooser = gtk_file_chooser_dialog_new (_("Medium Icon"),
 
182
                                               GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (project))),
 
183
                                               GTK_FILE_CHOOSER_ACTION_OPEN,
 
184
                                               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 
185
                                               GTK_STOCK_OK, GTK_RESPONSE_OK,
 
186
                                               NULL);
 
187
 
 
188
        filter = gtk_file_filter_new ();
 
189
        gtk_file_filter_set_name (filter, _("All files"));
 
190
        gtk_file_filter_add_pattern (filter, "*");
 
191
        gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
 
192
 
 
193
        filter = gtk_file_filter_new ();
 
194
        /* Translators: this is an image, a picture, not a "Disc Image" */
 
195
        gtk_file_filter_set_name (filter, C_("picture", "Image files"));
 
196
        gtk_file_filter_add_mime_type (filter, "image/*");
 
197
        gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
 
198
 
 
199
        gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), filter);
 
200
 
 
201
        if (filename)
 
202
                gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (chooser), filename);
 
203
 
 
204
        gtk_widget_show (chooser);
 
205
        res = gtk_dialog_run (GTK_DIALOG (chooser));
 
206
        if (res != GTK_RESPONSE_OK) {
 
207
                gtk_widget_destroy (chooser);
 
208
                return;
 
209
        }
 
210
 
 
211
        path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
 
212
        gtk_widget_destroy (chooser);
 
213
 
 
214
        /* Get the BraseroTrackDataCfg if any and set the icon */
 
215
        if (!brasero_track_data_cfg_set_icon (track, path, &error)) {
 
216
                if (error) {
 
217
                        brasero_project_name_data_icon_error (project, error);
 
218
                        g_error_free (error);
 
219
                }
 
220
        }
 
221
        g_free (path);
 
222
}
 
223
 
58
224
static gchar *
59
225
brasero_project_name_truncate_label (const gchar *label)
60
226
{
79
245
{
80
246
        time_t t;
81
247
        gchar buffer [128];
 
248
        BraseroBurnFlag flags;
82
249
        gchar *title_str = NULL;
83
250
        BraseroProjectNamePrivate *priv;
84
251
 
85
252
        priv = BRASERO_PROJECT_NAME_PRIVATE (self);
86
253
 
87
 
        if (priv->medium) {
88
 
                title_str = brasero_volume_get_name (BRASERO_VOLUME (priv->medium));
89
 
                goto end;
 
254
        if (priv->type == BRASERO_PROJECT_TYPE_INVALID)
 
255
                return g_strdup ("");
 
256
 
 
257
        flags = brasero_burn_session_get_flags (priv->session);
 
258
        if (flags & BRASERO_BURN_FLAG_MERGE) {
 
259
                BraseroMedium *medium;
 
260
                BraseroDrive *burner;
 
261
 
 
262
                burner = brasero_burn_session_get_burner (priv->session);
 
263
                medium = brasero_drive_get_medium (burner);
 
264
 
 
265
                if (medium) {
 
266
                        title_str = brasero_volume_get_name (BRASERO_VOLUME (medium));
 
267
                        goto end;
 
268
                }
90
269
        }
91
270
 
92
271
        t = time (NULL);
225
404
                       0);
226
405
}
227
406
 
228
 
void
229
 
brasero_project_name_set_type (BraseroProjectName *self,
230
 
                               BraseroProjectType type)
 
407
static void
 
408
brasero_project_name_set_type (BraseroProjectName *self)
231
409
{
232
410
        BraseroProjectNamePrivate *priv;
 
411
        BraseroTrackType *track_type;
 
412
        BraseroProjectType type;
233
413
        gchar *title_str = NULL;
234
414
 
235
415
        priv = BRASERO_PROJECT_NAME_PRIVATE (self);
236
416
 
 
417
        track_type = brasero_track_type_new ();
 
418
        brasero_burn_session_get_input_type (priv->session, track_type);
 
419
 
 
420
        if (brasero_track_type_get_has_data (track_type))
 
421
                type = BRASERO_PROJECT_TYPE_DATA;
 
422
        else if (brasero_track_type_get_has_stream (track_type)) {
 
423
                if (BRASERO_STREAM_FORMAT_HAS_VIDEO (brasero_track_type_get_stream_format (track_type)))
 
424
                        type = BRASERO_PROJECT_TYPE_VIDEO;
 
425
                else
 
426
                        type = BRASERO_PROJECT_TYPE_AUDIO;
 
427
        }
 
428
        else
 
429
                type = BRASERO_PROJECT_TYPE_INVALID;
 
430
 
 
431
        brasero_track_type_free (track_type);
 
432
 
 
433
        if (priv->type == type)
 
434
                return;
 
435
 
237
436
        priv->type = type;
238
 
 
239
 
        if (priv->medium) {
240
 
                g_object_unref (priv->medium);
241
 
                priv->medium = NULL;
242
 
        }
243
 
 
244
437
        priv->label_modified = FALSE;
245
438
 
246
439
        title_str = brasero_project_name_get_default_label (self);
252
445
        g_free (title_str);
253
446
}
254
447
 
255
 
void
256
 
brasero_project_name_set_multisession_medium (BraseroProjectName *self,
257
 
                                              BraseroMedium *medium)
 
448
static void
 
449
brasero_project_name_flags_changed (BraseroBurnSession *session,
 
450
                                    BraseroProjectName *self)
258
451
{
259
452
        BraseroProjectNamePrivate *priv;
260
453
        gchar *title_str;
261
454
 
262
455
        priv = BRASERO_PROJECT_NAME_PRIVATE (self);
263
 
        if (priv->medium) {
264
 
                g_object_unref (priv->medium);
265
 
                priv->medium = NULL;
266
 
        }
267
 
 
268
 
        priv->medium = medium;
269
 
 
270
 
        if (medium)
271
 
                g_object_ref (medium);
272
456
 
273
457
        if (priv->label_modified)
274
458
                return;
291
475
 
292
476
        priv->label_modified = 0;
293
477
        g_signal_connect (object,
 
478
                          "icon-release",
 
479
                          G_CALLBACK (brasero_project_name_icon_button_clicked),
 
480
                          NULL);
 
481
 
 
482
        g_signal_connect (object,
294
483
                          "insert_text",
295
484
                          G_CALLBACK (brasero_project_name_label_insert_text),
296
485
                          NULL);
301
490
}
302
491
 
303
492
static void
 
493
brasero_project_name_session_changed (BraseroProjectName *self)
 
494
{
 
495
        BraseroTrackType *type;
 
496
        BraseroProjectNamePrivate *priv;
 
497
 
 
498
        priv = BRASERO_PROJECT_NAME_PRIVATE (self);
 
499
 
 
500
        type = brasero_track_type_new ();
 
501
        brasero_burn_session_get_input_type (priv->session, type);
 
502
        if (brasero_track_type_get_has_data (type)) {
 
503
                BraseroTrackDataCfg *track;
 
504
 
 
505
                track = brasero_project_name_get_track_data_cfg (self);
 
506
                if (track) {
 
507
                        g_signal_connect (track,
 
508
                                          "icon-changed",
 
509
                                          G_CALLBACK (brasero_project_name_icon_changed_cb),
 
510
                                          self);
 
511
                        brasero_project_name_icon_update (self, track);
 
512
                        gtk_entry_set_icon_tooltip_text (GTK_ENTRY (self),
 
513
                                                         GTK_ENTRY_ICON_PRIMARY,
 
514
                                                         _("Select an icon for the disc that will appear in file managers"));
 
515
                }
 
516
        }
 
517
        else {
 
518
                gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (self),
 
519
                                                GTK_ENTRY_ICON_PRIMARY,
 
520
                                                NULL);
 
521
                gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self),
 
522
                                                   GTK_ENTRY_ICON_PRIMARY,
 
523
                                                   NULL);
 
524
                gtk_entry_set_icon_tooltip_text (GTK_ENTRY (self),
 
525
                                                 GTK_ENTRY_ICON_PRIMARY,
 
526
                                                 NULL);
 
527
        }
 
528
 
 
529
        brasero_track_type_free (type);
 
530
 
 
531
        brasero_project_name_set_type (self);
 
532
}
 
533
 
 
534
static void
 
535
brasero_project_name_track_added (BraseroBurnSession *session,
 
536
                                  BraseroTrack *track,
 
537
                                  BraseroProjectName *self)
 
538
{
 
539
        brasero_project_name_session_changed (self);
 
540
}
 
541
 
 
542
static void
 
543
brasero_project_name_track_changed (BraseroBurnSession *session,
 
544
                                    BraseroTrack *track,
 
545
                                    BraseroProjectName *self)
 
546
{
 
547
        /* It can happen that stream tracks change */
 
548
        brasero_project_name_set_type (self);
 
549
}
 
550
 
 
551
static void
 
552
brasero_project_name_track_removed (BraseroBurnSession *session,
 
553
                                    BraseroTrack *track,
 
554
                                    guint former_position,
 
555
                                    BraseroProjectName *self)
 
556
{
 
557
        /* Make sure we don't remain connected */
 
558
        if (BRASERO_IS_TRACK_DATA_CFG (track))
 
559
                g_signal_handlers_disconnect_by_func (track,
 
560
                                                      brasero_project_name_icon_changed_cb,
 
561
                                                      self);
 
562
 
 
563
        brasero_project_name_session_changed (self);
 
564
}
 
565
 
 
566
static void
 
567
brasero_project_name_unset_session (BraseroProjectName *project)
 
568
{
 
569
        BraseroProjectNamePrivate *priv;
 
570
 
 
571
        priv = BRASERO_PROJECT_NAME_PRIVATE (project);
 
572
 
 
573
        if (!priv->session)
 
574
                return;
 
575
 
 
576
        g_signal_handlers_disconnect_by_func (priv->session,
 
577
                                              brasero_project_name_track_added,
 
578
                                              project);
 
579
        g_signal_handlers_disconnect_by_func (priv->session,
 
580
                                              brasero_project_name_track_changed,
 
581
                                              project);
 
582
        g_signal_handlers_disconnect_by_func (priv->session,
 
583
                                              brasero_project_name_track_removed,
 
584
                                              project);
 
585
        g_signal_handlers_disconnect_by_func (priv->session,
 
586
                                              brasero_project_name_flags_changed,
 
587
                                              project);
 
588
 
 
589
        g_object_unref (priv->session);
 
590
        priv->session = NULL;
 
591
}
 
592
 
 
593
void
 
594
brasero_project_name_set_session (BraseroProjectName *project,
 
595
                                  BraseroBurnSession *session)
 
596
{
 
597
        BraseroProjectNamePrivate *priv;
 
598
 
 
599
        priv = BRASERO_PROJECT_NAME_PRIVATE (project);
 
600
 
 
601
        brasero_project_name_unset_session (project);
 
602
        if (!session)
 
603
                return;
 
604
 
 
605
        priv->session = g_object_ref (session);
 
606
        g_signal_connect (priv->session,
 
607
                          "track-added",
 
608
                          G_CALLBACK (brasero_project_name_track_added),
 
609
                          project);
 
610
        g_signal_connect (priv->session,
 
611
                          "track-changed",
 
612
                          G_CALLBACK (brasero_project_name_track_changed),
 
613
                          project);
 
614
        g_signal_connect (priv->session,
 
615
                          "track-removed",
 
616
                          G_CALLBACK (brasero_project_name_track_removed),
 
617
                          project);
 
618
        g_signal_connect (priv->session,
 
619
                          "flags-changed",
 
620
                          G_CALLBACK (brasero_project_name_flags_changed),
 
621
                          project);
 
622
 
 
623
        brasero_project_name_session_changed (project);
 
624
}
 
625
 
 
626
static void
 
627
brasero_project_name_set_property (GObject *object,
 
628
                                   guint property_id,
 
629
                                   const GValue *value,
 
630
                                   GParamSpec *pspec)
 
631
{
 
632
        BraseroProjectNamePrivate *priv;
 
633
 
 
634
        priv = BRASERO_PROJECT_NAME_PRIVATE (object);
 
635
 
 
636
        switch (property_id) {
 
637
        case PROP_SESSION:
 
638
                brasero_project_name_set_session (BRASERO_PROJECT_NAME (object),
 
639
                                                  g_value_get_object (value));
 
640
                break;
 
641
 
 
642
        default:
 
643
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
 
644
        }
 
645
}
 
646
 
 
647
static void
 
648
brasero_project_name_get_property (GObject *object,
 
649
                                   guint property_id,
 
650
                                   GValue *value,
 
651
                                   GParamSpec *pspec)
 
652
{
 
653
        BraseroProjectNamePrivate *priv;
 
654
 
 
655
        priv = BRASERO_PROJECT_NAME_PRIVATE (object);
 
656
 
 
657
        switch (property_id) {
 
658
        case PROP_SESSION:
 
659
                g_value_set_object (value, G_OBJECT (priv->session));
 
660
                break;
 
661
 
 
662
        default:
 
663
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
 
664
        }
 
665
}
 
666
 
 
667
static void
304
668
brasero_project_name_finalize (GObject *object)
305
669
{
306
670
        BraseroProjectNamePrivate *priv;
307
671
 
308
672
        priv = BRASERO_PROJECT_NAME_PRIVATE (object);
309
 
        if (priv->medium) {
310
 
                g_object_unref (priv->medium);
311
 
                priv->medium = NULL;
312
 
        }
 
673
 
 
674
        brasero_project_name_unset_session (BRASERO_PROJECT_NAME (object));
313
675
 
314
676
        G_OBJECT_CLASS (brasero_project_name_parent_class)->finalize (object);
315
677
}
322
684
        g_type_class_add_private (klass, sizeof (BraseroProjectNamePrivate));
323
685
 
324
686
        object_class->finalize = brasero_project_name_finalize;
 
687
        object_class->set_property = brasero_project_name_set_property;
 
688
        object_class->get_property = brasero_project_name_get_property;
 
689
 
325
690
        brasero_project_name_signals [CHANGED_SIGNAL] =
326
691
            g_signal_new ("name_changed",
327
692
                          BRASERO_TYPE_PROJECT_NAME,
332
697
                          g_cclosure_marshal_VOID__VOID,
333
698
                          G_TYPE_NONE,
334
699
                          0);
 
700
 
 
701
        g_object_class_install_property (object_class,
 
702
                                         PROP_SESSION,
 
703
                                         g_param_spec_object ("session",
 
704
                                                              "The session",
 
705
                                                              "The session to work with",
 
706
                                                              BRASERO_TYPE_BURN_SESSION,
 
707
                                                              G_PARAM_READWRITE));
335
708
}
336
709
 
337
710
GtkWidget *
338
 
brasero_project_name_new (void)
 
711
brasero_project_name_new (BraseroBurnSession *session)
339
712
{
340
 
        return g_object_new (BRASERO_TYPE_PROJECT_NAME, NULL);
 
713
        return g_object_new (BRASERO_TYPE_PROJECT_NAME,
 
714
                             "session", session,
 
715
                             NULL);
341
716
}
342
717