add patches from SHANE BUTLER that implement the signal editor.

other Fixety fixes
This commit is contained in:
Jose Maria Celorio 2001-06-28 19:41:07 +00:00
parent 1780b6f6be
commit 2ddbeeb959
18 changed files with 254 additions and 101 deletions

View File

@ -1,3 +1,13 @@
2001-06-27 Chema Celorio <chema@celorio.com>
* src/glade-widget-class.[ch], src/glade-widget.[ch]: Store signals
available to a widget in the GladeWidgetClass and instances and their
handlers in GladeWidget.
* src/glade-editor.[ch], src/glade-signal-editor.[ch]: Add new signal editor
and add provsions for GladeEditor to use.
* src/glade-types.h: Add typedefs for GladeSignalEditor, GladeWidgetSignal
and GladeWidgetClassSignal.
2001-06-27 Chema Celorio <chema@celorio.com> 2001-06-27 Chema Celorio <chema@celorio.com>
* src/glade-property-class.c (glade_property_class_get_specs): * src/glade-property-class.c (glade_property_class_get_specs):

View File

@ -1,6 +1,7 @@
pixmaps_DATA = \ pixmaps_DATA = \
window.xpm \ window.xpm \
button.xpm \ button.xpm \
checkbutton.xpm \
vbox.xpm \ vbox.xpm \
hbox.xpm \ hbox.xpm \
label.xpm \ label.xpm \

View File

@ -36,7 +36,8 @@ glade2_SOURCES = \
glade-widget.c \ glade-widget.c \
glade-catalog.c \ glade-catalog.c \
glade-choice.c \ glade-choice.c \
glade-editor.c glade-editor.c \
glade-signal-editor.c
noinst_HEADERS = \ noinst_HEADERS = \
glade.h \ glade.h \
@ -45,6 +46,7 @@ noinst_HEADERS = \
glade-parameter.h \ glade-parameter.h \
glade-placeholder.h \ glade-placeholder.h \
glade-editor.h \ glade-editor.h \
glade-signal-editor.h \
glade-palette.h \ glade-palette.h \
glade-cursor.h \ glade-cursor.h \
glade-project-window.h \ glade-project-window.h \

View File

@ -24,6 +24,7 @@
#define GLADE_PROPERY_TABLE_ROW_SPACING 2 #define GLADE_PROPERY_TABLE_ROW_SPACING 2
#include <stdlib.h> /* for atoi and atof */ #include <stdlib.h> /* for atoi and atof */
#include <string.h>
#include "glade.h" #include "glade.h"
@ -31,6 +32,7 @@
#include "glade-widget-class.h" #include "glade-widget-class.h"
#include "glade-choice.h" #include "glade-choice.h"
#include "glade-editor.h" #include "glade-editor.h"
#include "glade-signal-editor.h"
#include "glade-parameter.h" #include "glade-parameter.h"
#include "glade-project-window.h" #include "glade-project-window.h"
#include "glade-property.h" #include "glade-property.h"
@ -733,10 +735,22 @@ glade_editor_load_widget_page (GladeEditor *editor, GladeWidgetClass *class)
TRUE, TRUE, 0); TRUE, TRUE, 0);
} }
static void
glade_editor_load_signal_page (GladeEditor *editor, GladeWidgetClass *class)
{
if (editor->signal_editor == NULL) {
editor->signal_editor = glade_signal_editor_new ();
gtk_box_pack_start (GTK_BOX (editor->vbox_signals), glade_signal_editor_get_widget (editor->signal_editor),
TRUE, TRUE, 0);
}
}
static void static void
glade_editor_load_class (GladeEditor *editor, GladeWidgetClass *class) glade_editor_load_class (GladeEditor *editor, GladeWidgetClass *class)
{ {
glade_editor_load_widget_page (editor, class); glade_editor_load_widget_page (editor, class);
glade_editor_load_signal_page (editor, class);
editor->loaded_class = class; editor->loaded_class = class;
} }
@ -997,6 +1011,8 @@ glade_editor_load_item (GladeEditor *editor, GladeWidget *item)
property = list->data; property = list->data;
glade_editor_property_load (property, item); glade_editor_property_load (property, item);
} }
glade_signal_editor_load_widget (editor->signal_editor, item);
} }

View File

@ -64,9 +64,10 @@ struct _GladeEditor
GtkWidget *vbox_common; /* We might not need this pointer. Not yet GtkWidget *vbox_common; /* We might not need this pointer. Not yet
* implemented * implemented
*/ */
GtkWidget *vbox_signals; /* We might not need this pointer. Not yet GtkWidget *vbox_signals; /* Widget from the GladeSignalEditor is placed
* implemented. * here
*/ */
GladeSignalEditor *signal_editor;
GList * widget_tables; /* A list of GladeEditorTable. We have a table GList * widget_tables; /* A list of GladeEditorTable. We have a table
* (gtktable) for each GladeWidgetClass, if * (gtktable) for each GladeWidgetClass, if

View File

@ -21,6 +21,7 @@
*/ */
#include <stdlib.h> /* for atoi and atof */ #include <stdlib.h> /* for atoi and atof */
#include <string.h>
#include "glade.h" #include "glade.h"
#include "glade-xml-utils.h" #include "glade-xml-utils.h"
@ -98,6 +99,20 @@ glade_parameter_get_string (GList *parameters, const gchar *key, gchar **value)
} }
} }
} }
static void
glade_parameter_free (GladeParameter *parameter)
{
g_return_if_fail (parameter->key);
g_return_if_fail (parameter->value);
g_free (parameter->key);
g_free (parameter->value);
parameter->key = NULL;
parameter->value = NULL;
g_free (parameter);
}
GladeParameter * GladeParameter *
glade_parameter_new (void) glade_parameter_new (void)
{ {
@ -127,11 +142,27 @@ glade_parameter_new_from_node (xmlNodePtr node)
} }
GList * GList *
glade_parameter_list_new_from_node (xmlNodePtr node) glade_parameter_list_find_by_key (GList *list, const gchar *key)
{
GladeParameter *parameter;
for (; list != NULL; list = list->next) {
parameter = list->data;
g_return_val_if_fail (parameter->key != NULL, NULL);
if (strcmp (parameter->key, key) == 0)
return list;
}
return NULL;
}
GList *
glade_parameter_list_new_from_node (GList *list, xmlNodePtr node)
{ {
GladeParameter *parameter; GladeParameter *parameter;
xmlNodePtr child; xmlNodePtr child;
GList *list; GList *findme;
if (!glade_xml_node_verify (node, GLADE_TAG_PARAMETERS)) if (!glade_xml_node_verify (node, GLADE_TAG_PARAMETERS))
return NULL; return NULL;
@ -139,7 +170,6 @@ glade_parameter_list_new_from_node (xmlNodePtr node)
if (child == NULL) if (child == NULL)
return NULL; return NULL;
list = NULL;
child = node->children; child = node->children;
while (child != NULL) { while (child != NULL) {
@ -149,6 +179,18 @@ glade_parameter_list_new_from_node (xmlNodePtr node)
parameter = glade_parameter_new_from_node (child); parameter = glade_parameter_new_from_node (child);
if (parameter == NULL) if (parameter == NULL)
return NULL; return NULL;
/* Is this parameter already there ? just replace
* the pointer and free the old one
*/
findme = glade_parameter_list_find_by_key (list,
parameter->key);
if (findme) {
g_print ("We foind one, replace it\n");
glade_parameter_free (findme->data);
findme->data = parameter;
child = child->next;
}
list = g_list_prepend (list, parameter); list = g_list_prepend (list, parameter);
child = child->next; child = child->next;
} }

View File

@ -39,7 +39,7 @@ void glade_parameter_get_boolean (GList *parameters, const gchar *key, gboolean
void glade_parameter_get_string (GList *parameters, const gchar *key, gchar **value); void glade_parameter_get_string (GList *parameters, const gchar *key, gchar **value);
GList * glade_parameter_list_new_from_node (xmlNodePtr node); GList * glade_parameter_list_new_from_node (GList *list, xmlNodePtr node);
/* Convenience functions */ /* Convenience functions */
GtkAdjustment * glade_parameter_adjustment_new (GList *parameters); GtkAdjustment * glade_parameter_adjustment_new (GList *parameters);

View File

@ -88,10 +88,10 @@ glade_project_view_find_iter (GtkTreeModel *model,
return gtk_tree_iter_copy (next); return gtk_tree_iter_copy (next);
/* Me ? leaking ? nah .... */ /* Me ? leaking ? nah .... */
#if 1 #if 1
if (gtk_tree_model_iter_has_child (model, iter)) { if (gtk_tree_model_iter_has_child (model, next)) {
GtkTreeIter *child = g_new0 (GtkTreeIter, 1); GtkTreeIter *child = g_new0 (GtkTreeIter, 1);
GtkTreeIter *retval = g_new0 (GtkTreeIter, 1); GtkTreeIter *retval = NULL;
gtk_tree_model_iter_children (model, child, iter); gtk_tree_model_iter_children (model, child, next);
retval = glade_project_view_find_iter (model, retval = glade_project_view_find_iter (model,
child, child,
findme); findme);

View File

@ -181,10 +181,11 @@ glade_property_class_get_type_from_spec (GParamSpec *spec)
{ {
switch (G_PARAM_SPEC_TYPE (spec)) switch (G_PARAM_SPEC_TYPE (spec))
{ {
#if 0
case G_TYPE_PARAM_INT: case G_TYPE_PARAM_INT:
return GLADE_PROPERTY_TYPE_INTEGER;
case G_TYPE_PARAM_FLOAT: case G_TYPE_PARAM_FLOAT:
#endif g_warning ("Float not yet implemented\n");
break;
case G_TYPE_PARAM_BOOLEAN: case G_TYPE_PARAM_BOOLEAN:
return GLADE_PROPERTY_TYPE_BOOLEAN; return GLADE_PROPERTY_TYPE_BOOLEAN;
case G_TYPE_PARAM_STRING: case G_TYPE_PARAM_STRING:
@ -193,9 +194,9 @@ glade_property_class_get_type_from_spec (GParamSpec *spec)
return GLADE_PROPERTY_TYPE_CHOICE; return GLADE_PROPERTY_TYPE_CHOICE;
default: default:
g_warning ("Could not determine GladePropertyType from spec"); g_warning ("Could not determine GladePropertyType from spec");
return GLADE_PROPERTY_TYPE_ERROR;
} }
return GLADE_PROPERTY_TYPE_ERROR;
} }
static GladeChoice * static GladeChoice *
@ -234,15 +235,55 @@ glade_property_class_get_choices_from_spec (GParamSpec *spec)
return list; return list;
} }
static GladeParameter * static GList *
glade_property_get_parameter_default_choice (GParamSpec *spec, glade_property_get_parameters_boolean (GParamSpec *spec,
GladePropertyClass *class) GladePropertyClass *class)
{
GladeParameter *parameter;
gint def;
g_return_val_if_fail (G_IS_PARAM_SPEC_BOOLEAN (spec), NULL);
def = (gint) G_PARAM_SPEC_BOOLEAN (spec)->default_value;
parameter = glade_parameter_new ();
parameter->key = g_strdup ("Default");
parameter->value = def ? g_strdup (GLADE_TAG_TRUE) : g_strdup (GLADE_TAG_FALSE);
g_print ("Para %s\n", parameter->value);
return g_list_prepend (NULL, parameter);
}
static GList *
glade_property_get_parameters_integer (GParamSpec *spec,
GladePropertyClass *class)
{
GladeParameter *parameter;
gint def;
g_return_val_if_fail (G_IS_PARAM_SPEC_INT (spec), NULL);
def = (gint) G_PARAM_SPEC_INT (spec)->default_value;
parameter = glade_parameter_new ();
parameter->key = g_strdup ("Default");
parameter->value = g_strdup_printf ("%i", def);
return g_list_prepend (NULL, parameter);
}
static GList *
glade_property_get_parameters_choice (GParamSpec *spec,
GladePropertyClass *class)
{ {
GladeParameter *parameter; GladeParameter *parameter;
GladeChoice *choice = NULL; GladeChoice *choice = NULL;
GList *list; GList *list;
gint def; gint def;
g_return_val_if_fail (G_IS_PARAM_SPEC_ENUM (spec), NULL);
def = (gint) G_PARAM_SPEC_ENUM (spec)->default_value; def = (gint) G_PARAM_SPEC_ENUM (spec)->default_value;
list = class->choices; list = class->choices;
@ -257,44 +298,64 @@ glade_property_get_parameter_default_choice (GParamSpec *spec,
return NULL; return NULL;
choice = class->choices->data; choice = class->choices->data;
} }
parameter = glade_parameter_new (); parameter = glade_parameter_new ();
parameter->key = g_strdup ("Default"); parameter->key = g_strdup ("Default");
parameter->value = g_strdup (choice->symbol); parameter->value = g_strdup (choice->symbol);
return parameter; /* The "list" pointer is now used for something else */
list = g_list_prepend (NULL, parameter);
return list;
} }
static GList * static GList *
glade_property_class_get_parameters_from_spec (GParamSpec *spec, glade_property_class_get_parameters_from_spec (GParamSpec *spec,
GladePropertyClass *class) GladePropertyClass *class,
xmlNodePtr node)
{ {
GladeParameter *parameter;
GList *parameters = NULL; GList *parameters = NULL;
xmlNodePtr child;
g_print ("Go %s\n", class->name);
switch (class->type) { switch (class->type) {
case GLADE_PROPERTY_TYPE_CHOICE: case GLADE_PROPERTY_TYPE_CHOICE:
parameter = glade_property_get_parameter_default_choice (spec, parameters = glade_property_get_parameters_choice (spec,
class); class);
parameters = g_list_prepend (parameters, parameter);
break; break;
case GLADE_PROPERTY_TYPE_TEXT: case GLADE_PROPERTY_TYPE_TEXT:
break; break;
case GLADE_PROPERTY_TYPE_INTEGER: case GLADE_PROPERTY_TYPE_INTEGER:
parameters = glade_property_get_parameters_integer (spec,
class);
break; break;
case GLADE_PROPERTY_TYPE_FLOAT: case GLADE_PROPERTY_TYPE_FLOAT:
break; break;
case GLADE_PROPERTY_TYPE_BOOLEAN: case GLADE_PROPERTY_TYPE_BOOLEAN:
parameters = glade_property_get_parameters_boolean (spec,
class);
break; break;
default: default:
g_print ("No parameters for %s\n", class->name);
} }
/* Get the parameters that are specified on the glade file,
* they can overwrite gtk+ settings. For example the default
* size of a GtkWindow is 0,0 which we need to overwrite.
*/
child = glade_xml_search_child (node, GLADE_TAG_PARAMETERS);
if (child != NULL)
parameters = glade_parameter_list_new_from_node (parameters,
child);
return parameters; return parameters;
} }
static GladePropertyClass * static GladePropertyClass *
glade_property_class_new_from_param_spec (const gchar *name, GladeWidgetClass *widget_class) glade_property_class_new_from_param_spec (const gchar *name,
GladeWidgetClass *widget_class,
xmlNodePtr node)
{ {
GladePropertyClass *class; GladePropertyClass *class;
GParamSpec *spec; GParamSpec *spec;
@ -315,7 +376,7 @@ glade_property_class_new_from_param_spec (const gchar *name, GladeWidgetClass *w
if (class->type == GLADE_PROPERTY_TYPE_CHOICE) if (class->type == GLADE_PROPERTY_TYPE_CHOICE)
class->choices = glade_property_class_get_choices_from_spec (spec); class->choices = glade_property_class_get_choices_from_spec (spec);
class->parameters = glade_property_class_get_parameters_from_spec (spec, class); class->parameters = glade_property_class_get_parameters_from_spec (spec, class, node);
return class; return class;
} }
@ -337,10 +398,10 @@ glade_property_class_new_from_node (xmlNodePtr node, GladeWidgetClass *widget_cl
if (name == NULL) if (name == NULL)
return NULL; return NULL;
/* Can we load this property from the ParamSpec ? */ /* Should we load this property from the ParamSpec ? */
child = glade_xml_search_child (node, GLADE_TAG_PARAM_SPEC); child = glade_xml_search_child (node, GLADE_TAG_PARAM_SPEC);
if (child) { if (child) {
property_class = glade_property_class_new_from_param_spec (name, widget_class); property_class = glade_property_class_new_from_param_spec (name, widget_class, node);
g_free (name); g_free (name);
return property_class; return property_class;
} }
@ -363,7 +424,7 @@ glade_property_class_new_from_node (xmlNodePtr node, GladeWidgetClass *widget_cl
/* Get the Parameters */ /* Get the Parameters */
child = glade_xml_search_child (node, GLADE_TAG_PARAMETERS); child = glade_xml_search_child (node, GLADE_TAG_PARAMETERS);
if (child != NULL) if (child != NULL)
property_class->parameters = glade_parameter_list_new_from_node (child); property_class->parameters = glade_parameter_list_new_from_node (NULL, child);
glade_parameter_get_boolean (property_class->parameters, "Optional", &property_class->optional); glade_parameter_get_boolean (property_class->parameters, "Optional", &property_class->optional);
/* Get the Query */ /* Get the Query */

View File

@ -21,6 +21,7 @@
*/ */
#include <stdlib.h> /* for atoi and atof */ #include <stdlib.h> /* for atoi and atof */
#include <string.h>
#include "glade.h" #include "glade.h"
#include "glade-choice.h" #include "glade-choice.h"

View File

@ -2,10 +2,13 @@ typedef struct _GladePaletteSection GladePaletteSection;
typedef struct _GladePalette GladePalette; typedef struct _GladePalette GladePalette;
typedef struct _GladeEditor GladeEditor; typedef struct _GladeEditor GladeEditor;
typedef struct _GladeSignalEditor GladeSignalEditor;
typedef struct _GladeProject GladeProject; typedef struct _GladeProject GladeProject;
typedef struct _GladeWidget GladeWidget; typedef struct _GladeWidget GladeWidget;
typedef struct _GladeWidgetSignal GladeWidgetSignal;
typedef struct _GladeWidgetClass GladeWidgetClass; typedef struct _GladeWidgetClass GladeWidgetClass;
typedef struct _GladeWidgetClassSignal GladeWidgetClassSignal;
typedef struct _GladeProperty GladeProperty; typedef struct _GladeProperty GladeProperty;
typedef struct _GladePropertyClass GladePropertyClass; typedef struct _GladePropertyClass GladePropertyClass;

View File

@ -24,6 +24,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include <config.h> #include <config.h>
@ -72,6 +73,44 @@ glade_widget_class_add_virtual_methods (GladeWidgetClass *class)
} }
GList *
glade_widget_class_list_signals (GladeWidgetClass *class)
{
GList *signals;
GType type;
guint count;
guint *sig_ids;
guint num_signals;
GladeWidgetClassSignal *cur;
signals = NULL;
/* FIXME: This should work. Apparently this is because you need to have an
* instance of an object before you can get its type?!? need to fix this
* to use class->type when bighead applys his patch. - shane
*/
type = g_type_from_name (class->name);
g_return_val_if_fail (type != 0, NULL);
while (g_type_is_a (type, GTK_TYPE_OBJECT)) {
if (G_TYPE_IS_INSTANTIATABLE (type) || G_TYPE_IS_INTERFACE (type)) {
sig_ids = g_signal_list_ids (type, &num_signals);
for (count = 0; count < num_signals; count++) {
cur = g_new0 (GladeWidgetClassSignal, 1);
cur->name = (gchar *) g_signal_name (sig_ids[count]);
cur->type = (gchar *) g_type_name (type);
signals = g_list_append (signals, (GladeWidgetClassSignal *) cur);
}
}
type = g_type_parent (type);
}
return signals;
}
static GladeWidgetClass * static GladeWidgetClass *
glade_widget_class_new_from_node (XmlParseContext *context, xmlNodePtr node) glade_widget_class_new_from_node (XmlParseContext *context, xmlNodePtr node)
{ {
@ -91,6 +130,7 @@ glade_widget_class_new_from_node (XmlParseContext *context, xmlNodePtr node)
class->generic_name = glade_xml_get_value_string_required (node, GLADE_TAG_GENERIC_NAME, NULL); class->generic_name = glade_xml_get_value_string_required (node, GLADE_TAG_GENERIC_NAME, NULL);
class->icon = glade_xml_get_value_string_required (node, GLADE_TAG_ICON, NULL); class->icon = glade_xml_get_value_string_required (node, GLADE_TAG_ICON, NULL);
class->properties = glade_property_class_list_new_from_node (child, class); class->properties = glade_property_class_list_new_from_node (child, class);
class->signals = glade_widget_class_list_signals (class);
if (!class->name || if (!class->name ||
!class->icon || !class->icon ||

View File

@ -50,11 +50,23 @@ struct _GladeWidgetClass {
* editor. * editor.
*/ */
GList *signals; /* List of GladeWidgetClassSignal objects */
void (*placeholder_replace) (GladePlaceholder *placeholder, void (*placeholder_replace) (GladePlaceholder *placeholder,
GladeWidget *widget, GladeWidget *widget,
GladeWidget *parent); GladeWidget *parent);
}; };
/* GladeWidgetClassSignal contains all the info we need for a given signal, such as
* the signal name, and maybe more in the future
*/
struct _GladeWidgetClassSignal {
gchar *name; /* Name of the signal, eg clicked */
gchar *type; /* Name of the object class that this signal belongs to
* eg GtkButton */
};
GladeWidgetClass * glade_widget_class_new_from_name (const gchar *name); GladeWidgetClass * glade_widget_class_new_from_name (const gchar *name);
const gchar * glade_widget_class_get_name (GladeWidgetClass *class); const gchar * glade_widget_class_get_name (GladeWidgetClass *class);

View File

@ -284,7 +284,7 @@ glade_widget_button_release (GtkWidget *widget, GdkEventButton *event, GladeWidg
} }
#if 0 #if 1
/** /**
* glade_widget_set_default_options: * glade_widget_set_default_options:
* @widget: * @widget:
@ -344,21 +344,6 @@ glade_widget_register (GladeProject *project, GladeWidgetClass *class, GtkWidget
if (parent) if (parent)
parent->children = g_list_prepend (parent->children, glade_widget); parent->children = g_list_prepend (parent->children, glade_widget);
#if 0
glade_widget_set_default_options (glade_widget);
#else
{
static gboolean warned = FALSE;
if (!warned) {
g_print ("Not setting the default options yet\n");
warned = TRUE;
}
}
#endif
/* Add a pointer to the GladeWidget in the GtkWidget */
gtk_object_set_data (GTK_OBJECT (gtk_widget), GLADE_WIDGET_DATA_TAG, glade_widget);
return glade_widget; return glade_widget;
} }
@ -502,7 +487,12 @@ glade_widget_create_gtk_widget (GladeProject *project,
} }
glade_widget = glade_widget_register (project, class, widget, name, parent); glade_widget = glade_widget_register (project, class, widget, name, parent);
glade_widget_set_default_options (glade_widget);
/* We need to be able to get to the GladeWidget * from a GtkWidget * */
gtk_object_set_data (GTK_OBJECT (glade_widget->widget), GLADE_WIDGET_DATA_TAG, glade_widget);
/* FIXME */ /* FIXME */
if ((strcmp (class->name, "GtkLabel") == 0) || if ((strcmp (class->name, "GtkLabel") == 0) ||
(strcmp (class->name, "GtkButton") == 0)) { (strcmp (class->name, "GtkButton") == 0)) {
@ -592,7 +582,7 @@ GladeProperty *
glade_widget_get_property_from_class (GladeWidget *widget, glade_widget_get_property_from_class (GladeWidget *widget,
GladePropertyClass *property_class) GladePropertyClass *property_class)
{ {
GladeProperty *property; GladeProperty *property = NULL;
GList *list; GList *list;
list = widget->properties; list = widget->properties;

View File

@ -40,6 +40,8 @@ struct _GladeWidget {
* property is "Ok". * property is "Ok".
*/ */
GList *signals; /* A list of GladeWidgetSignals */
/* Tree Structure */ /* Tree Structure */
GladeWidget *parent; /* The parent of this widget, NULL if this is a GladeWidget *parent; /* The parent of this widget, NULL if this is a
* toplevel widget. * toplevel widget.
@ -50,6 +52,14 @@ struct _GladeWidget {
gboolean selected; gboolean selected;
}; };
/* GladeWidgetSignal is a structure that holds information about a signal a
* widget wants for handle / listen for.
*/
struct _GladeWidgetSignal {
gchar *name; /* Signal name eg "clicked" */
gchar *handler; /* Handler function eg "gtk_main_quit" */
gboolean after; /* Connect after TRUE or FALSE */
};
GladeWidget * glade_widget_new_from_class (GladeProject *project, GladeWidget * glade_widget_new_from_class (GladeProject *project,

View File

@ -2,6 +2,7 @@ widgets_DATA = \
catalog.xml \ catalog.xml \
gtkwindow.xml \ gtkwindow.xml \
gtkbutton.xml \ gtkbutton.xml \
gtkcheckbutton.xml \
gtklabel.xml \ gtklabel.xml \
gtkvbox.xml \ gtkvbox.xml \
gtkhbox.xml \ gtkhbox.xml \

View File

@ -1,6 +1,7 @@
<GladeCatalog> <GladeCatalog>
<GladeWidget>gtkwindow</GladeWidget> <GladeWidget>gtkwindow</GladeWidget>
<GladeWidget>gtkbutton</GladeWidget> <GladeWidget>gtkbutton</GladeWidget>
<GladeWidget>gtkcheckbutton</GladeWidget>
<GladeWidget>gtklabel</GladeWidget> <GladeWidget>gtklabel</GladeWidget>
<GladeWidget>gtkhbox</GladeWidget> <GladeWidget>gtkhbox</GladeWidget>
<GladeWidget>gtkvbox</GladeWidget> <GladeWidget>gtkvbox</GladeWidget>

View File

@ -7,28 +7,6 @@
<Properties> <Properties>
<Property>
<Type>Integer</Type>
<Name>Border Width</Name>
<Tooltip>The width of the border arround the container</Tooltip>
<GtkArg>border-width</GtkArg>
<Parameters>
<Parameter Key="Min" Value="0"/>
<Parameter Key="Max" Value="10000"/>
<Parameter Key="Default" Value="31"/>
<Parameter Key="StepIncrement" Value="1"/>
<Parameter Key="PageIncrement" Value="10"/>
<Parameter Key="ClibmRate" Value="1"/>
</Parameters>
</Property>
<!--
<Property>
<Name>border-width</Name>
<ParamSpec/>
</Property>
-->
<Property> <Property>
<Name>title</Name> <Name>title</Name>
<ParamSpec/> <ParamSpec/>
@ -48,41 +26,23 @@
<Name>modal</Name> <Name>modal</Name>
<ParamSpec/> <ParamSpec/>
</Property> </Property>
<Property> <Property>
<Type>Integer</Type> <Name>default-width</Name>
<Name>Default Width</Name> <ParamSpec/>
<Tooltip>The default width of the window</Tooltip>
<!-- <GtkArg>fixme</GtkArg> -->
<Parameters> <Parameters>
<Parameter Key="Min" Value="0"/> <Parameter Key="Default" Value="440"/>
<Parameter Key="Max" Value="10000"/> </Parameters>
<Parameter Key="Default" Value="0"/>
<Parameter Key="StepIncrement" Value="1"/>
<Parameter Key="PageIncrement" Value="10"/>
<Parameter Key="ClimbRate" Value="1"/>
<Parameter Key="Optional" Value="True"/>
<Parameter Key="OptionalDefault" Value="False"/>
</Parameters>
</Property> </Property>
<Property> <Property>
<Type>Integer</Type> <Name>default-height</Name>
<Name>Default Height</Name> <ParamSpec/>
<Tooltip>The default height of the window</Tooltip>
<!-- <GtkArg>fixme</GtkArg> -->
<Parameters> <Parameters>
<Parameter Key="Min" Value="0"/> <Parameter Key="Default" Value="300"/>
<Parameter Key="Max" Value="10000"/> </Parameters>
<Parameter Key="Default" Value="0"/>
<Parameter Key="StepIncrement" Value="1"/>
<Parameter Key="PageIncrement" Value="10"/>
<Parameter Key="ClimbRate" Value="1"/>
<Parameter Key="Optional" Value="True"/>
<Parameter Key="OptionalDefault" Value="False"/>
</Parameters>
</Property> </Property>
<Property> <Property>
<Name>allow-shrink</Name> <Name>allow-shrink</Name>
<ParamSpec/> <ParamSpec/>
@ -99,19 +59,21 @@
</Property> </Property>
<!-- Dunno what this does, dunno if we should remove it --> <!-- Dunno what this does, dunno if we should remove it -->
<!--
<Property> <Property>
<Type>Text</Type> <Type>Text</Type>
<Name>WM Name</Name> <Name>WM Name</Name>
<Tooltip>The name to pass to the window manager</Tooltip> <Tooltip>The name to pass to the window manager</Tooltip>
<!-- <GtkArg>fixme</GtkArg> --> <GtkArg>fixme</GtkArg>
</Property> </Property>
<Property> <Property>
<Type>Text</Type> <Type>Text</Type>
<Name>WM Class</Name> <Name>WM Class</Name>
<Tooltip>The class name to pass to the window manager</Tooltip> <Tooltip>The class name to pass to the window manager</Tooltip>
<!-- <GtkArg>fixme</GtkArg> --> <GtkArg>fixme</GtkArg>
</Property> </Property>
-->
</Properties> </Properties>
</GladeWidgetClass> </GladeWidgetClass>