[brasero] Fixed warning messages
- From: Philippe Rouquier <philippr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] Fixed warning messages
- Date: Sat, 29 Jan 2011 13:50:48 +0000 (UTC)
commit 27cc96cc0437b6ddbc848ab5c41c47fb0ddd65ee
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Sat Jan 29 14:48:23 2011 +0100
Fixed warning messages
libbrasero-media/brasero-medium-selection.c | 14 +++++++++++---
src/brasero-layout.c | 11 +++++++----
2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/libbrasero-media/brasero-medium-selection.c b/libbrasero-media/brasero-medium-selection.c
index af901e1..1cbb21d 100644
--- a/libbrasero-media/brasero-medium-selection.c
+++ b/libbrasero-media/brasero-medium-selection.c
@@ -89,7 +89,10 @@ brasero_medium_selection_buildable_init (GtkBuildableIface *iface)
parent_buildable_iface = g_type_interface_peek_parent (iface);
}
-G_DEFINE_TYPE_WITH_CODE (BraseroMediumSelection, brasero_medium_selection, GTK_TYPE_COMBO_BOX, G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, brasero_medium_selection_buildable_init));
+G_DEFINE_TYPE_WITH_CODE (BraseroMediumSelection,
+ brasero_medium_selection,
+ GTK_TYPE_COMBO_BOX,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, brasero_medium_selection_buildable_init));
void
brasero_medium_selection_foreach (BraseroMediumSelection *selection,
@@ -816,6 +819,12 @@ brasero_medium_selection_medium_removed_cb (BraseroMediumMonitor *monitor,
}
static void
+brasero_medium_selection_constructed (GObject *object)
+{
+ brasero_medium_selection_set_show_used_space (object);
+}
+
+static void
brasero_medium_selection_init (BraseroMediumSelection *object)
{
GtkListStore *model;
@@ -846,8 +855,6 @@ brasero_medium_selection_init (BraseroMediumSelection *object)
gtk_combo_box_set_model (GTK_COMBO_BOX (object), GTK_TREE_MODEL (model));
g_object_unref (model);
-
- brasero_medium_selection_set_show_used_space (object);
}
static void
@@ -928,6 +935,7 @@ brasero_medium_selection_class_init (BraseroMediumSelectionClass *klass)
g_type_class_add_private (klass, sizeof (BraseroMediumSelectionPrivate));
+ object_class->constructed = brasero_medium_selection_constructed;
object_class->finalize = brasero_medium_selection_finalize;
object_class->set_property = brasero_medium_selection_set_property;
object_class->get_property = brasero_medium_selection_get_property;
diff --git a/src/brasero-layout.c b/src/brasero-layout.c
index 7a00380..edf9818 100644
--- a/src/brasero-layout.c
+++ b/src/brasero-layout.c
@@ -992,10 +992,13 @@ brasero_layout_combo_destroy_cb (GtkWidget *object,
/* empty tree */
model = gtk_combo_box_get_model (GTK_COMBO_BOX (object));
- model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
- gtk_tree_model_foreach (model,
- brasero_layout_foreach_item_cb,
- NULL);
+ if (model)
+ model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
+
+ if (model)
+ gtk_tree_model_foreach (model,
+ brasero_layout_foreach_item_cb,
+ NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]