Merge branch 'release-1.1.0'

This commit is contained in:
Kolan Sh 2016-01-24 03:09:50 +03:00
commit 941cf093bb
6 changed files with 281 additions and 28 deletions

View File

@ -6,7 +6,7 @@ SET (PROJECT_LOWERCASE_NAME "laview-desktop")
SET (PROJECT_DESCRIPTION "LAview Desktop Application.")
SET (MAJOR 1)
SET (MINOR 0)
SET (MINOR 1)
SET (PATCH 0)
LIST (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/backbone)

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: laview-desktop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-27 19:03+0300\n"
"POT-Creation-Date: 2016-01-24 02:59+0300\n"
"PO-Revision-Date: 2015-10-24 20:19+0300\n"
"Last-Translator: <backbone@backbone.ws>\n"
"Language-Team: German\n"
@ -45,11 +45,20 @@ msgstr ""
msgid "State of an imaginary light switch."
msgstr ""
#: src/MainWindow.vala:58
msgid "We're ready, Commander! Select or create a template. :-)"
msgstr ""
#: src/MainWindow.vala:76 src/MainWindow.vala:120 src/MainWindow.vala:194
#: src/MainWindow.vala:212 src/MainWindow.vala:302
msgid "Error"
msgstr ""
#: src/MainWindow.vala:84
msgid "Select templates"
msgstr ""
#: src/MainWindow.vala:86
#: src/MainWindow.vala:86 src/MainWindow.vala:268
msgid "_Cancel"
msgstr ""
@ -57,6 +66,42 @@ msgstr ""
msgid "_Open"
msgstr ""
#: src/MainWindow.vala:166
msgid "After composing all objects print the document."
msgstr ""
#: src/MainWindow.vala:248
msgid "Document analized, select an object and set it's properties."
msgstr ""
#: src/MainWindow.vala:253
msgid "Press 'Properties' button to compose the object."
msgstr ""
#: src/MainWindow.vala:262
msgid "Prepare the document first! >;-]"
msgstr ""
#: src/MainWindow.vala:266
msgid "Select destination"
msgstr ""
#: src/MainWindow.vala:269
msgid "_Save"
msgstr ""
#: src/MainWindow.vala:297
msgid "bytes copied/saved"
msgstr ""
#: src/MainWindow.vala:297
msgid "bytes of"
msgstr ""
#: src/MainWindow.vala:299
msgid "Save/Copy operation complete! :-)"
msgstr ""
#: src/main.vala:33
msgid "Show the application's version"
msgstr ""
@ -176,21 +221,25 @@ msgid "Edit the result document"
msgstr ""
#: ui/glade/laview-desktop.glade.h:26
msgid "Application preferences"
msgid "Save the document as..."
msgstr ""
#: ui/glade/laview-desktop.glade.h:27
msgid "Help and reference"
msgid "Application preferences"
msgstr ""
#: ui/glade/laview-desktop.glade.h:28
msgid "Close the application"
msgid "Help and reference"
msgstr ""
#: ui/glade/laview-desktop.glade.h:29
msgid "Templates"
msgid "Close the application"
msgstr ""
#: ui/glade/laview-desktop.glade.h:30
msgid "Templates"
msgstr ""
#: ui/glade/laview-desktop.glade.h:31
msgid "Document Objects"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: laview-desktop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-27 19:04+0300\n"
"POT-Creation-Date: 2016-01-24 02:59+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -45,11 +45,20 @@ msgstr ""
msgid "State of an imaginary light switch."
msgstr ""
#: src/MainWindow.vala:58
msgid "We're ready, Commander! Select or create a template. :-)"
msgstr ""
#: src/MainWindow.vala:76 src/MainWindow.vala:120 src/MainWindow.vala:194
#: src/MainWindow.vala:212 src/MainWindow.vala:302
msgid "Error"
msgstr ""
#: src/MainWindow.vala:84
msgid "Select templates"
msgstr ""
#: src/MainWindow.vala:86
#: src/MainWindow.vala:86 src/MainWindow.vala:268
msgid "_Cancel"
msgstr ""
@ -57,6 +66,42 @@ msgstr ""
msgid "_Open"
msgstr ""
#: src/MainWindow.vala:166
msgid "After composing all objects print the document."
msgstr ""
#: src/MainWindow.vala:248
msgid "Document analized, select an object and set it's properties."
msgstr ""
#: src/MainWindow.vala:253
msgid "Press 'Properties' button to compose the object."
msgstr ""
#: src/MainWindow.vala:262
msgid "Prepare the document first! >;-]"
msgstr ""
#: src/MainWindow.vala:266
msgid "Select destination"
msgstr ""
#: src/MainWindow.vala:269
msgid "_Save"
msgstr ""
#: src/MainWindow.vala:297
msgid "bytes copied/saved"
msgstr ""
#: src/MainWindow.vala:297
msgid "bytes of"
msgstr ""
#: src/MainWindow.vala:299
msgid "Save/Copy operation complete! :-)"
msgstr ""
#: src/main.vala:33
msgid "Show the application's version"
msgstr ""
@ -176,21 +221,25 @@ msgid "Edit the result document"
msgstr ""
#: ui/glade/laview-desktop.glade.h:26
msgid "Application preferences"
msgid "Save the document as..."
msgstr ""
#: ui/glade/laview-desktop.glade.h:27
msgid "Help and reference"
msgid "Application preferences"
msgstr ""
#: ui/glade/laview-desktop.glade.h:28
msgid "Close the application"
msgid "Help and reference"
msgstr ""
#: ui/glade/laview-desktop.glade.h:29
msgid "Templates"
msgid "Close the application"
msgstr ""
#: ui/glade/laview-desktop.glade.h:30
msgid "Templates"
msgstr ""
#: ui/glade/laview-desktop.glade.h:31
msgid "Document Objects"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: laview-desktop\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-27 19:03+0300\n"
"POT-Creation-Date: 2016-01-24 02:59+0300\n"
"PO-Revision-Date: 2015-10-24 20:19+0300\n"
"Last-Translator: <backbone@backbone.ws>\n"
"Language-Team: Russian\n"
@ -46,11 +46,20 @@ msgstr "Включен ли свет?"
msgid "State of an imaginary light switch."
msgstr "Состояние воображаемого выключателя света."
#: src/MainWindow.vala:58
msgid "We're ready, Commander! Select or create a template. :-)"
msgstr "Мы готовы, Командир! Выберите или создайте шаблон. :-)"
#: src/MainWindow.vala:76 src/MainWindow.vala:120 src/MainWindow.vala:194
#: src/MainWindow.vala:212 src/MainWindow.vala:302
msgid "Error"
msgstr "Ошибка"
#: src/MainWindow.vala:84
msgid "Select templates"
msgstr "Выберите шаблоны"
#: src/MainWindow.vala:86
#: src/MainWindow.vala:86 src/MainWindow.vala:268
msgid "_Cancel"
msgstr "_Отмена"
@ -58,6 +67,42 @@ msgstr "_Отмена"
msgid "_Open"
msgstr "_Открыть"
#: src/MainWindow.vala:166
msgid "After composing all objects print the document."
msgstr "После компоновки всех объектов напечатайте документ."
#: src/MainWindow.vala:248
msgid "Document analized, select an object and set it's properties."
msgstr "Документ проанализирован, выберите объект и установите его свойства."
#: src/MainWindow.vala:253
msgid "Press 'Properties' button to compose the object."
msgstr "Нажмите кнопку 'Свойства' для компоновки объекта."
#: src/MainWindow.vala:262
msgid "Prepare the document first! >;-]"
msgstr "Сначала подготовьте документ! >;-]"
#: src/MainWindow.vala:266
msgid "Select destination"
msgstr "Выберите назначение"
#: src/MainWindow.vala:269
msgid "_Save"
msgstr "_Сохранить"
#: src/MainWindow.vala:297
msgid "bytes copied/saved"
msgstr "байт скопировано/сохранено"
#: src/MainWindow.vala:297
msgid "bytes of"
msgstr "байт из"
#: src/MainWindow.vala:299
msgid "Save/Copy operation complete! :-)"
msgstr "Операция сохранения/копирования завершена! :-)"
#: src/main.vala:33
msgid "Show the application's version"
msgstr "Показать версию приложения"
@ -177,21 +222,25 @@ msgid "Edit the result document"
msgstr "Редактировать полученный документ"
#: ui/glade/laview-desktop.glade.h:26
msgid "Save the document as..."
msgstr "Сохранить документ как..."
#: ui/glade/laview-desktop.glade.h:27
msgid "Application preferences"
msgstr "Параметры приложения"
#: ui/glade/laview-desktop.glade.h:27
#: ui/glade/laview-desktop.glade.h:28
msgid "Help and reference"
msgstr "Помощь и справка"
#: ui/glade/laview-desktop.glade.h:28
#: ui/glade/laview-desktop.glade.h:29
msgid "Close the application"
msgstr "Закрыть приложение"
#: ui/glade/laview-desktop.glade.h:29
#: ui/glade/laview-desktop.glade.h:30
msgid "Templates"
msgstr "Шаблоны"
#: ui/glade/laview-desktop.glade.h:30
#: ui/glade/laview-desktop.glade.h:31
msgid "Document Objects"
msgstr "Объекты документа"

View File

@ -55,7 +55,7 @@ namespace LAview.Desktop {
public void show_all () {
window.show_all ();
statusbar_show ("We're ready, Commander! Select or create a template. :-)");
statusbar_show (_("We're ready, Commander! Select or create a template. :-)"));
}
[CCode (instance_pos = -1)]
@ -73,7 +73,7 @@ namespace LAview.Desktop {
subprocess.spawnv(argv);
} catch (Error err) {
var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR,
ButtonsType.CLOSE, @"Error: $(err.message).");
ButtonsType.CLOSE, _("Error")+@": $(err.message).");
msg.response.connect ((response_id) => { msg.destroy (); } );
msg.show ();
}
@ -96,7 +96,7 @@ namespace LAview.Desktop {
filter.add_pattern ("*.lyx");
if (chooser.run () == ResponseType.ACCEPT) {
SList<string> paths = chooser.get_filenames ();
var paths = chooser.get_filenames ();
foreach (unowned string path in paths)
AppCore.core.add_template (path);
@ -117,7 +117,7 @@ namespace LAview.Desktop {
subprocess.spawnv(args);
} catch (Error err) {
var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR,
ButtonsType.CLOSE, @"Error: $(err.message).");
ButtonsType.CLOSE, _("Error")+@": $(err.message).");
msg.response.connect ((response_id) => { msg.destroy (); } );
msg.show ();
}
@ -163,7 +163,7 @@ namespace LAview.Desktop {
if (t_indices.length != 0 && o_indices.length != 0) {
AppCore.core.compose_object (t_indices[0], o_indices[0]);
}
statusbar_show ("After composing all objects print the document.");
statusbar_show (_("After composing all objects print the document."));
}
[CCode (instance_pos = -1)]
@ -191,7 +191,7 @@ namespace LAview.Desktop {
post_print);
} catch (Error err) {
var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR,
ButtonsType.CLOSE, @"Error: $(err.message).");
ButtonsType.CLOSE, _("Error")+@": $(err.message).");
msg.response.connect ((response_id) => { msg.destroy (); } );
msg.show ();
}
@ -209,7 +209,7 @@ namespace LAview.Desktop {
show_uri (null, "https://redmine.backbone.ws/projects/laview/wiki", Gdk.CURRENT_TIME);
} catch (Error err) {
var msg = new MessageDialog (window, DialogFlags.MODAL, MessageType.ERROR,
ButtonsType.CLOSE, @"Error: $(err.message).");
ButtonsType.CLOSE, _("Error")+@": $(err.message).");
msg.response.connect ((response_id) => { msg.destroy (); } );
msg.show ();
}
@ -245,12 +245,68 @@ namespace LAview.Desktop {
liststore_doc_objects.set (iter, 0, t);
}
}
statusbar_show ("Document analized, select an object and set it's properties.");
statusbar_show (_("Document analized, select an object and set it's properties."));
}
[CCode (instance_pos = -1)]
public void objects_cursor_changed (Gtk.TreeView treeview) {
statusbar_show ("Press 'Properties' button to compose the object.");
statusbar_show (_("Press 'Properties' button to compose the object."));
}
[CCode (instance_pos = -1)]
public void action_saveas_activate (Gtk.Action action) {
var indices = get_template_indices ();
if (indices.length == 0) return;
var tmp_pdf = AppCore.core.get_pdf_file_path (indices[0]);
if (tmp_pdf == null || tmp_pdf == "") {
statusbar_show (_("Prepare the document first! >;-]"));
return;
}
FileChooserDialog chooser = new Gtk.FileChooserDialog (_("Select destination"), window,
FileChooserAction.SAVE,
_("_Cancel"), ResponseType.CANCEL,
_("_Save"), ResponseType.ACCEPT);
chooser.select_multiple = false;
FileFilter filter = new FileFilter ();
chooser.set_filter (filter);
filter.add_mime_type ("application/pdf");
filter.add_pattern ("*.pdf");
// set current pdf file name or select an existance one
var template_name = AppCore.core.get_template_path_by_index (indices[0]);
template_name = File.new_for_path(template_name).get_basename ();
if (template_name.down().has_suffix(".lyx"))
template_name = template_name.splice (template_name.length-4, template_name.length, ".pdf");
if (File.new_for_path(template_name).query_exists())
chooser.set_filename (template_name);
else
chooser.set_current_name (template_name);
// open dialog
var response = chooser.run ();
// process response
if (response == ResponseType.ACCEPT) {
var save_path = chooser.get_filename ();
var file_src = File.new_for_path (tmp_pdf);
var file_dest = File.new_for_path (save_path);
try {
file_src.copy (file_dest, FileCopyFlags.OVERWRITE, null,
(current_num_bytes, total_num_bytes) => {
statusbar_show (@"$current_num_bytes "+_("bytes of")+
@" $total_num_bytes "+_("bytes copied/saved")+".");
});
statusbar_show (_("Save/Copy operation complete! :-)"));
} catch (Error err) {
var msg = new MessageDialog (chooser, DialogFlags.MODAL, MessageType.ERROR,
ButtonsType.CLOSE, _("Error")+@": $(err.message).");
msg.response.connect ((response_id) => { msg.destroy (); chooser.close (); } );
msg.show ();
}
}
chooser.close ();
}
}
}

View File

@ -94,6 +94,12 @@
<signal name="activate" handler="laview_desktop_main_window_action_edit_result_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkAction" id="action_saveas">
<property name="always_show_image">True</property>
<signal name="activate" handler="laview_desktop_main_window_action_saveas_activate" swapped="no"/>
</object>
</child>
</object>
<object class="GtkFileFilter" id="filefilter_open">
<patterns>
@ -523,6 +529,18 @@
<property name="always_show_image">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_saveas">
<property name="label">gtk-save</property>
<property name="use_action_appearance">False</property>
<property name="related_action">action_saveas</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<property name="always_show_image">True</property>
</object>
</child>
</object>
</child>
</object>
@ -722,6 +740,21 @@
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="toolbutton_saveas">
<property name="use_action_appearance">False</property>
<property name="related_action">action_saveas</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Save the document as...</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-save</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="separatortoolitem2">
<property name="visible">True</property>
@ -1032,6 +1065,23 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_saveas">
<property name="label">gtk-save</property>
<property name="use_action_appearance">False</property>
<property name="related_action">action_saveas</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="always_show_image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>