glade3 r1989 - in trunk: . gladeui plugins/gnome plugins/gtk+



Author: tvb
Date: Thu Oct 23 02:51:59 2008
New Revision: 1989
URL: http://svn.gnome.org/viewvc/glade3?rev=1989&view=rev

Log:

	* gladeui/Makefile.am, gladeui/glade-displayable-values.[ch]: Rewrote displayable
	values so no need for redundancies anymore (bug 556452). Also now displayable values
	are more accessible for the plugin.

	* plugins/gtk+/gtk+.xml.in, plugins/gnome/*.xml.in: Removed redundant displayable value
	declarations (alot of them !).



Added:
   trunk/gladeui/glade-displayable-values.c
   trunk/gladeui/glade-displayable-values.h
Modified:
   trunk/ChangeLog
   trunk/gladeui/Makefile.am
   trunk/gladeui/glade-editor-property.c
   trunk/gladeui/glade-inspector.h
   trunk/gladeui/glade-property-class.c
   trunk/gladeui/glade-property-class.h
   trunk/gladeui/glade-widget-adaptor.c
   trunk/plugins/gnome/bonobo.xml.in
   trunk/plugins/gnome/canvas.xml.in
   trunk/plugins/gnome/gnome.xml.in
   trunk/plugins/gtk+/gtk+.xml.in

Modified: trunk/gladeui/Makefile.am
==============================================================================
--- trunk/gladeui/Makefile.am	(original)
+++ trunk/gladeui/Makefile.am	Thu Oct 23 02:51:59 2008
@@ -63,7 +63,8 @@
 	glade-marshallers.h \
 	glade-accumulators.h \
 	glade-widget-action.c \
-	glade-name-context.c
+	glade-name-context.c \
+	glade-displayable-values.c 
 
 libgladeui_1_la_CPPFLAGS =  \
 	$(common_defines)   \
@@ -113,7 +114,8 @@
 	glade-cursor.h \
 	glade-catalog.h \
 	glade-widget-action.h \
-	glade-name-context.h
+	glade-name-context.h \
+	glade-displayable-values.h
 
 
 if PLATFORM_WIN32

Added: trunk/gladeui/glade-displayable-values.c
==============================================================================
--- (empty file)
+++ trunk/gladeui/glade-displayable-values.c	Thu Oct 23 02:51:59 2008
@@ -0,0 +1,130 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * glade-name-context.c
+ *
+ * Copyright (C) 2008 Tristan Van Berkom.
+ *
+ * Authors:
+ *   Tristan Van Berkom <tvb gnome org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n-lib.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "glade-displayable-values.h"
+
+
+typedef struct {
+	gchar *value;
+	gchar *string;
+} ValueTab;
+
+static GHashTable *values_hash = NULL;
+
+static gint
+find_value (ValueTab *a, const gchar *b)
+{
+	return strcmp (a->value, b);
+}
+
+void
+glade_register_displayable_value (GType          type, 
+				  const gchar   *value, 
+				  const gchar   *domain,
+				  const gchar   *string)
+{
+	ValueTab *tab;
+	gpointer  klass;
+	GList    *values;
+
+	klass = g_type_class_ref (type);
+	g_return_if_fail (klass != NULL);
+
+	if (!values_hash)
+		values_hash = g_hash_table_new (NULL, NULL);
+
+	tab = g_new0 (ValueTab, 1);
+	tab->value  = g_strdup (value);
+	tab->string = g_strdup (dgettext (domain, string));
+
+	if ((values = 
+	     g_hash_table_lookup (values_hash, klass)) != NULL)
+	{
+		if (!g_list_find_custom (values, tab->value, (GCompareFunc)find_value))
+			values = g_list_append (values, tab);
+		else
+		{
+			g_warning ("Already registered a displayable value for %s (type %s)", 
+				   tab->value, g_type_name (type));
+			g_free (tab->string);
+			g_free (tab->value);
+			g_free (tab);
+		}
+	}
+	else
+	{
+		values = g_list_append (NULL, tab);
+		g_hash_table_insert (values_hash, klass, values);
+	}
+	g_type_class_unref (klass);
+}
+
+gboolean
+glade_type_has_displayable_values (GType type)
+{
+	gboolean has;
+	gpointer klass = g_type_class_ref (type);
+
+	has = values_hash && g_hash_table_lookup (values_hash, klass) != NULL;
+
+	g_type_class_unref (klass);
+
+	return has;
+}
+
+G_CONST_RETURN gchar *
+glade_get_displayable_value (GType          type, 
+			     const gchar   *value)
+{
+	ValueTab  *tab;
+	gpointer   klass;
+	GList     *values, *tab_iter;
+	gchar     *displayable = NULL;
+
+	if (!values_hash)
+		return NULL;
+
+	klass = g_type_class_ref (type);
+
+	g_return_val_if_fail  (klass != NULL, NULL);
+
+	if ((values   = g_hash_table_lookup (values_hash, klass)) != NULL &&
+	    (tab_iter = g_list_find_custom  (values, value, (GCompareFunc)find_value)) != NULL)
+	{
+		tab = tab_iter->data;
+		displayable = tab->string;
+	}
+	g_type_class_unref (klass);
+
+	return displayable;
+}

Added: trunk/gladeui/glade-displayable-values.h
==============================================================================
--- (empty file)
+++ trunk/gladeui/glade-displayable-values.h	Thu Oct 23 02:51:59 2008
@@ -0,0 +1,24 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+#ifndef __GLADE_DISAPLAYABLE_VALUES_H__
+#define __GLADE_DISAPLAYABLE_VALUES_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+void        glade_register_displayable_value      (GType          type, 
+						   const gchar   *value, 
+						   const gchar   *domain,
+						   const gchar   *string);
+
+gboolean    glade_type_has_displayable_values     (GType          type);
+
+G_CONST_RETURN 
+gchar      *glade_get_displayable_value           (GType          type, 
+						   const gchar   *value);
+
+
+G_END_DECLS
+
+#endif /* __GLADE_DISAPLAYABLE_VALUES_H__ */

Modified: trunk/gladeui/glade-editor-property.c
==============================================================================
--- trunk/gladeui/glade-editor-property.c	(original)
+++ trunk/gladeui/glade-editor-property.c	Thu Oct 23 02:51:59 2008
@@ -48,6 +48,7 @@
 #include "glade-popup.h"
 #include "glade-builtins.h"
 #include "glade-marshallers.h"
+#include "glade-displayable-values.h"
 #include "glade-named-icon-chooser-dialog.h"
 
 enum {
@@ -878,8 +879,8 @@
 	for (i = 0; i < eclass->n_values; i++)
 	{
 		const gchar *value_name = 
-			glade_property_class_get_displayable_value
-				(klass, eclass->values[i].value);
+			glade_get_displayable_value (klass->pspec->value_type,
+						     eclass->values[i].value_name);
 		if (value_name == NULL) value_name = eclass->values[i].value_name;
 		
 		if (stock && strcmp (eclass->values[i].value_nick, "glade-none"))
@@ -962,8 +963,8 @@
 			mask = klass->values[flag_num].value;
 			setting = ((value & mask) == mask) ? TRUE : FALSE;
 			
-			value_name = glade_property_class_get_displayable_value
-				(eprop->klass, klass->values[flag_num].value);
+			value_name = glade_get_displayable_value
+				(eprop->klass->pspec->value_type, klass->values[flag_num].value_name);
 
 			if (value_name == NULL) value_name = klass->values[flag_num].value_name;
 			

Modified: trunk/gladeui/glade-inspector.h
==============================================================================
--- trunk/gladeui/glade-inspector.h	(original)
+++ trunk/gladeui/glade-inspector.h	Thu Oct 23 02:51:59 2008
@@ -28,7 +28,7 @@
 #ifndef __GLADE_INSPECTOR_H__
 #define __GLADE_INSPECTOR_H__
 
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
 
 #include <gladeui/glade-xml-utils.h>
 

Modified: trunk/gladeui/glade-property-class.c
==============================================================================
--- trunk/gladeui/glade-property-class.c	(original)
+++ trunk/gladeui/glade-property-class.c	Thu Oct 23 02:51:59 2008
@@ -46,6 +46,7 @@
 #include "glade-property.h"
 #include "glade-property-class.h"
 #include "glade-editor-property.h"
+#include "glade-displayable-values.h"
 #include "glade-debug.h"
 
 #define NUMERICAL_STEP_INCREMENT   1
@@ -73,7 +74,6 @@
 	property_class->def = NULL;
 	property_class->orig_def = NULL;
 	property_class->parameters = NULL;
-	property_class->displayable_values = NULL;
 	property_class->query = FALSE;
 	property_class->optional = FALSE;
 	property_class->optional_default = FALSE;
@@ -152,28 +152,6 @@
 			parameter->data =
 				glade_parameter_clone ((GladeParameter*) parameter->data);
 	}
-	
-	if (property_class->displayable_values)
-	{
-		gint i, len;
-		GEnumValue val;
-		GArray *disp_val;
-		
-		disp_val = property_class->displayable_values;
-		len = disp_val->len;
-		
-		clone->displayable_values = g_array_new(FALSE, TRUE, sizeof(GEnumValue));
-		
-		for (i = 0; i < len; i++)
-		{
-			val.value = g_array_index(disp_val, GEnumValue, i).value;
-			val.value_name = g_strdup (g_array_index(disp_val, GEnumValue, i).value_name);
-			val.value_nick = g_strdup (g_array_index(disp_val, GEnumValue, i).value_nick);
-			
-			g_array_append_val(clone->displayable_values, val);
-		}
-	}
-	
 	return clone;
 }
 
@@ -208,31 +186,6 @@
 	}
 	g_list_foreach (property_class->parameters, (GFunc) glade_parameter_free, NULL);
 	g_list_free (property_class->parameters);
-	
-	if (property_class->displayable_values)
-	{
-		gint i, len;
-		GArray *disp_val;
-		
-		disp_val = property_class->displayable_values;
-		len = disp_val->len;
-		
-		for (i = 0; i < len; i++)
-		{
-			gchar *name, *nick;
-			
-			name = (gchar *) g_array_index (disp_val, GEnumValue, i).value_name;
-			if (name)
-				g_free (name);
-			
-			nick = (gchar *) g_array_index (disp_val, GEnumValue, i).value_nick;
-			if (nick)
-				g_free (nick);
-		}
-		
-		g_array_free (disp_val, TRUE);
-	}	
-	
 	g_free (property_class);
 }
 
@@ -287,7 +240,8 @@
 		fvals &= ~fvalue->value;
 		
 		if (displayables)
-			val_str = glade_property_class_get_displayable_value(klass, fvalue->value);
+			val_str = glade_get_displayable_value (klass->pspec->value_type, 
+							       fvalue->value_name);
 		
 		if (string->str[0])
 			g_string_append(string, " | ");
@@ -1133,120 +1087,83 @@
 		   klass->pspec->value_type == GTK_TYPE_ADJUSTMENT)));
 }
 
-
-/**
- * glade_property_class_get_displayable_value:
- * @klass: the property class to search in
- * @value: the value to search
- *
- * Search a displayable values for @value in this property class.
- *
- * Returns: a (gchar *) if a diplayable value was found, otherwise NULL.
- */
-const gchar *
-glade_property_class_get_displayable_value(GladePropertyClass *klass, gint value)
-{
-	gint i, len;
-	GArray *disp_val = klass->displayable_values;
-
-	if (disp_val == NULL) return NULL;
-	
-	len = disp_val->len;
-	
-	for (i = 0; i < len; i++)
-		if (g_array_index (disp_val, GEnumValue, i).value == value)
-			return g_array_index (disp_val, GEnumValue, i).value_name;
-
-	return NULL;
-}
-
 /**
- * gpc_get_displayable_values_from_node:
+ * gpc_read_displayable_values_from_node:
  * @node: a GLADE_TAG_DISPLAYABLE_VALUES node
  * @values: an array of the values wich node overrides.
  * @n_values: the size of @values
  *
- * Returns: a (GArray *) of GEnumValue of the overridden fields.
+ * Reads and caches displayable values from the catalog
  */
-static GArray *
-gpc_get_displayable_values_from_node (GladeXmlNode *node, 
-				      GladePropertyClass *klass,				   
-				      const gchar  *domain)
-{
-	gpointer the_class = g_type_class_ref (klass->pspec->value_type);
-	GArray *array;
-	GladeXmlNode *child;
-	GEnumValue *values;
-	gint n_values;
+static void
+gpc_read_displayable_values_from_node (GladeXmlNode *node, 
+				       GladePropertyClass *klass,				   
+				       const gchar  *domain)
+{
+	gpointer       the_class = g_type_class_ref (klass->pspec->value_type);
+	GladeXmlNode  *child;
+	GEnumValue    *enum_values = NULL;
+	GFlagsValue   *flags_values = NULL;
+	gint           n_values, registered_values = 0;
 	
 	if (G_IS_PARAM_SPEC_ENUM (klass->pspec))
 	{
 		GEnumClass *eclass = the_class;
-		values = eclass->values;
+		enum_values = eclass->values;
 		n_values = eclass->n_values;
 	}
 	else
 	{
 		GFlagsClass *fclass = the_class;
-		values = (GEnumValue*)fclass->values;
+		flags_values = fclass->values;
 		n_values = fclass->n_values;
 	}
 	
 	if ((child = glade_xml_search_child (node, GLADE_TAG_VALUE)) == NULL)
-		return NULL;
+		return;
 	
-	array = g_array_new (FALSE, TRUE, sizeof(GEnumValue));
-
 	child = glade_xml_node_get_children (node);
 	while (child != NULL)
 	{
-		gint i;
-		gchar *id, *name, *nick;
-		GEnumValue val;
+		gint         i;
+		gchar       *id, *name;
+		GEnumValue  *enum_val;
+		GFlagsValue *flags_val;
+
 		
 		id = glade_xml_get_property_string_required (child, GLADE_TAG_ID, NULL);
-		name = glade_xml_get_property_string (child, GLADE_TAG_NAME);
-		nick = glade_xml_get_property_string (child, GLADE_TAG_NICK);
+		name = glade_xml_get_property_string_required (child, GLADE_TAG_NAME, NULL);
 
-		for(i=0; i < n_values; i++)
+		if (!id || !name)
+			continue;
+
+		for (i = 0; i < n_values; i++)
 		{
-			if(strcmp (id, values[i].value_name) == 0)
+			/* is it a match ?? */
+			if ((G_IS_PARAM_SPEC_ENUM (klass->pspec) &&
+			     (strcmp (id, enum_values[i].value_name) == 0 ||
+			      strcmp (id, enum_values[i].value_nick) == 0)) ||
+			    (G_IS_PARAM_SPEC_FLAGS (klass->pspec) &&
+			     (strcmp (id, flags_values[i].value_name) == 0 ||
+			      strcmp (id, flags_values[i].value_nick) == 0)))
 			{
-				gchar *translated;
-			
-				val=values[i];
-				
-				/* Tedious memory handling; if dgettext doesn't return
-				 * a translation, dont free the untranslated string.
-				 */
-				if (name) 
+				registered_values++;
+
+				if (G_IS_PARAM_SPEC_ENUM (klass->pspec))
 				{
-					translated = dgettext (domain, name);
-					if (name != translated)
-					{
-						val.value_name = g_strdup (translated);
-						g_free (name);
-					}
-					else
-					{
-						val.value_name = name;
-					}
+					enum_val = &enum_values[i];
+					glade_register_displayable_value (klass->pspec->value_type,
+									  enum_val->value_name, 
+									  domain, name);
 				}
-				if (nick)
+				else
 				{
-					translated = dgettext (domain, nick);
-					if (nick != translated)
-					{
-						val.value_nick = g_strdup (translated);
-						g_free (nick);
-					}
-					else
-					{
-						val.value_nick = nick;
-					}	
-				}
+					flags_val = &flags_values[i];
+					glade_register_displayable_value (klass->pspec->value_type,
+									  flags_val->value_name, 
+									  domain, name);
 
-				g_array_append_val (array, val);
+				}
 				break;
 			}
 		}
@@ -1256,13 +1173,12 @@
 		child = glade_xml_node_next (child);
 	}
 	
-	if (n_values != array->len)
-		g_message ("%d missing displayable value for %s::%s", n_values - array->len,
+	if (n_values != registered_values)
+		g_message ("%d missing displayable value for %s::%s", n_values - registered_values,
 			   ((GladeWidgetAdaptor*)klass->handle)->name, klass->id);
 	
 	g_type_class_unref (the_class);
 	
-	return array;
 }
 
 /**
@@ -1532,8 +1448,7 @@
 	/* If this property's value is an enumeration or flag then we try to get the displayable values */
 	if ((G_IS_PARAM_SPEC_ENUM(klass->pspec) || G_IS_PARAM_SPEC_FLAGS(klass->pspec)) &&
 	    (child = glade_xml_search_child (node, GLADE_TAG_DISPLAYABLE_VALUES)))
-		klass->displayable_values = gpc_get_displayable_values_from_node
-							(child, klass, domain);
+		gpc_read_displayable_values_from_node (child, klass, domain);
 	
 	/* Right now allowing the backend to specify that some properties
 	 * go in the atk tab, ideally this shouldnt be needed.

Modified: trunk/gladeui/glade-property-class.h
==============================================================================
--- trunk/gladeui/glade-property-class.h	(original)
+++ trunk/gladeui/glade-property-class.h	Thu Oct 23 02:51:59 2008
@@ -75,12 +75,6 @@
 			    * to be of possible use in plugin code.
 			    */
 
-	GArray *displayable_values; /* If this property's value is an enumeration/flags and 
-				     * there is some value name overridden in a catalog
-				     * then it will point to a GEnumValue array with the
-				     * modified names, otherwise NULL.
-				     */
-
 	gboolean query; /* Whether we should explicitly ask the user about this property
 			 * when instantiating a widget with this property (through a popup
 			 * dialog).
@@ -220,9 +214,6 @@
 								  GladePropertyClass **property_class,
 								  const gchar         *domain);
 
-G_CONST_RETURN gchar *glade_property_class_get_displayable_value   (GladePropertyClass *klass, 
-								    gint                value);
-
 GtkAdjustment      *glade_property_class_make_adjustment         (GladePropertyClass *property_class);
 
 gboolean            glade_property_class_match                   (GladePropertyClass *klass,

Modified: trunk/gladeui/glade-widget-adaptor.c
==============================================================================
--- trunk/gladeui/glade-widget-adaptor.c	(original)
+++ trunk/gladeui/glade-widget-adaptor.c	Thu Oct 23 02:51:59 2008
@@ -40,6 +40,7 @@
 #include "glade-signal.h"
 #include "glade-marshallers.h"
 #include "glade-accumulators.h"
+#include "glade-displayable-values.h"
 
 /* For g_file_exists */
 #include <sys/types.h>
@@ -849,7 +850,6 @@
 					 GladeXmlNode       *node)
 {
 	GladeXmlNode *iter_node;
-	GList *props;
 	GladeSignal *signal;
 	GladeProperty *property;
 	gchar *name, *prop_name;
@@ -970,7 +970,6 @@
 {
 	GladeXmlNode *widget_node, *packing_node, *iter_node;
 	GladeWidget  *child_widget;
-	GList        *packing;
 	gchar        *internal_name;
 	gchar        *name, *prop_name;
 	GladeProperty *property;
@@ -2028,9 +2027,9 @@
 	{
 		GladePropertyClass *klass = l->data;
 		
-		if (adaptor->type == klass->pspec->owner_type &&
+		if (adaptor->type == klass->pspec->owner_type && klass->visible &&
 		    (G_IS_PARAM_SPEC_ENUM (klass->pspec) || G_IS_PARAM_SPEC_FLAGS (klass->pspec)) &&
-		    !klass->displayable_values && klass->visible &&
+		    !glade_type_has_displayable_values (klass->pspec->value_type) &&
 		    klass->pspec->value_type != GLADE_TYPE_STOCK &&
 		    klass->pspec->value_type != GLADE_TYPE_STOCK_IMAGE)
 		{

Modified: trunk/plugins/gnome/bonobo.xml.in
==============================================================================
--- trunk/plugins/gnome/bonobo.xml.in	(original)
+++ trunk/plugins/gnome/bonobo.xml.in	Thu Oct 23 02:51:59 2008
@@ -51,24 +51,6 @@
 	</property>
       </packing-properties>
     </glade-widget-class>
-    <glade-widget-class name="BonoboDockItem" generic-name="dockitem" title="Bonobo Dock Item">
-      <properties>
-      	<property id="shadow">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
-	<property id="orientation">
-  	  <displayable-values>
-	    <value id="GTK_ORIENTATION_HORIZONTAL" _name="Horizontal"/>
-	    <value id="GTK_ORIENTATION_VERTICAL" _name="Vertical"/>
-	  </displayable-values>
-	</property>
-      </properties>
-    </glade-widget-class>
+    <glade-widget-class name="BonoboDockItem" generic-name="dockitem" title="Bonobo Dock Item"/>
   </glade-widget-classes>
 </glade-catalog>

Modified: trunk/plugins/gnome/canvas.xml.in
==============================================================================
--- trunk/plugins/gnome/canvas.xml.in	(original)
+++ trunk/plugins/gnome/canvas.xml.in	Thu Oct 23 02:51:59 2008
@@ -44,11 +44,6 @@
         <property id="selection-mode" _name="Selection Mode">
 	  <_tooltip>The selection mode</_tooltip>
 	  <spec>glade_gnome_icon_list_selection_mode_spec</spec>
-	  <displayable-values>
-	    <value id="GTK_SELECTION_SINGLE" _name="Single"/>
-	    <value id="GTK_SELECTION_BROWSE" _name="Browse"/>
-	    <value id="GTK_SELECTION_MULTIPLE" _name="Multiple"/>
-	  </displayable-values>
 	</property>
         <property id="icon-width" _name="Icon Width" default="78">
           <_tooltip>The width of each icon</_tooltip>

Modified: trunk/plugins/gnome/gnome.xml.in
==============================================================================
--- trunk/plugins/gnome/gnome.xml.in	(original)
+++ trunk/plugins/gnome/gnome.xml.in	Thu Oct 23 02:51:59 2008
@@ -39,10 +39,6 @@
 	</property>
         <property id="pack-type">
 	  <spec>glade_gnome_gtk_pack_type_spec</spec>
-          <displayable-values>
-            <value id="GTK_PACK_START" _name="Start"/>
-            <value id="GTK_PACK_END" _name="End"/>
-          </displayable-values>
 	</property>
       </packing-properties>
     </glade-widget-class>
@@ -260,14 +256,6 @@
 	  <_tooltip>The maximum number of history entries saved</_tooltip>
 	</property>
         <property id="size" visible="False" query="False" ignore="True"/>
-	<property id="filechooser-action">
-	  <displayable-values>
-	    <value id="GTK_FILE_CHOOSER_ACTION_OPEN" _name="Open"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_SAVE" _name="Save"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER" _name="Select Folder"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER" _name="Create Folder"/>
-	  </displayable-values>
-	</property>
       </properties>
       <packing-properties>
         <property id="expand" disabled="True"/>

Modified: trunk/plugins/gtk+/gtk+.xml.in
==============================================================================
--- trunk/plugins/gtk+/gtk+.xml.in	(original)
+++ trunk/plugins/gtk+/gtk+.xml.in	Thu Oct 23 02:51:59 2008
@@ -444,14 +444,6 @@
 	    <value id="GTK_PACK_DIRECTION_BTT" _name="Bottom to Top"/>
 	  </displayable-values>
 	</property>
-        <property id="pack-direction">
-          <displayable-values>
-	    <value id="GTK_PACK_DIRECTION_LTR" _name="Left to Right"/>
-	    <value id="GTK_PACK_DIRECTION_RTL" _name="Right to Left"/>
-	    <value id="GTK_PACK_DIRECTION_TTB" _name="Top to Bottom"/>
-	    <value id="GTK_PACK_DIRECTION_BTT" _name="Bottom to Top"/>
-	  </displayable-values>
-	</property>
       </properties>
       <packing-defaults>
 	<parent-class name="GtkVBox">
@@ -574,14 +566,6 @@
 	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
 	  </displayable-values>
 	</property>
-      	<property id="snap-edge">
-  	  <displayable-values>
-	    <value id="GTK_POS_LEFT" _name="Left"/>
-	    <value id="GTK_POS_RIGHT" _name="Right"/>
-	    <value id="GTK_POS_TOP" _name="Top"/>
-	    <value id="GTK_POS_BOTTOM" _name="Bottom"/>
-	  </displayable-values>
-	</property>
       </properties>
     </glade-widget-class>
 
@@ -637,15 +621,7 @@
 	<property id="text" translatable="True"/>
         <property id="inner-border" since="2.10"/>
         <property id="truncate-multiline" since="2.10"/>
-	<property id="shadow-type" since="2.12">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
+	<property id="shadow-type" since="2.12"/>
 	<!-- Atk activate property -->
 	<property id="atk-activate" _name="Activate" ignore="True" atk-property="True" save="False">
 	  <_tooltip>Set the description of the Activate atk action</_tooltip>
@@ -666,14 +642,6 @@
 	  <spec>glade_standard_string_spec</spec>
 	  <visible-lines>2</visible-lines>
 	</property>
-	<property id="justification">
-  	  <displayable-values>
-	    <value id="GTK_JUSTIFY_LEFT" _name="Left"/>
-	    <value id="GTK_JUSTIFY_RIGHT" _name="Right"/>
-	    <value id="GTK_JUSTIFY_CENTER" _name="Center"/>
-	    <value id="GTK_JUSTIFY_FILL" _name="Fill"/>
-	  </displayable-values>
-	</property>
       	<property id="wrap-mode">
   	  <displayable-values>
 	    <value id="GTK_WRAP_NONE" _name="None"/>
@@ -708,15 +676,7 @@
 	  <_tooltip>The stock item for this button</_tooltip>
 	</property>
 
-	<property id="image-position" weight="1.7">
-  	  <displayable-values>
-	    <value id="GTK_POS_LEFT" _name="Left"/>
-	    <value id="GTK_POS_RIGHT" _name="Right"/>
-	    <value id="GTK_POS_TOP" _name="Top"/>
-	    <value id="GTK_POS_BOTTOM" _name="Bottom"/>
-	  </displayable-values>
-	</property>
-
+	<property id="image-position" weight="1.7"/>
 
 	<property id="glade-type" _name="Edit Type" save="False" weight="0">
 	  <spec>glade_gtk_button_type_spec</spec>
@@ -831,21 +791,7 @@
       </properties>
     </glade-widget-class>
 
-    <glade-widget-class name="GtkScaleButton" generic-name="scalebutton" _title="Scale Button" since="2.12">
-      <properties>
-        <property id="size">
-  	  <displayable-values>
-	    <value id="GTK_ICON_SIZE_INVALID" _name="Invalid"/>
-	    <value id="GTK_ICON_SIZE_MENU" _name="Menu"/>
-	    <value id="GTK_ICON_SIZE_SMALL_TOOLBAR" _name="Small Toolbar"/>
-	    <value id="GTK_ICON_SIZE_LARGE_TOOLBAR" _name="Large Toolbar"/>
-	    <value id="GTK_ICON_SIZE_BUTTON" _name="Button"/>
-	    <value id="GTK_ICON_SIZE_DND" _name="Drag &amp; Drop"/>
-	    <value id="GTK_ICON_SIZE_DIALOG" _name="Dialog"/>
-	  </displayable-values>
-        </property>
-      </properties>
-    </glade-widget-class>
+    <glade-widget-class name="GtkScaleButton" generic-name="scalebutton" _title="Scale Button" since="2.12"/>
 
     <glade-widget-class name="GtkVolumeButton" generic-name="volumebutton" _title="Volume Button"/>
 
@@ -853,14 +799,6 @@
       <post-create-function>glade_gtk_file_chooser_widget_post_create</post-create-function>
       <properties>
         <property id="size" default="1"  query="False" />
-        <property id="action">
-  	  <displayable-values>
-	    <value id="GTK_FILE_CHOOSER_ACTION_SAVE" _name="Save"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_OPEN" _name="Open"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER" _name="Select Folder"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER" _name="Create Folder"/>
-	  </displayable-values>
-        </property>
 	<property id="extra-widget" parentless-widget="True" libglade-unsupported="True"/>
 	<property id="preview-widget" parentless-widget="True" libglade-unsupported="True"/>
 	<property id="filter" libglade-unsupported="True"/>
@@ -911,6 +849,13 @@
 	  <spec>glade_standard_strv_spec</spec>
 	  <_tooltip>The items in this combo box</_tooltip>
 	</property>
+	<property id="button-sensitivity">
+  	  <displayable-values>
+	    <value id="GTK_SENSITIVITY_AUTO" _name="Automatic"/>
+	    <value id="GTK_SENSITIVITY_ON" _name="On"/>
+	    <value id="GTK_SENSITIVITY_OFF" _name="Off"/>
+	  </displayable-values>
+         </property>
 
 	<!-- Atk press property -->
 	<property id="atk-press" _name="Press" ignore="True" atk-property="True" save="False">
@@ -940,14 +885,6 @@
 	    <value id="GTK_PROGRESS_TOP_TO_BOTTOM" _name="Top to Bottom"/>
 	  </displayable-values>
 	</property>
-      	<property id="ellipsize">
-  	  <displayable-values>
-	    <value id="PANGO_ELLIPSIZE_NONE" _name="None"/>
-	    <value id="PANGO_ELLIPSIZE_START" _name="Start"/>
-	    <value id="PANGO_ELLIPSIZE_MIDDLE" _name="Middle"/>
-	    <value id="PANGO_ELLIPSIZE_END" _name="End"/>
-	  </displayable-values>
-	</property>
        	<property id="bar-style">
   	  <displayable-values>
 	    <value id="GTK_PROGRESS_CONTINUOUS" _name="Continuous"/>
@@ -964,11 +901,6 @@
 	<property id="stock" visible="False" default="gtk-missing-image"/>
 	<property id="glade-type" _name="Edit Type" save="False" weight="0">
 	  <spec>glade_gtk_image_type_spec</spec>
-           <displayable-values>
-             <value id="GLADEGTK_IMAGE_FILENAME" _name="Filename"/>
-             <value id="GLADEGTK_IMAGE_STOCK" _name="Stock"/>
-             <value id="GLADEGTK_IMAGE_ICONTHEME" _name="Icon Theme"/>
-           </displayable-values>
 	</property>
 	<property id="pixbuf-animation" disabled="True"/>
 	<property id="file" disabled="True"/>
@@ -1040,11 +972,6 @@
           </displayable-values>
         </property>
         <property id="y-options" transfer-on-paste="True">
-          <displayable-values>
-            <value id="GTK_EXPAND" _name="Expand"/>
-            <value id="GTK_SHRINK" _name="Shrink"/>
-            <value id="GTK_FILL" _name="Fill"/>
-          </displayable-values>
         </property>
         <property id="x-padding" transfer-on-paste="True"/>
         <property id="y-padding" transfer-on-paste="True"/>
@@ -1110,24 +1037,10 @@
 	  <spec>glade_standard_int_spec</spec>
 	  <_tooltip>The number of pages in the notebook</_tooltip>
 	</property>
-      	<property id="tab-pos">
-  	  <displayable-values>
-	    <value id="GTK_POS_LEFT" _name="Left"/>
-	    <value id="GTK_POS_RIGHT" _name="Right"/>
-	    <value id="GTK_POS_TOP" _name="Top"/>
-	    <value id="GTK_POS_BOTTOM" _name="Bottom"/>
-	  </displayable-values>
-	</property>
       </properties>
 
       <packing-properties>
         <property id="tab-label" disabled="True"/>
-        <property id="tab-pack">
-          <displayable-values>
-            <value id="GTK_PACK_START" _name="Start"/>
-            <value id="GTK_PACK_END" _name="End"/>
-          </displayable-values>
-        </property>	    
       </packing-properties>
     </glade-widget-class>
 
@@ -1147,15 +1060,7 @@
 	<property id="shadow" disabled="True"/>
 	<property id="label-widget" disabled="True"/>
 	<property id="label-xalign" default="0.0" save-always="True"/>
-      	<property id="shadow-type" default="GTK_SHADOW_NONE">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
+      	<property id="shadow-type" default="GTK_SHADOW_NONE"/>
       </properties>
     </glade-widget-class>
 
@@ -1174,33 +1079,6 @@
 	    <value id="GTK_UPDATE_DELAYED" _name="Delayed"/>
 	  </displayable-values>
 	</property>
-      	<property id="upper-stepper-sensitivity">
-  	  <displayable-values>
-	    <value id="GTK_SENSITIVITY_AUTO" _name="Automatic"/>
-	    <value id="GTK_SENSITIVITY_ON" _name="On"/>
-	    <value id="GTK_SENSITIVITY_OFF" _name="Off"/>
-	  </displayable-values>
-         </property>
-      	<property id="lower-stepper-sensitivity">
-  	  <displayable-values>
-	    <value id="GTK_SENSITIVITY_AUTO" _name="Automatic"/>
-	    <value id="GTK_SENSITIVITY_ON" _name="On"/>
-	    <value id="GTK_SENSITIVITY_OFF" _name="Off"/>
-	  </displayable-values>
-         </property>
-      </properties>
-    </glade-widget-class>
-    
-    <glade-widget-class name="GtkScale" _title="Scale">
-      <properties>
-      	<property id="value-pos">
-  	  <displayable-values>
-            <value id="GTK_POS_LEFT" _name="Left"/>
-            <value id="GTK_POS_RIGHT" _name="Right"/>
-            <value id="GTK_POS_TOP" _name="Top"/>
-            <value id="GTK_POS_BOTTOM" _name="Bottom"/>
-	  </displayable-values>
-	</property>
       </properties>
     </glade-widget-class>
     
@@ -1283,15 +1161,6 @@
 	    <value id="GTK_ARROW_NONE" _name="None"/>
 	  </displayable-values>
 	</property>
-      	<property id="shadow-type">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
       </properties>
     </glade-widget-class>
     
@@ -1332,33 +1201,12 @@
       </properties>
     </glade-widget-class>
     
-    <glade-widget-class name="GtkViewport" generic-name="viewport" _title="Viewport">
-      <properties>
-      	<property id="shadow-type">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
-      </properties>
-    </glade-widget-class>
+    <glade-widget-class name="GtkViewport" generic-name="viewport" _title="Viewport"/>
     
     <glade-widget-class name="GtkScrolledWindow" generic-name="scrolledwindow" _title="Scrolled Window">
       <properties>
         <property id="can-focus" save-always="True"/>
         <property id="window-placement-set" since="2.10" ignore="True"/>
-      	<property id="shadow-type">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
       	<property id="hscrollbar-policy" default="GTK_POLICY_AUTOMATIC">
   	  <displayable-values>
 	    <value id="GTK_POLICY_ALWAYS" _name="Always"/>
@@ -1366,13 +1214,7 @@
 	    <value id="GTK_POLICY_NEVER" _name="Never"/>
 	  </displayable-values>
 	</property>
-      	<property id="vscrollbar-policy" default="GTK_POLICY_AUTOMATIC">
-  	  <displayable-values>
-	    <value id="GTK_POLICY_ALWAYS" _name="Always"/>
-	    <value id="GTK_POLICY_AUTOMATIC" _name="Automatic"/>
-	    <value id="GTK_POLICY_NEVER" _name="Never"/>
-	  </displayable-values>
-	</property>
+      	<property id="vscrollbar-policy" default="GTK_POLICY_AUTOMATIC"/>
       	<property id="window-placement">
   	  <displayable-values>
 	    <value id="GTK_CORNER_TOP_LEFT" _name="Top Left"/>
@@ -1421,14 +1263,6 @@
 
     <glade-widget-class name="GtkFileChooserDialog" generic-name="filechooserdialog" _title="File Chooser Dialog">
       <properties>
-	<property id="action">
-  	  <displayable-values>
-	    <value id="GTK_FILE_CHOOSER_ACTION_OPEN" _name="Open"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_SAVE" _name="Save"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER" _name="Select Folder"/>
-	    <value id="GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER" _name="Create Folder"/>
-	  </displayable-values>
-	</property>
 	<property id="extra-widget" parentless-widget="True" />
 	<property id="preview-widget" parentless-widget="True" />
 	<property id="filter"/>
@@ -1567,24 +1401,6 @@
 
     <glade-widget-class name="GtkCList" generic-name="clist" _title="Columned List" deprecated="True" libglade-only="True">
       <properties>
-        <property id="selection-mode">
-  	  <displayable-values>
-	    <value id="GTK_SELECTION_NONE" _name="None"/>
-	    <value id="GTK_SELECTION_SINGLE" _name="Single"/>
-	    <value id="GTK_SELECTION_BROWSE" _name="Browse"/>
-	    <value id="GTK_SELECTION_MULTIPLE" _name="Multiple"/>
-	    <value id="GTK_SELECTION_EXTENDED" _name="Extended"/>
-	  </displayable-values>
-	</property>
-      	<property id="shadow-type">
-  	  <displayable-values>
-	    <value id="GTK_SHADOW_NONE" _name="None"/>
-	    <value id="GTK_SHADOW_IN" _name="In"/>
-	    <value id="GTK_SHADOW_OUT" _name="Out"/>
-	    <value id="GTK_SHADOW_ETCHED_IN" _name="Etched In"/>
-	    <value id="GTK_SHADOW_ETCHED_OUT" _name="Etched Out"/>
-	  </displayable-values>
-	</property>
         <property id="sort-type">
   	  <displayable-values>
 	    <value id="GTK_SORT_ASCENDING" _name="Ascending"/>
@@ -1632,8 +1448,8 @@
       <child-set-property-function>glade_gtk_assistant_set_child_property</child-set-property-function>
       <child-get-property-function>glade_gtk_assistant_get_child_property</child-get-property-function>
       <properties>
-        <property save="False" id="n-pages" _name="NÂ pages">
-	  <_tooltip>Number of pages</_tooltip>
+        <property save="False" id="n-pages" _name="Number of Pages">
+	  <_tooltip>Number of pages in this assistant</_tooltip>
 	  <spec>glade_standard_int_spec</spec>
 	</property>
       </properties>
@@ -1691,18 +1507,7 @@
       </properties>
     </glade-widget-class>
     
-    <glade-widget-class name="GtkRecentChooserDialog" generic-name="recentchooserdialog" _title="Recent Chooser Dialog">
-      <properties>
-        <property id="sort-type">
-  	  <displayable-values>
-	    <value id="GTK_RECENT_SORT_NONE" _name="None"/>
-	    <value id="GTK_RECENT_SORT_MRU" _name="Most Recently Used first"/>
-	    <value id="GTK_RECENT_SORT_LRU" _name="Least Recently Used first"/>
-	    <value id="GTK_RECENT_SORT_CUSTOM" _name="Custom"/>
-	  </displayable-values>
-	</property>
-      </properties>
-    </glade-widget-class>
+    <glade-widget-class name="GtkRecentChooserDialog" generic-name="recentchooserdialog" _title="Recent Chooser Dialog"/>
     
     <!-- Objects -->
     <glade-widget-class name="GtkSizeGroup" generic-name="sizegroup" _title="Size Group" libglade-unsupported="True" toplevel="True">
@@ -1714,6 +1519,14 @@
 	  <_tooltip>List of widgets in this group</_tooltip>
 	  <spec>glade_standard_objects_spec</spec>
 	</property>
+	<property id="mode">
+  	  <displayable-values>
+	    <value id="GTK_SIZE_GROUP_NONE" _name="None"/>
+	    <value id="GTK_SIZE_GROUP_HORIZONTAL" _name="Horizontal"/>
+	    <value id="GTK_SIZE_GROUP_VERTICAL" _name="Vertical"/>
+	    <value id="GTK_SIZE_GROUP_BOTH" _name="Both"/>
+	  </displayable-values>
+	</property>
       </properties>
     </glade-widget-class>
 
@@ -1812,26 +1625,7 @@
       </packing-properties>
     </glade-widget-class>
 
-    <glade-widget-class name="GtkIconView" generic-name="iconview" _title="Icon View">
-      <properties>
-        <property id="selection-mode">
-  	  <displayable-values>
-	    <value id="GTK_SELECTION_NONE" _name="None"/>
-	    <value id="GTK_SELECTION_SINGLE" _name="Single"/>
-	    <value id="GTK_SELECTION_BROWSE" _name="Browse"/>
-	    <value id="GTK_SELECTION_MULTIPLE" _name="Multiple"/>
-	    <value id="GTK_SELECTION_EXTENDED" _name="Extended"/>
-	  </displayable-values>
-	</property>
-	<property id="orientation">
-  	  <displayable-values>
-	    <value id="GTK_ORIENTATION_HORIZONTAL" _name="Horizontal"/>
-	    <value id="GTK_ORIENTATION_VERTICAL" _name="Vertical"/>
-	  </displayable-values>
-	</property>
-      </properties>
-    </glade-widget-class>
-
+    <glade-widget-class name="GtkIconView" generic-name="iconview" _title="Icon View"/>
 
     <glade-widget-class name="GtkListStore" generic-name="liststore" _title="List Store" 
 			libglade-unsupported="True" toplevel="True">



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