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