Revision 2164 libsylph/mh.c

View differences:

mh.c
38 38

  
39 39
#undef MEASURE_TIME
40 40

  
41
#include "sylmain.h"
41 42
#include "folder.h"
42 43
#include "mh.h"
43 44
#include "procmsg.h"
......
468 469
			}
469 470
		}
470 471

  
472
		g_signal_emit_by_name(syl_app_get(), "add-msg", dest, destfile, dest->last_num + 1);
473

  
471 474
		g_free(destfile);
472 475
		dest->last_num++;
473 476
		dest->total++;
......
551 554
		if (!destfile) break;
552 555
		srcfile = procmsg_get_message_file(msginfo);
553 556

  
557
		g_signal_emit_by_name(syl_app_get(), "remove-msg", src, srcfile, msginfo->msgnum);
558

  
554 559
		if (move_file(srcfile, destfile, FALSE) < 0) {
555 560
			g_free(srcfile);
556 561
			g_free(destfile);
557 562
			break;
558 563
		}
559 564

  
565
		g_signal_emit_by_name(syl_app_get(), "add-msg", dest, destfile, dest->last_num + 1);
566

  
560 567
		g_free(srcfile);
561 568
		g_free(destfile);
562 569
		src->total--;
......
679 686
			break;
680 687
		}
681 688

  
689
		g_signal_emit_by_name(syl_app_get(), "add-msg", dest, destfile, dest->last_num + 1);
690

  
682 691
		g_free(srcfile);
683 692
		g_free(destfile);
684 693
		dest->last_num++;
......
711 720
	file = mh_fetch_msg(folder, item, msginfo->msgnum);
712 721
	g_return_val_if_fail(file != NULL, -1);
713 722

  
723
	g_signal_emit_by_name(syl_app_get(), "remove-msg", item, file, msginfo->msgnum);
724

  
714 725
	if (g_unlink(file) < 0) {
715 726
		FILE_OP_ERROR(file, "unlink");
716 727
		g_free(file);
......
742 753

  
743 754
	path = folder_item_get_path(item);
744 755
	g_return_val_if_fail(path != NULL, -1);
756
	g_signal_emit_by_name(syl_app_get(), "remove-all-msg", item);
745 757
	val = remove_all_numbered_files(path);
746 758
	g_free(path);
747 759
	if (val == 0) {
......
1088 1100
	gchar *name_;
1089 1101
	gchar *utf8_name;
1090 1102
	gchar *paths[2];
1103
	gchar *old_id, *new_id;
1091 1104

  
1092 1105
	g_return_val_if_fail(folder != NULL, -1);
1093 1106
	g_return_val_if_fail(item != NULL, -1);
......
1163 1176
	g_free(oldpath);
1164 1177
	g_free(newpath);
1165 1178

  
1179
	old_id = folder_item_get_identifier(item);
1180

  
1166 1181
	if (new_parent) {
1167 1182
		g_node_unlink(item->node);
1168 1183
		g_node_append(new_parent->node, item->node);
......
1196 1211
	g_free(paths[0]);
1197 1212
	g_free(paths[1]);
1198 1213

  
1214
	new_id = folder_item_get_identifier(item);
1215
	g_signal_emit_by_name(syl_app_get(), "move-folder", item, old_id,
1216
			      new_id);
1217
	g_free(new_id);
1218
	g_free(old_id);
1219

  
1199 1220
	return 0;
1200 1221
}
1201 1222

  
......
1227 1248
	}
1228 1249

  
1229 1250
	g_free(path);
1251
	g_signal_emit_by_name(syl_app_get(), "remove-folder", item);
1230 1252
	folder_item_remove(item);
1231 1253
	return 0;
1232 1254
}

Also available in: Unified diff