added check for GnomeUI libs (PKG_CHECK_MODULES)

* configure.in: added check for GnomeUI libs (PKG_CHECK_MODULES)

	* widgets/Makefile.am: New catalogs added (bonobo.xml gnome.xml)

	* widgets/bonobo.xml.in: Created new catalog for libbonoboui.

	* widgets/gnome.xml.in: Created new catalog for libgnomeui.

	* widgets/canvas.xml.in: empty file just to declare the module.
	  GnomeCanvas is declared in gnome catalog.

	* widgets/gtk+.xml.in: added GtkMenuItem "stock-item" property.
	  o added glade_gtk_box_get_internal_child()
	  o disabled GtkLayout's hadjustment and vadjustment properties.

	* src/Makefile.am: added gladegnome conditional build.

	* src/glade-builtins.[ch]: added glade_standard_pixbuf_spec(),
	  glade_standard_gdkcolor_spec() and glade_standard_uint_spec().
	  Fixed stock order in glade_standard_stock_get_type()

	* src/glade-editor-property.c: added G_PARAM_SPEC_VALUE_ARRAY
	  support to GladeEPropText.

	* src/glade-gnome.c: New support file for gnome/bonobo catalogs.

	* src/glade-gtk.h: Created to include it in others plugings.

	* src/glade-gtk.c:
	  o added GtkMenuItem stock-item property.
	  o Moved GladeGtkImageType and GladeGtkButtonType to glade-gtk.h
	  o Moved GLADE_CREATE_USER block from idle function to
	    glade_gtk_button_post_create()

	* src/glade-project.c: fixed bug in glade_project_resource_fullpath()
	  project->path could be NULL.

	* src/glade-property-class.c: added G_PARAM_SPEC_VALUE_ARRAY
	  support in glade_property_class_make_string_from_gvalue() and
	  glade_property_class_make_gvalue_from_string()
This commit is contained in:
Tristan Van Berkom 2006-05-18 04:06:50 +00:00
parent afebbfc713
commit eb1ec8b868
41 changed files with 2840 additions and 74 deletions

View File

@ -1,3 +1,46 @@
2006-05-17 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* configure.in: added check for GnomeUI libs (PKG_CHECK_MODULES)
* widgets/Makefile.am: New catalogs added (bonobo.xml gnome.xml)
* widgets/bonobo.xml.in: Created new catalog for libbonoboui.
* widgets/gnome.xml.in: Created new catalog for libgnomeui.
* widgets/canvas.xml.in: empty file just to declare the module.
GnomeCanvas is declared in gnome catalog.
* widgets/gtk+.xml.in: added GtkMenuItem "stock-item" property.
o added glade_gtk_box_get_internal_child()
o disabled GtkLayout's hadjustment and vadjustment properties.
* src/Makefile.am: added gladegnome conditional build.
* src/glade-builtins.[ch]: added glade_standard_pixbuf_spec(),
glade_standard_gdkcolor_spec() and glade_standard_uint_spec().
Fixed stock order in glade_standard_stock_get_type()
* src/glade-editor-property.c: added G_PARAM_SPEC_VALUE_ARRAY
support to GladeEPropText.
* src/glade-gnome.c: New support file for gnome/bonobo catalogs.
* src/glade-gtk.h: Created to include it in others plugings.
* src/glade-gtk.c:
o added GtkMenuItem stock-item property.
o Moved GladeGtkImageType and GladeGtkButtonType to glade-gtk.h
o Moved GLADE_CREATE_USER block from idle function to
glade_gtk_button_post_create()
* src/glade-project.c: fixed bug in glade_project_resource_fullpath()
project->path could be NULL.
* src/glade-property-class.c: added G_PARAM_SPEC_VALUE_ARRAY
support in glade_property_class_make_string_from_gvalue() and
glade_property_class_make_gvalue_from_string()
2006-05-15 Tristan Van Berkom <tvb@gnome.org>
* configure.in:

View File

@ -88,6 +88,12 @@ case $host_os in
esac
AM_CONDITIONAL(WITH_WIN32, test x"$win32" = "xyes")
PKG_CHECK_MODULES(GNOME, libbonoboui-2.0 libgnomeui-2.0,
[have_gnome=yes],[have_gnome=no])
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOME_CFLAGS)
AM_CONDITIONAL(BUILD_GNOME, test x"$have_gnome" = "xyes")
GTK_DOC_CHECK(1.4)
AC_OUTPUT([
@ -108,8 +114,9 @@ echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
Devhelp module: ${have_devhelp}
Devhelp module: ${have_devhelp}
GnomeUI Catalog: ${have_gnome}
"

View File

@ -59,4 +59,31 @@ pixmaps_DATA = \
window.png \
devhelp.png
if BUILD_GNOME
pixmaps_DATA += bonobodockitem.png \
gnomecanvas.png \
gnomedruidpageedge.png \
gnomefontpicker.png \
gnomepixmap.png \
bonobodock.png \
gnomecolorpicker.png \
gnomedruidpagestandard.png \
gnomehref.png \
gnomepixmapentry.png \
gnomeabout.png \
gnomecontrol.png \
gnomedruid.png \
gnomeiconentry.png \
gnomeapp.png \
gnomedateedit.png \
gnomeentry.png \
gnomeiconlist.png \
gnomeappbar.png \
gnomedialog.png \
gnomefileentry.png \
gnomeiconselection.png \
gnomemessagebox.png \
gnomepropertybox.png
endif
EXTRA_DIST = $(pixmaps_DATA)

BIN
pixmaps/bonobodock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

BIN
pixmaps/bonobodockitem.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

BIN
pixmaps/gnomeabout.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

BIN
pixmaps/gnomeapp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

BIN
pixmaps/gnomeappbar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

BIN
pixmaps/gnomecanvas.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

BIN
pixmaps/gnomecontrol.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

BIN
pixmaps/gnomedateedit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

BIN
pixmaps/gnomedialog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

BIN
pixmaps/gnomedruid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

BIN
pixmaps/gnomeentry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

BIN
pixmaps/gnomefileentry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

BIN
pixmaps/gnomefontpicker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

BIN
pixmaps/gnomehref.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

BIN
pixmaps/gnomeiconentry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

BIN
pixmaps/gnomeiconlist.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

BIN
pixmaps/gnomemessagebox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

BIN
pixmaps/gnomepixmap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

View File

@ -143,6 +143,15 @@ libgladeuiinclude_HEADERS = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgladeui-1.0.pc glade-3.pc
if BUILD_GNOME
gladegnome_LTLIBRARIES = libgladegnome.la
gladegnomedir = $(glade_modulesdir)
libgladegnome_la_SOURCES = glade-gnome.c
libgladegnome_la_CFLAGS = -g -Wall $(GNOME_CFLAGS)
libgladegnome_la_LDFLAGS = -module -avoid-version $(GNOME_LIBS)
libgladegnome_la_LIBADD = libgladeui-1.la $(GLADE_LIBS)
endif
if WITH_WIN32
libgladegtk_la_LDFLAGS += -no-undefined
libgladeui_1_la_LDFLAGS += -no-undefined
@ -151,6 +160,10 @@ if WITH_DEVHELP
libgladedevhelp_la_LDFLAGS += -no-undefined
endif
if BUILD_GNOME
libgladegnome_la_LDFLAGS += -no-undefined
endif
endif
#

View File

@ -52,7 +52,7 @@ glade_standard_stock_get_type (void)
GtkStockItem item;
GSList *l, *stock_list;
gchar *stock_id;
gint stock_enum = 0;
gint stock_enum = 1;
GEnumValue value;
GArray *values =
g_array_new (TRUE, TRUE, sizeof (GEnumValue));
@ -62,12 +62,6 @@ glade_standard_stock_get_type (void)
*/
stock_list = gtk_stock_list_ids ();
/* Add first "no stock" element */
value.value_nick = g_strdup ("glade-none"); // Passing ownership here.
value.value_name = g_strdup ("None");
value.value = stock_enum++;
values = g_array_append_val (values, value);
for (l = stock_list; l; l = l->next)
{
stock_id = l->data;
@ -77,9 +71,15 @@ glade_standard_stock_get_type (void)
value.value = stock_enum++;
value.value_name = g_strdup (item.label);
value.value_nick = stock_id; // Passing ownership here.
values = g_array_append_val (values, value);
values = g_array_prepend_val (values, value);
}
/* Add first "no stock" element */
value.value_nick = g_strdup ("glade-none"); // Passing ownership here.
value.value_name = g_strdup ("None");
value.value = 0;
values = g_array_prepend_val (values, value);
etype = g_enum_register_static ("GladeStock", (GEnumValue *)values->data);
g_slist_free (stock_list);
@ -367,6 +367,23 @@ glade_standard_objects_spec (void)
G_PARAM_READWRITE);
}
/* Pixbuf Type */
GParamSpec *
glade_standard_pixbuf_spec (void)
{
return g_param_spec_object ("pixbuf", _("Pixbuf"),
_("A pixbuf value"), GDK_TYPE_PIXBUF,
G_PARAM_READWRITE);
}
/* GdkColor */
GParamSpec *
glade_standard_gdkcolor_spec (void)
{
return g_param_spec_boxed ("gdkcolor", _("GdkColor"),
_("A gdk color value"), GDK_TYPE_COLOR,
G_PARAM_READWRITE);
}
/****************************************************************
* Basic types follow *
@ -380,6 +397,14 @@ glade_standard_int_spec (void)
0, G_PARAM_READWRITE);
}
GParamSpec *
glade_standard_uint_spec (void)
{
return g_param_spec_uint ("uint", _("Unsigned Integer"),
_("An unsigned integer value"),
0, G_MAXUINT, 0, G_PARAM_READWRITE);
}
GParamSpec *
glade_standard_string_spec (void)
{

View File

@ -45,10 +45,12 @@ LIBGLADEUI_API GType glade_param_spec_objects_get_type (GladeParamSpecObj
LIBGLADEUI_API GParamSpec **glade_list_atk_relations (GType owner_type,
guint *n_specs);
LIBGLADEUI_API GParamSpec *glade_standard_pixbuf_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_gdkcolor_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_objects_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_stock_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_int_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_uint_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_string_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_strv_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_float_spec (void);

View File

@ -921,15 +921,15 @@ glade_eprop_flags_load (GladeEditorProperty *eprop, GladeProperty *property)
value_name = glade_property_class_get_displayable_value
(eprop->class, class->values[flag_num].value);
if (value_name == NULL) value_name = class->values[flag_num].value_name;
/* Setup string for property label */
if (setting)
{
if (string->len > 0)
g_string_append (string, "|");
g_string_append (string, " | ");
g_string_append (string, value_name);
}
if (value_name == NULL) value_name = class->values[flag_num].value_name;
/* Add a row to represent the flag. */
gtk_list_store_append (GTK_LIST_STORE(eprop_flags->model), &iter);
@ -1290,17 +1290,14 @@ glade_eprop_text_load (GladeEditorProperty *eprop, GladeProperty *property)
gtk_editable_set_position (editable, pos);
} else if (GTK_IS_TEXT_VIEW (eprop_text->text_entry)) {
GtkTextBuffer *buffer;
gchar **split;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (eprop_text->text_entry));
if (G_VALUE_HOLDS (property->value, G_TYPE_STRV))
if (G_VALUE_HOLDS (property->value, G_TYPE_STRV) ||
G_VALUE_HOLDS (property->value, G_TYPE_VALUE_ARRAY))
{
gchar *text = NULL;
split = g_value_get_boxed (property->value);
if (split) text = g_strjoinv ("\n", split);
gchar *text = glade_property_class_make_string_from_gvalue (
property->class, property->value);
gtk_text_buffer_set_text (buffer,
text ? text : "",
text ? g_utf8_strlen (text, -1) : 0);
@ -1321,18 +1318,20 @@ glade_eprop_text_changed_common (GladeEditorProperty *eprop,
const gchar *text,
gboolean use_command)
{
GValue val = { 0, };
GValue *val;
gchar *prop_text;
if (eprop->property->class->pspec->value_type == G_TYPE_STRV)
if (eprop->property->class->pspec->value_type == G_TYPE_STRV ||
eprop->property->class->pspec->value_type == G_TYPE_VALUE_ARRAY)
{
g_value_init (&val, G_TYPE_STRV);
g_value_take_boxed (&val, g_strsplit (text, "\n", 0));
val = glade_property_class_make_gvalue_from_string
(eprop->property->class, text, NULL);
}
else
{
g_value_init (&val, G_TYPE_STRING);
val = g_new0 (GValue, 1);
g_value_init (val, G_TYPE_STRING);
glade_property_get (eprop->property, &prop_text);
@ -1341,16 +1340,17 @@ glade_eprop_text_changed_common (GladeEditorProperty *eprop,
*/
if (prop_text == NULL &&
text && text[0] == '\0')
g_value_set_string (&val, NULL);
g_value_set_string (val, NULL);
else if (text == NULL &&
prop_text && prop_text == '\0')
g_value_set_string (&val, "");
g_value_set_string (val, "");
else
g_value_set_string (&val, text);
g_value_set_string (val, text);
}
glade_editor_property_commit (eprop, &val);
g_value_unset (&val);
glade_editor_property_commit (eprop, val);
g_value_unset (val);
g_free (val);
}
static void
@ -1582,7 +1582,9 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
hbox = gtk_hbox_new (FALSE, 0);
if (class->visible_lines > 1 ||
class->pspec->value_type == G_TYPE_STRV) {
class->pspec->value_type == G_TYPE_STRV ||
class->pspec->value_type == G_TYPE_VALUE_ARRAY)
{
GtkWidget *swindow;
swindow = gtk_scrolled_window_new (NULL, NULL);
@ -2918,6 +2920,11 @@ glade_editor_property_type (GParamSpec *pspec)
type = GLADE_TYPE_EPROP_ENUM;
else if (G_IS_PARAM_SPEC_FLAGS(pspec))
type = GLADE_TYPE_EPROP_FLAGS;
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec))
{
if (pspec->value_type == G_TYPE_VALUE_ARRAY)
type = GLADE_TYPE_EPROP_TEXT;
}
else if (G_IS_PARAM_SPEC_BOXED(pspec))
{
if (pspec->value_type == GDK_TYPE_COLOR)

1682
src/glade-gnome.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -23,9 +23,7 @@
#include <string.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "glade.h"
#include "glade-widget.h"
#include "glade-gtk.h"
#include "glade-editor-property.h"
#include "fixed_bg.xpm"
@ -36,32 +34,13 @@
#include <glib/gi18n-lib.h>
#ifdef G_OS_WIN32
#define GLADEGTK_API __declspec(dllexport)
#else
#define GLADEGTK_API
#endif
/* ------------------------------------ Constants ------------------------------ */
/* --------------------------------- Constants ------------------------------ */
#define FIXED_DEFAULT_CHILD_WIDTH 100
#define FIXED_DEFAULT_CHILD_HEIGHT 60
/* ------------------------------ Types & ParamSpecs --------------------------- */
typedef enum {
GLADEGTK_IMAGE_FILENAME = 0,
GLADEGTK_IMAGE_STOCK,
GLADEGTK_IMAGE_ICONTHEME
} GladeGtkImageType;
typedef enum {
GLADEGTK_BUTTON_LABEL = 0,
GLADEGTK_BUTTON_STOCK,
GLADEGTK_BUTTON_CONTAINER
} GladeGtkButtonType;
static GType
/* -------------------------------- ParamSpecs ------------------------------ */
GType GLADEGTK_API
glade_gtk_image_type_get_type (void)
{
static GType etype = 0;
@ -81,7 +60,7 @@ glade_gtk_image_type_get_type (void)
return etype;
}
static GType
GType GLADEGTK_API
glade_gtk_button_type_get_type (void)
{
static GType etype = 0;
@ -408,6 +387,30 @@ glade_gtk_box_add_child (GObject *object, GObject *child)
}
}
void GLADEGTK_API
glade_gtk_box_get_internal_child (GObject *object,
const gchar *name,
GObject **child)
{
GList *children, *l;
g_return_if_fail (GTK_IS_BOX (object));
children = l = gtk_container_get_children (GTK_CONTAINER (object));
*child = NULL;
while (l)
{
GladeWidget *gw = glade_widget_get_from_gobject (l->data);
if (gw && gw->internal && strcmp (gw->internal, name) == 0)
*child = G_OBJECT (l->data);
l= l->next;
}
g_list_free (children);
}
void GLADEGTK_API
glade_gtk_box_remove_child (GObject *object, GObject *child)
{
@ -1469,16 +1472,6 @@ glade_gtk_button_post_create_idle (GObject *button)
glade_gtk_button_backup_stock (gbutton);
glade_gtk_button_backup_label (gbutton);
/* Internal buttons get there stock stuff introspected.
*/
if (reason == GLADE_CREATE_USER && gbutton->internal == NULL)
{
glade_widget_property_set (gbutton, "glade-type", GLADEGTK_BUTTON_LABEL);
glade_project_selection_set (GLADE_PROJECT (gbutton->project),
G_OBJECT (button), TRUE);
return FALSE;
}
glade_widget_property_get (gbutton, "use-stock", &use_stock);
glade_widget_property_get (gbutton, "label", &label);
@ -1543,11 +1536,21 @@ glade_gtk_button_post_create (GObject *button, GladeCreateReason reason)
return;
}
g_object_set_data (button, "glade-reason", GINT_TO_POINTER (reason));
g_idle_add ((GSourceFunc)glade_gtk_button_post_create_idle, button);
/* Internal buttons get there stock stuff introspected. */
if (reason == GLADE_CREATE_USER && gbutton->internal == NULL)
{
g_object_set_data (button, "glade-button-post-ran", GINT_TO_POINTER (1));
glade_widget_property_set (gbutton, "glade-type", GLADEGTK_BUTTON_LABEL);
glade_project_selection_set (GLADE_PROJECT (gbutton->project),
G_OBJECT (button), TRUE);
}
else
{
g_object_set_data (button, "glade-reason", GINT_TO_POINTER (reason));
g_idle_add ((GSourceFunc)glade_gtk_button_post_create_idle, button);
}
}
static void
glade_gtk_image_pixel_size_changed (GladeProperty *property,
GValue *value,
@ -4319,3 +4322,263 @@ glade_gtk_label_set_label (GObject *object, GValue *value)
if (use_underline)
gtk_label_set_use_underline (GTK_LABEL (object), use_underline);
}
/*
GtkImageMenuItem GnomeUI "stock_item" property special case:
"stock_item" property is added by glade2 gnome support and makes reference to
GNOMEUIINFO_MENU_* macros. This set-function maps these properties to
existing non deprecated gtk ones.
*/
typedef enum {
GNOMEUIINFO_MENU_NONE,
/* The 'File' menu */
GNOMEUIINFO_MENU_NEW_ITEM,
GNOMEUIINFO_MENU_NEW_SUBTREE,
GNOMEUIINFO_MENU_OPEN_ITEM,
GNOMEUIINFO_MENU_SAVE_ITEM,
GNOMEUIINFO_MENU_SAVE_AS_ITEM,
GNOMEUIINFO_MENU_REVERT_ITEM,
GNOMEUIINFO_MENU_PRINT_ITEM,
GNOMEUIINFO_MENU_PRINT_SETUP_ITEM,
GNOMEUIINFO_MENU_CLOSE_ITEM,
GNOMEUIINFO_MENU_EXIT_ITEM,
GNOMEUIINFO_MENU_QUIT_ITEM,
/* The "Edit" menu */
GNOMEUIINFO_MENU_CUT_ITEM,
GNOMEUIINFO_MENU_COPY_ITEM,
GNOMEUIINFO_MENU_PASTE_ITEM,
GNOMEUIINFO_MENU_SELECT_ALL_ITEM,
GNOMEUIINFO_MENU_CLEAR_ITEM,
GNOMEUIINFO_MENU_UNDO_ITEM,
GNOMEUIINFO_MENU_REDO_ITEM,
GNOMEUIINFO_MENU_FIND_ITEM,
GNOMEUIINFO_MENU_FIND_AGAIN_ITEM,
GNOMEUIINFO_MENU_REPLACE_ITEM,
GNOMEUIINFO_MENU_PROPERTIES_ITEM,
/* The Settings menu */
GNOMEUIINFO_MENU_PREFERENCES_ITEM,
/* The Windows menu */
GNOMEUIINFO_MENU_NEW_WINDOW_ITEM,
GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM,
/* And the "Help" menu */
GNOMEUIINFO_MENU_ABOUT_ITEM,
/* The "Game" menu */
GNOMEUIINFO_MENU_NEW_GAME_ITEM,
GNOMEUIINFO_MENU_PAUSE_GAME_ITEM,
GNOMEUIINFO_MENU_RESTART_GAME_ITEM,
GNOMEUIINFO_MENU_UNDO_MOVE_ITEM,
GNOMEUIINFO_MENU_REDO_MOVE_ITEM,
GNOMEUIINFO_MENU_HINT_ITEM,
GNOMEUIINFO_MENU_SCORES_ITEM,
GNOMEUIINFO_MENU_END_GAME_ITEM,
/* Some standard menus */
GNOMEUIINFO_MENU_FILE_TREE,
GNOMEUIINFO_MENU_EDIT_TREE,
GNOMEUIINFO_MENU_VIEW_TREE,
GNOMEUIINFO_MENU_SETTINGS_TREE,
GNOMEUIINFO_MENU_FILES_TREE,
GNOMEUIINFO_MENU_WINDOWS_TREE,
GNOMEUIINFO_MENU_HELP_TREE,
GNOMEUIINFO_MENU_GAME_TREE
} GladeGtkGnomeUIInfoEnum;
static GType
glade_gtk_gnome_ui_info_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
{ GNOMEUIINFO_MENU_NONE, "GNOMEUIINFO_MENU_NONE", NULL},
/* The 'File' menu */
{ GNOMEUIINFO_MENU_NEW_ITEM, "GNOMEUIINFO_MENU_NEW_ITEM", "gtk-new"},
{ GNOMEUIINFO_MENU_OPEN_ITEM, "GNOMEUIINFO_MENU_OPEN_ITEM", "gtk-open"},
{ GNOMEUIINFO_MENU_SAVE_ITEM, "GNOMEUIINFO_MENU_SAVE_ITEM", "gtk-save"},
{ GNOMEUIINFO_MENU_SAVE_AS_ITEM, "GNOMEUIINFO_MENU_SAVE_AS_ITEM", "gtk-save-as"},
{ GNOMEUIINFO_MENU_REVERT_ITEM, "GNOMEUIINFO_MENU_REVERT_ITEM", "gtk-revert-to-saved"},
{ GNOMEUIINFO_MENU_PRINT_ITEM, "GNOMEUIINFO_MENU_PRINT_ITEM", "gtk-print"},
{ GNOMEUIINFO_MENU_PRINT_SETUP_ITEM, "GNOMEUIINFO_MENU_PRINT_SETUP_ITEM", NULL},
{ GNOMEUIINFO_MENU_CLOSE_ITEM, "GNOMEUIINFO_MENU_CLOSE_ITEM", "gtk-close"},
{ GNOMEUIINFO_MENU_EXIT_ITEM, "GNOMEUIINFO_MENU_EXIT_ITEM", "gtk-quit"},
{ GNOMEUIINFO_MENU_QUIT_ITEM, "GNOMEUIINFO_MENU_QUIT_ITEM", "gtk-quit"},
/* The "Edit" menu */
{ GNOMEUIINFO_MENU_CUT_ITEM, "GNOMEUIINFO_MENU_CUT_ITEM", "gtk-cut"},
{ GNOMEUIINFO_MENU_COPY_ITEM, "GNOMEUIINFO_MENU_COPY_ITEM", "gtk-copy"},
{ GNOMEUIINFO_MENU_PASTE_ITEM, "GNOMEUIINFO_MENU_PASTE_ITEM", "gtk-paste"},
{ GNOMEUIINFO_MENU_SELECT_ALL_ITEM, "GNOMEUIINFO_MENU_SELECT_ALL_ITEM", NULL},
{ GNOMEUIINFO_MENU_CLEAR_ITEM, "GNOMEUIINFO_MENU_CLEAR_ITEM", "gtk-clear"},
{ GNOMEUIINFO_MENU_UNDO_ITEM, "GNOMEUIINFO_MENU_UNDO_ITEM", "gtk-undo"},
{ GNOMEUIINFO_MENU_REDO_ITEM, "GNOMEUIINFO_MENU_REDO_ITEM", "gtk-redo"},
{ GNOMEUIINFO_MENU_FIND_ITEM, "GNOMEUIINFO_MENU_FIND_ITEM", "gtk-find"},
{ GNOMEUIINFO_MENU_FIND_AGAIN_ITEM, "GNOMEUIINFO_MENU_FIND_AGAIN_ITEM", NULL},
{ GNOMEUIINFO_MENU_REPLACE_ITEM, "GNOMEUIINFO_MENU_REPLACE_ITEM", "gtk-find-and-replace"},
{ GNOMEUIINFO_MENU_PROPERTIES_ITEM, "GNOMEUIINFO_MENU_PROPERTIES_ITEM", "gtk-properties"},
/* The Settings menu */
{ GNOMEUIINFO_MENU_PREFERENCES_ITEM, "GNOMEUIINFO_MENU_PREFERENCES_ITEM", "gtk-preferences"},
/* The Windows menu */
{ GNOMEUIINFO_MENU_NEW_WINDOW_ITEM, "GNOMEUIINFO_MENU_NEW_WINDOW_ITEM", NULL},
{ GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM, "GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM", NULL},
/* And the "Help" menu */
{ GNOMEUIINFO_MENU_ABOUT_ITEM, "GNOMEUIINFO_MENU_ABOUT_ITEM", "gtk-about"},
/* The "Game" menu */
{ GNOMEUIINFO_MENU_NEW_GAME_ITEM, "GNOMEUIINFO_MENU_NEW_GAME_ITEM", NULL},
{ GNOMEUIINFO_MENU_PAUSE_GAME_ITEM, "GNOMEUIINFO_MENU_PAUSE_GAME_ITEM", NULL},
{ GNOMEUIINFO_MENU_RESTART_GAME_ITEM, "GNOMEUIINFO_MENU_RESTART_GAME_ITEM", NULL},
{ GNOMEUIINFO_MENU_UNDO_MOVE_ITEM, "GNOMEUIINFO_MENU_UNDO_MOVE_ITEM", NULL},
{ GNOMEUIINFO_MENU_REDO_MOVE_ITEM, "GNOMEUIINFO_MENU_REDO_MOVE_ITEM", NULL},
{ GNOMEUIINFO_MENU_HINT_ITEM, "GNOMEUIINFO_MENU_HINT_ITEM", NULL},
{ GNOMEUIINFO_MENU_SCORES_ITEM, "GNOMEUIINFO_MENU_SCORES_ITEM", NULL},
{ GNOMEUIINFO_MENU_END_GAME_ITEM, "GNOMEUIINFO_MENU_END_GAME_ITEM", NULL},
/* Some standard menus */
{ GNOMEUIINFO_MENU_FILE_TREE, "GNOMEUIINFO_MENU_FILE_TREE", NULL},
{ GNOMEUIINFO_MENU_EDIT_TREE, "GNOMEUIINFO_MENU_EDIT_TREE", NULL},
{ GNOMEUIINFO_MENU_VIEW_TREE, "GNOMEUIINFO_MENU_VIEW_TREE", NULL},
{ GNOMEUIINFO_MENU_SETTINGS_TREE, "GNOMEUIINFO_MENU_SETTINGS_TREE", NULL},
{ GNOMEUIINFO_MENU_FILES_TREE, "GNOMEUIINFO_MENU_FILES_TREE", NULL},
{ GNOMEUIINFO_MENU_WINDOWS_TREE, "GNOMEUIINFO_MENU_WINDOWS_TREE", NULL},
{ GNOMEUIINFO_MENU_HELP_TREE, "GNOMEUIINFO_MENU_HELP_TREE", NULL},
{ GNOMEUIINFO_MENU_GAME_TREE, "GNOMEUIINFO_MENU_GAME_TREE", NULL},
{ 0, NULL, NULL }
};
etype = g_enum_register_static ("GladeGtkGnomeUIInfo", values);
}
return etype;
}
GParamSpec * GLADEGTK_API
glade_gtk_gnome_ui_info_spec (void)
{
return g_param_spec_enum ("gnomeuiinfo", _("GnomeUIInfo"),
_("Chose the GnomeUIInfo stock item"),
glade_gtk_gnome_ui_info_get_type (),
0, G_PARAM_READWRITE);
}
void GLADEGTK_API
glade_gtk_menu_item_set_stock_item (GObject *object, GValue *value)
{
GladeWidget *gitem, *gimage;
GEnumClass *eclass;
GEnumValue *eval;
gint val;
gchar *label, *icon;
GObject *image;
gboolean is_image_item;
g_return_if_fail (GTK_IS_MENU_ITEM (object));
if ((val = g_value_get_enum (value)) == GNOMEUIINFO_MENU_NONE)
return;
eclass = g_type_class_ref (G_VALUE_TYPE (value));
if ((eval = g_enum_get_value (eclass, val)) == NULL)
{
g_type_class_unref (eclass);
return;
}
g_type_class_unref (eclass);
/* set use-underline */
gitem = glade_widget_get_from_gobject (object);
glade_widget_property_set (gitem, "use-underline", TRUE);
is_image_item = GTK_IS_IMAGE_MENU_ITEM (object);
/* If tts a GtkImageMenuItem */
if (is_image_item && eval->value_nick)
{
glade_widget_property_set (gitem, "use-stock", TRUE);
glade_widget_property_set (gitem, "label", eval->value_nick);
return;
}
icon = NULL;
switch (val)
{
case GNOMEUIINFO_MENU_PRINT_SETUP_ITEM:
icon = "gtk-print";
label = _("Print S_etup");
break;
case GNOMEUIINFO_MENU_FIND_AGAIN_ITEM:
icon = "gtk-find";
label = _("Find Ne_xt");
break;
case GNOMEUIINFO_MENU_UNDO_MOVE_ITEM:
icon = "gtk-undo";
label = _("_Undo Move");
break;
case GNOMEUIINFO_MENU_REDO_MOVE_ITEM:
icon = "gtk-redo";
label = _("_Redo Move");
break;
case GNOMEUIINFO_MENU_SELECT_ALL_ITEM:
label = _("Select _All");
break;
case GNOMEUIINFO_MENU_NEW_GAME_ITEM:
label = _("_New Game");
break;
case GNOMEUIINFO_MENU_PAUSE_GAME_ITEM:
label = _("_Pause game");
break;
case GNOMEUIINFO_MENU_RESTART_GAME_ITEM:
label = _("_Restart Game");
break;
case GNOMEUIINFO_MENU_HINT_ITEM:
label = _("_Hint");
break;
case GNOMEUIINFO_MENU_SCORES_ITEM:
label = _("_Scores...");
break;
case GNOMEUIINFO_MENU_END_GAME_ITEM:
label = _("_End Game");
break;
case GNOMEUIINFO_MENU_NEW_WINDOW_ITEM:
label = _("Create New _Window");
break;
case GNOMEUIINFO_MENU_CLOSE_WINDOW_ITEM:
label = _("_Close This Window");
break;
case GNOMEUIINFO_MENU_FILE_TREE:
label = _("_File");
break;
case GNOMEUIINFO_MENU_EDIT_TREE:
label = _("_Edit");
break;
case GNOMEUIINFO_MENU_VIEW_TREE:
label = _("_View");
break;
case GNOMEUIINFO_MENU_SETTINGS_TREE:
label = _("_Settings");
break;
case GNOMEUIINFO_MENU_FILES_TREE:
label = _("Fi_les");
break;
case GNOMEUIINFO_MENU_WINDOWS_TREE:
label = _("_Windows");
break;
case GNOMEUIINFO_MENU_HELP_TREE:
label = _("_Help");
break;
case GNOMEUIINFO_MENU_GAME_TREE:
label = _("_Game");
break;
default:
return;
break;
}
if (is_image_item && icon)
{
eclass = g_type_class_ref (GLADE_TYPE_STOCK);
eval = g_enum_get_value_by_nick (eclass, icon);
g_type_class_unref (eclass);
glade_gtk_image_menu_item_get_internal_child (object, "image", &image);
gimage = glade_widget_get_from_gobject (image);
glade_widget_property_set (gimage, "icon-size", GTK_ICON_SIZE_MENU);
glade_widget_property_set (gimage, "glade-stock", eval->value);
}
glade_widget_property_set (gitem, "label", label);
}

30
src/glade-gtk.h Normal file
View File

@ -0,0 +1,30 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef __GLADE_GTK_H__
#define __GLADE_GTK_H__
#include "glade.h"
#ifdef G_OS_WIN32
#define GLADEGTK_API __declspec(dllexport)
#else
#define GLADEGTK_API
#endif
/* Types */
typedef enum {
GLADEGTK_IMAGE_FILENAME = 0,
GLADEGTK_IMAGE_STOCK,
GLADEGTK_IMAGE_ICONTHEME
} GladeGtkImageType;
typedef enum {
GLADEGTK_BUTTON_LABEL = 0,
GLADEGTK_BUTTON_STOCK,
GLADEGTK_BUTTON_CONTAINER
} GladeGtkButtonType;
GType GLADEGTK_API glade_gtk_image_type_get_type (void);
GType GLADEGTK_API glade_gtk_button_type_get_type (void);
#endif /* __GLADE_GTK_H__ */

View File

@ -1511,6 +1511,8 @@ glade_project_resource_fullpath (GladeProject *project,
g_return_val_if_fail (GLADE_IS_PROJECT (project), NULL);
if (project->path == NULL) return g_strdup (resource);
project_dir = g_path_get_dirname (project->path);
fullpath = g_build_filename (project_dir, resource, NULL);
g_free (project_dir);

View File

@ -460,6 +460,25 @@ glade_property_class_make_string_from_gvalue (GladePropertyClass *property_class
string = glade_property_class_make_string_from_flags
(property_class, flags, FALSE);
}
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (property_class->pspec))
{
GValueArray *value_array = g_value_get_boxed (value);
if (value_array && value_array->n_values &&
G_VALUE_HOLDS (&value_array->values [0], G_TYPE_STRING))
{
gint i, n_values = value_array->n_values;
GString *gstring = g_string_new (NULL);
for (i = 0; i < n_values; i++)
{
g_string_append (gstring, g_value_get_string (&value_array->values [i]));
g_string_append_c (gstring, '\n');
}
string = gstring->str;
g_string_free (gstring, FALSE);
}
}
else if (G_IS_PARAM_SPEC_BOXED(property_class->pspec))
{
if (property_class->pspec->value_type == GDK_TYPE_COLOR)
@ -738,6 +757,23 @@ glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class
(property_class->pspec->value_type, string);
g_value_set_flags (value, flags);
}
else if (G_IS_PARAM_SPEC_VALUE_ARRAY (property_class->pspec))
{
GValueArray *value_array = g_value_array_new (0);;
GValue str_value = {0, };
gint i;
g_value_init (&str_value, G_TYPE_STRING);
strv = g_strsplit (string, "\n", 0);
for (i = 0; strv[i]; i++)
{
g_value_set_static_string (&str_value, strv[i]);
value_array = g_value_array_append (value_array, &str_value);
}
g_value_set_boxed (value, value_array);
g_strfreev (strv);
}
else if (G_IS_PARAM_SPEC_BOXED(property_class->pspec))
{
if (property_class->pspec->value_type == GDK_TYPE_COLOR)

View File

@ -4,8 +4,13 @@ CLEANFILES = gtk+.xml
catalogsdir = $(glade_catalogsdir)
catalogs_DATA = \
gtk+.xml
catalogs_DATA = gtk+.xml
if BUILD_GNOME
GNOME_CATALOGS = bonobo.xml canvas.xml gnome.xml
CLEANFILES += $(GNOME_CATALOGS)
catalogs_DATA += $(GNOME_CATALOGS)
endif
EXTRA_DIST = \
$(catalogs_DATA)

79
widgets/bonobo.xml.in Normal file
View File

@ -0,0 +1,79 @@
<glade-catalog name="bonobo" library="gladegnome" domain="glade-3">
<glade-widget-classes>
<glade-widget-class name="BonoboDock" generic-name="bonobodock" title="Bonobo Dock">
<properties>
<property id="allow-floating" name="Allow Floating">
<tooltip>If floating dock iteam are allowed</tooltip>
<spec>glade_standard_boolean_spec</spec>
<set-function>glade_gnome_bonobodock_set_allow_floating</set-function>
</property>
</properties>
<children>
<child>
<type>BonoboDockItem</type>
<add-child-function>glade_gnome_bonobodock_add_item</add-child-function>
<get-children-function>glade_gnome_bonobodock_get_children</get-children-function>
<child-set-property-function>glade_gnome_bonobodock_set_child_property</child-set-property-function>
<child-get-property-function>glade_gnome_bonobodock_get_child_property</child-get-property-function>
<properties>
<property id="placement">
<spec>glade_gnome_bonobo_dock_placement_spec</spec>
<displayable-values>
<value id="BONOBO_DOCK_LEFT" _name="Left"/>
<value id="BONOBO_DOCK_RIGHT" _name="Right"/>
<value id="BONOBO_DOCK_TOP" _name="Top"/>
<value id="BONOBO_DOCK_BOTTOM" _name="Bottom"/>
<value id="BONOBO_DOCK_FLOATING" _name="Floating"/>
</displayable-values>
</property>
<property id="band" name="Band">
<spec>glade_standard_int_spec</spec>
</property>
<property id="position" name="Position">
<spec>glade_standard_int_spec</spec>
</property>
<property id="offset" name="Offset">
<spec>glade_standard_int_spec</spec>
</property>
<property id="behavior">
<spec>glade_gnome_bonobo_dock_item_behavior_spec</spec>
<displayable-values>
<value id="BONOBO_DOCK_ITEM_BEH_EXCLUSIVE" _name="Exclusive"/>
<value id="BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING" _name="Never Floating"/>
<value id="BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL" _name="Never Vertical"/>
<value id="BONOBO_DOCK_ITEM_BEH_NEVER_HORIZONTAL" _name="Never Horizontal"/>
<value id="BONOBO_DOCK_ITEM_BEH_LOCKED" _name="Locked"/>
</displayable-values>
</property>
</properties>
</child>
<child>
<type>GtkWidget</type>
<add-child-function>glade_gnome_bonobodock_add_client_area</add-child-function>
<get-children-function>glade_gnome_bonobodock_get_client_area</get-children-function>
<replace-child-function>glade_gnome_bonobodock_replace_client_area</replace-child-function>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="BonoboDockItem" generic-name="bonobodockitem" title="Bonobo Dock Item">
<post-create-function>glade_gnome_bonobodockitem_post_create</post-create-function>
<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-classes>
</glade-catalog>

88
widgets/canvas.xml.in Normal file
View File

@ -0,0 +1,88 @@
<glade-catalog name="canvas" library="gladegnome" depends="gnome" domain="glade-3">
<glade-widget-classes>
<glade-widget-class name="GnomeCanvas" generic-name="gnomecanvas" title="Gnome Canvas">
<properties>
<property id="scroll-x1" _name="Min X">
<_tooltip>The minimum x coordinate</_tooltip>
<spec>glade_standard_float_spec</spec>
<set-function>glade_gnome_canvas_set_coordinate_x1</set-function>
</property>
<property id="scroll-y1" _name="Min Y">
<_tooltip>The minimum y coordinate</_tooltip>
<spec>glade_standard_float_spec</spec>
<set-function>glade_gnome_canvas_set_coordinate_y1</set-function>
</property>
<property id="scroll-x2" _name="Max X">
<_tooltip>The maximum x coordinate</_tooltip>
<spec>glade_standard_float_spec</spec>
<set-function>glade_gnome_canvas_set_coordinate_x2</set-function>
</property>
<property id="scroll-y2" _name="Max Y">
<_tooltip>The maximum y coordinate</_tooltip>
<spec>glade_standard_float_spec</spec>
<set-function>glade_gnome_canvas_set_coordinate_y2</set-function>
</property>
<property id="pixels-per-unit" _name="Min X">
<_tooltip>The number of pixels corresponding to one unit</_tooltip>
<spec>glade_standard_float_spec</spec>
<set-function>glade_gnome_canvas_set_pixels</set-function>
</property>
</properties>
</glade-widget-class>
<!-- This is deprecated -->
<glade-widget-class name="GnomeIconList" generic-name="gnomeiconlist" title="Gnome Icon List">
<post-create-function>glade_gnome_icon_list_post_create</post-create-function>
<properties>
<property id="scroll-x1" disabled="True"/>
<property id="scroll-y1" disabled="True"/>
<property id="scroll-x2" disabled="True"/>
<property id="scroll-y2" disabled="True"/>
<property id="pixels-per-unit" disabled="True"/>
<property id="selection_mode" _name="Selection Mode">
<_tooltip>The selection mode</_tooltip>
<spec>glade_gnome_icon_list_selection_mode_spec</spec>
<set-function>glade_gnome_icon_list_set_selection_mode</set-function>
<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>
<spec>glade_standard_int_spec</spec>
<set-function>glade_gnome_icon_list_set_icon_width</set-function>
</property>
<property id="row_spacing" _name="Row Spacing" default="4">
<_tooltip>The number of pixels between rows of icon</_tooltip>
<spec>glade_standard_int_spec</spec>
<set-function>glade_gnome_icon_list_set_row_spacing</set-function>
</property>
<property id="column_spacing" _name="Column Spacing" default="2">
<_tooltip>The number of pixels between columns of icon</_tooltip>
<spec>glade_standard_int_spec</spec>
<set-function>glade_gnome_icon_list_set_column_spacing</set-function>
</property>
<property id="text_spacing" _name="Text Spacing" default="2">
<_tooltip>The number of pixels between the text and the icon</_tooltip>
<spec>glade_standard_int_spec</spec>
<set-function>glade_gnome_icon_list_set_text_spacing</set-function>
</property>
<property id="text_editable" _name="Text Editable">
<_tooltip>If the icon text can be edited by the user</_tooltip>
<spec>glade_standard_boolean_spec</spec>
</property>
<property id="text_static" _name="Text Static">
<_tooltip>If the icon text is static, in which case it will not be copied by the GnomeIconList</_tooltip>
<spec>glade_standard_boolean_spec</spec>
</property>
</properties>
</glade-widget-class>
</glade-widget-classes>
<glade-widget-group name="gnome-canvas" _title="GNOME Canvas">
<glade-widget-class-ref name="GnomeCanvas"/>
<glade-widget-class-ref name="GnomeIconList"/>
</glade-widget-group>
</glade-catalog>

443
widgets/gnome.xml.in Normal file
View File

@ -0,0 +1,443 @@
<glade-catalog name="gnome" library="gladegnome" depends="gtk+" domain="glade-3">
<init-function>glade_gnomeui_init</init-function>
<glade-widget-classes>
<glade-widget-class name="GnomeApp" generic-name="gnomeapp" title="Gnome App">
<post-create-function>glade_gnome_app_post_create</post-create-function>
<get-internal-child-function>glade_gnome_app_get_internal_child</get-internal-child-function>
<properties>
<property id="has-statusbar" _name="StatusBar" save="False">
<tooltip>If the window has a statusbar</tooltip>
<spec>glade_standard_boolean_spec</spec>
<set-function>glade_gnome_app_set_has_statusbar</set-function>
</property>
<property id="enable-layout-config" _name="Store Config">
<tooltip>If the layout is saved and restored automatically</tooltip>
<spec>glade_standard_boolean_spec</spec>
</property>
</properties>
<children>
<child>
<type>GtkWidget</type>
<get-children-function>glade_gnome_app_get_children</get-children-function>
<child-set-property-function>glade_gnome_app_set_child_property</child-set-property-function>
<child-get-property-function>glade_gnome_app_get_child_property</child-get-property-function>
<properties>
<property id="position" _name="Position">
<spec>glade_standard_int_spec</spec>
</property>
<property id="padding" _name="Padding">
<spec>glade_standard_int_spec</spec>
</property>
<property id="expand" _name="Expand">
<spec>glade_standard_boolean_spec</spec>
</property>
<property id="fill" _name="Fill">
<spec>glade_standard_boolean_spec</spec>
</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>
</properties>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeDruid" generic-name="gnomedruid" title="Gnome Druid">
<post-create-function>glade_gnome_druid_post_create</post-create-function>
<children>
<child>
<type>GnomeDruidPage</type>
<add-child-function>glade_gnome_druid_add_child</add-child-function>
<remove-child-function>glade_gnome_druid_remove_child</remove-child-function>
<child-set-property-function>glade_gnome_druid_set_child_property</child-set-property-function>
<child-get-property-function>glade_gnome_druid_get_child_property</child-get-property-function>
<properties>
<property id="position" _name="Position" default="-1" save="False">
<spec>glade_standard_int_spec</spec>
</property>
</properties>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeDruidPageEdge" generic-name="gnomedruidpageedge" title="Gnome Druid Page Edge">
<properties>
<property id="position" _name="Position">
<spec>glade_gnome_dpe_position_spec</spec>
<_tooltip>Used to pass around information about the position of a GnomeDruidPage within the overall GnomeDruid. This enables the correct "surrounding" content for the page to be drawn</_tooltip>
<set-function>glade_gnome_dpe_set_position</set-function>
<displayable-values>
<value id="GNOME_EDGE_START" _name="Start"/>
<value id="GNOME_EDGE_FINISH" _name="End"/>
<value id="GNOME_EDGE_OTHER" _name="Other"/>
</displayable-values>
</property>
<property id="title" _name="Title">
<spec>glade_standard_string_spec</spec>
<set-function>glade_gnome_dpe_set_title</set-function>
</property>
<property id="text" _name="Text">
<spec>glade_standard_string_spec</spec>
<set-function>glade_gnome_dpe_set_text</set-function>
</property>
<property id="title-foreground" _name="Title Foreground Color" default="#FFFFFF">
<spec>glade_standard_gdkcolor_spec</spec>
<set-function>glade_gnome_dpe_set_title_foreground</set-function>
</property>
<property id="text-foreground" _name="Text Foreground Color" default="#000000">
<spec>glade_standard_gdkcolor_spec</spec>
<set-function>glade_gnome_dpe_set_text_foreground</set-function>
</property>
<property id="background" _name="Background Color" default="#4B6983">
<spec>glade_standard_gdkcolor_spec</spec>
<set-function>glade_gnome_dpe_set_background</set-function>
</property>
<property id="contents-background" _name="Contents Background Color" default="#DCDAD5">
<spec>glade_standard_gdkcolor_spec</spec>
<set-function>glade_gnome_dpe_set_contents_background</set-function>
</property>
<property id="logo-background" _name="Logo Background Color" default="#4B6983">
<spec>glade_standard_gdkcolor_spec</spec>
<set-function>glade_gnome_dpe_set_logo_background</set-function>
</property>
<property id="logo" _name="Logo">
<spec>glade_standard_pixbuf_spec</spec>
<set-function>glade_gnome_dpe_set_logo</set-function>
</property>
<property id="watermark" _name="Watermark">
<spec>glade_standard_pixbuf_spec</spec>
<set-function>glade_gnome_dpe_set_watermark</set-function>
</property>
<property id="top-watermark" _name="Top Watermark">
<spec>glade_standard_pixbuf_spec</spec>
<set-function>glade_gnome_dpe_set_top_watermark</set-function>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GnomeDruidPageStandard" generic-name="gnomedruidpagestandard" title="Gnome Druid Page Standard">
<post-create-function>glade_gnome_dps_post_create</post-create-function>
<get-internal-child-function>glade_gnome_dps_get_internal_child</get-internal-child-function>
<properties>
<property id="background-set" disabled="True"/>
<property id="background" visible="False" save="False" default="#4B6983">
<set-function>glade_gnome_dps_set_background</set-function>
</property>
<property id="contents-background-set" disabled="True"/>
<property id="contents-background" visible="False" save="False" default="#DCDAD5">
<set-function>glade_gnome_dps_set_contents_background</set-function>
</property>
<property id="logo-background-set" disabled="True"/>
<property id="logo-background" visible="False" save="False" default="#4B6983">
<set-function>glade_gnome_dps_set_logo_background</set-function>
</property>
<property id="title-foreground-set" disabled="True"/>
<property id="title-foreground" visible="False" save="False" default="#FFFFFF">
<set-function>glade_gnome_dps_set_title_foreground</set-function>
</property>
</properties>
<children>
<child>
<type>GtkWidget</type>
<get-children-function>glade_gnome_dps_get_children</get-children-function>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeIconSelection" generic-name="gnomeiconselection" title="Gnome Icon Selection">
<properties>
<property id="size" visible="False" query="False" ignore="True"/>
</properties>
</glade-widget-class>
<glade-widget-class name="GnomeIconEntry" generic-name="gnomeiconentry" title="Gnome Icon Entry">
<properties>
<property id="max-saved" _name="Max Saved">
<spec>glade_standard_uint_spec</spec>
<tooltip>The maximum number of history entries saved.</tooltip>
<set-function>glade_gnome_icon_entry_set_max</set-function>
</property>
<property id="size" visible="False" query="False" ignore="True"/>
</properties>
</glade-widget-class>
<glade-widget-class name="GnomeHRef" generic-name="gnomehref" title="Gnome HRef"/>
<glade-widget-class name="GnomeDateEdit" generic-name="gnomedateedit" title="Gnome Date Edit">
<properties>
<property id="time" disabled="True"/>
<property id="size" visible="False" query="False" ignore="True"/>
<property id="dateedit-flags">
<displayable-values>
<value id="GNOME_DATE_EDIT_SHOW_TIME" _name="Show Time"/>
<value id="GNOME_DATE_EDIT_24_HR" _name="24 Hours Format"/>
<value id="GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY" _name="Monday First"/>
</displayable-values>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GnomeAppBar" generic-name="gnomeappbar" title="Gnome App Bar">
<post-create-function>glade_gnome_app_bar_post_create</post-create-function>
<properties>
<property id="has-progress" default="True" ignore="True"/>
<property id="has-status" default="True" ignore="True"/>
<property id="size" visible="False" query="False" ignore="True"/>
<property id="interactivity">
<displayable-values>
<value id="GNOME_PREFERENCES_NEVER" _name="Never"/>
<value id="GNOME_PREFERENCES_USER" _name="User"/>
<value id="GNOME_PREFERENCES_ALWAYS" _name="Always"/>
</displayable-values>
</property>
</properties>
</glade-widget-class>
<!-- Deprecated Widget Classes :) -->
<glade-widget-class name="GnomeDialog" generic-name="gnomedialog" title="Gnome Dialog">
<post-create-function>glade_gnome_dialog_post_create</post-create-function>
<get-internal-child-function>glade_gnome_dialog_get_internal_child</get-internal-child-function>
<children>
<child>
<type>GtkWidget</type>
<get-children-function>glade_gnome_dialog_get_children</get-children-function>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeAbout" generic-name="gnomeabout" title="Gnome About">
<post-create-function>glade_gnome_about_dialog_post_create</post-create-function>
<properties>
<property id="name" _name="Program Name">
<set-function>glade_gnome_about_set_name</set-function>
</property>
<property id="version" _name="Program Version">
<set-function>glade_gnome_about_set_version</set-function>
</property>
<property id="comments" translatable="True">
<visible-lines>4</visible-lines>
</property>
<property id="copyright" translatable="True">
<visible-lines>4</visible-lines>
</property>
<property id="translator-credits" translatable="True">
<visible-lines>4</visible-lines>
</property>
</properties>
<children>
<child>
<type>GtkWidget</type> <!-- Skip GtkDialog internal widgets -->
<get-children-function>glade_gnome_about_dialog_get_children</get-children-function>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeMessageBox" generic-name="gnomemessagebox" title="Gnome Message Box">
<properties>
<property id="message-box-type">
<spec>glade_gnome_message_box_type_spec</spec>
<set-function>glade_gnome_message_box_set_type</set-function>
<displayable-values>
<value id="GNOME_MESSAGE_BOX_INFO" _name="Information"/>
<value id="GNOME_MESSAGE_BOX_WARNING" _name="Warning"/>
<value id="GNOME_MESSAGE_BOX_ERROR" _name="Error"/>
<value id="GNOME_MESSAGE_BOX_QUESTION" _name="Question"/>
<value id="GNOME_MESSAGE_BOX_GENERIC" _name="Generic"/>
</displayable-values>
</property>
<property id="message" _name="Message">
<spec>glade_standard_string_spec</spec>
<tooltip>The message to display</tooltip>
<set-function>glade_gnome_message_box_set_message</set-function>
</property>
</properties>
</glade-widget-class>
<glade-widget-class name="GnomePropertyBox" generic-name="gnomepropertybox" title="Gnome Property Box"/>
<glade-widget-class name="GnomeEntry" generic-name="gnomeentry" title="Gnome Entry">
<post-create-function>glade_gnome_entry_post_create</post-create-function>
<get-internal-child-function>glade_gnome_entry_get_internal_child</get-internal-child-function>
<properties>
<property id="gtk-entry" disabled="True"/>
<property id="max-saved" _name="Max Saved">
<spec>glade_standard_int_spec</spec>
<_tooltip>The maximum number of history entries saved</_tooltip>
<set-function>glade_gnome_entry_set_max_saved</set-function>
</property>
<property id="size" visible="False" query="False" ignore="True"/>
</properties>
<children>
<child>
<type>GtkWidget</type>
<get-children-function>glade_gnome_entry_get_children</get-children-function>
<properties>
<property id="expand" disabled="True"/>
<property id="fill" disabled="True"/>
<property id="pack-type" disabled="True"/>
<property id="padding" disabled="True"/>
<property id="position" disabled="True"/>
</properties>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeFileEntry" generic-name="gnomefileentry" title="Gnome File Entry">
<post-create-function>glade_gnome_entry_post_create</post-create-function>
<get-internal-child-function>glade_gnome_entry_get_internal_child</get-internal-child-function>
<properties>
<property id="max-saved" _name="Max Saved">
<spec>glade_standard_int_spec</spec>
<_tooltip>The maximum number of history entries saved</_tooltip>
<set-function>glade_gnome_entry_set_max_saved</set-function>
</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>
<children>
<child>
<type>GtkWidget</type>
<get-children-function>glade_gnome_entry_get_children</get-children-function>
<properties>
<property id="expand" disabled="True"/>
<property id="fill" disabled="True"/>
<property id="pack-type" disabled="True"/>
<property id="padding" disabled="True"/>
<property id="position" disabled="True"/>
</properties>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomePixmapEntry" generic-name="gnomepixmapentry" title="Gnome Pixmap Entry">
<children>
<child>
<type>GtkWidget</type>
<properties>
<property id="expand" disabled="True"/>
<property id="fill" disabled="True"/>
<property id="pack-type" disabled="True"/>
<property id="padding" disabled="True"/>
<property id="position" disabled="True"/>
</properties>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomeColorPicker" generic-name="gnomecolorpicker" title="Gnome Color Picker">
<post-create-function>empty</post-create-function>
<properties>
<property id="use-underline" disabled="True"/>
<property id="label" disabled="True"/>
<property id="glade-type" disabled="True"/>
<property id="stock" disabled="True"/>
<property id="red" disabled="True"/>
<property id="green" disabled="True"/>
<property id="blue" disabled="True"/>
<property id="alpha" disabled="True"/>
<property id="dither" _name="Dither"/>
<property id="use-alpha" _name="Use Alpha"/>
<property id="title" _name="Title"/>
</properties>
</glade-widget-class>
<glade-widget-class name="GnomeFontPicker" generic-name="gnomefontpicker" title="Gnome Font Picker">
<post-create-function>empty</post-create-function>
<properties>
<property id="use-underline" disabled="True"/>
<property id="label" disabled="True"/>
<property id="glade-type" disabled="True"/>
<property id="stock" disabled="True"/>
<property id="font-name" disabled="True"/>
<property id="mode">
<set-function>glade_gnome_font_picker_set_mode</set-function>
<displayable-values>
<value id="GNOME_FONT_PICKER_MODE_PIXMAP" _name="Pixmap"/>
<value id="GNOME_FONT_PICKER_MODE_FONT_INFO" _name="Font Information"/>
<value id="GNOME_FONT_PICKER_MODE_USER_WIDGET" _name="User Widget"/>
<value id="GNOME_FONT_PICKER_MODE_UNKNOWN" _name="Unknown"/>
</displayable-values>
</property>
</properties>
<children>
<child>
<type>GtkWidget</type>
<get-children-function>glade_gnome_font_picker_get_children</get-children-function>
<add-child-function>glade_gnome_font_picker_add_child</add-child-function>
<remove-child-function>glade_gnome_font_picker_remove_child</remove-child-function>
<replace-child-function>glade_gnome_font_picker_replace_child</replace-child-function>
</child>
</children>
</glade-widget-class>
<glade-widget-class name="GnomePixmap" generic-name="gnomepixmap" title="Gnome Pixmap">
<post-create-function>empty</post-create-function>
<properties>
<property id="stock" disabled="True"/>
<property id="icon-name" disabled="True"/>
<property id="glade-stock" disabled="True"/>
<property id="glade-type" disabled="True"/>
<property id="pixbuf" disabled="True"/>
<property id="icon-size" disabled="True"/>
<property id="pixel-size" disabled="True"/>
<property id="filename" _name="File">
<spec>glade_standard_pixbuf_spec</spec>
<_tooltip>The pixmap file</_tooltip>
<set-function>glade_gnome_pixmap_set_filename</set-function>
</property>
<property id="scaled-width" _name="Scaled Width">
<spec>glade_standard_int_spec</spec>
<_tooltip>The width to scale the pixmap to</_tooltip>
<set-function>glade_gnome_pixmap_set_scaled_width</set-function>
</property>
<property id="scaled-height" _name="Scaled Height">
<spec>glade_standard_int_spec</spec>
<_tooltip>The height to scale the pixmap to</_tooltip>
<set-function>glade_gnome_pixmap_set_scaled_height</set-function>
</property>
</properties>
</glade-widget-class>
<!-- Unsupported Classes
Deprecated and not suported by libglade:
* GnomeScores
These are not widget classes:
* GnomeClient
* GnomeMdi, GnomeMdiChild, GnomeMdiGenericChild
* GnomeCanvasItem, GnomeIconTextItem -->
</glade-widget-classes>
<glade-widget-group name="gnomeui-base" _title="GNOME User Interface">
<glade-widget-class-ref name="GnomeApp"/>
<glade-widget-class-ref name="GnomeDruid"/>
<glade-widget-class-ref name="GnomeIconSelection"/>
<glade-widget-class-ref name="GnomeHRef"/>
<glade-widget-class-ref name="GnomeDateEdit"/>
<glade-widget-class-ref name="GnomeIconEntry"/>
<glade-widget-class-ref name="GnomeAppBar"/>
</glade-widget-group>
<glade-widget-group name="gnomeui-obsolete" _title="GNOME UI Obsolete">
<glade-widget-class-ref name="GnomeDialog"/>
<glade-widget-class-ref name="GnomeAbout"/>
<glade-widget-class-ref name="GnomeMessageBox"/>
<glade-widget-class-ref name="GnomePropertyBox"/>
<glade-widget-class-ref name="GnomeEntry"/>
<glade-widget-class-ref name="GnomeFileEntry"/>
<glade-widget-class-ref name="GnomePixmapEntry"/>
<glade-widget-class-ref name="GnomeColorPicker"/>
<glade-widget-class-ref name="GnomeFontPicker"/>
<glade-widget-class-ref name="GnomePixmap"/>
</glade-widget-group>
</glade-catalog>

View File

@ -96,6 +96,7 @@
<glade-widget-class name="GtkBox" _title="Box">
<post-create-function>empty</post-create-function>
<get-internal-child-function>glade_gtk_box_get_internal_child</get-internal-child-function>
<properties>
<property id="size" _name="Number of items" query="True" default="3" save="False">
<spec>glade_standard_int_spec</spec>
@ -225,6 +226,15 @@
<spec>glade_standard_string_spec</spec>
<visible-lines>2</visible-lines>
</property>
<!--
This property is added by glade2 gnome support and makes reference to
GNOMEUIINFO_MENU_* macros. This set-function maps these properties to
existing non deprecated gtk ones
-->
<property id="stock-item" visible="False" save="False">
<spec>glade_gtk_gnome_ui_info_spec</spec>
<set-function>glade_gtk_menu_item_set_stock_item</set-function>
</property>
</properties>
<children>
<child>
@ -911,6 +921,10 @@
<glade-widget-class name="GtkLayout" generic-name="layout" _title="Layout">
<post-create-function>glade_gtk_fixed_layout_post_create</post-create-function>
<properties>
<property id="hadjustment" disabled="True"/>
<property id="vadjustment" disabled="True"/>
</properties>
</glade-widget-class>
<glade-widget-class name="GtkFixed" generic-name="fixed" _title="Fixed">