Mercurial > gftp.yaz
comparison src/gtk/dnd.c @ 303:3b9d5797050f
2003-11-2 Brian Masney <masneyb@gftp.org>
* lib/rfc2068.c (rfc2068_chunked_read) - more improvements to this
function so that it will parse more chunked file transfers correctly.
* lib/misc.c lib/gftp.h lib/rfc2068.c src/gtk/bookmarks.c
src/gtk/dnd.c - removed remove_double_slashes(). Call gftp_build_path()
to build the paths. This now allows Novell directory listings with
//server
* lib/protocols.c src/gtk/transfer.c lib/gftp.h - added variable
conn_error_no_timeout to gftp_transfer structure. If this is enabled,
if the remote connection to the server timed out, don't wait and
immediately reconnect. So far, the only time this is used is when the
user was editing a file and it is to be uploaded back to the server.
* src/gtk/gftp-gtk.h src/gtk/transfer.c - add_file_transfer() now
returns the struct gftp_transfer that was just added.
* src/gtk/misc-gtk.c (update_directory_download_progress) - don't
make the window a popup and remove the window decorations
* src/text/gftp-text.c - don't populate the transfer_direction variable
in struct gftp_transfer. This is only needed by the GTK+ port and will
hopefully be taken out soon.
* lib/gftp.h - remove gftp_transfer_type enum. It wasn't used anymore.
author | masneyb |
---|---|
date | Mon, 03 Nov 2003 02:14:05 +0000 |
parents | 51725086634d |
children | df4c91bf4adf |
comparison
equal
deleted
inserted
replaced
302:14c0f5c3893c | 303:3b9d5797050f |
---|---|
116 listbox_drag (GtkWidget * widget, GdkDragContext * context, | 116 listbox_drag (GtkWidget * widget, GdkDragContext * context, |
117 GtkSelectionData * selection_data, guint info, guint32 clk_time, | 117 GtkSelectionData * selection_data, guint info, guint32 clk_time, |
118 gpointer data) | 118 gpointer data) |
119 { | 119 { |
120 GList * templist, * filelist; | 120 GList * templist, * filelist; |
121 char *tempstr, *str, *pos; | 121 char *tempstr, *str, *df; |
122 gftp_window_data * wdata; | 122 gftp_window_data * wdata; |
123 size_t totlen, oldlen; | 123 size_t totlen, oldlen; |
124 gftp_file * tempfle; | 124 gftp_file * tempfle; |
125 int curpos; | 125 int curpos; |
126 | 126 |
140 | 140 |
141 if (strcmp (tempfle->file, "..") == 0) | 141 if (strcmp (tempfle->file, "..") == 0) |
142 continue; | 142 continue; |
143 | 143 |
144 oldlen = totlen; | 144 oldlen = totlen; |
145 df = gftp_build_path (wdata->request->directory, tempfle->file, NULL); | |
146 | |
145 if (wdata->request->hostname == NULL || | 147 if (wdata->request->hostname == NULL || |
146 wdata->request->protonum == GFTP_LOCAL_NUM) | 148 wdata->request->protonum == GFTP_LOCAL_NUM) |
147 { | 149 { |
148 tempstr = g_strdup_printf ("%s://%s/%s ", | 150 tempstr = g_strdup_printf ("%s://%s ", |
149 wdata->request->url_prefix, | 151 wdata->request->url_prefix, df); |
150 wdata->request->directory, | 152 } |
151 tempfle->file); | 153 else if (wdata->request->username == NULL || |
152 } | 154 *wdata->request->username == '\0') |
153 else if (wdata->request->username == NULL | 155 { |
154 || *wdata->request->username == '\0') | 156 tempstr = g_strdup_printf ("%s://%s:%d%s ", |
155 { | |
156 tempstr = g_strdup_printf ("%s://%s:%d%s/%s ", | |
157 wdata->request->url_prefix, | 157 wdata->request->url_prefix, |
158 wdata->request->hostname, | 158 wdata->request->hostname, |
159 wdata->request->port, | 159 wdata->request->port, df); |
160 wdata->request->directory, | |
161 tempfle->file); | |
162 } | 160 } |
163 else | 161 else |
164 { | 162 { |
165 tempstr = g_strdup_printf ("%s://%s@%s:%d%s/%s ", | 163 tempstr = g_strdup_printf ("%s://%s@%s:%d%s ", |
166 wdata->request->url_prefix, | 164 wdata->request->url_prefix, |
167 wdata->request->username, | 165 wdata->request->username, |
168 wdata->request->hostname, | 166 wdata->request->hostname, |
169 wdata->request->port, | 167 wdata->request->port, df); |
170 wdata->request->directory, | 168 } |
171 tempfle->file); | 169 |
172 } | 170 g_free (df); |
173 | |
174 if ((pos = strchr (tempstr, ':')) != NULL) | |
175 pos += 3; | |
176 else | |
177 pos = tempstr; | |
178 remove_double_slashes (pos); | |
179 | 171 |
180 /* Note, I am allocating memory for this byte above. Note the extra space | 172 /* Note, I am allocating memory for this byte above. Note the extra space |
181 at the end of the g_strdup_printf() format argument */ | 173 at the end of the g_strdup_printf() format argument */ |
182 if (tempfle->isdir) | 174 if (tempfle->isdir) |
183 tempstr[strlen (tempstr) - 1] = '/'; | 175 tempstr[strlen (tempstr) - 1] = '/'; |