X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=clients%2Fgui-shell%2Fdsh.c;h=bad942a37e3d7aee3166e2f814259f0371cd868c;hb=b3f496db98421eb315443617d3fef3847326613c;hp=51332fca959b2e24ca968caaf558925ec73c0c77;hpb=fa9a8ac1fef589a3f6b9bd97e3300025b859739d;p=doldaconnect.git diff --git a/clients/gui-shell/dsh.c b/clients/gui-shell/dsh.c index 51332fc..bad942a 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 } @@ -260,6 +263,7 @@ void dcfdcb(gpointer data, gint source, GdkInputCondition cond) dc_uimisc_handlenotify(resp); updatetrinfo(); } + dc_freeresp(resp); } updatewrite(); } @@ -373,6 +377,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();