[nautilus-actions] Do not try to create a Nautilus-Actions root menu if it will be empty
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Do not try to create a Nautilus-Actions root menu if it will be empty
- Date: Wed, 11 Sep 2013 19:38:53 +0000 (UTC)
commit a23496d83d07f687ee3925c6ef5b8cc15de91015
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Sep 11 21:38:37 2013 +0200
Do not try to create a Nautilus-Actions root menu if it will be empty
ChangeLog | 3 +++
src/plugin-menu/nautilus-actions.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a0d9eee..04e5186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-09-11 Pierre Wieser <pwieser trychlos org>
+ * src/plugin-menu/nautilus-actions.c (build_nautilus_menu):
+ Do not try to create a root Nautilus-Actions menu if it will be empty.
+
* src/core/na-io-provider.c (na_io_provider_get_io_providers_list):
- Fix so that the first listed I/O provider has most probability to be
writable.
diff --git a/src/plugin-menu/nautilus-actions.c b/src/plugin-menu/nautilus-actions.c
index e64194a..4c24e95 100644
--- a/src/plugin-menu/nautilus-actions.c
+++ b/src/plugin-menu/nautilus-actions.c
@@ -508,7 +508,7 @@ build_nautilus_menu( NautilusActions *plugin, guint target, GList *selection )
*/
g_object_unref( tokens );
- if( target != ITEM_TARGET_TOOLBAR ){
+ if( target != ITEM_TARGET_TOOLBAR && nautilus_menu && g_list_length( nautilus_menu )){
items_create_root_menu = na_settings_get_boolean( NA_IPREFS_ITEMS_CREATE_ROOT_MENU, NULL,
NULL );
if( items_create_root_menu ){
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]