brasero r1191 - in trunk: . po src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1191 - in trunk: . po src
- Date: Wed, 27 Aug 2008 14:31:31 +0000 (UTC)
Author: philippr
Date: Wed Aug 27 14:31:31 2008
New Revision: 1191
URL: http://svn.gnome.org/viewvc/brasero?rev=1191&view=rev
Log:
Split drive info and create a new info object more specific for source
drive.
* src/Makefile.am:
* src/brasero-dest-selection.c
(brasero_dest_selection_image_properties),
(brasero_dest_selection_set_image_properties),
(brasero_dest_selection_check_image_settings),
(brasero_dest_selection_source_changed),
(brasero_dest_selection_drive_changed),
(brasero_dest_selection_init),
(brasero_dest_selection_set_property):
* src/brasero-disc-copy-dialog.c (brasero_disc_copy_dialog_init):
* src/brasero-drive-selection.c
(brasero_drive_selection_drive_changed),
(brasero_drive_selection_init):
* src/brasero-drive-selection.h:
* src/brasero-medium-selection.c
(brasero_medium_selection_medium_removed_cb):
* src/brasero-src-info.c (brasero_src_info_update),
(brasero_src_info_set_medium), (brasero_src_info_init),
(brasero_src_info_finalize), (brasero_src_info_class_init),
(brasero_src_info_new):
* src/brasero-src-info.h:
* src/brasero-src-selection.c
(brasero_src_selection_drive_changed),
(brasero_src_selection_init):
* src/brasero-tool-dialog.c (brasero_tool_dialog_drive_changed_cb),
(brasero_tool_dialog_init):
Added:
trunk/src/brasero-src-info.c
trunk/src/brasero-src-info.h
Modified:
trunk/ChangeLog
trunk/po/ChangeLog
trunk/po/POTFILES.in
trunk/src/Makefile.am
trunk/src/brasero-dest-selection.c
trunk/src/brasero-disc-copy-dialog.c
trunk/src/brasero-drive-selection.c
trunk/src/brasero-drive-selection.h
trunk/src/brasero-medium-selection.c
trunk/src/brasero-src-selection.c
trunk/src/brasero-tool-dialog.c
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Wed Aug 27 14:31:31 2008
@@ -1,6 +1,7 @@
# List of source files containing translatable strings.
[encoding: UTF-8]
+src/brasero-src-info.c
src/brasero-app.c
data/brasero.desktop.in.in
data/brasero.schemas.in
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Wed Aug 27 14:31:31 2008
@@ -270,7 +270,9 @@
scsi-read10.c \
scsi-sbc.h \
brasero-app.c \
- brasero-app.h
+ brasero-app.h \
+ brasero-src-info.c \
+ brasero-src-info.h
if BUILD_INOTIFY
brasero_SOURCES += brasero-file-monitor.c brasero-file-monitor.h
Modified: trunk/src/brasero-dest-selection.c
==============================================================================
--- trunk/src/brasero-dest-selection.c (original)
+++ trunk/src/brasero-dest-selection.c Wed Aug 27 14:31:31 2008
@@ -51,6 +51,7 @@
#include "burn-drive.h"
#include "brasero-drive-selection.h"
#include "brasero-drive-properties.h"
+#include "brasero-drive-info.h"
#include "brasero-image-properties.h"
#include "brasero-dest-selection.h"
@@ -61,6 +62,8 @@
BraseroBurnCaps *caps;
BraseroBurnSession *session;
+ GtkWidget *info;
+
GtkWidget *drive_prop;
GtkWidget *button;
@@ -732,7 +735,7 @@
gtk_widget_destroy (priv->drive_prop);
priv->drive_prop = NULL;
- brasero_drive_selection_set_image_path (BRASERO_DRIVE_SELECTION (self), image_path);
+ brasero_drive_info_set_image_path (BRASERO_DRIVE_INFO (priv->info), image_path);
brasero_dest_selection_set_output_path (self,
format,
image_path);
@@ -1068,8 +1071,7 @@
brasero_dest_selection_set_output_path (self,
output.subtype.img_format,
path);
- brasero_drive_selection_set_image_path (BRASERO_DRIVE_SELECTION (self),
- path);
+ brasero_drive_info_set_image_path (BRASERO_DRIVE_INFO (priv->info), path);
g_free (path);
brasero_burn_session_remove_flag (priv->session,
@@ -1142,7 +1144,7 @@
brasero_dest_selection_set_output_path (self,
format,
path);
- brasero_drive_selection_set_image_path (BRASERO_DRIVE_SELECTION (self), path);
+ brasero_drive_info_set_image_path (BRASERO_DRIVE_INFO (priv->info), path);
g_free (path);
}
else
@@ -1230,8 +1232,8 @@
priv = BRASERO_DEST_SELECTION_PRIVATE (self);
- brasero_drive_selection_set_same_src_dest (BRASERO_DRIVE_SELECTION (self),
- brasero_burn_session_same_src_dest_drive (priv->session));
+ brasero_drive_info_set_same_src_dest (BRASERO_DRIVE_INFO (priv->info),
+ brasero_burn_session_same_src_dest_drive (priv->session));
if (brasero_burn_session_is_dest_file (priv->session)) {
/* check that if a path was set there may be none if there was
@@ -1327,13 +1329,17 @@
priv = BRASERO_DEST_SELECTION_PRIVATE (selection);
+ brasero_drive_info_set_medium (BRASERO_DRIVE_INFO (priv->info),
+ brasero_drive_get_medium (drive));
+
+
if (!priv->session)
return;
brasero_burn_session_set_burner (priv->session, drive);
if (brasero_burn_session_same_src_dest_drive (priv->session))
- brasero_drive_selection_set_same_src_dest (selection, TRUE);
+ brasero_drive_info_set_same_src_dest (BRASERO_DRIVE_INFO (priv->info), TRUE);
}
static void
@@ -1357,6 +1363,14 @@
priv = BRASERO_DEST_SELECTION_PRIVATE (object);
+ priv->info = brasero_drive_info_new ();
+ gtk_widget_show (priv->info);
+ gtk_box_pack_start (GTK_BOX (object),
+ priv->info,
+ FALSE,
+ FALSE,
+ 0);
+
priv->caps = brasero_burn_caps_get_default ();
manager = brasero_plugin_manager_get_default ();
priv->caps_sig = g_signal_connect (manager,
@@ -1474,8 +1488,8 @@
if (drive)
g_object_unref (drive);
- brasero_drive_selection_set_same_src_dest (BRASERO_DRIVE_SELECTION (object),
- brasero_burn_session_same_src_dest_drive (priv->session));
+ brasero_drive_info_set_same_src_dest (BRASERO_DRIVE_INFO (priv->info),
+ brasero_burn_session_same_src_dest_drive (priv->session));
if (brasero_burn_session_is_dest_file (session))
brasero_dest_selection_set_image_properties (BRASERO_DEST_SELECTION (object));
Modified: trunk/src/brasero-disc-copy-dialog.c
==============================================================================
--- trunk/src/brasero-disc-copy-dialog.c (original)
+++ trunk/src/brasero-disc-copy-dialog.c Wed Aug 27 14:31:31 2008
@@ -153,7 +153,7 @@
NULL),
FALSE,
FALSE,
- 6);
+ 0);
/* destination drive */
priv->selection = brasero_dest_selection_new (priv->session);
@@ -168,7 +168,7 @@
NULL),
FALSE,
FALSE,
- 6);
+ 0);
/* only show media with something to be read on them */
brasero_drive_selection_set_type_shown (BRASERO_DRIVE_SELECTION (priv->source),
Modified: trunk/src/brasero-drive-selection.c
==============================================================================
--- trunk/src/brasero-drive-selection.c (original)
+++ trunk/src/brasero-drive-selection.c Wed Aug 27 14:31:31 2008
@@ -42,7 +42,6 @@
struct _BraseroDriveSelectionPrivate
{
GtkWidget *box;
- GtkWidget *info;
GtkWidget *button;
GtkWidget *selection;
@@ -77,8 +76,6 @@
else
drive = NULL;
- brasero_drive_info_set_medium (BRASERO_DRIVE_INFO (priv->info), medium);
-
if (priv->locked_drive && priv->locked_drive != drive) {
brasero_drive_unlock (priv->locked_drive);
g_object_unref (priv->locked_drive);
@@ -87,7 +84,6 @@
if (!drive) {
gtk_widget_set_sensitive (priv->selection, FALSE);
- gtk_widget_set_sensitive (priv->info, FALSE);
g_signal_emit (self,
brasero_drive_selection_signals [DRIVE_CHANGED_SIGNAL],
@@ -99,7 +95,6 @@
return;
}
- gtk_widget_set_sensitive (priv->info, TRUE);
gtk_widget_set_sensitive (priv->selection, (priv->locked_drive == NULL));
g_signal_emit (self,
brasero_drive_selection_signals [DRIVE_CHANGED_SIGNAL],
@@ -117,27 +112,6 @@
brasero_drive_selection_drive_changed (self);
}
-void
-brasero_drive_selection_set_image_path (BraseroDriveSelection *self,
- const gchar *path)
-{
- BraseroDriveSelectionPrivate *priv;
-
- priv = BRASERO_DRIVE_SELECTION_PRIVATE (self);
- brasero_drive_info_set_image_path (BRASERO_DRIVE_INFO (priv->info), path);
-}
-
-void
-brasero_drive_selection_set_same_src_dest (BraseroDriveSelection *self,
- gboolean value)
-{
- BraseroDriveSelectionPrivate *priv;
-
- priv = BRASERO_DRIVE_SELECTION_PRIVATE (self);
- brasero_drive_info_set_same_src_dest (BRASERO_DRIVE_INFO (priv->info),
- value);
-}
-
gboolean
brasero_drive_selection_set_drive (BraseroDriveSelection *self,
BraseroDrive *drive)
@@ -273,13 +247,6 @@
FALSE,
0);
- priv->info = brasero_drive_info_new ();
- gtk_box_pack_start (GTK_BOX (object),
- priv->info,
- FALSE,
- FALSE,
- 0);
-
gtk_widget_show_all (GTK_WIDGET (object));
}
Modified: trunk/src/brasero-drive-selection.h
==============================================================================
--- trunk/src/brasero-drive-selection.h (original)
+++ trunk/src/brasero-drive-selection.h Wed Aug 27 14:31:31 2008
@@ -79,14 +79,6 @@
brasero_drive_selection_get_medium (BraseroDriveSelection *selection);
void
-brasero_drive_selection_set_image_path (BraseroDriveSelection *selection,
- const gchar *path);
-
-void
-brasero_drive_selection_set_same_src_dest (BraseroDriveSelection *selection,
- gboolean same_src_dest);
-
-void
brasero_drive_selection_set_button (BraseroDriveSelection *selection,
GtkWidget *button);
Modified: trunk/src/brasero-medium-selection.c
==============================================================================
--- trunk/src/brasero-medium-selection.c (original)
+++ trunk/src/brasero-medium-selection.c Wed Aug 27 14:31:31 2008
@@ -316,7 +316,10 @@
break;
}
- g_object_unref (iter_medium);
+ /* Could be NULL if a message "there is no medium ..." is on */
+ if (iter_medium)
+ g_object_unref (iter_medium);
+
} while (gtk_tree_model_iter_next (model, &iter));
if (!gtk_tree_model_get_iter_first (model, &iter)) {
Added: trunk/src/brasero-src-info.c
==============================================================================
--- (empty file)
+++ trunk/src/brasero-src-info.c Wed Aug 27 14:31:31 2008
@@ -0,0 +1,230 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * brasero-git-trunk
+ * Copyright (C) Philippe Rouquier 2008 <bonfire-app wanadoo fr>
+ *
+ * brasero-git-trunk is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * brasero-git-trunk is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
+#include <gtk/gtk.h>
+
+#include "burn-medium.h"
+
+#include "brasero-utils.h"
+#include "brasero-src-info.h"
+
+typedef struct _BraseroSrcInfoPrivate BraseroSrcInfoPrivate;
+struct _BraseroSrcInfoPrivate
+{
+ GtkWidget *image;
+// GtkWidget *status;
+ GtkWidget *capacity;
+ BraseroMedium *medium;
+};
+
+#define BRASERO_SRC_INFO_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_SRC_INFO, BraseroSrcInfoPrivate))
+
+
+G_DEFINE_TYPE (BraseroSrcInfo, brasero_src_info, GTK_TYPE_HBOX);
+
+static void
+brasero_src_info_update (BraseroSrcInfo *self)
+{
+ gchar *string;
+ gint64 sectors = 0;
+ BraseroMedia media;
+ BraseroSrcInfoPrivate *priv;
+
+ priv = BRASERO_SRC_INFO_PRIVATE (self);
+
+ if (priv->medium)
+ media = brasero_medium_get_status (priv->medium);
+ else
+ media = BRASERO_MEDIUM_NONE;
+
+ gtk_label_set_text (GTK_LABEL (priv->capacity), "");
+// gtk_label_set_text (GTK_LABEL (priv->status), "");
+
+ /* type */
+ if (media == BRASERO_MEDIUM_NONE) {
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "drive-optical",
+ GTK_ICON_SIZE_DIALOG);
+
+ gtk_label_set_text (GTK_LABEL (priv->capacity), _("no medium"));
+// gtk_label_set_text (GTK_LABEL (priv->status), _("no medium"));
+ return;
+ }
+
+ if (media == BRASERO_MEDIUM_UNSUPPORTED) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), _("no supported medium"));
+// gtk_label_set_text (GTK_LABEL (priv->status), _("no supported medium"));
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "media-optical",
+ GTK_ICON_SIZE_DIALOG);
+ return;
+ }
+
+ if (media == BRASERO_MEDIUM_BUSY) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), _("medium busy"));
+// gtk_label_set_text (GTK_LABEL (priv->status), _("medium busy"));
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ "media-optical",
+ GTK_ICON_SIZE_DIALOG);
+ return;
+ }
+
+ gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
+ brasero_medium_get_icon (priv->medium),
+ GTK_ICON_SIZE_DIALOG);
+
+ if (media & BRASERO_MEDIUM_BLANK) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), _("0"));
+// gtk_label_set_text (GTK_LABEL (priv->status), _("blank medium"));
+ return;
+ }
+
+ brasero_medium_get_data_size (priv->medium, NULL, §ors);
+ string = brasero_utils_get_sectors_string (sectors,
+ !(media & BRASERO_MEDIUM_HAS_DATA),
+ TRUE,
+ TRUE);
+
+ if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_HAS_AUDIO|BRASERO_MEDIUM_HAS_DATA)) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), string);
+// gtk_label_set_text (GTK_LABEL (priv->status), _("audio and data"));
+ }
+ else if (media & BRASERO_MEDIUM_HAS_AUDIO) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), string);
+// gtk_label_set_text (GTK_LABEL (priv->status), _("audio only"));
+ }
+ else if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_HAS_DATA|BRASERO_MEDIUM_PROTECTED)) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), string);
+// gtk_label_set_text (GTK_LABEL (priv->status), _("protected data"));
+ }
+ else if (media & BRASERO_MEDIUM_HAS_DATA) {
+ gtk_label_set_text (GTK_LABEL (priv->capacity), string);
+// gtk_label_set_text (GTK_LABEL (priv->status), _("data only"));
+ }
+
+ g_free (string);
+}
+
+void
+brasero_src_info_set_medium (BraseroSrcInfo *self,
+ BraseroMedium *medium)
+{
+ BraseroSrcInfoPrivate *priv;
+
+ priv = BRASERO_SRC_INFO_PRIVATE (self);
+
+ if (priv->medium) {
+ g_object_unref (priv->medium);
+ priv->medium = NULL;
+ }
+
+ if (medium) {
+ priv->medium = medium;
+ g_object_ref (medium);
+ }
+
+ brasero_src_info_update (self);
+}
+
+static void
+brasero_src_info_init (BraseroSrcInfo *object)
+{
+ BraseroSrcInfoPrivate *priv;
+ GtkWidget *table;
+ GtkWidget *label;
+
+ priv = BRASERO_SRC_INFO_PRIVATE (object);
+
+ gtk_box_set_spacing (GTK_BOX (object), 12);
+
+ priv->image = gtk_image_new ();
+ gtk_box_pack_end (GTK_BOX (object), priv->image, FALSE, FALSE, 0);
+// gtk_widget_show (priv->image);
+
+ table = gtk_table_new (2, 1, FALSE);
+ gtk_widget_show (table);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 8);
+
+ label = gtk_label_new (_("<b>Size:</b>"));
+ gtk_widget_show (label);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
+ GTK_FILL, GTK_FILL|GTK_EXPAND, 0, 0);
+
+ priv->capacity = gtk_label_new ("");
+ gtk_widget_show (priv->capacity);
+ gtk_misc_set_alignment (GTK_MISC (priv->capacity), 0.0, 0.5);
+ gtk_table_attach (GTK_TABLE (table), priv->capacity, 1, 2, 0, 1,
+ GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 0);
+
+/* label = gtk_label_new (_("<b>Status:</b>"));
+ gtk_widget_show (label);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
+ GTK_FILL, GTK_FILL, 0, 0);
+
+ priv->status = gtk_label_new ("");
+ gtk_widget_show (priv->status);
+ gtk_misc_set_alignment (GTK_MISC (priv->status), 0.0, 0.0);
+ gtk_table_attach (GTK_TABLE (table), priv->status, 1, 2, 1, 2,
+ GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0);
+*/
+ gtk_box_pack_start (GTK_BOX (object), table, FALSE, TRUE, 0);
+}
+
+static void
+brasero_src_info_finalize (GObject *object)
+{
+ BraseroSrcInfoPrivate *priv;
+
+ priv = BRASERO_SRC_INFO_PRIVATE (object);
+
+ if (priv->medium) {
+ g_object_unref (priv->medium);
+ priv->medium = NULL;
+ }
+
+ G_OBJECT_CLASS (brasero_src_info_parent_class)->finalize (object);
+}
+
+static void
+brasero_src_info_class_init (BraseroSrcInfoClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (BraseroSrcInfoPrivate));
+
+ object_class->finalize = brasero_src_info_finalize;
+}
+
+GtkWidget *
+brasero_src_info_new (void)
+{
+ return g_object_new (BRASERO_TYPE_SRC_INFO, NULL);
+}
Added: trunk/src/brasero-src-info.h
==============================================================================
--- (empty file)
+++ trunk/src/brasero-src-info.h Wed Aug 27 14:31:31 2008
@@ -0,0 +1,61 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/*
+ * brasero-git-trunk
+ * Copyright (C) Philippe Rouquier 2008 <bonfire-app wanadoo fr>
+ *
+ * brasero-git-trunk is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * brasero-git-trunk is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _BRASERO_SRC_INFO_H_
+#define _BRASERO_SRC_INFO_H_
+
+#include <glib-object.h>
+#include <gtk/gtkhbox.h>
+
+#include "burn-medium.h"
+
+G_BEGIN_DECLS
+
+#define BRASERO_TYPE_SRC_INFO (brasero_src_info_get_type ())
+#define BRASERO_SRC_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_SRC_INFO, BraseroSrcInfo))
+#define BRASERO_SRC_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_SRC_INFO, BraseroSrcInfoClass))
+#define BRASERO_IS_SRC_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_SRC_INFO))
+#define BRASERO_IS_SRC_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_SRC_INFO))
+#define BRASERO_SRC_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_SRC_INFO, BraseroSrcInfoClass))
+
+typedef struct _BraseroSrcInfoClass BraseroSrcInfoClass;
+typedef struct _BraseroSrcInfo BraseroSrcInfo;
+
+struct _BraseroSrcInfoClass
+{
+ GtkHBoxClass parent_class;
+};
+
+struct _BraseroSrcInfo
+{
+ GtkHBox parent_instance;
+};
+
+GType brasero_src_info_get_type (void) G_GNUC_CONST;
+
+GtkWidget *
+brasero_src_info_new (void);
+
+void
+brasero_src_info_set_medium (BraseroSrcInfo *info,
+ BraseroMedium *medium);
+
+G_END_DECLS
+
+#endif /* _BRASERO_SRC_INFO_H_ */
Modified: trunk/src/brasero-src-selection.c
==============================================================================
--- trunk/src/brasero-src-selection.c (original)
+++ trunk/src/brasero-src-selection.c Wed Aug 27 14:31:31 2008
@@ -27,6 +27,7 @@
#include <glib/gi18n-lib.h>
#include "brasero-src-selection.h"
+#include "brasero-src-info.h"
#include "brasero-drive-selection.h"
#include "burn-track.h"
#include "burn-session.h"
@@ -37,6 +38,8 @@
{
BraseroBurnSession *session;
BraseroTrack *track;
+
+ GtkWidget *info;
};
#define BRASERO_SRC_SELECTION_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_SRC_SELECTION, BraseroSrcSelectionPrivate))
@@ -57,6 +60,10 @@
BraseroSrcSelectionPrivate *priv;
priv = BRASERO_SRC_SELECTION_PRIVATE (selection);
+
+ brasero_src_info_set_medium (BRASERO_SRC_INFO (priv->info),
+ brasero_drive_get_medium (drive));
+
if (!priv->session)
return;
@@ -70,6 +77,11 @@
brasero_track_set_drive_source (priv->track, drive);
brasero_burn_session_add_track (priv->session, priv->track);
+
+ if (!drive)
+ gtk_widget_set_sensitive (priv->info, FALSE);
+ else
+ gtk_widget_set_sensitive (priv->info, TRUE);
}
GtkWidget *
@@ -84,6 +96,18 @@
static void
brasero_src_selection_init (BraseroSrcSelection *object)
{
+ BraseroSrcSelectionPrivate *priv;
+
+ priv = BRASERO_SRC_SELECTION_PRIVATE (object);
+
+ priv->info = brasero_src_info_new ();
+ gtk_widget_show (priv->info);
+ gtk_box_pack_start (GTK_BOX (object),
+ priv->info,
+ FALSE,
+ FALSE,
+ 0);
+
brasero_drive_selection_set_tooltip (BRASERO_DRIVE_SELECTION (object),
_("Choose the disc to read from"));
Modified: trunk/src/brasero-tool-dialog.c
==============================================================================
--- trunk/src/brasero-tool-dialog.c (original)
+++ trunk/src/brasero-tool-dialog.c Wed Aug 27 14:31:31 2008
@@ -43,6 +43,7 @@
#include <gtk/gtkmessagedialog.h>
#include "brasero-utils.h"
+#include "brasero-drive-info.h"
#include "brasero-progress.h"
#include "brasero-drive-selection.h"
#include "brasero-tool-dialog.h"
@@ -61,6 +62,7 @@
GtkWidget *button;
GtkWidget *options;
GtkWidget *cancel;
+ GtkWidget *info;
BraseroBurn *burn;
@@ -359,6 +361,8 @@
medium = brasero_drive_get_medium (drive);
+ brasero_drive_info_set_medium (BRASERO_DRIVE_INFO (self->priv->info), medium);
+
klass = BRASERO_TOOL_DIALOG_GET_CLASS (self);
if (klass->drive_changed)
klass->drive_changed (self, medium);
@@ -487,13 +491,18 @@
/* upper part */
obj->priv->upper_box = gtk_vbox_new (FALSE, 0);
gtk_widget_show (GTK_WIDGET (obj->priv->upper_box));
+
obj->priv->selector = brasero_drive_selection_new ();
gtk_widget_show (GTK_WIDGET (obj->priv->selector));
gtk_widget_set_tooltip_text (obj->priv->selector,
_("Choose a media"));
+ obj->priv->info = brasero_drive_info_new ();
+ gtk_widget_show (GTK_WIDGET (obj->priv->info));
+
gtk_box_pack_start (GTK_BOX (obj->priv->upper_box),
brasero_utils_pack_properties (_("<b>Select a disc</b>"),
+ obj->priv->info,
obj->priv->selector,
NULL),
FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]