diff options
author | ZenWalker <[email protected]> | 2017-06-06 01:33:25 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-06-06 14:59:53 +0200 |
commit | 0e8c47e9d65e16fc6560cb93b02777c71ae97518 (patch) | |
tree | 5ef181565f3ac4b3d7940a351f84c93c2a2f7e25 | |
parent | c57c2c40d5d6b1cfbab1978cba9c785b0d70f888 (diff) | |
download | mate-panel-0e8c47e9d65e16fc6560cb93b02777c71ae97518.tar.bz2 mate-panel-0e8c47e9d65e16fc6560cb93b02777c71ae97518.tar.xz |
Fix: menubar/menu-button can't launch mozo
Fixes #586
-rw-r--r-- | mate-panel/panel-menu-bar.c | 11 | ||||
-rw-r--r-- | mate-panel/panel-menu-button.c | 21 |
2 files changed, 12 insertions, 20 deletions
diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c index fbc759d7..1c5d28cc 100644 --- a/mate-panel/panel-menu-bar.c +++ b/mate-panel/panel-menu-bar.c @@ -400,15 +400,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); } } |