~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to src/sessiondispatcher.cpp

  • Committer: Package Import Robot
  • Author(s): Jack Yu
  • Date: 2013-09-02 23:17:45 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130902231745-psyl14qxslg1g3dp
Tags: 0.1.6-0ubuntu1
* Modify SystemDispatcher and SessionDispatcher Classes.
* Add watch file into debian folder.
* Resolve status of onekey button(LP #1216236 ).
* Add monitorball code into systemdbus daemon.
* Optimize the status button.
* Add fcitx configuration function.
* Fix bugs due to bad references to apt lib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                               QDBusConnection::sessionBus());
42
42
    QObject::connect(sessioniface,SIGNAL(pc_msg(QString)),this,SLOT(show_signal(QString)));
43
43
    QObject::connect(sessioniface,SIGNAL(scan_complete(QString)),this,SLOT(handler_scan_rubbish(QString)));
44
 
    QObject::connect(sessioniface,SIGNAL(clean_complete(QString)),this,SLOT(handler_clear_rubbish(QString)));
45
 
 
46
 
    QObject::connect(sessioniface,SIGNAL(clean_complete_main(QString)),this,SLOT(handler_clear_rubbish_main_onekey(QString)));
47
 
    QObject::connect(sessioniface,SIGNAL(clean_error_main(QString)),this,SLOT(handler_clear_rubbish_main_error(QString)));
48
 
    QObject::connect(sessioniface,SIGNAL(clean_complete_second(QString)),this,SLOT(handler_clear_rubbish_second_onekey(QString)));
49
 
    QObject::connect(sessioniface,SIGNAL(clean_error_second(QString)),this,SLOT(handler_clear_rubbish_second_error(QString)));
50
 
    notify_str = "";
51
44
    page_num = 0;
52
 
 
53
 
}
54
 
 
55
 
void SessionDispatcher::handler_clear_rubbish_main_onekey(QString msg)
56
 
{
57
 
     emit finishCleanWorkMain(msg);
58
 
}
59
 
 
60
 
void SessionDispatcher::handler_clear_rubbish_main_error(QString msg)
61
 
{
62
 
     emit finishCleanWorkMainError(msg);
63
 
}
64
 
void SessionDispatcher::handler_clear_rubbish_second_onekey(QString msg)
65
 
{
66
 
     emit finishCleanWorkSecond(msg);
67
 
}
68
 
 
69
 
void SessionDispatcher::handler_clear_rubbish_second_error(QString msg)
70
 
{
71
 
     emit finishCleanWorkSecondError(msg);
72
 
}
73
 
void SessionDispatcher::handler_clear_rubbish(QString msg)
74
 
{
75
 
     emit finishCleanWork(msg);
76
 
}
77
 
void SessionDispatcher::clean_cookies_records_qt(QStringList strlist) {
78
 
    sessioniface->call("clean_cookies_records", strlist);
79
 
}
80
 
void SessionDispatcher::clean_history_records_qt() {
81
 
    sessioniface->call("clean_history_records");
82
 
}
83
 
 
84
 
void SessionDispatcher::clean_by_main_one_key_qt(QStringList strlist) {
85
 
    sessioniface->call("clean_by_main_one_key", strlist);
86
 
}
87
 
void SessionDispatcher::clean_by_second_one_key_qt(QStringList strlist) {
88
 
    sessioniface->call("clean_by_second_one_key", strlist);
89
 
}
90
 
 
91
 
//void SessionDispatcher::clean_package_cruft_qt(QStringList strlist) {
92
 
////    QDBusReply<void> reply = systemiface->call("clean_package_cruft", strlist);
93
 
//    sessioniface->call("clean_package_cruft", strlist);
94
 
//}
95
 
//void SessionDispatcher::clean_file_cruft_qt(QStringList strlist, QString str) {
96
 
////    QDBusReply<void> reply = systemiface->call("clean_file_cruft", strlist, str);
97
 
//    sessioniface->call("clean_file_cruft", strlist, str);
98
 
//}
 
45
}
99
46
 
100
47
void SessionDispatcher::handler_scan_rubbish(QString msg)
101
48
{
135
82
    return reply.value();
136
83
}
137
84
 
138
 
 
139
 
 
140
 
 
141
85
QString SessionDispatcher::get_home_path() {
142
86
    QString homepath = QDir::homePath();
143
87
    return homepath;
215
159
}
216
160
//------------------------------------
217
161
 
218
 
void SessionDispatcher::set_str(QString str)
219
 
{
220
 
    notify_str += str;
221
 
}
222
 
 
223
 
void SessionDispatcher::del_str(QString str)
224
 
{
225
 
    notify_str.replace(QString(str), QString(""));
226
 
}
227
 
 
228
 
QString SessionDispatcher::get_str()
229
 
{
230
 
    return notify_str;
231
 
}
232
 
 
233
 
 
234
162
QString SessionDispatcher::get_value(QString key)
235
163
{
236
164
    QVariant tt = myinfo.value(key);