mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-12-06 00:02:41 -05:00
Bumping gtk+ required version to 2.14
* configure.ac: Bumping gtk+ required version to 2.14 * gladeui/glade-xml-utils.c, gladeui/glade-widget-adaptor.[ch], gladeui/glade-property-class.[ch], gladeui/glade-project.c: Added support for "builder-since" versioning (since builder supported this property/widget). * plugins/gtk+/gtk+.xml.in: Marked appropriate properties and objects "builder-since" and brought up to date new properties and signals introduced in 2.14. * gladeui/glade-base-editor.c: Plugged resource leak in finalize(). svn path=/trunk/; revision=2060
This commit is contained in:
parent
a2a5cd045b
commit
0c97337671
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2008-12-09 Tristan Van Berkom <tvb@gnome.org>
|
||||
|
||||
* configure.ac: Bumping gtk+ required version to 2.14
|
||||
|
||||
* gladeui/glade-xml-utils.c, gladeui/glade-widget-adaptor.[ch],
|
||||
gladeui/glade-property-class.[ch], gladeui/glade-project.c: Added support
|
||||
for "builder-since" versioning (since builder supported this property/widget).
|
||||
|
||||
* plugins/gtk+/gtk+.xml.in: Marked appropriate properties and objects "builder-since"
|
||||
and brought up to date new properties and signals introduced in 2.14.
|
||||
|
||||
* gladeui/glade-base-editor.c: Plugged resource leak in finalize().
|
||||
|
||||
2008-11-28 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||
|
||||
* gladeui/glade-inspector.c: added explanation string in the search entry.
|
||||
|
||||
@ -116,7 +116,7 @@ GTK_DOC_CHECK(1.9)
|
||||
dnl ================================================================
|
||||
dnl Check for gtk+
|
||||
dnl ================================================================
|
||||
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0 gthread-2.0 libxml-2.0 >= 2.4.0])
|
||||
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.14.0 gthread-2.0 libxml-2.0 >= 2.4.0])
|
||||
AC_SUBST(GTK_LIBS)
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
|
||||
|
||||
@ -113,6 +113,24 @@ static void glade_base_editor_set_container (GladeBaseEditor *editor,
|
||||
static void glade_base_editor_block_callbacks (GladeBaseEditor *editor,
|
||||
gboolean block);
|
||||
|
||||
|
||||
static void
|
||||
reset_child_types (GladeBaseEditor *editor)
|
||||
{
|
||||
GList *l;
|
||||
ChildTypeTab *tab;
|
||||
|
||||
for (l = editor->priv->child_types; l; l = l->next)
|
||||
{
|
||||
tab = l->data;
|
||||
g_object_unref (tab->children);
|
||||
g_free (tab);
|
||||
}
|
||||
g_list_free (editor->priv->child_types);
|
||||
editor->priv->child_types = NULL;
|
||||
}
|
||||
|
||||
|
||||
static gint
|
||||
sort_type_by_hierarchy (ChildTypeTab *a, ChildTypeTab *b)
|
||||
{
|
||||
@ -1153,7 +1171,7 @@ glade_base_editor_set_container (GladeBaseEditor *editor,
|
||||
|
||||
if (container == NULL)
|
||||
{
|
||||
/* XXX Destroy childtypetabs ...*/
|
||||
reset_child_types (editor);
|
||||
|
||||
e->gcontainer = NULL;
|
||||
e->project = NULL;
|
||||
@ -1203,14 +1221,13 @@ glade_base_editor_set_container (GladeBaseEditor *editor,
|
||||
}
|
||||
|
||||
/*************************** GladeBaseEditor Class ****************************/
|
||||
|
||||
static void
|
||||
glade_base_editor_finalize (GObject *object)
|
||||
{
|
||||
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
|
||||
|
||||
/* XXX Free up ChildTypeTabs here... */
|
||||
|
||||
reset_child_types (cobj);
|
||||
|
||||
/* Free private members, etc. */
|
||||
glade_base_editor_project_disconnect (cobj);
|
||||
|
||||
|
||||
@ -1548,6 +1548,88 @@ glade_project_save (GladeProject *project, const gchar *path, GError **error)
|
||||
/*******************************************************************
|
||||
Verify code here (versioning, incompatability checks)
|
||||
*******************************************************************/
|
||||
|
||||
/* translators: reffers to a widget in toolkit version '%s %d.%d' and a project targeting toolkit version '%s %d.%d' */
|
||||
#define WIDGET_VERSION_CONFLICT_MSGFMT _("This widget was introduced in %s %d.%d while project targets %s %d.%d")
|
||||
|
||||
/* translators: reffers to a widget '[%s]' introduced in toolkit version '%s %d.%d' */
|
||||
#define WIDGET_VERSION_CONFLICT_FMT _("[%s] Object class '%s' was introduced in %s %d.%d\n")
|
||||
|
||||
/* translators: reffers to a widget in toolkit version '%s %d.%d' and a project targeting toolkit version '%s %d.%d' */
|
||||
#define WIDGET_BUILDER_VERSION_CONFLICT_MSGFMT _("This widget was made available in GtkBuilder format in %s %d.%d " \
|
||||
"while project targets %s %d.%d")
|
||||
|
||||
/* translators: reffers to a widget '[%s]' introduced in toolkit version '%s %d.%d' */
|
||||
#define WIDGET_BUILDER_VERSION_CONFLICT_FMT _("[%s] Object class '%s' was made available in GtkBuilder format " \
|
||||
"in %s %d.%d\n")
|
||||
|
||||
#define WIDGET_LIBGLADE_ONLY_MSG _("This widget is only supported in libglade format")
|
||||
|
||||
/* translators: reffers to a widget '[%s]' loaded from toolkit version '%s %d.%d' */
|
||||
#define WIDGET_LIBGLADE_ONLY_FMT _("[%s] Object class '%s' from %s %d.%d " \
|
||||
"is only supported in libglade format\n")
|
||||
|
||||
#define WIDGET_LIBGLADE_UNSUPPORTED_MSG _("This widget is not supported in libglade format")
|
||||
|
||||
/* translators: reffers to a widget '[%s]' loaded from toolkit version '%s %d.%d' */
|
||||
#define WIDGET_LIBGLADE_UNSUPPORTED_FMT _("[%s] Object class '%s' from %s %d.%d " \
|
||||
"is not supported in libglade format\n")
|
||||
|
||||
#define WIDGET_DEPRECATED_MSG _("This widget is deprecated")
|
||||
|
||||
/* translators: reffers to a widget '[%s]' loaded from toolkit version '%s %d.%d' */
|
||||
#define WIDGET_DEPRECATED_FMT _("[%s] Object class '%s' from %s %d.%d is deprecated\n")
|
||||
|
||||
|
||||
/* Defined here for pretty translator comments (bug in intl tools, for some reason
|
||||
* you can only comment about the line directly following, forcing you to write
|
||||
* ugly messy code with comments in line breaks inside function calls).
|
||||
*/
|
||||
#define PROP_LIBGLADE_UNSUPPORTED_MSG _("This property is not supported in libglade format")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' */
|
||||
#define PROP_LIBGLADE_UNSUPPORTED_FMT _("[%s] Property '%s' of object class '%s' is not " \
|
||||
"supported in libglade format\n")
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' */
|
||||
#define PACK_PROP_LIBGLADE_UNSUPPORTED_FMT _("[%s] Packing property '%s' of object class '%s' is not " \
|
||||
"supported in libglade format\n")
|
||||
|
||||
#define PROP_LIBGLADE_ONLY_MSG _("This property is only supported in libglade format")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' */
|
||||
#define PROP_LIBGLADE_ONLY_FMT _("[%s] Property '%s' of object class '%s' is only " \
|
||||
"supported in libglade format\n")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' */
|
||||
#define PACK_PROP_LIBGLADE_ONLY_FMT _("[%s] Packing property '%s' of object class '%s' is only " \
|
||||
"supported in libglade format\n")
|
||||
|
||||
/* translators: reffers to a property in toolkit version '%s %d.%d'
|
||||
* and a project targeting toolkit version '%s %d.%d' */
|
||||
#define PROP_VERSION_CONFLICT_MSGFMT _("This property was introduced in %s %d.%d while project targets %s %d.%d")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' in toolkit version '%s %d.%d' */
|
||||
#define PROP_VERSION_CONFLICT_FMT _("[%s] Property '%s' of object class '%s' was introduced in %s %d.%d\n")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' in toolkit version '%s %d.%d' */
|
||||
#define PACK_PROP_VERSION_CONFLICT_FMT _("[%s] Packing property '%s' of object class '%s' " \
|
||||
"was introduced in %s %d.%d\n")
|
||||
|
||||
/* translators: reffers to a property in toolkit version '%s %d.%d' and a project targeting toolkit version '%s %d.%d' */
|
||||
#define PROP_BUILDER_VERSION_CONFLICT_MSGFMT _("This property was made available in GtkBuilder format in %s %d.%d " \
|
||||
"while project targets %s %d.%d")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' in toolkit version '%s %d.%d' */
|
||||
#define PROP_BUILDER_VERSION_CONFLICT_FMT _("[%s] Property '%s' of object class '%s' was " \
|
||||
"made available in GtkBuilder format in %s %d.%d\n")
|
||||
|
||||
/* translators: reffers to a property '%s' of widget '[%s]' in toolkit version '%s %d.%d' */
|
||||
#define PACK_PROP_BUILDER_VERSION_CONFLICT_FMT _("[%s] Packing property '%s' of object class '%s' " \
|
||||
"was made available in GtkBuilder format in %s %d.%d\n")
|
||||
|
||||
/* translators: reffers to a signal '%s' of widget '[%s]' in toolkit version '%s %d.%d' */
|
||||
#define SIGNAL_VERSION_CONFLICT_FMT _("[%s] Signal '%s' of object class '%s' was introduced in %s %d.%d\n")
|
||||
|
||||
static void
|
||||
glade_project_verify_property (GladeProject *project,
|
||||
GladeProperty *property,
|
||||
@ -1575,40 +1657,30 @@ glade_project_verify_property (GladeProject *project,
|
||||
{
|
||||
if (forwidget)
|
||||
glade_property_set_support_warning
|
||||
(property, TRUE, _("This property is not supported in libglade format"));
|
||||
(property, TRUE, PROP_LIBGLADE_UNSUPPORTED_MSG);
|
||||
else
|
||||
/* translators: reffers to a property '%s' of widget '[%s]'
|
||||
* introduced in toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
property->klass->packing ?
|
||||
_("[%s] Packing property '%s' of object class '%s' is not "
|
||||
"supported in libglade format\n") :
|
||||
_("[%s] Property '%s' of object class '%s' is not "
|
||||
"supported in libglade format\n"),
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title);
|
||||
g_string_append_printf (string,
|
||||
property->klass->packing ?
|
||||
PACK_PROP_LIBGLADE_UNSUPPORTED_FMT :
|
||||
PROP_LIBGLADE_UNSUPPORTED_FMT,
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title);
|
||||
}
|
||||
else if (project->priv->format == GLADE_PROJECT_FORMAT_GTKBUILDER &&
|
||||
property->klass->libglade_only)
|
||||
{
|
||||
if (forwidget)
|
||||
glade_property_set_support_warning
|
||||
(property, TRUE, _("This property is only supported in libglade format"));
|
||||
(property, TRUE, PROP_LIBGLADE_ONLY_MSG);
|
||||
else
|
||||
/* translators: reffers to a property '%s' of widget '[%s]'
|
||||
* introduced in toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
property->klass->packing ?
|
||||
_("[%s] Packing property '%s' of object class '%s' is only "
|
||||
"supported in libglade format\n") :
|
||||
_("[%s] Property '%s' of object class '%s' is only "
|
||||
"supported in libglade format\n"),
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title);
|
||||
g_string_append_printf (string,
|
||||
property->klass->packing ?
|
||||
PACK_PROP_LIBGLADE_ONLY_FMT :
|
||||
PROP_LIBGLADE_ONLY_FMT,
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title);
|
||||
}
|
||||
else if (target_major < property->klass->version_since_major ||
|
||||
(target_major == property->klass->version_since_major &&
|
||||
@ -1616,36 +1688,54 @@ glade_project_verify_property (GladeProject *project,
|
||||
{
|
||||
if (forwidget)
|
||||
{
|
||||
/* translators: reffers to a property introduced in toolkit
|
||||
* version '%s %d.%d' and a project targeting toolkit
|
||||
* version '%s %d.%d' */
|
||||
tooltip = g_strdup_printf
|
||||
(_("This property was introduced in %s %d.%d, "
|
||||
"project targets %s %d.%d"),
|
||||
catalog,
|
||||
property->klass->version_since_major,
|
||||
property->klass->version_since_minor,
|
||||
catalog,
|
||||
target_major, target_minor);
|
||||
|
||||
tooltip = g_strdup_printf (PROP_VERSION_CONFLICT_MSGFMT,
|
||||
catalog,
|
||||
property->klass->version_since_major,
|
||||
property->klass->version_since_minor,
|
||||
catalog,
|
||||
target_major, target_minor);
|
||||
|
||||
glade_property_set_support_warning (property, FALSE, tooltip);
|
||||
g_free (tooltip);
|
||||
}
|
||||
else
|
||||
/* translators: reffers to a property '%s' of widget '[%s]'
|
||||
* introduced in toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
property->klass->packing ?
|
||||
_("[%s] Packing property '%s' of object class '%s' was "
|
||||
"introduced in %s %d.%d\n") :
|
||||
_("[%s] Property '%s' of object class '%s' was "
|
||||
"introduced in %s %d.%d\n"),
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title, catalog,
|
||||
property->klass->version_since_major,
|
||||
property->klass->version_since_minor);
|
||||
g_string_append_printf (string,
|
||||
property->klass->packing ?
|
||||
PACK_PROP_VERSION_CONFLICT_FMT :
|
||||
PROP_VERSION_CONFLICT_FMT,
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title, catalog,
|
||||
property->klass->version_since_major,
|
||||
property->klass->version_since_minor);
|
||||
}
|
||||
else if (project->priv->format == GLADE_PROJECT_FORMAT_GTKBUILDER &&
|
||||
(target_major < property->klass->builder_since_major ||
|
||||
(target_major == property->klass->builder_since_major &&
|
||||
target_minor < property->klass->builder_since_minor)))
|
||||
{
|
||||
if (forwidget)
|
||||
{
|
||||
tooltip = g_strdup_printf (PROP_BUILDER_VERSION_CONFLICT_MSGFMT,
|
||||
catalog,
|
||||
property->klass->builder_since_major,
|
||||
property->klass->builder_since_minor,
|
||||
catalog,
|
||||
target_major, target_minor);
|
||||
|
||||
glade_property_set_support_warning (property, FALSE, tooltip);
|
||||
g_free (tooltip);
|
||||
}
|
||||
else
|
||||
g_string_append_printf (string,
|
||||
property->klass->packing ?
|
||||
PACK_PROP_BUILDER_VERSION_CONFLICT_FMT :
|
||||
PROP_BUILDER_VERSION_CONFLICT_FMT,
|
||||
path_name,
|
||||
property->klass->name,
|
||||
adaptor->title, catalog,
|
||||
property->klass->builder_since_major,
|
||||
property->klass->builder_since_minor);
|
||||
}
|
||||
else if (forwidget)
|
||||
glade_property_set_support_warning (property, FALSE, NULL);
|
||||
@ -1722,18 +1812,14 @@ glade_project_verify_signal (GladeWidget *widget,
|
||||
if (target_major < signal_class->version_since_major ||
|
||||
(target_major == signal_class->version_since_major &&
|
||||
target_minor < signal_class->version_since_minor))
|
||||
/* translators: reffers to a signal '%s' of widget '[%s]'
|
||||
* introduced in toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("[%s] Signal '%s' of object class '%s' was "
|
||||
"introduced in %s %d.%d\n"),
|
||||
path_name,
|
||||
signal->name,
|
||||
signal_class->adaptor->title,
|
||||
catalog,
|
||||
signal_class->version_since_major,
|
||||
signal_class->version_since_minor);
|
||||
g_string_append_printf (string,
|
||||
SIGNAL_VERSION_CONFLICT_FMT,
|
||||
path_name,
|
||||
signal->name,
|
||||
signal_class->adaptor->title,
|
||||
catalog,
|
||||
signal_class->version_since_major,
|
||||
signal_class->version_since_minor);
|
||||
|
||||
g_free (catalog);
|
||||
}
|
||||
@ -1862,7 +1948,7 @@ glade_project_verify_adaptor (GladeProject *project,
|
||||
gint target_major, target_minor;
|
||||
gchar *catalog = NULL;
|
||||
|
||||
for (adaptor_iter = adaptor; adaptor_iter;
|
||||
for (adaptor_iter = adaptor; adaptor_iter && support_mask == GLADE_SUPPORT_OK;
|
||||
adaptor_iter = glade_widget_adaptor_get_parent_adaptor (adaptor_iter))
|
||||
{
|
||||
|
||||
@ -1871,37 +1957,52 @@ glade_project_verify_adaptor (GladeProject *project,
|
||||
&target_major,
|
||||
&target_minor);
|
||||
|
||||
/* Only one versioning message (builder or otherwise)...
|
||||
*/
|
||||
if (target_major < GWA_VERSION_SINCE_MAJOR (adaptor_iter) ||
|
||||
(target_major == GWA_VERSION_SINCE_MAJOR (adaptor_iter) &&
|
||||
target_minor < GWA_VERSION_SINCE_MINOR (adaptor_iter)))
|
||||
{
|
||||
if (forwidget)
|
||||
{
|
||||
/* translators: reffers to a widget
|
||||
* introduced in toolkit version '%s %d.%d',
|
||||
* and a project targeting toolkit verion '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("This widget was introduced in %s %d.%d "
|
||||
"project targets %s %d.%d"),
|
||||
catalog,
|
||||
GWA_VERSION_SINCE_MAJOR (adaptor_iter),
|
||||
GWA_VERSION_SINCE_MINOR (adaptor_iter),
|
||||
catalog, target_major, target_minor);
|
||||
}
|
||||
g_string_append_printf (string,
|
||||
WIDGET_VERSION_CONFLICT_MSGFMT,
|
||||
catalog,
|
||||
GWA_VERSION_SINCE_MAJOR (adaptor_iter),
|
||||
GWA_VERSION_SINCE_MINOR (adaptor_iter),
|
||||
catalog, target_major, target_minor);
|
||||
else
|
||||
/* translators: reffers to a widget '[%s]'
|
||||
* introduced in toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("[%s] Object class '%s' was introduced in %s %d.%d\n"),
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
GWA_VERSION_SINCE_MAJOR (adaptor_iter),
|
||||
GWA_VERSION_SINCE_MINOR (adaptor_iter));
|
||||
g_string_append_printf (string,
|
||||
WIDGET_VERSION_CONFLICT_FMT,
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
GWA_VERSION_SINCE_MAJOR (adaptor_iter),
|
||||
GWA_VERSION_SINCE_MINOR (adaptor_iter));
|
||||
|
||||
support_mask |= GLADE_SUPPORT_MISMATCH;
|
||||
}
|
||||
else if (project->priv->format == GLADE_PROJECT_FORMAT_GTKBUILDER &&
|
||||
(target_major < GWA_BUILDER_SINCE_MAJOR (adaptor_iter) ||
|
||||
(target_major == GWA_BUILDER_SINCE_MAJOR (adaptor_iter) &&
|
||||
target_minor < GWA_BUILDER_SINCE_MINOR (adaptor_iter))))
|
||||
{
|
||||
if (forwidget)
|
||||
g_string_append_printf (string,
|
||||
WIDGET_BUILDER_VERSION_CONFLICT_MSGFMT,
|
||||
catalog,
|
||||
GWA_BUILDER_SINCE_MAJOR (adaptor_iter),
|
||||
GWA_BUILDER_SINCE_MINOR (adaptor_iter),
|
||||
catalog, target_major, target_minor);
|
||||
else
|
||||
g_string_append_printf (string,
|
||||
WIDGET_BUILDER_VERSION_CONFLICT_FMT,
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
GWA_BUILDER_SINCE_MAJOR (adaptor_iter),
|
||||
GWA_BUILDER_SINCE_MINOR (adaptor_iter));
|
||||
|
||||
support_mask |= GLADE_SUPPORT_MISMATCH;
|
||||
}
|
||||
|
||||
/* Now accumulate some more messages...
|
||||
*/
|
||||
if (project->priv->format == GLADE_PROJECT_FORMAT_GTKBUILDER &&
|
||||
GWA_LIBGLADE_ONLY (adaptor_iter))
|
||||
{
|
||||
@ -1909,19 +2010,13 @@ glade_project_verify_adaptor (GladeProject *project,
|
||||
{
|
||||
if (string->len)
|
||||
g_string_append (string, "\n");
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("This widget is only supported in libglade format"));
|
||||
g_string_append_printf (string, WIDGET_LIBGLADE_ONLY_MSG);
|
||||
}
|
||||
else
|
||||
/* translators: reffers to a widget '[%s]'
|
||||
* loaded from toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("[%s] Object class '%s' from %s %d.%d "
|
||||
"is only supported in libglade format\n"),
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
target_major, target_minor);
|
||||
g_string_append_printf (string,
|
||||
WIDGET_LIBGLADE_ONLY_FMT,
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
target_major, target_minor);
|
||||
|
||||
support_mask |= GLADE_SUPPORT_LIBGLADE_ONLY;
|
||||
}
|
||||
@ -1932,19 +2027,13 @@ glade_project_verify_adaptor (GladeProject *project,
|
||||
{
|
||||
if (string->len)
|
||||
g_string_append (string, "\n");
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("This widget is not supported in libglade format"));
|
||||
|
||||
g_string_append_printf (string, WIDGET_LIBGLADE_UNSUPPORTED_MSG);
|
||||
}
|
||||
else
|
||||
/* translators: reffers to a widget '[%s]'
|
||||
* loaded from toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("[%s] Object class '%s' from %s %d.%d "
|
||||
"is not supported in libglade format\n"),
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
target_major, target_minor);
|
||||
g_string_append_printf (string, WIDGET_LIBGLADE_UNSUPPORTED_FMT,
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
target_major, target_minor);
|
||||
|
||||
support_mask |= GLADE_SUPPORT_LIBGLADE_UNSUPPORTED;
|
||||
}
|
||||
@ -1955,18 +2044,13 @@ glade_project_verify_adaptor (GladeProject *project,
|
||||
{
|
||||
if (string->len)
|
||||
g_string_append (string, "\n");
|
||||
g_string_append_printf
|
||||
(string, _("This widget is deprecated"));
|
||||
|
||||
g_string_append_printf (string, WIDGET_DEPRECATED_MSG);
|
||||
}
|
||||
else
|
||||
/* translators: reffers to a widget '[%s]'
|
||||
* loaded from toolkit version '%s %d.%d' */
|
||||
g_string_append_printf
|
||||
(string,
|
||||
_("[%s] Object class '%s' from %s %d.%d "
|
||||
"is deprecated\n"),
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
target_major, target_minor);
|
||||
g_string_append_printf (string, WIDGET_DEPRECATED_FMT,
|
||||
path_name, adaptor_iter->title, catalog,
|
||||
target_major, target_minor);
|
||||
|
||||
support_mask |= GLADE_SUPPORT_DEPRECATED;
|
||||
}
|
||||
@ -1974,6 +2058,7 @@ glade_project_verify_adaptor (GladeProject *project,
|
||||
}
|
||||
if (mask)
|
||||
*mask = support_mask;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -104,6 +104,10 @@ glade_property_class_new (gpointer handle)
|
||||
/* Initialize them to the base version */
|
||||
property_class->version_since_major = GWA_VERSION_SINCE_MAJOR (handle);
|
||||
property_class->version_since_minor = GWA_VERSION_SINCE_MINOR (handle);
|
||||
|
||||
property_class->builder_since_major = GWA_BUILDER_SINCE_MAJOR (handle);
|
||||
property_class->builder_since_minor = GWA_BUILDER_SINCE_MINOR (handle);
|
||||
|
||||
return property_class;
|
||||
}
|
||||
|
||||
@ -1581,6 +1585,11 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
&klass->version_since_major,
|
||||
&klass->version_since_minor);
|
||||
|
||||
glade_xml_get_property_version
|
||||
(node, GLADE_TAG_BUILDER_SINCE,
|
||||
&klass->builder_since_major,
|
||||
&klass->builder_since_minor);
|
||||
|
||||
/* Get the Parameters */
|
||||
if ((child = glade_xml_search_child (node, GLADE_TAG_PARAMETERS)) != NULL)
|
||||
klass->parameters = glade_parameter_list_new_from_node (klass->parameters, child);
|
||||
|
||||
@ -46,10 +46,12 @@ struct _GladePropertyClass
|
||||
* was created for.
|
||||
*/
|
||||
|
||||
gint version_since_major; /* Version in which this property was
|
||||
* introduced
|
||||
*/
|
||||
gint version_since_minor;
|
||||
|
||||
guint16 version_since_major; /* Version in which this property was */
|
||||
guint16 version_since_minor; /* introduced. */
|
||||
|
||||
guint16 builder_since_major; /* Version in which this property became */
|
||||
guint16 builder_since_minor; /* available in GtkBuilder format */
|
||||
|
||||
/* For catalogs that support libglade: */
|
||||
gboolean libglade_only; /* Mark special libglade virtual properties */
|
||||
|
||||
@ -43,9 +43,6 @@ struct _GladeProperty
|
||||
GValue *value; /* The value of the property
|
||||
*/
|
||||
|
||||
gboolean sensitive; /* Whether this property is sensitive (if the
|
||||
* property is "optional" this takes precedence).
|
||||
*/
|
||||
gchar *insensitive_tooltip; /* Tooltip to display when in insensitive state
|
||||
* (used to explain why the property is
|
||||
* insensitive)
|
||||
@ -56,34 +53,37 @@ struct _GladeProperty
|
||||
* (used to explain why the property is
|
||||
* insensitive)
|
||||
*/
|
||||
gboolean support_disabled; /* Whether this property is disabled due
|
||||
* to format conflicts
|
||||
*/
|
||||
guint support_disabled : 1; /* Whether this property is disabled due
|
||||
* to format conflicts
|
||||
*/
|
||||
|
||||
gboolean enabled; /* Enabled is a flag that is used for GladeProperties
|
||||
* that have the optional flag set to let us know
|
||||
* if this widget has this setting enabled or
|
||||
* not. (Like default size, it can be specified or
|
||||
* unspecified). This flag also sets the state
|
||||
* of the property->input state for the loaded
|
||||
* widget.
|
||||
*/
|
||||
guint sensitive : 1; /* Whether this property is sensitive (if the
|
||||
* property is "optional" this takes precedence).
|
||||
*/
|
||||
|
||||
gboolean save_always; /* Used to make a special case exception and always
|
||||
* save this property regardless of what the default
|
||||
* value is (used for some special cases like properties
|
||||
* that are assigned initial values in composite widgets
|
||||
* or derived widget code).
|
||||
*/
|
||||
guint enabled : 1; /* Enabled is a flag that is used for GladeProperties
|
||||
* that have the optional flag set to let us know
|
||||
* if this widget has this setting enabled or
|
||||
* not. (Like default size, it can be specified or
|
||||
* unspecified). This flag also sets the state
|
||||
* of the property->input state for the loaded
|
||||
* widget.
|
||||
*/
|
||||
|
||||
guint save_always : 1; /* Used to make a special case exception and always
|
||||
* save this property regardless of what the default
|
||||
* value is (used for some special cases like properties
|
||||
* that are assigned initial values in composite widgets
|
||||
* or derived widget code).
|
||||
*/
|
||||
|
||||
/* Used only for translatable strings. */
|
||||
gboolean i18n_translatable;
|
||||
gboolean i18n_has_context;
|
||||
guint i18n_translatable : 1;
|
||||
guint i18n_has_context : 1;
|
||||
gchar *i18n_context;
|
||||
gchar *i18n_comment;
|
||||
|
||||
gint syncing; /* Avoid recursion while synchronizing object with value.
|
||||
*/
|
||||
gint syncing; /* Avoid recursion while synchronizing object with value */
|
||||
gint sync_tolerance;
|
||||
};
|
||||
|
||||
|
||||
@ -387,9 +387,14 @@ gwa_clone_parent_properties (GladeWidgetAdaptor *adaptor, gboolean is_packing)
|
||||
/* Reset versioning in derived catalogs just once */
|
||||
if (strcmp (adaptor->priv->catalog,
|
||||
parent_adaptor->priv->catalog))
|
||||
{
|
||||
pclass->version_since_major =
|
||||
pclass->version_since_major = 0;
|
||||
|
||||
pclass->builder_since_major =
|
||||
pclass->builder_since_major = 0;
|
||||
|
||||
}
|
||||
properties = g_list_prepend (properties, pclass);
|
||||
}
|
||||
}
|
||||
@ -602,9 +607,14 @@ glade_widget_adaptor_constructor (GType type,
|
||||
/* Reset version numbering if we're in a new catalog just once */
|
||||
if (parent_adaptor &&
|
||||
strcmp (adaptor->priv->catalog, parent_adaptor->priv->catalog))
|
||||
{
|
||||
GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->version_since_major =
|
||||
GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->version_since_minor = 0;
|
||||
|
||||
GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->builder_since_major =
|
||||
GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->builder_since_minor = 0;
|
||||
}
|
||||
|
||||
/* Copy parent actions */
|
||||
if (parent_adaptor)
|
||||
{
|
||||
@ -1488,6 +1498,11 @@ gwa_derived_class_init (GladeWidgetAdaptorClass *adaptor_class,
|
||||
/* Load catalog symbols from module */
|
||||
if (module) gwa_extend_with_node_load_sym (adaptor_class, node, module);
|
||||
|
||||
glade_xml_get_property_version
|
||||
(node, GLADE_TAG_BUILDER_SINCE,
|
||||
&adaptor_class->builder_since_major,
|
||||
&adaptor_class->builder_since_minor);
|
||||
|
||||
glade_xml_get_property_version
|
||||
(node, GLADE_TAG_VERSION_SINCE,
|
||||
&adaptor_class->version_since_major,
|
||||
|
||||
@ -67,8 +67,8 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass;
|
||||
*
|
||||
* Checks major version in which this widget was introduced
|
||||
*/
|
||||
#define GWA_VERSION_SINCE_MAJOR(obj) \
|
||||
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->version_since_major : FALSE)
|
||||
#define GWA_VERSION_SINCE_MAJOR(obj) \
|
||||
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->version_since_major : 0)
|
||||
|
||||
/**
|
||||
* GWA_VERSION_SINCE_MINOR:
|
||||
@ -76,8 +76,27 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass;
|
||||
*
|
||||
* Checks minor version in which this widget was introduced
|
||||
*/
|
||||
#define GWA_VERSION_SINCE_MINOR(obj) \
|
||||
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->version_since_minor : FALSE)
|
||||
#define GWA_VERSION_SINCE_MINOR(obj) \
|
||||
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->version_since_minor : 0)
|
||||
|
||||
/**
|
||||
* GWA_BUILDER_SINCE_MAJOR:
|
||||
* @obj: A #GladeWidgetAdaptor
|
||||
*
|
||||
* Checks major version in which this widget introduced gtkbuilder support
|
||||
*/
|
||||
#define GWA_BUILDER_SINCE_MAJOR(obj) \
|
||||
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->builder_since_major : 0)
|
||||
|
||||
/**
|
||||
* GWA_BUILDER_SINCE_MINOR:
|
||||
* @obj: A #GladeWidgetAdaptor
|
||||
*
|
||||
* Checks minor version in which this widget introduced gtkbuilder support
|
||||
*/
|
||||
#define GWA_BUILDER_SINCE_MINOR(obj) \
|
||||
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->builder_since_minor : 0)
|
||||
|
||||
|
||||
/**
|
||||
* GWA_IS_TOPLEVEL:
|
||||
@ -590,29 +609,31 @@ struct _GladeWidgetAdaptorClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
gint version_since_major; /* Version in which this widget was
|
||||
* introduced
|
||||
*/
|
||||
gint version_since_minor;
|
||||
guint16 version_since_major; /* Version in which this widget was */
|
||||
guint16 version_since_minor; /* introduced. */
|
||||
|
||||
gboolean deprecated; /* If this widget is currently
|
||||
* deprecated
|
||||
*/
|
||||
gboolean libglade_unsupported; /* If this widget is not supported
|
||||
* by libglade
|
||||
*/
|
||||
gboolean libglade_only; /* If this widget is only supported
|
||||
* by libglade
|
||||
*/
|
||||
guint16 builder_since_major; /* Version in which this widget became */
|
||||
guint16 builder_since_minor; /* available in GtkBuilder format */
|
||||
|
||||
gboolean fixed; /* If this is a GtkContainer, use free-form
|
||||
* placement with drag/resize/paste at mouse...
|
||||
*/
|
||||
gboolean toplevel; /* If this class is toplevel */
|
||||
|
||||
gboolean use_placeholders; /* Whether or not to use placeholders
|
||||
* to interface with child widgets.
|
||||
*/
|
||||
guint deprecated : 1; /* If this widget is currently
|
||||
* deprecated
|
||||
*/
|
||||
guint libglade_unsupported : 1; /* If this widget is not supported
|
||||
* by libglade
|
||||
*/
|
||||
guint libglade_only : 1; /* If this widget is only supported
|
||||
* by libglade
|
||||
*/
|
||||
|
||||
guint fixed : 1; /* If this is a Container, use free-form
|
||||
* placement with drag/resize/paste at mouse...
|
||||
*/
|
||||
guint toplevel : 1; /* If this class is toplevel */
|
||||
|
||||
guint use_placeholders : 1; /* Whether or not to use placeholders
|
||||
* to interface with child widgets.
|
||||
*/
|
||||
|
||||
gint default_width; /* Default width in GladeDesignLayout */
|
||||
gint default_height; /* Default height in GladeDesignLayout */
|
||||
@ -673,12 +694,12 @@ struct _GladeWidgetAdaptorClass
|
||||
GladeChildSetPropertyFunc child_set_property; /* Sets/Gets a packing property */
|
||||
GladeChildGetPropertyFunc child_get_property; /* for this child */
|
||||
|
||||
GladeReplaceChildFunc replace_child; /* This method replaces a
|
||||
* child widget with
|
||||
* another one: it's used to
|
||||
* replace a placeholder with
|
||||
* a widget and viceversa.
|
||||
*/
|
||||
GladeReplaceChildFunc replace_child; /* This method replaces a
|
||||
* child widget with
|
||||
* another one: it's used to
|
||||
* replace a placeholder with
|
||||
* a widget and viceversa.
|
||||
*/
|
||||
|
||||
GladeActionActivateFunc action_activate; /* This method is used to catch actions */
|
||||
GladeChildActionActivateFunc child_action_activate; /* This method is used to catch packing actions */
|
||||
|
||||
@ -89,6 +89,7 @@ typedef enum {
|
||||
#define GLADE_TAG_VERSION "version"
|
||||
#define GLADE_TAG_TARGETABLE "targetable"
|
||||
#define GLADE_TAG_VERSION_SINCE "since"
|
||||
#define GLADE_TAG_BUILDER_SINCE "gtkbuilder-since"
|
||||
#define GLADE_TAG_DEPRECATED "deprecated"
|
||||
|
||||
#define GLADE_TAG_LIBGLADE_ONLY "libglade-only"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<glade-catalog name="gtk+"
|
||||
version="2.14"
|
||||
targetable="2.12,2.10,2.8"
|
||||
version="2.16"
|
||||
targetable="2.14,2.12,2.10,2.8"
|
||||
supports="libglade,gtkbuilder"
|
||||
icon-prefix="gtk"
|
||||
library="gladegtk"
|
||||
@ -26,6 +26,7 @@
|
||||
<signal id="drag-failed" since="2.12"/>
|
||||
<signal id="keynav-failed" since="2.12"/>
|
||||
<signal id="query-tooltip" since="2.12"/>
|
||||
<signal id="damage-event" since="2.14"/>
|
||||
</signals>
|
||||
|
||||
<actions>
|
||||
@ -104,6 +105,7 @@
|
||||
</displayable-values>
|
||||
</property>
|
||||
|
||||
<property id="window" disabled="True" since="2.14"/>
|
||||
<property id="name" disabled="True"/>
|
||||
<property id="parent" disabled="True"/>
|
||||
<property id="style" disabled="True"/>
|
||||
@ -412,7 +414,7 @@ embedded in another object</_tooltip>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkMenuShell" _title="Menu Shell" use-placeholders="False">
|
||||
<glade-widget-class name="GtkMenuShell" _title="Menu Shell" use-placeholders="False" gtkbuilder-since="2.16">
|
||||
<post-create-function>empty</post-create-function>
|
||||
<add-child-function>glade_gtk_menu_shell_add_child</add-child-function>
|
||||
<remove-child-function>glade_gtk_menu_shell_remove_child</remove-child-function>
|
||||
@ -435,7 +437,8 @@ embedded in another object</_tooltip>
|
||||
</packing-properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkMenuItem" generic-name="menuitem" _title="Menu Item" use-placeholders="False">
|
||||
<glade-widget-class name="GtkMenuItem" generic-name="menuitem" _title="Menu Item" use-placeholders="False"
|
||||
gtkbuilder-since="2.16">
|
||||
<constructor-function>glade_gtk_menu_item_constructor</constructor-function>
|
||||
<post-create-function>glade_gtk_menu_item_post_create</post-create-function>
|
||||
<get-children-function>glade_gtk_menu_item_get_children</get-children-function>
|
||||
@ -450,6 +453,9 @@ embedded in another object</_tooltip>
|
||||
<action id="launch_editor" _name="Edit…" stock="gtk-edit" important="True"/>
|
||||
</actions>
|
||||
<properties>
|
||||
<property id="accel-path" since="2.14"/>
|
||||
<property id="right-justified" since="2.14"/>
|
||||
<property id="width-chars" since="2.14"/>
|
||||
<property id="label" _name="Label" translatable="True">
|
||||
<parameter-spec>
|
||||
<type>GParamString</type>
|
||||
@ -730,7 +736,8 @@ embedded in another object</_tooltip>
|
||||
<property id="label" default="label" translatable="True" custom-layout="True">
|
||||
<visible-lines>2</visible-lines>
|
||||
</property>
|
||||
<property id="glade-attributes" _name="Attributes" save="False" custom-layout="True">
|
||||
<property id="glade-attributes" _name="Attributes" save="False" custom-layout="True"
|
||||
libglade-unsupported="True" gtkbuilder-since="2.16">
|
||||
<parameter-spec>
|
||||
<type>GParamBoxed</type>
|
||||
<value-type>GladeAttrGList</value-type>
|
||||
@ -958,14 +965,18 @@ embedded in another object</_tooltip>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkScaleButton" generic-name="scalebutton" _title="Scale Button" since="2.12"/>
|
||||
<glade-widget-class name="GtkScaleButton" generic-name="scalebutton" _title="Scale Button" since="2.12">
|
||||
<properties>
|
||||
<property id="orientation" since="2.14"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkVolumeButton" generic-name="volumebutton" _title="Volume Button"/>
|
||||
|
||||
<glade-widget-class name="GtkFileChooserWidget" generic-name="filechooserwidget" _title="File Chooser Widget">
|
||||
<post-create-function>glade_gtk_file_chooser_widget_post_create</post-create-function>
|
||||
<properties>
|
||||
<property id="size" default="1" query="False" />
|
||||
<property id="size" default="1" query="False" />
|
||||
<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"/>
|
||||
@ -1076,6 +1087,10 @@ embedded in another object</_tooltip>
|
||||
<value id="GTK_PROGRESS_DISCRETE" _name="Discrete"/>
|
||||
</displayable-values>
|
||||
</property>
|
||||
<property id="min-horizontal-bar-height" since="2.14"/>
|
||||
<property id="min-horizontal-bar-width" since="2.14"/>
|
||||
<property id="min-vertical-bar-height" since="2.14"/>
|
||||
<property id="min-vertical-bar-width" since="2.14"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
@ -1290,7 +1305,13 @@ embedded in another object</_tooltip>
|
||||
|
||||
<glade-widget-class name="GtkVScale" generic-name="vscale" _title="Vertical Scale"/>
|
||||
|
||||
<glade-widget-class name="GtkCalendar" generic-name="calendar" _title="Calendar"/>
|
||||
<glade-widget-class name="GtkCalendar" generic-name="calendar" _title="Calendar">
|
||||
<properties>
|
||||
<property id="detail-height-rows" since="2.14"/>
|
||||
<property id="detail-width-chars" since="2.14"/>
|
||||
<property id="show-details" since="2.14"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkMenu" generic-name="menu" _title="Popup Menu" toplevel="True">
|
||||
<constructor-function>glade_gtk_menu_constructor</constructor-function>
|
||||
@ -1301,7 +1322,16 @@ embedded in another object</_tooltip>
|
||||
<actions>
|
||||
<action id="launch_editor" _name="Edit…" stock="gtk-edit" important="True"/>
|
||||
</actions>
|
||||
</glade-widget-class>
|
||||
|
||||
<properties>
|
||||
<property id="accel-group" since="2.14"/>
|
||||
<property id="accel-path" since="2.14"/>
|
||||
<property id="active" disabled="True" since="2.14"/>
|
||||
<property id="attach-widget" disabled="True" since="2.14"/>
|
||||
<property id="monitor" disabled="True" since="2.14"/>
|
||||
</properties>
|
||||
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkHScrollbar" generic-name="hscrollbar" _title="Horizontal Scrollbar"/>
|
||||
|
||||
@ -1692,9 +1722,10 @@ embedded in another object</_tooltip>
|
||||
|
||||
<glade-widget-class name="GtkLinkButton" generic-name="linkbutton" _title="Link Button">
|
||||
<properties>
|
||||
<!-- The pspec of this prop says that the default is http://www.gtk.org but gtk_link_button_init() does not set it up
|
||||
do we need to override it to avoid seting a NULL value. -->
|
||||
<!-- The pspec of this prop says that the default is http://www.gtk.org but gtk_link_button_init() does
|
||||
not set it up... do we need to override it to avoid seting a NULL value ? -->
|
||||
<property id="uri" default="http://glade.gnome.org" since="2.10"/>
|
||||
<property id="visited" since="2.14"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
@ -2606,6 +2637,11 @@ embedded in another object</_tooltip>
|
||||
|
||||
<glade-widget-class name="GtkCellRendererCombo" generic-name="cellrenderercombo" _title="Combo Renderer"
|
||||
libglade-unsupported="True">
|
||||
|
||||
<signals>
|
||||
<signal id="changed" since="2.14"/>
|
||||
</signals>
|
||||
|
||||
<properties>
|
||||
<property id="has-entry" save="False" custom-layout="True"/>
|
||||
<property id="attr-has-entry" _name="Has Entry column" save="False" default="-1" custom-layout="True">
|
||||
@ -2989,7 +3025,11 @@ embedded in another object</_tooltip>
|
||||
|
||||
|
||||
<glade-widget-class name="GtkStatusIcon" generic-name="statusicon" _title="Status Icon"
|
||||
libglade-unsupported="True" toplevel="True"/>
|
||||
libglade-unsupported="True" toplevel="True">
|
||||
<properties>
|
||||
<property id="gicon" disabled="True" since="2.14"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkTextBuffer" generic-name="textbuffer" _title="Text Buffer"
|
||||
libglade-unsupported="True" toplevel="True">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user