~ubuntu-branches/ubuntu/intrepid/brasero/intrepid

« back to all changes in this revision

Viewing changes to src/brasero-drive-selection.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-09-16 01:42:16 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080916014216-6i52xrjqda0xo8af
Tags: 0.8.2-0ubuntu1
* New upstream release (LP: #270752)
  - brasero crashed with SIGSEGV in brasero_medium_reload_info()
    (LP: #261691)
  - brasero crashed with SIGSEGV in 
    brasero_jacket_buffer_add_default_tag() (LP: #260502)
  - brasero crashed with SIGSEGV in brasero_medium_get_write_speeds()
    (LP: #257806)
  - copy CD/DVD button disabled in Brasero (LP: #238497)
  - brasero crashed with SIGSEGV in brasero_track_get_toc_source()
    (LP: #256889)
* debian/brasero.install
  - Add brasero-copy-medium, open-image, open-playlist, open-project
    desktop files
* debian/patches/013_disable_deprecated.patch:
  - Dropped, not required anymore
* debian/patches/008-add-gettext-domain-to-desktop-file.patch:
  - Updated for new release
* debian/patches/010_lpi.patch, debian/patches/99_autoconf;
  - Refreshed for the release

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
struct _BraseroDriveSelectionPrivate
43
43
{
44
44
        GtkWidget *box;
45
 
        GtkWidget *info;
46
45
        GtkWidget *button;
47
46
        GtkWidget *selection;
48
47
 
62
61
G_DEFINE_TYPE (BraseroDriveSelection, brasero_drive_selection, GTK_TYPE_VBOX);
63
62
 
64
63
static void
65
 
brasero_drive_selection_drive_changed_cb (BraseroMediumSelection *selector,
66
 
                                          BraseroDriveSelection *self)
 
64
brasero_drive_selection_drive_changed (BraseroDriveSelection *self)
67
65
{
68
66
        BraseroDriveSelectionPrivate *priv;
69
67
        BraseroMedium *medium;
78
76
        else
79
77
                drive = NULL;
80
78
 
81
 
        brasero_drive_info_set_medium (BRASERO_DRIVE_INFO (priv->info), medium);
82
 
 
83
79
        if (priv->locked_drive && priv->locked_drive != drive) {
84
80
                brasero_drive_unlock (priv->locked_drive);
85
81
                g_object_unref (priv->locked_drive);
88
84
 
89
85
        if (!drive) {
90
86
                gtk_widget_set_sensitive (priv->selection, FALSE);
91
 
                gtk_widget_set_sensitive (priv->info, FALSE);
92
87
 
93
88
                g_signal_emit (self,
94
89
                               brasero_drive_selection_signals [DRIVE_CHANGED_SIGNAL],
100
95
                return;
101
96
        }
102
97
 
103
 
        gtk_widget_set_sensitive (priv->info, TRUE);
104
98
        gtk_widget_set_sensitive (priv->selection, (priv->locked_drive == NULL));
105
99
        g_signal_emit (self,
106
100
                       brasero_drive_selection_signals [DRIVE_CHANGED_SIGNAL],
111
105
                g_object_unref (medium);
112
106
}
113
107
 
114
 
void
115
 
brasero_drive_selection_set_image_path (BraseroDriveSelection *self,
116
 
                                        const gchar *path)
117
 
{
118
 
        BraseroDriveSelectionPrivate *priv;
119
 
 
120
 
        priv = BRASERO_DRIVE_SELECTION_PRIVATE (self);
121
 
        brasero_drive_info_set_image_path (BRASERO_DRIVE_INFO (priv->info), path);
122
 
}
123
 
 
124
 
void
125
 
brasero_drive_selection_set_same_src_dest (BraseroDriveSelection *self)
126
 
{
127
 
        BraseroDriveSelectionPrivate *priv;
128
 
 
129
 
        priv = BRASERO_DRIVE_SELECTION_PRIVATE (self);
130
 
        brasero_drive_info_set_same_src_dest (BRASERO_DRIVE_INFO (priv->info));
131
 
}
132
 
 
133
 
void
 
108
static void
 
109
brasero_drive_selection_drive_changed_cb (BraseroMediumSelection *selector,
 
110
                                          BraseroDriveSelection *self)
 
111
{
 
112
        brasero_drive_selection_drive_changed (self);
 
113
}
 
114
 
 
115
gboolean
134
116
brasero_drive_selection_set_drive (BraseroDriveSelection *self,
135
117
                                   BraseroDrive *drive)
136
118
{
139
121
 
140
122
        priv = BRASERO_DRIVE_SELECTION_PRIVATE (self);
141
123
        if (priv->locked_drive)
142
 
                return;
 
124
                return FALSE;
143
125
 
144
126
        medium = brasero_drive_get_medium (drive);
145
 
        brasero_medium_selection_set_active (BRASERO_MEDIUM_SELECTION (priv->selection), medium);
 
127
        if (brasero_medium_selection_set_active (BRASERO_MEDIUM_SELECTION (priv->selection), medium)) {
 
128
                brasero_drive_selection_drive_changed (self);
 
129
                return TRUE;
 
130
        }
 
131
 
 
132
        return FALSE;
146
133
}
147
134
 
148
135
BraseroMedium *
260
247
                            FALSE,
261
248
                            0);
262
249
 
263
 
        priv->info = brasero_drive_info_new ();
264
 
        gtk_box_pack_start (GTK_BOX (object),
265
 
                            priv->info,
266
 
                            FALSE,
267
 
                            FALSE,
268
 
                            0);
269
 
 
270
250
        gtk_widget_show_all (GTK_WIDGET (object));
271
251
}
272
252