[libdazzle/libdazzle-3-26] menu: relax menu-id requirement
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle/libdazzle-3-26] menu: relax menu-id requirement
- Date: Thu, 11 Jan 2018 01:04:04 +0000 (UTC)
commit 9043eba33ba0400ae9f2def5cc28291bac710e34
Author: Christian Hergert <chergert redhat com>
Date: Sun Oct 22 16:35:41 2017 -0700
menu: relax menu-id requirement
We can allow NULL here and just clear the menu.
src/menus/dzl-menu-button.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/menus/dzl-menu-button.c b/src/menus/dzl-menu-button.c
index f1c2ac3..fbdae7e 100644
--- a/src/menus/dzl-menu-button.c
+++ b/src/menus/dzl-menu-button.c
@@ -189,6 +189,12 @@ dzl_menu_button_set_menu_id (DzlMenuButton *self,
g_return_if_fail (DZL_IS_MENU_BUTTON (self));
+ if (menu_id == NULL)
+ {
+ dzl_menu_button_set_model (self, NULL);
+ return;
+ }
+
app = g_application_get_default ();
if (DZL_IS_APPLICATION (app))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]