summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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);
}
}