[brasero/gnome-3-8] brasero-dest-selection: populate model after construction
- From: Joshua Lock <joshuagl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero/gnome-3-8] brasero-dest-selection: populate model after construction
- Date: Fri, 9 Aug 2013 17:28:18 +0000 (UTC)
commit ee90dc62d9e9234697eecad8c3621ab2113d09ce
Author: Joshua Lock <joshua lock intel com>
Date: Fri Aug 9 18:22:12 2013 +0100
brasero-dest-selection: populate model after construction
As Jonh did for brasero-drive-selection in 4cdec3b2, move model population
from init to construction to resolve an issue in drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=666445
libbrasero-burn/brasero-dest-selection.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/libbrasero-burn/brasero-dest-selection.c b/libbrasero-burn/brasero-dest-selection.c
index 8d91c99..d5daf7c 100644
--- a/libbrasero-burn/brasero-dest-selection.c
+++ b/libbrasero-burn/brasero-dest-selection.c
@@ -239,6 +239,19 @@ brasero_dest_selection_medium_added (GtkTreeModel *model,
}
static void
+brasero_dest_selection_constructed (GObject *object)
+{
+ G_OBJECT_CLASS (brasero_dest_selection_parent_class)->constructed (object);
+
+ /* Only show media on which we can write and which are in a burner.
+ * There is one exception though, when we're copying media and when the
+ * burning device is the same as the dest device. */
+ brasero_medium_selection_show_media_type (BRASERO_MEDIUM_SELECTION (object),
+ BRASERO_MEDIA_TYPE_WRITABLE|
+ BRASERO_MEDIA_TYPE_FILE);
+}
+
+static void
brasero_dest_selection_init (BraseroDestSelection *object)
{
GtkTreeModel *model;
@@ -253,13 +266,6 @@ brasero_dest_selection_init (BraseroDestSelection *object)
G_CALLBACK (brasero_dest_selection_medium_removed),
object);
- /* Only show media on which we can write and which are in a burner.
- * There is one exception though, when we're copying media and when the
- * burning device is the same as the dest device. */
- brasero_medium_selection_show_media_type (BRASERO_MEDIUM_SELECTION (object),
- BRASERO_MEDIA_TYPE_WRITABLE|
- BRASERO_MEDIA_TYPE_FILE);
-
/* This is to know when the user changed it on purpose */
g_signal_connect (object,
"notify::popup-shown",
@@ -736,6 +742,7 @@ brasero_dest_selection_class_init (BraseroDestSelectionClass *klass)
object_class->finalize = brasero_dest_selection_finalize;
object_class->set_property = brasero_dest_selection_set_property;
object_class->get_property = brasero_dest_selection_get_property;
+ object_class->constructed = brasero_dest_selection_constructed;
medium_selection_class->format_medium_string = brasero_dest_selection_format_medium_string;
medium_selection_class->medium_changed = brasero_dest_selection_medium_changed;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]