Commit 291d1b5b278bec43ccbbd3d0731c54baac326064

Authored by Martin Wimpress
1 parent 5794a85e

debian/patches: Add 1001_fix_menubar_launching_for_mozo.diff

debian/patches/1001_fix_menubar_launching_for_mozo.diff 0 → 100644
... ... @@ -0,0 +1,55 @@
  1 +diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c
  2 +index fc13165..eefd2ec 100644
  3 +--- a/mate-panel/panel-menu-bar.c
  4 ++++ b/mate-panel/panel-menu-bar.c
  5 +@@ -404,15 +404,10 @@ void panel_menu_bar_invoke_menu(PanelMenuBar* menubar, const char* callback_name
  6 + }
  7 + else if (!strcmp(callback_name, "edit"))
  8 + {
  9 +- GError* error = NULL;
  10 +-
  11 +- panel_launch_desktop_file_with_fallback("menulibre.desktop", "menulibre", screen, &error);
  12 +-
  13 +- if (error)
  14 +- {
  15 +- g_error_free(error);
  16 ++ if (panel_is_program_in_path("menulibre"))
  17 ++ panel_launch_desktop_file_with_fallback("menulibre.desktop", "menulibre", screen, NULL);
  18 ++ else
  19 + panel_launch_desktop_file_with_fallback("mozo.desktop", "mozo", screen, NULL);
  20 +- }
  21 + }
  22 + }
  23 +
  24 +diff --git a/mate-panel/panel-menu-button.c b/mate-panel/panel-menu-button.c
  25 +index 3fd7003..74cf0df 100644
  26 +--- a/mate-panel/panel-menu-button.c
  27 ++++ b/mate-panel/panel-menu-button.c
  28 +@@ -989,18 +989,15 @@ panel_menu_button_invoke_menu (PanelMenuButton *button,
  29 + panel_show_help (screen, "mate-user-guide", "gospanel-37", NULL);
  30 +
  31 + } else if (!strcmp (callback_name, "edit")) {
  32 +- GError *error = NULL;
  33 +-
  34 +- panel_launch_desktop_file_with_fallback ("menulibre.desktop",
  35 +- "menulibre",
  36 +- screen, &error);
  37 +- if (error) {
  38 +- g_error_free (error);
  39 +- panel_launch_desktop_file_with_fallback (
  40 +- "mozo.desktop",
  41 +- "mozo",
  42 +- screen, NULL);
  43 +- }
  44 ++
  45 ++ if (panel_is_program_in_path ("menulibre"))
  46 ++ panel_launch_desktop_file_with_fallback ("menulibre.desktop",
  47 ++ "menulibre",
  48 ++ screen, NULL);
  49 ++ else
  50 ++ panel_launch_desktop_file_with_fallback ("mozo.desktop",
  51 ++ "mozo",
  52 ++ screen, NULL);
  53 + }
  54 + }
  55 +
... ...
debian/patches/series
1 1 1000_prevent_menubar_destruction_when_enabling_global_menus.patch
  2 +1001_fix_menubar_launching_for_mozo.diff
... ...