summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-06-06 01:33:25 +0200
committerZenWalker <[email protected]>2017-06-06 01:33:25 +0200
commit812f489f4143421895866766b7f0d79fb0a71d54 (patch)
tree2d8b70bd2f729796421eb92da14010bba0131c9f
parenta94e7d192e39fda1d5bba1921c676fec699ac533 (diff)
downloadmate-panel-812f489f4143421895866766b7f0d79fb0a71d54.tar.bz2
mate-panel-812f489f4143421895866766b7f0d79fb0a71d54.tar.xz
Fix: menubar/menu-button can't launch mozo
Fixes #586
-rw-r--r--mate-panel/panel-menu-bar.c11
-rw-r--r--mate-panel/panel-menu-button.c21
2 files changed, 12 insertions, 20 deletions
diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c
index fc131656..eefd2ec9 100644
--- a/mate-panel/panel-menu-bar.c
+++ b/mate-panel/panel-menu-bar.c
@@ -404,15 +404,10 @@ void panel_menu_bar_invoke_menu(PanelMenuBar* menubar, const char* callback_name
}
else if (!strcmp(callback_name, "edit"))
{
- GError* error = NULL;
-
- panel_launch_desktop_file_with_fallback("menulibre.desktop", "menulibre", screen, &error);
-
- if (error)
- {
- g_error_free(error);
+ if (panel_is_program_in_path("menulibre"))
+ panel_launch_desktop_file_with_fallback("menulibre.desktop", "menulibre", screen, NULL);
+ else
panel_launch_desktop_file_with_fallback("mozo.desktop", "mozo", screen, NULL);
- }
}
}
diff --git a/mate-panel/panel-menu-button.c b/mate-panel/panel-menu-button.c
index 3fd70032..74cf0dfb 100644
--- a/mate-panel/panel-menu-button.c
+++ b/mate-panel/panel-menu-button.c
@@ -989,18 +989,15 @@ panel_menu_button_invoke_menu (PanelMenuButton *button,
panel_show_help (screen, "mate-user-guide", "gospanel-37", NULL);
} else if (!strcmp (callback_name, "edit")) {
- GError *error = NULL;
-
- panel_launch_desktop_file_with_fallback ("menulibre.desktop",
- "menulibre",
- screen, &error);
- if (error) {
- g_error_free (error);
- panel_launch_desktop_file_with_fallback (
- "mozo.desktop",
- "mozo",
- screen, NULL);
- }
+
+ if (panel_is_program_in_path ("menulibre"))
+ panel_launch_desktop_file_with_fallback ("menulibre.desktop",
+ "menulibre",
+ screen, NULL);
+ else
+ panel_launch_desktop_file_with_fallback ("mozo.desktop",
+ "mozo",
+ screen, NULL);
}
}