Mercurial > pidgin
diff src/gtkft.c @ 5131:feda37d46e17
[gaim-migrate @ 5494]
Added an overlay icon for "Not Authorized" buddies for ICQ, as suggested
by Nathan Walp.
Added a "Status: Not Authorized" line to the tooltip for ICQ buddies whose
authorization you don't have. This required making the gaim core call the
tooltip_text prpl function for offline buddies (previously it was only
called for online buddies).
Fixed the right-click "Re-request authorization" action. That was a stupid
problem with a } being in the wrong place at the wrong time. I put it in
line. Some brackets just require more guidance than others.
Fixed a minor crashbug on solaris when trying to print NULL values.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 14 Apr 2003 18:24:38 +0000 |
| parents | eea963dcd1ed |
| children | 71927464a1db |
line wrap: on
line diff
--- a/src/gtkft.c Mon Apr 14 05:17:35 2003 +0000 +++ b/src/gtkft.c Mon Apr 14 18:24:38 2003 +0000 @@ -990,7 +990,24 @@ name = gtk_file_selection_get_filename(GTK_FILE_SELECTION(data->filesel)); - if (stat(name, &st) == 0) { + if (stat(name, &st) != 0) { + /* File not found. */ + if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { + gaim_xfer_request_accepted(xfer, g_strdup(name)); + } + else { + do_error_dialog(_("That file does not exist."), + NULL, GAIM_ERROR); + + gaim_xfer_request_denied(xfer); + } + } + else if ((gaim_xfer_get_type(xfer) == GAIM_XFER_SEND) && (st.st_size == 0)) { + do_error_dialog(_("Can not send a file of 0 bytes."), NULL, GAIM_ERROR); + + gaim_xfer_request_denied(xfer); + } + else { if (S_ISDIR(st.st_mode)) { /* XXX */ gaim_xfer_request_denied(xfer); @@ -1009,18 +1026,6 @@ gaim_xfer_request_accepted(xfer, g_strdup(name)); } } - else { - /* File not found. */ - if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { - gaim_xfer_request_accepted(xfer, g_strdup(name)); - } - else { - do_error_dialog(_("That file does not exist."), - NULL, GAIM_ERROR); - - gaim_xfer_request_denied(xfer); - } - } gtk_widget_destroy(data->filesel); data->filesel = NULL;
