Commit 46e859b6 authored by Paolo Borelli's avatar Paolo Borelli

More janitoring. Remove dead code.

parent 6d7ae493
2003-11-01 Paolo Borelli <pbprelli@katamail.com>
2003-11-01 Paolo Borelli <pborelli@katamail.com>
* glade-3.desktop.in: minor updates from glade-2.
* Makefile.am: remove .dektop file on make clean.
* src/glade-property.[ch]: ifdef out the ->child member since it's
unused.
unused. Remove glade_property_get_* since they are not needed.
* src/glade-widget.[ch]: move here the get_property_by_id function and
simplify the get_property_by_class. Use apply_property_from_node also
for packing properties.
* src/glade-gtk.c: fixups for the above changes.
* src/glade-editor.c: ditto.
* src/glade-types.h: remove GladePaletteSelection.
2003-10-31 Paolo Borelli <pborelli@katamail.com>
......
......@@ -221,86 +221,6 @@ glade_property_refresh (GladeProperty *property)
glade_property_set (property, property->value);
}
const gchar *
glade_property_get_string (GladeProperty *property)
{
g_return_val_if_fail (property != NULL, NULL);
g_return_val_if_fail (property->value != NULL, NULL);
return g_value_get_string (property->value);
}
gint
glade_property_get_integer (GladeProperty *property)
{
g_return_val_if_fail (property != NULL, 0);
g_return_val_if_fail (property->value != NULL, 0);
return g_value_get_int (property->value);
}
gfloat
glade_property_get_float (GladeProperty *property)
{
gfloat resp;
g_return_val_if_fail (property != NULL, 0.0);
g_return_val_if_fail (property->value != NULL, 0.0);
resp = g_value_get_float (property->value);
return resp;
}
gdouble
glade_property_get_double (GladeProperty *property)
{
g_return_val_if_fail (property != NULL, 0.0);
g_return_val_if_fail (property->value != NULL, 0.0);
return g_value_get_double (property->value);
}
gboolean
glade_property_get_boolean (GladeProperty *property)
{
g_return_val_if_fail (property != NULL, FALSE);
g_return_val_if_fail (property->value != NULL, FALSE);
return g_value_get_boolean (property->value);
}
gunichar
glade_property_get_unichar (GladeProperty *property)
{
g_return_val_if_fail (property != NULL, g_utf8_get_char (" "));
g_return_val_if_fail (property->value != NULL, g_utf8_get_char (" "));
return g_value_get_uint (property->value);
}
GladeChoice *
glade_property_get_enum (GladeProperty *property)
{
GladeChoice *choice = NULL;
GList *list;
gint value;
g_return_val_if_fail (property != NULL, NULL);
g_return_val_if_fail (property->value != NULL, NULL);
value = g_value_get_enum (property->value);
list = property->class->choices;
for (; list; list = list->next) {
choice = list->data;
if (choice->value == value)
break;
}
if (list == NULL)
g_warning ("Cant find the GladePropertyChoice selected\n");
return choice;
}
GladeXmlNode *
glade_property_write (GladeXmlContext *context, GladeProperty *property)
{
......@@ -366,7 +286,7 @@ void
glade_property_get_from_widget (GladeProperty *property)
{
gboolean bool = FALSE;
g_value_reset (property->value);
if (property->class->get_function)
......
......@@ -60,14 +60,6 @@ void glade_property_free (GladeProperty *property);
void glade_property_set (GladeProperty *property, const GValue *value);
void glade_property_refresh (GladeProperty *property);
const gchar * glade_property_get_string (GladeProperty *property);
gint glade_property_get_integer (GladeProperty *property);
gfloat glade_property_get_float (GladeProperty *property);
gdouble glade_property_get_double (GladeProperty *property);
gboolean glade_property_get_boolean (GladeProperty *property);
gunichar glade_property_get_unichar (GladeProperty *property);
GladeChoice * glade_property_get_enum (GladeProperty *property);
void glade_property_get_from_widget (GladeProperty *property);
/* XML i/o */
......
#ifndef __GLADE_TYPES_H__
#define __GLADE_TYPES_H__
typedef struct _GladePaletteSection GladePaletteSection;
typedef struct _GladePalette GladePalette;
typedef struct _GladeEditor GladeEditor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment