diff src/bar_histogram.c @ 1343:eebb8d0cb677

give the panes more control over expander title
author nadvornik
date Sat, 28 Feb 2009 19:44:58 +0000
parents 45bcfcb69f56
children 3f9be528787c
line wrap: on
line diff
--- a/src/bar_histogram.c	Sat Feb 28 19:41:23 2009 +0000
+++ b/src/bar_histogram.c	Sat Feb 28 19:44:58 2009 +0000
@@ -116,7 +116,7 @@
 
 	WRITE_STRING("<pane_histogram\n");
 	indent++;
-	WRITE_CHAR(*phd, pane.title);
+	write_char_option(outstr, indent, "pane.title", gtk_label_get_text(GTK_LABEL(phd->pane.title)));
 	WRITE_BOOL(*phd, pane.expanded);
 	WRITE_INT(*phd->histogram, histogram_channel);
 	WRITE_INT(*phd->histogram, histogram_mode);
@@ -180,7 +180,6 @@
 	file_data_unregister_notify_func(bar_pane_histogram_notify_cb, phd);
 
 	file_data_unref(phd->fd);
-	g_free(phd->pane.title);
 	histogram_free(phd->histogram);
 	if (phd->pixbuf) g_object_unref(phd->pixbuf);
 
@@ -335,7 +334,7 @@
 	
 	phd->pane.pane_set_fd = bar_pane_histogram_set_fd;
 	phd->pane.pane_write_config = bar_pane_histogram_write_config;
-	phd->pane.title = g_strdup(title);
+	phd->pane.title = gtk_label_new(title);
 	phd->pane.expanded = expanded;
 	phd->idle_id = -1;