[gimp] app: remove gtk_check_version(2, 24, 7) code from GimpActionGroup
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove gtk_check_version(2, 24, 7) code from GimpActionGroup
- Date: Thu, 1 Dec 2011 11:08:13 +0000 (UTC)
commit 1d9ca9cdca707b254744f9ca51327fe54945ac6d
Author: Michael Natterer <mitch gimp org>
Date: Thu Dec 1 12:07:43 2011 +0100
app: remove gtk_check_version(2,24,7) code from GimpActionGroup
app/widgets/gimpactiongroup.c | 67 +++++++++++------------------------------
1 files changed, 18 insertions(+), 49 deletions(-)
---
diff --git a/app/widgets/gimpactiongroup.c b/app/widgets/gimpactiongroup.c
index 50e4991..a399c4b 100644
--- a/app/widgets/gimpactiongroup.c
+++ b/app/widgets/gimpactiongroup.c
@@ -255,37 +255,6 @@ gimp_action_group_check_unique_action (GimpActionGroup *group,
}
-static void
-gimp_action_group_add_action_with_accel (GtkActionGroup *group,
- GtkAction *action,
- const gchar *accelerator)
-{
- if (gtk_check_version (2, 24, 7))
- {
- gchar *accel = g_strdup (accelerator);
-
- if (accel)
- {
- gchar *primary = strstr (accel, "<primary>");
-
- if (primary)
- strncpy (primary + 1, "control", strlen ("control"));
- }
-
- gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- accel);
-
- g_free (accel);
- }
- else
- {
- gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- accelerator);
- }
-}
-
/**
* gimp_action_group_new:
* @gimp: the @Gimp instance this action group belongs to
@@ -395,9 +364,9 @@ gimp_action_group_add_actions (GimpActionGroup *group,
entries[i].callback,
group->user_data);
- gimp_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- entries[i].accelerator);
+ gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
+ GTK_ACTION (action),
+ entries[i].accelerator);
if (entries[i].help_id)
g_object_set_qdata_full (G_OBJECT (action), GIMP_HELP_ID,
@@ -450,9 +419,9 @@ gimp_action_group_add_toggle_actions (GimpActionGroup *group,
entries[i].callback,
group->user_data);
- gimp_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- entries[i].accelerator);
+ gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
+ GTK_ACTION (action),
+ entries[i].accelerator);
if (entries[i].help_id)
g_object_set_qdata_full (G_OBJECT (action), GIMP_HELP_ID,
@@ -512,9 +481,9 @@ gimp_action_group_add_radio_actions (GimpActionGroup *group,
if (value == entries[i].value)
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
- gimp_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- entries[i].accelerator);
+ gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
+ GTK_ACTION (action),
+ entries[i].accelerator);
if (entries[i].help_id)
g_object_set_qdata_full (G_OBJECT (action), GIMP_HELP_ID,
@@ -575,9 +544,9 @@ gimp_action_group_add_enum_actions (GimpActionGroup *group,
callback,
group->user_data);
- gimp_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- entries[i].accelerator);
+ gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
+ GTK_ACTION (action),
+ entries[i].accelerator);
if (entries[i].help_id)
g_object_set_qdata_full (G_OBJECT (action), GIMP_HELP_ID,
@@ -630,9 +599,9 @@ gimp_action_group_add_string_actions (GimpActionGroup *group,
callback,
group->user_data);
- gimp_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- entries[i].accelerator);
+ gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
+ GTK_ACTION (action),
+ entries[i].accelerator);
if (entries[i].help_id)
g_object_set_qdata_full (G_OBJECT (action), GIMP_HELP_ID,
@@ -671,9 +640,9 @@ gimp_action_group_add_plug_in_actions (GimpActionGroup *group,
callback,
group->user_data);
- gimp_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
- GTK_ACTION (action),
- entries[i].accelerator);
+ gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP (group),
+ GTK_ACTION (action),
+ entries[i].accelerator);
if (entries[i].help_id)
g_object_set_qdata_full (G_OBJECT (action), GIMP_HELP_ID,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]