mirror of https://github.com/qTox/qTox.git
28 changed files with 2327 additions and 373 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,458 @@
@@ -0,0 +1,458 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<!DOCTYPE TS> |
||||
<TS version="2.1"> |
||||
<context> |
||||
<name>AVPage</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="132"/> |
||||
<source>Video Settings</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="136"/> |
||||
<location filename="../widget/settingsdialog.cpp" line="163"/> |
||||
<source>Show video preview</source> |
||||
<comment>On a button</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="157"/> |
||||
<source>Hide video preview</source> |
||||
<comment>On a button</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>AddFriendForm</name> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="34"/> |
||||
<source>Add Friends</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="37"/> |
||||
<source>Tox ID</source> |
||||
<comment>Tox ID of the person you're sending a friend request to</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="38"/> |
||||
<source>Message</source> |
||||
<comment>The message you send in friend requests</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="39"/> |
||||
<source>Send friend request</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="40"/> |
||||
<source>Tox me maybe?</source> |
||||
<comment>Default message in friend requests if the field is left blank. Write something appropriate!</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="96"/> |
||||
<source>Please fill in a valid Tox ID</source> |
||||
<comment>Tox ID of the friend you're sending a friend request to</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="99"/> |
||||
<source>You can't add yourself as a friend!</source> |
||||
<comment>When trying to add your own Tox ID as friend</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="116"/> |
||||
<source>This address does not exist</source> |
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="120"/> |
||||
<source>Error while looking up DNS</source> |
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="126"/> |
||||
<source>Unexpected number of text records</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="132"/> |
||||
<source>Unexpected number of values in text record</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="139"/> |
||||
<source>The DNS lookup does not contain any Tox ID</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="145"/> |
||||
<location filename="../widget/form/addfriendform.cpp" line="151"/> |
||||
<source>The DNS lookup does not contain a valid Tox ID</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>ChatForm</name> |
||||
<message> |
||||
<location filename="../widget/form/chatform.cpp" line="80"/> |
||||
<source>Send a file</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FileTransferInstance</name> |
||||
<message> |
||||
<location filename="../filetransferinstance.cpp" line="191"/> |
||||
<source>Save a file</source> |
||||
<comment>Title of the file saving dialog</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../filetransferinstance.cpp" line="202"/> |
||||
<source>Location not writable</source> |
||||
<comment>Title of permissions popup</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../filetransferinstance.cpp" line="202"/> |
||||
<source>You do not have permission to write that location. Choose another, or cancel the save dialog.</source> |
||||
<comment>text of permissions popup</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FilesForm</name> |
||||
<message> |
||||
<location filename="../widget/form/filesform.cpp" line="30"/> |
||||
<source>Transfered Files</source> |
||||
<comment>"Headline" of the window</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/filesform.cpp" line="38"/> |
||||
<source>Downloads</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/filesform.cpp" line="39"/> |
||||
<source>Uploads</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FriendRequestDialog</name> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="30"/> |
||||
<source>Friend request</source> |
||||
<comment>Title of the window to aceept/deny a friend request</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="32"/> |
||||
<source>Someone wants to make friends with you</source> |
||||
<translation>Ayy ! You have mothafucking friend request you little bitch !</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="33"/> |
||||
<source>User ID:</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="37"/> |
||||
<source>Friend request message:</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="44"/> |
||||
<source>Accept</source> |
||||
<comment>Accept a friend request</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="45"/> |
||||
<source>Reject</source> |
||||
<comment>Reject a friend request</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FriendWidget</name> |
||||
<message> |
||||
<location filename="../widget/friendwidget.cpp" line="84"/> |
||||
<source>Copy friend ID</source> |
||||
<comment>Menu to copy the Tox ID of that friend</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/friendwidget.cpp" line="85"/> |
||||
<source>Invite in group</source> |
||||
<comment>Menu to invite a friend in a groupchat</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/friendwidget.cpp" line="95"/> |
||||
<source>Remove friend</source> |
||||
<comment>Menu to remove the friend from our friendlist</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GeneralPage</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="31"/> |
||||
<source>General Settings</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="34"/> |
||||
<source>Enable IPv6 (recommended)</source> |
||||
<comment>Text on a checkbox to enable IPv6</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="36"/> |
||||
<source>Use translations</source> |
||||
<comment>Text on a checkbox to enable translations</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="38"/> |
||||
<source>Make Tox portable</source> |
||||
<comment>Text on a checkbox to make qTox a portable application</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="39"/> |
||||
<source>Save settings to the working directory instead of the usual conf dir</source> |
||||
<comment>describes makeToxPortable checkbox</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="48"/> |
||||
<source>Theme</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="49"/> |
||||
<source>Smiley Pack</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GenericChatForm</name> |
||||
<message> |
||||
<location filename="../widget/form/genericchatform.cpp" line="142"/> |
||||
<location filename="../widget/form/genericchatform.cpp" line="148"/> |
||||
<source>Save chat log</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GroupChatForm</name> |
||||
<message> |
||||
<location filename="../widget/form/groupchatform.cpp" line="41"/> |
||||
<source>%1 users in chat</source> |
||||
<comment>Number of users in chat</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/groupchatform.cpp" line="83"/> |
||||
<source><Unknown></source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/groupchatform.cpp" line="90"/> |
||||
<source>%1 users in chat</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GroupWidget</name> |
||||
<message> |
||||
<location filename="../widget/groupwidget.cpp" line="58"/> |
||||
<location filename="../widget/groupwidget.cpp" line="100"/> |
||||
<source>%1 users in chat</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/groupwidget.cpp" line="60"/> |
||||
<location filename="../widget/groupwidget.cpp" line="102"/> |
||||
<source>0 users in chat</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/groupwidget.cpp" line="83"/> |
||||
<source>Quit group</source> |
||||
<comment>Menu to quit a groupchat</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>IdentityPage</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="82"/> |
||||
<source>Public Information</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="83"/> |
||||
<source>Name</source> |
||||
<comment>Username/nick</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="85"/> |
||||
<source>Status</source> |
||||
<comment>Status message</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="95"/> |
||||
<source>Tox ID</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="96"/> |
||||
<source>Your Tox ID</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>MainWindow</name> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="20"/> |
||||
<source>qTox</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="1918"/> |
||||
<source>Your name</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2000"/> |
||||
<source>Your status</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2566"/> |
||||
<source>Add friends</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2592"/> |
||||
<source>Create a group chat</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2624"/> |
||||
<source>View completed file transfers</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2656"/> |
||||
<source>Change your settings</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="3238"/> |
||||
<source>Close</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="3241"/> |
||||
<source>Ctrl+Q</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>SelfCamView</name> |
||||
<message> |
||||
<location filename="../widget/selfcamview.cpp" line="33"/> |
||||
<source>Tox video test</source> |
||||
<comment>Title of the window to test the video/webcam</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>SettingsDialog</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="197"/> |
||||
<source>qTox – Settings</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="224"/> |
||||
<source>General</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="230"/> |
||||
<source>Identity</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="236"/> |
||||
<source>Privacy</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="242"/> |
||||
<source>Audio/Video</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="251"/> |
||||
<source>Ok</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="252"/> |
||||
<source>Cancel</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="253"/> |
||||
<source>Apply</source> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>Widget</name> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="133"/> |
||||
<source>Online</source> |
||||
<comment>Button to set your status to 'Online'</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="135"/> |
||||
<source>Away</source> |
||||
<comment>Button to set your status to 'Away'</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="137"/> |
||||
<source>Busy</source> |
||||
<comment>Button to set your status to 'Busy'</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="605"/> |
||||
<source><Unknown></source> |
||||
<comment>Placeholder when we don't know someone's name in a group chat</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
</TS> |
Binary file not shown.
@ -0,0 +1,462 @@
@@ -0,0 +1,462 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<!DOCTYPE TS> |
||||
<TS version="2.1" language="pl_PL"> |
||||
<context> |
||||
<name>AVPage</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="132"/> |
||||
<source>Video Settings</source> |
||||
<translation>Ustawienia wideo</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="136"/> |
||||
<location filename="../widget/settingsdialog.cpp" line="163"/> |
||||
<source>Show video preview</source> |
||||
<comment>On a button</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="157"/> |
||||
<source>Hide video preview</source> |
||||
<comment>On a button</comment> |
||||
<translation type="unfinished"></translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>AddFriendForm</name> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="34"/> |
||||
<source>Add Friends</source> |
||||
<translation>Dodaj znajomych</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="37"/> |
||||
<source>Tox ID</source> |
||||
<comment>Tox ID of the person you're sending a friend request to</comment> |
||||
<translation>Tox ID</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="38"/> |
||||
<source>Message</source> |
||||
<comment>The message you send in friend requests</comment> |
||||
<translation>Wiadomość</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="39"/> |
||||
<source>Send friend request</source> |
||||
<translation>Wyślij zapytanie do znajomego</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="40"/> |
||||
<source>Tox me maybe?</source> |
||||
<comment>Default message in friend requests if the field is left blank. Write something appropriate!</comment> |
||||
<translation>Może Tox ze mną?</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="96"/> |
||||
<source>Please fill in a valid Tox ID</source> |
||||
<comment>Tox ID of the friend you're sending a friend request to</comment> |
||||
<translation>Proszę wpisać poprawny Tox ID</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="99"/> |
||||
<source>You can't add yourself as a friend!</source> |
||||
<comment>When trying to add your own Tox ID as friend</comment> |
||||
<translation>Nie możesz dodać siebie jako znajomego!</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="116"/> |
||||
<source>This address does not exist</source> |
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment> |
||||
<translation>Ten adres nie istnieje</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="120"/> |
||||
<source>Error while looking up DNS</source> |
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment> |
||||
<translation>Błąd podczas sprawdzania DNS</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="126"/> |
||||
<source>Unexpected number of text records</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation>Nieoczekiwana liczba wpisów tekstowych</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="132"/> |
||||
<source>Unexpected number of values in text record</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation>Nieoczekiwana liczba wartości we wpisie tekstowym</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="139"/> |
||||
<source>The DNS lookup does not contain any Tox ID</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation>DNS nie zawiera żadnego Tox ID</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/addfriendform.cpp" line="145"/> |
||||
<location filename="../widget/form/addfriendform.cpp" line="151"/> |
||||
<source>The DNS lookup does not contain a valid Tox ID</source> |
||||
<comment>Error with the DNS</comment> |
||||
<translation>DNS nie zawiera poprawnego Tox ID</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>ChatForm</name> |
||||
<message> |
||||
<location filename="../widget/form/chatform.cpp" line="80"/> |
||||
<source>Send a file</source> |
||||
<translation>Wyślij plik</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FileTransferInstance</name> |
||||
<message> |
||||
<location filename="../filetransferinstance.cpp" line="191"/> |
||||
<source>Save a file</source> |
||||
<comment>Title of the file saving dialog</comment> |
||||
<translation>Zapisz plik</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../filetransferinstance.cpp" line="202"/> |
||||
<source>Location not writable</source> |
||||
<comment>Title of permissions popup</comment> |
||||
<translation>Nie można zapisać w lokacji</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../filetransferinstance.cpp" line="202"/> |
||||
<source>You do not have permission to write that location. Choose another, or cancel the save dialog.</source> |
||||
<comment>text of permissions popup</comment> |
||||
<translation>Nie masz uprawnienia by zapisać w tej lokacji. Wybierz inną lub anuluj zapis.</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FilesForm</name> |
||||
<message> |
||||
<location filename="../widget/form/filesform.cpp" line="30"/> |
||||
<source>Transfered Files</source> |
||||
<comment>"Headline" of the window</comment> |
||||
<translation>Przesłane pliki</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/filesform.cpp" line="38"/> |
||||
<source>Downloads</source> |
||||
<translation>Pobrane</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/filesform.cpp" line="39"/> |
||||
<source>Uploads</source> |
||||
<translation>Wysłane</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FriendRequestDialog</name> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="30"/> |
||||
<source>Friend request</source> |
||||
<comment>Title of the window to aceept/deny a friend request</comment> |
||||
<translatorcomment>no idea how it shoule be translated</translatorcomment> |
||||
<translation>Zapytanie znajomego</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="32"/> |
||||
<source>Someone wants to make friends with you</source> |
||||
<translation>Ktoś chce być twoim znajomym</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="33"/> |
||||
<source>User ID:</source> |
||||
<translation>ID użytkownika:</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="37"/> |
||||
<source>Friend request message:</source> |
||||
<translatorcomment>better wording needed?</translatorcomment> |
||||
<translation>Wiadomość w zapytaniu do znajomej/go:</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="44"/> |
||||
<source>Accept</source> |
||||
<comment>Accept a friend request</comment> |
||||
<translation>Zaakceptuj</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="45"/> |
||||
<source>Reject</source> |
||||
<comment>Reject a friend request</comment> |
||||
<translation>Odrzuć</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>FriendWidget</name> |
||||
<message> |
||||
<location filename="../widget/friendwidget.cpp" line="84"/> |
||||
<source>Copy friend ID</source> |
||||
<comment>Menu to copy the Tox ID of that friend</comment> |
||||
<translation>Kopiuj ID znajomej/go</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/friendwidget.cpp" line="85"/> |
||||
<source>Invite in group</source> |
||||
<comment>Menu to invite a friend in a groupchat</comment> |
||||
<translation>Zaproś do grupy</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/friendwidget.cpp" line="95"/> |
||||
<source>Remove friend</source> |
||||
<comment>Menu to remove the friend from our friendlist</comment> |
||||
<translation>Usuń znajomego</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GeneralPage</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="31"/> |
||||
<source>General Settings</source> |
||||
<translation>Główne ustawienia</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="34"/> |
||||
<source>Enable IPv6 (recommended)</source> |
||||
<comment>Text on a checkbox to enable IPv6</comment> |
||||
<translation>Użyj IPv6 (rekomendowane)</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="36"/> |
||||
<source>Use translations</source> |
||||
<comment>Text on a checkbox to enable translations</comment> |
||||
<translation>Użyj tłumaczenia</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="38"/> |
||||
<source>Make Tox portable</source> |
||||
<comment>Text on a checkbox to make qTox a portable application</comment> |
||||
<translation>Zrób Tox przenośnym</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="39"/> |
||||
<source>Save settings to the working directory instead of the usual conf dir</source> |
||||
<comment>describes makeToxPortable checkbox</comment> |
||||
<translation>Zamiast domyślnego katalogu użyj obecnego do zapisania ustawień</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="48"/> |
||||
<source>Theme</source> |
||||
<translation>Motyw</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="49"/> |
||||
<source>Smiley Pack</source> |
||||
<translatorcomment>needs better translation</translatorcomment> |
||||
<translation>Paczka uśmiechów</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GenericChatForm</name> |
||||
<message> |
||||
<location filename="../widget/form/genericchatform.cpp" line="142"/> |
||||
<location filename="../widget/form/genericchatform.cpp" line="148"/> |
||||
<source>Save chat log</source> |
||||
<translation>Zapisz historię rozmowy</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GroupChatForm</name> |
||||
<message> |
||||
<location filename="../widget/form/groupchatform.cpp" line="41"/> |
||||
<source>%1 users in chat</source> |
||||
<comment>Number of users in chat</comment> |
||||
<translation>%1 użytkowników w czacie</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/groupchatform.cpp" line="83"/> |
||||
<source><Unknown></source> |
||||
<translation><Nieznany/a></translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/form/groupchatform.cpp" line="90"/> |
||||
<source>%1 users in chat</source> |
||||
<translation>%1 użytkowników w czacie</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>GroupWidget</name> |
||||
<message> |
||||
<location filename="../widget/groupwidget.cpp" line="58"/> |
||||
<location filename="../widget/groupwidget.cpp" line="100"/> |
||||
<source>%1 users in chat</source> |
||||
<translation>%1 użytkowników w czacie</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/groupwidget.cpp" line="60"/> |
||||
<location filename="../widget/groupwidget.cpp" line="102"/> |
||||
<source>0 users in chat</source> |
||||
<translation>0 użytkowników w czacie</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/groupwidget.cpp" line="83"/> |
||||
<source>Quit group</source> |
||||
<comment>Menu to quit a groupchat</comment> |
||||
<translation>Opuść grupę</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>IdentityPage</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="82"/> |
||||
<source>Public Information</source> |
||||
<translation>Informacja publiczna</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="83"/> |
||||
<source>Name</source> |
||||
<comment>Username/nick</comment> |
||||
<translation>Nick</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="85"/> |
||||
<source>Status</source> |
||||
<comment>Status message</comment> |
||||
<translation>Status</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="95"/> |
||||
<source>Tox ID</source> |
||||
<translation>Tox ID</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="96"/> |
||||
<source>Your Tox ID</source> |
||||
<translation>Twój Tox ID</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>MainWindow</name> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="20"/> |
||||
<source>qTox</source> |
||||
<translation>qTox</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="1918"/> |
||||
<source>Your name</source> |
||||
<translation>Twój nick</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2000"/> |
||||
<source>Your status</source> |
||||
<translation>Twój status</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2566"/> |
||||
<source>Add friends</source> |
||||
<translation>Dodaj znajomych</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2592"/> |
||||
<source>Create a group chat</source> |
||||
<translation>Utwórz czat grupowy</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2624"/> |
||||
<source>View completed file transfers</source> |
||||
<translation>Zobacz zakończone transfery plików</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="2656"/> |
||||
<source>Change your settings</source> |
||||
<translatorcomment>translated as "change settings"; seems to be simpler this way</translatorcomment> |
||||
<translation>Zmień ustawienia</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="3238"/> |
||||
<source>Close</source> |
||||
<translation>Zamknij</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../mainwindow.ui" line="3241"/> |
||||
<source>Ctrl+Q</source> |
||||
<translation>Ctrl+Q</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>SelfCamView</name> |
||||
<message> |
||||
<location filename="../widget/selfcamview.cpp" line="33"/> |
||||
<source>Tox video test</source> |
||||
<comment>Title of the window to test the video/webcam</comment> |
||||
<translation>Tox test wideo</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>SettingsDialog</name> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="197"/> |
||||
<source>qTox – Settings</source> |
||||
<translation>qTox – Ustawienia</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="224"/> |
||||
<source>General</source> |
||||
<translation>Główne</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="230"/> |
||||
<source>Identity</source> |
||||
<translation>Tożsamość</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="236"/> |
||||
<source>Privacy</source> |
||||
<translation>Prywatność</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="242"/> |
||||
<source>Audio/Video</source> |
||||
<translation>Audio/Wideo</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="251"/> |
||||
<source>Ok</source> |
||||
<translation>Ok</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="252"/> |
||||
<source>Cancel</source> |
||||
<translation>Anuluj</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/settingsdialog.cpp" line="253"/> |
||||
<source>Apply</source> |
||||
<translation>Zastosuj</translation> |
||||
</message> |
||||
</context> |
||||
<context> |
||||
<name>Widget</name> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="133"/> |
||||
<source>Online</source> |
||||
<comment>Button to set your status to 'Online'</comment> |
||||
<translation>Online</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="135"/> |
||||
<source>Away</source> |
||||
<comment>Button to set your status to 'Away'</comment> |
||||
<translation>Nieobecny/a</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="137"/> |
||||
<source>Busy</source> |
||||
<comment>Button to set your status to 'Busy'</comment> |
||||
<translation>Zajęty/a</translation> |
||||
</message> |
||||
<message> |
||||
<location filename="../widget/widget.cpp" line="605"/> |
||||
<source><Unknown></source> |
||||
<comment>Placeholder when we don't know someone's name in a group chat</comment> |
||||
<translation><Nieznany/a></translation> |
||||
</message> |
||||
</context> |
||||
</TS> |
Binary file not shown.
@ -0,0 +1,380 @@
@@ -0,0 +1,380 @@
|
||||
#include "settingsdialog.h" |
||||
#include "settings.h" |
||||
#include "widget.h" |
||||
#include "camera.h" |
||||
#include "selfcamview.h" |
||||
#include "core.h" |
||||
#include "smileypack.h" |
||||
|
||||
#include <QListWidget> |
||||
#include <QListWidgetItem> |
||||
#include <QStackedWidget> |
||||
#include <QPushButton> |
||||
#include <QBoxLayout> |
||||
#include <QLabel> |
||||
#include <QGroupBox> |
||||
#include <QCheckBox> |
||||
#include <QLineEdit> |
||||
#include <QComboBox> |
||||
|
||||
|
||||
// =======================================
|
||||
// settings pages
|
||||
//========================================
|
||||
class GeneralPage : public QWidget |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
GeneralPage(QWidget *parent = 0) : |
||||
QWidget(parent) |
||||
{ |
||||
QGroupBox *group = new QGroupBox(tr("General Settings"), this); |
||||
|
||||
enableIPv6 = new QCheckBox(this); |
||||
enableIPv6->setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); |
||||
useTranslations = new QCheckBox(this); |
||||
useTranslations->setText(tr("Use translations","Text on a checkbox to enable translations")); |
||||
makeToxPortable = new QCheckBox(this); |
||||
makeToxPortable->setText(tr("Make Tox portable","Text on a checkbox to make qTox a portable application")); |
||||
makeToxPortable->setToolTip(tr("Save settings to the working directory instead of the usual conf dir","describes makeToxPortable checkbox")); |
||||
|
||||
QVBoxLayout *vLayout = new QVBoxLayout(); |
||||
vLayout->addWidget(enableIPv6); |
||||
vLayout->addWidget(useTranslations); |
||||
vLayout->addWidget(makeToxPortable); |
||||
group->setLayout(vLayout); |
||||
|
||||
// theme
|
||||
QGroupBox* themeGroup = new QGroupBox(tr("Theme")); |
||||
QLabel* smileyLabel = new QLabel(tr("Smiley Pack")); |
||||
smileyPack = new QComboBox(this); |
||||
|
||||
auto smileyPacks = SmileyPack::listSmileyPacks(); |
||||
for(auto pack : smileyPacks) |
||||
smileyPack->addItem(QString("%1 (%2)").arg(pack.first).arg(pack.second), pack.second); |
||||
|
||||
QVBoxLayout* themeLayout = new QVBoxLayout(); |
||||
themeLayout->addWidget(smileyLabel); |
||||
themeLayout->addWidget(smileyPack); |
||||
themeGroup->setLayout(themeLayout); |
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(); |
||||
mainLayout->addWidget(group); |
||||
mainLayout->addWidget(themeGroup); |
||||
mainLayout->addStretch(1); |
||||
setLayout(mainLayout); |
||||
} |
||||
|
||||
QCheckBox* enableIPv6; |
||||
QCheckBox* useTranslations; |
||||
QCheckBox* makeToxPortable; |
||||
QComboBox* smileyPack; |
||||
}; |
||||
|
||||
class IdentityPage : public QWidget |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
IdentityPage(QWidget* parent = 0) : |
||||
QWidget(parent) |
||||
{ |
||||
// public
|
||||
QGroupBox *publicGroup = new QGroupBox(tr("Public Information"), this); |
||||
QLabel* userNameLabel = new QLabel(tr("Name","Username/nick"), this); |
||||
userName = new QLineEdit(this); |
||||
QLabel* statusMessageLabel = new QLabel(tr("Status","Status message"), this); |
||||
statusMessage = new QLineEdit(this); |
||||
QVBoxLayout *vLayout = new QVBoxLayout(); |
||||
vLayout->addWidget(userNameLabel); |
||||
vLayout->addWidget(userName); |
||||
vLayout->addWidget(statusMessageLabel); |
||||
vLayout->addWidget(statusMessage); |
||||
publicGroup->setLayout(vLayout); |
||||
|
||||
// tox
|
||||
QGroupBox* toxGroup = new QGroupBox(tr("Tox ID"), this); |
||||
QLabel* toxIdLabel = new QLabel(tr("Your Tox ID"), this); |
||||
toxID = new QLineEdit(this); |
||||
toxID->setReadOnly(true); |
||||
QVBoxLayout* toxLayout = new QVBoxLayout(); |
||||
toxLayout->addWidget(toxIdLabel); |
||||
toxLayout->addWidget(toxID); |
||||
toxGroup->setLayout(toxLayout); |
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(); |
||||
mainLayout->setSpacing(30); |
||||
mainLayout->addWidget(publicGroup); |
||||
mainLayout->addWidget(toxGroup); |
||||
mainLayout->addStretch(1); |
||||
setLayout(mainLayout); |
||||
} |
||||
|
||||
QLineEdit* userName; |
||||
QLineEdit* statusMessage; |
||||
QLineEdit* toxID; |
||||
}; |
||||
|
||||
class PrivacyPage : public QWidget |
||||
{ |
||||
public: |
||||
PrivacyPage(QWidget* parent = 0) : |
||||
QWidget(parent) |
||||
{} |
||||
}; |
||||
|
||||
class AVPage : public QWidget |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
AVPage(SettingsDialog* parent = 0) : |
||||
QWidget(parent) |
||||
{ |
||||
QGroupBox *group = new QGroupBox(tr("Video Settings"), this); |
||||
|
||||
camView = new SelfCamView(parent->getWidget()->getCamera()); |
||||
camView->hide(); // hide by default
|
||||
testVideo = new QPushButton(tr("Show video preview","On a button")); |
||||
connect(testVideo, SIGNAL(clicked()), this, SLOT(onTestVideoPressed())); |
||||
|
||||
QVBoxLayout *vLayout = new QVBoxLayout(); |
||||
vLayout->addWidget(testVideo); |
||||
vLayout->addWidget(camView); |
||||
group->setLayout(vLayout); |
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(); |
||||
mainLayout->addWidget(group); |
||||
mainLayout->addStretch(1); |
||||
setLayout(mainLayout); |
||||
} |
||||
|
||||
~AVPage() |
||||
{ |
||||
delete camView; |
||||
} |
||||
|
||||
void showTestVideo() |
||||
{ |
||||
testVideo->setText(tr("Hide video preview","On a button")); |
||||
camView->show(); |
||||
} |
||||
|
||||
void closeTestVideo() |
||||
{ |
||||
testVideo->setText(tr("Show video preview","On a button")); |
||||
camView->close(); |
||||
} |
||||
|
||||
QPushButton* testVideo; |
||||
SelfCamView* camView; |
||||
|
||||
public slots: |
||||
void onTestVideoPressed() |
||||
{ |
||||
if (camView->isVisible()) { |
||||
closeTestVideo(); |
||||
} else { |
||||
showTestVideo(); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
// allows Q_OBJECT macro inside cpp
|
||||
#include "settingsdialog.moc" |
||||
|
||||
|
||||
|
||||
// =======================================
|
||||
// settings dialog
|
||||
//========================================
|
||||
SettingsDialog::SettingsDialog(Widget *parent) : |
||||
QDialog(parent), |
||||
widget(parent) |
||||
{ |
||||
createPages(); |
||||
createButtons(); |
||||
createConnections(); |
||||
createLayout(); |
||||
setWindowTitle(tr("qTox – Settings")); |
||||
} |
||||
|
||||
void SettingsDialog::createPages() |
||||
{ |
||||
generalPage = new GeneralPage(this); |
||||
identityPage = new IdentityPage(this); |
||||
privacyPage = new PrivacyPage(this); |
||||
avPage = new AVPage(this); |
||||
|
||||
contentsWidget = new QListWidget; |
||||
contentsWidget->setViewMode(QListView::IconMode); |
||||
contentsWidget->setIconSize(QSize(100, 73)); |
||||
contentsWidget->setMovement(QListView::Static); |
||||
contentsWidget->setMaximumWidth(110); |
||||
contentsWidget->setMinimumWidth(110); |
||||
contentsWidget->setSpacing(0); |
||||
contentsWidget->setFlow(QListView::TopToBottom); |
||||
|
||||
pagesWidget = new QStackedWidget; |
||||
pagesWidget->addWidget(generalPage); |
||||
pagesWidget->addWidget(identityPage); |
||||
pagesWidget->addWidget(privacyPage); |
||||
pagesWidget->addWidget(avPage); |
||||
|
||||
QListWidgetItem *generalButton = new QListWidgetItem(contentsWidget); |
||||
generalButton->setIcon(QIcon(":/img/settings/general.png")); |
||||
generalButton->setText(tr("General")); |
||||
generalButton->setTextAlignment(Qt::AlignHCenter); |
||||
generalButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
||||
|
||||
QListWidgetItem *identity = new QListWidgetItem(contentsWidget); |
||||
identity->setIcon(QIcon(":/img/settings/identity.png")); |
||||
identity->setText(tr("Identity")); |
||||
identity->setTextAlignment(Qt::AlignHCenter); |
||||
identity->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
||||
|
||||
QListWidgetItem *privacy = new QListWidgetItem(contentsWidget); |
||||
privacy->setIcon(QIcon(":/img/settings/privacy.png")); |
||||
privacy->setText(tr("Privacy")); |
||||
privacy->setTextAlignment(Qt::AlignHCenter); |
||||
privacy->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
||||
|
||||
QListWidgetItem *av = new QListWidgetItem(contentsWidget); |
||||
av->setIcon(QIcon(":/img/settings/av.png")); |
||||
av->setText(tr("Audio/Video")); |
||||
av->setTextAlignment(Qt::AlignHCenter); |
||||
av->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); |
||||
|
||||
contentsWidget->setCurrentRow(0); |
||||
} |
||||
|
||||
void SettingsDialog::createButtons() |
||||
{ |
||||
okButton = new QPushButton(tr("Ok"), this); |
||||
cancelButton = new QPushButton(tr("Cancel"), this); |
||||
applyButton = new QPushButton(tr("Apply"), this); |
||||
} |
||||
|
||||
void SettingsDialog::createConnections() |
||||
{ |
||||
connect(okButton, SIGNAL(clicked()), this, SLOT(okPressed())); |
||||
connect(cancelButton, SIGNAL(clicked()), this, SLOT(close())); |
||||
connect(applyButton, SIGNAL(clicked()), this, SLOT(applyPressed())); |
||||
connect( |
||||
contentsWidget, |
||||
SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), |
||||
this, |
||||
SLOT(changePage(QListWidgetItem*,QListWidgetItem*)) |
||||
); |
||||
} |
||||
|
||||
void SettingsDialog::createLayout() |
||||
{ |
||||
setMinimumSize(800, 500); |
||||
|
||||
QHBoxLayout *buttonsLayout = new QHBoxLayout(); |
||||
buttonsLayout->addStretch(1); |
||||
buttonsLayout->addWidget(okButton); |
||||
buttonsLayout->addWidget(cancelButton); |
||||
buttonsLayout->addWidget(applyButton); |
||||
|
||||
QHBoxLayout *hLayout = new QHBoxLayout(); |
||||
hLayout->addWidget(contentsWidget); |
||||
hLayout->addWidget(pagesWidget, 1); |
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout(); |
||||
mainLayout->addLayout(hLayout); |
||||
mainLayout->addLayout(buttonsLayout); |
||||
setLayout(mainLayout); |
||||
} |
||||
|
||||
void SettingsDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) |
||||
{ |
||||
if (!current) { |
||||
current = previous; |
||||
} |
||||
pagesWidget->setCurrentIndex(contentsWidget->row(current)); |
||||
} |
||||
|
||||
void SettingsDialog::okPressed() |
||||
{ |
||||
writeConfig(); |
||||
close(); |
||||
} |
||||
|
||||
void SettingsDialog::cancelPressed() |
||||
{ |
||||
close(); |
||||
} |
||||
|
||||
void SettingsDialog::applyPressed() |
||||
{ |
||||
writeConfig(); |
||||
} |
||||
|
||||
void SettingsDialog::readConfig() |
||||
{ |
||||
Settings& settings = Settings::getInstance(); |
||||
Core* core = widget->getCore(); |
||||
|
||||
generalPage->enableIPv6->setChecked(settings.getEnableIPv6()); |
||||
generalPage->useTranslations->setChecked(settings.getUseTranslations()); |
||||
generalPage->makeToxPortable->setChecked(settings.getMakeToxPortable()); |
||||
|
||||
identityPage->userName->setText(core->getUsername()); |
||||
identityPage->statusMessage->setText(core->getStatusMessage()); |
||||
identityPage->toxID->setText(core->getSelfId().toString()); |
||||
} |
||||
|
||||
void SettingsDialog::writeConfig() |
||||
{ |
||||
Settings& settings = Settings::getInstance(); |
||||
Core* core = widget->getCore(); |
||||
|
||||
|
||||
// only save settings if something changed
|
||||
bool saveSettings = false; |
||||
if (settings.getEnableIPv6() != generalPage->enableIPv6->isChecked()) { |
||||
settings.setEnableIPv6(generalPage->enableIPv6->isChecked()); |
||||
saveSettings = true; |
||||
} |
||||
|
||||
if (settings.getUseTranslations() != generalPage->useTranslations->isChecked()) { |
||||
settings.setUseTranslations(generalPage->useTranslations->isChecked()); |
||||
saveSettings = true; |
||||
} |
||||
|
||||
if (settings.getMakeToxPortable() != generalPage->makeToxPortable->isChecked()) { |
||||
settings.setMakeToxPortable(generalPage->makeToxPortable->isChecked()); |
||||
saveSettings = true; |
||||
} |
||||
|
||||
if (settings.getSmileyPack() != generalPage->smileyPack->currentData().toString()) { |
||||
settings.setSmileyPack(generalPage->smileyPack->currentData().toString()); |
||||
saveSettings = true; |
||||
} |
||||
|
||||
if (saveSettings) { |
||||
settings.save(); |
||||
} |
||||
|
||||
|
||||
// changing core settings will automatically save them
|
||||
QString userName = identityPage->userName->text(); |
||||
if (core->getUsername() != userName) { |
||||
core->setUsername(userName); |
||||
} |
||||
|
||||
QString statusMessage = identityPage->statusMessage->text(); |
||||
if (core->getStatusMessage() != statusMessage) { |
||||
core->setStatusMessage(statusMessage); |
||||
} |
||||
} |
||||
|
||||
Widget* SettingsDialog::getWidget() |
||||
{ |
||||
return widget; |
||||
} |
||||
|
||||
void SettingsDialog::closeEvent(QCloseEvent* e){ |
||||
avPage->closeTestVideo(); |
||||
QDialog::closeEvent(e); |
||||
} |
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
#ifndef SETTINGSDIALOG_H |
||||
#define SETTINGSDIALOG_H |
||||
|
||||
#include <QWidget> |
||||
#include <QDialog> |
||||
|
||||
class Widget; |
||||
class SelfCamView; |
||||
class Camera; |
||||
class GeneralPage; |
||||
class IdentityPage; |
||||
class PrivacyPage; |
||||
class AVPage; |
||||
|
||||
class QListWidget; |
||||
class QListWidgetItem; |
||||
class QStackedWidget; |
||||
class QPushButton; |
||||
class QCheckBox; |
||||
class QLineEdit; |
||||
|
||||
// =======================================
|
||||
// settings dialog
|
||||
//========================================
|
||||
class SettingsDialog : public QDialog |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit SettingsDialog(Widget *parent); |
||||
|
||||
void readConfig(); |
||||
void writeConfig(); |
||||
Widget* getWidget(); |
||||
void closeEvent(QCloseEvent *); |
||||
|
||||
public slots: |
||||
void changePage(QListWidgetItem *current, QListWidgetItem *previous); |
||||
void okPressed(); |
||||
void cancelPressed(); |
||||
void applyPressed(); |
||||
|
||||
private: |
||||
void createPages(); |
||||
void createButtons(); |
||||
void createConnections(); |
||||
void createLayout(); |
||||
|
||||
Widget* widget; |
||||
|
||||
// pages
|
||||
GeneralPage* generalPage; |
||||
IdentityPage* identityPage; |
||||
PrivacyPage* privacyPage; |
||||
AVPage* avPage; |
||||
QListWidget* contentsWidget; |
||||
QStackedWidget* pagesWidget; |
||||
|
||||
// buttons
|
||||
QPushButton* okButton; |
||||
QPushButton* cancelButton; |
||||
QPushButton* applyButton; |
||||
}; |
||||
|
||||
#endif // SETTINGSDIALOG_H
|
Loading…
Reference in new issue