comparison 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
comparison
equal deleted inserted replaced
1342:06ec1279e33e 1343:eebb8d0cb677
114 phd = g_object_get_data(G_OBJECT(pane), "pane_data"); 114 phd = g_object_get_data(G_OBJECT(pane), "pane_data");
115 if (!phd) return; 115 if (!phd) return;
116 116
117 WRITE_STRING("<pane_histogram\n"); 117 WRITE_STRING("<pane_histogram\n");
118 indent++; 118 indent++;
119 WRITE_CHAR(*phd, pane.title); 119 write_char_option(outstr, indent, "pane.title", gtk_label_get_text(GTK_LABEL(phd->pane.title)));
120 WRITE_BOOL(*phd, pane.expanded); 120 WRITE_BOOL(*phd, pane.expanded);
121 WRITE_INT(*phd->histogram, histogram_channel); 121 WRITE_INT(*phd->histogram, histogram_channel);
122 WRITE_INT(*phd->histogram, histogram_mode); 122 WRITE_INT(*phd->histogram, histogram_mode);
123 indent--; 123 indent--;
124 WRITE_STRING("/>\n"); 124 WRITE_STRING("/>\n");
178 178
179 g_source_remove(phd->idle_id); 179 g_source_remove(phd->idle_id);
180 file_data_unregister_notify_func(bar_pane_histogram_notify_cb, phd); 180 file_data_unregister_notify_func(bar_pane_histogram_notify_cb, phd);
181 181
182 file_data_unref(phd->fd); 182 file_data_unref(phd->fd);
183 g_free(phd->pane.title);
184 histogram_free(phd->histogram); 183 histogram_free(phd->histogram);
185 if (phd->pixbuf) g_object_unref(phd->pixbuf); 184 if (phd->pixbuf) g_object_unref(phd->pixbuf);
186 185
187 g_free(phd); 186 g_free(phd);
188 } 187 }
333 332
334 phd = g_new0(PaneHistogramData, 1); 333 phd = g_new0(PaneHistogramData, 1);
335 334
336 phd->pane.pane_set_fd = bar_pane_histogram_set_fd; 335 phd->pane.pane_set_fd = bar_pane_histogram_set_fd;
337 phd->pane.pane_write_config = bar_pane_histogram_write_config; 336 phd->pane.pane_write_config = bar_pane_histogram_write_config;
338 phd->pane.title = g_strdup(title); 337 phd->pane.title = gtk_label_new(title);
339 phd->pane.expanded = expanded; 338 phd->pane.expanded = expanded;
340 phd->idle_id = -1; 339 phd->idle_id = -1;
341 340
342 phd->histogram = histogram_new(); 341 phd->histogram = histogram_new();
343 342