mirror of https://github.com/GNOME/gimp.git
app/core/gimpmarshal.list added "gboolean delete" parameter to the
2004-07-21 Michael Natterer <mitch@gimp.org> * app/core/gimpmarshal.list * app/widgets/gimpcellrendereraccel.[ch]: added "gboolean delete" parameter to the GimpCellRendererAccel::accel_edited() signal. * app/widgets/gimpactionview.c: distinguish between deletion of an accelerator and the user entering an invalid accelerator.
This commit is contained in:
parent
59179c2dd9
commit
e7479951b5
|
@ -1,3 +1,12 @@
|
|||
2004-07-21 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpmarshal.list
|
||||
* app/widgets/gimpcellrendereraccel.[ch]: added "gboolean delete"
|
||||
parameter to the GimpCellRendererAccel::accel_edited() signal.
|
||||
|
||||
* app/widgets/gimpactionview.c: distinguish between deletion of an
|
||||
accelerator and the user entering an invalid accelerator.
|
||||
|
||||
2004-07-21 Shlomi Fish <shlomif@iglu.org.il>
|
||||
|
||||
* plug-ins/gimpressionist/: normalized the identifiers in
|
||||
|
|
|
@ -44,6 +44,6 @@ VOID: OBJECT, INT
|
|||
VOID: OBJECT, POINTER
|
||||
VOID: POINTER
|
||||
VOID: STRING
|
||||
VOID: STRING, BOOLEAN, UINT, FLAGS
|
||||
VOID: STRING, FLAGS
|
||||
VOID: STRING, UINT, FLAGS
|
||||
VOID: VOID
|
||||
|
|
|
@ -68,6 +68,7 @@ static void gimp_action_view_accel_changed (GtkAccelGroup *accel_group,
|
|||
GimpActionView *view);
|
||||
static void gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
||||
const char *path_string,
|
||||
gboolean delete,
|
||||
guint accel_key,
|
||||
GdkModifierType accel_mask,
|
||||
GimpActionView *view);
|
||||
|
@ -424,6 +425,7 @@ gimp_action_view_accel_confirm (GtkWidget *query_box,
|
|||
static void
|
||||
gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
||||
const char *path_string,
|
||||
gboolean delete,
|
||||
guint accel_key,
|
||||
GdkModifierType accel_mask,
|
||||
GimpActionView *view)
|
||||
|
@ -471,7 +473,18 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||
gtk_action_group_get_name (group),
|
||||
gtk_action_get_name (action));
|
||||
|
||||
if (accel_key)
|
||||
if (delete)
|
||||
{
|
||||
if (! gtk_accel_map_change_entry (accel_path, 0, 0, FALSE))
|
||||
{
|
||||
g_message (_("Removing shortcut failed."));
|
||||
}
|
||||
}
|
||||
else if (! accel_key)
|
||||
{
|
||||
g_message (_("Invalid shortcut."));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! gtk_accel_map_change_entry (accel_path,
|
||||
accel_key, accel_mask, FALSE))
|
||||
|
@ -519,9 +532,9 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||
if (conflict_action)
|
||||
{
|
||||
GimpActionGroup *conflict_group;
|
||||
gchar *accel_string;
|
||||
gchar *label;
|
||||
gchar *stripped;
|
||||
gchar *accel_string;
|
||||
gchar *message;
|
||||
ConfirmData *confirm_data;
|
||||
GtkWidget *query_box;
|
||||
|
@ -573,12 +586,12 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||
(GWeakNotify) g_free,
|
||||
confirm_data->accel_path);
|
||||
|
||||
g_free (message);
|
||||
g_free (accel_string);
|
||||
g_free (label);
|
||||
g_free (stripped);
|
||||
g_object_unref (conflict_group);
|
||||
g_free (accel_string);
|
||||
g_free (message);
|
||||
g_object_unref (conflict_action);
|
||||
g_object_unref (conflict_group);
|
||||
|
||||
gtk_widget_show (query_box);
|
||||
}
|
||||
|
@ -588,16 +601,6 @@ gimp_action_view_accel_edited (GimpCellRendererAccel *accel,
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accel_mask = 0;
|
||||
|
||||
if (! gtk_accel_map_change_entry (accel_path,
|
||||
accel_key, accel_mask, FALSE))
|
||||
{
|
||||
g_message (_("Removing shortcut failed."));
|
||||
}
|
||||
}
|
||||
|
||||
g_free (accel_path);
|
||||
g_object_unref (group);
|
||||
|
|
|
@ -136,9 +136,10 @@ gimp_cell_renderer_accel_class_init (GimpCellRendererAccelClass *klass)
|
|||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GimpCellRendererAccelClass, accel_edited),
|
||||
NULL, NULL,
|
||||
gimp_marshal_VOID__STRING_UINT_FLAGS,
|
||||
G_TYPE_NONE, 3,
|
||||
gimp_marshal_VOID__STRING_BOOLEAN_UINT_FLAGS,
|
||||
G_TYPE_NONE, 4,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_BOOLEAN,
|
||||
G_TYPE_UINT,
|
||||
GDK_TYPE_MODIFIER_TYPE);
|
||||
|
||||
|
@ -329,7 +330,7 @@ grab_key_callback (GtkWidget *widget,
|
|||
|
||||
if (edited)
|
||||
g_signal_emit (accel, accel_cell_signals[ACCEL_EDITED], 0,
|
||||
path, accel_key, accel_mods);
|
||||
path, delete, accel_key, accel_mods);
|
||||
|
||||
g_free (path);
|
||||
|
||||
|
@ -380,7 +381,7 @@ pointless_eventbox_subclass_get_type (void)
|
|||
NULL, /* class_data */
|
||||
sizeof (GtkEventBox),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) NULL,
|
||||
NULL /* instance init */
|
||||
};
|
||||
|
||||
static const GInterfaceInfo editable_info =
|
||||
|
|
|
@ -59,6 +59,7 @@ struct _GimpCellRendererAccelClass
|
|||
|
||||
void (* accel_edited) (GimpCellRendererAccel *accel,
|
||||
const char *path_string,
|
||||
gboolean delete,
|
||||
guint accel_key,
|
||||
GdkModifierType accel_mask);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue