[nautilus-sendto] main: Fix ext/plugin confusion
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-sendto] main: Fix ext/plugin confusion
- Date: Wed, 3 Nov 2010 23:44:12 +0000 (UTC)
commit f203050aa720923ac3351937b354c42ae93a6355
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 3 17:01:06 2010 +0000
main: Fix ext/plugin confusion
This allows the send-files function to work.
src/nautilus-sendto-command.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-sendto-command.c b/src/nautilus-sendto-command.c
index 1517cbc..e4547f7 100644
--- a/src/nautilus-sendto-command.c
+++ b/src/nautilus-sendto-command.c
@@ -42,7 +42,7 @@ enum {
COLUMN_IS_SEPARATOR,
COLUMN_ICON,
COLUMN_ID,
- COLUMN_EXT,
+ COLUMN_PLUGIN,
COLUMN_PAGE_NUM,
COLUMN_DESCRIPTION,
COLUMN_CAN_SEND,
@@ -129,6 +129,7 @@ send_button_cb (GtkWidget *widget, NautilusSendto *nst)
GtkTreeSelection *treeselection;
GtkTreeIter iter;
char *id;
+ NautilusSendtoPlugin *plugin;
PeasExtension *ext;
treeselection = gtk_tree_view_get_selection (GTK_TREE_VIEW (nst->options_treeview));
@@ -139,8 +140,9 @@ send_button_cb (GtkWidget *widget, NautilusSendto *nst)
gtk_tree_model_get (model, &iter,
COLUMN_ID, &id,
- COLUMN_EXT, &ext,
+ COLUMN_PLUGIN, &plugin,
-1);
+ ext = g_object_get_data (G_OBJECT (plugin), "ext");
g_settings_set_string (nst->settings,
NAUTILUS_SENDTO_LAST_MEDIUM,
@@ -278,7 +280,7 @@ add_widget_cb (NautilusSendtoPlugin *plugin,
COLUMN_IS_SEPARATOR, FALSE,
COLUMN_ICON, pixbuf,
COLUMN_ID, id,
- COLUMN_EXT, plugin,
+ COLUMN_PLUGIN, plugin,
COLUMN_PAGE_NUM, page_num,
COLUMN_DESCRIPTION, name,
-1);
@@ -337,6 +339,8 @@ set_model_for_options_treeview (NautilusSendto *nst)
continue;
}
+ g_object_set_data (G_OBJECT (object), "ext", ext);
+
g_signal_connect (object, "add-widget",
G_CALLBACK (add_widget_cb), nst);
g_signal_connect (object, "can-send",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]