comparison src/hgignoredialog.cpp @ 414:939701b848e5 ignore

Start to introduce HgIgnoreDialog
author Chris Cannam
date Wed, 15 Jun 2011 16:32:21 +0100
parents
children 6d7dad48b13c
comparison
equal deleted inserted replaced
413:2a19d5706673 414:939701b848e5
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 EasyMercurial
5
6 Based on hgExplorer by Jari Korhonen
7 Copyright (c) 2010 Jari Korhonen
8 Copyright (c) 2011 Chris Cannam
9 Copyright (c) 2011 Queen Mary, University of London
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #include "hgignoredialog.h"
19 #include "common.h"
20 #include "debug.h"
21
22 HgIgnoreDialog::IgnoreType
23 HgIgnoreDialog::confirmIgnore(QStringList files, QStringList suffixes)
24 {
25 QString text = "<qt>";
26
27 if (files.size() < 10) {
28 text += tr("You have asked to ignore the following files:");
29 text += "<p><code>";
30 foreach (QString f, files) {
31 text += "&nbsp;&nbsp;&nbsp;" + xmlEncode(f) + "<br>";
32 }
33 text += "</code>";
34 } else {
35 text += "<p>";
36 text += tr("You have asked to ignore %1 file(s).", "", files.size());
37 text += "</p>";
38 }
39
40 if (suffixes.size() > 0) {
41
42 text += "<p>";
43 text += tr("Would you like to:");
44 text += "<ul>";
45
46
47 //...
48
49 }
50
51
52 return IgnoreNothing;
53 }
54