[nautilus-actions] Remove set but unsused variables



commit 471b5db550bb39e3aea31b9f6c84b5f60e03560e
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Nov 2 22:03:49 2011 +0100

    Remove set but unsused variables

 ChangeLog                             |   12 ++++++++++++
 src/io-desktop/nadp-writer.c          |    2 --
 src/nact/base-gtk-utils.c             |    9 ---------
 src/nact/nact-assistant-import.c      |    2 --
 src/nact/nact-clipboard.c             |    6 ------
 src/nact/nact-main-statusbar.c        |    2 --
 src/nact/nact-preferences-editor.c    |    2 --
 src/nact/nact-providers-list.c        |    5 ++---
 src/test/test-virtuals-without-test.c |    6 ------
 9 files changed, 14 insertions(+), 32 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ab9fd05..89cd153 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-11-02 Pierre Wieser <pwieser trychlos org>
+
+	* src/io-desktop/nadp-writer.c (nadp_iio_provider_is_able_to_write):
+	* src/nact/base-gtk-utils.c (base_gtk_utils_select_file_with_preview):
+	* src/nact/nact-assistant-import.c (prepare_confirm):
+	* src/nact/nact-clipboard.c (nact_clipboard_dnd_set):
+	* src/nact/nact-main-statusbar.c (nact_main_statusbar_set_locked):
+	* src/nact/nact-preferences-editor.c (desktop_setup):
+	* src/nact/nact-providers-list.c (on_selection_changed):
+	* src/test/test-virtuals-without-test.c (first_instance_dispose):
+	Remove set but unused variables.
+
 2011-07-25 Pierre Wieser <pwieser trychlos org>
 
 	* configure.ac: Fix test for nautilus_menu_provider_get_toolbar_items().
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index 8450e7e..1f1be0a 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -94,12 +94,10 @@ nadp_iio_provider_is_able_to_write( const NAIIOProvider *provider )
 	static const gchar *thisfn = "nadp_writer_iio_provider_is_able_to_write";
 	gboolean able_to;
 	gchar *userdir;
-	GSList *messages;
 
 	g_return_val_if_fail( NADP_IS_DESKTOP_PROVIDER( provider ), FALSE );
 
 	able_to = FALSE;
-	messages = NULL;
 
 	userdir = nadp_xdg_dirs_get_user_data_dir();
 
diff --git a/src/nact/base-gtk-utils.c b/src/nact/base-gtk-utils.c
index 836fe18..7cbeb66 100644
--- a/src/nact/base-gtk-utils.c
+++ b/src/nact/base-gtk-utils.c
@@ -38,7 +38,6 @@
 #include <core/na-updater.h>
 
 #include "base-gtk-utils.h"
-#include "nact-application.h"
 
 #define NACT_PROP_TOGGLE_BUTTON				"nact-prop-toggle-button"
 #define NACT_PROP_TOGGLE_HANDLER			"nact-prop-toggle-handler"
@@ -574,16 +573,12 @@ base_gtk_utils_select_file_with_preview( BaseWindow *window,
 				GtkWidget *entry, const gchar *entry_name,
 				GCallback update_preview_cb )
 {
-	NactApplication *application;
-	NAUpdater *updater;
 	GtkWindow *toplevel;
 	GtkWidget *dialog;
 	const gchar *text;
 	gchar *filename, *uri;
 	GtkWidget *preview;
 
-	application = NACT_APPLICATION( base_window_get_application( window ));
-	updater = nact_application_get_updater( application );
 	toplevel = base_window_get_gtk_toplevel( window );
 
 	dialog = gtk_file_chooser_dialog_new(
@@ -655,15 +650,11 @@ base_gtk_utils_select_dir( BaseWindow *window,
 				const gchar *title, const gchar *wsp_name,
 				GtkWidget *entry, const gchar *entry_name )
 {
-	NactApplication *application;
-	NAUpdater *updater;
 	GtkWindow *toplevel;
 	GtkWidget *dialog;
 	const gchar *text;
 	gchar *dir, *uri;
 
-	application = NACT_APPLICATION( base_window_get_application( window ));
-	updater = nact_application_get_updater( application );
 	toplevel = base_window_get_gtk_toplevel( window );
 
 	dialog = gtk_file_chooser_dialog_new(
diff --git a/src/nact/nact-assistant-import.c b/src/nact/nact-assistant-import.c
index be4ba70..ce060b3 100644
--- a/src/nact/nact-assistant-import.c
+++ b/src/nact/nact-assistant-import.c
@@ -524,13 +524,11 @@ prepare_confirm( NactAssistantImport *window, GtkAssistant *assistant, GtkWidget
 static gint
 get_import_mode( NactAssistantImport *window )
 {
-	GtkToggleButton *no_import_button;
 	GtkToggleButton *renumber_button;
 	GtkToggleButton *override_button;
 	GtkToggleButton *ask_button;
 	gint mode;
 
-	no_import_button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "NoImportButton" ));
 	renumber_button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "RenumberButton" ));
 	override_button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "OverrideButton" ));
 	ask_button = GTK_TOGGLE_BUTTON( base_window_get_widget( BASE_WINDOW( window ), "AskButton" ));
diff --git a/src/nact/nact-clipboard.c b/src/nact/nact-clipboard.c
index c8e0e67..264beac 100644
--- a/src/nact/nact-clipboard.c
+++ b/src/nact/nact-clipboard.c
@@ -287,7 +287,6 @@ nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, con
 {
 	static const gchar *thisfn = "nact_clipboard_dnd_set";
 	NactClipboardDndData *data;
-	GtkTreeModel *model;
 	GList *it;
 
 	g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
@@ -302,8 +301,6 @@ nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, con
 		data->rows = NULL;
 		data->copy = copy_data;
 
-		model = gtk_tree_row_reference_get_model(( GtkTreeRowReference * ) rows->data );
-
 		for( it = rows ; it ; it = it->next ){
 			data->rows = g_list_append(
 					data->rows,
@@ -337,7 +334,6 @@ nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy_data )
 	GList *rows = NULL;
 	GtkSelectionData *selection;
 	NactClipboardDndData *data;
-	GtkTreeModel *model;
 	GList *it;
 
 	g_debug( "%s: clipboard=%p", thisfn, ( void * ) clipboard );
@@ -362,8 +358,6 @@ nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy_data )
 #endif
 			if( data->target == NACT_XCHANGE_FORMAT_NACT ){
 
-				model = gtk_tree_row_reference_get_model(( GtkTreeRowReference * ) data->rows->data );
-
 				for( it = data->rows ; it ; it = it->next ){
 					rows = g_list_append( rows,
 							gtk_tree_row_reference_copy(( GtkTreeRowReference * ) it->data ));
diff --git a/src/nact/nact-main-statusbar.c b/src/nact/nact-main-statusbar.c
index 309697f..afd4879 100644
--- a/src/nact/nact-main-statusbar.c
+++ b/src/nact/nact-main-statusbar.c
@@ -198,13 +198,11 @@ nact_main_statusbar_set_locked( NactMainWindow *window, gboolean readonly, gint
 	GtkStatusbar *bar;
 	GtkFrame *frame;
 	GtkImage *image;
-	GdkPixbuf *pixbuf;
 	gchar *tooltip;
 	gboolean set_pixbuf;
 
 	g_debug( "%s: window=%p, readonly=%s, reason=%d", thisfn, ( void * ) window, readonly ? "True":"False", reason );
 
-	pixbuf = NULL;
 	set_pixbuf = TRUE;
 	bar = get_statusbar( window );
 	frame = GTK_FRAME( base_window_get_widget( BASE_WINDOW( window ), "ActionLockedFrame" ));
diff --git a/src/nact/nact-preferences-editor.c b/src/nact/nact-preferences-editor.c
index c53917e..20b4f62 100644
--- a/src/nact/nact-preferences-editor.c
+++ b/src/nact/nact-preferences-editor.c
@@ -703,14 +703,12 @@ desktop_create_model( NactPreferencesEditor *editor )
 static void
 desktop_setup( NactPreferencesEditor *editor )
 {
-	gboolean editable;
 	GtkWidget *combo;
 	const NADesktopEnv *desktops;
 	guint i;
 	gint found;
 
 	editor->private->desktop = na_settings_get_string( NA_IPREFS_DESKTOP_ENVIRONMENT, NULL, &editor->private->desktop_mandatory );
-	editable = !editor->private->preferences_locked && !editor->private->desktop_mandatory;
 
 	combo = base_window_get_widget( BASE_WINDOW( editor ), "DesktopComboBox" );
 	found = -1;
diff --git a/src/nact/nact-providers-list.c b/src/nact/nact-providers-list.c
index 5f8a15e..fb51e19 100644
--- a/src/nact/nact-providers-list.c
+++ b/src/nact/nact-providers-list.c
@@ -438,7 +438,6 @@ on_selection_changed( GtkTreeSelection *selection, BaseWindow *window )
 	GtkTreePath *path;
 	gboolean may_up, may_down;
 	gboolean order_mandatory;
-	GSList *write_order;
 	ProvidersListData *data;
 	GtkTreeView *treeview;
 
@@ -447,12 +446,12 @@ on_selection_changed( GtkTreeSelection *selection, BaseWindow *window )
 
 	may_up = FALSE;
 	may_down = FALSE;
+	/* TODO */
+	order_mandatory = FALSE;
 
 	treeview = GTK_TREE_VIEW( g_object_get_data( G_OBJECT( window ), PROVIDERS_LIST_TREEVIEW ));
 	data = get_providers_list_data( treeview );
 
-	write_order = na_settings_get_string_list( NA_IPREFS_IO_PROVIDERS_WRITE_ORDER, NULL, &order_mandatory );
-
 	if( !data->preferences_locked &&
 		!order_mandatory &&
 		gtk_tree_selection_get_selected( selection, &model, &iter )){
diff --git a/src/test/test-virtuals-without-test.c b/src/test/test-virtuals-without-test.c
index de2861d..e58a910 100755
--- a/src/test/test-virtuals-without-test.c
+++ b/src/test/test-virtuals-without-test.c
@@ -225,11 +225,9 @@ static void
 first_instance_dispose( GObject *instance )
 {
 	static const gchar *thisfn = "first_instance_dispose";
-	PwiFirst *self;
 
 	g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
 	g_assert( PWI_IS_FIRST( instance ));
-	self = PWI_FIRST( instance );
 
 	/* chain up to the parent class */
 	G_OBJECT_CLASS( st_first_parent_class )->dispose( instance );
@@ -388,11 +386,9 @@ static void
 first_second_instance_dispose( GObject *instance )
 {
 	static const gchar *thisfn = "first_second_instance_dispose";
-	PwiFirstSecond *self;
 
 	g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
 	g_assert( PWI_IS_FIRST_SECOND( instance ));
-	self = PWI_FIRST_SECOND( instance );
 
 	/* chain up to the parent class */
 	G_OBJECT_CLASS( st_first_second_parent_class )->dispose( instance );
@@ -520,11 +516,9 @@ static void
 first_second_three_instance_dispose( GObject *instance )
 {
 	static const gchar *thisfn = "first_second_three_instance_dispose";
-	PwiFirstSecondThree *self;
 
 	g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
 	g_assert( PWI_IS_FIRST_SECOND_THREE( instance ));
-	self = PWI_FIRST_SECOND_THREE( instance );
 
 	/* chain up to the parent class */
 	G_OBJECT_CLASS( st_first_second_three_parent_class )->dispose( instance );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]