[nautilus-sendto] Fix dynamic changes in "can-send" from plugins
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-sendto] Fix dynamic changes in "can-send" from plugins
- Date: Fri, 27 Aug 2010 19:34:36 +0000 (UTC)
commit b7ec5f1af3c40720a9c9a59a3e1b5b1f8f29750a
Author: Bastien Nocera <hadess hadess net>
Date: Fri Aug 27 20:33:16 2010 +0100
Fix dynamic changes in "can-send" from plugins
When the plugin changes its own "can-send" status, apply it
straight away if the page is the selected one. Otherwise it
will take going to another page and back for it to be applied.
src/nautilus-sendto-command.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index 899cc94..9258af2 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -177,10 +177,16 @@ can_send_cb (NautilusSendtoPlugin *plugin,
-1);
if (selected_id != NULL &&
g_str_equal (id, selected_id) != FALSE) {
+ GtkTreeSelection *selection;
+
g_free (selected_id);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
COLUMN_CAN_SEND, can_send,
-1);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (nst->options_treeview));
+ if (gtk_tree_selection_iter_is_selected (selection, &iter))
+ gtk_widget_set_sensitive (nst->send_button, can_send);
return;
}
g_free (selected_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]