[nautilus-actions] Some cleanup in the code
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Some cleanup in the code
- Date: Mon, 24 Aug 2009 22:03:55 +0000 (UTC)
commit ad1bb38e8b6e08e7a045af1d989296671a4c05a7
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Aug 25 00:06:57 2009 +0200
Some cleanup in the code
Remove superfluous calls to g_type_init().
Do not try to delete an object when the Actions list is empty (as Delete
accelerator is always enabled, even if the Delete menu item is not).
ChangeLog | 8 ++++++++
src/nact/nact-assistant.c | 2 --
src/nact/nact-imenubar.c | 4 ++++
src/nact/nact-window.c | 2 --
4 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index aa44dc1..fbbfd6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,14 @@
* src/common/na-xml-names.h:
Long names are rewritten on several lines for more readability.
+ * src/nact/nact-assistant.c:
+ * src/nact/nact-window.c:
+ Remove superfluous calls to g_type_init().
+
+ * src/nact/nact-imenubar.c:
+ Do not try to delete an object when the list is empty (as Delete
+ accelerator is always active, even if the Delete menu item is not).
+
2009-08-23 Pierre Wieser <pwieser trychlos org>
Get rid of unwanted notifications.
diff --git a/src/nact/nact-assistant.c b/src/nact/nact-assistant.c
index cac0f0f..e414c6f 100644
--- a/src/nact/nact-assistant.c
+++ b/src/nact/nact-assistant.c
@@ -117,8 +117,6 @@ register_type( void )
g_debug( "%s", thisfn );
- g_type_init();
-
type = g_type_register_static( NACT_WINDOW_TYPE, "NactAssistant", &info, 0 );
return( type );
diff --git a/src/nact/nact-imenubar.c b/src/nact/nact-imenubar.c
index f9b5919..ba58a22 100644
--- a/src/nact/nact-imenubar.c
+++ b/src/nact/nact-imenubar.c
@@ -646,6 +646,10 @@ on_delete_activated( GtkMenuItem *item, NactWindow *window )
g_debug( "%s: item=%p, window=%p", thisfn, ( void * ) item, ( void * ) window );
object = v_get_selected( window );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+ if( !object ){
+ return;
+ }
if( NA_IS_ACTION( object )){
uuid = na_action_get_uuid( NA_ACTION( object ));
diff --git a/src/nact/nact-window.c b/src/nact/nact-window.c
index 392c59a..8282db4 100644
--- a/src/nact/nact-window.c
+++ b/src/nact/nact-window.c
@@ -115,8 +115,6 @@ register_type( void )
g_debug( "%s", thisfn );
- g_type_init();
-
type = g_type_register_static( BASE_WINDOW_TYPE, "NactWindow", &info, 0 );
g_type_add_interface_static( type, NACT_IPREFS_TYPE, &prefs_iface_info );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]