1 --- gnome-system-tools-2.13.2/src/shares/share-export.c-orig 2006-03-03 16:16:05.157378000 +0000
2 +++ gnome-system-tools-2.13.2/src/shares/share-export.c 2006-03-03 16:16:26.132960000 +0000
4 if (GST_SHARE_GET_CLASS (share)->get_xml == NULL)
7 - return GST_SHARE_GET_CLASS (share)->get_xml (share, parent);
8 + GST_SHARE_GET_CLASS (share)->get_xml (share, parent);
11 diff -u gnome-system-tools-2.14.0/src/shares/callbacks.c-orig gnome-system-tools-2.14.0/src/shares/callbacks.c
12 --- gnome-system-tools-2.14.0/src/shares/callbacks.c-orig 2005-08-08 20:00:03.000000000 +0100
13 +++ gnome-system-tools-2.14.0/src/shares/callbacks.c 2006-10-23 15:31:55.258228000 +0100
15 path = g_strdup (gnome_vfs_uri_get_path (uris->data));
17 if (g_file_test (path, G_FILE_TEST_IS_DIR)) {
18 - share_settings_dialog_run (path, FALSE);
19 + share_settings_dialog_run (path, ANY_SHARE, FALSE);
20 gtk_drag_finish (context, TRUE, FALSE, time);
22 gtk_drag_finish (context, FALSE, FALSE, time);
25 on_add_share_clicked (GtkWidget *widget, gpointer data)
27 - share_settings_dialog_run (NULL, FALSE);
28 + share_settings_dialog_run (NULL, ANY_SHARE, FALSE);
38 table = gst_dialog_get_widget (tool->main_dialog, "shares_table");
39 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (table));
41 if (!gtk_tree_selection_get_selected (selection, &model, &iter))
44 - gtk_tree_model_get (model, &iter, COL_PATH, &path, -1);
45 + gtk_tree_model_get (model, &iter, COL_PATH, &path, COL_SHARETYPE, &share_type, -1);
47 - share_settings_dialog_run (path, FALSE);
48 + share_settings_dialog_run (path, share_type, FALSE);
53 diff -u gnome-system-tools-2.14.0/src/shares/main.c-orig gnome-system-tools-2.14.0/src/shares/main.c
54 --- gnome-system-tools-2.14.0/src/shares/main.c-orig 2005-08-08 20:00:03.000000000 +0100
55 +++ gnome-system-tools-2.14.0/src/shares/main.c 2006-10-23 15:31:55.362018000 +0100
57 init_standalone_dialog (const gchar *path)
59 gst_tool_main_with_hidden_dialog (tool, TRUE);
60 - share_settings_dialog_run (path, TRUE);
61 + share_settings_dialog_run (path, ANY_SHARE, TRUE);
66 diff -u gnome-system-tools-2.14.0/src/shares/share-export-nfs.c-orig gnome-system-tools-2.14.0/src/shares/share-export-nfs.c
67 --- gnome-system-tools-2.14.0/src/shares/share-export-nfs.c-orig 2006-11-13 13:30:16.525878000 +0800
68 +++ gnome-system-tools-2.14.0/src/shares/share-export-nfs.c 2006-11-13 13:13:57.350210000 +0800
72 share = g_object_new (GST_TYPE_SHARE_NFS,
76 + gst_share_set_path (GST_SHARE (share), path);
90 diff -u gnome-system-tools-2.14.0/src/shares/share-settings.c-orig gnome-system-tools-2.14.0/src/shares/share-settings.c
91 --- gnome-system-tools-2.14.0/src/shares/share-settings.c-orig 2006-11-13 13:31:05.341437000 +0800
92 +++ gnome-system-tools-2.14.0/src/shares/share-settings.c 2006-11-13 13:26:19.086675000 +0800
96 widget = gst_dialog_get_widget (tool->main_dialog, "share_path");
97 - path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (widget));
98 + path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
100 widget = gst_dialog_get_widget (tool->main_dialog, "share_smb_name");
101 name = gtk_entry_get_text (GTK_ENTRY (widget));
105 widget = gst_dialog_get_widget (tool->main_dialog, "share_path");
106 - path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (widget));
107 + path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
109 share = gst_share_nfs_new (path);
110 nfs_acl_table_insert_elements (share);
115 -share_settings_dialog_run (const gchar *path, gboolean standalone)
116 +share_settings_dialog_run (const gchar *path, gint share_type, gboolean standalone)
121 dialog = share_settings_prepare_dialog (path, standalone);
123 /* check whether the path already exists */
124 - path_exists = table_get_iter_with_path (path, &iter);
125 + path_exists = table_get_iter_with_path (path, share_type, &iter);
128 share = table_get_share_at_iter (&iter);
130 diff -u gnome-system-tools-2.14.0/src/shares/share-settings.h-orig gnome-system-tools-2.14.0/src/shares/share-settings.h
131 --- gnome-system-tools-2.14.0/src/shares/share-settings.h-orig 2005-04-06 23:21:44.000000000 +0100
132 +++ gnome-system-tools-2.14.0/src/shares/share-settings.h 2006-10-23 15:31:55.555242000 +0100
137 -void share_settings_dialog_run (const gchar*, gboolean);
138 +void share_settings_dialog_run (const gchar*, gint, gboolean);
139 void share_settings_create_combo (void);
140 gboolean share_settings_validate (void);
143 diff -u gnome-system-tools-2.14.0/src/shares/table.c-orig gnome-system-tools-2.14.0/src/shares/table.c
144 --- gnome-system-tools-2.14.0/src/shares/table.c-orig 2005-08-08 20:00:03.000000000 +0100
145 +++ gnome-system-tools-2.14.0/src/shares/table.c 2006-10-23 15:31:55.679417000 +0100
147 store = gtk_list_store_new (COL_LAST,
154 return GTK_TREE_MODEL (store);
157 GtkWidget *table = gst_dialog_get_widget (tool->main_dialog, "shares_table");
159 GdkPixbuf *pixbuf = NULL;
160 + gint share_type = ANY_SHARE;
162 g_return_if_fail (share != NULL);
163 g_return_if_fail (GST_IS_SHARE (share));
164 @@ -195,17 +197,20 @@
165 pixbuf = gtk_icon_theme_load_icon (icon_theme,
168 + share_type = SMB_SHARE;
169 } else if (GST_IS_SHARE_NFS (share)) {
170 pixbuf = gtk_icon_theme_load_icon (icon_theme,
173 + share_type = NFS_SHARE;
176 gtk_list_store_set (GTK_LIST_STORE (model),
179 - 1, gst_share_get_path (share),
181 + COL_PIXBUF, pixbuf,
182 + COL_PATH, gst_share_get_path (share),
183 + COL_POINTER, share,
184 + COL_SHARETYPE, share_type,
187 g_object_unref (share);
188 @@ -241,12 +246,13 @@
192 -table_get_iter_with_path (const gchar *path, GtkTreeIter *iter)
193 +table_get_iter_with_path (const gchar *path, gint share_type, GtkTreeIter *iter)
195 GtkWidget *table = gst_dialog_get_widget (tool->main_dialog, "shares_table");
197 gboolean valid, found;
199 + gint iter_share_type;
205 gtk_tree_model_get (model, iter,
206 COL_PATH, &iter_path,
207 + COL_SHARETYPE, &iter_share_type,
210 - if (strcmp (iter_path, path) == 0) {
211 + if (strcmp (iter_path, path) == 0 &&
212 + ( iter_share_type == share_type || iter_share_type == ANY_SHARE ) ) {
217 diff -u gnome-system-tools-2.14.0/src/shares/table.h-orig gnome-system-tools-2.14.0/src/shares/table.h
218 --- gnome-system-tools-2.14.0/src/shares/table.h-orig 2004-09-20 16:30:44.000000000 +0100
219 +++ gnome-system-tools-2.14.0/src/shares/table.h 2006-10-23 15:31:55.698077000 +0100
238 void table_create (void);
239 void table_add_share_from_node (xmlNodePtr);
240 void table_add_share (GstShare*);
241 -gboolean table_get_iter_with_path (const gchar*, GtkTreeIter*);
242 +gboolean table_get_iter_with_path (const gchar*, gint, GtkTreeIter*);
243 GstShare* table_get_share_at_iter (GtkTreeIter*);
244 void table_modify_share_at_iter (GtkTreeIter*, GstShare*);
245 void table_delete_share_at_iter (GtkTreeIter*);