Skip to content

Commit

Permalink
-Add ru localization
Browse files Browse the repository at this point in the history
-Add help link
-Fix checksystem
  • Loading branch information
Allexin committed Feb 20, 2016
1 parent 566833a commit bfed876
Show file tree
Hide file tree
Showing 14 changed files with 954 additions and 229 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.pro.user
/build_64_release/
/TrackYourTime.app/
/build_64_debug/
623 changes: 485 additions & 138 deletions TrackYourTime/lang_en.ts

Large diffs are not rendered by default.

509 changes: 436 additions & 73 deletions TrackYourTime/lang_ru.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion TrackYourTime/ui/app_settingswindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ App_SettingsWindow::App_SettingsWindow(cDataManager *DataManager) :
ui->setupUi(this);
m_DataManager = DataManager;

ui->plainTextEditScript->setPlaceholderText("Place title parser code here. Look predefined scripts for example.");
ui->plainTextEditScript->setPlaceholderText(tr("Place title parser code here. Look predefined scripts for example."));
connect(ui->pushButtonApply,SIGNAL(released()),this,SLOT(onApply()));
connect(ui->pushButtonStartDebug,SIGNAL(released()),this,SLOT(onSetDebug()));
}
Expand Down
2 changes: 1 addition & 1 deletion TrackYourTime/ui/app_settingswindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string>Application settings</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
Expand Down
8 changes: 8 additions & 0 deletions TrackYourTime/ui/ctrayicon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include "ctrayicon.h"
#include <QApplication>
#include <QDesktopServices>
#include <QUrl>



Expand Down Expand Up @@ -59,6 +61,7 @@ cTrayIcon::cTrayIcon(cDataManager *DataManager):QSystemTrayIcon()
#endif
m_Menu.addSeparator();
m_Menu.addAction(tr("About..."))->setData("ABOUT");
m_Menu.addAction(tr("Help..."))->setData("HELP");
m_Menu.addSeparator();
m_Menu.addAction(tr("Exit"))->setData("EXIT");

Expand Down Expand Up @@ -141,6 +144,11 @@ void cTrayIcon::onMenuSelection(QAction *menuAction)
return;
}

if (id=="HELP"){
QDesktopServices::openUrl(QUrl(tr("https://github.com/Allexin/TrackYourTime/wiki/User-Manual")));
return;
}

if (id=="PROFILES"){
m_ProfilesMenu.popup(QCursor::pos());
return;
Expand Down
2 changes: 1 addition & 1 deletion TrackYourTime/ui/notification_dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ notification_dummy::notification_dummy(QWidget *parent) :
{
ui->setupUi(this);
connect(ui->pushButtonApply,SIGNAL(released()),this,SLOT(onButtonApply()));
connect(ui->pushButtonClose,SIGNAL(released()),this,SLOT(hide()));
}

notification_dummy::~notification_dummy()
Expand All @@ -17,7 +18,6 @@ notification_dummy::~notification_dummy()
void notification_dummy::showWithMessage(const QString &format, bool compactMode)
{
ui->labelMessage->setText(format);
ui->pushButton->setVisible(!compactMode);
ui->comboBoxCategories->setVisible(!compactMode);
ui->labelCategory->setVisible(!compactMode);

Expand Down
8 changes: 4 additions & 4 deletions TrackYourTime/ui/notification_dummy.ui
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<widget class="QPushButton" name="pushButtonApply">
<property name="text">
<string>Set for all profiles</string>
<string>Apply</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonApply">
<widget class="QPushButton" name="pushButtonClose">
<property name="text">
<string>Set for current profile</string>
<string>Close</string>
</property>
</widget>
</item>
Expand Down
4 changes: 3 additions & 1 deletion change.log
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
-Improve HDPI display support
-Add periods in statistic window
-Add percents on categories statistic
-Show Applications on tray icon click
-Show Applications on tray icon click
-Add built-in notification window
-Add modern windows apps support
2 changes: 2 additions & 0 deletions checksystem/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/build-checksystem-Desktop_Qt_5_5_Bundled_GCC_64bit-Release/
/build-checksystem-Desktop_Qt_5_5_1_GCC_64bit-Debug/
/build-checksystem-Desktop_Qt_5_5_1_GCC_64bit-Release/
1 change: 1 addition & 0 deletions checksystem/checksystem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pro.user
21 changes: 11 additions & 10 deletions checksystem/checksystem/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
#include <QCoreApplication>
#include <QDir>
#include <QTextStream>
#include <QStringList>
#include <fcntl.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <QVector>



enum eActiveWindowState{
Expand All @@ -42,8 +45,6 @@ eActiveWindowState checkActiveWindow(){
Atom active = XInternAtom(display, "_NET_ACTIVE_WINDOW", False);

XTextProperty text;
char **name = NULL;
int param;

Atom type_ret;
int format_ret;
Expand Down Expand Up @@ -88,23 +89,23 @@ eInputState checkUdev(){

path = "/dev/input/by-id";
keyboards = QDir(path).entryList(QStringList() << "*keyboard*");
for (int i = 0; i<keyboards; i++)
keyboards_fd.push_back(open((path+keyboards[i]).toUtf8().constData(), 0));
for (int i = 0; i<keyboards.size(); i++)
keyboards_fd.push_back(open((path+"/"+keyboards[i]).toUtf8().constData(), 0));

path = "/dev/input/by-id";
keyboards = QDir(path).entryList(QStringList() << "*kbd*");
for (int i = 0; i<keyboards; i++)
keyboards_fd.push_back(open((path+keyboards[i]).toUtf8().constData(), 0));
for (int i = 0; i<keyboards.size(); i++)
keyboards_fd.push_back(open((path+"/"+keyboards[i]).toUtf8().constData(), 0));

path = "/dev/input/by-path";
keyboards = QDir(path).entryList(QStringList() << "*keyboard*");
for (int i = 0; i<keyboards; i++)
keyboards_fd.push_back(open((path+keyboards[i]).toUtf8().constData(), 0));
for (int i = 0; i<keyboards.size(); i++)
keyboards_fd.push_back(open((path+"/"+keyboards[i]).toUtf8().constData(), 0));

path = "/dev/input/by-path";
keyboards = QDir(path).entryList(QStringList() << "*kbd*");
for (int i = 0; i<keyboards; i++)
keyboards_fd.push_back(open((path+keyboards[i]).toUtf8().constData(), 0));
for (int i = 0; i<keyboards.size(); i++)
keyboards_fd.push_back(open((path+"/"+keyboards[i]).toUtf8().constData(), 0));

if (keyboards_fd.size()==0)
return UDEV_KEYBOARD_NOT_FOUND;
Expand Down
Binary file modified data/languages/lang_en.qm
Binary file not shown.
Binary file modified data/languages/lang_ru.qm
Binary file not shown.

0 comments on commit bfed876

Please sign in to comment.