aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2014-06-11 10:59:09 +0200
committerThanatermesis <thanatermesis@gmail.com>2014-06-12 15:44:10 +0200
commitff32fd429016dfe60809ffc117d90c1afe04b9f4 (patch)
tree5496085a72443071c862540dfd986ab368761a17
parentefreet: improve handling of merged menus (diff)
downloadefl-ff32fd429016dfe60809ffc117d90c1afe04b9f4.tar.gz
efreet: remove code duplication
If the menu starts with either kde- or gnome- the resulting action is the same. (cherry picked from commit a10d4167f11074f338f9d8cf6f8f8023fc438b05) Signed-off-by: Thanatermesis <thanatermesis@gmail.com>
-rw-r--r--src/lib/efreet/efreet_menu.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/efreet/efreet_menu.c b/src/lib/efreet/efreet_menu.c
index 730f153532..40eca8119e 100644
--- a/src/lib/efreet/efreet_menu.c
+++ b/src/lib/efreet/efreet_menu.c
@@ -1558,12 +1558,8 @@ efreet_menu_handle_default_merge_dirs(Efreet_Menu_Internal *parent, Efreet_Xml *
if (!parent || !xml) return 0;
- if (!strcmp(parent->file.name, "gnome-applications.menu"))
- {
- p = alloca(sizeof("applications"));
- memcpy(p, "applications", sizeof("applications"));
- }
- else if (!strcmp(parent->file.name, "kde-applications.menu"))
+ if ((!strcmp(parent->file.name, "gnome-applications.menu")) ||
+ (!strcmp(parent->file.name, "kde-applications.menu")))
{
p = alloca(sizeof("applications"));
memcpy(p, "applications", sizeof("applications"));