Blame SOURCES/0001-ItemEditor-Make-sure-to-include-the-extension-in-the.patch

5b2f0d
From d31ce6b696cdae0e28aca49e0c8887b450114780 Mon Sep 17 00:00:00 2001
5b2f0d
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
5b2f0d
Date: Tue, 22 Oct 2013 15:08:39 -0400
5b2f0d
Subject: [PATCH] ItemEditor: Make sure to include the extension in the icon
5b2f0d
 name
5b2f0d
5b2f0d
---
5b2f0d
 Alacarte/ItemEditor.py | 7 ++++---
5b2f0d
 1 file changed, 4 insertions(+), 3 deletions(-)
5b2f0d
5b2f0d
diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py
5b2f0d
index 2330de0..64d713f 100644
5b2f0d
--- a/Alacarte/ItemEditor.py
5b2f0d
+++ b/Alacarte/ItemEditor.py
5b2f0d
@@ -33,8 +33,6 @@ def try_icon_name(filename):
5b2f0d
     if not filename.endswith(EXTENSIONS):
5b2f0d
         return filename
5b2f0d
 
5b2f0d
-    filename = filename[:-4]
5b2f0d
-
5b2f0d
     theme = Gtk.IconTheme.get_default()
5b2f0d
     resolved_path = None
5b2f0d
     for path in theme.get_search_path():
5b2f0d
@@ -50,7 +48,10 @@ def try_icon_name(filename):
5b2f0d
     if len(parts) != 4:
5b2f0d
         return filename
5b2f0d
 
5b2f0d
-    return parts[3]
5b2f0d
+    icon_name = parts[3]
5b2f0d
+
5b2f0d
+    # strip extension
5b2f0d
+    return icon_name[:-4]
5b2f0d
 
5b2f0d
 def get_icon_string(image):
5b2f0d
     filename = image.props.file
5b2f0d
-- 
5b2f0d
1.9.0
5b2f0d