X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=clients%2Fgui-shell%2Fdsh.c;h=b6886680c6390bec2cbd65718e485ec929f643f2;hb=31a01fddb038535690783feb3e76bcd35c1edb16;hp=51332fca959b2e24ca968caaf558925ec73c0c77;hpb=fa9a8ac1fef589a3f6b9bd97e3300025b859739d;p=doldaconnect.git diff --git a/clients/gui-shell/dsh.c b/clients/gui-shell/dsh.c index 51332fc..b688668 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 } @@ -373,6 +376,19 @@ void dolcon(void) } } +void cb_shm_dolconf_activate(GtkWidget *uu1, gpointer uu2) +{ + int i; + + if((dcpid = fork()) == 0) { + for(i = 3; i < FD_SETSIZE; i++) + close(i); + execlp("dolconf", "dolconf", NULL); + perror("dolconf"); + exit(127); + } +} + void cb_shm_dolcon_activate(GtkWidget *uu1, gpointer uu2) { dolcon();