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



Author: aurisj
Date: Sun Oct 12 20:08:21 2008
New Revision: 27250
URL: http://svn.gnome.org/viewvc/gimp?rev=27250&view=rev

Log:
2008-10-12  Aurimas JuÅka  <aurisj svn gnome org>

	* app/core/gimpbrush.c
	* app/core/gimpfilteredcontainer.c
	* app/core/gimptag.[ch]
	* app/core/gimptagcache.[ch]
	* app/widgets/gimpcombotagentry.c
	* app/widgets/gimptagentry.c: fixed some minor issues.



Modified:
   branches/soc-2008-tagging/ChangeLog
   branches/soc-2008-tagging/app/core/gimpbrush.c
   branches/soc-2008-tagging/app/core/gimpfilteredcontainer.c
   branches/soc-2008-tagging/app/core/gimptag.c
   branches/soc-2008-tagging/app/core/gimptag.h
   branches/soc-2008-tagging/app/core/gimptagcache.c
   branches/soc-2008-tagging/app/core/gimptagcache.h
   branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c
   branches/soc-2008-tagging/app/widgets/gimptagentry.c

Modified: branches/soc-2008-tagging/app/core/gimpbrush.c
==============================================================================
--- branches/soc-2008-tagging/app/core/gimpbrush.c	(original)
+++ branches/soc-2008-tagging/app/core/gimpbrush.c	Sun Oct 12 20:08:21 2008
@@ -21,7 +21,7 @@
 #include <glib-object.h>
 
 #include "libgimpbase/gimpbase.h"
-#include "libgimpmath/gimpmd5.h"
+#include "libgimpmath/gimpmath.h"
 
 #include "core-types.h"
 

Modified: branches/soc-2008-tagging/app/core/gimpfilteredcontainer.c
==============================================================================
--- branches/soc-2008-tagging/app/core/gimpfilteredcontainer.c	(original)
+++ branches/soc-2008-tagging/app/core/gimpfilteredcontainer.c	Sun Oct 12 20:08:21 2008
@@ -120,13 +120,17 @@
   GimpFilteredContainer        *filtered_container = GIMP_FILTERED_CONTAINER (object);
 
   g_signal_handlers_disconnect_by_func (filtered_container->src_container,
-                                        gimp_filtered_container_src_add, filtered_container);
+                                        gimp_filtered_container_src_add,
+                                        filtered_container);
   g_signal_handlers_disconnect_by_func (filtered_container->src_container,
-                                        gimp_filtered_container_src_remove, filtered_container);
+                                        gimp_filtered_container_src_remove,
+                                        filtered_container);
   g_signal_handlers_disconnect_by_func (filtered_container->src_container,
-                                        gimp_filtered_container_src_freeze, filtered_container);
+                                        gimp_filtered_container_src_freeze,
+                                        filtered_container);
   g_signal_handlers_disconnect_by_func (filtered_container->src_container,
-                                        gimp_filtered_container_src_thaw, filtered_container);
+                                        gimp_filtered_container_src_thaw,
+                                        filtered_container);
 
   G_OBJECT_CLASS (parent_class)->dispose (object);
 }
@@ -181,13 +185,17 @@
   gimp_filtered_container_filter (filtered_container);
 
   g_signal_connect (src_container, "add",
-                    G_CALLBACK (gimp_filtered_container_src_add), filtered_container);
+                    G_CALLBACK (gimp_filtered_container_src_add),
+                    filtered_container);
   g_signal_connect (src_container, "remove",
-                    G_CALLBACK (gimp_filtered_container_src_remove), filtered_container);
+                    G_CALLBACK (gimp_filtered_container_src_remove),
+                    filtered_container);
   g_signal_connect (src_container, "freeze",
-                    G_CALLBACK (gimp_filtered_container_src_freeze), filtered_container);
+                    G_CALLBACK (gimp_filtered_container_src_freeze),
+                    filtered_container);
   g_signal_connect (src_container, "thaw",
-                    G_CALLBACK (gimp_filtered_container_src_thaw), filtered_container);
+                    G_CALLBACK (gimp_filtered_container_src_thaw),
+                    filtered_container);
 
   return GIMP_CONTAINER (filtered_container);
 }

Modified: branches/soc-2008-tagging/app/core/gimptag.c
==============================================================================
--- branches/soc-2008-tagging/app/core/gimptag.c	(original)
+++ branches/soc-2008-tagging/app/core/gimptag.c	Sun Oct 12 20:08:21 2008
@@ -243,7 +243,7 @@
 }
 
 gboolean
-g_unichar_is_sentence_terminal (gunichar c)
+gimp_unichar_is_sentence_terminal (gunichar c)
 {
   switch (c)
     {
@@ -289,7 +289,7 @@
 }
 
 gboolean
-g_unichar_is_terminal_punctuation (gunichar    c)
+gimp_unichar_is_terminal_punctuation (gunichar    c)
 {
   switch (c)
     {
@@ -431,7 +431,7 @@
       c = g_utf8_get_char (tag_cursor);
       tag_cursor = g_utf8_next_char (tag_cursor);
       if (g_unichar_isprint (c)
-          && ! g_unichar_is_terminal_punctuation (c))
+          && ! gimp_unichar_is_terminal_punctuation (c))
         {
           g_string_append_unichar (buffer, c);
         }

Modified: branches/soc-2008-tagging/app/core/gimptag.h
==============================================================================
--- branches/soc-2008-tagging/app/core/gimptag.h	(original)
+++ branches/soc-2008-tagging/app/core/gimptag.h	Sun Oct 12 20:08:21 2008
@@ -66,9 +66,10 @@
 
 gchar         * gimp_tag_string_make_valid     (const gchar    *tag_string);
 
-/* one day they should find a better home */
-gboolean        g_unichar_is_sentence_terminal    (gunichar    c);
-gboolean        g_unichar_is_terminal_punctuation (gunichar    c);
+/* one day they should find a better home.
+ * see http://bugzilla.gnome.org/show_bug.cgi?id=546680 */
+gboolean        gimp_unichar_is_sentence_terminal    (gunichar    c);
+gboolean        gimp_unichar_is_terminal_punctuation (gunichar    c);
 
 #endif // __GIMP_TAG_H__
 

Modified: branches/soc-2008-tagging/app/core/gimptagcache.c
==============================================================================
--- branches/soc-2008-tagging/app/core/gimptagcache.c	(original)
+++ branches/soc-2008-tagging/app/core/gimptagcache.c	Sun Oct 12 20:08:21 2008
@@ -37,6 +37,7 @@
 #include "gimpdata.h"
 #include "gimptag.h"
 #include "gimptagcache.h"
+#include "gimptagged.h"
 #include "gimplist.h"
 #include "gimp-utils.h"
 #include "config/gimpxmlparser.h"
@@ -199,7 +200,8 @@
   gimp_container_foreach (container, (GFunc) gimp_tag_cache_object_initialize, cache);
 
   g_signal_connect (container, "add",
-                    G_CALLBACK (gimp_tag_cache_object_add), cache);
+                    G_CALLBACK (gimp_tag_cache_object_add),
+                    cache);
 }
 
 static void

Modified: branches/soc-2008-tagging/app/core/gimptagcache.h
==============================================================================
--- branches/soc-2008-tagging/app/core/gimptagcache.h	(original)
+++ branches/soc-2008-tagging/app/core/gimptagcache.h	Sun Oct 12 20:08:21 2008
@@ -24,7 +24,6 @@
 
 
 #include "gimpobject.h"
-#include "gimptagged.h"
 
 #define GIMP_TYPE_TAG_CACHE            (gimp_tag_cache_get_type ())
 #define GIMP_TAG_CACHE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TAG_CACHE, GimpTagCache))

Modified: branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c	(original)
+++ branches/soc-2008-tagging/app/widgets/gimpcombotagentry.c	Sun Oct 12 20:08:21 2008
@@ -46,8 +46,7 @@
                                                         GdkEvent               *event,
                                                         gpointer                user_data);
 static void     gimp_combo_tag_entry_style_set         (GtkWidget              *widget,
-                                                        GtkStyle               *previous_style,
-                                                        gpointer                user_data);
+                                                        GtkStyle               *previous_style);
 
 static void     gimp_combo_tag_entry_popup_list        (GimpComboTagEntry      *combo_entry);
 static void     gimp_combo_tag_entry_popup_destroy     (GtkObject              *object,
@@ -70,7 +69,11 @@
 gimp_combo_tag_entry_class_init (GimpComboTagEntryClass *klass)
 {
   GObjectClass         *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass       *widget_class = GTK_WIDGET_CLASS (klass);
+
   object_class->dispose         = gimp_combo_tag_entry_dispose;
+
+  widget_class->style_set       = gimp_combo_tag_entry_style_set;
 }
 
 static void
@@ -306,8 +309,7 @@
 
 static void
 gimp_combo_tag_entry_style_set (GtkWidget              *widget,
-                                GtkStyle               *previous_style,
-                                gpointer                user_data)
+                                GtkStyle               *previous_style)
 {
   GimpComboTagEntry            *combo_entry = GIMP_COMBO_TAG_ENTRY (widget);
   GtkStyle                     *style;
@@ -353,8 +355,12 @@
   attribute = pango_attr_background_new (color.red, color.green, color.blue);
   pango_attr_list_insert (combo_entry->insensitive_item_attr, attribute);
 
-
   combo_entry->selected_item_color = style->base[GTK_STATE_SELECTED];
+
+  if (GTK_WIDGET_CLASS (parent_class))
+    {
+      GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
+    }
 }
 
 static void

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 Oct 12 20:08:21 2008
@@ -267,7 +267,8 @@
   if (tag_entry->filtered_container)
     {
       g_signal_handlers_disconnect_by_func (tag_entry->filtered_container,
-                                            gimp_tag_entry_container_changed, tag_entry);
+                                            gimp_tag_entry_container_changed,
+                                            tag_entry);
       g_object_unref (tag_entry->filtered_container);
       tag_entry->filtered_container = NULL;
     }
@@ -296,9 +297,11 @@
           g_assert (GIMP_IS_FILTERED_CONTAINER (tag_entry->filtered_container));
           g_object_ref (tag_entry->filtered_container);
           g_signal_connect (tag_entry->filtered_container, "add",
-                            G_CALLBACK (gimp_tag_entry_container_changed), tag_entry);
+                            G_CALLBACK (gimp_tag_entry_container_changed),
+                            tag_entry);
           g_signal_connect (tag_entry->filtered_container, "remove",
-                            G_CALLBACK (gimp_tag_entry_container_changed), tag_entry);
+                            G_CALLBACK (gimp_tag_entry_container_changed),
+                            tag_entry);
           break;
 
       case PROP_TAG_ENTRY_MODE:
@@ -563,7 +566,8 @@
   if (! tag_entry->internal_operation)
     {
       g_signal_handlers_block_by_func (editable,
-                                       gimp_tag_entry_delete_text, NULL);
+                                       gimp_tag_entry_delete_text,
+                                       NULL);
 
       if (end_pos > start_pos
           && (tag_entry->mask->str[end_pos - 1] == 't'
@@ -583,7 +587,8 @@
         }
 
       g_signal_handlers_unblock_by_func (editable,
-                                         gimp_tag_entry_delete_text, NULL);
+                                         gimp_tag_entry_delete_text,
+                                         NULL);
 
       g_signal_stop_emission_by_name (editable, "delete_text");
     }
@@ -807,7 +812,7 @@
       c = g_utf8_get_char (cursor);
       cursor = g_utf8_next_char (cursor);
 
-      if (! c || g_unichar_is_terminal_punctuation (c))
+      if (! c || gimp_unichar_is_terminal_punctuation (c))
         {
           if (parsed_tag->len > 0)
             {
@@ -963,7 +968,7 @@
     {
       c = g_utf8_get_char (cursor);
       cursor = g_utf8_next_char (cursor);
-      if (g_unichar_is_terminal_punctuation (c))
+      if (gimp_unichar_is_terminal_punctuation (c))
         {
           prefix_start = cursor;
         }
@@ -1291,7 +1296,7 @@
   guchar                c;
 
   c = gdk_keyval_to_unicode (event->keyval);
-  if (g_unichar_is_terminal_punctuation (c))
+  if (gimp_unichar_is_terminal_punctuation (c))
     {
       g_idle_add ((GSourceFunc) gimp_tag_entry_commit_source_func, tag_entry);
       return FALSE;
@@ -1710,7 +1715,7 @@
       if (stage == 1)
         {
           /* tag */
-          if (c && ! g_unichar_is_terminal_punctuation (c))
+          if (c && ! gimp_unichar_is_terminal_punctuation (c))
             {
               g_string_append_unichar (tag_buffer, c);
             }
@@ -1749,7 +1754,7 @@
 
       if (stage == 2)
         {
-          if (g_unichar_is_terminal_punctuation (c))
+          if (gimp_unichar_is_terminal_punctuation (c))
             {
               g_string_append_unichar (out_tags, c);
               g_string_append_c (out_mask, 's');



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