From: Fredrik Tolf Date: Wed, 15 Aug 2007 01:21:10 +0000 (+0200) Subject: Only notify when dolcon has not been launched from doldacond-shell. X-Git-Tag: 1.0~56 X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=43edea91c0417cbe78b1f3ec738798a411d771e3 Only notify when dolcon has not been launched from doldacond-shell. --- diff --git a/clients/gui-shell/dsh.c b/clients/gui-shell/dsh.c index 51332fc..e5bb9bb 100644 --- a/clients/gui-shell/dsh.c +++ b/clients/gui-shell/dsh.c @@ -174,11 +174,13 @@ void trstatechange(struct dc_transfer *tr, int ostate) if((ostate == DC_TRNS_MAIN) && (tr->dir == DC_TRNSD_DOWN)) { if(tr->state == DC_TRNS_DONE) { #ifdef HAVE_NOTIFY - notify(&trnote, "transfer.complete", _("Transfer complete"), _("Finished downloading %ls from %ls"), getfilename(tr->path), tr->peernick); + if(dcpid == 0) + notify(&trnote, "transfer.complete", _("Transfer complete"), _("Finished downloading %ls from %ls"), getfilename(tr->path), tr->peernick); #endif } else { #ifdef HAVE_NOTIFY - notify(&trnote, "transfer.error", _("Transfer interrupted"), _("The transfer of %ls from %ls was interrupted from the other side"), getfilename(tr->path), tr->peernick); + if(dcpid == 0) + notify(&trnote, "transfer.error", _("Transfer interrupted"), _("The transfer of %ls from %ls was interrupted from the other side"), getfilename(tr->path), tr->peernick); #endif } } @@ -206,7 +208,8 @@ void updatetrinfo(void) } #ifdef NOTIFY if((tr->state = DC_TRNS_MAIN) && (now - tri->lastprog > 600)) { - notify(&trnote, "transfer.error", _("Transfer stalled"), _("The transfer of %ls from %ls has not made progress for 10 minutes"), getfilename(tr->path), tr->peernick); + if(dcpid == 0) + notify(&trnote, "transfer.error", _("Transfer stalled"), _("The transfer of %ls from %ls has not made progress for 10 minutes"), getfilename(tr->path), tr->peernick); } #endif }