[gimp] app: Simplify file_actions_update()
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] app: Simplify file_actions_update()
- Date: Fri, 3 Jul 2009 06:19:30 +0000 (UTC)
commit 0959414cd247a381b6e520547948286821063ef7
Author: Martin Nordholts <martinn src gnome org>
Date: Fri Jul 3 08:20:40 2009 +0200
app: Simplify file_actions_update()
app/actions/file-actions.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/app/actions/file-actions.c b/app/actions/file-actions.c
index fa10a17..61bc4c9 100644
--- a/app/actions/file-actions.c
+++ b/app/actions/file-actions.c
@@ -244,7 +244,6 @@ file_actions_update (GimpActionGroup *group,
GimpDrawable *drawable = NULL;
const gchar *source = NULL;
const gchar *export_to = NULL;
- gchar *label = NULL;
if (image)
{
@@ -266,19 +265,17 @@ file_actions_update (GimpActionGroup *group,
SET_SENSITIVE ("file-export", image && drawable);
SET_SENSITIVE ("file-create-template", image);
- if (source && ! export_to)
+ if (source || export_to)
{
- /* Update file-export-to label */
- label = g_strdup_printf (_("Overwrite %s"),
- file_utils_uri_display_basename (source));
- gimp_action_group_set_action_label (group, "file-export-to", label);
- g_free (label);
- }
- else if (export_to)
- {
- /* Update file-export-to label */
- label = g_strdup_printf (_("Export to %s"),
- file_utils_uri_display_basename (export_to));
+ gchar *label = NULL;
+
+ if (! export_to)
+ label = g_strdup_printf (_("Overwrite %s"),
+ file_utils_uri_display_basename (source));
+ else
+ label = g_strdup_printf (_("Export to %s"),
+ file_utils_uri_display_basename (export_to));
+
gimp_action_group_set_action_label (group, "file-export-to", label);
g_free (label);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]