diff options
-rw-r--r-- | port-files/FreeBSD/pkg-plist | 1 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts | 30 | ||||
-rw-r--r-- | src-qt5/desktop-utils/desktop-utils.pro | 3 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts | 10 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-xdg-entry/lumina-xdg-entry.pro | 22 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-xdg-entry/main.cpp | 16 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp | 138 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.h | 40 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.ui | 344 |
9 files changed, 583 insertions, 21 deletions
diff --git a/port-files/FreeBSD/pkg-plist b/port-files/FreeBSD/pkg-plist index 1499ffcb..2b08fb83 100644 --- a/port-files/FreeBSD/pkg-plist +++ b/port-files/FreeBSD/pkg-plist @@ -12,6 +12,7 @@ bin/lumina-screenshot bin/lumina-search bin/lumina-textedit bin/lumina-xconfig +bin/lumina-xdg-entry bin/start-lumina-desktop %%ETCDIR%%Desktop.conf.dist man/man1/lumina-open.1.gz diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts index 170c36e4..b352cced 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts @@ -40,47 +40,47 @@ <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="64"/> <source>Launch %1</source> - <translation type="unfinished">Paleisti %1</translation> + <translation>Paleisti %1</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="103"/> <source>Open</source> - <translation type="unfinished">Atverti</translation> + <translation>Atverti</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="104"/> <source>Open With</source> - <translation type="unfinished"></translation> + <translation>Atverti, naudojant</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="106"/> <source>View Properties</source> - <translation type="unfinished"></translation> + <translation>Rodyti savybes</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="107"/> <source>File Operations</source> - <translation type="unfinished"></translation> + <translation>Failų operacijos</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="109"/> <source>Rename</source> - <translation type="unfinished"></translation> + <translation>Pervadinti</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="111"/> <source>Copy</source> - <translation type="unfinished">Kopijuoti</translation> + <translation>Kopijuoti</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="113"/> <source>Cut</source> - <translation type="unfinished">Iškirpti</translation> + <translation>Iškirpti</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="114"/> <source>Delete</source> - <translation type="unfinished">Ištrinti</translation> + <translation>Ištrinti</translation> </message> <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="174"/> @@ -95,7 +95,7 @@ <message> <location filename="../desktop-plugins/applauncher/AppLauncherPlugin.cpp" line="243"/> <source>New Filename</source> - <translation type="unfinished"></translation> + <translation>Naujas failo pavadinimas</translation> </message> </context> <context> @@ -265,12 +265,12 @@ </message> <message> <location filename="../BootSplash.cpp" line="63"/> - <source>Don't expect to build up the weak by pulling down the strong.</source> + <source>Don't expect to build up the weak by pulling down the strong.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../BootSplash.cpp" line="65"/> - <source>You can't know too much, but you can say too much.</source> + <source>You can't know too much, but you can say too much.</source> <translation>Negali per daug žinoti, tačiau gali per daug pasakyti.</translation> </message> <message> @@ -350,7 +350,7 @@ </message> <message> <location filename="../BootSplash.cpp" line="97"/> - <source>Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.</source> + <source>Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.</source> <translation>Tik du dalykai yra beribiai: visata ir žmogaus kvailumas; tačiau dėl visatos aš nesu tikras.</translation> </message> <message> @@ -360,7 +360,7 @@ </message> <message> <location filename="../BootSplash.cpp" line="101"/> - <source>Do, or do not. There is no 'try'.</source> + <source>Do, or do not. There is no 'try'.</source> <translation type="unfinished"></translation> </message> <message> @@ -380,7 +380,7 @@ </message> <message> <location filename="../BootSplash.cpp" line="109"/> - <source>It's kind of fun to do the impossible.</source> + <source>It's kind of fun to do the impossible.</source> <translation>Smagu yra daryti tai, kas neįmanoma.</translation> </message> <message> diff --git a/src-qt5/desktop-utils/desktop-utils.pro b/src-qt5/desktop-utils/desktop-utils.pro index 5fc00a70..2fea1adb 100644 --- a/src-qt5/desktop-utils/desktop-utils.pro +++ b/src-qt5/desktop-utils/desktop-utils.pro @@ -11,5 +11,6 @@ SUBDIRS+= lumina-fm \ lumina-calculator \ lumina-archiver \ lumina-notify \ - lumina-mediaplayer + lumina-mediaplayer \ + lumina-xdg-entry # lumina-terminal diff --git a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts index 3a4f74f8..b8c2135c 100644 --- a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts +++ b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_lt.ts @@ -331,8 +331,8 @@ </message> <message> <location filename="../widgets/DirWidget2.cpp" line="462"/> - <source>The "lumina-fileinfo" utility could not be found on the system. Please install it first.</source> - <translation>Sistemoje nepavyko rasti "lumina-fileinfo" paslaugų programos. Prašome, iš pradžių, ją įdiegti.</translation> + <source>The "lumina-fileinfo" utility could not be found on the system. Please install it first.</source> + <translation>Sistemoje nepavyko rasti "lumina-fileinfo" paslaugų programos. Prašome, iš pradžių, ją įdiegti.</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="488"/> @@ -566,8 +566,8 @@ Nauja vieta: %2</translation> </message> <message> <location filename="../gitWizard.ui" line="232"/> - <source>Click "Next" to start downloading the repository</source> - <translation>Spustelėkite "Kitas", kad pradėtumėte saugyklos atsisiuntimą</translation> + <source>Click "Next" to start downloading the repository</source> + <translation>Spustelėkite "Kitas", kad pradėtumėte saugyklos atsisiuntimą</translation> </message> <message> <location filename="../gitWizard.h" line="58"/> @@ -1168,7 +1168,7 @@ Nauja vieta: %2</translation> <message> <location filename="../TrayUI.cpp" line="91"/> <source>New Tasks Running</source> - <translation type="unfinished"></translation> + <translation>Vykdomos naujos užduotys</translation> </message> </context> </TS> diff --git a/src-qt5/desktop-utils/lumina-xdg-entry/lumina-xdg-entry.pro b/src-qt5/desktop-utils/lumina-xdg-entry/lumina-xdg-entry.pro new file mode 100644 index 00000000..c146a687 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-xdg-entry/lumina-xdg-entry.pro @@ -0,0 +1,22 @@ +#=========================================== +# Copyright (c) 2017, q5sys (JT) +# Available under the MIT license +# See the LICENSE file for full details +#=========================================== + + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = lumina-xdg-entry +TEMPLATE = app + +DEFINES += QT_DEPRECATED_WARNINGS + +SOURCES += main.cpp\ + mainwindow.cpp + +HEADERS += mainwindow.h + +FORMS += mainwindow.ui diff --git a/src-qt5/desktop-utils/lumina-xdg-entry/main.cpp b/src-qt5/desktop-utils/lumina-xdg-entry/main.cpp new file mode 100644 index 00000000..dc117447 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-xdg-entry/main.cpp @@ -0,0 +1,16 @@ +//=========================================== +// Copyright (c) 2017, q5sys (JT) +// Available under the MIT license +// See the LICENSE file for full details +//=========================================== +#include "mainwindow.h" +#include <QApplication> + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp new file mode 100644 index 00000000..ce9d63d3 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp @@ -0,0 +1,138 @@ +//=========================================== +// Copyright (c) 2017, q5sys (JT) +// Available under the MIT license +// See the LICENSE file for full details +//=========================================== + +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include "QDir" +#include "QFile" +#include "QTextStream" +#include "QImageReader" +#include "QFileDialog" +#include "QMessageBox" + + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + connect(ui->pushButton_executable, SIGNAL(clicked()), this, SLOT(setExec()) ); + connect(ui->pushButton_icon, SIGNAL(clicked()), this, SLOT(setIcon()) ); + connect(ui->pushButton_save, SIGNAL(clicked()), this, SLOT(save()) ); + connect(ui->actionSave, SIGNAL(triggered()), this, SLOT(save()) ); + connect(ui->actionClose, SIGNAL(triggered()), this, SLOT(close()) ); + +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::setIcon(){ + //Prompt for a new image file + QStringList imgformats; + QList<QByteArray> fmts = QImageReader::supportedImageFormats(); + for(int i=0; i<fmts.length(); i++){ + imgformats << "*."+QString(fmts[i]); + } + QString iconpath = QFileDialog::getOpenFileName(this, tr("Select an image"), QDir::homePath(), \ + tr("Images")+" ("+imgformats.join(" ")+")"); + ui->lineEdit_icon->setText(iconpath); + icon = ui->lineEdit_icon->text(); + } + + +void MainWindow::setExec(){ + //Prompt for a new executable file + QString execpath = QFileDialog::getOpenFileName(this, tr("Select File"), QDir::homePath(), tr("All Files (*)") ); + ui->lineEdit_executable->setText(execpath); + executable = ui->lineEdit_executable->text(); + } + +void MainWindow::setCategories(){ +if(ui->checkBox_audio->isChecked()){ +catList = catList + "Audio;";} +if(ui->checkBox_video->isChecked()){ +catList = catList + "Video;";} +if(ui->checkBox_development->isChecked()){ +catList = catList + "Development;";} +if(ui->checkBox_education->isChecked()){ +catList = catList + "Education;";} +if(ui->checkBox_game->isChecked()){ +catList = catList + "Game;";} +if(ui->checkBox_graphics->isChecked()){ +catList = catList + "Graphics;";} +if(ui->checkBox_network->isChecked()){ +catList = catList + "Network;";} +if(ui->checkBox_office->isChecked()){ +catList = catList + "Office;";} +if(ui->checkBox_science->isChecked()){ +catList = catList + "Science;";} +if(ui->checkBox_settings->isChecked()){ +catList = catList + "Settings;";} +if(ui->checkBox_system->isChecked()){ +catList = catList + "System;";} +if(ui->checkBox_utility->isChecked()){ +catList = catList + "Utility;";} +categories = catList; +} + +void MainWindow::setOtherValues(){ +name = ui->lineEdit_name->text(); +genericname = ui->lineEdit_genericname->text(); +keywords = ui->lineEdit_keywords->text(); +comment = ui->lineEdit_comment->text(); +if(ui->checkBox_terminal->isChecked()){ +terminal = "true";} else{terminal = "false";}; +} + +void MainWindow::setDesktopFields(){ +setCategories(); +setOtherValues(); +namefield = "Name=" + name; +genericnamefield = "GenericName=" + genericname; +commentfield = "Comment=" + comment; +iconfield = "Icon=" + icon; +terminalfield = "Terminal=" + terminal; +execfield = "Exec=" + executable; +categoriesfield = "Categories=" + categories + ";"; +keywordfield = "Keywords=" + keywords; +} + +void MainWindow::save(){ +setDesktopFields(); +QString path = QDir::homePath(); +QString filename; +filename = path + "/" + name + ".desktop"; + +QFile file(filename); +file.open(QIODevice::WriteOnly | QIODevice::Text); +QTextStream stream(&file); +stream << "{Desktop Entry]" << endl; +stream << "Type=Application" << endl; +stream << "Version=1.0" << endl; +stream << namefield << endl; +stream << genericnamefield << endl; +stream << commentfield << endl; +stream << iconfield << endl; +stream << terminalfield << endl; +stream << execfield << endl; +stream << categoriesfield << endl; +stream << keywordfield << endl; +if(file.isOpen()){ + QMessageBox *messageBox = new QMessageBox; + messageBox->setText(tr("File Saved")); + QPushButton *pushButtonOk = messageBox->addButton(tr("Ok"), QMessageBox::YesRole); + messageBox->QDialog::setWindowTitle(tr("Successful")); + messageBox->show();} +else{ QMessageBox *messageBox = new QMessageBox; + messageBox->setText(tr("File Not Saved")); + QPushButton *pushButtonOk = messageBox->addButton(tr("Ok"), QMessageBox::YesRole); + messageBox->QDialog::setWindowTitle(tr("Unsuccessful")); +messageBox->show();} +file.close(); +} diff --git a/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.h b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.h new file mode 100644 index 00000000..1aad8325 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.h @@ -0,0 +1,40 @@ +//=========================================== +// Copyright (c) 2017, q5sys (JT) +// Available under the MIT license +// See the LICENSE file for full details +//=========================================== + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + + QString name, genericname, comment, icon, executable, terminal, keywords, catList, categories, iconpath, execpath; + QString namefield, genericnamefield, commentfield, iconfield, terminalfield,execfield, categoriesfield, keywordfield; + +public slots: + void setIcon(); + void setExec(); + void setCategories(); + void setOtherValues(); + void setDesktopFields(); + void save(); + + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.ui b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.ui new file mode 100644 index 00000000..928ce30a --- /dev/null +++ b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.ui @@ -0,0 +1,344 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>564</width> + <height>492</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <widget class="QWidget" name="centralWidget"> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="label_name"> + <property name="text"> + <string>Name</string> + </property> + <property name="buddy"> + <cstring>lineEdit_name</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_name"/> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QLabel" name="label_genericname"> + <property name="text"> + <string>Generic Name</string> + </property> + <property name="buddy"> + <cstring>lineEdit_genericname</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_genericname"/> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QLabel" name="label_comment"> + <property name="toolTip"> + <string/> + </property> + <property name="text"> + <string>Comment</string> + </property> + <property name="buddy"> + <cstring>lineEdit_comment</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_comment"/> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QLabel" name="label_keywords"> + <property name="toolTip"> + <string>Values seperated by semicolon (no spaces) </string> + </property> + <property name="toolTipDuration"> + <number>3</number> + </property> + <property name="text"> + <string>Keywords</string> + </property> + <property name="buddy"> + <cstring>lineEdit_keywords</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_keywords"> + <property name="placeholderText"> + <string>Keywords separated by semicolons with no spaces</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QLabel" name="label_executable"> + <property name="text"> + <string>Executable</string> + </property> + <property name="buddy"> + <cstring>lineEdit_executable</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_executable"/> + </item> + <item> + <widget class="QPushButton" name="pushButton_executable"> + <property name="text"> + <string>Select</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="label_icon"> + <property name="text"> + <string>Icon</string> + </property> + <property name="buddy"> + <cstring>lineEdit_icon</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEdit_icon"/> + </item> + <item> + <widget class="QPushButton" name="pushButton_icon"> + <property name="text"> + <string>Select</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label__categories"> + <property name="text"> + <string>Categories</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QCheckBox" name="checkBox_audio"> + <property name="text"> + <string>Audio</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_video"> + <property name="text"> + <string>Video</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_development"> + <property name="text"> + <string>Development</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QCheckBox" name="checkBox_education"> + <property name="text"> + <string>Education</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_game"> + <property name="text"> + <string>Game</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_graphics"> + <property name="text"> + <string>Graphics</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QCheckBox" name="checkBox_network"> + <property name="text"> + <string>Network</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_office"> + <property name="text"> + <string>Office</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_science"> + <property name="text"> + <string>Science</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QCheckBox" name="checkBox_settings"> + <property name="text"> + <string>Settings</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_system"> + <property name="text"> + <string>System</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="checkBox_utility"> + <property name="text"> + <string>Utility</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="Line" name="line_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <widget class="QCheckBox" name="checkBox_terminal"> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="text"> + <string>Run in Terminal</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="pushButton_save"> + <property name="text"> + <string>Save</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menuBar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>564</width> + <height>27</height> + </rect> + </property> + <widget class="QMenu" name="menuMenu"> + <property name="title"> + <string>Menu</string> + </property> + <addaction name="actionSave"/> + <addaction name="actionClose"/> + </widget> + <addaction name="menuMenu"/> + </widget> + <action name="actionClose"> + <property name="text"> + <string>Close</string> + </property> + </action> + <action name="actionSave"> + <property name="text"> + <string>Save</string> + </property> + </action> + </widget> + <layoutdefault spacing="6" margin="11"/> + <resources/> + <connections/> +</ui> |