updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / videocut / fileformat.patch
blobfb6e10f06d4f0c093eda4c43ad01ef490001ffe4
1 --- src/TMainWindow.cpp.orig 2008-01-27 14:32:58.000000000 +0200
2 +++ src/TMainWindow.cpp 2009-09-20 00:05:19.909190080 +0300
3 @@ -793,8 +793,29 @@
5 if(isOpen)
7 + //default format
8 + QString df = "";
9 + switch(settings->getFormatImg())
10 + {
11 + case(0):
12 + {
13 + df = ".png";
14 + break;
15 + }
16 + case(1):
17 + {
18 + df = ".jpg";
19 + break;
20 + }
21 + case(2):
22 + {
23 + df = ".xpm";
24 + break;
25 + }
26 + }
28 QString fileName = QFileDialog::getSaveFileName(this, tr("Saving..."), \
29 - this->path + ".png", \
30 + this->path + df, \
31 tr("Images (*.png *.jpg)"));
32 if(fileName != "")
34 @@ -883,8 +904,29 @@
36 if(isOpen)
38 + //default format
39 + QString df = "";
40 + switch(settings->getFormatImg())
41 + {
42 + case(0):
43 + {
44 + df = ".png";
45 + break;
46 + }
47 + case(1):
48 + {
49 + df = ".jpg";
50 + break;
51 + }
52 + case(2):
53 + {
54 + df = ".xpm";
55 + break;
56 + }
57 + }
59 QString fileName = QFileDialog::getSaveFileName(this, tr("Save frame"), \
60 - "/media/sda6/shot.png", \
61 + "/media/sda6/shot" + df, \
62 tr("Images (*.png *.xpm *.jpg)"));
63 if(fileName !="")
65 @@ -902,6 +944,27 @@
66 fileInfo.path(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
67 if(dirName != "")
69 + //default format
70 + QString df = "";
71 + switch(settings->getFormatImg())
72 + {
73 + case(0):
74 + {
75 + df = ".png";
76 + break;
77 + }
78 + case(1):
79 + {
80 + df = ".jpg";
81 + break;
82 + }
83 + case(2):
84 + {
85 + df = ".xpm";
86 + break;
87 + }
88 + }
90 QProgressDialog *progress = new QProgressDialog();
91 progress->setRange(0, frames->count());
92 progress->setLabel(new QLabel(tr("Saving images...")));
93 @@ -913,7 +976,7 @@
95 qApp->processEvents();
96 progress->setValue(i);
97 - if(!frames->at(i)->img.save(dirName + this->fileInfo.fileName() + QString::number(i) + ".png"))
98 + if(!frames->at(i)->img.save(dirName + this->fileInfo.fileName() + QString::number(i) + df))
100 QMessageBox::critical(0, APPLICATION_NAME, tr("Error! Can't save this file"));
101 break;