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

noreply at xfce.org noreply at xfce.org
Wed Feb 1 15:12:49 CET 2017


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

gottcode pushed a commit to annotated tag v1.7.0
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 72b132d6b1c743681095eeee5fc1ffa07732bf8c
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