[nautilus-actions] nact-tree-model-dnd.c: get ride of base_application_get_main_window() calls
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] nact-tree-model-dnd.c: get ride of base_application_get_main_window() calls
- Date: Fri, 21 Jan 2011 18:47:33 +0000 (UTC)
commit 1e568113dfbfe584b48e12e8a4a2c12d646748d4
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Jan 20 23:46:07 2011 +0100
nact-tree-model-dnd.c: get ride of base_application_get_main_window() calls
ChangeLog | 3 +++
src/nact/nact-tree-model-dnd.c | 12 +++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9770e51..bda2861 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-01-20 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-tree-model-dnd.c (drop_inside, is_drop_possible,
+ drop_uri_list): Remove base_application_get_main_window() invocations.
+
* src/nact/nact-main.c: Renamed as main.c
* src/nact/Makefile.am: Updated accordingly.
diff --git a/src/nact/nact-tree-model-dnd.c b/src/nact/nact-tree-model-dnd.c
index 8747a5b..b945ba8 100644
--- a/src/nact/nact-tree-model-dnd.c
+++ b/src/nact/nact-tree-model-dnd.c
@@ -586,7 +586,9 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
application = NACT_APPLICATION( base_window_get_application( model->private->window ));
updater = nact_application_get_updater( application );
- main_window = NACT_MAIN_WINDOW( base_application_get_main_window( BASE_APPLICATION( application )));
+
+ g_return_val_if_fail( NACT_IS_MAIN_WINDOW( model->private->window ), FALSE );
+ main_window = NACT_MAIN_WINDOW( model->private->window );
/*
* NACT format (may embed profiles, or not)
@@ -677,7 +679,9 @@ is_drop_possible( NactTreeModel *model, GtkTreePath *dest, NAObjectItem **parent
drop_ok = FALSE;
parent_dest = NULL;
application = NACT_APPLICATION( base_window_get_application( model->private->window ));
- main_window = NACT_MAIN_WINDOW( base_application_get_main_window( BASE_APPLICATION( application )));
+
+ g_return_val_if_fail( NACT_IS_MAIN_WINDOW( model->private->window ), FALSE );
+ main_window = NACT_MAIN_WINDOW( model->private->window );
/* if we can have an iter on given dest, then the dest already exists
* so dropped items should be of the same type that already existing
@@ -882,7 +886,9 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
application = NACT_APPLICATION( base_window_get_application( model->private->window ));
updater = nact_application_get_updater( application );
- main_window = NACT_MAIN_WINDOW( base_application_get_main_window( BASE_APPLICATION( application )));
+
+ g_return_val_if_fail( NACT_IS_MAIN_WINDOW( model->private->window ), FALSE );
+ main_window = NACT_MAIN_WINDOW( model->private->window );
#if GTK_CHECK_VERSION( 2, 14, 0 )
selection_data_data = ( const gchar * ) gtk_selection_data_get_data( selection_data );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]