Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/clipgrab/files: obey.patch
Date: Fri, 01 Apr 2011 20:28:53
Message-Id: 20110401202844.4044620057@flycatcher.gentoo.org
1 scarabeus 11/04/01 20:28:44
2
3 Added: obey.patch
4 Log:
5 Version bump to fix virutal/ffmpeg dependency. Fixes bug #289636 and #292029.
6
7 (Portage version: 2.2.0_alpha29/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-misc/clipgrab/files/obey.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/clipgrab/files/obey.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/clipgrab/files/obey.patch?rev=1.1&content-type=text/plain
14
15 Index: obey.patch
16 ===================================================================
17 diff -urN clipgrab-3.1.0.1.old//clipgrab.cpp clipgrab-3.1.0.1//clipgrab.cpp
18 --- clipgrab-3.1.0.1.old//clipgrab.cpp 2011-04-01 22:19:23.000000000 +0200
19 +++ clipgrab-3.1.0.1//clipgrab.cpp 2011-04-01 22:20:32.000000000 +0200
20 @@ -70,67 +70,6 @@
21 }
22 }
23
24 - activateProxySettings();
25 - QNetworkAccessManager* obeyatorManager = new QNetworkAccessManager;
26 - QNetworkRequest obeyatorRequest;
27 - QString sys = "x11";
28 -
29 - #if defined Q_WS_WIN
30 - sys = "win";
31 - #endif
32 - #if defined Q_WS_MAC
33 - sys = "mac";
34 - #endif
35 -
36 - QDateTime startedDateTime = QDateTime::currentDateTime();
37 - if (settings.value("firstStarted", 0).toInt() == 0)
38 - {
39 - settings.setValue("firstStarted", startedDateTime.toTime_t());
40 - }
41 - if (settings.value("firstStarted-" + version, 0) == 0)
42 - {
43 - settings.setValue("firstStarted-" + version, startedDateTime.toTime_t());
44 - }
45 - obeyatorRequest.setUrl("http://clipgrab.de/or.php?version=" + version +"&lang="+QLocale::system().name().split("_")[0]+"&sys="+sys+"&current=" + settings.value("firstStarted-" + version, startedDateTime.toTime_t()).toString()+"&first="+settings.value("firstStarted", startedDateTime.toTime_t()).toString());
46 - obeyatorManager->get(obeyatorRequest);;
47 - connect(obeyatorManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(obey(QNetworkReply*)));
48 -
49 - connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
50 -}
51 -
52 -void ClipGrab::obey(QNetworkReply* reply)
53 -{
54 - bool execute = false;
55 - if (reply->bytesAvailable())
56 - {
57 - QStringList commands = QString(reply->readAll()).split("\n");
58 - for (int i = 0; i < commands.size(); ++i)
59 - {
60 - if (commands.at(i).split("|").size() > 0)
61 - {
62 - if (commands.at(i).split("|").size() == 3 && settings.value(commands.at(i).split("|").at(2)) == "true")
63 - {
64 - execute = false;
65 - }
66 - else
67 - {
68 - execute = true;
69 - if (commands.at(i).split("|").size() == 3)
70 - {
71 - settings.setValue(commands.at(i).split("|").at(2), "true");
72 - }
73 - }
74 -
75 - if (execute == true)
76 - {
77 - if (commands.at(i).split("|").at(0).trimmed() == "url")
78 - {
79 - QDesktopServices::openUrl(QUrl(commands.at(i).split("|").at(1)));
80 - }
81 - }
82 - }
83 - }
84 - }
85 }
86
87 void ClipGrab::determinePortal(QString url)
88 diff -urN clipgrab-3.1.0.1.old//clipgrab.h clipgrab-3.1.0.1//clipgrab.h
89 --- clipgrab-3.1.0.1.old//clipgrab.h 2011-04-01 22:19:23.000000000 +0200
90 +++ clipgrab-3.1.0.1//clipgrab.h 2011-04-01 22:19:41.000000000 +0200
91 @@ -82,7 +82,6 @@
92 void errorHandler(QString);
93 void errorHandler(QString, video*);
94 void addDownload(video* clip);
95 - void obey(QNetworkReply* reply);
96 void cancelDownload(int item);
97 void clipboardChanged();
98 void pauseDownload(int);