gimp r26246 - in branches/soc-2008-tagging: . app/widgets



Author: aurisj
Date: Sun Jul 20 13:55:53 2008
New Revision: 26246
URL: http://svn.gnome.org/viewvc/gimp?rev=26246&view=rev

Log:
2008-07-20  Aurimas JuÅka  <aurisj svn gnome org>

	* app/widgets/gimptagentry.c (gimp_tag_entry_class_init),
	(gimp_tag_entry_dispose): cleaned up a bit: marked some strings for
	translation, free resources on dispose.



Modified:
   branches/soc-2008-tagging/ChangeLog
   branches/soc-2008-tagging/app/widgets/gimptagentry.c

Modified: branches/soc-2008-tagging/app/widgets/gimptagentry.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagentry.c	(original)
+++ branches/soc-2008-tagging/app/widgets/gimptagentry.c	Sun Jul 20 13:55:53 2008
@@ -36,10 +36,13 @@
 
 #include "gimptagentry.h"
 
+#include "gimp-intl.h"
+
 #define TAG_SEPARATOR_STR   ","
-#define GIMP_TAG_ENTRY_QUERY_DESC       "filter"
-#define GIMP_TAG_ENTRY_ASSIGN_DESC      "enter tags"
+#define GIMP_TAG_ENTRY_QUERY_DESC       _("filter")
+#define GIMP_TAG_ENTRY_ASSIGN_DESC      _("enter tags")
 
+static void     gimp_tag_entry_dispose                   (GObject              *object);
 static void     gimp_tag_entry_activate                  (GtkEntry             *entry,
                                                           gpointer              unused);
 static void     gimp_tag_entry_changed                   (GtkEntry             *entry,
@@ -97,8 +100,11 @@
 static void
 gimp_tag_entry_class_init (GimpTagEntryClass *klass)
 {
+  GObjectClass         *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass       *widget_class = GTK_WIDGET_CLASS (klass);
-  GtkEntryClass        *entry_class = GTK_ENTRY_CLASS (klass);
+  GtkEntryClass        *entry_class  = GTK_ENTRY_CLASS (klass);
+
+  object_class->dispose                 = gimp_tag_entry_dispose;
 
   widget_class->button_release_event    = gimp_tag_entry_button_release;
 
@@ -134,6 +140,20 @@
                     NULL);
 }
 
+static void
+gimp_tag_entry_dispose (GObject        *object)
+{
+  GimpTagEntry         *tag_entry = GIMP_TAG_ENTRY (object);
+
+  if (tag_entry->selected_items)
+    {
+      g_list_free (tag_entry->selected_items);
+      tag_entry->selected_items = NULL;
+    }
+
+  G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
 GtkWidget *
 gimp_tag_entry_new (GimpFilteredContainer      *tagged_container,
                     GimpTagEntryMode            mode)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]