summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wimpress <[email protected]>2017-01-20 11:02:52 +0000
committerGitHub <[email protected]>2017-01-20 11:02:52 +0000
commita506150684ad2e71b1f70190ee70fe9eda7a4ba9 (patch)
tree83bb94cdefd88130cfc6334d22ad602ba42315bf
parentb39014be1238e369d481667cdda787dace91382d (diff)
downloadmate-panel-a506150684ad2e71b1f70190ee70fe9eda7a4ba9.tar.bz2
mate-panel-a506150684ad2e71b1f70190ee70fe9eda7a4ba9.tar.xz
Add (optional) support for menulibre. https://smdavis.us/projects/menulibre/ (#515)
This patch re-purposes the existing fallback support for the now obsolete matemenu-simple-editor to add (optional) support for menulibre. The logic is simple, if menulibre is installed use it in preference to mozo. If menulibre is not available, fallback to mozo. The rationale is this; if you've installed menulibre you want to use it in preference to mozo. Menulibre offers a superset of menu editting capabilities compared to mozo and is growing in popularity. This change will allow distro maintainers to chose which menu editor they want to offer.
-rw-r--r--mate-panel/panel-menu-bar.c6
-rw-r--r--mate-panel/panel-menu-button.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c
index c95533d7..fbc759d7 100644
--- a/mate-panel/panel-menu-bar.c
+++ b/mate-panel/panel-menu-bar.c
@@ -355,7 +355,7 @@ static void panel_menu_bar_load(PanelWidget* panel, gboolean locked, int positio
mate_panel_applet_add_callback(menubar->priv->info, "help", GTK_STOCK_HELP, _("_Help"), NULL);
/* Menu editors */
- if (!panel_lockdown_get_locked_down () && (panel_is_program_in_path("mozo") || panel_is_program_in_path("matemenu-simple-editor")))
+ if (!panel_lockdown_get_locked_down () && (panel_is_program_in_path("mozo") || panel_is_program_in_path("menulibre")))
{
mate_panel_applet_add_callback (menubar->priv->info, "edit", NULL, _("_Edit Menus"), NULL);
}
@@ -402,12 +402,12 @@ void panel_menu_bar_invoke_menu(PanelMenuBar* menubar, const char* callback_name
{
GError* error = NULL;
- panel_launch_desktop_file_with_fallback("mozo.desktop", "mozo", screen, &error);
+ panel_launch_desktop_file_with_fallback("menulibre.desktop", "menulibre", screen, &error);
if (error)
{
g_error_free(error);
- panel_launch_desktop_file_with_fallback("matemenu-simple-editor.desktop", "matemenu-simple-editor", screen, NULL);
+ 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 a35dba88..c49de47c 100644
--- a/mate-panel/panel-menu-button.c
+++ b/mate-panel/panel-menu-button.c
@@ -667,7 +667,7 @@ panel_menu_button_load (const char *menu_path,
if (!panel_lockdown_get_locked_down () &&
(panel_is_program_in_path ("mozo") ||
- panel_is_program_in_path ("matemenu-simple-editor")))
+ panel_is_program_in_path ("menulibre")))
mate_panel_applet_add_callback (info, "edit", NULL,
_("_Edit Menus"), NULL);
@@ -988,14 +988,14 @@ panel_menu_button_invoke_menu (PanelMenuButton *button,
} else if (!strcmp (callback_name, "edit")) {
GError *error = NULL;
- panel_launch_desktop_file_with_fallback ("mozo.desktop",
- "mozo",
+ panel_launch_desktop_file_with_fallback ("menulibre.desktop",
+ "menulibre",
screen, &error);
if (error) {
g_error_free (error);
panel_launch_desktop_file_with_fallback (
- "matemenu-simple-editor.desktop",
- "matemenu-simple-editor",
+ "mozo.desktop",
+ "mozo",
screen, NULL);
}
}