[gnome-panel] panel: Fix loading of main menu
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] panel: Fix loading of main menu
- Date: Mon, 19 Sep 2011 15:14:05 +0000 (UTC)
commit 066c35f46008582027f2deedc660b348496c2be5
Author: Vincent Untz <vuntz gnome org>
Date: Mon Sep 19 17:13:41 2011 +0200
panel: Fix loading of main menu
https://bugzilla.gnome.org/show_bug.cgi?id=658863
gnome-panel/panel-menu-button.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gnome-panel/panel-menu-button.c b/gnome-panel/panel-menu-button.c
index bedf6a6..c852189 100644
--- a/gnome-panel/panel-menu-button.c
+++ b/gnome-panel/panel-menu-button.c
@@ -749,9 +749,12 @@ panel_menu_button_load (PanelWidget *panel,
tooltip = g_settings_get_string (settings_instance,
PANEL_MENU_BUTTON_TOOLTIP_KEY);
- scheme = g_strndup (menu_path, strcspn (menu_path, ":"));
- root = panel_menu_scheme_to_path_root (scheme);
- g_free (scheme);
+ if (!PANEL_GLIB_STR_EMPTY (menu_path)) {
+ scheme = g_strndup (menu_path, strcspn (menu_path, ":"));
+ root = panel_menu_scheme_to_path_root (scheme);
+ g_free (scheme);
+ } else
+ root = APPLICATIONS_MENU;
if (root == LAST_MENU) {
g_printerr ("Unknown menu scheme, cannot load menu button\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]