Commit 64bb8141 authored by Tristan Van Berkom's avatar Tristan Van Berkom

merging builder branch into trunk


A    plugins/gtk+/glade-keysyms.c
M    plugins/gtk+/glade-gtk.c
M    plugins/gtk+/gtk+.xml.in
A    plugins/gtk+/glade-accels.c
M    plugins/gtk+/Makefile.am
A    plugins/gtk+/glade-accels.h
M    ChangeLog
M    gladeui/glade-editor.c
M    gladeui/glade-editor-property.c
M    gladeui/glade-editor-property.h
M    gladeui/glade-widget.c
M    gladeui/glade-widget.h
M    gladeui/glade-widget-adaptor.c
M    gladeui/glade-command.c
M    gladeui/glade-widget-adaptor.h
M    gladeui/glade-parser.c
M    gladeui/glade-xml-utils.c
M    gladeui/glade-base-editor.c
M    gladeui/glade-utils.c
D    gladeui/glade-parser.h
M    gladeui/glade-signal-editor.c
M    gladeui/glade-xml-utils.h
D    gladeui/glade-keysyms.c
M    gladeui/glade-property.c
M    gladeui/glade-property-class.c
M    gladeui/glade-property.h
M    gladeui/glade-builtins.c
M    gladeui/glade-property-class.h
M    gladeui/glade-builtins.h
M    gladeui/glade-project.c
M    gladeui/glade-signal.c
M    gladeui/Makefile.am
M    gladeui/glade-signal.h

svn path=/trunk/; revision=1764
parent 1b84fad3
2008-04-03 Tristan Van Berkom <tvb@gnome.org>
* glade-widget, glade-property, glade-gtk (plugin),
glade-project, glade-xml-utils... lots.
Implemented saving of properties, signals, atkprops
accelerators: everything is saving properly now !
2008-04-02 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-widget-adaptor.[ch]: Added new entry points
to create editor widgets for plugin provided pspecs and also
to create strings based on plugin provided pspec.
Moved all accelerater code out of the core and into the plugin,
still working on loading glade files with the new parser...
* gladeui/glade-gtk.c:
- Implemented loading of accelerators.
- Implemented loading of atk properties (not relations or actions yet...)
- Implemented loading of atk actions now...
- Implemented atk relations
* gladeui/glade-widget-adaptor.c, gladeui/glade-signal.c:
Implemented loading of signals.
* gladeui/glade-property-class.[ch], gladeui/glade-editor.c,
gladeui/glade-property.c, gladeui/glade-widget-adaptor.c:
Removed notion of the GPCType (which differentiated atk props
from normal props and also accel props for various purposes),
now there is a boolean "atk" member that only means to put
these properties in the atk tab of the editor, one day we can
hopefully even remove this.
* gladeui/glade-widget.c: Fixed special-child-type loading (i.e
notebook tabs and frame labels), and removed some obsolete
loading code from the old implementation.
* gladeui/glade-widget.[ch], gladeui/glade-project.c:
Basic glade file saving framework in place, currently saves
widgets, thier children and class types and widget names.
2008-04-01 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-widget.[ch], gladeui/glade-widget-adaptor.[ch],
various files: Implemented loading and building of the widget
hierarchy, currently only types and widget names, no properties
or packing properties - but internal children and placeholders
are loaded correctly.
* gladeui/glade-widget.[ch], gladeui/glade-widget-adaptor.c,
gladeui/glade-property.[ch]: Implemented loading of packing
properties and normal properties.
2008-03-30 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-parser.[ch]
* lots of files: removed references to load/save,
disabled load/save - clearing the way for builder support.
2008-03-10 Tristan Van Berkom <tvb@gnome.org>
* NEWS, configure.ac: Rolling 3.4.3
......
......@@ -51,10 +51,8 @@ libgladeui_1_la_SOURCES = \
glade-id-allocator.h \
glade-marshallers.c \
glade-accumulators.c \
glade-parser.c \
glade-builtins.c \
glade-app.c \
glade-keysyms.c \
glade-fixed.c \
glade-base-editor.c \
glade-palette-item.h \
......@@ -110,11 +108,10 @@ libgladeuiinclude_HEADERS = \
glade-fixed.h \
glade-base-editor.h \
glade-xml-utils.h \
glade-parser.h \
glade-signal.h \
glade-cursor.h \
glade-widget-action.h
if PLATFORM_WIN32
libgladeui_1_la_LDFLAGS += -no-undefined
......
......@@ -1675,7 +1675,7 @@ glade_base_editor_add_properties (GladeBaseEditor *editor,
while (property)
{
eprop = glade_editor_property_new_from_widget (gchild, property, packing, TRUE);
eprop = glade_widget_create_editor_property (gchild, property, packing, TRUE);
if (eprop)
glade_base_editor_table_attach (editor,
GLADE_EDITOR_PROPERTY (eprop)->item_label,
......
......@@ -41,15 +41,6 @@ struct _GladeParamSpecObjects {
*/
};
struct _GladeParamSpecAccel {
GParamSpec parent_instance;
GType type; /* The type this accel key is for; this allows
* us to verify the validity of any signals for
* this type.
*/
};
typedef struct _GladeStockItem {
gchar *value_name;
gchar *value_nick;
......@@ -277,10 +268,9 @@ glade_standard_stock_image_spec (void)
0, G_PARAM_READWRITE);
}
/****************************************************************
* A GList boxed type used by GladeParamSpecObjects and *
* GladeParamSpecAccel *
* GladeParamSpecAccel (which is now in the glade-gtk backend) *
****************************************************************/
GType
glade_glist_get_type (void)
......@@ -295,180 +285,6 @@ glade_glist_get_type (void)
return type_id;
}
GList *
glade_accel_list_copy (GList *accels)
{
GList *ret = NULL, *list;
GladeAccelInfo *info, *dup_info;
for (list = accels; list; list = list->next)
{
info = list->data;
dup_info = g_new0 (GladeAccelInfo, 1);
dup_info->signal = g_strdup (info->signal);
dup_info->key = info->key;
dup_info->modifiers = info->modifiers;
ret = g_list_prepend (ret, dup_info);
}
return g_list_reverse (ret);
}
void
glade_accel_list_free (GList *accels)
{
GList *list;
GladeAccelInfo *info;
for (list = accels; list; list = list->next)
{
info = list->data;
g_free (info->signal);
g_free (info);
}
g_list_free (accels);
}
GType
glade_accel_glist_get_type (void)
{
static GType type_id = 0;
if (!type_id)
type_id = g_boxed_type_register_static
("GladeAccelGList",
(GBoxedCopyFunc) glade_accel_list_copy,
(GBoxedFreeFunc) glade_accel_list_free);
return type_id;
}
/****************************************************************
* Built-in GladeParamSpecAccel for accelerator properties *
****************************************************************/
gboolean
glade_keyval_valid (guint val)
{
gint i;
for (i = 0; GladeKeys[i].name != NULL; i++)
{
if (GladeKeys[i].value == val)
return TRUE;
}
return FALSE;
}
static void
param_accel_init (GParamSpec *pspec)
{
GladeParamSpecAccel *ospec = GLADE_PARAM_SPEC_ACCEL (pspec);
ospec->type = G_TYPE_OBJECT;
}
static void
param_accel_set_default (GParamSpec *pspec,
GValue *value)
{
if (value->data[0].v_pointer != NULL)
{
g_free (value->data[0].v_pointer);
}
value->data[0].v_pointer = NULL;
}
static gboolean
param_accel_validate (GParamSpec *pspec,
GValue *value)
{
/* GladeParamSpecAccel *aspec = GLADE_PARAM_SPEC_ACCEL (pspec); */
GList *accels, *list, *toremove = NULL;
GladeAccelInfo *info;
accels = value->data[0].v_pointer;
for (list = accels; list; list = list->next)
{
info = list->data;
/* Is it an invalid key ? */
if (glade_keyval_valid (info->key) == FALSE ||
/* Does the modifier contain any unwanted bits ? */
info->modifiers & GDK_MODIFIER_MASK ||
/* Do we have a signal ? */
/* FIXME: Check if the signal is valid for 'type' */
info->signal == NULL)
toremove = g_list_prepend (toremove, info);
}
for (list = toremove; list; list = list->next)
accels = g_list_remove (accels, list->data);
if (toremove) g_list_free (toremove);
value->data[0].v_pointer = accels;
return toremove != NULL;
}
static gint
param_accel_values_cmp (GParamSpec *pspec,
const GValue *value1,
const GValue *value2)
{
guint8 *p1 = value1->data[0].v_pointer;
guint8 *p2 = value2->data[0].v_pointer;
/* not much to compare here, try to at least provide stable lesser/greater result */
return p1 < p2 ? -1 : p1 > p2;
}
GType
glade_param_accel_get_type (void)
{
static GType accel_type = 0;
if (accel_type == 0)
{
static /* const */ GParamSpecTypeInfo pspec_info = {
sizeof (GladeParamSpecAccel), /* instance_size */
16, /* n_preallocs */
param_accel_init, /* instance_init */
0xdeadbeef, /* value_type, assigned further down */
NULL, /* finalize */
param_accel_set_default, /* value_set_default */
param_accel_validate, /* value_validate */
param_accel_values_cmp, /* values_cmp */
};
pspec_info.value_type = GLADE_TYPE_ACCEL_GLIST;
accel_type = g_param_type_register_static
("GladeParamAccel", &pspec_info);
}
return accel_type;
}
GParamSpec *
glade_param_spec_accel (const gchar *name,
const gchar *nick,
const gchar *blurb,
GType widget_type,
GParamFlags flags)
{
GladeParamSpecAccel *pspec;
pspec = g_param_spec_internal (GLADE_TYPE_PARAM_ACCEL,
name, nick, blurb, flags);
pspec->type = widget_type;
return G_PARAM_SPEC (pspec);
}
/****************************************************************
* Built-in GladeParamSpecObjects for object list properties *
* (Used as a pspec to desctibe an AtkRelationSet, but can *
......@@ -628,16 +444,6 @@ glade_standard_gdkcolor_spec (void)
G_PARAM_READWRITE);
}
/* Accelerator spec */
GParamSpec *
glade_standard_accel_spec (void)
{
return glade_param_spec_accel ("accelerators", _("Accelerators"),
_("A list of accelerator keys"),
GTK_TYPE_WIDGET,
G_PARAM_READWRITE);
}
/****************************************************************
* Basic types follow *
****************************************************************/
......@@ -692,31 +498,6 @@ glade_standard_boolean_spec (void)
G_PARAM_READWRITE);
}
guint
glade_builtin_key_from_string (const gchar *string)
{
gint i;
g_return_val_if_fail (string != NULL, 0);
for (i = 0; GladeKeys[i].name != NULL; i++)
if (!strcmp (string, GladeKeys[i].name))
return GladeKeys[i].value;
return 0;
}
const gchar *
glade_builtin_string_from_key (guint key)
{
gint i;
for (i = 0; GladeKeys[i].name != NULL; i++)
if (GladeKeys[i].value == key)
return GladeKeys[i].name;
return NULL;
}
GType
glade_item_appearance_get_type (void)
{
......
......@@ -8,28 +8,12 @@
G_BEGIN_DECLS
typedef struct _GladeParamSpecObjects GladeParamSpecObjects;
typedef struct _GladeParamSpecAccel GladeParamSpecAccel;
typedef struct _GladeKey GladeKey;
struct _GladeKey {
guint value;
gchar *name;
};
extern const GladeKey GladeKeys[];
#define GLADE_KEYS_LAST_ALPHANUM "9"
#define GLADE_KEYS_LAST_EXTRA "questiondown"
#define GLADE_KEYS_LAST_KP "KP_9"
#define GLADE_KEYS_LAST_FKEY "F35"
#define GLADE_TYPE_STOCK (glade_standard_stock_get_type())
#define GLADE_TYPE_STOCK_IMAGE (glade_standard_stock_image_get_type())
#define GLADE_TYPE_GLIST (glade_glist_get_type())
#define GLADE_TYPE_ACCEL_GLIST (glade_accel_glist_get_type())
#define GLADE_TYPE_PARAM_OBJECTS (glade_param_objects_get_type())
#define GLADE_TYPE_PARAM_ACCEL (glade_param_accel_get_type())
#define GLADE_TYPE_ITEM_APPEARANCE (glade_item_appearance_get_type())
#define GLADE_IS_STOCK(pspec) \
......@@ -45,42 +29,22 @@ extern const GladeKey GladeKeys[];
(G_TYPE_CHECK_INSTANCE_CAST ((pspec), \
GLADE_TYPE_PARAM_OBJECTS, GladeParamSpecObjects))
#define GLADE_IS_PARAM_SPEC_ACCEL(pspec) \
(G_TYPE_CHECK_INSTANCE_TYPE ((pspec), \
GLADE_TYPE_PARAM_ACCEL))
#define GLADE_PARAM_SPEC_ACCEL(pspec) \
(G_TYPE_CHECK_INSTANCE_CAST ((pspec), \
GLADE_TYPE_PARAM_ACCEL, GladeParamSpecAccel))
GType glade_standard_stock_get_type (void) G_GNUC_CONST;
GType glade_standard_stock_image_get_type (void) G_GNUC_CONST;
GType glade_glist_get_type (void) G_GNUC_CONST;
GType glade_accel_glist_get_type (void) G_GNUC_CONST;
GType glade_param_objects_get_type (void) G_GNUC_CONST;
GType glade_param_accel_get_type (void) G_GNUC_CONST;
GType glade_item_appearance_get_type (void) G_GNUC_CONST;
guint glade_builtin_key_from_string (const gchar *string);
const gchar *glade_builtin_string_from_key (guint key);
GList *glade_accel_list_copy (GList *accels);
void glade_accel_list_free (GList *accels);
GParamSpec *glade_param_spec_objects (const gchar *name,
const gchar *nick,
const gchar *blurb,
GType accepted_type,
GParamFlags flags);
GParamSpec *glade_param_spec_accel (const gchar *name,
const gchar *nick,
const gchar *blurb,
GType widget_type,
GParamFlags flags);
void glade_param_spec_objects_set_type (GladeParamSpecObjects *pspec,
GType type);
GType glade_param_spec_objects_get_type (GladeParamSpecObjects *pspec);
......@@ -90,7 +54,6 @@ GParamSpec *glade_standard_gdkcolor_spec (void);
GParamSpec *glade_standard_objects_spec (void);
GParamSpec *glade_standard_stock_spec (void);
GParamSpec *glade_standard_stock_image_spec (void);
GParamSpec *glade_standard_accel_spec (void);
GParamSpec *glade_standard_int_spec (void);
GParamSpec *glade_standard_uint_spec (void);
GParamSpec *glade_standard_string_spec (void);
......@@ -100,8 +63,6 @@ GParamSpec *glade_standard_boolean_spec (void);
void glade_standard_stock_append_prefix (const gchar *prefix);
gboolean glade_keyval_valid (guint val);
G_END_DECLS
#endif /* __GLADE_BUILTINS_H__ */
......@@ -364,8 +364,9 @@ glade_command_set_property_execute (GladeCommand *cmd)
#if 0
{
gchar *str =
glade_property_class_make_string_from_gvalue
(sdata->property->klass, &new_value);
glade_widget_adaptor_string_from_value
(GLADE_WIDGET_ADAPTOR (sdata->property->klass->handle),
sdata->property->klass, &new_value);
g_print ("Setting %s property of %s to %s (sumode: %d)\n",
sdata->property->klass->id,
......@@ -550,8 +551,10 @@ glade_command_set_property_description (GladeCommandSetProperty *me)
else
{
sdata = me->sdata->data;
value_name = glade_property_class_make_string_from_gvalue (sdata->property->klass,
sdata->new_value);
value_name = glade_widget_adaptor_string_from_value
(GLADE_WIDGET_ADAPTOR (sdata->property->klass->handle),
sdata->property->klass, sdata->new_value);
if (!value_name || strlen (value_name) > MAX_UNDO_MENU_ITEM_VALUE_LEN
|| strchr (value_name, '_')) {
description = g_strdup_printf (_("Setting %s of %s"),
......
This diff is collapsed.
......@@ -2,8 +2,69 @@
#ifndef __GLADE_EDITOR_PROPERTY_H__
#define __GLADE_EDITOR_PROPERTY_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
/*******************************************************************************
Boiler plate macros (inspired from glade-command.c)
*******************************************************************************/
/* XXX document me ! */
#define GLADE_MAKE_EPROP_TYPE(func, type, parent) \
GType \
func ## _get_type (void) \
{ \
static GType cmd_type = 0; \
\
if (!cmd_type) \
{ \
static const GTypeInfo info = \
{ \
sizeof (type ## Class), \
(GBaseInitFunc) NULL, \
(GBaseFinalizeFunc) NULL, \
(GClassInitFunc) func ## _class_init, \
(GClassFinalizeFunc) NULL, \
NULL, \
sizeof (type), \
0, \
(GInstanceInitFunc) NULL \
}; \
\
cmd_type = g_type_register_static (parent, #type, &info, 0); \
} \
\
return cmd_type; \
} \
#define GLADE_MAKE_EPROP(type, func) \
static void \
func ## _finalize (GObject *object); \
static void \
func ## _load (GladeEditorProperty *me, GladeProperty *property); \
static GtkWidget * \
func ## _create_input (GladeEditorProperty *me); \
static void \
func ## _class_init (gpointer parent_tmp, gpointer notused) \
{ \
GladeEditorPropertyClass *parent = parent_tmp; \
GObjectClass* object_class; \
object_class = G_OBJECT_CLASS (parent); \
parent->load = func ## _load; \
parent->create_input = func ## _create_input; \
object_class->finalize = func ## _finalize; \
} \
typedef struct { \
GladeEditorPropertyClass cmd; \
} type ## Class; \
GLADE_MAKE_EPROP_TYPE(func, type, GLADE_TYPE_EDITOR_PROPERTY)
#define GLADE_TYPE_EDITOR_PROPERTY (glade_editor_property_get_type())
#define GLADE_EDITOR_PROPERTY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EDITOR_PROPERTY, GladeEditorProperty))
#define GLADE_EDITOR_PROPERTY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_EDITOR_PROPERTY, GladeEditorPropertyClass))
......@@ -59,7 +120,6 @@ struct _GladeEditorPropertyClass {
void (* load) (GladeEditorProperty *, GladeProperty *);
/* private */
GtkWidget *(* create_input) (GladeEditorProperty *);
void (* gtk_doc_search)(GladeEditorProperty *,
......@@ -71,15 +131,7 @@ struct _GladeEditorPropertyClass {
GType glade_editor_property_get_type (void);
GladeEditorProperty *glade_editor_property_new (GladePropertyClass *klass,
gboolean use_command);
GladeEditorProperty *glade_editor_property_new_from_widget (GladeWidget *widget,
const gchar *property,
gboolean packing,
gboolean use_command);
GType glade_editor_property_get_type (void) G_GNUC_CONST;
void glade_editor_property_load (GladeEditorProperty *eprop,
GladeProperty *property);
......@@ -87,12 +139,40 @@ void glade_editor_property_load (GladeEditorProperty *
void glade_editor_property_load_by_widget (GladeEditorProperty *eprop,
GladeWidget *widget);
gboolean glade_editor_property_supported (GParamSpec *pspec);
void glade_editor_property_show_info (GladeEditorProperty *eprop);
void glade_editor_property_hide_info (GladeEditorProperty *eprop);
void glade_editor_property_commit (GladeEditorProperty *eprop,
GValue *value);
/* Generic eprops */
#define GLADE_TYPE_EPROP_NUMERIC (glade_eprop_numeric_get_type())
#define GLADE_TYPE_EPROP_ENUM (glade_eprop_enum_get_type())
#define GLADE_TYPE_EPROP_FLAGS (glade_eprop_flags_get_type())
#define GLADE_TYPE_EPROP_COLOR (glade_eprop_color_get_type())
#define GLADE_TYPE_EPROP_NAMED_ICON (glade_eprop_named_icon_get_type())
#define GLADE_TYPE_EPROP_TEXT (glade_eprop_text_get_type())
#define GLADE_TYPE_EPROP_BOOL (glade_eprop_bool_get_type())
#define GLADE_TYPE_EPROP_UNICHAR (glade_eprop_unichar_get_type())
#define GLADE_TYPE_EPROP_RESOURCE (glade_eprop_resource_get_type())
#define GLADE_TYPE_EPROP_OBJECT (glade_eprop_object_get_type())
#define GLADE_TYPE_EPROP_OBJECTS (glade_eprop_objects_get_type())
#define GLADE_TYPE_EPROP_ADJUSTMENT (glade_eprop_adjustment_get_type())
GType glade_eprop_numeric_get_type (void) G_GNUC_CONST;
GType glade_eprop_enum_get_type (void) G_GNUC_CONST;
GType glade_eprop_flags_get_type (void) G_GNUC_CONST;
GType glade_eprop_color_get_type (void) G_GNUC_CONST;
GType glade_eprop_named_icon_get_type (void) G_GNUC_CONST;
GType glade_eprop_text_get_type (void) G_GNUC_CONST;
GType glade_eprop_bool_get_type (void) G_GNUC_CONST;
GType glade_eprop_unichar_get_type (void) G_GNUC_CONST;
GType glade_eprop_resource_get_type (void) G_GNUC_CONST;
GType glade_eprop_object_get_type (void) G_GNUC_CONST;
GType glade_eprop_objects_get_type (void) G_GNUC_CONST;
GType glade_eprop_adjustment_get_type (void) G_GNUC_CONST;
G_END_DECLS
......
......@@ -434,7 +434,10 @@ glade_editor_table_append_item (GladeEditorTable *table,
{
GladeEditorProperty *property;
property = glade_editor_property_new (klass, from_query_dialog == FALSE);
property = glade_widget_adaptor_create_eprop
(GLADE_WIDGET_ADAPTOR (klass->handle),
klass, from_query_dialog == FALSE);
gtk_widget_show (GTK_WIDGET (property));
gtk_widget_show_all (property->item_label);
......@@ -570,13 +573,9 @@ glade_editor_table_append_items (GladeEditorTable *table,
continue;
else if (type == TABLE_TYPE_GENERAL && property_class->common)
continue;
else if (type == TABLE_TYPE_ATK &&
(property_class->type == GPC_NORMAL ||
property_class->type == GPC_ACCEL_PROPERTY))
else if (type == TABLE_TYPE_ATK && !property_class->atk)
continue;
else if (type != TABLE_TYPE_ATK &&
(property_class->type != GPC_NORMAL &&
property_class->type != GPC_ACCEL_PROPERTY))
else if (type != TABLE_TYPE_ATK && property_class->atk)
continue;
property = glade_editor_table_append_item (table, property_class,
......@@ -1197,8 +1196,7 @@ glade_editor_populate_reset_view (GladeEditor *editor,
if (glade_property_class_is_visible (property->klass) == FALSE)
continue;
if (property->klass->type != GPC_NORMAL &&
property->klass->type != GPC_ACCEL_PROPERTY)
if (property->klass->atk)
iter = &atk_iter;
else if (property->klass->common)
iter = &common_iter;
......
......@@ -1276,102 +1276,6 @@ glade_parser_interface_new_from_buffer (const gchar *buffer,
return state.interface;
}
static gchar *
modifier_string_from_bits (GdkModifierType modifiers)
{
GString *string = g_string_new ("");
if (modifiers & GDK_SHIFT_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_SHIFT_MASK");
}
if (modifiers & GDK_LOCK_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_LOCK_MASK");
}
if (modifiers & GDK_CONTROL_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_CONTROL_MASK");
}
if (modifiers & GDK_MOD1_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_MOD1_MASK");
}
if (modifiers & GDK_MOD2_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_MOD2_MASK");
}
if (modifiers & GDK_MOD3_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_MOD3_MASK");
}
if (modifiers & GDK_MOD4_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_MOD4_MASK");
}
if (modifiers & GDK_MOD5_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_MOD5_MASK");
}
if (modifiers & GDK_BUTTON1_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_BUTTON1_MASK");
}
if (modifiers & GDK_BUTTON2_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_BUTTON2_MASK");
}
if (modifiers & GDK_BUTTON3_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_BUTTON3_MASK");
}
if (modifiers & GDK_BUTTON4_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_BUTTON4_MASK");
}
if (modifiers & GDK_BUTTON5_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_BUTTON5_MASK");
}
if (modifiers & GDK_RELEASE_MASK) {
if (string->len > 0)
g_string_append (string, " | ");
g_string_append (string, "GDK_RELEASE_MASK");
}
if (string->len > 0)
return g_string_free (string, FALSE);
g_string_free (string, TRUE);