Show a hint in a statusbar when no object selected.

This commit is contained in:
Kolan Sh 2016-04-08 02:08:04 +03:00
parent 4092f9dffe
commit 5ab27047fc
4 changed files with 59 additions and 44 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: laview-desktop\n" "Project-Id-Version: laview-desktop\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-01 00:18+0300\n" "POT-Creation-Date: 2016-04-08 02:06+0300\n"
"PO-Revision-Date: 2015-10-24 20:19+0300\n" "PO-Revision-Date: 2015-10-24 20:19+0300\n"
"Last-Translator: <backbone@backbone.ws>\n" "Last-Translator: <backbone@backbone.ws>\n"
"Language-Team: German\n" "Language-Team: German\n"
@ -33,9 +33,9 @@ msgstr ""
msgid "We're ready, Commander! Select or create a template. :-)" msgid "We're ready, Commander! Select or create a template. :-)"
msgstr "" msgstr ""
#: src/MainWindow.vala:82 src/MainWindow.vala:125 src/MainWindow.vala:173 #: src/MainWindow.vala:82 src/MainWindow.vala:125 src/MainWindow.vala:176
#: src/MainWindow.vala:201 src/MainWindow.vala:213 src/MainWindow.vala:229 #: src/MainWindow.vala:204 src/MainWindow.vala:216 src/MainWindow.vala:232
#: src/MainWindow.vala:247 src/MainWindow.vala:285 src/MainWindow.vala:353 #: src/MainWindow.vala:250 src/MainWindow.vala:288 src/MainWindow.vala:356
#: src/SubprocessDialog.vala:43 src/Utils.vala:21 src/main.vala:64 #: src/SubprocessDialog.vala:43 src/Utils.vala:21 src/main.vala:64
#: src/main.vala:83 #: src/main.vala:83
msgid "Error: " msgid "Error: "
@ -45,7 +45,7 @@ msgstr ""
msgid "Select templates" msgid "Select templates"
msgstr "" msgstr ""
#: src/MainWindow.vala:92 src/MainWindow.vala:313 #: src/MainWindow.vala:92 src/MainWindow.vala:316
msgid "_Cancel" msgid "_Cancel"
msgstr "" msgstr ""
@ -57,39 +57,43 @@ msgstr ""
msgid "After composing all objects print the document." msgid "After composing all objects print the document."
msgstr "" msgstr ""
#: src/MainWindow.vala:225 #: src/MainWindow.vala:172
msgid "Select an object first."
msgstr ""
#: src/MainWindow.vala:228
msgid "=== Print to PDF file... ===\n" msgid "=== Print to PDF file... ===\n"
msgstr "" msgstr ""
#: src/MainWindow.vala:291 #: src/MainWindow.vala:294
msgid "Document analized, select an object and set it's properties." msgid "Document analized, select an object and set it's properties."
msgstr "" msgstr ""
#: src/MainWindow.vala:296 #: src/MainWindow.vala:299
msgid "Press 'Properties' button to compose the object." msgid "Press 'Properties' button to compose the object."
msgstr "" msgstr ""
#: src/MainWindow.vala:307 #: src/MainWindow.vala:310
msgid "Prepare the document first! >;-]" msgid "Prepare the document first! >;-]"
msgstr "" msgstr ""
#: src/MainWindow.vala:311 #: src/MainWindow.vala:314
msgid "Select destination" msgid "Select destination"
msgstr "" msgstr ""
#: src/MainWindow.vala:314 #: src/MainWindow.vala:317
msgid "_Save" msgid "_Save"
msgstr "" msgstr ""
#: src/MainWindow.vala:346 #: src/MainWindow.vala:349
msgid "bytes of" msgid "bytes of"
msgstr "" msgstr ""
#: src/MainWindow.vala:347 #: src/MainWindow.vala:350
msgid "bytes copied/saved" msgid "bytes copied/saved"
msgstr "" msgstr ""
#: src/MainWindow.vala:350 #: src/MainWindow.vala:353
msgid "Save/Copy operation complete! :-)" msgid "Save/Copy operation complete! :-)"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: laview-desktop\n" "Project-Id-Version: laview-desktop\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-01 00:18+0300\n" "POT-Creation-Date: 2016-04-08 02:06+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -33,9 +33,9 @@ msgstr ""
msgid "We're ready, Commander! Select or create a template. :-)" msgid "We're ready, Commander! Select or create a template. :-)"
msgstr "" msgstr ""
#: src/MainWindow.vala:82 src/MainWindow.vala:125 src/MainWindow.vala:173 #: src/MainWindow.vala:82 src/MainWindow.vala:125 src/MainWindow.vala:176
#: src/MainWindow.vala:201 src/MainWindow.vala:213 src/MainWindow.vala:229 #: src/MainWindow.vala:204 src/MainWindow.vala:216 src/MainWindow.vala:232
#: src/MainWindow.vala:247 src/MainWindow.vala:285 src/MainWindow.vala:353 #: src/MainWindow.vala:250 src/MainWindow.vala:288 src/MainWindow.vala:356
#: src/SubprocessDialog.vala:43 src/Utils.vala:21 src/main.vala:64 #: src/SubprocessDialog.vala:43 src/Utils.vala:21 src/main.vala:64
#: src/main.vala:83 #: src/main.vala:83
msgid "Error: " msgid "Error: "
@ -45,7 +45,7 @@ msgstr ""
msgid "Select templates" msgid "Select templates"
msgstr "" msgstr ""
#: src/MainWindow.vala:92 src/MainWindow.vala:313 #: src/MainWindow.vala:92 src/MainWindow.vala:316
msgid "_Cancel" msgid "_Cancel"
msgstr "" msgstr ""
@ -57,39 +57,43 @@ msgstr ""
msgid "After composing all objects print the document." msgid "After composing all objects print the document."
msgstr "" msgstr ""
#: src/MainWindow.vala:225 #: src/MainWindow.vala:172
msgid "Select an object first."
msgstr ""
#: src/MainWindow.vala:228
msgid "=== Print to PDF file... ===\n" msgid "=== Print to PDF file... ===\n"
msgstr "" msgstr ""
#: src/MainWindow.vala:291 #: src/MainWindow.vala:294
msgid "Document analized, select an object and set it's properties." msgid "Document analized, select an object and set it's properties."
msgstr "" msgstr ""
#: src/MainWindow.vala:296 #: src/MainWindow.vala:299
msgid "Press 'Properties' button to compose the object." msgid "Press 'Properties' button to compose the object."
msgstr "" msgstr ""
#: src/MainWindow.vala:307 #: src/MainWindow.vala:310
msgid "Prepare the document first! >;-]" msgid "Prepare the document first! >;-]"
msgstr "" msgstr ""
#: src/MainWindow.vala:311 #: src/MainWindow.vala:314
msgid "Select destination" msgid "Select destination"
msgstr "" msgstr ""
#: src/MainWindow.vala:314 #: src/MainWindow.vala:317
msgid "_Save" msgid "_Save"
msgstr "" msgstr ""
#: src/MainWindow.vala:346 #: src/MainWindow.vala:349
msgid "bytes of" msgid "bytes of"
msgstr "" msgstr ""
#: src/MainWindow.vala:347 #: src/MainWindow.vala:350
msgid "bytes copied/saved" msgid "bytes copied/saved"
msgstr "" msgstr ""
#: src/MainWindow.vala:350 #: src/MainWindow.vala:353
msgid "Save/Copy operation complete! :-)" msgid "Save/Copy operation complete! :-)"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: laview-desktop\n" "Project-Id-Version: laview-desktop\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-01 00:18+0300\n" "POT-Creation-Date: 2016-04-08 02:06+0300\n"
"PO-Revision-Date: 2015-10-24 20:19+0300\n" "PO-Revision-Date: 2015-10-24 20:19+0300\n"
"Last-Translator: <backbone@backbone.ws>\n" "Last-Translator: <backbone@backbone.ws>\n"
"Language-Team: Russian\n" "Language-Team: Russian\n"
@ -34,9 +34,9 @@ msgstr "Рабочее окно LAview"
msgid "We're ready, Commander! Select or create a template. :-)" msgid "We're ready, Commander! Select or create a template. :-)"
msgstr "Мы готовы, Командир! Выберите или создайте шаблон. :-)" msgstr "Мы готовы, Командир! Выберите или создайте шаблон. :-)"
#: src/MainWindow.vala:82 src/MainWindow.vala:125 src/MainWindow.vala:173 #: src/MainWindow.vala:82 src/MainWindow.vala:125 src/MainWindow.vala:176
#: src/MainWindow.vala:201 src/MainWindow.vala:213 src/MainWindow.vala:229 #: src/MainWindow.vala:204 src/MainWindow.vala:216 src/MainWindow.vala:232
#: src/MainWindow.vala:247 src/MainWindow.vala:285 src/MainWindow.vala:353 #: src/MainWindow.vala:250 src/MainWindow.vala:288 src/MainWindow.vala:356
#: src/SubprocessDialog.vala:43 src/Utils.vala:21 src/main.vala:64 #: src/SubprocessDialog.vala:43 src/Utils.vala:21 src/main.vala:64
#: src/main.vala:83 #: src/main.vala:83
msgid "Error: " msgid "Error: "
@ -46,7 +46,7 @@ msgstr "Ошибка: "
msgid "Select templates" msgid "Select templates"
msgstr "Выберите шаблоны" msgstr "Выберите шаблоны"
#: src/MainWindow.vala:92 src/MainWindow.vala:313 #: src/MainWindow.vala:92 src/MainWindow.vala:316
msgid "_Cancel" msgid "_Cancel"
msgstr "_Отмена" msgstr "_Отмена"
@ -58,39 +58,43 @@ msgstr "_Открыть"
msgid "After composing all objects print the document." msgid "After composing all objects print the document."
msgstr "После компоновки всех объектов напечатайте документ." msgstr "После компоновки всех объектов напечатайте документ."
#: src/MainWindow.vala:225 #: src/MainWindow.vala:172
msgid "Select an object first."
msgstr "Сначала выберите объект."
#: src/MainWindow.vala:228
msgid "=== Print to PDF file... ===\n" msgid "=== Print to PDF file... ===\n"
msgstr "=== Печать в PDF файл... ===\n" msgstr "=== Печать в PDF файл... ===\n"
#: src/MainWindow.vala:291 #: src/MainWindow.vala:294
msgid "Document analized, select an object and set it's properties." msgid "Document analized, select an object and set it's properties."
msgstr "Документ проанализирован, выберите объект и установите его свойства." msgstr "Документ проанализирован, выберите объект и установите его свойства."
#: src/MainWindow.vala:296 #: src/MainWindow.vala:299
msgid "Press 'Properties' button to compose the object." msgid "Press 'Properties' button to compose the object."
msgstr "Нажмите кнопку 'Свойства' для компоновки объекта." msgstr "Нажмите кнопку 'Свойства' для компоновки объекта."
#: src/MainWindow.vala:307 #: src/MainWindow.vala:310
msgid "Prepare the document first! >;-]" msgid "Prepare the document first! >;-]"
msgstr "Сначала подготовьте документ! >;-]" msgstr "Сначала подготовьте документ! >;-]"
#: src/MainWindow.vala:311 #: src/MainWindow.vala:314
msgid "Select destination" msgid "Select destination"
msgstr "Выберите назначение" msgstr "Выберите назначение"
#: src/MainWindow.vala:314 #: src/MainWindow.vala:317
msgid "_Save" msgid "_Save"
msgstr "_Сохранить" msgstr "_Сохранить"
#: src/MainWindow.vala:346 #: src/MainWindow.vala:349
msgid "bytes of" msgid "bytes of"
msgstr "байт из" msgstr "байт из"
#: src/MainWindow.vala:347 #: src/MainWindow.vala:350
msgid "bytes copied/saved" msgid "bytes copied/saved"
msgstr "байт скопировано/сохранено" msgstr "байт скопировано/сохранено"
#: src/MainWindow.vala:350 #: src/MainWindow.vala:353
msgid "Save/Copy operation complete! :-)" msgid "Save/Copy operation complete! :-)"
msgstr "Операция сохранения/копирования завершена! :-)" msgstr "Операция сохранения/копирования завершена! :-)"

View File

@ -165,9 +165,12 @@ namespace LAview.Desktop {
try { try {
var t_indices = get_template_indices (); var t_indices = get_template_indices ();
var o_indices = get_objects_indices (); var o_indices = get_objects_indices ();
if (t_indices.length != 0 && o_indices.length != 0) if (t_indices.length != 0 && o_indices.length != 0) {
AppCore.core.compose_object (window, t_indices[0], o_indices[0]); AppCore.core.compose_object (window, t_indices[0], o_indices[0]);
statusbar_show (_("After composing all objects print the document.")); statusbar_show (_("After composing all objects print the document."));
} else {
statusbar_show (_("Select an object first."));
}
} catch (Error err) { } catch (Error err) {
var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR, var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR,
ButtonsType.CLOSE, _("Error: ")+err.message); ButtonsType.CLOSE, _("Error: ")+err.message);