* src/glabels.c: (main):
* src/label-barcode.c: (gl_label_barcode_finalize):
* src/label-text.c: (gl_label_text_finalize), (set_font_family):
* src/label.c: (gl_label_instance_init), (gl_label_finalize):
* src/object-editor.c: (gl_object_editor_finalize):
Another pass at valgrinding -- plugged several memory leaks.
* src/view-text.c: (gl_view_text_new),
(update_canvas_item_from_object_cb), (draw_hacktext):
Commented out artifacts of edit-in-place code.
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@560
f5e0f49d-192f-0410-a22d-
a8d8700d0965
+2005-10-29 Jim Evins <evins@snaught.com>
+
+ * src/glabels.c: (main):
+ * src/label-barcode.c: (gl_label_barcode_finalize):
+ * src/label-text.c: (gl_label_text_finalize), (set_font_family):
+ * src/label.c: (gl_label_instance_init), (gl_label_finalize):
+ * src/object-editor.c: (gl_object_editor_finalize):
+ Another pass at valgrinding -- plugged several memory leaks.
+ * src/view-text.c: (gl_view_text_new),
+ (update_canvas_item_from_object_cb), (draw_hacktext):
+ Commented out artifacts of edit-in-place code.
+
2005-10-28 Jim Evins <evins@snaught.com>
* src/canvas-hacktext.c: (gl_canvas_hacktext_set_arg):
/* Begin main loop */
gtk_main();
-
+
+ g_object_unref (G_OBJECT (program));
+
return 0;
}
lbc = GL_LABEL_BARCODE (object);
- gl_color_node_free (&(lbc->private->color_node));
gl_text_node_free (&lbc->private->text_node);
+ g_free (lbc->private->id);
+ gl_color_node_free (&(lbc->private->color_node));
g_free (lbc->private);
G_OBJECT_CLASS (parent_class)->finalize (object);
ltext = GL_LABEL_TEXT (object);
- gl_color_node_free (&(ltext->private->color_node));
g_object_unref (ltext->private->tag_table);
g_object_unref (ltext->private->buffer);
+ g_free (ltext->private->font_family);
+ gl_color_node_free (&(ltext->private->color_node));
g_free (ltext->private);
G_OBJECT_CLASS (parent_class)->finalize (object);
if (ltext->private->font_family) {
if (g_strcasecmp (ltext->private->font_family, good_font_family) == 0) {
+ g_free (good_font_family);
gl_debug (DEBUG_LABEL, "END (no change)");
return;
}
gl_debug (DEBUG_LABEL, "START");
label->private = g_new0 (glLabelPrivate, 1);
- label->private->merge = NULL;
+ label->private->template = NULL;
+ label->private->filename = NULL;
+ label->private->merge = NULL;
label->private->pixbuf_cache = gl_pixbuf_cache_new ();
gl_debug (DEBUG_LABEL, "END");
label = GL_LABEL (object);
- gl_template_free (label->private->template);
-
for (p = label->objects; p != NULL; p = p_next) {
p_next = p->next; /* NOTE: p will be left dangling */
g_object_unref (G_OBJECT(p->data));
}
+ gl_template_free (label->private->template);
+ g_free (label->private->filename);
if (label->private->merge != NULL) {
g_object_unref (G_OBJECT(label->private->merge));
}
-
gl_pixbuf_cache_free (label->private->pixbuf_cache);
g_free (label->private);
g_return_if_fail (GL_IS_OBJECT_EDITOR (editor));
g_return_if_fail (editor->priv != NULL);
+ if (editor->priv->gui) {
+ g_object_unref (G_OBJECT (editor->priv->gui));
+ }
+
g_free (editor->priv);
g_signal_handlers_disconnect_by_func (G_OBJECT(gl_prefs),
GList *item_list;
+#ifdef EDIT_TEXT_IN_PLACE
GnomeCanvasItem *cursor;
gboolean cursor_visible;
gboolean cursor_state;
guint cursor_timeout;
-
+#endif
};
/*========================================================*/
/* Create analogous canvas item. */
draw_hacktext (view_text);
+#ifdef EDIT_TEXT_IN_PLACE
draw_cursor (view_text);
+#endif
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_canvas_item_from_object_cb), view_text);
G_CALLBACK (item_event_cb), view_text);
buffer = gl_label_text_get_buffer (object);
+#ifdef EDIT_TEXT_IN_PLACE
g_signal_connect (G_OBJECT (buffer), "mark-set",
G_CALLBACK (mark_set_cb), view_text);
+#endif
gl_debug (DEBUG_VIEW, "END");
/* Adjust appearance of analogous canvas item. */
draw_hacktext (view_text);
+#ifdef EDIT_TEXT_IN_PLACE
draw_cursor (view_text);
+#endif
gl_debug (DEBUG_VIEW, "END");
}
}
/* clean up */
+ g_free (font_family);
gl_color_node_free (&color_node);
g_strfreev (line);
g_free (text);
gl_debug (DEBUG_VIEW, "END");
}
+#ifdef EDIT_TEXT_IN_PLACE
/*--------------------------------------------------------------------------*/
/* PRIVATE. Draw cursor to item (group). */
/*--------------------------------------------------------------------------*/
return FALSE;
}
+#endif /* EDIT_TEXT_IN_PLACE */
+
/*--------------------------------------------------------------------------*/
/* PRIVATE. Item event callback. */
/*--------------------------------------------------------------------------*/