summaryrefslogtreecommitdiff
path: root/panels
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2015-03-25 18:58:14 +0100
committerRui Matos <tiagomatos@gmail.com>2015-04-13 14:02:00 +0200
commita963a9c3f4c605b9465392774900171c7eb5721b (patch)
treea811c2ba08b4ac9a62e0d30714c3304b10a11923 /panels
parentc730ebc4b68b1338bf3f7ada98df94a67fce5fe1 (diff)
downloadgnome-control-center-a963a9c3f4c605b9465392774900171c7eb5721b.tar.gz
display: Don't leak GnomeRRModes
GnomeRRMode is a boxed type which means that if stored as such in a tree model, the model creates a copy to use internally. In addition, it means that gtk_tree_model_get() will also get a copy which must be freed by the caller which we were not doing. In this case though, we don't need the copies since all the GnomeRRModes that we use outlive the model so we can simplify things by just storing a plain pointer in the model instead. https://bugzilla.gnome.org/show_bug.cgi?id=655041
Diffstat (limited to 'panels')
-rw-r--r--panels/display/cc-display-panel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 366f20ea4..98e89cdf3 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -2113,7 +2113,7 @@ show_setup_dialog (CcDisplayPanel *panel)
gtk_widget_set_halign (label, GTK_ALIGN_START);
/* resolution combo box */
- res_model = gtk_list_store_new (2, G_TYPE_STRING, GNOME_TYPE_RR_MODE);
+ res_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
priv->res_combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (res_model));
g_object_unref (res_model);
renderer = gtk_cell_renderer_text_new ();