[dia] Bug 613133 - gvfs support in open/save file dialog
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Bug 613133 - gvfs support in open/save file dialog
- Date: Sun, 22 Aug 2010 12:46:06 +0000 (UTC)
commit 249956fb881f48e8e5af4c4d2471d43aaacc8c39
Author: Hans Breuer <hans breuer org>
Date: Sun Aug 22 14:46:03 2010 +0200
Bug 613133 - gvfs support in open/save file dialog
A simple gtk_file_chooser_set_local_only(filedlg, FALSE) does the
trick. If it gives 'Bad file descriptor' for save or 'Access denied'
for export this is most probably due to missing write access to
the server (share).
app/filedlg.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/app/filedlg.c b/app/filedlg.c
index a5f9c37..5e75c14 100644
--- a/app/filedlg.c
+++ b/app/filedlg.c
@@ -282,6 +282,8 @@ file_open_callback(gpointer data, guint action, GtkWidget *widget)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
+ /* is activating gvfs really that easy - at least it works for samba shares*/
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(opendlg), FALSE);
gtk_dialog_set_default_response(GTK_DIALOG(opendlg), GTK_RESPONSE_ACCEPT);
gtk_window_set_role(GTK_WINDOW(opendlg), "open_diagram");
if (dia && dia->filename)
@@ -441,6 +443,10 @@ file_save_as_callback(gpointer data, guint action, GtkWidget *widget)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
+ /* vfs saving is as easy - if you see 'bad file descriptor' there is
+ * something wrong with the permissions of the share ;) */
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(savedlg), FALSE);
+
gtk_dialog_set_default_response(GTK_DIALOG(savedlg), GTK_RESPONSE_ACCEPT);
gtk_window_set_role(GTK_WINDOW(savedlg), "save_diagram");
/* Need better way to make it a reasonable size. Isn't there some*/
@@ -705,6 +711,10 @@ file_export_callback(gpointer data, guint action, GtkWidget *widget)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
+ /* export via vfs gives: Permission denied - but only if you do not
+ * have write permissions ;) */
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(exportdlg), FALSE);
+
gtk_dialog_set_default_response(GTK_DIALOG(exportdlg), GTK_RESPONSE_ACCEPT);
gtk_window_set_role(GTK_WINDOW(exportdlg), "export_diagram");
g_signal_connect(GTK_OBJECT(exportdlg), "destroy",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]