From 43edea91c0417cbe78b1f3ec738798a411d771e3 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Wed, 15 Aug 2007 03:21:10 +0200 Subject: [PATCH] Only notify when dolcon has not been launched from doldacond-shell. --- clients/gui-shell/dsh.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 } -- 2.11.0