[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 01/02: Replace duplicated code.

noreply at xfce.org noreply at xfce.org
Tue Oct 25 13:54:48 CEST 2016


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit bda7f7c4becd53ab043d88412923f4c2d73ef32e
Author: Graeme Gott <graeme at gottcode.org>
Date:   Sun Oct 23 18:22:22 2016 -0400

    Replace duplicated code.
---
 panel-plugin/launcher.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/panel-plugin/launcher.cpp b/panel-plugin/launcher.cpp
index 6bffd6a..fcc2d50 100644
--- a/panel-plugin/launcher.cpp
+++ b/panel-plugin/launcher.cpp
@@ -219,22 +219,18 @@ void Launcher::run(GdkScreen* screen) const
 			{
 			case 'i':
 				replace_with_quoted_string(command, i, "--icon ", garcon_menu_item_get_icon_name(m_item));
-				length = command.length() - 1;
 				break;
 
 			case 'c':
 				replace_with_quoted_string(command, i, garcon_menu_item_get_name(m_item));
-				length = command.length() - 1;
 				break;
 
 			case 'k':
 				replace_and_free_with_quoted_string(command, i, garcon_menu_item_get_uri(m_item));
-				length = command.length() - 1;
 				break;
 
 			case '%':
 				command.erase(i, 1);
-				length = command.length() - 1;
 				break;
 
 			case 'f':
@@ -247,9 +243,9 @@ void Launcher::run(GdkScreen* screen) const
 				// unsupported, pass in a list of URLs dropped on launcher
 			default:
 				command.erase(i, 2);
-				length = command.length() - 1;
 				break;
 			}
+			length = command.length() - 1;
 		}
 	}
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list