From 3a46e1fb95c334883510140cda1a850b8e56ba81 Mon Sep 17 00:00:00 2001 From: Sehong Na Date: Sat, 31 May 2014 12:53:47 +0900 Subject: [PATCH] Initialize Tizen 2.3 --- AUTHORS | 8 + CMakeLists.txt | 32 + LICENSE.Flora | 206 ++ NOTICE | 4 + debian/changelog | 1416 +++++++++++++ mobileprint/CMakeLists.txt | 72 + mobileprint/app/CMakeLists.txt | 45 + mobileprint/app/icon_mobileprint.png | Bin 0 -> 267 bytes mobileprint/app/image_editor_conn.c | 138 ++ mobileprint/app/mobileprint.c | 578 ++++++ mobileprint/app/preview_content.c | 207 ++ mobileprint/app/pts_common.c | 1429 ++++++++++++++ mobileprint/app/pts_main_view.c | 2071 ++++++++++++++++++++ mobileprint/app/pts_print_search.c | 961 +++++++++ mobileprint/app/pts_setting_view.c | 1209 ++++++++++++ mobileprint/app/pts_util.c | 102 + mobileprint/edc/genlist_custom.edc | 77 + mobileprint/edc/mobileprint.edc | 478 +++++ mobileprint/images/A01_print_popup_icon_Rotate.png | Bin 0 -> 1775 bytes .../images/A01_print_popup_icon_Rotate02.png | Bin 0 -> 1765 bytes mobileprint/images/A01_print_popup_icon_print.png | Bin 0 -> 1561 bytes .../images/A01_print_popup_icon_scaling.png | Bin 0 -> 1695 bytes .../images/A01_print_popup_icon_setting.png | Bin 0 -> 1848 bytes mobileprint/images/A01_print_popup_icon_size.png | Bin 0 -> 2059 bytes mobileprint/include/image_editor_conn.h | 26 + mobileprint/include/mobileprint.h | 27 + mobileprint/include/preview_content.h | 33 + mobileprint/include/pts_common.h | 431 ++++ mobileprint/include/pts_debug.h | 132 ++ mobileprint/include/pts_main_view.h | 75 + mobileprint/include/pts_setting_view.h | 30 + mobileprint/include/pts_util.h | 29 + mobileprint/mobileprint.xml | 19 + mobileprint/po/CMakeLists.txt | 35 + mobileprint/po/POTFILES.in | 6 + mobileprint/po/ar.po | 171 ++ mobileprint/po/az.po | 171 ++ mobileprint/po/bg.po | 171 ++ mobileprint/po/ca.po | 171 ++ mobileprint/po/cs.po | 171 ++ mobileprint/po/da.po | 171 ++ mobileprint/po/de_DE.po | 171 ++ mobileprint/po/el_GR.po | 171 ++ mobileprint/po/en.po | 171 ++ mobileprint/po/en_PH.po | 171 ++ mobileprint/po/en_US.po | 171 ++ mobileprint/po/es_ES.po | 171 ++ mobileprint/po/es_US.po | 171 ++ mobileprint/po/et.po | 171 ++ mobileprint/po/eu.po | 171 ++ mobileprint/po/fi.po | 171 ++ mobileprint/po/fr_CA.po | 171 ++ mobileprint/po/fr_FR.po | 171 ++ mobileprint/po/ga.po | 171 ++ mobileprint/po/gl.po | 171 ++ mobileprint/po/hi.po | 171 ++ mobileprint/po/hr.po | 171 ++ mobileprint/po/hu.po | 171 ++ mobileprint/po/hy.po | 171 ++ mobileprint/po/is.po | 171 ++ mobileprint/po/it_IT.po | 171 ++ mobileprint/po/ja_JP.po | 171 ++ mobileprint/po/ka.po | 171 ++ mobileprint/po/kk.po | 171 ++ mobileprint/po/ko_KR.po | 171 ++ mobileprint/po/lt.po | 171 ++ mobileprint/po/lv.po | 171 ++ mobileprint/po/mk.po | 171 ++ mobileprint/po/mobileprint.pot | 254 +++ mobileprint/po/nb.po | 171 ++ mobileprint/po/nl_NL.po | 171 ++ mobileprint/po/pl.po | 171 ++ mobileprint/po/pt_BR.po | 171 ++ mobileprint/po/pt_PT.po | 171 ++ mobileprint/po/ro.po | 171 ++ mobileprint/po/ru_RU.po | 171 ++ mobileprint/po/sk.po | 171 ++ mobileprint/po/sl.po | 171 ++ mobileprint/po/sr.po | 171 ++ mobileprint/po/sv.po | 171 ++ mobileprint/po/tr_TR.po | 171 ++ mobileprint/po/uk.po | 171 ++ mobileprint/po/update-po.sh | 59 + mobileprint/po/uz.po | 171 ++ mobileprint/po/zh_CN.po | 171 ++ mobileprint/po/zh_HK.po | 171 ++ mobileprint/po/zh_SG.po | 171 ++ mobileprint/po/zh_TW.po | 171 ++ mobileprint/preview_engine/CMakeLists.txt | 8 + .../preview_engine/include/preview_engine.h | 93 + mobileprint/preview_engine/include/preview_model.h | 92 + .../preview_engine/include/preview_task_model.h | 60 + mobileprint/preview_engine/lib/CMakeLists.txt | 5 + mobileprint/preview_engine/lib/preview_engine.c | 194 ++ mobileprint/preview_engine/lib/preview_model.c | 224 +++ .../preview_engine/lib/preview_task_model.c | 552 ++++++ mobileprint/previewgen/CMakeLists.txt | 11 + mobileprint/previewgen/default.ppd | 91 + mobileprint/previewgen/include/evas_render.h | 37 + mobileprint/previewgen/include/image_scaler.h | 29 + mobileprint/previewgen/include/page_preview.h | 96 + mobileprint/previewgen/include/paper_size.h | 51 + mobileprint/previewgen/include/pdfgen.h | 66 + mobileprint/previewgen/include/pgen_debug.h | 120 ++ mobileprint/previewgen/include/preview_coords.h | 77 + mobileprint/previewgen/include/preview_util.h | 28 + mobileprint/previewgen/include/previewgen.h | 64 + mobileprint/previewgen/lib/CMakeLists.txt | 16 + mobileprint/previewgen/lib/evas_render.c | 201 ++ mobileprint/previewgen/lib/image_scaler.c | 101 + mobileprint/previewgen/lib/page_preview.c | 661 +++++++ mobileprint/previewgen/lib/paper_size.c | 142 ++ mobileprint/previewgen/lib/pdfgen.c | 237 +++ mobileprint/previewgen/lib/preview_coords.c | 173 ++ mobileprint/previewgen/lib/preview_util.c | 131 ++ mobileprint/previewgen/lib/previewgen.c | 447 +++++ mobileprint/previewgen/util/CMakeLists.txt | 11 + mobileprint/previewgen/util/main.c | 492 +++++ mobileprint/smsc/CMakeLists.txt | 8 + mobileprint/smsc/include/smsc_control.h | 51 + mobileprint/smsc/include/smsc_debug.h | 78 + mobileprint/smsc/include/smsc_position.h | 58 + mobileprint/smsc/include/smsc_smart.h | 46 + mobileprint/smsc/include/smsc_widget.h | 72 + mobileprint/smsc/lib/CMakeLists.txt | 5 + mobileprint/smsc/lib/smsc_control.c | 131 ++ mobileprint/smsc/lib/smsc_position.c | 297 +++ mobileprint/smsc/lib/smsc_smart.c | 412 ++++ mobileprint/smsc/lib/smsc_widget.c | 674 +++++++ org.tizen.mobileprint.manifest | 9 + org.tizen.mobileprint.rule | 196 ++ packaging/mobileprint.spec | 73 + 132 files changed, 25530 insertions(+) create mode 100644 AUTHORS create mode 100644 CMakeLists.txt create mode 100644 LICENSE.Flora create mode 100644 NOTICE create mode 100755 debian/changelog create mode 100644 mobileprint/CMakeLists.txt create mode 100644 mobileprint/app/CMakeLists.txt create mode 100644 mobileprint/app/icon_mobileprint.png create mode 100644 mobileprint/app/image_editor_conn.c create mode 100644 mobileprint/app/mobileprint.c create mode 100644 mobileprint/app/preview_content.c create mode 100644 mobileprint/app/pts_common.c create mode 100644 mobileprint/app/pts_main_view.c create mode 100644 mobileprint/app/pts_print_search.c create mode 100644 mobileprint/app/pts_setting_view.c create mode 100644 mobileprint/app/pts_util.c create mode 100644 mobileprint/edc/genlist_custom.edc create mode 100644 mobileprint/edc/mobileprint.edc create mode 100644 mobileprint/images/A01_print_popup_icon_Rotate.png create mode 100644 mobileprint/images/A01_print_popup_icon_Rotate02.png create mode 100644 mobileprint/images/A01_print_popup_icon_print.png create mode 100644 mobileprint/images/A01_print_popup_icon_scaling.png create mode 100644 mobileprint/images/A01_print_popup_icon_setting.png create mode 100644 mobileprint/images/A01_print_popup_icon_size.png create mode 100644 mobileprint/include/image_editor_conn.h create mode 100755 mobileprint/include/mobileprint.h create mode 100644 mobileprint/include/preview_content.h create mode 100755 mobileprint/include/pts_common.h create mode 100755 mobileprint/include/pts_debug.h create mode 100755 mobileprint/include/pts_main_view.h create mode 100755 mobileprint/include/pts_setting_view.h create mode 100644 mobileprint/include/pts_util.h create mode 100644 mobileprint/mobileprint.xml create mode 100755 mobileprint/po/CMakeLists.txt create mode 100755 mobileprint/po/POTFILES.in create mode 100644 mobileprint/po/ar.po create mode 100644 mobileprint/po/az.po create mode 100644 mobileprint/po/bg.po create mode 100644 mobileprint/po/ca.po create mode 100644 mobileprint/po/cs.po create mode 100644 mobileprint/po/da.po create mode 100644 mobileprint/po/de_DE.po create mode 100644 mobileprint/po/el_GR.po create mode 100644 mobileprint/po/en.po create mode 100644 mobileprint/po/en_PH.po create mode 100644 mobileprint/po/en_US.po create mode 100644 mobileprint/po/es_ES.po create mode 100644 mobileprint/po/es_US.po create mode 100644 mobileprint/po/et.po create mode 100644 mobileprint/po/eu.po create mode 100644 mobileprint/po/fi.po create mode 100644 mobileprint/po/fr_CA.po create mode 100644 mobileprint/po/fr_FR.po create mode 100644 mobileprint/po/ga.po create mode 100644 mobileprint/po/gl.po create mode 100644 mobileprint/po/hi.po create mode 100644 mobileprint/po/hr.po create mode 100644 mobileprint/po/hu.po create mode 100644 mobileprint/po/hy.po create mode 100644 mobileprint/po/is.po create mode 100644 mobileprint/po/it_IT.po create mode 100644 mobileprint/po/ja_JP.po create mode 100644 mobileprint/po/ka.po create mode 100644 mobileprint/po/kk.po create mode 100644 mobileprint/po/ko_KR.po create mode 100644 mobileprint/po/lt.po create mode 100644 mobileprint/po/lv.po create mode 100644 mobileprint/po/mk.po create mode 100644 mobileprint/po/mobileprint.pot create mode 100644 mobileprint/po/nb.po create mode 100644 mobileprint/po/nl_NL.po create mode 100644 mobileprint/po/pl.po create mode 100644 mobileprint/po/pt_BR.po create mode 100644 mobileprint/po/pt_PT.po create mode 100644 mobileprint/po/ro.po create mode 100644 mobileprint/po/ru_RU.po create mode 100644 mobileprint/po/sk.po create mode 100644 mobileprint/po/sl.po create mode 100644 mobileprint/po/sr.po create mode 100644 mobileprint/po/sv.po create mode 100644 mobileprint/po/tr_TR.po create mode 100644 mobileprint/po/uk.po create mode 100755 mobileprint/po/update-po.sh create mode 100644 mobileprint/po/uz.po create mode 100644 mobileprint/po/zh_CN.po create mode 100644 mobileprint/po/zh_HK.po create mode 100644 mobileprint/po/zh_SG.po create mode 100644 mobileprint/po/zh_TW.po create mode 100644 mobileprint/preview_engine/CMakeLists.txt create mode 100644 mobileprint/preview_engine/include/preview_engine.h create mode 100644 mobileprint/preview_engine/include/preview_model.h create mode 100644 mobileprint/preview_engine/include/preview_task_model.h create mode 100644 mobileprint/preview_engine/lib/CMakeLists.txt create mode 100644 mobileprint/preview_engine/lib/preview_engine.c create mode 100644 mobileprint/preview_engine/lib/preview_model.c create mode 100644 mobileprint/preview_engine/lib/preview_task_model.c create mode 100644 mobileprint/previewgen/CMakeLists.txt create mode 100644 mobileprint/previewgen/default.ppd create mode 100644 mobileprint/previewgen/include/evas_render.h create mode 100644 mobileprint/previewgen/include/image_scaler.h create mode 100644 mobileprint/previewgen/include/page_preview.h create mode 100644 mobileprint/previewgen/include/paper_size.h create mode 100644 mobileprint/previewgen/include/pdfgen.h create mode 100644 mobileprint/previewgen/include/pgen_debug.h create mode 100644 mobileprint/previewgen/include/preview_coords.h create mode 100644 mobileprint/previewgen/include/preview_util.h create mode 100644 mobileprint/previewgen/include/previewgen.h create mode 100644 mobileprint/previewgen/lib/CMakeLists.txt create mode 100644 mobileprint/previewgen/lib/evas_render.c create mode 100644 mobileprint/previewgen/lib/image_scaler.c create mode 100644 mobileprint/previewgen/lib/page_preview.c create mode 100644 mobileprint/previewgen/lib/paper_size.c create mode 100644 mobileprint/previewgen/lib/pdfgen.c create mode 100644 mobileprint/previewgen/lib/preview_coords.c create mode 100644 mobileprint/previewgen/lib/preview_util.c create mode 100644 mobileprint/previewgen/lib/previewgen.c create mode 100644 mobileprint/previewgen/util/CMakeLists.txt create mode 100644 mobileprint/previewgen/util/main.c create mode 100644 mobileprint/smsc/CMakeLists.txt create mode 100644 mobileprint/smsc/include/smsc_control.h create mode 100644 mobileprint/smsc/include/smsc_debug.h create mode 100644 mobileprint/smsc/include/smsc_position.h create mode 100644 mobileprint/smsc/include/smsc_smart.h create mode 100644 mobileprint/smsc/include/smsc_widget.h create mode 100644 mobileprint/smsc/lib/CMakeLists.txt create mode 100644 mobileprint/smsc/lib/smsc_control.c create mode 100644 mobileprint/smsc/lib/smsc_position.c create mode 100644 mobileprint/smsc/lib/smsc_smart.c create mode 100644 mobileprint/smsc/lib/smsc_widget.c create mode 100644 org.tizen.mobileprint.manifest create mode 100644 org.tizen.mobileprint.rule create mode 100644 packaging/mobileprint.spec diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..16d062b --- /dev/null +++ b/AUTHORS @@ -0,0 +1,8 @@ +GangHeok Kim +Taeksu Shin +Dongwook Lee +Oleg Lekarev +Dmitriy Gonzha +Timofei Khirianov +Ilya Mankaev +Victor Malov diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e7bdab1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED + elementary + appcore-efl + bundle + syspopup-caller + glib-2.0 + ecore + eina + ecore-input + ecore-x + evas + dlog + edje + print-service + ui-gadget-1 + appsvc + capi-appfw-application + vconf + notification + pmapi + sysman + efl-assist + ) + +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -fdata-sections -ffunction-sections -Wl,--gc-sections") +ENDFOREACH(flag) + +ADD_SUBDIRECTORY(mobileprint) diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100644 index 0000000..4a0af40 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.1, April, 2013 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Tizen Compliance Specification +and passes the Tizen Compliance Tests as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work +solely as incorporated into a Tizen Certified Platform, where such +license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work solely +as incorporated into a Tizen Certified Platform to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim +in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, +then any patent licenses granted to You under this License for that +Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that + You distribute, all copyright, patent, trademark, and attribution + notices from the Source form of the Work, excluding those notices + that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of + the Derivative Works, in at least one of the following places: + within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, + if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only + and do not modify the License. You may add Your own attribution notices + within Derivative Works that You distribute, alongside or as an addendum + to the NOTICE text from the Work, provided that such additional attribution + notices cannot be construed as modifying the License. You may add Your own + copyright statement to Your modifications and may provide additional or + different license terms and conditions for use, reproduction, or + distribution of Your modifications, or for any such Derivative Works + as a whole, provided Your use, reproduction, and distribution of + the Work otherwise complies with the conditions stated in this License + and your own copyright statement or terms and conditions do not conflict + the conditions stated in the License including section 3. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.1 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..970ec4a --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1.1 +Please, see the LICENSE.Flora file for Flora License, Version 1.1 terms and conditions. + diff --git a/debian/changelog b/debian/changelog new file mode 100755 index 0000000..294e129 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1416 @@ +mobileprint (0.2.24-1) unstable; urgency=low + + * Changed default empty image + * Git: apps/home/mobileprint + * Tag: mobileprint_0.2.24-1 + + -- gpeegpee Fri, 26 Jul 2013 11:46:49 +0900 + +mobileprint (0.2.23-1) unstable; urgency=low + + * Changed popup button from positive/negative to negative/positive + * Git: apps/home/mobileprint + * Tag: mobileprint_0.2.23-1 + + -- GangHeok Kim Wed, 17 Jul 2013 17:39:14 +0900 + +mobileprint (0.2.22-1) unstable; urgency=low + + * Fixed prevent defects + * Git: apps/home/mobileprint + * Tag: mobileprint_0.2.22-1 + + -- GangHeok Kim Mon, 15 Jul 2013 17:58:17 +0900 + +mobileprint (0.2.21-1) unstable; urgency=low + + * Clean up for tizen 2.1 source open + * Refactored structure + * Updated refresh position of printer list popup to follow latest UX + * Git: apps/home/mobileprint + * Tag: mobileprint_0.2.21-1 + + -- Taeksu Shin Fri, 29 Mar 2013 22:36:32 +0900 + +mobileprint (0.2.20-1) unstable; urgency=low + + * Fixed Jira issues(S1-12503,S1-12482) by SRR + * Show refresh btn for 1st searching (workaround by different searching result) + * Show cancel btn for 1 page printing + * Added current page printing + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.20-1 + + -- Taeksu Shin Sat, 23 Mar 2013 11:35:47 +0900 + +mobileprint (0.2.19-1) unstable; urgency=low + + * Removed unnecessary smack permission + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.19-1 + + -- GangHeok Kim Wed, 20 Mar 2013 16:41:19 +0900 + +mobileprint (0.2.18-1) unstable; urgency=low + + * Code clean-up + * Added test code for multi contents + * Added missing commit to fix build error(undefined symbol of ptdb) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.18-1 + + -- Taeksu Shin Mon, 18 Mar 2013 15:29:18 +0900 + +mobileprint (0.2.17-11) unstable; urgency=low + + * Applied SRR patches (screen reader, getppd API, multiple images support, prevent fix) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-11 + + -- Taeksu Shin Thu, 14 Mar 2013 23:35:51 +0900 + +mobileprint (0.2.17-10) unstable; urgency=low + + * Changed to show dimming list for unsupported printer + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-10 + + -- GangHeok Kim Thu, 28 Feb 2013 17:58:59 +0900 + +mobileprint (0.2.17-9) unstable; urgency=low + + * Added work-around solution fixing that printing thread is not called + * Fixed smack incorrect label + * - wifi-direct-popup is changed to org.tizen.wifi-direct-popup + * - stest-service label is added for UI application dump + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-9 + + -- GangHeok Kim Mon, 25 Feb 2013 17:43:13 +0900 + +mobileprint (0.2.17-8) unstable; urgency=low + + * Removed org.tizen.usb-printer-detector package + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-8 + + -- GangHeok Kim Mon, 18 Feb 2013 13:35:54 +0900 + +mobileprint (0.2.17-7) unstable; urgency=low + + * SMACK rules updated + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-7 + + -- Danny Jeongseok Seo Thu, 14 Feb 2013 21:48:34 +0900 + +mobileprint (0.2.17-6) unstable; urgency=low + + * Fixed wrong 2pages-in-one-sheet in scaling by SRR + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-6 + + -- Taeksu Shin Tue, 12 Feb 2013 17:51:33 +0900 + +mobileprint (0.2.17-5) unstable; urgency=low + + * Fixed wrong loading animation in smooth scroll by SRR + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-5 + + -- Taeksu Shin Tue, 12 Feb 2013 15:03:39 +0900 + +mobileprint (0.2.17-4) unstable; urgency=low + + * Updated wifi-direct-ug routine to support WFDS Print + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-4 + + -- Taeksu Shin Fri, 08 Feb 2013 17:03:04 +0900 + +mobileprint (0.2.17-3) unstable; urgency=low + + * Fixed S1-12189(total page to support multiple copies) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-3 + + -- Taeksu Shin Tue, 05 Feb 2013 20:26:17 +0900 + +mobileprint (0.2.17-2) unstable; urgency=low + + * Smack rule updated + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-2 + + -- GangHeok Kim Fri, 01 Feb 2013 14:09:51 +0900 + +mobileprint (0.2.17-1) unstable; urgency=low + + * Fixed ISE showing issue in custom_popup + * Fixed flickering issue in preview screen + * Fixed top white space when back from custom_popup + * Fixed conformant operation for ISE showing + * Fixed rotation checking routine for mixed scenario + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.17-1 + + -- Taeksu Shin Tue, 29 Jan 2013 20:33:48 +0900 + +mobileprint (0.2.16-10) unstable; urgency=low + + * Fixed wrong progress routine after disabled page number correction + * Changed edc value of progress popup + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-10 + + -- Taeksu Shin Fri, 25 Jan 2013 23:10:12 +0900 + +mobileprint (0.2.16-9) unstable; urgency=low + + * Don't use page number correction(P130107-3058) + * Added dummy noti id checking when try to terminate app + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-9 + + -- Taeksu Shin Fri, 25 Jan 2013 17:21:22 +0900 + +mobileprint (0.2.16-8) unstable; urgency=low + + * Fixed cancel crash caused by temp files cleaning routine + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-8 + + -- Taeksu Shin Sun, 20 Jan 2013 10:06:02 +0900 + +mobileprint (0.2.16-7) unstable; urgency=low + + * Applied temp files cleaning routine after app terminated + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-7 + + -- Taeksu Shin Fri, 18 Jan 2013 22:37:40 +0900 + +mobileprint (0.2.16-6) unstable; urgency=low + + * Changed app directory(/opt/usr/apps -> /usr/apps) + * Read-only data is used in /usr/apps + * Read-Write data is used in /opt/usr/apps/data + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-6 + + -- GangHeok Kim Fri, 18 Jan 2013 14:15:32 +0900 + +mobileprint (0.2.16-5) unstable; urgency=low + + * Changed Flora license url + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-5 + + -- GangHeok Kim Thu, 17 Jan 2013 18:04:24 +0900 + +mobileprint (0.2.16-4) unstable; urgency=low + + * Fixed that printer list popup height is shown above screen + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-4 + + -- GangHeok Kim Wed, 16 Jan 2013 20:46:01 +0900 + +mobileprint (0.2.16-3) unstable; urgency=low + + * Applied code clean up and fixed img preview failed bug (SMRC) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-3 + + -- Taeksu Shin Tue, 15 Jan 2013 22:45:48 +0900 + +mobileprint (0.2.16-1) unstable; urgency=low + + * Changed preview-engine architecture from ecore_thread to ecore_exe(P121213-2630) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.16-1 + + -- Taeksu Shin Mon, 14 Jan 2013 17:20:43 +0900 + +mobileprint (0.2.15-54) unstable; urgency=low + + * Updated job processing routine in case of exception scenario + * Fixed PLM issues + * Disabled taskmanage + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-54 + + -- Taeksu Shin Wed, 02 Jan 2013 20:50:28 +0900 + +mobileprint (0.2.15-53) unstable; urgency=low + + * Applied GUI icon images + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-53 + + -- Taeksu Shin Fri, 21 Dec 2012 16:01:41 +0900 + +mobileprint (0.2.15-52) unstable; urgency=low + + * Changed log macro + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-52 + + -- GangHeok Kim Mon, 17 Dec 2012 23:15:31 +0900 + +mobileprint (0.2.15-51) unstable; urgency=low + + * Updated no found popup routine + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-51 + + -- Taeksu Shin Thu, 13 Dec 2012 19:24:04 +0900 + +mobileprint (0.2.15-50) unstable; urgency=low + + * Fixed the bug that preview is failed initially + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-50 + + -- GangHeok Kim Fri, 07 Dec 2012 16:30:28 +0900 + +mobileprint (0.2.15-49) unstable; urgency=low + + * Updated Tag for SR + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-49 + + -- GangHeok Kim Thu, 06 Dec 2012 20:44:10 +0900 + +mobileprint (0.2.15-48) unstable; urgency=low + + * Updated Tag for SR + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-48 + + -- Taeksu Shin Wed, 05 Dec 2012 14:37:20 +0900 + +mobileprint (0.2.15-47) unstable; urgency=low + + * Updated display routine for printer label information + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-47 + + -- Taeksu Shin Tue, 04 Dec 2012 22:18:49 +0900 + +mobileprint (0.2.15-46) unstable; urgency=low + + * Modified updating routine of printer label + * Applied min_menustyle in printer list popup + * Applied refresh button in printer list popup + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-46 + + -- Taeksu Shin Sat, 24 Nov 2012 20:34:17 +0900 + +mobileprint (0.2.15-45) unstable; urgency=low + + * Fixed routine to show copies ctx popup in new conformant policy + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-45 + + -- Taeksu Shin Fri, 23 Nov 2012 17:30:59 +0900 + +mobileprint (0.2.15-44) unstable; urgency=low + + * Applied custom theme of genlist item style to follow custom popup UX + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-44 + + -- Taeksu Shin Thu, 15 Nov 2012 22:45:01 +0900 + +mobileprint (0.2.15-43) unstable; urgency=low + + * Update version to SR + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-43 + + -- GangHeok Kim Tue, 13 Nov 2012 20:13:04 +0900 + +mobileprint (0.2.15-42) unstable; urgency=low + + * Modified get_file_type function + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-42 + + -- GangHeok Kim Fri, 09 Nov 2012 19:47:09 +0900 + +mobileprint (0.2.15-41) unstable; urgency=low + + * Fixed to support desktop mode + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-41 + + -- GangHeok Kim Wed, 07 Nov 2012 13:43:11 +0900 + +mobileprint (0.2.15-40) unstable; urgency=low + + * Fixed color option crash by garbage value + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-40 + + -- Taeksu Shin Sat, 03 Nov 2012 20:13:53 +0900 + +mobileprint (0.2.15-39) unstable; urgency=low + + * Applied mobile print UX 2.0 based on new winset + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-39 + + -- Taeksu Shin Sat, 03 Nov 2012 14:42:49 +0900 + +mobileprint (0.2.15-38) unstable; urgency=low + + * Fixed prevent error + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-38 + + -- GangHeok Kim Fri, 02 Nov 2012 18:28:07 +0900 + +mobileprint (0.2.15-37) unstable; urgency=low + + * Fixed PLM issue (P121025-5769) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-37 + + -- Taeksu Shin Fri, 02 Nov 2012 00:41:31 +0900 + +mobileprint (0.2.15-36) unstable; urgency=low + + * Fixed to show setting view + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-36 + + -- GangHeok Kim Thu, 01 Nov 2012 23:17:48 +0900 + +mobileprint (0.2.15-35) unstable; urgency=low + + * Applied New indicator + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-35 + + -- GangHeok Kim Thu, 01 Nov 2012 00:05:29 +0900 + +mobileprint (0.2.15-34) unstable; urgency=low + + * Changed directory(/opt -> /opt/usr) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-34 + + -- GangHeok Kim Mon, 29 Oct 2012 18:33:40 +0900 + +mobileprint (0.2.15-33) unstable; urgency=low + + * Unified job progress routine + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-33 + + -- Taeksu Shin Sat, 27 Oct 2012 16:36:52 +0900 + +mobileprint (0.2.15-32) unstable; urgency=low + + * Fixed PLM issues (P121025-5719, P121025-5720) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-32 + + -- Taeksu Shin Fri, 26 Oct 2012 16:31:27 +0900 + +mobileprint (0.2.15-31) unstable; urgency=low + + * Changed vconf key value(VCONFKEY_SYSMEN... -> VCONFKEY_SYSMAN...) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-31 + + -- GangHeok Kim Wed, 24 Oct 2012 14:29:00 +0900 + +mobileprint (0.2.15-30) unstable; urgency=low + + * Fixed crash in seleting printer in lists + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-30 + + -- GangHeok Kim Tue, 23 Oct 2012 14:39:03 +0900 + +mobileprint (0.2.15-29) unstable; urgency=low + + * Recovered previous height value of custom popup + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-29 + + -- Taeksu Shin Fri, 19 Oct 2012 18:47:18 +0900 + +mobileprint (0.2.15-28) unstable; urgency=low + + * Deleted smack rules + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-28 + + -- GangHeok Kim Tue, 16 Oct 2012 15:30:00 +0900 + +mobileprint (0.2.15-27) unstable; urgency=low + + * Fixed smack manifest + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-27 + + -- GangHeok Kim Mon, 15 Oct 2012 11:25:37 +0900 + +mobileprint (0.2.15-26) unstable; urgency=low + + * Fixed that after canceling custom size, preview image is changed to custom size + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-26 + + -- GangHeok Kim Fri, 12 Oct 2012 21:26:44 +0900 + +mobileprint (0.2.15-25) unstable; urgency=low + + * Fixed custom size popup height + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-25 + + -- GangHeok Kim Fri, 12 Oct 2012 21:11:29 +0900 + +mobileprint (0.2.15-24) unstable; urgency=low + + * Applied image custom size printing + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-24 + + -- GangHeok Kim Fri, 12 Oct 2012 17:19:14 +0900 + +mobileprint (0.2.15-23) unstable; urgency=low + + * Added license file + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-23 + + -- GangHeok Kim Fri, 12 Oct 2012 10:54:39 +0900 + +mobileprint (0.2.15-22) unstable; urgency=low + + * Code Clean up + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-22 + + -- GangHeok Kim Wed, 10 Oct 2012 19:37:19 +0900 + +mobileprint (0.2.15-21) unstable; urgency=low + + * Applied SLP Coding Style + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-21 + + -- GangHeok Kim Mon, 08 Oct 2012 11:08:17 +0900 + +mobileprint (0.2.15-20) unstable; urgency=low + + * Fixed CCR issues(17085, 17530) + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-20 + + -- Taeksu Shin Thu, 04 Oct 2012 18:29:11 +0900 + +mobileprint (0.2.15-19) unstable; urgency=low + + * Applied image size printing without custom + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-19 + + -- GangHeok Kim Thu, 27 Sep 2012 16:29:17 +0900 + +mobileprint (0.2.15-18) unstable; urgency=low + + * Added domain request in smack manifest file + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-18 + + -- GangHeok Kim Fri, 21 Sep 2012 16:46:43 +0900 + +mobileprint (0.2.15-17) unstable; urgency=low + + * Added smack manifest file + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-17 + + -- GangHeok Kim Fri, 21 Sep 2012 14:35:19 +0900 + +mobileprint (0.2.15-16) unstable; urgency=low + + * Added exception of HP printer modelname that include "Hewlett-Packard" + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-16 + + -- GangHeok Kim Tue, 11 Sep 2012 15:53:34 +0900 + +mobileprint (0.2.15-15) unstable; urgency=low + + * Changed system() to popen or fork/exec function because of security + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-15 + + -- GangHeok Kim Tue, 11 Sep 2012 13:39:47 +0900 + +mobileprint (0.2.15-14) unstable; urgency=low + + * Added pt_files field in job_spooling to do proper spooling operation + * Fixed compilation warning + * Added n_up field in job_spooling + * Fixed some crash by missed parameter checking + * Changed time of hiding main view to get better UX + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-14 + + -- Taeksu Shin Thu, 06 Sep 2012 21:47:36 +0900 + +mobileprint (0.2.15-13) unstable; urgency=low + + * Fixed total page numer of quickpanel notification in case of n-up scenario + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-13 + + -- Taeksu Shin Wed, 05 Sep 2012 16:59:55 +0900 + +mobileprint (0.2.15-12) unstable; urgency=low + + * Changed appsvc string to appcontrol + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-12 + + -- GangHeok Kim Tue, 04 Sep 2012 21:38:23 +0900 + +mobileprint (0.2.15-11) unstable; urgency=low + + * Fixed incorrect size_popup/custom popup height in rotating + * Fixed crash in exiting mobileprint + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-11 + + -- GangHeok Kim Tue, 04 Sep 2012 13:40:37 +0900 + +mobileprint (0.2.15-10) unstable; urgency=low + + * Changed updating notification routine + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-10 + + -- Taeksu Shin Mon, 03 Sep 2012 20:29:29 +0900 + +mobileprint (0.2.15-9) unstable; urgency=low + + * Fixed n-up printing for PDF document + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-9 + + -- GangHeok Kim Mon, 03 Sep 2012 14:58:40 +0900 + +mobileprint (0.2.15-8) unstable; urgency=low + + * Recover wrongly reverted page update routine + * Added dummy notification during image converting time + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-8 + + -- Taeksu Shin Mon, 03 Sep 2012 14:00:11 +0900 + +mobileprint (0.2.15-7) unstable; urgency=low + + * Updated tag value for SR + * Updated page count routine for printing + * Added termination routine in case of no more job + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-7 + + -- Taeksu Shin Sun, 02 Sep 2012 03:44:59 +0900 + +mobileprint (0.2.15-6) unstable; urgency=low + + * Updated page count routine + * Changed printer searching UX from view to popup in setting view + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-6 + + -- Taeksu Shin Sat, 01 Sep 2012 18:48:00 +0900 + +mobileprint (0.2.15-5) unstable; urgency=low + + * Updated page count routine of job spooling to show properly in case of multiple page pdf + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-5 + + -- Taeksu Shin Fri, 31 Aug 2012 19:11:25 +0900 + +mobileprint (0.2.15-4) unstable; urgency=low + + * Updated 51 languages po file + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-4 + + -- GangHeok Kim Fri, 31 Aug 2012 13:55:06 +0900 + +mobileprint (0.2.15-3) unstable; urgency=low + + * Fixed popup height to change according to genlist item + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.15-3 + + -- GangHeok Kim Fri, 31 Aug 2012 12:08:56 +0900 + +mobileprint (0.2.14-3) unstable; urgency=low + + * Fixed to show incorrect printer name in connecting USB printer + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.14-3 + + -- GangHeok Kim Mon, 27 Aug 2012 19:57:51 +0900 + +mobileprint (0.2.13-3) unstable; urgency=low + + * Added removing routine of job_spooling_list + * Updated notification routine + * Fixed display bug between waiting and printing + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.13-3 + + -- Taeksu Shin Sat, 25 Aug 2012 20:48:56 +0900 + +mobileprint (0.2.13-2) unstable; urgency=low + + * Updated job spooling routine + * Fixed crash bug of usb-printer-detector + * Git: magnolia/apps/home/mobileprint + * Tag: mobileprint_0.2.13-2 + + -- Taeksu Shin Fri, 24 Aug 2012 18:36:02 +0900 + +mobileprint (0.2.13-1) unstable; urgency=low + + * Printer searching flow is modified. Cleanup warning. + * Git: magnolia/apps/home/mobileprint. + * Tag: mobileprint_0.2.13-1 + + -- Dongwook Lee Mon, 20 Aug 2012 01:07:29 +0900 + +mobileprint (0.2.12-5) unstable; urgency=low + + * Applied ecore main loop pause/resume routine for safe evas operation in thread + * Updated custom size popup to follow UX + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.12-5 + + -- Taeksu Shin Mon, 20 Aug 2012 17:42:48 +0900 + +mobileprint (0.2.12-4) unstable; urgency=low + + * Changed to use cups usb backend to get usb printer name instead of usb-devices utility. + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.12-4 + + -- GangHeok Kim Sat, 18 Aug 2012 19:48:29 +0900 + +mobileprint (0.2.12-3) unstable; urgency=low + + * Replace contextpopup, "timepicker", with "datetime/default" according to EFL team's recommandation. + * "timepicker" style does not have "dismiss" event, which is causing ctxpot is not disappeared when it loose focus. + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.12-3 + + -- GangHeok Kim Fri, 17 Aug 2012 00:33:26 +0900 + +mobileprint (0.2.12-2) unstable; urgency=low + + * Added epson printer paper size case + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.12-2 + + -- GangHeok Kim Mon, 13 Aug 2012 11:18:38 +0900 + +mobileprint (0.2.12-1) unstable; urgency=low + + * Fixed setting view bug + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.12-1 + + -- Taeksu Shin Sun, 12 Aug 2012 22:50:51 +0900 + +mobileprint (0.2.11-21) unstable; urgency=low + + * Disabled to show main-view in wifi-qs case + * Added NULL check routine in preview source + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-21 + + -- GangHeok Kim Fri, 10 Aug 2012 14:44:08 +0900 + +mobileprint (0.2.11-20) unstable; urgency=low + + * Fixed PLM defect(P120806-3900) that mobileprint was crashed in search printer popup after rotating device + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-20 + + -- GangHeok Kim Fri, 10 Aug 2012 14:25:56 +0900 + +mobileprint (0.2.11-19) unstable; urgency=low + + * Added printer image for mobileprint noti + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-19 + + -- GangHeok Kim Fri, 10 Aug 2012 13:16:37 +0900 + +mobileprint (0.2.11-18) unstable; urgency=low + + * Applied winset GUI guide(margin, title Uppercase, ctxpopup) + * Removed unused image file + * Changed edc for whilt bg color + * Changed tickernoti position to top of screen + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-18 + + -- GangHeok Kim Wed, 08 Aug 2012 18:37:09 +0900 + +mobileprint (0.2.11-17) unstable; urgency=low + + * Applied new printing progress UX + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-17 + + -- Taeksu Shin Wed, 08 Aug 2012 00:34:59 +0900 + +mobileprint (0.2.11-16) unstable; urgency=low + + * Fixed issue that mobileprint is crashed in changing orientation after set size option. + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-16 + + -- GangHeok Kim Tue, 07 Aug 2012 18:00:24 +0900 + +mobileprint (0.2.11-15) unstable; urgency=low + + * Fixed missing winset popup button style in custom size popup and size popup + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-15 + + -- GangHeok Kim Tue, 07 Aug 2012 09:38:52 +0900 + +mobileprint (0.2.11-14) unstable; urgency=low + + * Added USB printer device name + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-14 + + -- GangHeok Kim Tue, 07 Aug 2012 00:21:57 +0900 + +mobileprint (0.2.11-13) unstable; urgency=low + + * Fixed winset popup button color and Changed print setting option according + to UX Guide + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-13 + + -- GangHeok Kim Mon, 06 Aug 2012 17:46:35 +0900 + +mobileprint (0.2.11-12) unstable; urgency=low + + * Applied scaling preview when selected predefiend size in size popup + * Recovered UG_INIT_EFL to launch UG properly + * Fixed radio button set bug of size popup in case of cancelation + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-12 + + -- Taeksu Shin Fri, 03 Aug 2012 21:52:45 +0900 + +mobileprint (0.2.11-11) unstable; urgency=low + + * fixed PLM defect(P120802-4098) that do not check device orientation in launching + * fixed that mobileprint is not raised when mobileprint is called by app_service in background + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-11 + + -- GangHeok Kim Thu, 02 Aug 2012 20:46:19 +0900 + +mobileprint (0.2.11-10) unstable; urgency=low + + * Changed appfw manifest install directory + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-10 + + -- GangHeok Kim Wed, 01 Aug 2012 11:21:27 +0900 + +mobileprint (0.2.11-9) unstable; urgency=low + + * Applied appfw manifest + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-9 + + -- GangHeok Kim Tue, 31 Jul 2012 11:17:04 +0900 + +mobileprint (0.2.11-8) unstable; urgency=low + + * Fixed elm_win_alpha_set bug in case of runtime changing + * Applied WEB type UX change + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-8 + + -- GangHeok Kim Sun, 29 Jul 2012 13:27:11 +0900 + +mobileprint (0.2.11-7) unstable; urgency=low + + * Enabled scaling button in main view + * Fixed not expandable bug of setting view + * Fixed shrinked bug of top/bottom menu in case of landscape mode + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-7 + + -- Taeksu Shin Thu, 26 Jul 2012 23:52:50 +0900 + +mobileprint (0.2.11-6) unstable; urgency=low + + * Applied multi-threaded multi-page preview generation patch of SMRC + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-6 + + -- Taeksu Shin Tue, 24 Jul 2012 19:49:53 +0900 + +mobileprint (0.2.11-5) unstable; urgency=low + + * Fixed to use DLOG for normal developer + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.11-5 + + -- GangHeok Kim Tue, 24 Jul 2012 14:17:53 +0900 + +mobileprint (0.2.10-5) unstable; urgency=low + + * Updated and Disabled appfw manifest file(com.samsung.mobileprint.xml / com.samsung.usb-printer-detector.xml) + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.10-5 + + -- GangHeok Kim Mon, 23 Jul 2012 20:53:47 +0900 + +mobileprint (0.2.10-4) unstable; urgency=low + + * Applied new UX 2nd time + * Fixed landscape BS + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.10-4 + + -- Taeksu Shin Sat, 21 Jul 2012 05:52:10 +0900 + +mobileprint (0.2.10-3) unstable; urgency=low + + * Applied new UX + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.10-3 + + -- Taeksu Shin Thu, 19 Jul 2012 20:22:54 +0900 + +mobileprint (0.2.10-2) unstable; urgency=low + + * Applied new ui-gadget package + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.10-2 + + -- Taeksu Shin Thu, 19 Jul 2012 19:44:33 +0900 + +mobileprint (0.2.10-1) unstable; urgency=low + + * Disabled auto rotation for new UX + * Replaced printer name label from optionheader(winset) to normal content + * Disabled file browse popup in case of USB OTG + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.10-1 + + -- Taeksu Shin Tue, 17 Jul 2012 10:18:44 +0900 + +mobileprint (0.2.9-22) unstable; urgency=low + + * Applied new tag for OBS SR + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.9-22 + + -- Taeksu Shin Wed, 11 Jul 2012 21:19:15 +0900 + +mobileprint (0.2.9-21) unstable; urgency=low + + * Fixed epson filter crash in case of unsupported papaer size + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.9-21 + + -- Taeksu Shin Wed, 11 Jul 2012 18:05:53 +0900 + +mobileprint (0.2.9-20) unstable; urgency=low + + * Fixed some jira defects + * Applied new UX + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.9-20 + + -- Taeksu Shin Tue, 10 Jul 2012 11:10:24 +0900 + +mobileprint (0.2.9-19) unstable; urgency=low + + * Fixed to accept filetype as app_service argument + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.9-19 + + -- GangHeok Kim Thu, 05 Jul 2012 21:36:32 +0900 + +mobileprint (0.2.8-18) unstable; urgency=low + + * Fixed crash by wrong checking routine of paper size for preview generation + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-18 + + -- Taeksu Shin Wed, 04 Jul 2012 21:51:04 +0900 + +mobileprint (0.2.8-17) unstable; urgency=low + + * Changed wifi operation from wifi-efl-UG to wifi-qs + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-17 + + -- Taeksu Shin Wed, 04 Jul 2012 13:58:21 +0900 + +mobileprint (0.2.8-16) unstable; urgency=low + + * Disabled new preview generation during printing state until spooling feature is applied. + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-16 + + -- Taeksu Shin Sat, 30 Jun 2012 16:14:49 +0900 + +mobileprint (0.2.8-15) unstable; urgency=low + + * Updated manifest for maintaining and disabled manifest + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-15 + + -- GangHeok Kim Tue, 26 Jun 2012 20:50:53 +0900 + +mobileprint (0.2.8-14) unstable; urgency=low + + * libpreviewgen speed-up hack by decreasing resolutions + * Print settings menu bugfixes + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-14 + + -- Dmitriy Gonzha Fri, 22 Jun 2012 18:56:31 +0400 + +mobileprint (0.2.8-13) unstable; urgency=low + + * Fixed some wrong used parameter and compilation warning + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-13 + + -- Taeksu Shin Thu, 21 Jun 2012 23:41:50 +0900 + +mobileprint (0.2.8-12) unstable; urgency=low + + * Applied preview and setting patch of SMRC + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-12 + + -- Taeksu Shin Tue, 19 Jun 2012 01:11:50 +0900 + +mobileprint (0.2.8-11) unstable; urgency=low + + * Fixed preview reset bug when launched by printing progress noti + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-11 + + -- Taeksu Shin Sat, 16 Jun 2012 00:18:59 +0900 + +mobileprint (0.2.8-10) unstable; urgency=low + + * Fixed preview generation bug in case of white space included file + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-10 + + -- Taeksu Shin Fri, 15 Jun 2012 19:45:00 +0900 + +mobileprint (0.2.8-9) unstable; urgency=low + + * Fixed preview options(i.e. fit-to-page and gray) in case of no active printer + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-9 + + -- Taeksu Shin Thu, 14 Jun 2012 17:47:16 +0900 + +mobileprint (0.2.8-8) unstable; urgency=low + + * Fixed preview image checking bug in case of used capital letter + * Commented out smack manifest field of spec file until policy is activated + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-8 + + -- Taeksu Shin Wed, 13 Jun 2012 10:59:36 +0900 + +mobileprint (0.2.8-7) unstable; urgency=low + + * Applied smack labeling + * Removed unused commented codes + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-7 + + -- Taeksu Shin Sat, 09 Jun 2012 01:26:35 +0900 + +mobileprint (0.2.8-6) unstable; urgency=low + + * Fixed cancel routine to remove spooling job progress noti + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-6 + + -- Taeksu Shin Fri, 08 Jun 2012 22:52:12 +0900 + +mobileprint (0.2.8-5) unstable; urgency=low + + * Fixed wrong update of USB printer noti + * Applied printer icon + * Fixed compilation warnings + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-5 + + -- Taeksu Shin Fri, 08 Jun 2012 15:35:14 +0900 + +mobileprint (0.2.8-4) unstable; urgency=low + + * Applied SMRC preview patch for gray + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-4 + + -- Taeksu Shin Tue, 05 Jun 2012 20:30:22 +0900 + +mobileprint (0.2.8-3) unstable; urgency=low + + * Applied SMRC preview patch + * Updated UPD string + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-3 + + -- Taeksu Shin Sat, 02 Jun 2012 14:44:40 +0900 + +mobileprint (0.2.8-2) unstable; urgency=low + + * Applied latest SMRC patch to support PDF preview and setting operation + * Updated UI based on UX document + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-2 + + -- Taeksu Shin Fri, 01 Jun 2012 17:43:18 +0900 + +mobileprint (0.2.8-1) unstable; urgency=low + + * Changed elm_win_activate() to evas_object_raise() with BT popup issue + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.8-1 + + -- GangHeok Kim Thu, 31 May 2012 11:06:59 +0900 + +mobileprint (0.2.7-9) unstable; urgency=low + + * Added missing desktop icon file in spec + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-9 + + -- GangHeok Kim Thu, 31 May 2012 10:43:46 +0900 + +mobileprint (0.2.7-8) unstable; urgency=low + + * changed desktop icon file path + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-8 + + -- GangHeok Kim Wed, 30 May 2012 20:06:21 +0900 + +mobileprint (0.2.7-7) unstable; urgency=low + + * Updated spooling job progress for popup + * Removed unused code + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-7 + + -- Taeksu Shin Fri, 25 May 2012 21:25:21 +0900 + +mobileprint (0.2.7-6) unstable; urgency=low + + * Added spooling job notification of quickpanel + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-6 + + -- Taeksu Shin Fri, 25 May 2012 15:27:12 +0900 + +mobileprint (0.2.7-5) unstable; urgency=low + + * added pm control routine for usb-printer-detector + * applied wifi connecting popup for mobileprint + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-5 + + -- Taeksu Shin Tue, 15 May 2012 21:48:28 +0900 + +mobileprint (0.2.7-4) unstable; urgency=low + + * added usb-printer-detector pacakge + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-4 + + -- GangHeok Kim Thu, 10 May 2012 15:32:03 +0900 + +mobileprint (0.2.7-3) unstable; urgency=low + + * fixed crash in calling by aul on background(Crash 18357, Bucket 45310) + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.7-3 + + -- GangHeok Kim Thu, 03 May 2012 21:49:09 +0900 + +mobileprint (0.2.6-3) unstable; urgency=low + + * changed desktop file to hide app icon + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.6-3 + + -- GangHeok Kim Thu, 26 Apr 2012 21:33:14 +0900 + +mobileprint (0.2.6-2) unstable; urgency=low + + * disabled to make mobileprint icon + * fixed obs build error + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.6-2 + + -- GangHeok Kim Thu, 26 Apr 2012 18:16:44 +0900 + +mobileprint (0.2.6-1) unstable; urgency=low + + * fixed mobileprint.spec to match version + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.6-1 + + -- GangHeok Kim Thu, 26 Apr 2012 13:16:28 +0900 + +mobileprint (0.2.5.3-1) unstable; urgency=low + + * disabled print setting view + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.5.3-1 + + -- GangHeok Kim Mon, 23 Apr 2012 17:57:36 +0900 + +mobileprint (0.2.5.2-1) unstable; urgency=low + + * Added pdf preview feature and color printing + * disabled print setting option + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.5.2-1 + + -- GangHeok Kim Mon, 16 Apr 2012 21:52:49 +0900 + +mobileprint (0.2.5.1-5) unstable; urgency=low + + * Added Build-Require to build rpm package + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.5.1-5 + + -- GangHeok Kim Fri, 13 Apr 2012 17:28:19 +0900 + +mobileprint (0.2.5.1-4) unstable; urgency=low + + * Changed Elementary API as EFL migration + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.5.1-4 + + -- GangHeok Kim Wed, 15 Feb 2012 17:28:52 +0900 + +mobileprint (0.2.5.0-4) unstable; urgency=low + + * Add usb hot-spot and multifile support + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.5.0-4 + + -- GangHeok Kim Wed, 08 Feb 2012 15:22:47 +0900 + +mobileprint (0.2.4.2-4) unstable; urgency=low + + * Modified CMakelist.txt + * Git: slp/apps/m/mobileprint + * Tag: mobileprint_0.2.4.2-4 + + -- GangHeok Kim Tue, 13 Dec 2011 18:58:17 +0900 + +mobileprint (0.2.4.2-3) unstable; urgency=low + + * Added job cancel feature + * Git: 165.213.180.234:slp/apps/m/mobileprint + * Tag: mobileprint_0.2.4.2-3 + + -- GangHeok Kim Fri, 09 Dec 2011 16:44:13 +0900 + +mobileprint (0.2.4.1-2) unstable; urgency=low + + * Added LICENSE + * Git: 165.213.180.234:slp/apps/m/mobileprint + * Tag: mobileprint_0.2.4.1-2 + + -- GangHeok Kim Fri, 02 Dec 2011 18:41:44 +0900 + +mobileprint (0.2.4.1-1) unstable; urgency=low + + * Added boilerplate + * Git: 165.213.180.234:slp/apps/m/mobileprint + * Tag: mobileprint_0.2.4.1-1 + + -- GangHeok Kim Fri, 02 Dec 2011 15:45:43 +0900 + +mobileprint (0.2.4.0-1) unstable; urgency=low + + * Changed internal api to Capi + * Git: 165.213.180.234:slp/apps/m/mobileprint + * Tag: mobileprint_0.2.4.0-1 + + -- GangHeok Kim Wed, 30 Nov 2011 14:20:52 +0900 + +ug-cups-printer-efl (0.2.3.4-5) unstable; urgency=low + + * Modified debian/changelog + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: ug-cups-printer-efl_0.2.3.4-5 + + -- GangHeok Kim Tue, 22 Nov 2011 09:39:18 +0900 + +ug-cups-printer-efl (0.2.3.4-4) unstable; urgency=low + + * Modified Maintainer email + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.4-4 + + -- GangHeok Kim Fri, 11 Nov 2011 21:23:23 +0900 + +ug-cups-printer-efl (0.2.3.4-3) unstable; urgency=low + + * Added disable ug_effect code + * Modified print tab bar position + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.4-3 + + -- GangHeok Kim Fri, 11 Nov 2011 21:23:23 +0900 + +ug-cups-printer-efl (0.2.3.3-3) unstable; urgency=low + + * Modified control file + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.3-3 + + -- GangHeok Kim Fri, 11 Nov 2011 21:23:23 +0900 + +mobileprint (0.2.3.3-2) unstable; urgency=low + + * Modified depends in control file + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.3-2 + + -- GangHeok Kim Fri, 11 Nov 2011 21:02:30 +0900 + +mobileprint (0.2.3.3-1) unstable; urgency=low + + * Changed navigationbar to naviframe + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.3-1 + + -- GangHeok Kim Sat, 05 Nov 2011 13:21:22 +0900 + +mobileprint (0.2.3.2-3) unstable; urgency=low + + * Added build-depends + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.2-3 + + -- GangHeok Kim Fri, 04 Nov 2011 16:41:54 +0900 + +mobileprint (0.2.3.2-2) unstable; urgency=low + + * Added maintainer + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.2-2 + + -- GangHeok Kim Fri, 04 Nov 2011 10:08:49 +0900 + +mobileprint (0.2.3.2-1) unstable; urgency=low + + * initial commit + * Git: 165.213.180.234:slp/apps/u/ug-cups-printer-efl + * Tag: mobileprint_0.2.3.2-1 + + -- GangHeok Kim Wed, 02 Nov 2011 20:25:14 +0900 + +mobileprint (0.2.3.2) unstable; urgency=low + + * hide the app icon and fix some bugs + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.2.3.1 + + -- Shouchen Yin Thu, 27 Oct 2011 15:30:00 +0800 + +mobileprint (0.2.3.1) unstable; urgency=low + + * support pdf format + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.2.3.1 + + -- Shouchen Yin Fri, 21 Oct 2011 15:30:00 +0800 + +mobileprint (0.2.0.3) unstable; urgency=low + + * change to new UI + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.2.0.3 + + -- Shouchen Yin Mon, 17 Oct 2011 15:30:00 +0800 + +mobileprint (0.2.0.2) unstable; urgency=low + + * update for change ug to app + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.2.0.2 + + -- Shouchen Yin Wed, 12 Oct 2011 14:00:51 +0800 + +mobileprint (0.2.0.1) unstable; urgency=low + + * update for change ug to app + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.2.0.1 + + -- Shouchen Yin Wed, 28 Sep 2011 14:00:51 +0800 + +mobileprint (0.1.3.1) unstable; urgency=low + + * update for change ug to app + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.1.3.1 + + -- Shouchen Yin Wed, 7 Sep 2011 14:00:51 +0800 + +mobileprint (0.1.1.1) unstable; urgency=low + + * update for change ug to app + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.1.1.1 + + -- Shouchen Yin Wed, 24 Sep 2011 14:00:51 +0800 + +mobileprint (0.1.0.1) unstable; urgency=low + + * update for regarding media svc changes + * Git: slp-source.sec.samsung.net:slp/pkgs/m/mobileprint + * Tag: mobileprint_0.1.0.1 + + -- Hanwu Chen Fri, 12 Aug 2011 14:00:51 +0800 + + diff --git a/mobileprint/CMakeLists.txt b/mobileprint/CMakeLists.txt new file mode 100644 index 0000000..894414f --- /dev/null +++ b/mobileprint/CMakeLists.txt @@ -0,0 +1,72 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(mobileprint C) + +#################################### +########## SET Directory ########### +#################################### +SET(VENDOR "tizen") +SET(PACKAGE ${PROJECT_NAME}) +SET(PKGNAME "org.${VENDOR}.${PACKAGE}") +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(BINDIR "${PREFIX}/bin") +SET(RESDIR "${PREFIX}/res") +SET(PPDDIR "${RESDIR}/ppd/") +SET(DATADIR "/opt/${PREFIX}/data") +SET(CACHEDIR "${PREFIX}/cache") +SET(LOCALEDIR "${RESDIR}/locale") +SET(EDC_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/edc") +SET(EDJDIR "${RESDIR}/edje/") +SET(IMGDIR "${RESDIR}/images/") + +IF("${CMAKE_BUILD_TYPE}" STREQUAL "") + SET(CMAKE_BUILD_TYPE "Release") +ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") +MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") + +#################################### +########### SET INCLUDE ############ +#################################### +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/previewgen/include) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/preview_engine/include) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/smsc/include) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_C_FLAGS_RELEASE "-O2") + +FIND_PROGRAM(UNAME NAMES uname) +EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"") +ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") +ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") +ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") +ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") +ADD_DEFINITIONS("-DBINDIR=\"${BINDIR}\"") +ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") +ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"") +ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"") +ADD_DEFINITIONS("-DUGDATADIR=\"${UGDATADIR}\"") +ADD_DEFINITIONS("-DCONFIG_PRINT_SETTING") + +##################################################### +########### install xml file & icon ############# +##################################################### +#for appfw new manifest +CONFIGURE_FILE(${PROJECT_NAME}.xml ${PKGNAME}.xml) +INSTALL(FILES ${CMAKE_BINARY_DIR}/${PACKAGE}/${PKGNAME}.xml DESTINATION "/usr/share/packages/") +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/ DESTINATION ${IMGDIR}) +INSTALL(DIRECTORY DESTINATION ${DATADIR}) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/previewgen/default.ppd DESTINATION ${PPDDIR}) + +ADD_SUBDIRECTORY(previewgen) +ADD_SUBDIRECTORY(preview_engine) +ADD_SUBDIRECTORY(smsc) +ADD_SUBDIRECTORY(app) +ADD_SUBDIRECTORY(po) diff --git a/mobileprint/app/CMakeLists.txt b/mobileprint/app/CMakeLists.txt new file mode 100644 index 0000000..48a476e --- /dev/null +++ b/mobileprint/app/CMakeLists.txt @@ -0,0 +1,45 @@ +LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/mobileprint) +LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/mobileprint/previewgen/lib) +LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/mobileprint/preview_engine/lib) +LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/mobileprint/smsc/lib) + +FILE(GLOB SRCS *.c) + +INCLUDE(FindPkgConfig) +pkg_check_modules(app_pkgs REQUIRED utilX) + +FOREACH(flag ${app_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(app_pkgs_LDFLAGS "${pkgs_LDFLAGS} ${app_pkgs_LDFLAGS}") + +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/mobileprint.edj + COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images + ${EDC_SRC_DIR}/mobileprint.edc ${CMAKE_BINARY_DIR}/mobileprint.edj + DEPENDS ${EDC_SRC_DIR}/mobileprint.edc ${EDC_SRC_DIR}/mobileprint.edc + ) + +ADD_CUSTOM_TARGET(mobileprint_edj_build DEPENDS ${CMAKE_BINARY_DIR}/mobileprint.edj) + +INSTALL(FILES ${CMAKE_BINARY_DIR}/mobileprint.edj DESTINATION ${EDJDIR}) + +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/genlist_custom.edj + COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images + ${EDC_SRC_DIR}/genlist_custom.edc ${CMAKE_BINARY_DIR}/genlist_custom.edj + DEPENDS ${EDC_SRC_DIR}/genlist_custom.edc ${EDC_SRC_DIR}/genlist_custom.edc + ) + +ADD_CUSTOM_TARGET(genlist_custom_edj_build DEPENDS ${CMAKE_BINARY_DIR}/genlist_custom.edj) + +INSTALL(FILES ${CMAKE_BINARY_DIR}/genlist_custom.edj DESTINATION ${EDJDIR}) + + +ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fpie") +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${app_pkgs_LDFLAGS} -lprint-service -lpreviewgen -lecore_evas -lpreview_engine -lsmsc -lptdb) + +ADD_DEPENDENCIES(${PROJECT_NAME} mobileprint_edj_build genlist_custom_edj_build) + +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) +INSTALL(FILES icon_${PROJECT_NAME}.png DESTINATION "/usr/share/icons/default/small" RENAME "${PKGNAME}.png") diff --git a/mobileprint/app/icon_mobileprint.png b/mobileprint/app/icon_mobileprint.png new file mode 100644 index 0000000000000000000000000000000000000000..c438a114ee994e5ffbb170b7d8143272b04af9c8 GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0vp^Q6S901|%(3I5Gh##^NA%Cx&(BWL^R}Y)RhkEEo z@-i@RuqbS;e{S45o4> +#include "pts_common.h" +#include "pts_main_view.h" +#include "image_editor_conn.h" + +#define IMAGE_EDITOR_STR_MAX_LEN 64 + +extern int size_index; + +void image_editor_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) +{ + PTS_TRACE_BEGIN; + Evas_Object *base; + Evas_Object *win; + + base = (Evas_Object *) ug_get_layout(ug); + win = ug_get_window(); + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, base); + + /* Disable effect to avoid BS caused by ui-gadget to + unset ug layout after deleting it */ + ug_disable_effect(ug); + evas_object_show(base); + + PTS_TRACE_END; +} + +void image_editor_result_cb(ui_gadget_h ug, service_h result, void *priv) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)priv; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + char *path = NULL; + int ret = -1; + ret = service_get_extra_data(result, "crop_image_path", &path); + PTS_RET_IF(ret != SERVICE_ERROR_NONE, "Failed to get crop_image_path(%d)", ret); + PTS_RET_IF(path == NULL, "path is NULL"); + + /* save path */ + PTS_IF_FREE_MEM(ad->printing_data.request_files[0]); + ad->printing_data.request_files[0] = strdup(path); + PTS_DEBUG("crop_image_path: %s", path); + pts_main_view_rotate_image(ad, app_get_device_orientation()); + size_index = ad->size_popup_info.image_size; // When crop is done, then save the index. + + PTS_TRACE_END; +} + + +void image_editor_destroy_cb(ui_gadget_h ug, void *priv) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)priv; + PTS_RET_IF(ad == NULL || ug == NULL, "Invalid argument"); + ug_destroy(ug); + PTS_TRACE_END; +} + + +int load_image_editor_ug(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, -1, "ad is NULL"); + + struct ug_cbs image_editor_cbs; + ui_gadget_h ug = NULL; + service_h service = NULL; + char reso_str[IMAGE_EDITOR_STR_MAX_LEN + 1]; + int w = 300; + int h = 300; + + switch (ad->size_popup_info.image_size) { + case PTS_SIZE_FIT_TO_PAPER: + break; + case PTS_SIZE_5X7: + w = w * 1.2; + break; + case PTS_SIZE_4X6: + w = w * 1.5; + break; + case PTS_SIZE_3_5X5: + w = w * 1.43; + break; + case PTS_SIZE_WALLET: + w = w * 1.31; + break; + case PTS_SIZE_CUSTOM: + w = w * (ad->size_popup_info.custom_width / ad->size_popup_info.custom_height); + PTS_DEBUG("Passed custom ratio : %dx%d", w, h); + break; + default: + break; + } + + memset(&image_editor_cbs,0x00,sizeof(struct ug_cbs)); + image_editor_cbs.layout_cb = image_editor_layout_cb; + image_editor_cbs.result_cb = image_editor_result_cb; + image_editor_cbs.destroy_cb = image_editor_destroy_cb; + image_editor_cbs.priv = ad; + + service_create(&service); + service_add_extra_data(service, "View Mode", "SETAS"); + service_add_extra_data(service, "Path", ad->printing_data.input_file); + service_add_extra_data(service, "Setas type", "Crop"); + service_add_extra_data(service, "Fixed ratio", "TRUE"); + + snprintf(reso_str, IMAGE_EDITOR_STR_MAX_LEN, "%dx%d", w, h); + service_add_extra_data(service, "Resolution", reso_str); + PTS_DEBUG("Passed resolution : %s", reso_str); + + ug_create(ug, "image-viewer-efl", UG_MODE_FULLVIEW, service, &image_editor_cbs); + service_destroy(service); + + PTS_TRACE_END; + return 0; +} + diff --git a/mobileprint/app/mobileprint.c b/mobileprint/app/mobileprint.c new file mode 100644 index 0000000..e34ec36 --- /dev/null +++ b/mobileprint/app/mobileprint.c @@ -0,0 +1,578 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "mobileprint.h" +#include "pts_main_view.h" + +#define _GNU_SOURCE +#include +#include +#include +#include +#include + +/*Global variable */ +pts_appdata_t g_mobile_print_app_data; + +pts_appdata_t *pts_get_appdata() +{ + return &g_mobile_print_app_data; +} + +/* +* delete the main window +*/ +static void _win_del(void *data, Evas_Object *obj, void *event) +{ + PTS_TRACE_BEGIN; + app_efl_exit(); + PTS_TRACE_END; +} + +/* +* the response callback when quit the main function +*/ +void main_quit_cb(void *data, Evas_Object *obj, + const char *emission, const char *source) +{ + PTS_TRACE_BEGIN; + app_efl_exit(); + PTS_TRACE_END; +} + +/* +* create the main window +*/ +static Evas_Object *_create_win(const char *name) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(name == NULL, NULL, "name is NULL"); + + Evas_Object *eo = NULL; + int w = 0; + int h = 0; + + const int rots[4] = { APP_DEVICE_ORIENTATION_0, + APP_DEVICE_ORIENTATION_90, + APP_DEVICE_ORIENTATION_180, + APP_DEVICE_ORIENTATION_270 }; + + eo = elm_win_add(NULL, name, ELM_WIN_BASIC); + PTS_RETV_IF(eo == NULL, NULL, "Failed to elm_win_add"); + + elm_win_autodel_set(eo, EINA_TRUE); + elm_win_title_set(eo, name); + + elm_win_borderless_set(eo, EINA_TRUE); + elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW); + + elm_win_alpha_set(eo, EINA_TRUE); + elm_win_conformant_set(eo, EINA_TRUE); + evas_object_smart_callback_add(eo, "delete,request", _win_del, NULL); + + ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h); + evas_object_resize(eo, w, h); + + /* Register a list of rotation angles that mobileprint supports */ + if (elm_win_wm_rotation_supported_get(eo)) + elm_win_wm_rotation_available_rotations_set( + eo, rots, 4); + + PTS_TRACE_END; + return eo; +} + +/* +* callback function for device rotation +*/ +static void _rot_changed_cb(void *data, Evas_Object *obj, void *event) +{ + pts_appdata_t *ad = (pts_appdata_t*)data; + int rot; + + PTS_TRACE_BEGIN; + + rot = elm_win_rotation_get(ad->win); + + + if (NULL != ad->list_info.active_printer) { + if (NULL != ad->size_popup_info.size_popup) { + PTS_DEBUG("Found size popup. Let's resize it"); + if (rot == APP_DEVICE_ORIENTATION_0 + || rot == APP_DEVICE_ORIENTATION_180) + evas_object_size_hint_min_set( + ad->size_popup_info.size_popup_box, + 400 * elm_config_scale_get(), + ad->size_popup_info + .size_popup_portrait_height); + else + evas_object_size_hint_min_set( + ad->size_popup_info.size_popup_box, + 400 * elm_config_scale_get(), + ad->size_popup_info + .size_popup_landscape_height); + } + else if (NULL != ad->size_popup_info.custom_popup) { + PTS_DEBUG("Found custom popup. Let's resize It"); + if (rot == APP_DEVICE_ORIENTATION_0 + || rot == APP_DEVICE_ORIENTATION_180) + evas_object_size_hint_min_set( + ad->size_popup_info.custom_popup_box, + 400 * elm_config_scale_get(), + ad->size_popup_info + .custom_popup_portrait_height); + else + evas_object_size_hint_min_set( + ad->size_popup_info.custom_popup_box, + 400 * elm_config_scale_get(), + ad->size_popup_info + .custom_popup_landscape_height); + } + } + else if (NULL != ad->list_info.printer_list_popup) { + PTS_DEBUG("Found printer list popup. Let's resize it"); + if (rot == APP_DEVICE_ORIENTATION_0 + || rot == APP_DEVICE_ORIENTATION_180) + evas_object_size_hint_min_set( + ad->list_info.printer_list_popup_box, + PRINTER_LIST_POPUP_W * elm_config_scale_get(), + ad->list_info + .printer_list_popup_portrait_height); + else + evas_object_size_hint_min_set( + ad->list_info.printer_list_popup_box, + PRINTER_LIST_POPUP_LN_W + * elm_config_scale_get(), + ad->list_info + .printer_list_popup_landscape_height); + } + + PTS_TRACE_END; +} + +/* +* this callback function is called +* at the start of the application. +*/ +static bool _app_create(void *user_data) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(user_data == NULL, false, "user_data is NULL"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + char *name = NULL; + + /* create window */ + app_get_name(&name); + ad->win = _create_win(name); + PTS_RETV_IF(ad->win == NULL, false, "ad->win is NULL"); + + evas_object_smart_callback_add(ad->win, "wm,rotation,changed", + _rot_changed_cb, ad); + + UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_ENABLE); + + PTS_IF_FREE_MEM(name); + + PTS_TRACE_END; + return true; +} + +/* +* this callback function is called once after +* the main loop of application exits. +*/ +static void _app_terminate(void *user_data) +{ + PTS_TRACE_BEGIN; +#if 0 + pts_appdata_t *ad = (pts_appdata_t *)user_data; + + PTS_RET_IF(ad == NULL, "data is NULL"); + + if (ad->ugd->main_layout) { + PTS_DEBUG("ad->lymain is not NULL"); + //evas_object_del(ad->ugd->main_layout); + } + + if (ad->win) { + PTS_DEBUG("ad->lymain is not NULL"); + //evas_object_del(ad->ugd->root_win); + } +#endif + + pts_util_remove_tmp_files("/tmp/mobileprint/"); + + PTS_TRACE_END; +} + +/* +* this callback function is called each time the application +* is completely obscured by another application and becomes +* invisible to the user. +*/ +static void _app_pause(void *user_data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_RET_IF(ad == NULL,"ad is NULL"); + if (ad->noti_info.job_spooling_list == NULL && ad->noti_info.dummy_noti_id == 0) { + PTS_DEBUG("Without active job spooling, mobileprint will terminate when moved background."); + app_efl_exit(); + } else { + PTS_DEBUG("Active job spooling list is existed. So don't terminate mobileprint."); + } + PTS_TRACE_END; +} + +/* +* this callback function is called each time the application +* becomes visible to the user. +*/ +static void _app_resume(void *user_data) +{ + PTS_TRACE_BEGIN; + PTS_TRACE_END; +} + +static Eina_Bool _simple_exit(void *data) +{ + PTS_TRACE_BEGIN; + elm_exit(); + PTS_TRACE_END; + return ECORE_CALLBACK_CANCEL; +} + +void load_main_view(void *userdata) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = pts_get_appdata(); + //pts_core_data_t *ugd = ad->ugd; + + // XXX - show main view after set active/default printer + pts_create_main_view(ad); + // XXX - disable to fix blink problem + //elm_win_resize_object_add(ugd->root_win, ugd->main_layout); + edje_object_signal_callback_add(elm_layout_edje_get(ad->main_info.main_layout), + "EXIT", "*", main_quit_cb, NULL); + + pts_main_view_update_printer_label(ad); + pts_main_view_rotate_image(ad, app_get_device_orientation()); + + evas_object_show(ad->main_info.main_layout); + evas_object_show(ad->main_info.root_win); + PTS_TRACE_END; +} + +/* +* load the app +*/ +static void __app_load_data(pts_appdata_t *ad, pts_printing_data_t *pt_files) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL, "ad is NULL"); + PTS_RET_IF(ad->win == NULL, "ad->win is NULL"); + PTS_RET_IF(pt_files == NULL, "pt_files is NULL"); + + int ret; + if (pts_util_supported_arch() != EINA_TRUE) { + pts_util_show_error_popup(ad->win, _("IDS_COM_POP_UNSUPPORTED")); + ecore_timer_add(1, (Ecore_Task_Cb)_simple_exit, (void *)ad); + return; + } + + if (ad->main_info.root_win == NULL) { + ad->main_info.root_win = ad->win; + } + + ret = pt_init(__pts_event_cb, ad); + PTS_RET_IF(ret != PT_ERR_NONE,"pt_init error"); + + //TODO: Remove this after ecore fix max thread number problem. + ecore_thread_max_set(4); + + /* + * prepare load print files + */ + pts_main_view_load_printing_data(ad, pt_files); + + ad->search_info.print_search_mode = PTS_SEARCH_INITIAL; + ad->search_info.selection_done_cb = load_main_view; + ad->search_info.print_search_popup_parent = ad->main_info.root_win; + ad->search_info.printer_search_user_data = NULL; + pts_search_printer(ad); + + PTS_TRACE_END; +} + +static Eina_Bool show_dummy_noti_popup(service_h *service, void *user_data, pts_printing_data_t *printing_data) +{ +//noti_mode: + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->win == NULL, EINA_FALSE, "ad->win is NULL"); + + int ret = -1; + char *value = NULL; + + ret = service_get_extra_data(*service, SERVICE_FILES, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get extra data failed!, errno: %d", ret); + + char *files = strdup(value); + PTS_RETV_IF(files == NULL, EINA_FALSE, "failed to strdup. files is NULL"); + PTS_DEBUG("files[%s]", files); + + ret = service_get_extra_data(*service, SERVICE_PAGE_COUNT, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get extra data failed!, errno: %d", ret); + + int page_count = atoi(value); + PTS_DEBUG("page_count[%d]", page_count); + __pts_print_dummy_popup(ad, files, page_count); + + evas_object_raise(ad->win); + + PTS_TRACE_END; + return EINA_TRUE; +} + +static Eina_Bool show_progress_noti_popup(service_h *service, void *user_data) +{ +//noti_mode: + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->win == NULL, EINA_FALSE, "ad->win is NULL"); + + int ret = -1; + char *value = NULL; + + ret = service_get_extra_data(*service, SERVICE_JOB_ID, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get extra data failed!, errno: %d", ret); + + if (NULL != value) { + int job_id = atoi(value); + PTS_DEBUG("job_id[%d]", job_id); + ret = service_get_extra_data(*service, SERVICE_PAGE_COUNT, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get extra data failed!, errno: %d", ret); + int page_count = atoi(value); + PTS_DEBUG("page_count[%d]", page_count); + __pts_print_progress_popup(ad, job_id, page_count); + } + + evas_object_raise(ad->win); + + PTS_TRACE_END; + return EINA_TRUE; +} + +static Eina_Bool get_extra_data_by_single_content(service_h *service, void *user_data, pts_printing_data_t *printing_data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->win == NULL, EINA_FALSE, "ad->win is NULL"); + + Eina_Bool bret = EINA_FALSE; + int ret = -1; + char *value = NULL; + char *uri_temp = NULL; + + ret = service_get_extra_data(*service, SERVICE_PRINT_FILES_TYPE, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get the type of print files failed!, errno: %d", ret); + + bret = _pts_printing_data_set_type(value, printing_data); + PTS_IF_FREE_MEM(value); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set type"); + + bret = _pts_printing_data_set_files_count("1", printing_data); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set files count"); + + ret = service_get_uri(*service, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get the uri failed!, errno: %d", ret); + + uri_temp = (char *)pt_utils_filename_from_URI(value); + PTS_IF_FREE_MEM(value); + PTS_RETV_IF(uri_temp == NULL, EINA_FALSE, "uri_temp is NULL"); + bret = _pts_printing_data_set_request_files((const char **)&uri_temp, 1, printing_data); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set request_files"); + + __app_load_data(ad, printing_data); + evas_object_raise(ad->win); + + PTS_TRACE_END; + return EINA_TRUE; +} + +static Eina_Bool get_extra_data_by_multi_contents(service_h *service, void *user_data, pts_printing_data_t *printing_data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->win == NULL, EINA_FALSE, "ad->win is NULL"); + PTS_RETV_IF(printing_data == NULL, EINA_FALSE, "printing_data is NULL"); + + Eina_Bool bret = EINA_FALSE; + int ret = -1; + int length = 0; + char *value = NULL; + char **filesname = NULL; + + ret = service_get_extra_data(*service, SERVICE_PRINT_FILES_COUNT, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get the count of print files failed!, errno: %d", ret); + + bret = _pts_printing_data_set_files_count(value, printing_data); + PTS_IF_FREE_MEM(value); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set files count"); + + ret = service_get_extra_data(*service, SERVICE_PRINT_FILES_TYPE, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get the type of print files failed!, errno: %d", ret); + + bret = _pts_printing_data_set_type(value, printing_data); + PTS_IF_FREE_MEM(value); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set type"); + + ret = service_get_extra_data(*service, SERVICE_PRINT_FILES_CURRENT_INDEX, &value); + if (ret == SERVICE_ERROR_NONE) { + bret = _pts_printing_data_set_index(value, printing_data); + PTS_IF_FREE_MEM(value); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set current index"); + } else { + PTS_DEBUG("get the current index of print files failed!, errno: %d", ret); + } + + ret = service_get_extra_data(*service, SERVICE_PRINT_FILES_FOLDER_NAME, &value); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get extra data failed!, errno: %d", ret); + + bret = _pts_printing_data_set_directory(value, printing_data); + PTS_IF_FREE_MEM(value); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set directory"); + + ret = service_get_extra_data_array(*service, SERVICE_PRINT_FILES_FILES_NAME, &filesname, &length); + PTS_RETV_IF(ret != SERVICE_ERROR_NONE, EINA_FALSE, "get extra data failed!, errno: %d", ret); + + bret = _pts_printing_data_set_request_files((const char **) filesname, length, printing_data); + PTS_IF_FREE_MEM(filesname); + PTS_RETV_IF(bret == EINA_FALSE, EINA_FALSE, "Failed to set request files"); + + __app_load_data(ad, printing_data); + evas_object_raise(ad->win); + + return EINA_TRUE; +} + +/* +* this callback function is called when other application +* send the launch request to the application. +*/ +static void _app_service(service_h service, void *user_data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + PTS_RET_IF(ad->win == NULL, "ad->win is NULL"); + + int ret = -1; + char *value = NULL; + pts_printing_data_t printing_data; + service_h reply_service; + Eina_Bool is_success = EINA_FALSE; + + memset(&printing_data, 0, sizeof(printing_data)); + service_create(&reply_service); + + ret = service_get_extra_data(service, SERVICE_LAUNCH_TYPE, &value); + if (ret == SERVICE_ERROR_KEY_NOT_FOUND) { + ret = service_get_extra_data(service, SERVICE_PRINT_FILES_COUNT, &value); + if (ret == SERVICE_ERROR_NONE) { + PTS_DEBUG("***** APP_SERVICE MODE(MULTI) *****"); + is_success = get_extra_data_by_multi_contents(&service, user_data, &printing_data); + } else if (ret == SERVICE_ERROR_KEY_NOT_FOUND) { + PTS_DEBUG("***** APP_SERVICE MODE(SINGLE) *****"); + is_success = get_extra_data_by_single_content(&service, user_data, &printing_data); + } else { + PTS_DEBUG("SERVICE_PRINT_FILES_COUNT ERROR(%d) ", ret); + } + } else if (ret == SERVICE_ERROR_NONE) { + PTS_DEBUG("SERVICE_LAUNCH_TYPE : %s", value); + if (!strcmp(value, LAUNCH_FROM_DUMMY_NOTI)) { + PTS_DEBUG("***** DUMMY NOTI MODE *****"); + is_success = show_dummy_noti_popup(&service, user_data, &printing_data); + } else if (!strcmp(value, LAUNCH_FROM_PROGRESS_NOTI)) { + PTS_DEBUG("***** NOTI MODE *****"); + is_success = show_progress_noti_popup(&service, user_data); + } else { + PTS_DEBUG("SERVICE_LAUNCH_TYPE ERROR(%s) ", value); + } + } else if (ret == SERVICE_ERROR_OUT_OF_MEMORY + || ret == SERVICE_ERROR_INVALID_DATA_TYPE + || ret == SERVICE_ERROR_INVALID_PARAMETER) { + PTS_DEBUG("APP_SERVICE ERROR(%d)", ret); + } else { + PTS_DEBUG("***** Undefined *****"); + } + PTS_IF_FREE_MEM(value); + + if (is_success == EINA_TRUE) { + service_reply_to_launch_request(reply_service, service, SERVICE_RESULT_SUCCEEDED); + } else { + service_reply_to_launch_request(reply_service, service, SERVICE_RESULT_FAILED); + pts_util_show_error_popup(ad->win, IDS_PRT_41); + ecore_timer_add(1, (Ecore_Task_Cb)_simple_exit, (void *)ad); + } + PTS_TRACE_END; + return; +} + +/* +* the main function +*/ +int main(int argc, char *argv[]) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *pts_appdata = pts_get_appdata(); + + app_event_callback_s event_callback; + + event_callback.create = _app_create; + event_callback.terminate = _app_terminate; + event_callback.pause = _app_pause; + event_callback.resume = _app_resume; + event_callback.service = _app_service; + event_callback.low_memory = NULL; + event_callback.low_battery = NULL; + event_callback.device_orientation = NULL; + event_callback.language_changed = NULL; + event_callback.region_format_changed = NULL; + + memset(pts_appdata, 0x00, sizeof(pts_appdata_t)); + + PTS_TRACE_END; + return app_efl_main(&argc, &argv, &event_callback, pts_appdata); +} diff --git a/mobileprint/app/preview_content.c b/mobileprint/app/preview_content.c new file mode 100644 index 0000000..6eb2a90 --- /dev/null +++ b/mobileprint/app/preview_content.c @@ -0,0 +1,207 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include + +#include +#include +#include +#include + +#include "pts_common.h" +#include "pts_main_view.h" + +#include "preview_content.h" + +#define DEFAULT_PPD_FILE RESDIR "/ppd/default.ppd" + +int is_printer_grayscale(const pt_printer_mgr_t *active_printer) +{ + switch (pt_get_selected(PT_OPTION_ID_GRAYSCALE)) { + case PT_GRAYSCALE_COLOUR: + return 0; + default: + return 1; + } +} + +enum page_orientation printer_get_setting_orientation( + const pt_printer_mgr_t *active_printer) +{ + /* should be taken from settings */ + switch (active_printer->landscape) { +// case PT_ORIENTATION_AUTO: + /* TODO: check for page size, n-up */ +// return PAGE_ORIENTATION_AUTO; + case PT_ORIENTATION_PORTRAIT: + return PAGE_ORIENTATION_PORTRAIT; + case PT_ORIENTATION_LANDSCAPE: + return PAGE_ORIENTATION_LANDSCAPE; + } + return PAGE_ORIENTATION_PORTRAIT; +} + +int printer_get_setting_n_up(const pt_printer_mgr_t *active_printer) +{ + /* should be taken from settings */ + switch (active_printer->scaling) { + case PT_SCALING_2_PAGES: + return 2; + case PT_SCALING_4_PAGES: + return 4; +#if 0 + case PT_SCALING_8_PAGES: + return 8; +#endif + default: + break; + } + return 1; +} + +/** + * @brief Get paper size and paper name for CUPS utilities cmd usage + * @param[out] paper_size paper_size should be local variable + * to keep further store we should provide a copy + */ +int printer_get_paper_size(struct paper_size_pts *paper_size) +{ + PTS_TRACE_BEGIN; + /* get paper size of active printer from print-service */ + pt_pagesize_t current_pagesize; + int result = pt_get_selected_paper_size_pts(¤t_pagesize); + PTS_RETV_IF(result < 0, -1, "pt_get_selected_paper_size_pts returns error"); + + /* get really selected papersize name for command line commands */ + paper_size->name = pt_get_print_option_papersize_cmd( + pt_get_selected(PT_OPTION_ID_PAPERSIZE)); + paper_size->s.x = current_pagesize.x; + paper_size->s.y = current_pagesize.y; + + PTS_TRACE_END; + return 0; +} + +int pts_image_size_t2page_scale(pts_image_size_e pts_size, + struct page_scale *scale) +{ + PTS_RETV_IF(scale == NULL, -1, "scale is NULL"); + + scale->w = 0; + scale->h = 0; + + switch (pts_size) { + case PTS_SIZE_FIT_TO_PAPER: + scale->type = SCALE_FIT_TO_PAPER; + return 0; + case PTS_SIZE_5X7: + scale->w = 5; + scale->h = 7; + break; + case PTS_SIZE_4X6: + scale->w = 4; + scale->h = 6; + break; + case PTS_SIZE_3_5X5: + scale->w = 3.5; + scale->h = 5; + break; + case PTS_SIZE_WALLET: + /* 6.4x8.4 cm */ + scale->w = 3.30709; + scale->h = 2.51969; + break; + //TODO : CUSTOM SIZE + default: + scale->type = SCALE_FIT_TO_PAPER; + return 1; + } + + scale->type = SCALE_CUSTOM; + return 0; +} + + +/** + * @brief This function generates preview images + * @param[in] ugd the pointer to the main data structure + * @return + */ +int generate_preview_images(pts_appdata_t *ad, + app_device_orientation_e dev_orientation) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL , -1 , "ad is NULL"); + + int result = 0; + + struct paper_size_pts paper_size; + enum page_orientation orientation; + struct page_scale scale = {0, 0, 0}; + int n_up; + int is_grayscale; + pt_printer_mgr_t *active_printer = ad->list_info.active_printer; + char *ppd; + + /* currently supported: only one PDF or multiple images; + mixed images-pdf unsupported */ + + PTS_RETV_IF(ad->printing_data.num_of_files <= 0, -1 , "Invalid argument"); + + /* should be taken from settings */ + if (active_printer != NULL) { + ppd = active_printer->ppd; + printer_get_paper_size(&paper_size); + orientation = printer_get_setting_orientation(active_printer); + n_up = printer_get_setting_n_up(active_printer); + pts_image_size_t2page_scale(ad->size_popup_info.image_size, &scale); + if (ad->size_popup_info.image_size == PTS_SIZE_CUSTOM) { + scale.w = ad->size_popup_info.custom_width; + scale.h = ad->size_popup_info.custom_height; + scale.type = SCALE_CUSTOM; + } + is_grayscale = is_printer_grayscale(active_printer); + } else { + PTS_DEBUG("No active printer preview"); + + ppd = DEFAULT_PPD_FILE; + get_paper_size_pts("A4", &paper_size); + orientation = PAGE_ORIENTATION_PORTRAIT; + //is_original_zoom = 0; + scale.type = SCALE_FIT_TO_PAPER; + n_up = 1; + is_grayscale = 1; + } + + PTS_DEBUG("USING PPD: %s", ppd); + PTS_DEBUG("PAPER NAME: %s", paper_size.name); + PTS_DEBUG("PAPER SIZE: %f, %f", paper_size.s.x, paper_size.s.y); + PTS_DEBUG("ALBUM, N_UP, ZOOM: %d, %d, %d", orientation, n_up, scale.type); + + result = evas_smart_smsc_set_file(ad->main_info.smsc, + ad->printing_data.request_files, ad->printing_data.num_of_files, + ppd, &paper_size, orientation, n_up, &scale, + is_grayscale); + PTS_DEBUG("evas_smart_smsc_set_file: %d", result); + + PTS_TRACE_END; + return result; +} + diff --git a/mobileprint/app/pts_common.c b/mobileprint/app/pts_common.c new file mode 100644 index 0000000..e070043 --- /dev/null +++ b/mobileprint/app/pts_common.c @@ -0,0 +1,1429 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include +#include +#include +#include +#include +#include +#include "mobileprint.h" +#include "image_editor_conn.h" +#include "pts_main_view.h" +#include "preview_util.h" + +Evas_Object *pts_create_custom_popup(Evas_Object *parent, pts_appdata_t *ad); +void __pts_main_view_create_list_view(pts_appdata_t *ad); +void main_quit_cb(void *data, Evas_Object *obj, + const char *emission, const char *source); + +static Evas_Object *scaling_radio_main = NULL; +static Evas_Object *size_radio_main = NULL; +static Elm_Genlist_Item_Class scaling_itc; +static Elm_Genlist_Item_Class size_itc; +static Elm_Genlist_Item_Class title_itc; +static Elm_Genlist_Item_Class text_itc; +static Elm_Genlist_Item_Class check_itc; +static Elm_Genlist_Item_Class button_itc; +static int scaling_index = 0; +int size_index = 0; + +static Eina_Bool aspect_ratio = 0; + +static Evas_Object *width_layout; +static Evas_Object *width_entry; +static Evas_Object *height_layout; +static Evas_Object *height_entry; + +int pts_unstandardization(char *name) +{ + char *ptr = NULL;/* Pointer into name */ + PTS_RETV_IF(name == NULL, -1, "Invalid argument"); + + for (ptr = name; *ptr; ptr++) { + if (*ptr == '@') { + return 0; + } else if ((*ptr >= 0 && *ptr < ' ') || + *ptr == 127 || *ptr == '/' ||*ptr == '#') { + return -1; + } else if (*ptr == 0x5F) { + *ptr = 0x20; /*convert _ to space*/ + } else if (*ptr == '[' || *ptr == '(') { + *ptr='\0'; + while (name <= ptr) { + ptr--; + if (*ptr==0x20) { + *ptr='\0'; + } else { + return 0; + } + } + return 0; + } + } + return 0; +} + +char* pts_parse_protocol(char *addr) +{ + PTS_TRACE_BEGIN; + char *printer_protocol = NULL; + + PTS_RETV_IF(addr == NULL, NULL, "Invalid argument"); + + if (strstr(addr, "_pdl-datastream.") != NULL) { + printer_protocol = strdup("Network (RAW)"); + } else if (strstr(addr, "_ipp.") != NULL) { + printer_protocol = strdup("Network (IPP)"); + } else if (strstr(addr, "_printer.") != NULL) { + printer_protocol = strdup("Network (LPD)"); + } else if (strstr(addr, "usb") != NULL) { + printer_protocol = strdup("USB"); + } else { + printer_protocol = strdup("Unknown"); + } + + PTS_TRACE_END; + return printer_protocol; +} + + +/** + * This function let the app create the label + * @return void + * @param[in] parent the pointer to the parent of the label + * @param[in] desc the pointer to label text + */ +Evas_Object *pts_create_label_btn(Evas_Object *parent, const char *label) +{ + PTS_TRACE_BEGIN; + Evas_Object *btn = elm_button_add(parent); + elm_object_text_set(btn, label); + evas_object_show(btn); + PTS_TRACE_END; + return btn; +} + + +/** + * This function let the app create the base layout + * @return void + * @param[in] parent the pointer to the parent of the base layout + * @param[in] desc the pointer to group of the base layout + */ +Evas_Object *pts_create_base_layout_with_conform(Evas_Object *parent, const char *group) +{ + PTS_TRACE_BEGIN; + char edj_file[128] = {0}; + Evas_Object *base = NULL; + Evas_Object *conform = NULL; + int r = 0; + + /* load edje */ + app_get_resource("edje/mobileprint.edj", edj_file, 128); + + conform = elm_conformant_add(parent); + evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + // Add + evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL); + + elm_win_resize_object_add(parent, conform); + + base = elm_layout_add(conform); + if (base) { + r = elm_layout_file_set(base, edj_file, group); + if (!r) { + evas_object_del(base); + return NULL; + } + elm_object_content_set(conform, base); + } + evas_object_show(conform); + PTS_TRACE_END; + + return base; +} + +Evas_Object *pts_create_base_layout(Evas_Object *parent, const char *group) +{ + PTS_TRACE_BEGIN; + char edj_file[128] = {0}; + Evas_Object *base = NULL; + int r = 0; + + /* load edje */ + app_get_resource("edje/mobileprint.edj", edj_file, 128); + + base = elm_layout_add(parent); + if (base) { + r = elm_layout_file_set(base, edj_file, group); + if (!r) { + evas_object_del(base); + return NULL; + } + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + } + PTS_TRACE_END; + + return base; +} + + +/** + * This function let the app create the popup element + * @return void + * @param[in] parent the pointer to the parent of the popup element + * @param[in] desc the pointer to description of the popup element + * @param[in] timeout the timeout value + */ +Evas_Object *pts_create_popup(Evas_Object *parent, const char *desc, double timeout) +{ + PTS_TRACE_BEGIN; + Evas_Object *notify = NULL; + notify = elm_popup_add(parent); + evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //elm_popup_mode_set(notify, ELM_POPUP_TYPE_ALERT); + elm_popup_timeout_set(notify, timeout); + elm_object_text_set(notify, desc); + evas_object_show(notify); + PTS_TRACE_END; + return notify; +} + +static void _pts_scaling_set_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(scaling_radio_main); + PTS_IF_DEL_OBJ(ad->scaling_popup_info.scaling_popup); + + pts_main_view_rotate_image(ad, app_get_device_orientation()); + PTS_TRACE_END; +} + +static char *__pts_scaling_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + int index = (int)data; + char *label = NULL; + char temp[1024] = {0}; + + if (strcmp(part, "elm.text") == 0) { + switch (index) { + case PT_SCALING_FIT_TO_PAGE: + label = strdup(_("IDS_BT_OPT_FIT_TO_PAPER")); + break; + case PT_SCALING_2_PAGES: + snprintf(temp,1024,_("IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB"),2); + label = strdup(temp); + break; + case PT_SCALING_4_PAGES: + snprintf(temp,1024,_("IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB"),4); + label = strdup(temp); + break; + default: + label = strdup("Unknown option"); + break; + } + } + + PTS_TRACE_END; + return label; +} + +static Evas_Object *__pts_scaling_icon_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + + int index = (int)data; + PTS_DEBUG("Passed index : %d", index); + Evas_Object *radio; + + if (!strcmp(part, "elm.icon") || !strcmp(part, "elm.swallow.icon")) { + radio = elm_radio_add(obj); + elm_radio_state_value_set(radio, index); + elm_radio_group_add(radio, scaling_radio_main); + PTS_DEBUG("scaling_index[%d]", scaling_index); + // It's filter to avoid all radio selection + if (scaling_index == index) { + elm_radio_value_set(radio, scaling_index); + PTS_DEBUG("OK...Set radio button using scaling_index[%d]", scaling_index); + } + + evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); + + return radio; + } + + PTS_TRACE_END; + return NULL; +} + +static void __pts_scaling_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(NULL == ad, "ad is NULL"); + + int scaling = -1; + Elm_Object_Item *item = event_info; + + if (item != NULL) { + elm_genlist_item_selected_set(item, EINA_FALSE); + + scaling = (int)elm_object_item_data_get(item); + if (scaling > -1) { + PTS_DEBUG("Selected scaling : %d", scaling); + + scaling_index = ad->list_info.active_printer->scaling = scaling; + + // Now call real event trigger to update radio button when selected. + elm_genlist_item_update(item); + } + } + PTS_TRACE_END; +} + +static void _pts_scaling_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(NULL == ad, "ad is NULL"); + + PTS_IF_DEL_OBJ(scaling_radio_main); + PTS_IF_DEL_OBJ(obj); + PTS_IF_DEL_OBJ(ad->scaling_popup_info.scaling_popup); + PTS_TRACE_END; +} + +Evas_Object *pts_create_scaling_popup(Evas_Object *parent, pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + Evas_Object *popup; + Evas_Object *genlist; + Evas_Object *btn1; + int index; + + popup = elm_popup_add(parent); + elm_object_style_set(popup,"content_no_vhpad"); + elm_object_part_text_set(popup, "title,text", _("IDS_PRT_BODY_SCALING_ABB")); + + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "content", "min_menustyle"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + btn1 = elm_button_add(popup); + elm_object_style_set(btn1,"popup_button/default"); + elm_object_text_set(btn1, _("IDS_PRT_BODY_SCALING_ABB")); + elm_object_part_content_set(popup, "button1", btn1); + evas_object_smart_callback_add(btn1, "clicked", _pts_scaling_set_cb, ad); + + genlist = elm_genlist_add(popup); + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_scaling_cancel_cb, ad); + + + if (!scaling_radio_main) { + scaling_radio_main = elm_radio_add(genlist); + elm_radio_state_value_set(scaling_radio_main, scaling_index); + elm_radio_value_set(scaling_radio_main, scaling_index); + } + + scaling_itc.item_style = "1text.1icon.2"; + scaling_itc.func.text_get = __pts_scaling_label_get; + scaling_itc.func.content_get = __pts_scaling_icon_get; + scaling_itc.func.state_get = NULL; + scaling_itc.func.del = NULL; + + Elm_Object_Item *item = NULL; + for (index = 0; index < (PT_SCALING_4_PAGES+1); index++) { + item = elm_genlist_item_append(genlist, &scaling_itc, (void *)index, NULL, ELM_GENLIST_ITEM_NONE, __pts_scaling_sel, ad); + PTS_DEBUG("index[%d] - item added : %s", index, (NULL == item)? "FAILURE" : "SUCCESS"); + } + + Evas_Object *box = elm_box_add(popup); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + elm_box_pack_end(box, genlist); + evas_object_show(genlist); + evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), elm_genlist_items_count(genlist) * 114 * elm_config_scale_get()); + evas_object_show(box); + elm_object_part_content_set(layout, "elm.swallow.content" , box); + elm_object_content_set(popup, box); + elm_object_focus_set(popup, EINA_TRUE); + + evas_object_show(popup); + + ad->scaling_popup_info.scaling_popup = popup; + + PTS_TRACE_END; + return genlist; +} + +static void _pts_size_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(NULL == ad, "ad is NULL"); + PTS_IF_DEL_OBJ(size_radio_main); + PTS_IF_DEL_OBJ(obj); + PTS_IF_DEL_OBJ(ad->size_popup_info.size_popup); + PTS_TRACE_END; +} + +static char *__pts_size_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + int index = (int)data; + char *label = NULL; + char custom[32] = {0,}; + pts_appdata_t *ad = pts_get_appdata(); + + if (strcmp(part, "elm.text") == 0) { + switch (index) { + case PTS_SIZE_FIT_TO_PAPER: + label = strdup(_("IDS_BT_OPT_FIT_TO_PAPER")); + break; + case PTS_SIZE_5X7: + label = strdup(IDS_BR_OPT_5X7); + break; + case PTS_SIZE_4X6: + label = strdup(IDS_BR_OPT_4X6); + break; + case PTS_SIZE_3_5X5: + label = strdup(IDS_BR_OPT_3_5X5); + break; + case PTS_SIZE_WALLET: + label = strdup(IDS_BR_OPT_WALLET); + break; + case PTS_SIZE_CUSTOM: + if (ad->size_popup_info.custom_unit == 1) { // cm unit + snprintf(custom, 32, "%s (%.1lfx%.1lfcm)", _("IDS_COM_SK_CUSTOM"), ad->size_popup_info.custom_height, ad->size_popup_info.custom_width); + } else if (ad->size_popup_info.custom_unit == 2) { // inch unit + snprintf(custom, 32, "%s (%.1lf\"x%.1lf\")", _("IDS_COM_SK_CUSTOM"), ad->size_popup_info.custom_height, ad->size_popup_info.custom_width); + } else { + snprintf(custom, 32, "%s (%.1lfx%.1lf)", _("IDS_COM_SK_CUSTOM"), ad->size_popup_info.custom_height, ad->size_popup_info.custom_width); + } + + label = strdup(custom); + break; + default: + label = strdup("Unknown option"); + break; + } + } + + PTS_TRACE_END; + return label; +} + +static Evas_Object *__pts_size_icon_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + + int index = (int)data; + PTS_DEBUG("Passed index : %d", index); + Evas_Object *radio; + + if (!strcmp(part, "elm.icon") || !strcmp(part, "elm.swallow.icon")) { + radio = elm_radio_add(obj); + elm_radio_state_value_set(radio, index); + elm_radio_group_add(radio, size_radio_main); + PTS_DEBUG("size_index[%d]", size_index); + // It's filter to avoid all radio selection + if (size_index == index) { + elm_radio_value_set(radio, size_index); + PTS_DEBUG("OK...Set radio button using size_index[%d]", size_index); + } + + evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); + + return radio; + } + + PTS_TRACE_END; + return NULL; +} + +static void __pts_size_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + int size = -1; + Elm_Object_Item *item = event_info; + + if (item != NULL) { + elm_genlist_item_selected_set(item, EINA_FALSE); + + size = (int)elm_object_item_data_get(item); + if (size > PTS_SIZE_FIT_TO_PAPER && size < PTS_SIZE_CUSTOM) { + PTS_DEBUG("Selected size : %d", size); + + ad->size_popup_info.image_size = size; + + // Now call real event trigger to update radio button when selected. + elm_genlist_item_update(item); + + load_image_editor_ug(ad); + } else if (size == PTS_SIZE_CUSTOM) { + pts_create_custom_popup(ad->main_info.navi, ad); + } else if (size == PTS_SIZE_FIT_TO_PAPER) { + size_index = ad->size_popup_info.image_size = size; + // just back to fit-to-paper of original image + PTS_IF_FREE_MEM(ad->printing_data.request_files[0]); + ad->printing_data.request_files[0] = strdup(ad->printing_data.input_file); + PTS_DEBUG("original_image_path: %s", ad->printing_data.request_files[0]); + pts_main_view_rotate_image(ad, app_get_device_orientation()); + } else { + PTS_DEBUG("Unknown size"); + } + PTS_IF_DEL_OBJ(obj); + PTS_IF_DEL_OBJ(ad->size_popup_info.size_popup); + PTS_IF_DEL_OBJ(size_radio_main); + } + PTS_TRACE_END; +} + +Evas_Object *pts_create_size_popup(Evas_Object *parent, pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + Evas_Object *popup; + Evas_Object *genlist; + Evas_Object *btn1; + int index; + + popup = elm_popup_add(parent); + elm_object_style_set(popup,"content_no_vhpad"); + elm_object_part_text_set(popup, "title,text", _("IDS_IMGE_BODY_SIZE")); + + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "content", "min_menustyle"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + btn1 = elm_button_add(popup); + elm_object_style_set(btn1, "popup_button/default"); + elm_object_text_set(btn1, _("IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button1", btn1); + evas_object_smart_callback_add(btn1, "clicked", _pts_size_cancel_cb, ad); + // Add cancel event + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_size_cancel_cb, ad); + + genlist = elm_genlist_add(popup); + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + if (!size_radio_main) { + size_radio_main = elm_radio_add(genlist); + elm_radio_state_value_set(size_radio_main, size_index); + elm_radio_value_set(size_radio_main, size_index); + } + + size_itc.item_style = "1text.1icon.2"; + size_itc.func.text_get = __pts_size_label_get; + size_itc.func.content_get = __pts_size_icon_get; + size_itc.func.state_get = NULL; + size_itc.func.del = NULL; + + Elm_Object_Item *item = NULL; + for (index = 0; index < PTS_SIZE_MAX; index++) { + item = elm_genlist_item_append(genlist, &size_itc, (void *)index, NULL, ELM_GENLIST_ITEM_NONE, __pts_size_sel, ad); + PTS_DEBUG("index[%d] - item added : %s", index, (NULL == item)? "FAILURE" : "SUCCESS"); + } + + Evas_Object *box = elm_box_add(popup); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + elm_box_pack_end(box, genlist); + + ad->size_popup_info.size_popup_portrait_height = elm_genlist_items_count(genlist) * 114 * elm_config_scale_get(); + ad->size_popup_info.size_popup_landscape_height = 300; + + int orientation = 0; + if (ad->win) + orientation = elm_win_rotation_get(ad->win); + + if (APP_DEVICE_ORIENTATION_0 == orientation || + APP_DEVICE_ORIENTATION_180 == orientation) { + evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), ad->size_popup_info.size_popup_portrait_height); + } else { + evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), ad->size_popup_info.size_popup_landscape_height); + } + + evas_object_show(box); + elm_object_part_content_set(layout, "elm.swallow.content" , box); + elm_object_content_set(popup, box); + ad->size_popup_info.size_popup_box = box; + elm_object_focus_set(popup, EINA_TRUE); + evas_object_show(genlist); + evas_object_show(popup); + + ad->size_popup_info.size_popup = popup; + + PTS_TRACE_END; + return genlist; +} + +static void _pts_custom_ok_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + ad->size_popup_info.image_size = PTS_SIZE_CUSTOM; + load_image_editor_ug(ad); + + PTS_IF_DEL_OBJ(obj); + PTS_IF_DEL_OBJ(ad->size_popup_info.custom_popup); + elm_theme_extension_del(NULL, RESDIR"/edje/genlist_custom.edj"); + + PTS_TRACE_END; +} + +static void _pts_custom_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + PTS_IF_DEL_OBJ(obj); + PTS_IF_DEL_OBJ(ad->size_popup_info.custom_popup); + + // FIXME - just back to original size + int tmp_width = 0; + int tmp_height = 0; + + get_image_resolution(ad->printing_data.input_file, &tmp_width, &tmp_height); + ad->size_popup_info.custom_width = (double)tmp_width; + ad->size_popup_info.custom_height = (double)tmp_height; + ad->size_popup_info.custom_w_ratio = ad->size_popup_info.custom_width / ad->size_popup_info.custom_height; + PTS_DEBUG("Original image size : %lfx%lf(%lfx1)", ad->size_popup_info.custom_width, ad->size_popup_info.custom_height, ad->size_popup_info.custom_w_ratio); + // original image size (unit cm) calculated by 300dpi + ad->size_popup_info.custom_width = (ad->size_popup_info.custom_width / 300) * 2.54; + ad->size_popup_info.custom_height = (ad->size_popup_info.custom_height / 300) * 2.54; + ad->size_popup_info.custom_unit = 1; // cm unit + + elm_theme_extension_del(NULL, RESDIR"/edje/genlist_custom.edj"); + + PTS_TRACE_END; +} + +static char *__pts_custom_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + int index = (int)data; + char *label = NULL; + + if (strcmp(part, "elm.text") == 0) { + if (index == 0) { + label = strdup(_("IDS_IMGE_BODY_WIDTH")); + } else if (index == 2) { + label = strdup(_("IDS_IMGE_BODY_HEIGHT")); + } else if (index == 4) { + label = strdup(_("IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB")); + } else { + label = strdup("Unknown label"); + } + } + + PTS_TRACE_END; + return label; +} + +static void _changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + char *input_str = NULL; + const char *entry_text = NULL; + int index = (int)data; + + entry_text = elm_entry_entry_get(obj); + if ((input_str = elm_entry_markup_to_utf8(entry_text))) { + pts_appdata_t *ad = pts_get_appdata(); + + if (index == 1) { + ad->size_popup_info.custom_width = atoi(input_str); + } else if (index == 3) { + ad->size_popup_info.custom_height = atoi(input_str); + } else { + PTS_DEBUG("Unknown index : %d", index); + } + + PTS_DEBUG("Typed custom value : width[%lf] x height[%lf]", ad->size_popup_info.custom_width, ad->size_popup_info.custom_height); + + PTS_IF_FREE_MEM(input_str); + } + PTS_TRACE_END; +} + +static void _focused_cb(void *data, Evas_Object *obj, void *event_info) // Focused callback will show X marked button and hide guidetext. +{ + PTS_TRACE_BEGIN; + elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm"); + PTS_TRACE_END; +} + +static void _unfocused_cb(void *data, Evas_Object *obj, void *event_info) // Unfocused callback will show guidetext and hide X marked button. +{ + PTS_TRACE_BEGIN; + char temp_size[32] = {0,}; + + if (elm_entry_is_empty(obj)) { + elm_object_signal_emit(data, "elm,state,guidetext,show", "elm"); + } + + if (aspect_ratio) { + pts_appdata_t *ad = pts_get_appdata(); + + if (obj == width_entry) { + ad->size_popup_info.custom_height = ad->size_popup_info.custom_width / ad->size_popup_info.custom_w_ratio; + snprintf(temp_size, 32, "%.1lf", ad->size_popup_info.custom_height); + elm_object_signal_emit(height_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(height_entry, temp_size); + } else if (obj == height_entry) { + ad->size_popup_info.custom_width = ad->size_popup_info.custom_height * ad->size_popup_info.custom_w_ratio; + snprintf(temp_size, 32, "%.1lf", ad->size_popup_info.custom_width); + elm_object_signal_emit(width_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(width_entry, temp_size); + } else { + PTS_DEBUG("Unknown entry : %p", obj); + } + } + PTS_TRACE_END; +} + +static void _eraser_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) // When X marked button clicked, make string as empty. +{ + PTS_TRACE_BEGIN; + elm_entry_entry_set(data, ""); + PTS_TRACE_END; +} + +static Evas_Object *__pts_singleline_editfield_add(Evas_Object *parent, int index) // For single lined editfield without top title. +{ + PTS_TRACE_BEGIN; + Evas_Object *layout, *entry; + static Elm_Entry_Filter_Accept_Set digits_filter_data; + char temp_size[32] = {0,}; + pts_appdata_t *ad = pts_get_appdata(); + + layout = elm_layout_add(parent); + elm_layout_theme_set(layout, "layout", "editfield", "default"); // Default editfield layout style without top title. + + entry = elm_entry_add(layout); + elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NUMBER); + elm_entry_scrollable_set(entry, EINA_TRUE); // Make entry as scrollable single line. + elm_entry_single_line_set(entry, EINA_TRUE); + elm_object_signal_emit(layout, "elm,state,eraser,show", "elm"); + evas_object_smart_callback_add(entry, "changed", _changed_cb, (void *)index); + evas_object_smart_callback_add(entry, "focused", _focused_cb, layout); + evas_object_smart_callback_add(entry, "unfocused", _unfocused_cb, layout); + + digits_filter_data.accepted = "0123456789."; + digits_filter_data.rejected = NULL; + elm_entry_markup_filter_append(entry, elm_entry_filter_accept_set, &digits_filter_data); + + elm_object_part_content_set(layout, "elm.swallow.content", entry); + if (index == 1) { + snprintf(temp_size, 32, "%.1lf", ad->size_popup_info.custom_width); + elm_object_part_text_set(layout, "elm.guidetext", temp_size); + width_layout = layout; + width_entry = entry; + } else if (index == 3) { + snprintf(temp_size, 32, "%.1lf", ad->size_popup_info.custom_height); + elm_object_part_text_set(layout, "elm.guidetext", temp_size); + height_layout = layout; + height_entry = entry; + } else { + elm_object_part_text_set(layout, "elm.guidetext", "Custom Size"); + } + + elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm", _eraser_clicked_cb, entry); + + evas_object_show(entry); + + PTS_TRACE_END; + return layout; +} + +static void _pts_custom_unit_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + char temp[32] = {0,}; + pts_appdata_t *ad = pts_get_appdata(); + PTS_DEBUG("Current unit : %d", ad->size_popup_info.custom_unit); + + if (ad->size_popup_info.custom_unit == 1) { // cm to inch + ad->size_popup_info.custom_unit = 2; + ad->size_popup_info.custom_width = ad->size_popup_info.custom_width / 2.54; + ad->size_popup_info.custom_height = ad->size_popup_info.custom_height / 2.54; + snprintf(temp, 32, "%s", _("IDS_COM_BODY_UNIT_CM")); + } else if (ad->size_popup_info.custom_unit == 2) { // inch to cm + ad->size_popup_info.custom_unit = 1; + ad->size_popup_info.custom_width = ad->size_popup_info.custom_width * 2.54; + ad->size_popup_info.custom_height = ad->size_popup_info.custom_height * 2.54; + snprintf(temp, 32, "%s", _("IDS_COM_BODY_UNIT_INCH")); + } else { + PTS_DEBUG("Unknown unit"); + PTS_TRACE_END; + return; + } + + elm_object_text_set(obj, temp); + + snprintf(temp, 32, "%.1lf", ad->size_popup_info.custom_width); + elm_object_signal_emit(width_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(width_entry, temp); + snprintf(temp, 32, "%.1lf", ad->size_popup_info.custom_height); + elm_object_signal_emit(height_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(height_entry, temp); + + PTS_DEBUG("Changed unit : %d", ad->size_popup_info.custom_unit); + PTS_TRACE_END; +} + +static void _pts_custom_unit_inch_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + char temp[32] = {0,}; + pts_appdata_t *ad = pts_get_appdata(); + PTS_DEBUG("Current unit : %d", ad->size_popup_info.custom_unit); + + if (ad->size_popup_info.custom_unit == 1) { // cm to inch + ad->size_popup_info.custom_unit = 2; + ad->size_popup_info.custom_width = ad->size_popup_info.custom_width / 2.54; + ad->size_popup_info.custom_height = ad->size_popup_info.custom_height / 2.54; + } else { + PTS_DEBUG("Unknown unit"); + PTS_TRACE_END; + return; + } + + snprintf(temp, 32, "%.1lf", ad->size_popup_info.custom_width); + elm_object_signal_emit(width_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(width_entry, temp); + snprintf(temp, 32, "%.1lf", ad->size_popup_info.custom_height); + elm_object_signal_emit(height_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(height_entry, temp); + + PTS_DEBUG("Changed unit : %d", ad->size_popup_info.custom_unit); + PTS_TRACE_END; +} + +static void _pts_custom_unit_cm_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + char temp[32] = {0,}; + pts_appdata_t *ad = pts_get_appdata(); + PTS_DEBUG("Current unit : %d", ad->size_popup_info.custom_unit); + + if (ad->size_popup_info.custom_unit == 2) { // inch to cm + ad->size_popup_info.custom_unit = 1; + ad->size_popup_info.custom_width = ad->size_popup_info.custom_width * 2.54; + ad->size_popup_info.custom_height = ad->size_popup_info.custom_height * 2.54; + } else { + PTS_DEBUG("Unknown unit"); + PTS_TRACE_END; + return; + } + + snprintf(temp, 32, "%.1lf", ad->size_popup_info.custom_width); + elm_object_signal_emit(width_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(width_entry, temp); + snprintf(temp, 32, "%.1lf", ad->size_popup_info.custom_height); + elm_object_signal_emit(height_layout, "elm,state,guidetext,hide", "elm"); + elm_entry_entry_set(height_entry, temp); + + PTS_DEBUG("Changed unit : %d", ad->size_popup_info.custom_unit); + PTS_TRACE_END; +} + +static Evas_Object *__pts_custom_icon_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Evas_Object *editfield = NULL; + Evas_Object *check = NULL; + Evas_Object *button = NULL; + int index = (int)data; + char unit[32] = {0,}; + + PTS_DEBUG("index: %d, passed part: %s", index, part); + if (!strcmp(part, "elm.icon")) { + switch (index) { + case 1: // width text field + case 3: // height text field + editfield = __pts_singleline_editfield_add(obj, index); + return editfield; + case 4: // check aspect ratio + check = elm_check_add(obj); + //set the State pointer to keep the current UI state of Checkbox. + elm_check_state_pointer_set(check, &aspect_ratio); + + evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL); + return check; + case 5: // change unit button + button = elm_button_add(obj); + snprintf(unit, 32, "%s", _("IDS_COM_BODY_UNIT_INCH")); + elm_object_text_set(button, unit); + elm_object_part_content_set(obj, "button1", button); + evas_object_smart_callback_add(button, "clicked", _pts_custom_unit_cb, obj); + return button; + } + } else if (!strcmp(part, "elm.icon.1")) { + button = elm_button_add(obj); + snprintf(unit, 32, "%s", _("IDS_COM_BODY_UNIT_INCH")); + elm_object_text_set(button, unit); + elm_object_part_content_set(obj, "button1", button); + evas_object_smart_callback_add(button, "clicked", _pts_custom_unit_inch_cb, obj); + return button; + } else if (!strcmp(part, "elm.icon.2")) { + button = elm_button_add(obj); + snprintf(unit, 32, "%s", _("IDS_COM_BODY_UNIT_CM")); + elm_object_text_set(button, unit); + elm_object_part_content_set(obj, "button2", button); + evas_object_smart_callback_add(button, "clicked", _pts_custom_unit_cm_cb, obj); + return button; + } else { + PTS_DEBUG("Index: %d, Unknown part: %s", index, part); + } + + PTS_TRACE_END; + return NULL; +} + +static void __pts_custom_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + int index = -1; + Elm_Object_Item *item = event_info; + + if (item != NULL) { + elm_genlist_item_selected_set(item, EINA_FALSE); + + index = (int)elm_object_item_data_get(item); + if (index == 4) { + aspect_ratio = !aspect_ratio; + PTS_DEBUG("Preserve aspect ratio : %d", aspect_ratio); + + elm_genlist_item_update(item); + } else { + PTS_DEBUG("Unknown index"); + } + } + PTS_TRACE_END; +} + +Evas_Object *pts_create_custom_popup(Evas_Object *parent, pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + Evas_Object *popup; + Evas_Object *genlist; + Evas_Object *ok_button; + Evas_Object *cancel_button; + int index = -1; + + popup = elm_popup_add(parent); + elm_object_style_set(popup,"content_no_vhpad"); + elm_object_part_text_set(popup, "title,text", _("IDS_COM_SK_CUSTOM")); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "content", "min_menustyle"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + cancel_button = elm_button_add(popup); + elm_object_style_set(cancel_button,"popup_button/default"); + elm_object_text_set(cancel_button, _("IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button1", cancel_button); + evas_object_smart_callback_add(cancel_button, "clicked", _pts_custom_cancel_cb, ad); + + ok_button = elm_button_add(popup); + elm_object_style_set(ok_button,"popup_button/default"); + elm_object_text_set(ok_button, _("IDS_COM_SK_OK")); + elm_object_part_content_set(popup, "button2", ok_button); + evas_object_smart_callback_add(ok_button, "clicked", _pts_custom_ok_cb, ad); + + elm_theme_extension_add(NULL, RESDIR"/edje/genlist_custom.edj"); + PTS_DEBUG("Added extension theme"); + + genlist = elm_genlist_add(popup); + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + title_itc.item_style = "dialogue/title"; + title_itc.func.text_get = __pts_custom_label_get; + title_itc.func.content_get = NULL; + title_itc.func.state_get = NULL; + title_itc.func.del = NULL; + + text_itc.item_style = "1icon"; + text_itc.func.text_get = NULL; + text_itc.func.content_get = __pts_custom_icon_get; + text_itc.func.state_get = NULL; + text_itc.func.del = NULL; + + check_itc.item_style = "1text.1icon.2"; + check_itc.func.text_get = __pts_custom_label_get; + check_itc.func.content_get = __pts_custom_icon_get; + check_itc.func.state_get = NULL; + check_itc.func.del = NULL; + + //button_itc.item_style = "dialogue/bg/2icon"; + button_itc.item_style = "custom/2icon"; + button_itc.func.text_get = NULL; + button_itc.func.content_get = __pts_custom_icon_get; + button_itc.func.state_get = NULL; + button_itc.func.del = NULL; + + Elm_Object_Item *item = NULL; + Elm_Genlist_Item_Class *temp_itc = NULL; + Evas_Smart_Cb temp_cb = NULL; + + for (index = 0; index < 6; index++) { + if (index == 0 || index == 2) { // width&height title + temp_itc = &title_itc; + } else if (index == 1 || index == 3) { // width&height text field + temp_itc = &text_itc; + } else if (index == 4) { // aspect ratio check + temp_itc = &check_itc; + temp_cb = __pts_custom_sel; + } else if (index == 5) { // change unit button + temp_itc = &button_itc; + } else { + } + + item = elm_genlist_item_append(genlist, temp_itc, (void *)index, NULL, ELM_GENLIST_ITEM_NONE, temp_cb, ad); + if (index != 4) { + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_NONE); + } + PTS_DEBUG("index[%d] - item added : %s", index, (NULL == item)? "FAILURE" : "SUCCESS"); + } + + Evas_Object *box = elm_box_add(popup); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + elm_box_pack_end(box, genlist); + + ad->size_popup_info.custom_popup_portrait_height = (5 * 114 + 4) * elm_config_scale_get(); + ad->size_popup_info.custom_popup_landscape_height = 300; + int orientation = 0; + if (ad->win) + orientation = elm_win_rotation_get(ad->win); + + if (APP_DEVICE_ORIENTATION_0 == orientation || + APP_DEVICE_ORIENTATION_180 == orientation) { + evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), ad->size_popup_info.custom_popup_portrait_height); + } else { + evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), ad->size_popup_info.custom_popup_landscape_height); + } + + elm_object_part_content_set(layout, "elm.swallow.content" , box); + //evas_object_event_callback_add(popup, EVAS_CALLBACK_MOUSE_UP, _pts_mouse_cb, ad); + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_custom_cancel_cb, ad); + elm_object_focus_set(popup, EINA_TRUE); + + elm_object_content_set(popup, box); + ad->size_popup_info.custom_popup_box = box; + + evas_object_show(genlist); + evas_object_show(popup); + + ad->size_popup_info.custom_popup = popup; + + PTS_TRACE_END; + return genlist; +} + +static Evas_Object *__pts_utils_create_conformant(Evas_Object *parent) +{ + + Evas_Object *conform = NULL; + elm_win_conformant_set(parent, TRUE); + conform = elm_conformant_add(parent); + + elm_object_style_set(conform, "internal_layout"); + + //evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL); + + evas_object_show(conform); + + return conform; +} + +Evas_Object *pts_utils_create_layout(Evas_Object *navi_frame) +{ + Evas_Object *layout; + layout = elm_layout_add(navi_frame); + elm_layout_theme_set(layout, "layout", "application", "default"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + //Evas_Object *bg = elm_bg_add(layout); + //evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + //elm_object_style_set(bg, "group_list"); + //elm_object_part_content_set(layout, "elm.swallow.bg", bg); + + //Evas_Object *conform = __pts_utils_create_conformant(layout); + //assertm_if(NULL == conform, "NULL!!"); + //elm_object_part_content_set(layout, "elm.swallow.content", conform); + //elm_object_part_content_set(layout, "elm.swallow.content", layout); + evas_object_show(layout); + + return layout; +} + +/* +* this function is used to compose folder and filename. +*/ +char **__compose_image_files_path(char *folder, const char **filesname, const int num_of_files) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(folder == NULL, NULL, "folder is NULL"); + PTS_RETV_IF(filesname == NULL, NULL, "filesname is NULL"); + PTS_RETV_IF(num_of_files <= 0, NULL, "num is invalid(%d)",num_of_files); + + char **paths = NULL; + paths = (char **)malloc(sizeof(char *)*num_of_files); + PTS_RETV_IF(paths == NULL , NULL, "malloc failed!"); + + int count = 0; + int index = 0; + char filepath[512] = {0}; + + for (; count < num_of_files ; count++) { + snprintf(filepath, 512, "%s/%s", folder, filesname[count]); + + paths[count] = strdup(filepath); + if (paths[count] == NULL) { + PTS_DEBUG("Failed to strdup"); + for (index = 0 ; index < count ; index++) { + PTS_IF_FREE_MEM(paths[index]); + } + PTS_IF_FREE_MEM(paths); + return NULL; + } + PTS_DEBUG("files[%d]: %s", count, paths[count]); + } + + PTS_TRACE_END; + return paths; +} + +/* +* validate the path of image files. +*/ +bool __validate_file_type(char **files, int num) +{ + PTS_TRACE_BEGIN; + + PTS_RETV_IF(files == NULL || num <= 0, false, "the input param is invalid!"); + + int i = 0; + char *path = NULL; + const int filters_num = 16; + /* the image type that cups supports */ + const char *filters[] = {".gif", ".bmp", ".sgi", ".ras", ".pbm", ".pgm", ".ppm", ".pcd", + ".pix", ".png", ".jpeg", ".jpg", ".jpe", ".tiff", ".tif", ".pdf" + }; + + for (; i < num; i++) { + path = *(files + i); + + /* check whether the file is exist */ + int ret = -1; + struct stat buf; + + ret = stat(path, &buf); + PTS_RETV_IF(ret != 0, false, "get file(%s) status failed!", path); + + /* check whether the file can be supported */ + char *p = NULL; + p = strrchr(path, '.'); + PTS_RETV_IF(p == NULL, false, "get file(%s) filter failed!", path); + + int j = 0; + int tag = 0; + + for (; j < filters_num; j++) { + if (0 == strcasecmp(p, filters[j])) { + tag = 1; + break; + } + } + PTS_RETV_IF(tag == 0, false, "the file(%s) can't be supported!", path); + } + + PTS_TRACE_END; + return true; +} + +/* +* validate the path of image files. +*/ +bool _is_pdf_file_type(char **files, int num) +{ + PTS_TRACE_BEGIN; + + PTS_RETV_IF(files == NULL || num <= 0, false, "the input param is invalid!"); + + int i = 0; + char *path = NULL; + const int filters_num = 1; + /* the image type that cups supports */ + const char *filters[] = {".pdf"}; + + for (; i < num; i++) { + path = *(files + i); + + /* check whether the file is exist */ + int ret = -1; + struct stat buf; + + ret = stat(path, &buf); + PTS_RETV_IF(ret != 0, false, "get file(%s) status failed!", path); + + /* check whether the file can be supported */ + char *p = NULL; + p = strrchr(path, '.'); + PTS_RETV_IF(p == NULL, false, "get file(%s) filter failed!", path); + + int j = 0; + int tag = 0; + + for (; j < filters_num; j++) { + if (0 == strcasecmp(p, filters[j])) { + tag = 1; + break; + } + } + PTS_RETV_IF(tag == 0, false, "the file(%s) can't be supported!", path); + } + + PTS_TRACE_END; + return true; +} + +/* +* validate the path of image files. +*/ +bool _is_img_file_type(char **files, int num) +{ + PTS_TRACE_BEGIN; + + PTS_RETV_IF(files == NULL || num <= 0, false, "the input param is invalid!"); + + int i = 0; + char *path = NULL; + const int filters_num = 15; + /* the image type that cups supports */ + const char *filters[] = {".gif", ".bmp", ".sgi", ".ras", ".pbm", ".pgm", ".ppm", ".pcd", + ".pix", ".png", ".jpeg", ".jpg", ".jpe", ".tiff", ".tif"}; + + for (; i < num; i++) { + path = *(files + i); + + /* check whether the file is exist */ + int ret = -1; + struct stat buf; + + ret = stat(path, &buf); + PTS_RETV_IF(ret != 0, false, "get file(%s) status failed!", path); + + /* check whether the file can be supported */ + char *p = NULL; + p = strrchr(path, '.'); + PTS_RETV_IF(p == NULL, false, "get file(%s) filter failed!", path); + + int j = 0; + int tag = 0; + + for (; j < filters_num; j++) { + if (0 == strcasecmp(p, filters[j])) { + tag = 1; + break; + } + } + PTS_RETV_IF(tag == 0, false, "the file(%s) can't be supported!", path); + } + + PTS_TRACE_END; + return true; +} + +inline char *_pts_printing_data_get_directory(pts_printing_data_t *data) +{ + return data->directory; +} + +inline char **_pts_printing_data_get_request_files(pts_printing_data_t *data) +{ + return data->request_files; +} +inline int _pts_printing_data_get_files_count(pts_printing_data_t *data) +{ + return data->num_of_files; +} + +inline int _pts_printing_data_get_index(pts_printing_data_t *data) +{ + return data->current_index; +} + +inline char *_pts_printing_data_get_type(pts_printing_data_t *data) +{ + return data->type; +} + +Eina_Bool _pts_printing_data_set_directory(const char *directory, pts_printing_data_t *data) +{ + PTS_RETV_IF(directory == NULL, EINA_FALSE, "directory is NULL"); + PTS_RETV_IF(data == NULL, EINA_FALSE, "data is NULL"); + + data->directory = strdup(directory); + + PTS_RETV_IF(data->directory == NULL, EINA_FALSE, "Failed to strdup"); + return EINA_TRUE; +} + +Eina_Bool _pts_printing_data_set_request_files(const char **request_files, const int files_count, pts_printing_data_t *data) +{ + PTS_RETV_IF(request_files == NULL, EINA_FALSE, "request_files is NULL"); + PTS_RETV_IF(files_count <= 0, EINA_FALSE, "files_count is less than zero"); + + int count = 0; + count = _pts_printing_data_get_files_count(data); + PTS_RETV_IF(count != files_count, EINA_FALSE, "files count is not same with argument"); + + char *temp = NULL; + char **composite_files = NULL; + bool ret = false; + + temp = _pts_printing_data_get_directory(data); + if (temp != NULL) { + composite_files = __compose_image_files_path(temp, request_files, count); + PTS_RETV_IF(composite_files == NULL, EINA_FALSE, "compose the path of print files failed!"); + data->request_files = composite_files; + } else { + data->request_files = (char **)calloc(count, sizeof(char *)); + PTS_RETV_IF(data->request_files == NULL, EINA_FALSE, "Failed to calloc"); + + int index = 0; + for (index = 0 ; index < count ; index++) { + temp = strdup(request_files[index]); + PTS_RETV_IF(temp == NULL, EINA_FALSE, "Failed to strdup"); + data->request_files[index] = temp; + temp = NULL; + } + } + + ret = __validate_file_type(data->request_files, files_count); + PTS_RETV_IF(ret != true, EINA_FALSE, "files is invalid"); + + + return EINA_TRUE; +} + +Eina_Bool _pts_printing_data_set_files_count(const char *num_of_files, pts_printing_data_t *data) +{ + PTS_RETV_IF(num_of_files == NULL, EINA_FALSE,"num_of_files is NULL"); + PTS_RETV_IF(data == NULL, EINA_FALSE, "data is NULL"); + + int count = 0; + count = atoi(num_of_files); + PTS_RETV_IF(count <=0, EINA_FALSE, "num_of_files is less or equal than zero"); + data->num_of_files = count; + return EINA_TRUE; +} + +Eina_Bool _pts_printing_data_set_index(const char *current_index, pts_printing_data_t *data) +{ + PTS_RETV_IF(current_index == NULL, EINA_FALSE,"current_index is NULL"); + PTS_RETV_IF(data == NULL, EINA_FALSE, "data is NULL"); + + int index = -1; + index = atoi(current_index); + + PTS_RETV_IF(index < 0, EINA_FALSE, "index is less than zero"); + if (index >= _pts_printing_data_get_files_count(data)) { + PTS_DEBUG("the current index of print files(%s) is invalid!", index); + return EINA_FALSE; + } else { + data->current_index = index; + return EINA_TRUE; + } +} + +Eina_Bool _is_document_ux_type(const char *type) +{ + PTS_RETV_IF(type == NULL, EINA_FALSE, "type is NULL"); + if (strcasecmp(type, "DOC") == 0) { + return EINA_TRUE; + } + return EINA_FALSE; +} + +Eina_Bool _is_image_ux_type(const char *type) +{ + PTS_RETV_IF(type == NULL, EINA_FALSE, "type is NULL"); + if (strcasecmp(type, "IMG") == 0) { + return EINA_TRUE; + } + return EINA_FALSE; +} + +Eina_Bool _is_valid_print_file_type(const char *type) +{ + if (strcasecmp(type, "IMG") && strcasecmp(type,"DOC") && strcasecmp(type,"WEB")) { + PTS_DEBUG("the type of print files(%s) is invalid!", type); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +Eina_Bool _pts_printing_data_set_type(const char *type, pts_printing_data_t *data) +{ + PTS_RETV_IF(type == NULL, EINA_FALSE, "type is NULL"); + PTS_RETV_IF(data == NULL, EINA_FALSE, "data is NULL"); + PTS_RETV_IF(_is_valid_print_file_type(type) == EINA_FALSE, EINA_FALSE, "invalid type"); + + data->type = strdup(type); + PTS_RETV_IF(data->type == NULL, EINA_FALSE, "Failed to strdup"); + return EINA_TRUE; +} diff --git a/mobileprint/app/pts_main_view.c b/mobileprint/app/pts_main_view.c new file mode 100644 index 0000000..57b1dca --- /dev/null +++ b/mobileprint/app/pts_main_view.c @@ -0,0 +1,2071 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "pt_api.h" + +#include "pts_common.h" +#include "pts_main_view.h" +#include "pts_setting_view.h" +#include "preview_content.h" +#include "preview_util.h" + + +#define MOBILEPRINT_PACKAGENAME "org.tizen.mobileprint" +#define ICON_DIR "/usr/apps/org.tizen.mobileprint/res/images" +#define ICON_SETTING "/usr/apps/org.tizen.mobileprint/res/images/pt_printer_setting.png" +#define MOBILEPRINT_DEFAULTIMG "/usr/share/icons/default/small/org.tizen.mobileprint.png" +#define MOBILEPRINT_TMP_STR "_mobileprint.pdf" + +char *g_current_preview_path = NULL; +int g_pages_count = 0; + +void _wifi_qs_monitoring_cb(keynode_t *key, void *data); + +static void __pts_main_view_btn_setting_cb(void *data, Evas_Object *obj, void *event_info); +static Eina_Bool __pts_main_view_start_print(void *data); + +static void __pts_main_view_check_usb_printer_online(void *userdata); +static void __pts_main_view_check_usb_printer_offline(void *userdata); +static void __pts_main_view_check_printer_online(void *userdata); +static void __pts_main_view_check_printer_offline(void *userdata); +static void __pts_main_view_remove_job(void *userdata, int job_id); +static void __pts_main_view_job_error(void *userdata, int job_id); +static void __pts_main_view_last_job_error(void *user_data); +static Eina_Bool __pts_hide_main_view(void *data); +static int __pts_create_notification_by_page(pts_appdata_t *ad, pts_job_spooling_t *job_spooling); + +static int __pts_get_real_total_pages(int original_total_pages, int n_up_number, int copies) +{ + return (int)ceil((double)original_total_pages / (double)n_up_number) * copies; +} + +static pts_job_spooling_t *__pts_get_job_spooling(pts_appdata_t *ad, int job_id) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, NULL, "Invalid parameter for __pts_get_last_job_spooling"); + PTS_RETV_IF(job_id <= 0, NULL, "job_id is invalid(%d)", job_id); + + Eina_List *job_spooling_list = NULL; + pts_job_spooling_t *job_spooling = NULL; + + EINA_LIST_FOREACH(ad->noti_info.job_spooling_list, job_spooling_list, job_spooling) { + if (job_spooling->job_id == job_id) { + PTS_DEBUG("Found job_spooling for job_id[%d]", job_id); + break; + } + } + + PTS_RETV_IF(job_spooling == NULL, NULL, "job_spooling is NULL"); + PTS_RETV_IF(job_spooling->job_id <= 0, NULL, "job_spooling->job_id is invalid(%d)", job_spooling->job_id); + PTS_TRACE_END; + return job_spooling; +} + +static pts_job_spooling_t *__pts_get_last_job_spooling(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, NULL, "Invalid parameter for __pts_get_last_job_spooling"); + + Eina_List *job_spooling_list = NULL; + pts_job_spooling_t *job_spooling = NULL; + + job_spooling_list = eina_list_last(ad->noti_info.job_spooling_list); + PTS_RETV_IF(job_spooling_list == NULL, NULL, "No found job_spooling_list for last job"); + + job_spooling = (pts_job_spooling_t *)eina_list_data_get(job_spooling_list); + PTS_RETV_IF(job_spooling == NULL || job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE + , NULL, "No found job_spooling for last job"); + + PTS_TRACE_END; + return job_spooling; +} + +int __pts_update_popup_progress(pts_appdata_t *ad, pt_progress_info_t *progress_info, pts_job_spooling_t *job_spooling) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL || ad->progress_info.progressbar == NULL || progress_info == NULL || job_spooling == NULL + , 1, "Invalid parameter for __pts_update_popup_progress"); + + PTS_DEBUG("progress popup [%d]\n", progress_info->progress); + double rate = progress_info->progress * 0.01; + char progress_value[8] = {0,}; + char page_value[8] = {0,}; + char aligned_label[128] = {0,}; + int real_total_pages = -1; + + if (EINA_TRUE == elm_progressbar_pulse_get(ad->progress_info.progressbar)) { + PTS_DEBUG("Stop pulsing mode\n"); + elm_progressbar_pulse_set(ad->progress_info.progressbar, EINA_FALSE); + elm_object_style_set(ad->progress_info.progressbar, "list_progress"); + elm_progressbar_value_set(ad->progress_info.progressbar, 0.00); + } + + elm_progressbar_value_set(ad->progress_info.progressbar, rate); + + if (rate > 0) { + snprintf(aligned_label, 128, "%s", + _("IDS_PRT_HEADER_MEDIABOX_PRINTING")); + elm_object_text_set(ad->progress_info.progress_label, aligned_label); + } + + snprintf(progress_value, 8, "%d%%", progress_info->progress); + elm_object_part_text_set(ad->progress_info.progress_layout, "elm.text.subtext1", progress_value); + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + real_total_pages = 1; + } else { + real_total_pages = __pts_get_real_total_pages(job_spooling->pt_files.range.total_pages, + job_spooling->n_up, job_spooling->copies); + } + if (job_spooling->page_printed <= real_total_pages) { + PTS_DEBUG("real_total_pages:%d, page_printed:%d\n", real_total_pages, job_spooling->page_printed); + snprintf(page_value, 8, "%d/%d", job_spooling->page_printed, real_total_pages); + elm_object_part_text_set(ad->progress_info.progress_layout, "elm.text.subtext2", page_value); + } + + if (rate >= 1.00 && job_spooling->page_printed == real_total_pages) { + PTS_IF_DEL_OBJ(ad->progress_info.progressbar); + PTS_IF_DEL_OBJ(ad->progress_info.popup); + PTS_IF_DEL_OBJ(ad->main_info.root_win); + } + + PTS_TRACE_END; + return 0; +} + +int __pts_update_notification(pts_appdata_t *ad, + pt_progress_info_t *progress_info, + pts_job_spooling_t *job_spooling) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL || progress_info == NULL || job_spooling == NULL + , -1 ,"Invalid parameters for update_notification"); + + double rate = progress_info->progress * 0.01; + PTS_RETV_IF(job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE || job_spooling->noti_handle == NULL + , -1 , "Invalid noti parameters for update_notification"); + + // Remove notification after all page is printed + if (progress_info->page_printed > job_spooling->page_printed) { + if (job_spooling->noti_id != NOTIFICATION_PRIV_ID_NONE) { + int ret; + notification_delete_by_priv_id(MOBILEPRINT_PACKAGENAME, NOTIFICATION_TYPE_ONGOING, job_spooling->noti_id); + PTS_DEBUG("Notification is deleted"); + job_spooling->noti_id = NOTIFICATION_PRIV_ID_NONE; + ret = notification_free(job_spooling->noti_handle); + if (ret != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to free notification handle [%d]", ret); + } + job_spooling->noti_handle = NULL; + job_spooling->page_printed = progress_info->page_printed; // XXX + } + } + + if (job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE && job_spooling->noti_handle == NULL) { + int real_total_pages = -1; + + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + real_total_pages = 1; + } else { + real_total_pages = __pts_get_real_total_pages(job_spooling->pt_files.range.total_pages, + job_spooling->n_up, job_spooling->copies); + } + if (job_spooling->page_printed <= real_total_pages) { + PTS_DEBUG("Create new notification for page %d", job_spooling->page_printed); + __pts_create_notification_by_page(ad, job_spooling); + } + PTS_TRACE_END; + return 0; + } + + notification_update_progress(NULL, job_spooling->noti_id, rate); + + PTS_TRACE_END; + return 0; +} + +int __pts_remove_notification(int noti_id) +{ + PTS_TRACE_BEGIN; + + if (noti_id != NOTIFICATION_PRIV_ID_NONE) { + notification_delete_by_priv_id(MOBILEPRINT_PACKAGENAME, NOTIFICATION_TYPE_ONGOING, noti_id); + PTS_DEBUG("Notification is deleted"); + } + + PTS_TRACE_END; + return 0; +} + +int __pts_create_dummy_notification(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, -1, "Invalid paramter for __pts_create_dummy_notification"); + + int res = -1; + notification_h noti = NULL; + + noti = notification_new(NOTIFICATION_TYPE_ONGOING, + NOTIFICATION_GROUP_ID_NONE, + NOTIFICATION_PRIV_ID_NONE); + + PTS_RETV_IF(noti == NULL, -1, "Failed to create Notification"); + + res = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, _("IDS_PRT_POP_WAITING_TO_PRINT_ING"), + NULL, NOTIFICATION_VARIABLE_TYPE_NONE); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + + char *printer_label = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_label); + res = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, printer_label, NULL, NOTIFICATION_VARIABLE_TYPE_NONE); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + if (printer_label != NULL) { + free(printer_label); + printer_label = NULL; + } + + bundle *b = NULL; + b = bundle_create(); + char value[4] = {0,}; + + if (!strcasecmp(ad->printing_data.type, "DOC") || !strcasecmp(ad->printing_data.type, "WEB")) { + PTS_DEBUG("It's pdf file. [%s]", ad->printing_data.type); + ad->printing_data.range.total_pages = get_pdf_pages_count(ad->printing_data.request_files[0]); + } else { + PTS_DEBUG("It's not pdf file. [%s]", ad->printing_data.type); + ad->printing_data.range.total_pages = ad->printing_data.num_of_files; + } + // XXX - In this time, there's no job_spooling. So common pt_files field of ugd is used. + int real_total_pages = -1; + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + real_total_pages = 1; + } else { + real_total_pages = __pts_get_real_total_pages(ad->printing_data.range.total_pages, + printer_get_setting_n_up(ad->list_info.active_printer), ad->list_info.active_printer->copies); + } + snprintf(value, 4, "%d", real_total_pages); + appsvc_set_pkgname(b, MOBILEPRINT_PACKAGENAME); + appsvc_add_data(b, SERVICE_FILES, ad->printing_data.request_files[0]); + appsvc_add_data(b, SERVICE_PAGE_COUNT, value); + appsvc_add_data(b, SERVICE_LAUNCH_TYPE, LAUNCH_FROM_DUMMY_NOTI); + + res = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to notification_set_execute_option. [%d]", res); + goto ERR_CASE; + } + bundle_free(b); + + res = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, RESDIR"/images/A01_print_popup_icon_print.png"); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set image icon"); + goto ERR_CASE; + } + + res = notification_insert(noti, &(ad->noti_info.dummy_noti_id)); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to insert Notification [%d]", res); + goto ERR_CASE; + } + PTS_DEBUG("Notification ID [%d]", ad->noti_info.dummy_noti_id); + + PTS_TRACE_END; + return 0; + +ERR_CASE: + if (printer_label != NULL) { + free(printer_label); + printer_label = NULL; + } + + if (noti != NULL) { + notification_free(noti); + noti = NULL; + } + + if (b != NULL) { + bundle_free(b); + b = NULL; + } + + PTS_TRACE_END; + return -1; +} + +static int __pts_create_notification_by_page(pts_appdata_t *ad, pts_job_spooling_t *job_spooling) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL || job_spooling == NULL + , -1, "Invalid parameter for __pts_create_notification_by_page"); + + int res = -1; + notification_h noti = NULL; + double rate = 0.00; + char title[32] = {0,}; + + noti = notification_new(NOTIFICATION_TYPE_ONGOING, + NOTIFICATION_GROUP_ID_NONE, + NOTIFICATION_PRIV_ID_NONE); + + if (noti == NULL) { + PTS_DEBUG("Failed to create Notification"); + goto ERR_CASE; + } + + //re-allocate noti handle + job_spooling->noti_handle = noti; + + int real_total_pages = -1; + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + real_total_pages = 1; + } else { + real_total_pages = __pts_get_real_total_pages(job_spooling->pt_files.range.total_pages, + job_spooling->n_up, job_spooling->copies); + } + snprintf(title, 32, "%s (%d/%d)", + _("IDS_PRT_HEADER_MEDIABOX_PRINTING"), job_spooling->page_printed, real_total_pages); + PTS_DEBUG("notification update: handle[%d] title=[%s]", job_spooling->noti_handle, title); + + res = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, title, + NULL, NOTIFICATION_VARIABLE_TYPE_NONE); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + + char *printer_label = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_label); + res = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, printer_label, NULL, NOTIFICATION_VARIABLE_TYPE_NONE); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + if (printer_label != NULL) { + free(printer_label); + printer_label = NULL; + } + + res = notification_set_progress(noti, rate); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + + bundle *b = NULL; + b = bundle_create(); + char value1[4] = {0,}; + char value2[4] = {0,}; + snprintf(value1, 4, "%d", job_spooling->job_id); + snprintf(value2, 4, "%d", real_total_pages); + appsvc_set_pkgname(b, MOBILEPRINT_PACKAGENAME); + appsvc_add_data(b, SERVICE_JOB_ID, value1); + appsvc_add_data(b, SERVICE_PAGE_COUNT, value2); + appsvc_add_data(b, SERVICE_LAUNCH_TYPE, LAUNCH_FROM_PROGRESS_NOTI); + + res = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to notification_set_execute_option. [%d]", res); + goto ERR_CASE; + } + bundle_free(b); + + res = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, RESDIR"/images/A01_print_popup_icon_print.png"); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set image icon"); + goto ERR_CASE; + } + + res = notification_insert(noti, &job_spooling->noti_id); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to insert Notification [%d]", res); + goto ERR_CASE; + } + PTS_DEBUG("Notification ID [%d]", job_spooling->noti_id); + + PTS_TRACE_END; + return 0; + +ERR_CASE: + if (printer_label != NULL) { + free(printer_label); + printer_label = NULL; + } + + if (job_spooling->noti_handle != NULL) { + notification_free(job_spooling->noti_handle); + job_spooling->noti_handle = NULL; + } + + if (b != NULL) { + bundle_free(b); + b = NULL; + } + + PTS_TRACE_END; + return -1; +} + +int __pts_create_job_notification(pts_appdata_t *ad, int job_id) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL || job_id <=0 + , -1 , "Invalid parameter for __pts_create_job_notification"); + + int res = -1; + notification_h noti = NULL; + double rate = 0.00; + char title[32] = {0,}; + + pts_job_spooling_t *job_spooling = malloc(sizeof(pts_job_spooling_t)); + PTS_RETV_IF(job_spooling == NULL, -1 , "Failed to malloc job_spooling"); + memset(job_spooling, 0, sizeof(pts_job_spooling_t)); + + //FIXME - pt_files.files should be managed carefully during printing + job_spooling->pt_files.num_of_files = ad->printing_data.num_of_files; + job_spooling->pt_files.current_index = ad->printing_data.current_index; + + job_spooling->pt_files.type = strdup(ad->printing_data.type); // need malloc + if (job_spooling->pt_files.type == NULL) { + PTS_DEBUG("Failed to malloc job_spooling->pt_files.type"); + goto ERR_CASE; + } + + job_spooling->pt_files.request_files = (char **)malloc(sizeof(char *) * job_spooling->pt_files.num_of_files); + if (job_spooling->pt_files.request_files == NULL) { + PTS_DEBUG("Failed to malloc job_spooling->pt_files.request_files"); + goto ERR_CASE; + } + int i = 0; + for (i = 0; i < job_spooling->pt_files.num_of_files; i++) { + PTS_DEBUG("file path is %s", ad->printing_data.request_files[i]); + if (NULL != ad->printing_data.request_files[i]) { + job_spooling->pt_files.request_files[i] = strdup(ad->printing_data.request_files[i]); + } else { + job_spooling->pt_files.request_files[i] = strdup(MOBILEPRINT_DEFAULTIMG); + } + PTS_DEBUG("file path is %s", job_spooling->pt_files.request_files[i]); + } + + job_spooling->input_file = strdup(job_spooling->pt_files.request_files[0]); + if (job_spooling->input_file == NULL) { + PTS_DEBUG("Failed to malloc job_spooling->input_file"); + goto ERR_CASE; + } + + job_spooling->pt_files.range.from = ad->printing_data.range.from; + job_spooling->pt_files.range.to = ad->printing_data.range.to; + job_spooling->pt_files.range.total_pages = ad->printing_data.range.total_pages; + + job_spooling->pt_files.range.selected_files = (char **)malloc(sizeof(char *) * job_spooling->pt_files.range.total_pages); + if (job_spooling->pt_files.range.selected_files == NULL) { + PTS_DEBUG("Failed to malloc job_spooling->pt_files.range.selected_files"); + goto ERR_CASE; + } + + job_spooling->pt_files.range.selected_files[0] = strdup(ad->printing_data.range.selected_files[0]); + if (job_spooling->pt_files.range.selected_files[0] == NULL) { + PTS_DEBUG("Failed to malloc job_spooling->pt_files.range.selected_files[0]"); + goto ERR_CASE; + } + + job_spooling->job_id = job_id; +#if 0 // Need to believe passed "Printing page X X" log have correct information. + if (NULL == strcasestr(ugd->active_printer->name, "samsung")) { + job_spooling->page_printed = 1; // FIXME + } +#endif + + noti = notification_new(NOTIFICATION_TYPE_ONGOING, + NOTIFICATION_GROUP_ID_NONE, + NOTIFICATION_PRIV_ID_NONE); + if (noti == NULL) { + PTS_DEBUG("Failed to create Notification"); + goto ERR_CASE; + } + + job_spooling->noti_handle = noti; + + job_spooling->n_up = printer_get_setting_n_up(ad->list_info.active_printer); + + job_spooling->copies = ad->list_info.active_printer->copies; + + int real_total_pages = -1; + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + real_total_pages = 1; + } else { + real_total_pages = __pts_get_real_total_pages(job_spooling->pt_files.range.total_pages, + job_spooling->n_up, job_spooling->copies); + } + snprintf(title, 32, "%s (1/%d)", _("IDS_PRT_HEADER_MEDIABOX_PRINTING"), real_total_pages); + PTS_DEBUG("notification update: handle[%d] title=[%s]", job_spooling->noti_handle, title); + + res = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, title, + NULL, NOTIFICATION_VARIABLE_TYPE_NONE); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + + char *printer_label = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_label); + res = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, printer_label, NULL, NOTIFICATION_VARIABLE_TYPE_NONE); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + if (printer_label != NULL) { + free(printer_label); + printer_label = NULL; + } + + res = notification_set_progress(noti, rate); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set Notification title [%d]", res); + goto ERR_CASE; + } + + bundle *b = NULL; + b = bundle_create(); + char value1[4] = {0,}; + char value2[4] = {0,}; + snprintf(value1, 4, "%d", job_id); + snprintf(value2, 4, "%d", real_total_pages); + appsvc_set_pkgname(b, MOBILEPRINT_PACKAGENAME); + appsvc_add_data(b, SERVICE_JOB_ID, value1); + appsvc_add_data(b, SERVICE_PAGE_COUNT, value2); + appsvc_add_data(b, SERVICE_LAUNCH_TYPE, LAUNCH_FROM_PROGRESS_NOTI); + + res = notification_set_execute_option(noti, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, b); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to notification_set_execute_option. [%d]", res); + bundle_free(b); + goto ERR_CASE; + } + bundle_free(b); + + res = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, RESDIR"/images/A01_print_popup_icon_print.png"); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to set image icon"); + goto ERR_CASE; + } + + res = notification_insert(noti, &job_spooling->noti_id); + if (res != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to insert Notification [%d]", res); + goto ERR_CASE; + } + PTS_DEBUG("Notification ID [%d]", job_spooling->noti_id); + + ad->noti_info.job_spooling_list = eina_list_append(ad->noti_info.job_spooling_list, job_spooling); + if (eina_error_get()) { + PTS_DEBUG("Failed to append job_spooling"); + goto ERR_CASE; + } + + PTS_TRACE_END; + + return 0; + +ERR_CASE: + if (printer_label != NULL) { + free(printer_label); + printer_label = NULL; + } + + if (job_spooling != NULL) { + if (job_spooling->pt_files.type != NULL) { + PTS_IF_FREE_MEM(job_spooling->pt_files.type); + job_spooling->pt_files.type = NULL; + } + + if (job_spooling->pt_files.request_files != NULL) { + int i = 0; + for (i = 0; i < job_spooling->pt_files.num_of_files; i++) { + if (job_spooling->pt_files.request_files[i] != NULL) { + PTS_IF_FREE_MEM(job_spooling->pt_files.request_files[i]); + job_spooling->pt_files.request_files[i] = NULL; + } + } + PTS_IF_FREE_MEM(job_spooling->pt_files.request_files); + job_spooling->pt_files.request_files = NULL; + } + + if (job_spooling->input_file != NULL) { + PTS_IF_FREE_MEM(job_spooling->input_file); + job_spooling->input_file = NULL; + } + + if (job_spooling->pt_files.range.selected_files != NULL) { + if (job_spooling->pt_files.range.selected_files[0] != NULL) { + PTS_IF_FREE_MEM(job_spooling->pt_files.range.selected_files[0]); + job_spooling->pt_files.range.selected_files[0] = NULL; + } + + PTS_IF_FREE_MEM(job_spooling->pt_files.range.selected_files); + job_spooling->pt_files.range.selected_files = NULL; + } + + if (job_spooling->noti_handle != NULL) { + notification_free(job_spooling->noti_handle); + job_spooling->noti_handle = NULL; + } + + PTS_IF_FREE_MEM(job_spooling); + job_spooling = NULL; + } + + PTS_TRACE_END; + return -1; +} + +static gboolean __pts_main_view_job_monitor_timeout_cb(void *data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RETV_IF(ad == NULL, TRUE, "ad is NULL"); + + pt_job_state_e job_status = PT_JOB_ERROR; + gboolean ret = FALSE; + + //char noti_name[512] = {0}; + + //FIXME - need to check one or all? + Eina_List *job_spooling_list = NULL; + pts_job_spooling_t *job_spooling = NULL; + EINA_LIST_FOREACH(ad->noti_info.job_spooling_list, job_spooling_list, job_spooling) { + job_status = pt_get_current_job_status(job_spooling->job_id); + if (job_status == PT_JOB_PROCESSING || job_status == PT_JOB_PENDING) { + PTS_DEBUG("job_id[%d] status is %d", job_spooling->job_id, job_status); + //XXX - If any one of job list is processing or pending, then motinor cb will be called again. + ret = TRUE; + } + } + + PTS_TRACE_END; + + return ret; +} + +void __pts_event_cb(pt_event_e event, void *user_data, pt_progress_info_t *progress_info) +{ + PTS_TRACE_BEGIN; + + // XXX - progress_info can be passed by NULL + PTS_RET_IF(event < 0 || user_data == NULL, "Invalid parameters for event cb"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + pts_job_spooling_t *job_spooling = NULL; + + switch (event) { + case PT_EVENT_USB_PRINTER_ONLINE: + __pts_main_view_check_usb_printer_online(ad); + break; + case PT_EVENT_USB_PRINTER_OFFLINE: + __pts_main_view_check_usb_printer_offline(ad); + break; + case PT_EVENT_PRINTER_ONLINE: + __pts_main_view_check_printer_online(ad); + break; + case PT_EVENT_PRINTER_OFFLINE: + __pts_main_view_check_printer_offline(ad); + break; + case PT_EVENT_JOB_COMPLETED: + PTS_DEBUG("Job[%d] is completed.", progress_info->job_id); + __pts_main_view_remove_job(ad, progress_info->job_id); + break; + case PT_EVENT_JOB_STARTED: + PTS_DEBUG("Job id %d is allocated", progress_info->job_id); + __pts_remove_notification(ad->noti_info.dummy_noti_id); + ad->noti_info.dummy_noti_id = 0; + __pts_create_job_notification(ad, progress_info->job_id); + g_timeout_add(5000, (GSourceFunc)__pts_main_view_job_monitor_timeout_cb, ad); + break; + case PT_EVENT_JOB_PROCESSING: + PTS_DEBUG("Job[%d] is processing.", progress_info->job_id); + break; + case PT_EVENT_JOB_PROGRESS: + job_spooling = __pts_get_job_spooling(ad, progress_info->job_id); + if (job_spooling != NULL) { + PTS_DEBUG("new - progress_info: job_id[%d] progress[%d] page_printed[%d]\n" + "old - job_spooling: job_id[%d] progress[%d] page_printed[%d]", + progress_info->job_id, progress_info->progress, progress_info->page_printed, + job_spooling->job_id, job_spooling->progress, job_spooling->page_printed); + +#if 0 + //FIXME + if (NULL == strcasestr(ugd->active_printer->name, "samsung")) { + if (progress_info->progress < job_spooling->progress) { + //FIXME - assume next page printing is started + job_spooling->page_printed++; + } + } +#endif + + job_spooling->progress = progress_info->progress; + } + __pts_update_notification(ad, progress_info, job_spooling); + __pts_update_popup_progress(ad, progress_info, job_spooling); + break; + case PT_EVENT_JOB_PENDING: + PTS_DEBUG("Job[%d] is waiting.", progress_info->job_id); + break; + case PT_EVENT_JOB_HELD: + PTS_DEBUG("Job[%d] is held.", progress_info->job_id); + break; + case PT_EVENT_JOB_STOPPED: + PTS_DEBUG("Job[%d] is stopped.", progress_info->job_id); + __pts_main_view_job_error(ad, progress_info->job_id); + __pts_main_view_remove_job(ad, progress_info->job_id); + break; + case PT_EVENT_JOB_CANCELED: + PTS_DEBUG("Job[%d] is canceled.", progress_info->job_id); + __pts_main_view_job_error(ad, progress_info->job_id); + __pts_main_view_remove_job(ad, progress_info->job_id); + break; + case PT_EVENT_JOB_ABORTED: + PTS_DEBUG("Job[%d] is aborted.", progress_info->job_id); + if (progress_info->job_id > 0) { + __pts_main_view_job_error(ad, progress_info->job_id); + __pts_main_view_remove_job(ad, progress_info->job_id); + } else { // XXX - for dummy job? + __pts_main_view_last_job_error(ad); + } + break; + case PT_EVENT_JOB_ERROR: + PTS_DEBUG("Job[%d] error", progress_info->job_id); + __pts_main_view_job_error(ad, progress_info->job_id); + __pts_main_view_remove_job(ad, progress_info->job_id); + break; + case PT_EVENT_ALL_THREAD_COMPLETED: + PTS_DEBUG("All thread is completed."); + PTS_DEBUG("No more job, then terminate mobileprint"); + vconf_ignore_key_changed(VCONFKEY_WIFI_QS_EXIT, _wifi_qs_monitoring_cb); + pt_deinit(); + elm_exit(); + break; + default: + break; + } + + PTS_TRACE_END; +} + +static void __pts_main_view_check_usb_printer_online(void *userdata) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)userdata; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + /* if in ether searching or printing, ignore it */ + PTS_RET_IF(ad->search_info.is_process == 1, "searching or printing is processing"); + + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + elm_naviframe_item_pop_to(ad->main_info.navi_it); + + /* re-searching printers */ + ad->search_info.print_search_mode = PTS_SEARCH_INITIAL; + ad->search_info.selection_done_cb = load_main_view; + ad->search_info.print_search_popup_parent = ad->main_info.root_win; + ad->search_info.printer_search_user_data = NULL; + pts_search_printer(ad); + //pts_main_view_search_printer(ugd); + + PTS_TRACE_END; +} + +static void __pts_main_view_check_usb_printer_offline(void *userdata) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)userdata; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + /* if in searching or printing, return */ + PTS_RET_IF(ad->search_info.is_process == 1, "searching or printing is processing"); + PTS_IF_DEL_OBJ(ad->progress_info.popup); + PTS_IF_FREE_MEM(ad->list_info.active_printer); + + elm_naviframe_item_pop_to(ad->main_info.navi_it); + + pts_main_view_update_printer_label(ad); + + PTS_TRACE_END; +} + +static void __pts_main_view_remove_job(void *user_data, int job_id) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(user_data == NULL || job_id <= 0,"Invalid parameter for job error processing"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + int ret; + + if (NULL != ad->progress_info.popup) { + evas_object_del(ad->progress_info.popup); + ad->progress_info.popup = NULL; + evas_object_hide(ad->main_info.root_win); + } + + Eina_List *job_spooling_list = NULL; + pts_job_spooling_t *job_spooling = NULL; + + EINA_LIST_FOREACH(ad->noti_info.job_spooling_list, job_spooling_list, job_spooling) { + if (job_spooling->job_id == job_id) { + PTS_DEBUG("Found job_spooling for job_id[%d]", job_id); + break; + } + } + + PTS_RET_IF(job_spooling == NULL || job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE + ,"No found job_spooling for job_id[%d]\n", job_id); + + notification_delete_by_priv_id(MOBILEPRINT_PACKAGENAME, NOTIFICATION_TYPE_ONGOING, job_spooling->noti_id); + ad->search_info.is_process = 0;/*process is complete*/ + + ad->noti_info.job_spooling_list = eina_list_remove_list(ad->noti_info.job_spooling_list, job_spooling_list); + if (0 == eina_list_count(ad->noti_info.job_spooling_list)) { + PTS_DEBUG("Job spooling list is empty"); + ad->noti_info.job_spooling_list = NULL; + } + + if (job_spooling->noti_handle != NULL) { + ret = notification_free(job_spooling->noti_handle); + if (ret != NOTIFICATION_ERROR_NONE) { + PTS_DEBUG("Failed to free notification handle [%d]", ret); + } + job_spooling->noti_handle = NULL; + } + + PTS_RET_IF(job_spooling->pt_files.range.selected_files == NULL, "job_spooling->pt_files.range.selected_files is NULL"); + + if (job_spooling->pt_files.range.selected_files[0]) { + PTS_IF_FREE_MEM(job_spooling->pt_files.range.selected_files[0]); + job_spooling->pt_files.range.selected_files[0] = NULL; + } + + if (job_spooling->pt_files.range.selected_files) { + PTS_IF_FREE_MEM(job_spooling->pt_files.range.selected_files); + job_spooling->pt_files.range.selected_files = NULL; + } + + if (job_spooling->input_file) { + PTS_IF_FREE_MEM(job_spooling->input_file); + job_spooling->input_file = NULL; + } + + int i = 0; + for (i = 0; i < job_spooling->pt_files.num_of_files; i++) { + if (job_spooling->pt_files.request_files[i]) { + PTS_IF_FREE_MEM(job_spooling->pt_files.request_files[i]); // FIXME + job_spooling->pt_files.request_files[i] = NULL; + } + } + + if (job_spooling->pt_files.request_files) { + PTS_IF_FREE_MEM(job_spooling->pt_files.request_files); // FIXME + job_spooling->pt_files.request_files = NULL; + } + + if (job_spooling->pt_files.type) { + PTS_IF_FREE_MEM(job_spooling->pt_files.type); + job_spooling->pt_files.type = NULL; + } + + if (job_spooling) { + PTS_IF_FREE_MEM(job_spooling); + job_spooling = NULL; + } + + PTS_TRACE_END; +} + +static void __pts_main_view_job_error(void *user_data, int job_id) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(user_data == NULL || job_id <= 0, "Invalid parameter for job error processing"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + pts_job_spooling_t *job_spooling = __pts_get_job_spooling(ad, job_id); + + PTS_RET_IF(job_spooling == NULL || job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE + , "No found job_spooling for job_id[%d]\n", job_id); + + notification_delete_by_priv_id(MOBILEPRINT_PACKAGENAME, NOTIFICATION_TYPE_ONGOING, job_spooling->noti_id); + ad->search_info.is_process = 0;/*process is complete*/ + pts_create_popup(ad->main_info.root_win, _("IDS_PRT_POP_PRINTINGERROR"), 2.0); + evas_object_show(ad->main_info.root_win); + ecore_timer_add(2.0, (Ecore_Task_Cb)__pts_hide_main_view, (void *)ad); + PTS_TRACE_END; +} + +static void __pts_main_view_last_job_error(void *user_data) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(user_data == NULL, "Invalid parameter for last job error processing"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + pts_job_spooling_t *job_spooling = __pts_get_last_job_spooling(ad); + PTS_RET_IF(job_spooling == NULL || job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE + , "No found job_spooling for last_job"); + + notification_delete_by_priv_id(MOBILEPRINT_PACKAGENAME, NOTIFICATION_TYPE_ONGOING, job_spooling->noti_id); + ad->search_info.is_process = 0;/*process is complete*/ + pts_create_popup(ad->main_info.root_win, _("IDS_PRT_POP_PRINTINGERROR"), 2.0); + evas_object_show(ad->main_info.root_win); + ecore_timer_add(2.0, (Ecore_Task_Cb)__pts_hide_main_view, (void *)ad); + PTS_TRACE_END; +} + + +static void __pts_main_view_check_printer_online(void *user_data) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(user_data == NULL, "Invalid parameter for __pts_main_view_check_printer_online"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + ecore_timer_add(1.0, (Ecore_Task_Cb)__pts_main_view_start_print, ad); + + PTS_TRACE_END; +} + +static void __pts_main_view_check_printer_offline(void *user_data) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(user_data == NULL, "Invalid parameter for __pts_main_view_check_printer_offline"); + + pts_appdata_t *ad = (pts_appdata_t *)user_data; + PTS_IF_DEL_OBJ(ad->progress_info.popup); + PTS_IF_FREE_MEM(ad->list_info.active_printer); + + pts_main_view_update_printer_label(ad); + pts_create_popup(ad->main_info.navi, _("IDS_PRT_POP_CHECKPRINTERSTATE"), 2.0); + ad->search_info.is_process = 0;/* process is complete */ + + PTS_TRACE_END; +} + +static void __pts_main_view_delete_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + +#if 0 + if (NULL != ugd->pt_files.request_files) { + int i = 0; + for (i = 0; i < ugd->pt_files.num_of_files; i++) { + if (ugd->pt_files.request_files[i] != NULL) { + free(ugd->pt_files.request_files[i]); + ugd->pt_files.request_files[i] = NULL; + } + } + + if (ugd->pt_files.range.selected_files != NULL) { + free(ugd->pt_files.range.selected_files); + ugd->pt_files.range.selected_files = NULL; + } + + free(ugd->pt_files.request_files); + ugd->pt_files.request_files = NULL; + } +#endif + + PTS_TRACE_END; +} + +static void __pts_main_view_navi_delete_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_FREE_MEM(ad->list_info.active_printer); + + PTS_TRACE_END; +} + +/* +* "back" button callback +*/ +void __pts_main_view_btn_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *) data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + //TODO - check current spooling job status before app termination + if (ad->noti_info.job_spooling_list == NULL) { + vconf_ignore_key_changed(VCONFKEY_WIFI_QS_EXIT, _wifi_qs_monitoring_cb); + pt_deinit(); + elm_exit(); + } else { + PTS_DEBUG("Active job spooling list is existed. So just hide preview."); + __pts_hide_main_view(ad); + } + PTS_TRACE_END; +} + +static void __pts_main_view_dummy_cancel_print(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = pts_get_appdata(); + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->progress_info.progressbar); + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + pts_create_popup(ad->main_info.root_win, PTS_19, 2.0); + evas_object_show(ad->main_info.root_win); + ecore_timer_add(2.0, (Ecore_Task_Cb)__pts_hide_main_view, (void *)ad); + + PTS_TRACE_END; +} + +static void __pts_main_view_response_cancel_print(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + int job_id = (int)data; + pts_appdata_t *ad = pts_get_appdata(); + PTS_RET_IF(ad == NULL || job_id <= 0, "Invalid parameter for __pts_main_view_response_cancel_print"); + PTS_IF_DEL_OBJ(ad->progress_info.progressbar); + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + pt_cancel_print(job_id); + + pts_job_spooling_t *job_spooling = __pts_get_job_spooling(ad, job_id); + PTS_RET_IF(job_spooling == NULL || job_spooling->noti_id == NOTIFICATION_PRIV_ID_NONE + , "No found job_spooling for job[%d]\n", job_id); + + // FIXME - Is it better to do this job after received canceled evt_cb? + __pts_remove_notification(job_spooling->noti_id); + + pts_create_popup(ad->main_info.root_win, _("IDS_PRT_POP_PRINTING_CANCELED"), 2.0); + evas_object_show(ad->main_info.root_win); + ecore_timer_add(2.0, (Ecore_Task_Cb)__pts_hide_main_view, (void *)ad); + + PTS_TRACE_END; +} + +static void __pts_hide_progress_popup(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->progress_info.progressbar); + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + evas_object_hide(ad->main_info.root_win); + + PTS_TRACE_END; +} + +void __pts_print_dummy_popup(pts_appdata_t *ad, char *files, int page_count) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL || files == NULL || page_count <= 0, "Invalid parameters for progress_popup"); + + Evas_Object *label1 = NULL; + Evas_Object *label2 = NULL; + Evas_Object *label3 = NULL; + Evas_Object *popup = NULL; + Evas_Object *layout = NULL; + Evas_Object *progressbar = NULL; + char page_info[8] = {0,}; + char aligned_label[128] = {0,}; + + popup = elm_popup_add(ad->main_info.main_layout); + + label1 = elm_label_add(popup); + elm_object_style_set(label1, "popup/progressview"); + elm_label_line_wrap_set(label1, ELM_WRAP_MIXED); + char *printer_label = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_label); + snprintf(aligned_label, 128, "%s", printer_label); + elm_object_text_set(label1, aligned_label); + if (printer_label != NULL) { + /* accessability - screen reader support */ + elm_access_info_set(label1, ELM_ACCESS_INFO, printer_label); + free(printer_label); + printer_label = NULL; + } + evas_object_size_hint_weight_set(label1, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label1, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label1); + + label2 = elm_label_add(popup); + elm_object_style_set(label2, "popup/progressview"); + elm_label_line_wrap_set(label2, ELM_WRAP_MIXED); + snprintf(aligned_label, 128, "%s", + _("IDS_PRT_POP_WAITING_TO_PRINT_ING")); + elm_object_text_set(label2, aligned_label); + /* accessability - screen reader support */ + elm_access_info_set(label2, ELM_ACCESS_INFO, _("IDS_PRT_POP_WAITING_TO_PRINT_ING")); + evas_object_size_hint_weight_set(label2, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label2, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label2); + + label3 = elm_label_add(popup); + elm_object_style_set(label3, "popup/progressview"); + elm_label_line_wrap_set(label3, ELM_WRAP_MIXED); + snprintf(aligned_label, 128, "%s", basename(files)); + elm_object_text_set(label3, aligned_label); + /* accessability - screen reader support */ + elm_access_info_set(label3, ELM_ACCESS_INFO, basename(files)); + evas_object_size_hint_weight_set(label3, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label3, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label3); + + layout = pts_create_base_layout(popup, "popup_progress"); + + progressbar = elm_progressbar_add(popup); + elm_object_style_set(progressbar, "pending_list"); + elm_progressbar_pulse_set(progressbar, EINA_TRUE); // initial pending style + elm_progressbar_horizontal_set(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(progressbar); + + ad->progress_info.progress_label = label2; + ad->progress_info.progress_layout = layout; + ad->progress_info.progressbar = progressbar; + + elm_object_part_content_set(layout, "elm.swallow.content.1", label1); + elm_object_part_content_set(layout, "elm.swallow.content.2", label2); + elm_object_part_content_set(layout, "elm.swallow.content.3", label3); + elm_object_part_content_set(layout, "elm.swallow.end", progressbar); + elm_object_part_text_set(layout, "elm.text.subtext1", "0%"); + // XXX - In this time, there's no job_spooling. So common pt_files field of ugd is used. + int real_total_pages = -1; + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + real_total_pages = 1; + } else { + real_total_pages = __pts_get_real_total_pages(ad->printing_data.range.total_pages, + printer_get_setting_n_up(ad->list_info.active_printer), ad->list_info.active_printer->copies); + } + snprintf(page_info, 8, "1/%d", real_total_pages); + elm_object_part_text_set(layout, "elm.text.subtext2", page_info); + + Evas_Object *btn1 = NULL; + btn1 = elm_button_add(popup); + elm_object_style_set(btn1,"popup_button/default"); + elm_object_text_set(btn1, _("IDS_COM_SK_HIDE")); + elm_object_part_content_set(popup, "button1", btn1); + evas_object_smart_callback_add(btn1, "clicked", __pts_hide_progress_popup, ad); + + if (page_count > 1) { + Evas_Object *btn2 = NULL; + btn2 = elm_button_add(popup); + elm_object_style_set(btn2,"popup_button/default"); + elm_object_text_set(btn2, _("IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button2", btn2); + evas_object_smart_callback_add(btn2, "clicked", __pts_main_view_dummy_cancel_print, NULL); + } + + elm_object_content_set(popup, layout); + evas_object_show(popup); + evas_object_show(ad->main_info.root_win); + + ad->progress_info.popup = popup; + + PTS_TRACE_END; +} + + +void __pts_print_progress_popup(pts_appdata_t *ad, int job_id, int page_count) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL || job_id <= 0 || page_count <= 0, "Invalid parameters for progress_popup"); + + pts_job_spooling_t *job_spooling = NULL; + job_spooling = __pts_get_job_spooling(ad, job_id); + PTS_RET_IF(job_spooling == NULL, "No found job_spooling for job_id[%d]", job_id); + + Evas_Object *label1 = NULL; + Evas_Object *label2 = NULL; + Evas_Object *label3 = NULL; + Evas_Object *popup = NULL; + Evas_Object *layout = NULL; + Evas_Object *progressbar = NULL; + char progress_info[8] = {0,}; + char page_info[8] = {0,}; + char aligned_label[128] = {0,}; + + popup = elm_popup_add(ad->main_info.main_layout); + + label1 = elm_label_add(popup); + elm_object_style_set(label1, "popup/progressview"); + elm_label_line_wrap_set(label1, ELM_WRAP_MIXED); + char *printer_label = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_label); + snprintf(aligned_label, 128, "%s", printer_label); + elm_object_text_set(label1, aligned_label); + if (printer_label != NULL) { + /* accessability - screen reader support */ + elm_access_info_set(label1, ELM_ACCESS_INFO, printer_label); + + free(printer_label); + printer_label = NULL; + } + evas_object_size_hint_weight_set(label1, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label1, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label1); + + label2 = elm_label_add(popup); + elm_object_style_set(label2, "popup/progressview"); + elm_label_line_wrap_set(label2, ELM_WRAP_MIXED); + if (job_spooling->progress > 0) { + snprintf(aligned_label, 128, "%s", + _("IDS_PRT_HEADER_MEDIABOX_PRINTING")); + /* accessability - screen reader support */ + elm_access_info_set(label2, ELM_ACCESS_INFO, + _("IDS_PRT_HEADER_MEDIABOX_PRINTING")); + } else { + snprintf(aligned_label, 128, "%s", + _("IDS_PRT_POP_WAITING_TO_PRINT_ING")); + /* accessability - screen reader support */ + elm_access_info_set(label2, ELM_ACCESS_INFO, + _("IDS_PRT_POP_WAITING_TO_PRINT_ING")); + } + elm_object_text_set(label2, aligned_label); + evas_object_size_hint_weight_set(label2, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label2, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label2); + + label3 = elm_label_add(popup); + elm_object_style_set(label3, "popup/progressview"); + elm_label_line_wrap_set(label3, ELM_WRAP_MIXED); + char* label3_text = basename(job_spooling->pt_files.request_files[0]); + snprintf(aligned_label, 128, "%s", + label3_text); + elm_object_text_set(label3, aligned_label); + /* accessability - screen reader support */ + elm_access_info_set(label3, ELM_ACCESS_INFO, label3_text); + + evas_object_size_hint_weight_set(label3, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(label3, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label3); + + layout = pts_create_base_layout(popup, "popup_progress"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + progressbar = elm_progressbar_add(popup); + if (job_spooling->progress > 0) { + double rate = job_spooling->progress * 0.01; + elm_object_style_set(progressbar, "list_progress"); + elm_progressbar_value_set(progressbar, rate); + } else { + elm_object_style_set(progressbar, "pending_list"); + elm_progressbar_pulse_set(progressbar, EINA_TRUE); // initial pending style + } + elm_progressbar_horizontal_set(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(progressbar); + + ad->progress_info.progress_label = label2; + ad->progress_info.progress_layout = layout; + ad->progress_info.progressbar = progressbar; + + elm_object_part_content_set(layout, "elm.swallow.content.1", label1); + elm_object_part_content_set(layout, "elm.swallow.content.2", label2); + elm_object_part_content_set(layout, "elm.swallow.content.3", label3); + elm_object_part_content_set(layout, "elm.swallow.end", progressbar); + if (job_spooling->progress > 0) { + snprintf(progress_info, 8, "%d%%", job_spooling->progress); + elm_object_part_text_set(layout, "elm.text.subtext1", progress_info); + } else { + elm_object_part_text_set(layout, "elm.text.subtext1", "0%"); + } + snprintf(page_info, 8, "%d/%d", job_spooling->page_printed, page_count); + elm_object_part_text_set(layout, "elm.text.subtext2", page_info); + + Evas_Object *btn1 = NULL; + btn1 = elm_button_add(popup); + elm_object_style_set(btn1,"popup_button/default"); + elm_object_text_set(btn1, _("IDS_COM_SK_HIDE")); + elm_object_part_content_set(popup, "button1", btn1); + evas_object_smart_callback_add(btn1, "clicked", __pts_hide_progress_popup, ad); + + // Show cancel button when total page is greater than 1 page. +// if (page_count > 1) { + Evas_Object *btn2 = NULL; + btn2 = elm_button_add(popup); + elm_object_style_set(btn2,"popup_button/default"); + elm_object_text_set(btn2, _("IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button2", btn2); + evas_object_smart_callback_add(btn2, "clicked", __pts_main_view_response_cancel_print, (void *)job_id); + elm_access_info_set(btn2, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_PRINTING); +// } + + elm_object_content_set(popup, layout); + evas_object_show(popup); + evas_object_show(ad->main_info.root_win); + + ad->progress_info.popup = popup; + + PTS_TRACE_END; +} + +static Eina_Bool __pts_is_valid_printing_data(pts_appdata_t *ad) +{ + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->list_info.active_printer == NULL, EINA_FALSE, "ad->list_info.active_printer is NULL"); + + if (ad->list_info.active_printer->copies <= 0) { + ad->list_info.active_printer->copies = 1; + PTS_DEBUG("copies is less than 0(%d)", ad->list_info.active_printer->copies); + return EINA_FALSE; + } + + /* get the range of print files */ + if (ad->printing_data.range.from <= 0 || + ad->printing_data.range.to > ad->printing_data.range.total_pages || + ad->printing_data.range.from > ad->printing_data.range.to) { + PTS_DEBUG("from(%d) to(%d) total(%d)" + ,ad->printing_data.range.from + ,ad->printing_data.range.to + ,ad->printing_data.range.total_pages); + PTS_DEBUG("range checking error"); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool __pts_set_print_option_page_range(pts_appdata_t *ad) +{ + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + + char temp[1024] = {0,}; + int index = 0; + + if(_is_pdf_file_type(ad->printing_data.request_files, ad->printing_data.num_of_files) == true) { + for (index = 0 ; index < ad->printing_data.num_of_files ; index++) { + ad->printing_data.range.total_pages += get_pdf_pages_count(ad->printing_data.request_files[index]); + } + } else { + ad->printing_data.range.total_pages = ad->printing_data.num_of_files; + } + + PTS_DEBUG("Updated ad->printing_data.range.total_pages: %d", ad->printing_data.range.total_pages); + ad->printing_data.range.to = ad->printing_data.range.total_pages; + + if (ad->list_info.active_printer->range == PT_RANGE_CURRENT) { + ad->printing_data.range.from = ad->printing_data.range.to = evas_smart_smsc_calculate_page_number(ad->main_info.smsc) + 1; + snprintf(temp, sizeof(temp), "%d", ad->printing_data.range.from); + pt_set_print_option_page_range(temp); + PTS_DEBUG("Set current page[%d] printing", ad->printing_data.range.from); + } + + return EINA_TRUE; +} + +static Eina_Bool __pts_set_print_scale_size(pts_appdata_t *ad) +{ + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + + int num = 0; + char *first_fname = NULL; + + PTS_IF_FREE_MEM(ad->printing_data.range.selected_files); + //FIXME - multiple page pdf will be changed to several image files. + num = ad->printing_data.range.total_pages; + ad->printing_data.range.selected_files = (char **)malloc(sizeof(char *)*num); + + if (NULL == ad->printing_data.range.selected_files) { + PTS_DEBUG("selected_files malloc error"); + return EINA_FALSE; + } + + first_fname = ad->printing_data.request_files[ad->printing_data.range.from - 1]; + if (1 == num && FILE_TYPE_IMAGE == get_file_type(first_fname)) { + int res_x = 0; + int res_y = 0; + if (get_image_resolution(first_fname, &res_x, &res_y) < 0) { + PTS_DEBUG("[ERROR] Failed to get image resolution(%s)",first_fname); + return EINA_FALSE; + } + pt_imagesize_t crop_image_info; + crop_image_info.imagesize = ad->size_popup_info.image_size; + crop_image_info.resolution_width = ad->size_popup_info.custom_width; + crop_image_info.resolution_height = ad->size_popup_info.custom_height; + crop_image_info.ratio = ad->size_popup_info.custom_w_ratio; + crop_image_info.unit = ad->size_popup_info.custom_unit; + + pt_set_print_option_imagesize(&crop_image_info, first_fname, res_x, res_y); + ad->printing_data.range.selected_files[0] = ad->printing_data.request_files[0]; + } else { + pt_set_print_option_scaleimage(ad->list_info.active_printer->scaling); + num = 1; + ad->printing_data.range.selected_files[0] = ad->printing_data.input_file; + } + + return EINA_TRUE; +} + +static Eina_Bool __pts_set_print_options(pts_appdata_t *ad) +{ + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->list_info.active_printer == NULL, EINA_FALSE, "ad->list_info.active_printer is NULL"); + + Eina_Bool eret = EINA_FALSE; + + eret = __pts_set_print_option_page_range(ad); + PTS_RETV_IF(eret == EINA_FALSE, EINA_FALSE, "Failed to set page ragnge"); + + pt_set_print_option_papersize(); //(ugd->active_printer->size); + pt_set_print_option_copies(ad->list_info.active_printer->copies); +// pt_set_print_option_scaleimage(ugd->active_printer->scaling); + pt_set_print_option_orientation(ad->list_info.active_printer->landscape); + // FIXME : which field of ppd structure sholud be used for this? + pt_set_print_option_quality(); + pt_set_print_option_paper_type(); + pt_set_print_option_color(); + pt_set_print_option_duplex(ad->list_info.active_printer->landscape); + eret = __pts_set_print_scale_size(ad); + PTS_RETV_IF(eret == EINA_FALSE, EINA_FALSE, "Failed to set print scale size"); + + return EINA_TRUE; +} + +static Eina_Bool __pts_set_active_printer(pts_appdata_t *ad) +{ + PTS_RETV_IF(ad == NULL, EINA_FALSE, "ad is NULL"); + PTS_RETV_IF(ad->list_info.active_printer == NULL, EINA_FALSE, "ad->list_info.active_printer is NULL"); + + int ret = 0; + + if (1 != ad->list_info.active_printer->actived) { + /* use default printer, needs active */ + ret = pt_set_active_printer(ad->list_info.active_printer); + if (PT_ERR_NONE != ret) { + PTS_DEBUG("pt_set_active_printer error"); + return EINA_FALSE; + } + } + + return EINA_TRUE; +} + +static Eina_Bool __pts_main_view_start_print(void *data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RETV_IF(ad == NULL, ECORE_CALLBACK_CANCEL, "ad is NULL"); + + int ret = 0; + int num = 1; + + Eina_Bool eret = EINA_FALSE; + eret = __pts_set_print_options(ad); + PTS_RETV_IF(eret == EINA_FALSE, EINA_FALSE, "Failed to set print option"); + + eret = __pts_is_valid_printing_data(ad); + PTS_RETV_IF(eret == EINA_FALSE, EINA_FALSE, "It's not valid printing data"); + + eret = __pts_set_active_printer(ad); + PTS_RETV_IF(eret == EINA_FALSE, EINA_FALSE, "Failed to set active printer"); + + __pts_create_dummy_notification(ad); + + ret = pt_start_print((const char **)ad->printing_data.range.selected_files, num); + if (PT_ERR_NONE != ret) { + PTS_DEBUG("pt_start_print error"); + goto ERR_CASE; + } + + PTS_TRACE_END; + return ECORE_CALLBACK_CANCEL; + +ERR_CASE: + ad->search_info.is_process = 0;/*process is complete*/ + + PTS_IF_DEL_OBJ(ad->progress_info.popup); + + if ((PT_ERR_NOT_USB_ACCESS == ret) || (PT_ERR_NOT_NETWORK_ACCESS == ret)) { + pts_create_popup(ad->main_info.navi, _("IDS_COM_POP_PRINTER_DISCONNECTED_ABB2"), 2.0); + } else { + pts_create_popup(ad->main_info.navi, _("IDS_COM_BODY_UNSUPPORTED_FILE_TYPE"), 1.0); + } + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool __pts_hide_main_view(void *data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *) data; + PTS_RETV_IF(ad == NULL, ECORE_CALLBACK_CANCEL, "data is NULL"); + + PTS_IF_DEL_OBJ(ad->progress_info.popup); + PTS_DEBUG("Hide main view of mobileprint"); + evas_object_hide(ad->main_info.root_win); + + PTS_TRACE_END; + return ECORE_CALLBACK_CANCEL; +} + +/* +* "print" button callback +*/ +static void __pts_main_view_btn_print_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data ; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + if ((NULL != ad->printing_data.request_files) && (NULL != ad->list_info.active_printer)) { + evas_object_hide(ad->main_info.main_layout); + pts_create_popup(ad->main_info.root_win, _("IDS_PRT_POP_PREPARING_TO_PRINT_ING"), 2.0); + ecore_timer_add(2.0, (Ecore_Task_Cb)__pts_hide_main_view, (void *)ad); + + ad->search_info.is_process = 1;/* in process */ + __pts_main_view_start_print(ad); + } else { + pts_create_popup(ad->main_info.navi, _("IDS_PRT_BODY_SELECT_PRINTER"), 2.0); + } + PTS_TRACE_END; +} + +static void __pts_main_view_btn_size_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->setting_info.ctxpopup); + + if (ad->list_info.active_printer) { + pts_create_size_popup(ad->main_info.navi, ad); + } else { + pts_create_popup(ad->main_info.navi, _("IDS_PRT_BODY_NO_PRINTERS_AVAILABLE"), 1.0); + } + + PTS_TRACE_END; +} + +static void __pts_main_view_btn_scaling_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->setting_info.ctxpopup); + + if (ad->list_info.active_printer) { + pts_create_scaling_popup(ad->main_info.navi, ad); + } else { + pts_create_popup(ad->main_info.navi, _("IDS_PRT_BODY_NO_PRINTERS_AVAILABLE"), 1.0); + } + + PTS_TRACE_END; +} + + +static void __pts_main_view_btn_landscape_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->setting_info.ctxpopup); + + if (ad->list_info.active_printer) { + PTS_DEBUG("initial ad->main_info.landscape_toggle : %d", + ad->main_info.landscape_toggle); + if (PT_ORIENTATION_PORTRAIT == ad->main_info.landscape_toggle) { + ad->main_info.landscape_toggle = PT_ORIENTATION_LANDSCAPE; + } else { /*FIXME if (PT_LANDSCAPE_LANDSCAPE == ugd->landscape_toggle)*/ + ad->main_info.landscape_toggle = PT_ORIENTATION_PORTRAIT; + } + + PTS_DEBUG("ad->main_info.landscape_toggle : %d", ad->main_info.landscape_toggle); + + ad->list_info.active_printer->landscape = ad->main_info.landscape_toggle; + pts_main_view_rotate_image(ad, app_get_device_orientation()); + } else { + pts_create_popup(ad->main_info.navi, _("IDS_PRT_BODY_NO_PRINTERS_AVAILABLE"), 1.0); + } + + PTS_TRACE_END; +} + +static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_IF_DEL_OBJ(obj); +} + +static void _move_ctxpopup_more(Evas_Object *ctxpopup, Evas_Object *btn) +{ + pts_appdata_t *ad = pts_get_appdata(); + Evas_Coord w , h; + elm_win_screen_size_get(ad->win, NULL, NULL, &w, &h); + + int rot = elm_win_rotation_get(ad->win); + if (rot == APP_DEVICE_ORIENTATION_0 || rot == APP_DEVICE_ORIENTATION_180) { + evas_object_move(ctxpopup, 0, h); + } else if (rot == APP_DEVICE_ORIENTATION_90) { + evas_object_move(ctxpopup, 0, w); + } else { + evas_object_move(ctxpopup, h, w); + } +} + +static void _more_btn_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + //struct appdata *ad = (struct appdata *) data; + Evas_Object *icon; + char buf[256]; + + pts_appdata_t *ad = pts_get_appdata(); + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->setting_info.ctxpopup); + + ad->setting_info.ctxpopup = elm_ctxpopup_add(ad->main_info.navi); + elm_object_style_set(ad->setting_info.ctxpopup, "more/default"); + evas_object_smart_callback_add(ad->setting_info.ctxpopup, "dismissed", _dismissed_cb, ad->setting_info.ctxpopup); + + icon = elm_icon_add(ad->setting_info.ctxpopup); + if (ad->printing_data.type != NULL) { + if (0 == strcasecmp(ad->printing_data.type, "IMG")) { + snprintf(buf, sizeof(buf), "%s/A01_print_popup_icon_size.png", ICON_DIR); + elm_icon_file_set(icon, buf, NULL); + elm_ctxpopup_item_append(ad->setting_info.ctxpopup, _("IDS_IMGE_BODY_SIZE"), icon, __pts_main_view_btn_size_cb, ad); + } else if (0 == strcasecmp(ad->printing_data.type, "DOC") || 0 == strcasecmp(ad->printing_data.type, "WEB")) { + snprintf(buf, sizeof(buf), "%s/A01_print_popup_icon_scaling.png", ICON_DIR); + elm_icon_file_set(icon, buf, NULL); + elm_ctxpopup_item_append(ad->setting_info.ctxpopup, _("IDS_PRT_BODY_SCALING_ABB"), icon, __pts_main_view_btn_scaling_cb, ad); + } + } else { /* Default IMG */ + snprintf(buf, sizeof(buf), "%s/A01_print_popup_icon_size.png", ICON_DIR); + elm_icon_file_set(icon, buf, NULL); + elm_ctxpopup_item_append(ad->setting_info.ctxpopup, _("IDS_IMGE_BODY_SIZE"), icon, __pts_main_view_btn_size_cb, ad); + } + + icon = elm_icon_add(ad->setting_info.ctxpopup); + if (ad->main_info.landscape_toggle == PT_ORIENTATION_PORTRAIT) { + snprintf(buf, sizeof(buf), "%s/A01_print_popup_icon_Rotate.png", ICON_DIR); + } else { + snprintf(buf, sizeof(buf), "%s/A01_print_popup_icon_Rotate02.png", ICON_DIR); + } + elm_icon_file_set(icon, buf, NULL); + elm_ctxpopup_item_append(ad->setting_info.ctxpopup, _("IDS_IMGE_OPT_ROTATE"), icon, __pts_main_view_btn_landscape_cb, ad); + + icon = elm_icon_add(ad->setting_info.ctxpopup); + snprintf(buf, sizeof(buf), "%s/A01_print_popup_icon_setting.png", ICON_DIR); + elm_icon_file_set(icon, buf, NULL); + elm_ctxpopup_item_append(ad->setting_info.ctxpopup, _("IDS_COM_BODY_SETTING"), icon, __pts_main_view_btn_setting_cb, ad); + + _move_ctxpopup_more(ad->setting_info.ctxpopup, obj); + + ea_object_event_callback_add(ad->setting_info.ctxpopup, EA_CALLBACK_BACK, ea_ctxpopup_back_cb, NULL); + ea_object_event_callback_add(ad->setting_info.ctxpopup, EA_CALLBACK_MORE, ea_ctxpopup_back_cb, NULL); + elm_object_focus_set(ad->setting_info.ctxpopup, EINA_TRUE); + + evas_object_show(ad->setting_info.ctxpopup); + + PTS_TRACE_END; +} + +static Evas_Object *create_toolbar_btn(Evas_Object *parent, const char *text, Evas_Smart_Cb func, void *data) +{ + PTS_TRACE_BEGIN; + Evas_Object *btn = elm_button_add(parent); + if (!btn) { + return NULL; + } + elm_object_style_set(btn, "naviframe/toolbar/default"); + elm_object_text_set(btn, text); + evas_object_smart_callback_add(btn, "clicked", func, data); + PTS_TRACE_END; + return btn; +} + +static Evas_Object *create_toolbar_more_btn(Evas_Object *parent, Evas_Smart_Cb func, void *data) +{ + PTS_TRACE_BEGIN; + Evas_Object *btn = elm_button_add(parent); + if (!btn) { + return NULL; + } + elm_object_style_set(btn, "naviframe/more/default"); + elm_access_info_set(btn, ELM_ACCESS_INFO, IDS_SCRREAD_MENU_INFO); + elm_access_info_set(btn, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_MENU_CONTEXT); + evas_object_smart_callback_add(btn, "clicked", func, data); + PTS_TRACE_END; + return btn; +} + +/* + * Set accessability information - screen reader text + */ +void generate_main_view_accessability_info(pts_appdata_t *ad, + char* main_view_accessability_text, + size_t text_max_length) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(NULL == ad || NULL == ad->list_info.active_printer, "Invalid argument"); + + char papersize[256]={0,}; + strncpy(papersize, pt_get_print_option_papersize(ad->list_info.active_printer->size), 256-1); + char *quality, *papertype, *grayscale_mode, *print_range; + int p_quality = pt_get_selected(PT_OPTION_ID_QUALITY); + if (PT_QUALITY_DRAFT == p_quality) { + quality = _("IDS_PRT_OPT_PRINTSETTINGS_DRAFT"); + } else if (PT_QUALITY_STANDARD == p_quality) { + quality = _("IDS_PRT_OPT_PRINTSETTINGS_STANDARD"); + } else if (PT_QUALITY_HIGH == p_quality) { + quality = _("IDS_COM_BODY_HIGH"); + } else { + quality = NULL; + } + int p_type = pt_get_selected(PT_OPTION_ID_PAPER); + if (PT_PAPER_NORMAL == p_type) { + papertype = _("IDS_ST_BODY_NORMAL"); + } else if (PT_PAPER_GLOSSY == p_type) { + papertype = _("IDS_ST_BODY_GLOSSY"); + } else if (PT_PAPER_PHOTO == p_type) { + papertype = _("IDS_PRT_BODY_PHOTOGRAPHIC_ABB"); + } else { + papertype = NULL; + } + int p_grayscale = pt_get_selected(PT_OPTION_ID_GRAYSCALE); + if (PT_GRAYSCALE_COLOUR == p_grayscale) { + grayscale_mode = _("IDS_PRT_BODY_COLOUR"); + } else if (PT_GRAYSCALE_GRAYSCALE == p_grayscale) { + grayscale_mode = _("IDS_IMGE_HEADER_GREY"); + } else { + grayscale_mode = NULL; + } + pt_range_e p_range = ad->list_info.active_printer->range; + if (PT_RANGE_ALL == p_range) { + print_range = _("IDS_DIC_BODY_ALL"); + } else { + print_range = _("IDS_BR_BODY_CURRENT_PAGE"); + } + + snprintf(main_view_accessability_text, text_max_length, "%s, %d page of %d pages, %s size, %d %s," + " print %s, %s, " + " %s orientation, %s quality, %s paper" + " %s mode, send to %s", + basename(ad->printing_data.input_file), //printing file + evas_smart_smsc_calculate_page_number(ad->main_info.smsc) + 1, //current page + g_pages_count, //total pages + papersize, + ad->list_info.active_printer->copies, + (1 == ad->list_info.active_printer->copies) ? "copy" : "copies", + print_range, + (PT_SCALING_2_PAGES == ad->list_info.active_printer->scaling) ? "2 pages in 1 sheet" : + (PT_SCALING_4_PAGES == ad->list_info.active_printer->scaling) ? "4 pages in 1 sheet" : + "fit to paper", + PT_ORIENTATION_PORTRAIT == ad->list_info.active_printer->landscape ? "portrait" : + PT_ORIENTATION_LANDSCAPE == ad->list_info.active_printer->landscape ? "landscape" : "auto", + quality, + papertype, + grayscale_mode, + elm_access_info_get(ad->main_info.printer_label, ELM_ACCESS_INFO)); + + PTS_TRACE_END; +} + +/* +* create content of the main view screen +*/ +static Evas_Object *__pts_main_view_create_content(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, NULL, "ad is NULL"); + + /* + * load preview group + */ + ad->main_info.printer_layout = pts_create_base_layout(ad->main_info.navi, "printer"); + + pts_main_view_update_printer_label(ad); + + /* + * load preview image group + */ + ad->main_info.img_layout = pts_create_base_layout(ad->main_info.printer_layout, "image_view"); + + if (NULL != ad->printing_data.request_files) { + char *file_path = NULL; + file_path = ad->printing_data.request_files[ad->printing_data.current_index]; + PTS_DEBUG("filepath is %s", file_path); + } + + ad->main_info.smsc = evas_smart_smsc_add(evas_object_evas_get(ad->main_info.img_layout)); + evas_smart_smsc_set_layout(ad->main_info.smsc, ad->main_info.img_layout); + elm_object_part_content_set(ad->main_info.img_layout, "content", ad->main_info.smsc); + + /* + * Set preview layout + */ + elm_object_part_content_set(ad->main_info.printer_layout, "image", ad->main_info.img_layout); + evas_object_show(ad->main_info.img_layout); + evas_object_show(ad->main_info.printer_layout); + + static char main_view_accessability_text[2048] = {0,}; + generate_main_view_accessability_info(ad, main_view_accessability_text, 2048); + init_smsc_accessability_support(ad->main_info.smsc); + set_main_view_accessability_info(ad->main_info.smsc, ad->main_info.img_layout, + main_view_accessability_text, + IDS_SCRREAD_PREVIEW_IMAGE_TYPE, + IDS_SCRREAD_PREVIEW_IMAGE_CONTEXT); + + PTS_TRACE_END; + return ad->main_info.printer_layout; +} + + +/* +* setting button callback function +*/ +static void __pts_main_view_btn_setting_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->setting_info.ctxpopup); + + if (ad->list_info.active_printer) { + pts_create_setting_view(ad); + } else { + pts_create_popup(ad->main_info.navi, _("IDS_PRT_BODY_NO_PRINTERS_AVAILABLE"), 1.0); + } + + PTS_TRACE_END; +} + +int pts_main_view_load_printing_data(pts_appdata_t *ad, pts_printing_data_t *printing_data) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL || printing_data == NULL, -1, "Invalid argument"); + + PTS_IF_FREE_MEM(ad->printing_data.request_files); + PTS_IF_FREE_MEM(ad->printing_data.type); + + memset(&ad->printing_data, 0, sizeof(pts_printing_data_t)); + + ad->printing_data.num_of_files = printing_data->num_of_files; + ad->printing_data.current_index = printing_data->current_index; + ad->printing_data.type = printing_data->type; + ad->printing_data.request_files = (char **)malloc(sizeof(char *) * ad->printing_data.num_of_files); + + if (!ad->printing_data.request_files) { + PTS_IF_FREE_MEM(ad->printing_data.type); + //PTS_IF_FREE_MEM(ad->printing_data); + PTS_DEBUG("calloc print files failed"); + PTS_TRACE_END; + return -1; + } + + int i = 0; + for (i = 0; i < ad->printing_data.num_of_files; i++) { + PTS_DEBUG("file path is %s", printing_data->request_files[i]); + if (NULL != printing_data->request_files[i]) { + ad->printing_data.request_files[i] = strdup(printing_data->request_files[i]); + } else { + ad->printing_data.request_files[i] = strdup(MOBILEPRINT_DEFAULTIMG); + } + PTS_DEBUG("file path is %s", ad->printing_data.request_files[i]); + } + ad->printing_data.input_file = strdup(ad->printing_data.request_files[0]); + PTS_DEBUG("ad->input_file: %s", ad->printing_data.input_file); + + PTS_DEBUG("count: %d", ad->printing_data.num_of_files); + PTS_DEBUG("current index: %d", ad->printing_data.current_index); + PTS_DEBUG("filetype: %s", ad->printing_data.type); + + /* init the print range(include all pages) */ + ad->printing_data.range.from = 1; + ad->printing_data.range.to = ad->printing_data.range.total_pages = ad->printing_data.num_of_files; + ad->printing_data.range.selected_files = NULL; + + PTS_TRACE_END; + return 0; +} + +/** + * This function let the app update printer label in the preview view + * @return void + * @param[in] ugd the pointer to the main data structure + */ +void pts_main_view_update_printer_label(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + char label_text[128] = {0,}; + char label_voice[128] = {0,}; + + if (ad->main_info.printer_label == NULL) { + ad->main_info.printer_label = elm_label_add(ad->main_info.printer_layout); + } + PTS_DEBUG("ad->list_info.active_printer is %p", ad->list_info.active_printer); + + if (ad->list_info.active_printer != NULL) { + char *printer_name = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_name); + snprintf(label_text, 128, "%s", printer_name); + snprintf(label_voice, 128, "%s", printer_name); + if (printer_name != NULL) { + free(printer_name); + printer_name = NULL; + } + } else { + snprintf(label_text, 128, "%s", _("IDS_COM_BODY_NO_DEVICES")); + snprintf(label_voice, 128, "%s", _("IDS_COM_BODY_NO_DEVICES")); + } + + elm_object_text_set(ad->main_info.printer_label, label_text); + elm_access_info_set(ad->main_info.printer_label, ELM_ACCESS_INFO, label_voice); + evas_object_size_hint_weight_set(ad->main_info.printer_label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(ad->main_info.printer_label, EVAS_HINT_FILL, EVAS_HINT_FILL); + + elm_object_part_content_set(ad->main_info.printer_layout, "printer_name", ad->main_info.printer_label); + + PTS_TRACE_END; +} + +/** + * This function let the app rotate the image by the given landscape + * @return void + * @param[in] ugd the pointer to the main data structure + * @param[in] landscape the landscape value + */ +void pts_main_view_rotate_image(pts_appdata_t *ad, + app_device_orientation_e orientation) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + generate_preview_images(ad, orientation); + g_pages_count = 0; + + PTS_TRACE_END; +} + +/** + * This function let the app create the main screen view + * @return Evas_Object + * @param[in] win the pointer to the main window + * @param[in] pt_files the pointer to the path of print files + */ +API Evas_Object *pts_create_main_view(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF((ad == NULL) || (ad->main_info.root_win == NULL), NULL, "Invalid argument"); + + Evas_Object *main_layout = NULL; + Evas_Object *back_btn = NULL; + Evas_Object *toolbar; + + ad->main_info.main_layout = pts_create_base_layout_with_conform(ad->main_info.root_win, "navi"); + if (NULL == ad->main_info.main_layout) { + //PTS_IF_FREE_MEM(ad); + PTS_DEBUG("create base layout failed"); + PTS_TRACE_END; + return NULL; + } + + ad->main_info.navi = elm_naviframe_add(ad->main_info.main_layout); + elm_object_part_content_set(ad->main_info.main_layout, "navigation_bar", ad->main_info.navi); + + /* add navigation frame toolbar */ + toolbar = elm_toolbar_add(ad->main_info.navi); + PTS_RETV_IF(NULL == toolbar, NULL, "Toolbar adding error"); + elm_object_style_set(toolbar, "default"); + elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND); + elm_toolbar_transverse_expanded_set(toolbar, EINA_TRUE); + elm_toolbar_select_mode_set(toolbar, ELM_OBJECT_SELECT_MODE_NONE); + + main_layout = __pts_main_view_create_content(ad); + + back_btn = pts_create_label_btn(ad->main_info.navi, _("IDS_COM_SK_BACK")); + elm_access_info_set(back_btn, ELM_ACCESS_INFO, _("IDS_COM_SK_BACK")); + elm_access_info_set(back_btn, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_PRINTING); + elm_object_style_set(back_btn, "naviframe/back_btn/default"); + + evas_object_smart_callback_add(back_btn, "clicked", __pts_main_view_btn_back_cb, ad); + evas_object_event_callback_add(ad->main_info.navi, EVAS_CALLBACK_DEL, __pts_main_view_navi_delete_cb, ad); + + ad->main_info.navi_it = elm_naviframe_item_push(ad->main_info.navi, _("IDS_PRT_SK_PRINT_PREVIEW"), back_btn, NULL, main_layout, NULL); + elm_naviframe_prev_btn_auto_pushed_set(ad->main_info.navi, EINA_FALSE); + elm_naviframe_item_pop_cb_set(ad->main_info.navi_it, __pts_main_view_btn_back_cb, ad); + ea_object_event_callback_add(ad->main_info.navi, EA_CALLBACK_BACK, ea_naviframe_back_cb, NULL); + ea_object_event_callback_add(ad->main_info.navi, EA_CALLBACK_MORE, ea_naviframe_more_cb, NULL); + + /* insert printing button */ + elm_toolbar_item_append(toolbar, NULL, _("IDS_SMPOS_SK3_PRINT"), __pts_main_view_btn_print_cb, ad); + elm_object_item_part_content_set(ad->main_info.navi_it, "toolbar", toolbar); + + /* we have only one item in toolbar, so we could set + accessibility on all toolbar */ + elm_access_info_set(toolbar, ELM_ACCESS_INFO, _("IDS_SMPOS_SK3_PRINT")); + elm_access_info_set(toolbar, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINT_CONTEXT); + + ad->main_info.more_btn = create_toolbar_more_btn(ad->main_info.navi, _more_btn_cb, ad->main_info.navi_it); + elm_object_item_part_content_set(ad->main_info.navi_it, "toolbar_more_btn", ad->main_info.more_btn); + evas_object_event_callback_add(main_layout, EVAS_CALLBACK_DEL, __pts_main_view_delete_cb, ad); + + int tmp_width = 0; + int tmp_height = 0; + + get_image_resolution(ad->printing_data.input_file, &tmp_width, &tmp_height); + ad->size_popup_info.custom_width = (double)tmp_width; + ad->size_popup_info.custom_height = (double)tmp_height; + ad->size_popup_info.custom_w_ratio = ad->size_popup_info.custom_width / ad->size_popup_info.custom_height; + PTS_DEBUG("Original image size : %lfx%lf(%lfx1)", ad->size_popup_info.custom_width, ad->size_popup_info.custom_height, ad->size_popup_info.custom_w_ratio); + // original image size (unit cm) calculated by 300dpi + ad->size_popup_info.custom_width = (ad->size_popup_info.custom_width / 300) * 2.54; + ad->size_popup_info.custom_height = (ad->size_popup_info.custom_height / 300) * 2.54; + ad->size_popup_info.custom_unit = 1; // cm unit + + PTS_TRACE_END; + return ad->main_info.main_layout; +} diff --git a/mobileprint/app/pts_print_search.c b/mobileprint/app/pts_print_search.c new file mode 100644 index 0000000..c1038ff --- /dev/null +++ b/mobileprint/app/pts_print_search.c @@ -0,0 +1,961 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "pt_api.h" + +#include "mobileprint.h" +#include "pts_common.h" +#include "pts_main_view.h" +#include "pts_setting_view.h" +#include "preview_content.h" +#include "preview_util.h" + +static char *WiFi_Type_String[] = { + "Wi-Fi", "Wi-Fi Direct" +}; + +typedef struct { + pt_printer_mgr_t *pt; + int radio_index; + Evas_Object *radio_group; +} radio_print_list_data_t; + +static Elm_Genlist_Item_Class list_itc; +static Elm_Genlist_Item_Class wifi_list_itc; + +static Evas_Object *printer_list_radio_main = NULL; + +void pt_post_print_search(pts_appdata_t *ad); +Evas_Object *pts_create_no_found_popup(Evas_Object *parent, void *refresh_cb, void *cancel_cb); + +static char *_pts_wifi_text_get(void *data, Evas_Object *obj, const char *part) +{ + int index = (int)data; + + if (!strcmp(part, "elm.text")) { + return strdup(WiFi_Type_String[index]); + } else { + return strdup("Unknown index"); + } +} + +static void _wifi_direct_ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ug == NULL, "ug is NULL"); + + Evas_Object *base, *win; + + base = ug_get_layout(ug); + if (!base) { + ug_destroy(ug); + return; + } + + win = ug_get_window(); + + evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, base); + + ug_disable_effect(ug); + evas_object_show(base); + PTS_TRACE_END; +} + +static void _wifi_direct_ug_result_cb(ui_gadget_h ug, service_h result, void *priv) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)priv; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + char *ip_addr = NULL; + int ret = -1; + + ret = service_get_extra_data(result, "ip_address", &ip_addr); + if (ret != SERVICE_ERROR_NONE) { + PTS_DEBUG("get extra data failed!, errno: %d", ret); + } + if (ip_addr) { + /* Check IP address of connected peer */ + // TODO - Add active printer set routine to CUPS using this address + PTS_DEBUG("IP address of WiFi Direct Printer : %s", ip_addr); + PTS_IF_FREE_MEM(ad->search_info.ip_address); + ad->search_info.ip_address = strdup(ip_addr); + PTS_RET_IF(ad->search_info.ip_address == NULL, "ad->search_info.ip_address is NULL"); + } else { + PTS_DEBUG("Not found ip_address"); + } + + PTS_TRACE_END; +} + +static void _wifi_direct_ug_destroy_cb(ui_gadget_h ug, void *priv) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)priv; + PTS_RET_IF(ug == NULL || ad == NULL, "Invalid argument"); + + if (ug) { + ug_destroy(ug); + } + pts_search_printer(ad); + + PTS_TRACE_END; +} + +static int pts_launch_wifi_qs(void) +{ + PTS_TRACE_BEGIN; + int tpid = 0; + int ret = 0; + + tpid = sysman_get_pid("wifi-qs"); + if (tpid > 0) { + PTS_DEBUG("wifi-qs existed !\n"); + ret = -1; + } else { + bundle *b = NULL; + b = bundle_create(); + if (b == NULL) { + ret = -1; + } else { + ret = syspopup_launch("wifi-qs", b); + if (ret < 0) { + PTS_DEBUG("syspopup is failed. [%d]\n", ret); + } + + bundle_free(b); + } + } + + PTS_TRACE_END; + return ret; +} + +void _wifi_qs_monitoring_cb(keynode_t *key, void *data) +{ + PTS_TRACE_BEGIN; + int wifi_qs_exit = -1; + int error_code = vconf_get_int(VCONFKEY_WIFI_QS_EXIT, &wifi_qs_exit); + + PTS_RET_IF(error_code == -1, "Error when check wifi qs exit status"); + + vconf_ignore_key_changed(VCONFKEY_WIFI_QS_EXIT, _wifi_qs_monitoring_cb); + + pts_appdata_t *ad = (pts_appdata_t *)data; + + pts_search_printer(ad); + PTS_TRACE_END; +} + +static void pts_launch_wifi_direct_ug(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + + int ret = 0; + struct ug_cbs cbs = {0, }; + service_h service = NULL; + + memset(&cbs, 0x00, sizeof(struct ug_cbs)); + cbs.layout_cb = _wifi_direct_ug_layout_cb; + cbs.result_cb = _wifi_direct_ug_result_cb; + cbs.destroy_cb = _wifi_direct_ug_destroy_cb; + cbs.priv = ad; + + service_create(&service); + ret = service_add_extra_data(service, "device_filter", "printer"); + if (ret != SERVICE_ERROR_NONE) { goto ERROR; } + ret= service_add_extra_data(service, "auto_exit", "on"); + if (ret != SERVICE_ERROR_NONE) { goto ERROR; } + ret = service_add_extra_data(service, "multi_connect", "off"); + if (ret != SERVICE_ERROR_NONE) { goto ERROR; } + ret= service_add_extra_data(service, "title_string", _("IDS_COM_OPT1_WI_FI_DIRECT")); + if (ret != SERVICE_ERROR_NONE) { goto ERROR; } + + ug_create(NULL, "setting-wifidirect-efl", UG_MODE_FULLVIEW, service, &cbs); + service_destroy(service); + + PTS_TRACE_END; + return ret; + +ERROR: + PTS_DEBUG("Failed to create wifi direct ug(%d)", ret); + service_destroy(service); + PTS_TRACE_END; + return ret; + +} + +static void _pts_wifi_list_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = pts_get_appdata(); + int index = 0; + int ret = -1; + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + + if (item == NULL) { + PTS_IF_DEL_OBJ(ad->select_info.wifi_type_popup); + return; + } + + index = (int)elm_object_item_data_get(item); + if (index == 0) { // Wi-Fi + ret = pts_launch_wifi_qs(); + if (ret > 0) { + // Currently ret value is procces id of wifi_qs. + PTS_DEBUG("Now register vocnf cb for VCONFKEY_WIFI_QS_EXIT"); + vconf_notify_key_changed(VCONFKEY_WIFI_QS_EXIT, _wifi_qs_monitoring_cb, ad); + } else { + PTS_DEBUG("Failed to launch wifi-qs(%d)",ret); + } + } else if (index == 1) { // Wi-Fi Direct + pts_launch_wifi_direct_ug(ad); + } else { + PTS_DEBUG("Unknown index"); + } + PTS_IF_DEL_OBJ(ad->select_info.wifi_type_popup); + + PTS_TRACE_END; +} + +static void _pts_refresh_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = pts_get_appdata(); + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(ad->list_info.no_found_popup); + PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup); + + pts_search_printer(ad); + + PTS_TRACE_END; +} + + +static void _pts_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = pts_get_appdata(); + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_IF_DEL_OBJ(obj); + PTS_IF_DEL_OBJ(ad->search_info.popup); + PTS_IF_DEL_OBJ(ad->list_info.no_found_popup); + PTS_IF_DEL_OBJ(ad->select_info.wifi_type_popup); + PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup); + + if (ad->search_info.print_search_mode == PTS_SEARCH_INITIAL) { + PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup); + PTS_IF_DEL_OBJ(obj); + pt_deinit(); + elm_exit(); + } else { + if (ad->list_info.active_printer == NULL) { + PTS_DEBUG("No active printer. So remove all option"); + elm_genlist_item_update(ad->setting_info.printer_item); + elm_object_item_del(ad->setting_info.header_separator_item); + elm_object_item_del(ad->setting_info.item_paper_size); + elm_object_item_del(ad->setting_info.item_paper_copies); + elm_object_item_del(ad->setting_info.item_page_range); + elm_object_item_del(ad->setting_info.item_paper_quality); + elm_object_item_del(ad->setting_info.item_paper_type); + elm_object_item_del(ad->setting_info.item_grayscale); + elm_object_item_del(ad->setting_info.footer_separator_item); + } + } + PTS_TRACE_END; +} + +static int pts_save_selected_printer(pts_appdata_t *ad, pt_printer_mgr_t *pt) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(pt == NULL, PT_ERR_INVALID_PARAM, "printer_info is NULL."); + + int ret = 0; + PTS_DEBUG("pt name is %s", pt->name); + PTS_DEBUG("pt address %x", pt); + + /* Check whether the printer is already activated or not. */ + if (NULL != ad->list_info.active_printer) { + if ((strcmp(ad->list_info.active_printer->name, pt->name) == 0) && + (strcmp(ad->list_info.active_printer->address, pt->address) == 0)) { + // if same printer, then nothing to do... + PTS_DEBUG("Same printer is selected. No update required. %x", pt); + return PT_ERR_NONE; + } + } + + ret = pt_set_active_printer(pt); + PTS_RETV_IF(ret != PT_ERR_NONE, PT_ERR_FAIL, "Can not set active printer."); + + ret = pt_set_default_printer(pt); + PTS_RETV_IF(ret != PT_ERR_NONE, PT_ERR_FAIL, "Can not set default printer."); + + if (NULL == ad->list_info.active_printer) { + ad->list_info.active_printer = (pt_printer_mgr_t *)malloc(sizeof(pt_printer_mgr_t)); + PTS_RETV_IF(ad->list_info.active_printer == NULL, PT_ERR_NO_MEMORY, "Can allocate memory"); + } + memset(ad->list_info.active_printer, 0, sizeof(pt_printer_mgr_t)); + memcpy(ad->list_info.active_printer, pt, sizeof(pt_printer_mgr_t)); + + ad->setting_info.paper_size = (Elm_Object_Item **)realloc(ad->setting_info.paper_size, pt_get_print_option_papersize_num() * sizeof(Elm_Object_Item *)); + memset(ad->setting_info.paper_size, 0, pt_get_print_option_papersize_num() * sizeof(Elm_Object_Item *)); + + return PT_ERR_NONE; +} + +static void _pts_printer_list_cancel_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + struct appdata *ad = pts_get_appdata(); + + PTS_IF_DEL_OBJ(data); + PTS_IF_DEL_OBJ(ad->list_info.no_found_popup); + PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup); + + if (ad->search_info.print_search_mode == PTS_SEARCH_INITIAL) { + PTS_TRACE_END; + pt_deinit(); + elm_exit(); + } else { + //Don't terminate mobileprint. Previous screen is setting view. + } + PTS_TRACE_END; +} + +static void _pts_printer_list_ok_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *)data; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + PTS_RET_IF(ad->list_info.select_printer == NULL, "No supported printer"); + PTS_IF_DEL_OBJ(printer_list_radio_main); + PTS_IF_DEL_OBJ(ad->list_info.printer_list_popup); + + pts_save_selected_printer(ad, ad->list_info.select_printer); + + if (ad->search_info.selection_done_cb != NULL) { + ad->search_info.selection_done_cb(ad->search_info.printer_search_user_data); + } + + PTS_TRACE_END; + return; +} + +/* +* select the printer from the searched printers list +*/ +static void __pts_search_print_list_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(data == NULL, "data is NULL"); + PTS_RET_IF(event_info == NULL, "event_info is NULL"); + pts_appdata_t *ad = (pts_appdata_t *)data; + Elm_Object_Item *item = event_info; + + pt_printer_mgr_t *pt = NULL; + radio_print_list_data_t *core = NULL; + + elm_genlist_item_selected_set(item, EINA_FALSE); + + core = (radio_print_list_data_t *)elm_object_item_data_get(item); + PTS_RET_IF(core == NULL, "core is NULL"); + pt = core->pt; + PTS_RET_IF(pt == NULL, "pt is NULL"); + + PTS_DEBUG("Selected printer information: index=[%d]", core->radio_index); + PTS_DEBUG("pt->name : %s", pt->name); + PTS_DEBUG("pt->address : %s", pt->address); + + ad->list_info.select_printer = pt; + elm_radio_value_set(core->radio_group, core->radio_index); + + // Now call real event trigger to update radio button when selected. + elm_genlist_item_update(item); + + PTS_TRACE_END; +} + +/* +* get the value of the label +*/ +static char *__pts_list_view_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + radio_print_list_data_t *core = (radio_print_list_data_t *) data; + pt_printer_mgr_t *item = core->pt; + PTS_RETV_IF(item == NULL, NULL, "item is NULL"); + + if (strcmp(part, "elm.text.1") == 0) { + if (item != NULL) { + char *printer_label = strdup(item->name); + pts_unstandardization(printer_label); + return printer_label; + } + } else if (strcmp(part, "elm.text.2") == 0) { + if (item != NULL) { + if (item->is_ppd_exist == FALSE) { + return strdup(_("IDS_COM_POP_UNSUPPORTED")); + } else { + return pts_parse_protocol(item->address); + } + } + } + + PTS_TRACE_END; + return NULL; +} + +/* +* set the icon of the obj +*/ +static Evas_Object *__pts_list_view_icon_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + + radio_print_list_data_t *core = (radio_print_list_data_t *) data; + pts_appdata_t *ad = pts_get_appdata(); + PTS_RETV_IF(core == NULL || ad == NULL, NULL, "Invalid argument"); + + pt_printer_mgr_t *pt = core->pt; + Evas_Object *radio = NULL; + + if (!strcmp(part, "elm.icon") || !strcmp(part, "elm.swallow.icon")) { + + radio = elm_radio_add(obj); + elm_radio_state_value_set(radio, core->radio_index); + elm_radio_group_add(radio, core->radio_group); + if (ad->list_info.active_printer != NULL) { + if (strcmp(ad->list_info.active_printer->name, pt->name) ==0 && + strcmp(ad->list_info.active_printer->address, pt->address) ==0) { + elm_radio_value_set(radio, core->radio_index); + ad->list_info.select_printer = pt; + + PTS_DEBUG("Printer[%d] name=[%s], address=[%s] -> Active", core->radio_index, pt->name, pt->address); + } else { + PTS_DEBUG("Printer[%d] name=[%s], address=[%s] -> x", core->radio_index, pt->name, pt->address); + } + } + + evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL); + + return radio; + } + + PTS_TRACE_END; + return NULL; +} + +/* +* popup when machine is unsupported +*/ +static Eina_Bool __pts_exit_cb(void *data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *) data; + PTS_RETV_IF(ad == NULL, ECORE_CALLBACK_CANCEL, "ad is NULL"); + + PTS_IF_FREE_MEM(ad); + elm_exit(); + + PTS_TRACE_END; + return ECORE_CALLBACK_CANCEL; +} + +/* +* popup error when searching printers failed +*/ +static Eina_Bool __pts_list_view_popup_error(void *data) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = (pts_appdata_t *) data; + PTS_RETV_IF(ad == NULL, ECORE_CALLBACK_CANCEL, "ad is NULL"); + + ad->search_info.is_process = 0;/*process is complete*/ + + PTS_IF_DEL_OBJ(ad->search_info.popup); + + PTS_DEBUG("search printer failed"); + pts_create_popup(ad->search_info.print_search_popup_parent, _("IDS_ASEML_POP_SEARCH_FAILED"), 1.0); + ecore_timer_add(1, (Ecore_Task_Cb)__pts_exit_cb, (void *)ad); + + PTS_IF_FREE_MEM(ad); + + PTS_TRACE_END; + return ECORE_CALLBACK_CANCEL; +} + +// pts_create_wifi_popup +Evas_Object *pts_create_wifi_type_selector_popup(Evas_Object *parent) +{ + PTS_TRACE_BEGIN; + Evas_Object *popup = elm_popup_add(parent); + elm_object_style_set(popup,"content_no_vhpad"); + elm_object_part_text_set(popup, "title,text", _("IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT")); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "content", "min_menustyle"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + /* accessability - screen reader support */ + + Evas_Object *eo = elm_layout_edje_get(popup); + const Evas_Object *po = edje_object_part_object_get(eo, "access.title");; + Evas_Object *ao = elm_access_object_get(po); + elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, _("IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT")); + + Evas_Object *cancel_button = elm_button_add(popup); + elm_object_style_set(cancel_button,"popup_button/default"); + elm_object_text_set(cancel_button, _("IDS_COM_SK_CANCEL")); + elm_access_info_set(cancel_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_CONNECT_WIFI); + elm_object_part_content_set(popup, "button1", cancel_button); + evas_object_smart_callback_add(cancel_button, "clicked", _pts_cancel_cb, NULL); + + wifi_list_itc.item_style = "1text"; + wifi_list_itc.func.text_get = _pts_wifi_text_get; + wifi_list_itc.func.content_get = NULL; + wifi_list_itc.func.state_get = NULL; + wifi_list_itc.func.del = NULL; + + Evas_Object *genlist = elm_genlist_add(popup); + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + int index = 0; + for (index = 0; index < 2; index++) { + elm_genlist_item_append(genlist, &wifi_list_itc, (void *) index, NULL, + ELM_GENLIST_ITEM_NONE, _pts_wifi_list_sel, NULL); + } + + Evas_Object *box = elm_box_add(popup); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + elm_box_pack_end(box, genlist); + elm_object_part_content_set(layout, "elm.swallow.content" , box); + + elm_object_content_set(popup, box); + evas_object_size_hint_min_set(box, 400 * elm_config_scale_get(), elm_genlist_items_count(genlist) * 112 * elm_config_scale_get()); + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_cancel_cb, NULL); + + elm_object_focus_set(popup, EINA_TRUE); + + evas_object_show(box); + evas_object_show(genlist); + evas_object_show(popup); + evas_object_show(parent); + + PTS_TRACE_END; + return popup; +} + +Evas_Object *pts_create_no_found_popup(Evas_Object *parent, void *refresh_cb, void *cancel_cb) +{ + PTS_TRACE_BEGIN; + + Evas_Object *popup = elm_popup_add(parent); + //elm_object_style_set(popup,"menustyle"); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_text_set(popup, _("IDS_PRT_BODY_NO_PRINTERS_AVAILABLE")); + + Evas_Object *cancel_button = elm_button_add(popup); + //elm_object_style_set(cancel_button,"popup_button/default"); + elm_object_text_set(cancel_button, _("IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button1", cancel_button); + evas_object_smart_callback_add(cancel_button, "clicked", cancel_cb, NULL); + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, cancel_cb, NULL); + + Evas_Object *refresh_button = elm_button_add(popup); + //elm_object_style_set(refresh_button,"popup_button/default"); + elm_object_text_set(refresh_button, _("IDS_COM_SK_REFRESH")); + elm_object_part_content_set(popup, "button2", refresh_button); + evas_object_smart_callback_add(refresh_button, "clicked", refresh_cb, NULL); + elm_object_focus_set(popup, EINA_TRUE); + + evas_object_show(popup); + evas_object_show(parent); + + PTS_TRACE_END; + return popup; +} + +/* +* create the content of the list view +*/ +Evas_Object *pts_create_content_printer_list(Evas_Object *parent, pts_appdata_t *ad, int *print_counter) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, NULL, "ad is NULL"); + + Evas_Object *genlist = NULL; + Elm_Object_Item *git; + genlist = elm_genlist_add(parent); + + // ToDo: Make sure that printer_list_radio_main always is NULL at here.. + //if (!printer_list_radio_main) { + printer_list_radio_main = elm_radio_add(genlist); + elm_radio_state_value_set(printer_list_radio_main, 0); + elm_radio_value_set(printer_list_radio_main, 1); + //} + + list_itc.item_style = "2text.1icon.4"; // Left Icon, Right Main/Sub Text + list_itc.func.text_get = __pts_list_view_label_get; + list_itc.func.content_get = __pts_list_view_icon_get; + list_itc.func.state_get = NULL; + list_itc.func.del = NULL; + + pt_printer_mgr_t *it = NULL; + Eina_List *cursor = NULL; + + // printer_list_radio_main is index zero. + // Thus radio index starts from 1. + int radio_index = 1; + radio_print_list_data_t *core = NULL; + + ad->list_info.select_printer = NULL; + + EINA_LIST_FOREACH(ad->list_info.printer_list, cursor, it) { + + if (ad->list_info.select_printer == NULL && it->is_ppd_exist == TRUE) { + // set the first printer as default one. + ad->list_info.select_printer = it; + } + PTS_DEBUG("printer %d\n", radio_index); + core = (radio_print_list_data_t *)malloc(sizeof(radio_print_list_data_t)); + core->radio_index = radio_index; + core->pt = it; + core->radio_group = printer_list_radio_main; + + git = elm_genlist_item_append( + genlist, + &list_itc, + (void *)core, + NULL, + ELM_GENLIST_ITEM_NONE, + __pts_search_print_list_sel, + ad); + + if (it->is_ppd_exist == FALSE) { + elm_object_item_disabled_set(git, EINA_TRUE); + } + radio_index ++; + } + + *print_counter = radio_index-1; + PTS_DEBUG("printer num = %d\n", *print_counter); + + evas_object_show(genlist); + PTS_TRACE_END; + return genlist; +} + +Evas_Object *pts_create_printer_list_popup(Evas_Object *parent, pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + +// XXX +// Currently min_menustyle does not support "2text.1icon.4" genlist. +// When min_menustyle supports it, change this. +// To avoid this limitation, applied box object. + Evas_Object *popup = elm_popup_add(parent); + elm_object_style_set(popup,"content_no_vhpad"); + elm_object_part_text_set(popup, "title,text", _("IDS_PRT_BODY_SELECT_PRINTER")); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_access_info_set(popup, ELM_ACCESS_CONTEXT_INFO, _("IDS_PRT_BODY_SELECT_PRINTER")); //FIXME: should be set to title, not popup itself + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "content", "min_menustyle"); + evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + /* accessability - screen reader support */ + Evas_Object *eo = elm_layout_edje_get(popup); + const Evas_Object *po = (Evas_Object *)edje_object_part_object_get(eo, "access.title"); + Evas_Object *ao = elm_access_object_get(po); + elm_access_info_set(ao, ELM_ACCESS_INFO, _("IDS_PRT_BODY_SELECT_PRINTER")); + elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINTERS_LIST_IS_BELOW); + + Evas_Object *cancel_button = elm_button_add(popup); + elm_object_style_set(cancel_button,"popup_button/default"); + elm_object_text_set(cancel_button, _("IDS_COM_SK_CANCEL")); + elm_access_info_set(cancel_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_PRINTING); + elm_object_part_content_set(popup, "button1", cancel_button); + evas_object_smart_callback_add(cancel_button, "clicked", _pts_printer_list_cancel_cb, popup); + + Evas_Object *refresh_button = elm_button_add(popup); + elm_object_style_set(refresh_button,"popup_button/default"); + elm_object_text_set(refresh_button, _("IDS_COM_SK_REFRESH")); + elm_access_info_set(refresh_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_REFRESH_SEARCHING_PRINTERS); + elm_object_part_content_set(popup, "button2", refresh_button); + evas_object_smart_callback_add(refresh_button, "clicked", _pts_refresh_cb, ad); + + Evas_Object *ok_button = elm_button_add(popup); + elm_object_style_set(ok_button,"popup_button/default"); + elm_object_text_set(ok_button, _("IDS_COM_SK_OK")); + elm_access_info_set(ok_button, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CONFIRM_SELECTED_PRINTER); + elm_object_part_content_set(popup, "button3", ok_button); + evas_object_smart_callback_add(ok_button, "clicked", _pts_printer_list_ok_cb, ad); + + int printer_num = 0; + Evas_Object *genlist = pts_create_content_printer_list(parent, ad, &printer_num); + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + Evas_Object *box = elm_box_add(popup); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + elm_box_pack_end(box, genlist); + + /* + * XXX - below 143 value is just for entry height of 2text.1icon.4 style in genlist + */ + + int rotate_angle = 0; + if (ad->win) { + rotate_angle = elm_win_rotation_get(ad->win); + PTS_DEBUG("rotate_angle: %d", rotate_angle); + } else { + PTS_DEBUG("No ld->ugd->root_win"); + } + + ad->list_info.printer_list_popup_portrait_height = MIN(PRINTER_LIST_POPUP_H, elm_genlist_items_count(genlist) * 143) * elm_config_scale_get(); + ad->list_info.printer_list_popup_landscape_height = MIN(PRINTER_LIST_POPUP_LN_H, elm_genlist_items_count(genlist) * 143) * elm_config_scale_get(); + + if (0 == rotate_angle || 180 == rotate_angle) + evas_object_size_hint_min_set(box, + PRINTER_LIST_POPUP_W * elm_config_scale_get(), + ad->list_info.printer_list_popup_portrait_height); + else + evas_object_size_hint_min_set(box, + PRINTER_LIST_POPUP_LN_W * elm_config_scale_get(), + ad->list_info.printer_list_popup_landscape_height); + + ad->list_info.printer_list_popup_box = box; + ad->list_info.printer_list_popup = popup; + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_printer_list_cancel_cb, NULL); + + elm_object_part_content_set(layout, "elm.swallow.content" , box); + elm_object_content_set(popup, box); + elm_object_focus_set(popup, EINA_TRUE); + + evas_object_show(genlist); + evas_object_show(box); + evas_object_show(popup); + evas_object_show(parent); + + PTS_TRACE_END; + return popup; +} + +void pts_search_printer_select(pts_appdata_t *ad) +{ +// if (ugd->print_search_mode == PTS_SEARCH_INITIAL) + pts_create_printer_list_popup(ad->search_info.print_search_popup_parent, ad); +// else +// pts_create_printer_list_view(ugd->print_search_popup_parent, ld); + + return; +} + +/* +* the response callback when search the printer +*/ +static void __pts_get_printer_cb(pt_response_data_t *cb) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(cb == NULL, "response data is NULL"); + + pts_appdata_t *ad = cb->userdata; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + ad->list_info.printer_list = cb->printerlist; + ad->search_info.is_process = 0; /*process is complete*/ + + /* destroy popup progress bar */ + PTS_IF_DEL_OBJ(ad->search_info.popup); + + /* + * Not found any printer + */ + if (NULL == ad->list_info.printer_list) { + /* + * destroy popup progress bar + */ + PTS_DEBUG("search printer failed"); + PTS_IF_FREE_MEM(ad->list_info.active_printer); + ad->list_info.no_found_popup = pts_create_no_found_popup(ad->search_info.print_search_popup_parent, + _pts_refresh_cb, + _pts_cancel_cb); + return; + } + + int pt_count = 0; + /* get printer list count */ + pt_count = eina_list_count(ad->list_info.printer_list); + PTS_DEBUG("Printer count is %d", pt_count); + + if (pt_count > 0) { + pts_search_printer_select(ad); + } else { + // No Printer found. + // Control can't be reach here... + } + PTS_TRACE_END; +} + +/** + * This function let the app create the print searching popup + * @return void + * @param[in] ld the pointer to the ug list structure + */ +Evas_Object *pts_create_print_search_popup(Evas_Object *parent) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(parent == NULL, NULL, "parent is NULL"); + + Evas_Object *popup = elm_popup_add(parent); + Evas_Object *layout = pts_create_base_layout(popup, "popup_search"); + Evas_Object *progressbar = elm_progressbar_add(popup); + elm_object_style_set(progressbar, "list_process"); + elm_progressbar_horizontal_set(progressbar, EINA_TRUE); + evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_progressbar_pulse(progressbar, EINA_TRUE); + elm_access_info_set(progressbar, ELM_ACCESS_INFO, _("IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING")); //FIXME Screen reader doesn't pronounce it + evas_object_show(progressbar); + + elm_object_part_content_set(layout, "elm.swallow.content", progressbar); + elm_object_part_text_set(layout, "elm.text", _("IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING")); + + /* accessability - screen reader support */ + const Evas_Object *po = edje_object_part_object_get(layout, "elm.swallow.content"); + Evas_Object *ao = elm_access_object_get(po); + elm_access_info_set(ao, ELM_ACCESS_INFO, _("IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING")); + + elm_object_content_set(popup, layout); + Evas_Object *btn = elm_button_add(popup); + elm_object_text_set(btn, _("IDS_COM_SK_CANCEL")); + elm_access_info_set(btn, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_CANCEL_SEARCHING_PRINTERS); + elm_object_part_content_set(popup, "button1", btn); + evas_object_smart_callback_add(btn, "clicked", _pts_cancel_cb, NULL); + ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _pts_cancel_cb, NULL); + elm_object_focus_set(popup, EINA_TRUE); + + evas_object_show(layout); + evas_object_show(popup); + evas_object_show(parent); + + PTS_TRACE_END; + return popup; +} + +static gboolean __is_wifi_direct_connected(int net_info) +{ + /** Connected with peer as GC */ + if ((net_info&PT_CONNECTION_WIFI_DIRECT)>0) { + return TRUE; + } + return FALSE; +} + +static gboolean __is_wifi_connected(int net_info) +{ + if ((net_info&PT_CONNECTION_WIFI)>0) { + return TRUE; + } + return FALSE; +} + +static gboolean __is_usb_host_connected(int net_info) +{ + if ((net_info&PT_CONNECTION_USB)>0) { + return TRUE; + } + return FALSE; +} + +static gboolean __is_connected(int net_info) +{ + if (net_info == 0) { + return FALSE; + } + return TRUE; +} + +static gboolean __is_valid_ip_address(const char *ip_address) +{ + PTS_RETV_IF(ip_address == NULL, FALSE, "ip_address is NULL"); + return FALSE; +} + +/* +* start to search printer +*/ +void pts_search_printer(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL, "ad is NULL"); + int ret = 0; + int net_type = 0; + ret = pt_get_connection_status(&net_type); + PTS_RET_IF(ret != PT_ERR_NONE, "Failed to get connection status(%d)", ret); + + if (__is_connected(net_type)) { + if (__is_wifi_direct_connected(net_type)) { + ad->search_info.popup = pts_create_print_search_popup(ad->search_info.print_search_popup_parent); + ad->search_info.is_process = 1; /* in process */ + PTS_IF_DEL_TIMER(ad->search_info.search_err_timer); + + ret = pt_get_printers(__pts_get_printer_cb, ad); + if (PT_ERR_NONE != ret) { + ad->search_info.search_err_timer = ecore_timer_add(1.0, (Ecore_Task_Cb)__pts_list_view_popup_error, (void *)ad); + } + } else if (__is_wifi_connected(net_type) || __is_usb_host_connected(net_type)) { + ad->search_info.popup = pts_create_print_search_popup(ad->search_info.print_search_popup_parent); + ad->search_info.is_process = 1; /* in process */ + PTS_IF_DEL_TIMER(ad->search_info.search_err_timer); + ret = pt_get_printers(__pts_get_printer_cb, ad); + if (PT_ERR_NONE != ret) { + ad->search_info.search_err_timer = ecore_timer_add(1.0, (Ecore_Task_Cb)__pts_list_view_popup_error, (void *)ad); + } + } else { + PTS_DEBUG("Undefined connection status"); + return; + } + } else { + ad->select_info.wifi_type_popup = pts_create_wifi_type_selector_popup(ad->search_info.print_search_popup_parent); + return; + } + PTS_TRACE_END; +} diff --git a/mobileprint/app/pts_setting_view.c b/mobileprint/app/pts_setting_view.c new file mode 100644 index 0000000..b8a2ca5 --- /dev/null +++ b/mobileprint/app/pts_setting_view.c @@ -0,0 +1,1209 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#define _GNU_SOURCE +#include +#include +#include +#include "pt_api.h" +#include "mobileprint.h" +#include "pts_common.h" +#include "pts_main_view.h" +#include "pts_setting_view.h" + +static Elm_Genlist_Item_Class itc_normal_options; +static Elm_Genlist_Item_Class itc_tree_options; +static Elm_Genlist_Item_Class itc_printer; +static Elm_Genlist_Item_Class itc_separator; + +static Elm_Genlist_Item_Class itc_paper_size; +static Elm_Genlist_Item_Class itc_paper_quality; +static Elm_Genlist_Item_Class itc_paper_type; +static Elm_Genlist_Item_Class itc_grayscale; +static Elm_Genlist_Item_Class itc_page_range; +static Elm_Genlist_Item_Class itc_duplex; + +static Evas_Coord touch_x; +static Evas_Coord touch_y; +static Evas_Object *copies_popup = NULL; + +static void __pts_setting_view_leave_view(pts_appdata_t *ad) +{ + PTS_IF_DEL_OBJ(ad->setting_info.radio_group_paper_size); + PTS_IF_DEL_OBJ(ad->setting_info.radio_group_paper_quality); + PTS_IF_DEL_OBJ(ad->setting_info.radio_group_paper_type); + PTS_IF_DEL_OBJ(ad->setting_info.radio_group_page_range); + PTS_IF_DEL_OBJ(ad->setting_info.radio_group_grayscale); + PTS_IF_DEL_OBJ(ad->setting_info.radio_group_duplex); + elm_naviframe_item_pop_to(ad->main_info.navi_it); +} + +/* +* the response callback when click back button +*/ +static Eina_Bool __pts_setting_view_btn_back_cb(void *data, Elm_Object_Item *it) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + + PTS_RETV_IF(ad == NULL, EINA_TRUE, "ad is NULL"); + + __pts_setting_view_leave_view(ad); + + if (ad->list_info.active_printer == NULL) { + PTS_DEBUG("No active printer. So just exit mobileprint"); + pt_deinit(); + elm_exit(); + PTS_TRACE_END; + return EINA_TRUE; + } + + pts_main_view_update_printer_label(ad); + pts_main_view_rotate_image(ad, app_get_device_orientation()); + PTS_TRACE_END; + return EINA_TRUE; +} + +static void _dismissed_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_IF_DEL_OBJ(copies_popup); +} + +static void _copies_picker_cb(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + int copies = 1; + pts_appdata_t *ad = (pts_appdata_t *)data; + Elm_Object_Item *item = event_info; + + const char *label = elm_object_item_text_get(item); + + PTS_RET_IF(label == NULL, "label is NULL"); + + copies = atoi(label); + if (copies == ad->list_info.active_printer->copies) { + PTS_DEBUG("Not changed\n"); + PTS_TRACE_END; + return; + } else { + PTS_DEBUG("text(%s) is clicked!\n", label); + ad->list_info.active_printer->copies = copies; + elm_genlist_item_selected_set(ad->setting_info.item_paper_copies, EINA_FALSE); + elm_genlist_item_update(ad->setting_info.item_paper_copies); + + PTS_IF_DEL_OBJ(copies_popup); + } + PTS_TRACE_END; +} + +static void _move_copies_popup(Evas_Object *copies_popup, Evas_Object *win) +{ + Evas_Coord w, h; + Evas_Coord x, y; + + evas_object_geometry_get(win, &x, &y, &w, &h); + evas_object_move(copies_popup, x+(w*0.06), touch_y); +} + +static void __on_show(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + PTS_DEBUG("copies popup show\n"); +} + +static void __on_hide(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + PTS_DEBUG("copies popup hide\n"); +} + +/** + * Copies picker create + */ +static void _create_copies_popup_timepicker(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + int idx; + Evas_Object *diskselector; + Evas_Coord w; + char buffer[4]; + char current_selection[4]; + + pts_appdata_t *ad = (pts_appdata_t *)data; + elm_genlist_item_selected_set(ad->setting_info.item_paper_copies, EINA_TRUE); + + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + if (event_info) { + elm_genlist_item_selected_set(event_info, EINA_FALSE); + } + + PTS_IF_DEL_OBJ(copies_popup); + + evas_object_geometry_get(ad->main_info.root_win, NULL, NULL, &w, NULL); + copies_popup = elm_ctxpopup_add(ad->main_info.navi); + //elm_object_style_set(copies_popup, "timepicker"); + elm_object_style_set(copies_popup, "datetime/default"); + evas_object_size_hint_min_set(copies_popup, w, -1); + evas_object_size_hint_weight_set(copies_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_smart_callback_add(copies_popup, "dismissed", _dismissed_cb, copies_popup); + evas_object_event_callback_add(copies_popup, EVAS_CALLBACK_SHOW, __on_show, ad); + evas_object_event_callback_add(copies_popup, EVAS_CALLBACK_HIDE, __on_hide, ad); + + diskselector = elm_diskselector_add(ad->main_info.navi); + elm_diskselector_display_item_num_set(diskselector, 8); + //elm_object_style_set(diskselector, "timepicker"); + elm_object_style_set(diskselector, "datetime/default"); + + snprintf(current_selection, 4, "%d", ad->list_info.active_printer->copies); + + for (idx = 1; idx < COPIES_MAX+1; idx++) { + snprintf(buffer, 4, "%d", idx); + + if (strcmp(current_selection, buffer) == 0) { + item = elm_diskselector_item_append(diskselector, buffer, NULL, _copies_picker_cb, ad); + } else { + elm_diskselector_item_append(diskselector, buffer, NULL, _copies_picker_cb, ad); + } + } + + if (item != NULL) { + elm_diskselector_item_selected_set(item, EINA_TRUE); + } + + elm_diskselector_round_enabled_set(diskselector, EINA_TRUE); + evas_object_size_hint_weight_set(diskselector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(diskselector, EVAS_HINT_FILL, EVAS_HINT_FILL); + + evas_object_show(diskselector); + elm_object_content_set(copies_popup, diskselector); + + elm_ctxpopup_direction_priority_set(copies_popup, ELM_CTXPOPUP_DIRECTION_DOWN, + ELM_CTXPOPUP_DIRECTION_UP, + ELM_CTXPOPUP_DIRECTION_LEFT, + ELM_CTXPOPUP_DIRECTION_RIGHT); + + _move_copies_popup(copies_popup, ad->main_info.root_win); + evas_object_show(copies_popup); + + PTS_TRACE_END; +} + +/** +* Callback for expandable genlist selection +*/ +static void __pts_setting_view_gl_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + Eina_Bool expand_state = EINA_FALSE; + if (event_info) { + elm_genlist_item_selected_set(event_info, EINA_FALSE); + } + + expand_state = elm_genlist_item_expanded_get(item); + elm_genlist_item_expanded_set(item, !expand_state); + PTS_DEBUG("expanded : %d", expand_state); + + PTS_TRACE_END; +} + +void pts_setting_view_printer_select_done_cb(void *userdata) +{ + PTS_TRACE_BEGIN; + struct appdata *ad = pts_get_appdata(); + + Elm_Object_Item *item = (Elm_Object_Item *)userdata; + elm_genlist_item_update(item); + + if (ad->list_info.active_printer) { + pts_create_setting_view(ad); + } + + PTS_TRACE_END; + return; +} + +/** +* Callback for expandable genlist selection +*/ +static void __pts_setting_view_printer_sel(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + pts_appdata_t *ad = (pts_appdata_t *)data; + if (event_info) { + elm_genlist_item_selected_set(event_info, EINA_FALSE); + } + + if (ad->search_info.popup != NULL + || ad->list_info.no_found_popup != NULL + || ad->list_info.printer_list_popup != NULL) { + PTS_WARN("event was called duplicated, it is ignored"); + return; + } + + // Launch Print searching module + ad->search_info.print_search_mode = PTS_SEARCH_IN_SETTING; + ad->search_info.selection_done_cb = pts_setting_view_printer_select_done_cb; + ad->search_info.print_search_popup_parent = ad->main_info.navi; + ad->search_info.printer_search_user_data = (void *)event_info; + pts_search_printer(ad); + + PTS_TRACE_END; +} + +/** +* Callback for expandable genlist contract +*/ +static void __pts_setting_view_gl_con(void *data, Evas_Object *obj, void *event_info) +{ + Elm_Object_Item *item = event_info; + elm_genlist_item_subitems_clear(item); +} + +/* +* get the label of the printer information +*/ +static char *__pts_setting_view_printer_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + struct appdata *ad = pts_get_appdata(); + if (strcmp(part, "elm.text.1") == 0) { + //if (printer != NULL) { + //return strdup(printer->name); + PTS_TRACE_END; + return strdup(_("IDS_PRT_BODY_PRINTER")); + //} + } else if (strcmp(part, "elm.text.2") == 0) { + //if (printer != NULL) { + if (ad->list_info.active_printer != NULL) { + char *printer_label = strdup(ad->list_info.active_printer->name); + pts_unstandardization(printer_label); + //return strdup(printer->address); + PTS_TRACE_END; + return printer_label; + } else { + PTS_TRACE_END; + return strdup(PTS_18); + } + } + PTS_TRACE_END; + return NULL; +} + +/* +* get the label of the option setting +*/ +#define MAX_TMP_BUF 64 +static char *__pts_setting_view_option_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + struct appdata *ad = pts_get_appdata(); + pt_printer_mgr_t *active_printer = ad->list_info.active_printer; + pt_print_option_e option_type = (pt_print_option_e)data; + + char buf[MAX_TMP_BUF]; + + if (strcmp(part, "elm.text.1") == 0) { + switch (option_type) { + case PT_OPTION_ID_COPIES: + return strdup(_("IDS_PRT_BODY_NUMBEROFCOPIES")); + case PT_OPTION_ID_PAPERSIZE: + return strdup(_("IDS_PRT_BODY_PAPERSIZE")); + case PT_OPTION_ID_RANGE: + return strdup(_("IDS_PRT_BODY_PRINT_RANGE_ABB")); + case PT_OPTION_ID_GRAYSCALE: + return strdup(_("IDS_PRT_BODY_COLOUR")); + case PT_OPTION_ID_QUALITY: + return strdup(_("IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY")); + case PT_OPTION_ID_PAPER: + return strdup(_("IDS_IMGE_BUTTON_PAPER_M_STICKER")); + case PT_OPTION_ID_DUPLEX: + return strdup(IDS_PRINT_SETTINGS_DUPLEX); + default: + return strdup(PTS_17); + } + } else if (strcmp(part, "elm.text.2") == 0) { + + switch (option_type) { + case PT_OPTION_ID_COPIES: { + snprintf(buf, MAX_TMP_BUF, "%d", active_printer->copies); + PTS_DEBUG("Selected copies[%d, %s]",active_printer->copies, buf); + } + break; + case PT_OPTION_ID_PAPERSIZE: { + active_printer->size = pt_get_selected(PT_OPTION_ID_PAPERSIZE); + strncpy(buf, pt_get_print_option_papersize(active_printer->size), MAX_TMP_BUF-1); + PTS_DEBUG("Selected paper size[%d, %s]", active_printer->size, buf); + } + break; + case PT_OPTION_ID_RANGE: { + pt_range_e p_range = active_printer->range; + if (PT_RANGE_ALL == p_range) { + strcpy(buf, _("IDS_DIC_BODY_ALL")); + } else { + strcpy(buf, _("IDS_BR_BODY_CURRENT_PAGE")); + } + PTS_DEBUG("Selected range[%d, %s]", p_range, buf); + } + break; + case PT_OPTION_ID_GRAYSCALE: { + int p_grayscale = pt_get_selected(PT_OPTION_ID_GRAYSCALE); + + if (PT_GRAYSCALE_COLOUR == p_grayscale) { + strcpy(buf, _("IDS_PRT_BODY_COLOUR")); + } else if (PT_GRAYSCALE_GRAYSCALE == p_grayscale) { + strcpy(buf, _("IDS_IMGE_HEADER_GREY")); + } /* else if (PT_GRAYSCALE_BLACKNWHITE == *p_value) { +strcpy(buf, _("IDS_BR_OPT_BLACKNWHITE")); +} */ + + PTS_DEBUG("Selected color [%d, %s]", p_grayscale, buf); + } + break; + case PT_OPTION_ID_QUALITY: { + int p_quality = pt_get_selected(PT_OPTION_ID_QUALITY); + if (PT_QUALITY_DRAFT == p_quality) { + strcpy(buf, _("IDS_PRT_OPT_PRINTSETTINGS_DRAFT")); + } else if (PT_QUALITY_STANDARD == p_quality) { + strcpy(buf, _("IDS_PRT_OPT_PRINTSETTINGS_STANDARD")); + } else if (PT_QUALITY_HIGH == p_quality) { + strcpy(buf, _("IDS_COM_BODY_HIGH")); + } + PTS_DEBUG("Selected quality [%d, %s]", p_quality, buf); + } + break; + case PT_OPTION_ID_PAPER: { + int p_type = pt_get_selected(PT_OPTION_ID_PAPER); + if (PT_PAPER_NORMAL == p_type) { + strcpy(buf, _("IDS_ST_BODY_NORMAL")); + } else if (PT_PAPER_GLOSSY == p_type) { + strcpy(buf, _("IDS_ST_BODY_GLOSSY")); + } else if (PT_PAPER_PHOTO == p_type) { + strcpy(buf, _("IDS_PRT_BODY_PHOTOGRAPHIC_ABB")); + } + PTS_DEBUG("Selected paper type [%d, %s]", p_type, buf); + } + break; + case PT_OPTION_ID_DUPLEX: { + int p_dup = pt_get_selected(PT_OPTION_ID_DUPLEX); + if (PT_DUPLEX_OFF == p_dup) { + strcpy(buf, IDS_PRINT_SETTINGS_DUPLEX_OFF); + } else if (PT_DUPLEX_NO_TUMBLE == p_dup || PT_DUPLEX_TUMBLE == p_dup) { + strcpy(buf, IDS_PRINT_SETTINGS_DUPLEX_ON); + } + PTS_DEBUG("Selected duplex mode [%d, %s]", p_dup, buf); + } + break; + default: { + return strdup(PTS_17); + } + } + + return strdup(buf); + } + PTS_TRACE_END; + return NULL; +} + + + +static Evas_Object * +__pts_setting_view_gl_content_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + pts_appdata_t *ad = pts_get_appdata(); + Evas_Object *radio_button = NULL; + Item_data *core = (Item_data *)data; + int selected = 0; + + if (!strcmp(part, "elm.icon")) { + switch (core->option) { + case PT_OPTION_ID_PAPERSIZE: + selected = pt_get_selected(PT_OPTION_ID_PAPERSIZE); + break; + case PT_OPTION_ID_RANGE: + selected = ad->list_info.active_printer->range; + break; + case PT_OPTION_ID_QUALITY: + selected = pt_get_selected(PT_OPTION_ID_QUALITY); + break; + case PT_OPTION_ID_PAPER: + selected = pt_get_selected(PT_OPTION_ID_PAPER); + break; + case PT_OPTION_ID_GRAYSCALE: + selected = pt_get_selected(PT_OPTION_ID_GRAYSCALE); + break; + case PT_OPTION_ID_DUPLEX: + selected = pt_get_selected(PT_OPTION_ID_DUPLEX); + break; + /* case PT_OPTION_ID_COPIES: */ + default: + break; + } + + PTS_DEBUG("Create Radio button[%d] (%d,%d) , r_group= [0x%x] selected: %d", + core->radio_index, core->option, core->sub_item, core->radio_group, selected); + + radio_button = elm_radio_add(obj); + core->radio_btn = radio_button; + evas_object_propagate_events_set(radio_button, EINA_TRUE); + elm_radio_state_value_set(radio_button, core->radio_index); + elm_radio_group_add(radio_button, core->radio_group); + elm_radio_value_set(core->radio_group, selected); + evas_object_show(radio_button); + evas_object_size_hint_weight_set(radio_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(radio_button, EVAS_HINT_FILL, EVAS_HINT_FILL); + + PTS_TRACE_END; + return radio_button ; + } + + PTS_TRACE_END; + return NULL; +} + + +static void +__pts_setting_view_gl_state_item_delete(void *data, Evas_Object *obj) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(data == NULL, "data is NULL"); + Item_data *core = (Item_data *)data; + pts_appdata_t *ad = pts_get_appdata(); + PTS_RET_IF(ad == NULL, "ad is NULL"); + + switch (core->option) { + case PT_OPTION_ID_QUALITY: + ad->setting_info.quality[core->sub_item] = NULL; + break; + case PT_OPTION_ID_PAPER: + ad->setting_info.paper_type[core->sub_item] = NULL; + break; + case PT_OPTION_ID_GRAYSCALE: + ad->setting_info.color[core->sub_item] = NULL; + break; + case PT_OPTION_ID_PAPERSIZE: + ad->setting_info.paper_size[core->sub_item] = NULL; + break; + case PT_OPTION_ID_DUPLEX: + ad->setting_info.duplex[core->sub_item] = NULL; + break; + default: + break; + } + PTS_DEBUG("Free core memory"); + PTS_IF_FREE_MEM(core); + + return; +} + +/* +* get the papersize value of the key +*/ +static char *__pts_setting_view_papersize_key_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Item_data *core = (Item_data *)data; + pt_paper_size_e p_size = (pt_paper_size_e)core->sub_item; + + if (p_size < (pt_paper_size_e)0 || p_size >= pt_get_print_option_papersize_num()) { + PTS_DEBUG("wrong paper size: %d", p_size); + return NULL; + } + PTS_TRACE_END; + return strdup(pt_get_print_option_papersize(p_size)); +} + +/* +* get the grayscale value of the key +*/ +static char *__pts_setting_view_grayscale_key_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Item_data *core = (Item_data *)data; + pt_grayscale_e p_grayscale = (pt_grayscale_e)core->sub_item; + char *ret = NULL; + + //PTS_RETV_IF(p_grayscale < 0 ||p_grayscale >= PT_GRAYSCALE_ANY, NULL, "wrong gray scale: %d", p_grayscale); + + if (strcmp(part, "elm.text") == 0) { + switch (p_grayscale) { + case PT_GRAYSCALE_COLOUR: + ret = strdup(_("IDS_PRT_BODY_COLOUR")); + break; + case PT_GRAYSCALE_GRAYSCALE: + ret = strdup(_("IDS_IMGE_HEADER_GREY")); + break; + default: + ret = NULL; + } + } + PTS_TRACE_END; + return ret; +} + +/* +* get the quality value of the key +*/ +static char *__pts_setting_view_quality_key_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Item_data *core = (Item_data *)data; + pt_quality_e p_quality = (pt_quality_e)core->sub_item; + char *ret = NULL; + + //PTS_RETV_IF(p_quality < 0 || p_quality >= PT_QUALITY_ANY, NULL, "wrong paper quality: %d", p_quality); + + if (strcmp(part, "elm.text") == 0) { + switch (p_quality) { + case 0: + ret = strdup(_("IDS_PRT_OPT_PRINTSETTINGS_DRAFT")); + break; + case 1: + ret = strdup(_("IDS_PRT_OPT_PRINTSETTINGS_STANDARD")); + break; + case 2: + ret = strdup(_("IDS_COM_BODY_HIGH")); + break; + default: + ret = NULL; + } + } + PTS_TRACE_END; + return ret; +} + +/** +* get the paper type value of the key +*/ +static char *__pts_setting_view_paper_key_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Item_data *core = (Item_data *)data; + pt_papertype_e p_type = (pt_papertype_e) core->sub_item; + char *ret = NULL; + + //PTS_RETV_IF(p_type < 0 || p_type >= PT_PAPER_ANY, NULL, "wrong paper type: %d", p_type); + + if (strcmp(part, "elm.text") == 0) { + switch (p_type) { + case 0: + ret = strdup(_("IDS_ST_BODY_NORMAL")); + break; + case 1: + ret = strdup(_("IDS_ST_BODY_GLOSSY")); + break; + case 2: + ret = strdup(_("IDS_PRT_BODY_PHOTOGRAPHIC_ABB")); + break; + default: + ret = NULL; + } + } + PTS_TRACE_END; + return ret; +} + +/* +* get the range label of the key +*/ +static char *__pts_setting_view_range_key_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Item_data *core = (Item_data *)data; + pt_range_e p_range = (pt_range_e)core->sub_item; + char *ret = NULL; + + //PTS_RETV_IF(p_range < PT_RANGE_ALL || p_range > PT_RANGE_CURRENT, NULL, "wrong paper range: %d", p_range); + + switch (p_range) { + case PT_RANGE_ALL: + ret = strdup(_("IDS_DIC_BODY_ALL")); + break; + case PT_RANGE_CURRENT: + ret = strdup(_("IDS_BR_BODY_CURRENT_PAGE")); + break; + default: + ret = NULL; + } + + PTS_TRACE_END; + return ret; +} + +/* +* get the duplex value of the key +*/ +static char *__pts_setting_view_duplex_key_label_get(void *data, Evas_Object *obj, const char *part) +{ + PTS_TRACE_BEGIN; + Item_data *core = (Item_data *)data; + pt_duplex_e p_duplex = (pt_duplex_e)core->sub_item; + char *ret = NULL; + + if (strcmp(part, "elm.text") == 0) { + switch (p_duplex) { + case PT_DUPLEX_OFF: + ret = strdup(IDS_PRINT_SETTINGS_DUPLEX_OFF); + break; + case PT_DUPLEX_NO_TUMBLE: + case PT_DUPLEX_TUMBLE: + ret = strdup(IDS_PRINT_SETTINGS_DUPLEX_ON); + break; + default: + ret = NULL; + } + } + PTS_TRACE_END; + return ret; +} + +static void __pts_setting_view_enable_disable(pts_appdata_t *ad) +{ + int i; + for (i=0; isetting_info.quality[i]) { + if (pt_is_enabled(PT_OPTION_ID_QUALITY, i)) { + elm_object_item_disabled_set(ad->setting_info.quality[i], EINA_FALSE); + } else { + elm_object_item_disabled_set(ad->setting_info.quality[i], EINA_TRUE); + } + } + } + for (i=0; isetting_info.paper_type[i]) { + if (pt_is_enabled(PT_OPTION_ID_PAPER, i)) { + elm_object_item_disabled_set(ad->setting_info.paper_type[i], EINA_FALSE); + } else { + elm_object_item_disabled_set(ad->setting_info.paper_type[i], EINA_TRUE); + } + } + } + for (i=0; isetting_info.color[i]) { + if (pt_is_enabled(PT_OPTION_ID_GRAYSCALE, i)) { + elm_object_item_disabled_set(ad->setting_info.color[i], EINA_FALSE); + } else { + elm_object_item_disabled_set(ad->setting_info.color[i], EINA_TRUE); + } + } + } + for (i=0; isetting_info.duplex[i]) { + if (pt_is_enabled(PT_OPTION_ID_DUPLEX, i)) { + elm_object_item_disabled_set(ad->setting_info.duplex[i], EINA_FALSE); + } else { + elm_object_item_disabled_set(ad->setting_info.duplex[i], EINA_TRUE); + } + } + } + for (i=0; isetting_info.paper_size[i]) { + if (pt_is_enabled(PT_OPTION_ID_PAPERSIZE, i)) { + elm_object_item_disabled_set(ad->setting_info.paper_size[i], EINA_FALSE); + } else { + elm_object_item_disabled_set(ad->setting_info.paper_size[i], EINA_TRUE); + } + } + } +} + +/** +* Select the option from list +*/ +static void __pts_setting_view_key_value_sel(void *user_data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + + Item_data *core = (Item_data *) user_data; + struct appdata *ad = pts_get_appdata(); + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + Elm_Object_Item *parent_item = NULL; + + elm_genlist_item_selected_set(item, EINA_FALSE); + + if (NULL != core && NULL != core->item) { + + switch (core->option) { + case PT_OPTION_ID_PAPERSIZE: + ad->list_info.active_printer->size = core->sub_item; + parent_item = ad->setting_info.item_paper_size; + pt_set_choice(PT_OPTION_ID_PAPERSIZE, core->sub_item); + PTS_DEBUG("Paper size select: %d", ad->list_info.active_printer->size); + break; + case PT_OPTION_ID_COPIES: + ad->list_info.active_printer->copies = core->sub_item; + parent_item = ad->setting_info.item_paper_copies; + PTS_DEBUG("Print copy select: %d", ad->list_info.active_printer->copies); + break; + case PT_OPTION_ID_RANGE: + ad->list_info.active_printer->range = core->sub_item; + parent_item = ad->setting_info.item_page_range; + PTS_DEBUG("Print range select: %d", ad->list_info.active_printer->range); + break; + case PT_OPTION_ID_QUALITY: + pt_set_choice(PT_OPTION_ID_QUALITY, core->sub_item); + parent_item = ad->setting_info.item_paper_quality; + PTS_DEBUG("Print quality select: %d", pt_get_selected(PT_OPTION_ID_QUALITY)); + break; + case PT_OPTION_ID_PAPER: + pt_set_choice(PT_OPTION_ID_PAPER, core->sub_item); + parent_item = ad->setting_info.item_paper_type; + PTS_DEBUG("Paper type select: %d", pt_get_selected(PT_OPTION_ID_PAPER)); + break; + case PT_OPTION_ID_GRAYSCALE: + pt_set_choice(PT_OPTION_ID_GRAYSCALE, core->sub_item); + parent_item = ad->setting_info.item_grayscale; + PTS_DEBUG("Print color select: %d", pt_get_selected(PT_OPTION_ID_GRAYSCALE)); + break; + case PT_OPTION_ID_DUPLEX: + pt_set_choice(PT_OPTION_ID_DUPLEX, core->sub_item); + parent_item = ad->setting_info.item_duplex; + PTS_DEBUG("Duplex select: %d", pt_get_selected(PT_OPTION_ID_DUPLEX)); + break; + default: + PTS_DEBUG("Unknown option: %d", core->option); + parent_item = NULL; + break; + } + + elm_radio_value_set(core->radio_group, core->radio_index); + __pts_setting_view_enable_disable(ad); + if(parent_item) { + elm_genlist_item_update(parent_item); + } + PTS_DEBUG("Update radio group: r_group=[0x%x <-- %d]", core->radio_group, core->radio_index); + + } else { + PTS_DEBUG("data or data->item are NULL"); + } + + PTS_TRACE_END; +} + +static Item_data *__pts_setting_view_add_genlist_item( + Evas_Object *genlist, + Elm_Object_Item *parent, + pt_print_option_e option, + int sub_item, + int *radio_btn_index, + Evas_Object *radio_group, + pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(genlist == NULL, NULL, "genlist is NULL"); + + Elm_Genlist_Item_Class *itc = NULL; + + if (PT_OPTION_ID_PAPERSIZE == option) { + itc_paper_size.item_style = "dialogue/1text.1icon/expandable2"; + itc_paper_size.func.text_get = __pts_setting_view_papersize_key_label_get; + itc_paper_size.func.content_get = __pts_setting_view_gl_content_get; + itc_paper_size.func.state_get = NULL; //__pts_setting_view_gl_state_get; + itc_paper_size.func.del = __pts_setting_view_gl_state_item_delete; + itc = &itc_paper_size; + } else if (PT_OPTION_ID_GRAYSCALE == option) { + itc_grayscale.item_style = "dialogue/1text.1icon/expandable2"; + itc_grayscale.func.text_get = __pts_setting_view_grayscale_key_label_get; + itc_grayscale.func.content_get = __pts_setting_view_gl_content_get; + itc_grayscale.func.state_get = NULL; //__pts_setting_view_gl_state_get; + itc_grayscale.func.del = __pts_setting_view_gl_state_item_delete; + itc = &itc_grayscale; + } else if (PT_OPTION_ID_QUALITY == option) { + itc_paper_quality.item_style = "dialogue/1text.1icon/expandable2"; + itc_paper_quality.func.text_get = __pts_setting_view_quality_key_label_get; + itc_paper_quality.func.content_get = __pts_setting_view_gl_content_get; + itc_paper_quality.func.state_get = NULL; //__pts_setting_view_gl_state_get; + itc_paper_quality.func.del = __pts_setting_view_gl_state_item_delete; + itc = &itc_paper_quality; + } else if (PT_OPTION_ID_PAPER == option) { + itc_paper_type.item_style = "dialogue/1text.1icon/expandable2"; + itc_paper_type.func.text_get = __pts_setting_view_paper_key_label_get; + itc_paper_type.func.content_get = __pts_setting_view_gl_content_get; + itc_paper_type.func.state_get = NULL; //__pts_setting_view_gl_state_get; + itc_paper_type.func.del = __pts_setting_view_gl_state_item_delete; + itc = &itc_paper_type; + } else if (PT_OPTION_ID_RANGE == option) { + itc_page_range.item_style = "dialogue/1text.1icon/expandable2"; + itc_page_range.func.text_get = __pts_setting_view_range_key_label_get; + itc_page_range.func.content_get = __pts_setting_view_gl_content_get; + itc_page_range.func.state_get = NULL; //__pts_setting_view_gl_state_get; + itc_page_range.func.del = __pts_setting_view_gl_state_item_delete; + itc = &itc_page_range; + } else if (PT_OPTION_ID_DUPLEX == option) { + itc_duplex.item_style = "dialogue/1text.1icon/expandable2"; + itc_duplex.func.text_get = __pts_setting_view_duplex_key_label_get; + itc_duplex.func.content_get = __pts_setting_view_gl_content_get; + itc_duplex.func.state_get = NULL; + itc_duplex.func.del = __pts_setting_view_gl_state_item_delete; + itc = &itc_duplex; + } else { + PTS_DEBUG("Unknown option: %d", option); + PTS_TRACE_END; + return NULL; + } + + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + Item_data *core = calloc(1, sizeof(Item_data)); + core->option = option; + core->sub_item = sub_item; + core->radio_index = *radio_btn_index; + core->radio_group = radio_group; + + core->item = elm_genlist_item_append( + genlist, + itc, + (void *)core, + parent, + ELM_GENLIST_ITEM_NONE, + __pts_setting_view_key_value_sel, + core); + + if (!pt_is_enabled(option, sub_item)) { + elm_object_item_disabled_set(core->item, EINA_TRUE); + } + + ++(*radio_btn_index); + + PTS_TRACE_END; + return core; +} + + +static Evas_Object *__pts_create_radio_group(Evas_Object *genlist) +{ + Evas_Object *radio = elm_radio_add(genlist); + elm_radio_state_value_set(radio, 0); + elm_radio_value_set(radio, 0); + + return radio; +} + +/** +* Callback for expandable genlist expand +*/ +static void __pts_setting_view_gl_exp(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(NULL == event_info, "item object is NULL"); + + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + Evas_Object *genlist = elm_object_item_widget_get(item); + pts_appdata_t *ad = (pts_appdata_t *)data; + int radio_index = 0; + int i = 0; + + elm_genlist_item_selected_set(item, EINA_FALSE); + + if (ad->setting_info.radio_group_paper_size == NULL) { + ad->setting_info.radio_group_paper_size = __pts_create_radio_group(genlist); + } + if (ad->setting_info.radio_group_paper_quality == NULL) { + ad->setting_info.radio_group_paper_quality = __pts_create_radio_group(genlist); + } + if (ad->setting_info.radio_group_paper_type == NULL) { + ad->setting_info.radio_group_paper_type = __pts_create_radio_group(genlist); + } + if (ad->setting_info.radio_group_page_range == NULL) { + ad->setting_info.radio_group_page_range = __pts_create_radio_group(genlist); + } + if (ad->setting_info.radio_group_grayscale == NULL) { + ad->setting_info.radio_group_grayscale = __pts_create_radio_group(genlist); + } + if (ad->setting_info.radio_group_duplex == NULL) { + ad->setting_info.radio_group_duplex = __pts_create_radio_group(genlist); + } + + if (item == ad->setting_info.item_paper_size) { + radio_index = 0; + Item_data *i_d; + for (i = 0; i < pt_get_print_option_papersize_num(); i++) { + i_d = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_PAPERSIZE, i, &radio_index, ad->setting_info.radio_group_paper_size, ad); + if (i_d != NULL) { + ad->setting_info.paper_size[i] = i_d->item; + } + } + } else if (item == ad->setting_info.item_paper_quality) { + radio_index = 0; + ad->setting_info.quality[PT_QUALITY_DRAFT] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_QUALITY, PT_QUALITY_DRAFT, &radio_index, ad->setting_info.radio_group_paper_quality, ad)->item; + ad->setting_info.quality[PT_QUALITY_STANDARD] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_QUALITY, PT_QUALITY_STANDARD, &radio_index, ad->setting_info.radio_group_paper_quality, ad)->item; + ad->setting_info.quality[PT_QUALITY_HIGH] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_QUALITY, PT_QUALITY_HIGH, &radio_index, ad->setting_info.radio_group_paper_quality, ad)->item; + } else if (item == ad->setting_info.item_paper_type) { + radio_index = 0; + ad->setting_info.paper_type[PT_PAPER_NORMAL] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_PAPER, PT_PAPER_NORMAL, &radio_index, ad->setting_info.radio_group_paper_type, ad)->item; + ad->setting_info.paper_type[PT_PAPER_GLOSSY] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_PAPER, PT_PAPER_GLOSSY, &radio_index, ad->setting_info.radio_group_paper_type, ad)->item; + ad->setting_info.paper_type[PT_PAPER_PHOTO] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_PAPER, PT_PAPER_PHOTO, &radio_index, ad->setting_info.radio_group_paper_type, ad)->item; + } else if (item == ad->setting_info.item_page_range) { + radio_index = 0; + __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_RANGE, PT_RANGE_ALL, &radio_index, ad->setting_info.radio_group_page_range, ad); + __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_RANGE, PT_RANGE_CURRENT, &radio_index, ad->setting_info.radio_group_page_range, ad); + } else if (item == ad->setting_info.item_grayscale) { + radio_index = 0; + ad->setting_info.color[PT_GRAYSCALE_GRAYSCALE] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_GRAYSCALE, PT_GRAYSCALE_GRAYSCALE, &radio_index, ad->setting_info.radio_group_grayscale, ad)->item; + ad->setting_info.color[PT_GRAYSCALE_COLOUR] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_GRAYSCALE, PT_GRAYSCALE_COLOUR, &radio_index, ad->setting_info.radio_group_grayscale, ad)->item; + } else if (item == ad->setting_info.item_duplex) { + radio_index = 0; + ad->setting_info.duplex[PT_DUPLEX_OFF] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_DUPLEX, PT_DUPLEX_OFF, &radio_index, ad->setting_info.radio_group_duplex, ad)->item; + ad->setting_info.duplex[PT_DUPLEX_NO_TUMBLE] = __pts_setting_view_add_genlist_item(genlist, item, PT_OPTION_ID_DUPLEX, PT_DUPLEX_NO_TUMBLE, &radio_index, ad->setting_info.radio_group_duplex, ad)->item; + } else { + PTS_DEBUG("Unknown item"); + } + + PTS_TRACE_END; +} + +/* + * Accessability info for items from list + */ +static void __pts_setting_view_gl_realized(void *data, Evas_Object *obj, void *event_info) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(NULL == event_info, "item object is NULL"); + PTS_RET_IF(NULL == data, "ad is NULL"); + + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + pts_appdata_t *ad = (pts_appdata_t *)data; + void *item_data = elm_object_item_data_get(item); + //PTS_RET_IF(NULL == item_data, "item data is NULL"); //FIXME: related to Jira issue # + + pt_print_option_e option = (pt_print_option_e)item_data; + PTS_RET_IF(option >= PT_OPTION_ID_MAX, "UNKNOWN OPTION REALIZED - %d", option); + + PTS_DEBUG("realized print option: [%d]\n", option); + + if (PT_OPTION_ID_PAPERSIZE == option + || PT_OPTION_ID_RANGE == option + || PT_OPTION_ID_QUALITY == option + || PT_OPTION_ID_PAPER == option + || PT_OPTION_ID_GRAYSCALE == option + || PT_OPTION_ID_DUPLEX == option) { + + Evas_Object *ao = elm_object_item_access_object_get(item); + PTS_RET_IF(NULL == ao, "Access object is NULL"); + elm_access_info_set(ao, ELM_ACCESS_TYPE, IDS_SCRREAD_EXPANDABLE_LIST_TYPE); + elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT); + PTS_DEBUG("Item #%d access context info: [%s]", option, IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT); + } else if (PT_OPTION_ID_COPIES == option) { + Evas_Object *ao = elm_object_item_access_object_get(item); + PTS_RET_IF(NULL == ao, "Access object is NULL"); + elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_SETTINS_ITEM_CONTEXT); + PTS_DEBUG("Item #%d access context info: [%s]", option, IDS_SCRREAD_SETTINS_ITEM_CONTEXT); + } else if (PT_OPTION_ID_PRINTER == option) { + Evas_Object *ao = elm_object_item_access_object_get(item); + PTS_RET_IF(NULL == ao, "Access object is NULL"); + elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, IDS_SCRREAD_PRINTER_ITEM_CONTEXT); + PTS_DEBUG("Item #printer access context info: [%s]", IDS_SCRREAD_PRINTER_ITEM_CONTEXT); + } + + PTS_TRACE_END; +} + +/* +* create the content of setting view +*/ +static Evas_Object *__pts_setting_view_create_content(Evas_Object *parent, pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(ad == NULL, NULL, "ad is NULL"); + PTS_RETV_IF(parent == NULL, NULL, "parent is NULL"); + + Evas_Object *genlist = NULL; + Elm_Object_Item *separator_item; + + //itc_separator.item_style = "dialogue/separator/21/with_line"; + itc_separator.item_style = "dialogue/separator"; + itc_separator.func.text_get = NULL; + itc_separator.func.content_get = NULL; + itc_separator.func.state_get = NULL; + itc_separator.func.del = NULL; + + itc_printer.item_style = "dialogue/2text"; + itc_printer.func.text_get = __pts_setting_view_printer_label_get; + itc_printer.func.content_get = NULL; + itc_printer.func.state_get = NULL; + itc_printer.func.del = NULL; + + //itc_tree_options.item_style = "dialogue/2text/expandable"; + itc_tree_options.item_style = "dialogue/2text.3/expandable"; + itc_tree_options.func.text_get = __pts_setting_view_option_label_get; + itc_tree_options.func.content_get = NULL; + itc_tree_options.func.state_get = NULL; + itc_tree_options.func.del = NULL; + + itc_normal_options.item_style = "dialogue/2text"; + itc_normal_options.func.text_get = __pts_setting_view_option_label_get; + itc_normal_options.func.content_get = NULL; + itc_normal_options.func.state_get = NULL; + itc_normal_options.func.del = NULL; + + genlist = elm_genlist_add(parent); + + elm_object_style_set(genlist, "dialogue"); + elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); + + separator_item= elm_genlist_item_append( + genlist, + &itc_separator, + NULL, + NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + + elm_genlist_item_select_mode_set(separator_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->setting_info.printer_item = elm_genlist_item_append( + genlist, + &itc_printer, + (void *)PT_OPTION_ID_PRINTER, + NULL, + ELM_GENLIST_ITEM_NONE, + __pts_setting_view_printer_sel, ad); + + ad->setting_info.header_separator_item = elm_genlist_item_append( + genlist, + &itc_separator, + NULL, + NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(ad->setting_info.header_separator_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + ad->setting_info.item_paper_size = elm_genlist_item_append( + genlist, + &itc_tree_options, + (void *)PT_OPTION_ID_PAPERSIZE, + NULL, + ELM_GENLIST_ITEM_TREE, + __pts_setting_view_gl_sel, + ad); + + ad->setting_info.item_paper_copies = elm_genlist_item_append( + genlist, + &itc_normal_options, + (void *)PT_OPTION_ID_COPIES, + NULL, + ELM_GENLIST_ITEM_NONE, + _create_copies_popup_timepicker, + ad); + + ad->setting_info.item_page_range = elm_genlist_item_append( + genlist, + &itc_tree_options, + (void *)PT_OPTION_ID_RANGE, + NULL, + ELM_GENLIST_ITEM_TREE, + __pts_setting_view_gl_sel, + ad); + + ad->setting_info.item_paper_quality = elm_genlist_item_append( + genlist, + &itc_tree_options, + (void *)PT_OPTION_ID_QUALITY, + NULL, + ELM_GENLIST_ITEM_TREE, + __pts_setting_view_gl_sel, + ad); + + ad->setting_info.item_paper_type = elm_genlist_item_append( + genlist, + &itc_tree_options, + (void *)PT_OPTION_ID_PAPER, + NULL, + ELM_GENLIST_ITEM_TREE, + __pts_setting_view_gl_sel, + ad); + + ad->setting_info.item_grayscale = elm_genlist_item_append( + genlist, + &itc_tree_options, + (void *)PT_OPTION_ID_GRAYSCALE, + NULL, + ELM_GENLIST_ITEM_TREE, + __pts_setting_view_gl_sel, + ad); + + ad->setting_info.item_duplex = elm_genlist_item_append( + genlist, + &itc_tree_options, + (void *)PT_OPTION_ID_DUPLEX, + NULL, + ELM_GENLIST_ITEM_TREE, + __pts_setting_view_gl_sel, + ad); + + // Footer space + ad->setting_info.footer_separator_item = elm_genlist_item_append( + genlist, + &itc_separator, + NULL, + NULL, + ELM_GENLIST_ITEM_NONE, + NULL, NULL); + elm_genlist_item_select_mode_set(ad->setting_info.footer_separator_item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); + + evas_object_smart_callback_add(genlist, "expanded", __pts_setting_view_gl_exp, ad); + evas_object_smart_callback_add(genlist, "contracted", __pts_setting_view_gl_con, ad); + + /* Accessability information callback */ + evas_object_smart_callback_add(genlist, "realized", __pts_setting_view_gl_realized, ad); + + /* Add touch coordinates handler */ + //Ecore_Event_Handler *event; + //event = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _mousedown_cb, NULL); + //evas_object_smart_callback_add(genlist, "clicked", _back_cb, event); + + PTS_TRACE_END; + return genlist; +} + +/** + * This function let the app create setting view + * @return void + * @param[in] sd the pointer to the printer setting structure + */ +void pts_create_setting_view(pts_appdata_t *ad) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(ad == NULL, "ad is NULL"); + + Evas_Object *back_btn = NULL; + //Evas_Object *layout = NULL; + Evas_Object *genlist = NULL; + Elm_Object_Item *navi_item = NULL; + + //layout = pts_utils_create_layout(ugd->navi); + //evas_object_show(layout); + + genlist = __pts_setting_view_create_content(ad->main_info.navi, ad); + //elm_object_content_set(layout, genlist); + evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL); + + back_btn = elm_button_add(ad->main_info.navi); + elm_object_style_set(back_btn, "naviframe/end_btn/default"); + + navi_item = elm_naviframe_item_push(ad->main_info.navi, _("IDS_SMPOS_HEADER_PRINTER_SETTINGS"), back_btn, NULL, genlist, NULL); + elm_naviframe_item_pop_cb_set(navi_item, __pts_setting_view_btn_back_cb, ad); + + PTS_TRACE_END; +} diff --git a/mobileprint/app/pts_util.c b/mobileprint/app/pts_util.c new file mode 100644 index 0000000..fcf1d59 --- /dev/null +++ b/mobileprint/app/pts_util.c @@ -0,0 +1,102 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include +#include +#include "pts_common.h" +#include "pts_debug.h" + +void pts_util_show_error_popup(Evas_Object *parent, const char *msg) +{ + PTS_RET_IF(parent == NULL, "parent is NULL"); + PTS_RET_IF(msg == NULL, "msg is NULL"); + + Evas_Object *error_popup = elm_popup_add(parent); + PTS_RET_IF(error_popup == NULL, "error_popup is NULL"); + evas_object_size_hint_weight_set(error_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_text_set(error_popup, msg); + evas_object_show(error_popup); + evas_object_show(parent); + return; +} + +Eina_Bool pts_util_supported_arch(void) +{ + struct utsname buf; + int ret = uname(&buf); + if (ret == -1) { + PTS_DEBUG("Failed to get uname"); + } else if (strstr(buf.machine,"arm") == NULL) { + PTS_DEBUG("No supported : %s", buf.machine); + return EINA_FALSE; + } else { + PTS_DEBUG("Supported : %s", buf.machine); + } + return EINA_TRUE; +} + +void pts_util_remove_tmp_files(const char *path) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(path == NULL, "path is NULL"); + char *cwd; + struct dirent *entry; + int ret = 1; + int iret = -1; + DIR *dir; + + cwd = get_current_dir_name(); + PTS_RET_IF(cwd == NULL, "cwd is NULL"); + + errno = 0; + ret = chdir(path); + if (ret == 0) { + dir = opendir(path); + if (dir == NULL) { + PTS_IF_FREE_MEM(cwd); + PTS_TRACE_END; + return; + } + while ((entry = readdir(dir)) != NULL) { + PTS_DEBUG("Remove %s", entry->d_name); + iret = remove(entry->d_name); + if (iret == -1) { + PTS_DEBUG("unable to remove %s",entry->d_name); + } + } + closedir(dir); + + iret = chdir(cwd); + if (iret == -1) { + PTS_DEBUG("unable to chdir"); + PTS_IF_FREE_MEM(cwd); + PTS_TRACE_END; + return; + } + rmdir(path); + } else { + if (errno == ENOENT) { + PTS_DEBUG("Not existed %s, just skip", path); + } + } + PTS_IF_FREE_MEM(cwd); + PTS_TRACE_END; + return; +} diff --git a/mobileprint/edc/genlist_custom.edc b/mobileprint/edc/genlist_custom.edc new file mode 100644 index 0000000..82d3025 --- /dev/null +++ b/mobileprint/edc/genlist_custom.edc @@ -0,0 +1,77 @@ +#define GENLIST_HEIGHT_73_INC 73 +//#define LAYOUT_GROUP_LIST_BG_COLOR_INC 248 246 239 255 // white theme +#define LAYOUT_GROUP_LIST_BG_COLOR_INC 0 0 0 255 // black theme +#define GENLIST_PART_DISCLIP_COLOR_INC 255 255 255 110 // alpha was 64 + +#define GENLIST_PART_DIALOGUE_BASE( param_item_height ) \ + part { name: "base"; \ + type: RECT; \ + clip_to: "disclip"; \ + repeat_events: 1; \ + scale: 1; \ + description { state: "default" 0.0; \ + min: 0 param_item_height; \ + color: LAYOUT_GROUP_LIST_BG_COLOR_INC; \ + } \ + } + +// When rotating, sometimes item size is expaned. +#define GENLIST_PART_DISCLIP \ + part { name: "disclip"; \ + type: RECT; \ + description { state: "default" 0.0; \ + } \ + description { state: "disabled" 0.0; \ + inherit: "default" 0.0; \ + color: GENLIST_PART_DISCLIP_COLOR_INC; \ + } \ + } + +collections { + group { name: "elm/genlist/item/custom/2icon/default"; + alias: "elm/genlist/item_odd/custom/2icon/default"; + data.item: "stacking" "above"; + data.item: "selectraise" "on"; + data.item: "contents" "elm.icon.1 elm.icon.2"; + + parts { + GENLIST_PART_DIALOGUE_BASE( GENLIST_HEIGHT_73_INC ) + part { name: "elm.icon.1"; + clip_to: "disclip"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.relative: 0.021 0.0; + rel2.relative: 0.492 1.0; + } + } + part { name: "elm.icon.2"; + clip_to: "disclip"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.relative: 0.51 0.0; + rel2.relative: 0.979 1.0; + } + } + GENLIST_PART_DISCLIP + } + programs { + // signal: elm,state,%s,active + // a "check" item named %s went active + // signal: elm,state,%s,passive + // a "check" item named %s went passive + // default is passive + program { name: "go_disabled"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "disclip"; + } + program { name: "go_enabled"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "disclip"; + } + } + } +} diff --git a/mobileprint/edc/mobileprint.edc b/mobileprint/edc/mobileprint.edc new file mode 100644 index 0000000..6afaaf7 --- /dev/null +++ b/mobileprint/edc/mobileprint.edc @@ -0,0 +1,478 @@ +collections +{ + group { + name: "navi"; + parts { + part { + name, "background"; + type, RECT; + description { + state: "default" 0.0; + color: 0 0 0 255; + #color: 255 255 255 255; + rel1 { relative: 0.0 0.0; offset: 0 0;} + rel2 { relative: 1.0 1.0; offset: 0 0;} + } + } + + part { + name, "navigation_bar"; + type: SWALLOW; + description { + state: "default" 0.0; + } + } + } + } + + group + { + name: "printer"; + parts + { + part { + name, "printer_name_bg"; + type: RECT; + description { + #color: 242 238 233 255; + color: 34 44 71 255; + rel1.to: "printer_name"; + rel2.to: "printer_name"; + } + } + part { + name, "printer_name"; + type: SWALLOW; + scale: 1; + description { + min: 0 60; + align: 0.0 0.0; + fixed: 0 1; + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 0.0; } + } + } + part { + name: "bg"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + ##color: 242 238 233 255; + #color: 255 255 255 255; + rel1 { relative: 0.0 1.0; to:"printer_name"; } + rel2 { relative: 1.0 1.0; } + } + } + part { + name: "image"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0;to:"bg";} + rel2 { relative: 1.0 1.0;to:"bg";} + } + } + part{ + name:"bar"; + type: SWALLOW; + scale:1; + description { + state: "default" 0.0; + align: 0.5 1.0; + min: 0 104; + fixed: 0 1; + rel1 { relative: 0.0 1.0;} + rel2 { relative: 1.0 1.0;} + } + } + } + } + group + { + name: "image_view"; + parts + { + part { + name: "bg"; + type: RECT; + description { + state: "default" 0.0; + ##color: 242 238 233 255; + #color: 255 255 255 255; + color: 0 0 0 255; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + } + } + part { + name: "content"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "bg";} + rel2 { relative: 1.0 0.95; to: "bg";} + } + description { + state: "multi" 0.1; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "bg";} + rel2 { relative: 1.0 1.0; to: "bg";} + } + } + part { + name: "process_animation"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "bg";} + rel2 { relative: 1.0 1.0; to: "bg";} + } + } + part { + name: "pagenumber"; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + max: -1 0; + text { + size: 30; + align: 0.5 0.5; + text_class: "tizen"; + } + color: 108 108 108 255; + align: 0.5 0.5; + rel1 { relative: 0.0 0.95; to: "bg";} + rel2 { relative: 1.0 1.0; to: "bg";} + } + description { + state: "multi" 0.1; + visible: 0; + max: -1 0; + text { + size: 30; + align: 0.5 0.5; + } + color: 108 108 108 255; + align: 0.5 0.5; + rel1 { relative: 0.0 0.0; to: "bg";} + rel2 { relative: 1.0 1.0; to: "bg";} + } + } + } + } + + group + { + name: "popup_search"; + parts + { + part + { + name:"elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + #min: 0 70; + align: 0.5 0.0; + fixed: 1 0; + rel1 { relative: 0.0 0.0;} + rel2 { relative: 1.0 0.6;} + } + } + part + { + name: "elm.text"; + type: TEXT; + scale: 1; + description { + state: "default" 0.0; + #min: 0 30; + text { + size: 30; + align: 0.5 0.5; + min: 0 0; + text_class: "tizen"; + } + color: 108 108 108 255; + align: 0.5 0.5; + rel1 {relative: 0.0 0.7;} + rel2 {relative: 1.0 1.0;} + } + } + } + } + + group + { + name: "popup_print"; + parts{ + part{ + name: "elm.title"; + type: TEXT; + scale : 1; + description { + state: "default" 0.0; + max: 400 30; + text { + size: 20; + min: 0 0; + align: 0.0 0.0; + } + color: 108 108 108 255; + align: 0.0 0.0; + rel1 { + relative: 0.0 0.0; + to: "elm.swallow.content"; + } + rel2 { + relative: 1.0 0.0; + to: "elm.swallow.content"; + } + } + } + + part{ name:"elm.swallow.content"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 0 70; + align: 0.5 0.5; + fixed: 1 0; + rel1 { + relative: 0.0 0.0; + } + rel2 { + relative: 1.0 1.0; + } + } + } + } + } + + group + { + name: "popup_progress"; + parts{ + part{ + name: "pad_t"; + type: RECT; + scale : 1; + mouse_events: 0; + repeat_events: 1; + description { + state: "default" 0.0; + align: 0.5 0.0; + min: 0 0; + fixed: 0 1; + rel1 {relative: 1.0 0.0; to_x: "pad_l";} + rel2 {relative: 0.0 0.0; to_x: "pad_r";} + } + } + part { + name: "pad_l"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min : 0 0; + fixed: 1 0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 0.0 1.0;} + align: 0.0 0.0; + } + } + part { + name: "pad_r"; + type: RECT; + scale: 1; + description { + state: "default" 0.0; + min : 0 0; + fixed: 1 0; + rel1 {relative: 1.0 0.0;} + rel2 {relative: 1.0 1.0;} + align: 1.0 0.0; + } + } + part{ + name:"elm.swallow.content"; + type: SWALLOW; + scale : 1; + description { + state: "default" 0.0; + min: 604 0; + align: 0.5 0.5; + fixed: 1 0; + rel1 {relative: 0.5 1.0; to: "pad_t";} + rel2 {relative: 0.5 0.0; to: "pad_b";} + } + } + part{ name:"elm.swallow.content.1"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 604 0; + align: 0.5 0.5; + fixed: 1 0; + rel1 {relative: 0.0 0.0; to: "elm.swallow.content";} + rel2 {relative: 1.0 0.3; to: "elm.swallow.content";} + } + } + part{ + name:"elm.swallow.content.2"; + type: SWALLOW; + scale : 1; + description { + state: "default" 0.0; + min: 604 0; + align: 0.5 0.5; + fixed: 1 0; + rel1 {relative: 0.0 1.0; to: "elm.swallow.content.1";} + rel2 {relative: 1.0 2.0; to: "elm.swallow.content.1";} + } + } + part{ + name:"elm.swallow.content.3"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 604 0; + align: 0.5 0.5; + fixed: 1 0; + rel1 { + relative: 0.0 1.0; + to: "elm.swallow.content.2"; + } + rel2 { + relative: 1.0 2.0; + to: "elm.swallow.content.2"; + } + } + } + part { + name: "pad_b"; + type: RECT; + scale : 1; + mouse_events: 0; + repeat_events: 1; + description { + state: "default" 0.0; + align: 0.5 1.0; + min: 0 54; + fixed: 0 1; + rel1 { + relative: 1.0 0.0; + to_x: "pad_l"; + to_y: "pad_bm"; + } + rel2 { + relative: 0.0 0.0; + to_x: "pad_r"; + to_y: "pad_bm"; + } + } + } + part { + name: "elm.swallow.end"; + type: SWALLOW; + scale : 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + align: 0.5 0.5; + min: 604 54; + fixed: 1 1; + rel1 { + relative: 0.0 0.0; + to: "pad_b"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_b"; + } + } + } + part { + name: "pad_bm"; + type: RECT; + scale : 1; + mouse_events: 0; + repeat_events: 1; + description { + state: "default" 0.0; + align: 0.5 1.0; + min: 604 54; + fixed: 1 1; + rel1 { + relative: 0.0 1.0; + to: "pad_l"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_r"; + } + } + } + part { + name: "elm.text.subtext1"; + type: TEXT; + scale : 1; + description { + state: "default" 0.0; + text { + font: "Tizen:style=Medium"; + size: 36; + min: 0 0; + align: 0.0 0.5; + text_class: "tizen"; + } + color: 128 128 128 255; + align: 0.0 0.5; + rel1 { + relative: 0.0 0.0; + to: "pad_bm"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_bm"; + } + } + } + part { name: "elm.text.subtext2"; + type: TEXT; + scale : 1; + description { + state: "default" 0.0; + text { + font: "Tizen:style=Medium"; + size: 36; + min: 0 0; + align: 1.0 0.5; + text_class: "tizen"; + } + color: 128 128 128 255; + align: 1.0 0.5; + rel1 { + relative: 0.0 0.0; + to: "pad_bm"; + } + rel2 { + relative: 1.0 1.0; + to: "pad_bm"; + } + } + } + } + } +} diff --git a/mobileprint/images/A01_print_popup_icon_Rotate.png b/mobileprint/images/A01_print_popup_icon_Rotate.png new file mode 100644 index 0000000000000000000000000000000000000000..2c350ac45c20b07e9b9c9620cfe5e59688b33187 GIT binary patch literal 1775 zcmaJ?Yfuws6x}2OF+k*Du133-@U!0;GITeK|63K5bG$wC664Tw&7 z+O$}tm5NZ&s!%E&wTK$QS{N)t866!hGuSeYU@bV-%2bqY5U@W=cV=h5`^`D$o_oK$ zyH&E}EzT5g3IG7kQi(7XfAVZM*&YB0V;a5$541sZ$K*+gTm`D8!!``vsMg|a0EmeG&i9goUSO%S8$ZH_&6}e$i)TJ2nK^jb%93DHOA5wbh-H2w#}e{ z3lJWyH*BV(x?Bd6!{IO>7K6nK#}VQB5)B3$!!`P# zB?Td(SLjq)OoeJdn=!us?QEy74e^k|Vzfgjw?AX_ReSD-^+4ArHhXu(n!WqBxu>hn-7C`gN> zGr>%iMu{5q3;3iYu2iGPV2uKi3S()w0$rt2a#_p-j!+y0ZDwy~GMOS4N5m3~qgng} zwtyeakK!+Jg{Y!PjcBkXuJR3+xgys#3TiE$S%~OV#fVa@L)G9y$z0WnULr*+>Me4W zD|(3(ugGQKW*D}E{ntS+ZQ;{nTP}|+9xM+&qQR$KhmW<_BR32FwkV`Re!B5)&fNTb zJSomvDY^le@Ar5sRhph!xd+(8#eU%|qRNs-= zR}U@xQ;tsX)td0b7WLS+(~$L(v$9VqVc)xutW%-&ViVB1n+pyB6A3Nlsf@WT$)pKm zxoe}xEB7wf=J|jxZ&+#^!aTQ^#dTsc0be}Tn&(dhJ3)Qr`&WIWh^(Zqu8OmVsD~Zp zW@+av{uxQh@^>-@kI=}28}CZPMJN4;wd}4y@uZ+7qjdf#X5|4M<7qV=v-x13Y+}m2 zv5d&9Z%1fZK-~ccNlx9hhW4BG)eR4bcE*~)do zA?S9D7OLVAwpH})_mfBhsFl7S^IEFv>b=Og!26GT0&4D<8c5ZD>VR`X1EJ$k;!_tF z;cq^p?|7KpV6fq_WN0`vuB+U?IqmZd@pNGW0hDb^X!`bOmIGNf*i98gQN(_@ogU6O zP%nO9dR}{Sl6*a|$$p(|u+#eU@MH@H@Jz)W5AFG$=D+$0T4Euoi6_>Qiij}r(W-jW zCN@C>`dG;YEjN8F5q6a04Sm~nAJSHTbKCHIM}FDrbytXFfH+fQa<4CIpLuaDuD8qQ+6XVp(L2Cu8(U_SFoxMC&uM z-MvunQ^c&dhc30RF=hmtwhAYvf4`MH_N@Ezou1=I3oACtN8*&Aar)xGg`Bh#qMla6 zpgir;fXMw(qu3I3)%Di6^wut_yuWqedPkL~dOe@=B1Tm*oPT=9y)Ez>mPbRc6R&%O zh`bvk$b{ElIrQ>r^^Fbwd&IvU1G3NTUaw0oeb&@=fD^Qj5E|eJ96I;FE%te9^4Wfu zzX^DOCIAG;JpFfmKl~U)8c~|NUhTDbYJAJ*j$AwcH4*ykax}#>{6S4fkWY?dB68+& i8&&TPWcvt#uv$jU-a6Nm``z!^enC=EvamBDyW$_@n}tUJ literal 0 HcmV?d00001 diff --git a/mobileprint/images/A01_print_popup_icon_Rotate02.png b/mobileprint/images/A01_print_popup_icon_Rotate02.png new file mode 100644 index 0000000000000000000000000000000000000000..6d6d3b876bb35562f4d2947bafe2164ae781fbaf GIT binary patch literal 1765 zcmaJ?Yfuwc6y8lB0`drj;sYUT0HIWp-H-s;k`l-QiBlL12r0EnNEV5Z?6O%(WT-A^ z6~PCh)1p?PsI4Q4LtDnzV6ozZs+HPmkro?@C{CWuzJ$JtEJKs6? z+}X8hsmUI0Gu;3H@X)9+E&EkEUKbt!fW4M@H5<&J6LoYtkw=&4DIAD561g~}G3%G$ zT3l~jR@8~d0svQN%Fxlely^`AVHW8f7?I6PvTOi|jkA$@Ljg`hx%d*3MIpR<>>D9u zGAe{wvJ^OlRN?t1bt#3Xm!@VIN(&5fqcHAmDAtCu0%n}nLpF1v#fsV#!ZBTxT|2hL zLTC&^7bt`;OzBe6AQeI3kW2(e7~m)bijs;DDJ+-D=Ry(~fyIbK3`a*GFe-~iVFY^l z2-$3uF%Q*ZNiTD;kwTbH(GVp<_&oxUi+OisvJtS{TdHcV{OlVU^!J4zY{rlkBo)NGzW zTWKx+%I|*)TQioCxLAu@iDJsY9$a3KBNd6NC|pkyR0cs5j(0IFpP&hAK0!jNbeRZ& zvP>2uQDPm#r=*}7i|{G$)%AokrD(+l*GuQqOioo7zq|7 zSE&$qoQn~LVl!@`$GOH=T-l^t$0(RdHZz7(rVnsq5=EGyv64~Kb>L|C-)LL zDOb#z5jzg{Uk5$D#ZHf7IWe|uFfsVJg`IYa9c%uXU7qZ1c~^tQXV`jjM@C2ExNo<2 zC;_{6NKn=1HnYaLobj&eJXB$GUYCCjdmI_01dv*P&*6J-z`*Y-;oCWx&@U$|uLmZT z9dDqNNN#l)A8>&x`jjm`U4?BMF9O$t9|)4~&&M`u=kVOXsoqN;^;ZSudXT{(M^Nah z+mANJm#gLhAa;mWzRtb2xj-2w?Q;Q&z$1Df{UNxN9~3ohB(!FWf4Po7vrT91Ur`pq z^_zxVQuv+ye(K=XPVg!~eQS?v)=jV5eZC^(w=>*(31P!vUog*|E4?#R4>L_)#Jt6I z;-BKV+k)Mrrrb#mce>(}h3C%UP$Z`uvkE?0w9wR0t`@AUeaZvhnllge72m~^jh+Uy;3+PKv@`Qfsl)aH@WI?*W^@R zz^N~pRis~PU48rRufOh~s+*Ub8xn;I)N)qPj#I}}*`9Dw}V^?975rSk%Y>N|SqQDtkD zSHt?%KePo)rw=xE3vPA`c3fh>j00RGqH)x?1>|PW_&bynTBG$H4UPP$pW~KxUR~H! z*JA>R>e86Rq#1Uug`3LQ1_1 z!sz{L!@I*5_%6OL!0Y!OejI*UrC5>KzNdI<>cGPV=~NgL{Hg4g$5AhPSW~qy=U|by zU!t<`_Eju0$iDj#c>g^A0(^IIj(+D;rSja!Jx%_Bp{m)ElY#t^m^-t^th;~-?SNYj zt(WcC{@5wU+S0Q3RAoTR@~m_p`#zujDh+7KigA8c95*de>HP8M`(~|o1*eAEJw~#Q U>&{h$D;+-`O=2q6oRCxT4}yMuzyJUM literal 0 HcmV?d00001 diff --git a/mobileprint/images/A01_print_popup_icon_print.png b/mobileprint/images/A01_print_popup_icon_print.png new file mode 100644 index 0000000000000000000000000000000000000000..f07f36e5b8dcc9383d20261f8c0f83beba7473b3 GIT binary patch literal 1561 zcmaJ>e@q)?82;Kq`FUO0=GHMB=dr<xEv(fQx_*8;se+A9?P zu{Z^aU?6O22xARPU?xL{Tc+Z4HK6+ue=wa3lBo+iMPp)^gfO!VuZ%MP5HGp!zW2-X zJn#Fx?~@CdOAkQt$?*UH$Y{`8_^&qn#)<(Dd`}k|_+T4XT*;L)cCLwZQ=rhs)KIX| zMINIp6lrU2xK8B(AVQoKm0YFiAYo-(3NnmQ_*^W{1|YA%$CB1Mii2yYV@_Iw{Q2P( z1a{gq$dPOlW@2@e!)a)7Q{^qC71owItJ;PXPsj$*lTB}QcD5||QR zeGopI+h!*$`jXXLe564f9LEwU+SJsfXv$JB?qjG@tyZHLj^enSN60&mkgO8AJA zwlPhf6}-tr7-0Ov3gw;%|*DjC*0z7xnV1~SU$6!ayuI-TZx--!7EoLoa@(8w65MN*S3Bwx^=lI zUkn-^?7s#bIpW^ABPD||CG50{qaXRvZ6U+%cJuGTL?G2}9uakl zdhKI=`L5f2mh^`iIo0!@3Ujtj(sl4 z#s@o8J=*7EcHd2Q1-%yrdVjd5EeJdql%;69lZ2ghKi(X#z9r!0?@Qoed`8MDvwU^~Jo;B|Wf3#QroZe+`y$NKHKe9{@ zW3ef+&p#@(2>k=4-Ls&vt)qV=&0F~bAY`p*iJ|Hp9Ri}$KYsAZhN;a57GzQKU!t{w zi>KSZyWZO`e(knU)w!z{dO7&(Z`#`Zja+TLDxpgpa)2%e0B1Wl<^{`!9)*9_#^O@_ J+eOtc{R6>%7mfe` literal 0 HcmV?d00001 diff --git a/mobileprint/images/A01_print_popup_icon_scaling.png b/mobileprint/images/A01_print_popup_icon_scaling.png new file mode 100644 index 0000000000000000000000000000000000000000..8ce7e1e310e7336023d7f05cfa0f716e15c74731 GIT binary patch literal 1695 zcmaJ>drT8|9KWN`R!_51LeM$-IB13TYJ1p%uYyQG zamsWHN}>>TvasRsv6;9?6>vTS8>kJsgo&HtV#LkOWRtNgg6@y8OD^~Oe)IW!zR%y) z=~pgig})IF002v?!3@+F4Zch|0DwO@6dKBiBUSli4pBsUj4m8dSO^miY3;^h+<+S` z5%Stg9d5*%%9+qbsB_TG=Rgw> zvLu!BGO2u>9#Rr69Fp*0t{IjJAgP!q5W{k@JP8uQ0+=rl^5JBz07fLq2rPgm9}X4G zWhp`on0hi6Wue2>S&^N4tatC%m4%jJAn$QKH^6oTt6caTOe*Wpf>QowMx z*=2K*Ho^e~6^$mMj7;TFnZ7K+?tCTda8I_0Y8c;Zbn*o}I9SpYP^bHUsNMbw?IsQQ z>wN!H*qvMM#Q6r?O_aIJ)ZmH|f}xy<(uEsI!j(%9rBhwhTM3eITL~wm%#rW}P@c_U zAw2F0yiSK`9d6R-FymS*l|w1;Y&Hub5MeTj49*bAL;`_8B~&P7Vns%>1QUrxQngAl z#l;A7nH_hKQ(Vhyu5wy#a24!MDl&$Z4JnpjwQ6y#$rg>KJy-jdd{Bg`462Ua!v zzBQ;?5x7vXFWPrZbaYhxARWEsuUfWv_(u_2=-V5C4$;o%`-_LeAnBr>uuu>MzDs(u zuNRoRdB>cz6HzWOA+l6+ISji~-x~(s32nJD_tG|WJ+u|=f97*^poSt7hfQPj1)gQq zh2#h7#a#WokwXW7klK5{7W#M53SyR=MMEl)h}cHo+S$!-&n}Ga10sN@e~-5|gG~h) z*`tRuU%XWtd+*u>ESX3Ierq|MaIB7<_t@`Sy;?A5>DP3e2VDZgz1`88KIKNK*l%hE z<~&B5*~bImeCFw!kwa|HyiD5=t$nR3lR4Cu6klr%7oclomOS3OtJ8Hj87K=oo15EyK@^^8Bk@F zdSqM1$814lV^+(P2s$!9T;B!GaxOZ_&?xG8OEfpC9)jT0Su)pkYj(=!c(ir61=Sv} zZoI0gMBARHeNm#+?~Lr`oPX6X%nm0YK_w zeFK{I3Bh_lousLuBWQJlbyfDgvu6gjzL!>zeQ4WoVD~wC(P1$7n{ABu#r)oREbiih zgKfJcz$fqKj_kc|xK)$|#I9%>wrv?VhnNOqo@>Wo(^p;BvcBK5uE+BZ>&qD5o`G=2 zfm4>PT$EESW2NmWXP)f;x$|7MW6Q?G?dyO?-Cb?cojodMFi2);LtN*=u~OlZx#4JB zbqM7`lB6qc#)I)AW0+Z6$6uUub!ex9R6 z;L(nhu`t+peLSLS_#0sw$@#UW2;f(SY_ht4GO=t2X919CHA#6h*)umacP z2D7`M6HfvFU&xx3L+5BRP!nMn8oU^x%T6+E07y!4kp|OBoCb~f3abNy?j1b|fmSmH zEs|&u4XMN}*7PC@&n(hrnTl4Lq-H238BB7ajDQ`d4WP?zb2w2K2EEWlnYDKthQJpP zdL;(EG?k;#fl7kHL5UEFH6aNiFd<$jibtgJ(%GOG5h1Wh3?qrLA_SErqKF85^*~HE z%AAMlRcWtsF%bq?XqrS}xUjHLSQsZHs1>kCDwV>B7#53T8APnp?Vt^=Scg+Etf0c3 zCdx|ER>A>#6%9sW6^%iR)0ZXK$q`wH^HrOehQTfa35$e?x1?d9M)UtryL|-hr1kh~ zzyB%h%yN@BtjC?iD$2whT%N$2ibRzZZlDP&iy&;nUDR0!ns8bO5>#eNgd%W})nO(I zoiFej4XSoHX@kRrt5q1pCMLw%r(E}CXUMWj)I+JGOKXP`YvuxqX;|rqGZ%Mx|jG-^$0%i)~GFAi>uZzBd5-TJu}Pt{4E2nw%(NR z%U@RXJ@gSRZ(Rupt{7RMCm?ysnD>02^ES;3hkkpW5~JS9-TZwyT-*>@;}LX16D7e< zerhdAI%wEoI(=?o;W(>Y{x7X)zRIiM8 zKy}dnrr_dzAK9<{(|GZ+8@aj3qCB3-JybFvPm%DaH+=G_Slm+q?YGMo@PP=DHQ)Im zm)-QuR+!UL|EtZ#n!EHJPNgzNyZ+L(kG7wk)k=H1z`)7Dm05v<8|yYK#P%-e_XJ6% zSr(6<#c53Q)LA{OW|GD7P0D9?UkK4PfyPt%fnZKwcfgXzRk8w%d+vu0?!&4J<)u%@ zk8ghvc!WqluvU?_`|d=+*mZ_$TXyds7ybK0-N$l;x^fS<{7&Pa>zc5p1%XwlXBoh0 zDE zs?2c_)}hF4%l9quI}-39V%^@4m!nPFB7xhJJ!d@irqIpifP3>Y{`%tW>c^{#E9wQx zbJ%o6soy8Jls0!K|8&<_E%|9s?R>?KnfDKuVu^G_RipO?$f$A zGWOE&v-geBWj-5K&#(J$=)u-2kq5_~JkLF^_|C7R&OPDJTRF8cW8;ob+Vz=@UveU@ z^(&P%f6J`!uGqhpY;K+ub?0P94NnD(bmii8c6dhQE$WZ+{oa3>I#sLMr^qe+2Ld&t AYXATM literal 0 HcmV?d00001 diff --git a/mobileprint/images/A01_print_popup_icon_size.png b/mobileprint/images/A01_print_popup_icon_size.png new file mode 100644 index 0000000000000000000000000000000000000000..30c4fd1a1a3f09e916b7648661220a4e1b75460d GIT binary patch literal 2059 zcmb7FeNYo;9^QNjK|T_`gdEs4sI6#{-6X^$Logqk6dZ#w#ERCogk()3BpWtM6R95w zDkQy1u~$b#dU6$&(_RlNXWP56g*2Xc)Edy!PPHxO>Xp$M1*~_@spU2lsDE^v>CWu# z`@Z{op6B;D8#0tXpOVB$0stVTtQ0YlZ)N;WoC5%quU)EAa+6DFD~Sqh6X7-ED4?=p z)hJlzG}}-kYPN2vJC7Cv0PW8XQzcQUUnRF-PQE#A!}mGeBpLvUSNPm!OAShZ)u_$k zQgHA7?Ncu3uqwFgiu91)twHUM(gqx@Xec*X8fq*uD|bZ+SnQLN1WuGNgFa`i%Om$G zxKq4xaveVwaKR}PqDH~}$*D@c0n}hP3KsDpo&}P?phV1v#gI%aTLuat7!trj0koV4 zL-L~KatH>eFD|KuTQ|v#h;CYo+$p$rf^f?P0KuJK>oncX_6hMW#*QGrI*a z9}?hGHu3moPkX77N@PyRUh2ng6)2SSk?~K^iR#!?GfY zS_P?PQlUnRNOj^Ff+vBb7T-!@bs~vQrk2S>QjrjbwL%#zMRYm@RzVV-Rs_vr%UmA9 z?6RP7(Ky!eGgkUktXzYmW&*=a7*;#eO$IwgU>-Z>1~nB$d>CBka9J_0Cthljn+z2} zamTBuRfl6va4PF^$1mthRER_iBalcal4?osRWd1}mBB?4l@?KJR1kL>YyH&;6Of(= z;$8Mc*UcP}tsGy@&JekookG+_77Zt7EF<{xN95>Elp!jU@2l!ZlaniGC4CVk(9=0S zw8vr%{~^Ral(i$!mU1v_^5puR@A=t<=YtpLy)pV93Y}G;|17}X&-CRl3Ek1RQ8Dn} z^w{?gu8*+}X3@_uSxS0VD<^pXWCgW#0~gfvyeLBo3EP;F&y|ld{?UBGvLL)~AQ09) zcl^xBu3M9(ZQZ?L#@em9!Hepb{4IZ+H+NNXCe;sceDe&oz$Zj&lV&TwceMXt`mx97 z(ndCi#=~>LmcAFb>mfH3S2SOW?h$dt;4feH-rw4d4WI+-5JQQ!HY=Gb;OUSzxxv2!*aV1oYV_-S*lClq`^;o1M0xumTymBp!DQ`K_#8^(=;Ke+qK ziu+HLrzJo!`@^0!1xXJ=rO2@T?2oG#w#PPn-IVxv_2|AtRmz!l%8uR74za^lS!d4i z^=ZMgoh@MDj*7#4;7A~i{==a~rW-9U=yrZX0VrY)<8W$DJuo+POLfE|4K>^W#!EJ% z8vNdSBL4HyrAgA}ZQSD22pVl?o3_0;RLG9q3R^s^m(*27sdd^08AuO4?g_qjX^_&n z_}b!?d44SVc2v2U-QJOr{xGe51GaI~Tetns+GFPp<9jOeR-UHK=jOVZzwKY%S?!o) z(mGQ6_NUxTjLh%8o51;ef6hQ-Y2$Eu@+;`BW#jKqgn2(E1P`3=Nf7(~yZbupOUj>C zUCw2lGIYfR-({Z#2Ni(_#jJ0Yw^I6*^xjX7t@$Jy>hq`IHd?gb|?4ev_6qL--(W=D2)T5~e@c+-WI%nWeY+=^jMaMo= z4+7m)%2mgPXj00_bN1|mBH)#hLO3UqS)~@yiuOx=A z1V$#dQhUv(IJ}Q*;8y6q`gSJJ4*$j0m)Eg9AySh#s^6KtT@a1@F5pW|UqOG}ORHPj zYu0X4#^}t%*G3LBe}se^tx&pWhHfFVRqUCP&b!#Xu${3;rvmcvnv_6Am4tDd-|=w82w)BozzJ!#}8zIOFOsZ zU-naYF2;p|*N2Zs-<5#gYP#vGhkHlX)b760(%(we*_w3Ck(t~tqyg_M5-iP^gJAsk NT&68Y-d9&O{vWJN?`;48 literal 0 HcmV?d00001 diff --git a/mobileprint/include/image_editor_conn.h b/mobileprint/include/image_editor_conn.h new file mode 100644 index 0000000..88ae664 --- /dev/null +++ b/mobileprint/include/image_editor_conn.h @@ -0,0 +1,26 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _IMAGE_EDITOR_H_INCLUDED_ +#define _IMAGE_EDITOR_H_INCLUDED_ + +int load_image_editor_ug(pts_appdata_t *ad); + +#endif /* _IMAGE_EDITOR_H_INCLUDED_ */ + diff --git a/mobileprint/include/mobileprint.h b/mobileprint/include/mobileprint.h new file mode 100755 index 0000000..3ec418f --- /dev/null +++ b/mobileprint/include/mobileprint.h @@ -0,0 +1,27 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef __APP_COMMON_H__ +#define __APP_COMMON_H__ + +#include +#include "pts_common.h" + + +#endif /* __APP_COMMON_H__ */ diff --git a/mobileprint/include/preview_content.h b/mobileprint/include/preview_content.h new file mode 100644 index 0000000..f81f6c1 --- /dev/null +++ b/mobileprint/include/preview_content.h @@ -0,0 +1,33 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEW_CONTENT_H_INCLUDED_ +#define _PREVIEW_CONTENT_H_INCLUDED_ + +#include + +#include "pts_common.h" + +int generate_preview_images(pts_appdata_t *ad, + app_device_orientation_e dev_orientation); + +int printer_get_setting_n_up(const pt_printer_mgr_t *active_printer); + +#endif /* _PREVIEW_CONTENT_H_INCLUDED_ */ + diff --git a/mobileprint/include/pts_common.h b/mobileprint/include/pts_common.h new file mode 100755 index 0000000..cfd1caf --- /dev/null +++ b/mobileprint/include/pts_common.h @@ -0,0 +1,431 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef PTS_COMMON_H_ +#define PTS_COMMON_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "pts_debug.h" + +#include + +#define PTS_2 "Can not register the printer" +#define PTS_17 "Error option" +#define PTS_18 "Tap to add printer" +#define PTS_19 "Unable to cancel. The current page is already being printed." + +#define IDS_PRT_1 "Failed to connect Wi-Fi Direct Printer" +#define IDS_PRT_2 "USB Printer Connected" +#define IDS_PRT_5 "Unable to cancel. The current page is already being printed." +#define IDS_PRT_6 "The printer is not connected" +#define IDS_PRT_7 "Disconnect USB cable, then reconnect it" +#define IDS_PRT_8 "You are not connected to a Wi-Fi network" +#define IDS_PRT_9 "The printer is not ready" +#define IDS_PRT_10 "Print info error" +#define IDS_PRT_11 "Printer is use" +#define IDS_PRT_12 "Printing failed" +#define IDS_PRT_13 "Unsupported file" +#define IDS_PRT_14 "File related error" +#define IDS_PRT_15 "The output tray is almost full" +#define IDS_PRT_16 "The output tray is full" +#define IDS_PRT_17 "Printer supply low" +#define IDS_PRT_18 "Printer supply empty" +#define IDS_PRT_19 "Device failure" +#define IDS_PRT_20 "No ink" +#define IDS_PRT_21 "No ink cartridge" +#define IDS_PRT_22 "The printer catridge is running low" +#define IDS_PRT_23 "Ink cover open" +#define IDS_PRT_24 "Ink related error" +#define IDS_PRT_25 "The paper tray is empty" +#define IDS_PRT_26 "The paper tray is running low" +#define IDS_PRT_27 "Paper jam" +#define IDS_PRT_28 "The paper size or type is incorrect" +#define IDS_PRT_29 "Paper loading error occurred" +#define IDS_PRT_30 "Paper related error occurred" +#define IDS_PRT_31 "Printer cover open" +#define IDS_PRT_32 "Printer hardware error occurred" +#define IDS_PRT_33 "Paper level error" +#define IDS_PRT_34 "No print head" +#define IDS_PRT_35 "Printer related error occurred" +#define IDS_PRT_41 "Failed to launch mobileprint" + +#define IDS_BR_OPT_5X7 "5\"x7\"(13x18cm)" +#define IDS_BR_OPT_4X6 "4\"x6\"(10x15cm)" +#define IDS_BR_OPT_3_5X5 "3.5\"x5\"(9x13cm)" +#define IDS_BR_OPT_WALLET "Wallet(6.4x8.4cm)" + + +#define IDS_PRT_GET_ATTRS_FOR_PRINTERS "Getting printer attributes..." +#define IDS_ASEML_POP_GET_ATTRS_FAILED "Failed to get printer attributes" + +#define IDS_SCRREAD_CANCEL_SEARCHING_PRINTERS "Double tap to cancel searching for printers" +#define IDS_SCRREAD_CONFIRM_SELECTED_PRINTER "Press to confirm selected printer" +#define IDS_SCRREAD_REFRESH_SEARCHING_PRINTERS "Press to refresh searching for printers" +#define IDS_SCRREAD_CANCEL_CONNECT_WIFI "Cancel connect to Wi-Fi network" +#define IDS_SCRREAD_SMPOS_SK3_CANCEL "Press to cancel printing" +#define IDS_SCRREAD_MORE_OPTIONS "More options" +#define IDS_SCRREAD_CANCEL_PRINTING "Double tap to cancel printing" +#define IDS_SCRREAD_MENU_INFO "More options" +#define IDS_SCRREAD_MENU_CONTEXT "Double click to access options menu" +#define IDS_SCRREAD_PRINTERS_LIST_IS_BELOW "Printers list is below" +#define IDS_SCRREAD_PRINT_CONTEXT "Double tap to send document to the printer" +#define IDS_SCRREAD_PREVIEW_IMAGE_TYPE "Preview of the document to be printed" +#define IDS_SCRREAD_PREVIEW_IMAGE_CONTEXT "Print button is below" +#define IDS_SCRREAD_EXPANDABLE_LIST_TYPE "Expandable list" +#define IDS_SCRREAD_EXPANDABLE_LIST_CONTEXT "Double tap to open list" +#define IDS_SCRREAD_SETTINS_ITEM_CONTEXT "Double tap to edit" +#define IDS_SCRREAD_PRINTER_ITEM_CONTEXT "Double tap to change selected printer" + +#define SERVICE_LAUNCH_TYPE "LAUNCH_TYPE" +#define SERVICE_JOB_ID "JOB_ID" +#define SERVICE_FILES "FILES" +#define SERVICE_PAGE_COUNT "PAGE_COUNT" +#define LAUNCH_FROM_DUMMY_NOTI "launch_from_dummy_noti" +#define LAUNCH_FROM_PROGRESS_NOTI "launch_from_progress_noti" +#define SERVICE_PRINT_FILES_COUNT "service_print_files_count" +#define SERVICE_PRINT_FILES_CURRENT_INDEX "service_print_files_current_index" +#define SERVICE_PRINT_FILES_TYPE "service_print_files_type" +#define SERVICE_PRINT_FILES_FOLDER_NAME "service_print_files_folder_name" +#define SERVICE_PRINT_FILES_FILES_NAME "service_print_files_files_name" +#define IDS_PRINT_SETTINGS_DUPLEX "Duplex" +#define IDS_PRINT_SETTINGS_DUPLEX_OFF "One side" +#define IDS_PRINT_SETTINGS_DUPLEX_ON "Double side" + +#define ICON_PRINTER "/usr/apps/org.tizen.mobileprint/res/images/pt_default_printer.png" + +#define UG_MAX_FILED_LEN 64 +#define COPIES_MAX 99 + +#undef MIN +#define MIN(a,b) ((((a)-(b))&0x80000000) >> 31)? (a) : (b) +#define PRINTER_LIST_POPUP_W 400 +#define PRINTER_LIST_POPUP_H 114 +#define PRINTER_LIST_POPUP_LN_W 400 +#define PRINTER_LIST_POPUP_LN_H 114 + +#ifndef API +#define API __attribute__ ((visibility("default"))) +#endif +#define _EDJ(obj) (Evas_Object *)elm_layout_edje_get(obj) + +//#ifndef _ +//# define _(str) gettext(str) +//#endif + +#ifndef N_ +# define gettext_noop(str) (str) +# define N_(str) gettext_noop(str) +#endif + +#ifndef S_ +# define S_(str) dgettext("sys_string", str) +#endif + +#ifndef P_ +# define P_(str) dgettext(PACKAGE, str) +#endif + +#ifndef U_ +# define U_(str) dgettext(UGNAME, str) +#endif + +typedef enum { + PTS_SIZE_FIT_TO_PAPER, + PTS_SIZE_5X7, + PTS_SIZE_4X6, + PTS_SIZE_3_5X5, + PTS_SIZE_WALLET, + PTS_SIZE_CUSTOM, + PTS_SIZE_MAX, +} pts_image_size_e; + +typedef enum { + PTS_SEARCH_INITIAL, // Before launching preview, this printer search is triggered. + PTS_SEARCH_IN_PREVIEW, // When USB Printer detected, this printer search is triggered + PTS_SEARCH_IN_SETTING, // When ether USB Printer detected or printer search button is presed, this printer search is triggered +} pts_printer_search_state_e; + +typedef struct { + char **selected_files; /** selected print files*/ + int from; /** from print position, the first file equals 0 */ + int to; /** to print position*/ + int total_pages; +} pts_range_t; + +typedef struct { + char *directory; + char **request_files; + pts_range_t range; + int num_of_files; + int current_index; + char *type; + + char *input_file; +} pts_printing_data_t; + +typedef struct { + int job_id; + int noti_id; + notification_h noti_handle; + int progress; + int page_printed; + pts_printing_data_t pt_files; + char *input_file; + int n_up; + int copies; +} pts_job_spooling_t; + +typedef void (*pts_printer_selection_done_cb)(void *userdata); + +typedef struct { + pt_print_option_e option; /* pts_print_option_type */ + int sub_item; /* Individual item. It stores any type of options: + pt_paper_size_t, pt_range_t, + pt_grayscale_t, pt_quality_t, + pt_paper_t*/ + int radio_index; + + Elm_Object_Item *item; + Evas_Object *radio_btn; + Evas_Object *radio_group; +} Item_data; + +typedef struct +{ + Evas_Object *root_win; + Evas_Object *main_layout; + Evas_Object *navi; + Evas_Object *printer_layout; + Evas_Object *printer_label; + Evas_Object *more_btn; + Evas_Object *print_btn; + + /* + * image layout + */ + Evas_Object *img_layout; + + /* + * sweep image + */ + Evas_Object *smsc; + int landscape_toggle; + + /* + * main navi item + */ + Elm_Object_Item *navi_it; +} pts_main_info_t; + +typedef struct +{ + Evas_Object *ctxpopup; + + /* Setting option: Header-item */ + Elm_Object_Item *printer_item; + Elm_Object_Item *header_separator_item; + Elm_Object_Item *item_paper_size; + Elm_Object_Item *item_paper_copies; + Elm_Object_Item *item_paper_quality; + Elm_Object_Item *item_paper_type; + Elm_Object_Item *item_page_range; + Elm_Object_Item *item_grayscale; + Elm_Object_Item *item_duplex; + Elm_Object_Item *footer_separator_item; + + /* Settings: subitems */ + Elm_Object_Item **paper_size; + Elm_Object_Item *quality[PT_QUALITY_ANY]; + Elm_Object_Item *paper_type[PT_PAPER_ANY]; + Elm_Object_Item *color[PT_GRAYSCALE_ANY]; + Elm_Object_Item *duplex[PT_DUPLEX_ANY]; + + /* Setting option: Radio Group Leader */ + Evas_Object *radio_group_paper_size; + Evas_Object *radio_group_paper_quality; + Evas_Object *radio_group_paper_type; + Evas_Object *radio_group_page_range; + Evas_Object *radio_group_grayscale; + Evas_Object *radio_group_duplex; +} pts_setting_info_t; + +typedef struct +{ + Evas_Object *printer_list_popup; + Evas_Object *printer_list_popup_box; + Evas_Coord printer_list_popup_portrait_height; + Evas_Coord printer_list_popup_landscape_height; + Evas_Object *no_found_popup; + pt_printer_mgr_t *select_printer; + pt_printer_mgr_t *active_printer; + + /*from pts_ug_list_data*/ + + Eina_List *printer_list; + +} pts_list_info_t; + +typedef struct +{ + Evas_Object *popup; + Evas_Object *progressbar; + Evas_Object *progress_layout; + Evas_Object *progress_label; +} pts_progress_info_t; + +typedef struct +{ + /* Print Search Type*/ + pts_printer_search_state_e print_search_mode; + pts_printer_selection_done_cb selection_done_cb; + Evas_Object *print_search_popup_parent; + void *printer_search_user_data; + char *ip_address; + /* whether in process(searching, printing) */ + int is_process; + + /*from pts_ug_list_data*/ + Ecore_Timer *search_err_timer; + Evas_Object *popup; + +} pts_searching_info_t; + +typedef struct +{ + Evas_Object *wifi_type_popup; +} pts_selector_info_t; + +typedef struct +{ + Evas_Object *size_popup; + Evas_Object *size_popup_box; + Evas_Coord size_popup_portrait_height; + Evas_Coord size_popup_landscape_height; + Evas_Object *custom_popup; + Evas_Object *custom_popup_box; + Evas_Coord custom_popup_portrait_height; + Evas_Coord custom_popup_landscape_height; + pts_image_size_e image_size; + + double custom_width; + double custom_height; + double custom_w_ratio; + int custom_unit; // 1:cm 2:inch +} pts_size_popup_info_t; + +typedef struct +{ + Evas_Object *scaling_popup; +} pts_scaling_popup_info_t; + +typedef struct +{ + int dummy_noti_id; + Eina_List *job_spooling_list; /*TODO : provide pt_get_job_count, pt_get_job_id ... as API in print-service*/ + +} pts_noti_info_t; + +typedef struct appdata { + Evas_Object *win; + Ecore_Event_Handler *screen_reader_message_handler; + + /* add more variables here */ + int prev_app_win_rotate; + + pts_main_info_t main_info; /*Global variables about preview view*/ + pts_setting_info_t setting_info; /*Global variables about setting view*/ + pts_list_info_t list_info; /*Global variables about printer list popup*/ + pts_progress_info_t progress_info; /*Global variables about progress popup*/ + pts_searching_info_t search_info; + pts_selector_info_t select_info; /*Global variables about wifi/p2p selet popup*/ + pts_size_popup_info_t size_popup_info; /*Global variables about size popup*/ + pts_scaling_popup_info_t scaling_popup_info; /*Global variables about scaling popup*/ + pts_noti_info_t noti_info; /*Global variables about noti*/ + pts_printing_data_t printing_data; + +} pts_appdata_t; + +/** + * This function let the app create the label + * @return void + * @param[in] parent the pointer to the parent of the label + * @param[in] desc the pointer to label text + */ +Evas_Object *pts_create_label_btn(Evas_Object *parent, const char *label); + +/** + * This function let the app create the base layout + * @return void + * @param[in] parent the pointer to the parent of the base layout + * @param[in] desc the pointer to group of the base layout + */ +Evas_Object *pts_create_base_layout(Evas_Object *parent, const char *group); + +/** + * This function let the app create the base layout + * @return void + * @param[in] parent the pointer to the parent of the base layout + * @param[in] desc the pointer to group of the base layout + */ +Evas_Object *pts_create_base_layout_with_conform(Evas_Object *parent, const char *group); + +/** + * This function let the app create the popup element + * @return void + * @param[in] parent the pointer to the parent of the popup element + * @param[in] desc the pointer to description of the popup element + * @param[in] timeout the timeout value + */ +Evas_Object *pts_create_popup(Evas_Object *parent, const char *desc, double timeout); +Evas_Object *pts_create_size_popup(Evas_Object *parent, pts_appdata_t *ad); +Evas_Object *pts_create_scaling_popup(Evas_Object *parent, pts_appdata_t *ad); +Evas_Object *pts_create_wifi_popup(Evas_Object *parent, pts_appdata_t *ad); +void clear_preview_image(pts_appdata_t *ad); +//void pts_set_ugd(pts_core_data_t *ugd); +//pts_core_data_t *pts_get_ugd(void); + +int _pts_get_rotate_angle(enum appcore_rm rotate_mode); +void pts_search_printer(pts_appdata_t *ad); +Evas_Object *pts_create_print_search_popup(Evas_Object *parent); +Evas_Object *pts_utils_create_layout(Evas_Object *navi_frame); +void load_main_view(void *userdata); + +inline char *_pts_printing_data_get_directory(pts_printing_data_t *data); +inline char **_pts_printing_data_get_request_files(pts_printing_data_t *data); +inline int _pts_printing_data_get_files_count(pts_printing_data_t *data); +inline int _pts_printing_data_get_index(pts_printing_data_t *data); +inline char *_pts_printing_data_get_type(pts_printing_data_t *data); +Eina_Bool _pts_printing_data_set_directory(const char *directory, pts_printing_data_t *data); +Eina_Bool _pts_printing_data_set_request_files(const char **request_files, const int files_count, pts_printing_data_t *data); +Eina_Bool _pts_printing_data_set_files_count(const char *num_of_files, pts_printing_data_t *data); +Eina_Bool _pts_printing_data_set_index(const char *current_index, pts_printing_data_t *data); +Eina_Bool _pts_printing_data_set_type(const char *type, pts_printing_data_t *data); + +char *pts_parse_protocol(char *addr); +int pts_unstandardization(char *name); + +#endif /* PTS_COMMON_H_ */ + diff --git a/mobileprint/include/pts_debug.h b/mobileprint/include/pts_debug.h new file mode 100755 index 0000000..0ad3e92 --- /dev/null +++ b/mobileprint/include/pts_debug.h @@ -0,0 +1,132 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef __PTS_DEBUG_H__ +#define __PTS_DEBUG_H__ + +__BEGIN_DECLS + +#define PTS_DLOG_OUT + +#ifdef PTS_DLOG_OUT +#undef LOG_TAG +#define LOG_TAG "MOBILEPRINT" +#include + +#define PTS_VERBOSE(fmt, args...) \ + LOGV(fmt, ##args) +#define PTS_INFO(fmt, args...) \ + LOGI(fmt, ##args) +#define PTS_DEBUG(fmt, args...) \ + LOGD(fmt, ##args) +#define PTS_WARN(fmt, args...) \ + LOGW(fmt, ##args) +#define PTS_ERROR(fmt, args...) \ + LOGE(fmt, ##args) +#define PTS_FATAL(fmt, args...) \ + LOGF(fmt, ##args) + +#define PTS_RET_IF(expr, fmt, args...) \ + do { \ + if(expr) { \ + PTS_DEBUG("[%s] Return, message "fmt, #expr, ##args );\ + return; \ + } \ + } while (0) + +#define PTS_RETV_IF(expr, val, fmt, args...) \ + do { \ + if(expr) { \ + PTS_DEBUG("[%s] Return value, message "fmt, #expr, ##args );\ + return (val); \ + } \ + } while (0) + +#define PTS_TRACE_BEGIN PTS_INFO("ENTER FUNCTION: %s\n", __FUNCTION__); +#define PTS_TRACE_END PTS_INFO("EXIT FUNCTION: %s\n", __FUNCTION__); + +#else +#define PTS_PRT(prio, fmt, arg...) \ + do { fprintf((prio ? stderr : stdout), "%s:%s(%d)>"fmt"\n", __FILE__, __func__, __LINE__, ##arg); } while (0) + +#define DBG(fmt, arg...) \ + do { \ + printf("%s:%s(%d)>"fmt"\n", __FILE__, __func__, __LINE__, ##arg); \ + } while (0) + +#define PTS_RET_IF(expr, fmt, args...) \ + do { \ + if(expr) { \ + PTS_PRT("[%s] Return, message "fmt, #expr, ##args );\ + return; \ + } \ + } while (0) + +#define PTS_RETV_IF(expr, val, fmt, args...) \ + do { \ + if(expr) { \ + PTS_PRT("[%s] Return value, message "fmt, #expr, ##args );\ + return (val); \ + } \ + } while (0) + +#define PTS_TRACE_BEGIN PTS_PRT(0, "%s enter\n", __FUNCTION__) +#define PTS_TRACE_END PTS_PRT(0, "%s leave\n", __FUNCTION__) + +#endif + +#define PTS_FILE_EXISTS(path) \ + (path && (1 == ecore_file_exists(path)) && (ecore_file_size(path) > 0)) + +#define PTS_IF_DEL_TIMER(timer) \ + do { \ + if(timer) { \ + ecore_timer_del(timer); \ + timer = NULL; \ + } \ + } while (0) + +#define PTS_IF_DEL_IDLER(idler) \ + do { \ + if(idler) { \ + ecore_idler_del(idler); \ + idler = NULL; \ + } \ + } while (0) + + +#define PTS_IF_DEL_OBJ(obj) \ + do { \ + if(obj) { \ + evas_object_del(obj); \ + obj = NULL; \ + } \ + } while (0) + +#define PTS_IF_FREE_MEM(mem) \ + do { \ + if(mem) { \ + free(mem); \ + mem = NULL; \ + } \ + } while (0) + +__END_DECLS + +#endif /* __PTS_DEBUG_H__ */ diff --git a/mobileprint/include/pts_main_view.h b/mobileprint/include/pts_main_view.h new file mode 100755 index 0000000..bc3f4b1 --- /dev/null +++ b/mobileprint/include/pts_main_view.h @@ -0,0 +1,75 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef PTS_MAIN_VIEW_H_ +#define PTS_MAIN_VIEW_H_ + +#include + +extern int g_pages_count; + +struct appdata *pts_get_appdata(); + +void clear_preview_image(pts_appdata_t *ad); + +/** + * This function let the app rotate the image by the given landscape + * @return void + * @param[in] ugd the pointer to the main data structure + * @param[in] landscape the landscape value + */ +void pts_main_view_rotate_image(pts_appdata_t *ad, + app_device_orientation_e orientation); + +/** + * This function let the app update printer label in the preview view + * @return void + * @param[in] ugd the pointer to the main data structure + */ +void pts_main_view_update_printer_label(pts_appdata_t *ad); + +/** + * This function let the app load the previewed image + * @return Evas_Object + * @param[in] ugd the pointer to the main data structure + */ +Evas_Object *pts_main_view_load_preview_img(pts_appdata_t *ad); + +/** + * This function let the app create the main screen view + * @return Evas_Object + * @param[in] win the pointer to the main window + * @param[in] filepath the pointer to the path of files + */ +Evas_Object *pts_create_main_view(pts_appdata_t *ad); + + +void pts_main_view_search_printer(pts_appdata_t *ad); + + +int pts_main_view_load_printing_data(pts_appdata_t *ad, pts_printing_data_t *pt_files); + + +void __pts_event_cb(pt_event_e event, void *user_data, pt_progress_info_t *progress_info); + +void __pts_print_progress_popup(pts_appdata_t *ad, int job_id, int page_count); + +void __pts_print_dummy_popup(pts_appdata_t *ad, char *files, int page_count); + +#endif /* PTS_MAIN_VIEW_H_ */ diff --git a/mobileprint/include/pts_setting_view.h b/mobileprint/include/pts_setting_view.h new file mode 100755 index 0000000..d21b93a --- /dev/null +++ b/mobileprint/include/pts_setting_view.h @@ -0,0 +1,30 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef PTS_SETTING_VIEW_H_ +#define PTS_SETTING_VIEW_H_ +#include "pts_common.h" + +/** + * This function let the app create setting view + * @return void + * @param[in] sd the pointer to the pts_ug_main_data structure + */ +void pts_create_setting_view(pts_appdata_t *ad); +#endif /* PTS_SETTING_VIEW_H_ */ diff --git a/mobileprint/include/pts_util.h b/mobileprint/include/pts_util.h new file mode 100644 index 0000000..b739bc7 --- /dev/null +++ b/mobileprint/include/pts_util.h @@ -0,0 +1,29 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef PTS_UTIL_H_ +#define PTS_UTIL_H_ + +void pts_util_show_error_popup(Evas_Object *parent, const char *msg); + +Eina_Bool pts_util_supported_arch(void); + +void pts_util_remove_tmp_files(const char *path); + +#endif diff --git a/mobileprint/mobileprint.xml b/mobileprint/mobileprint.xml new file mode 100644 index 0000000..44720e1 --- /dev/null +++ b/mobileprint/mobileprint.xml @@ -0,0 +1,19 @@ + + + + GangHeok Kim + Taeksu Shin + Dongwook Lee + Mobile Print Application + + org.tizen.mobileprint.png + + + + + + + + + + diff --git a/mobileprint/po/CMakeLists.txt b/mobileprint/po/CMakeLists.txt new file mode 100755 index 0000000..81c99a0 --- /dev/null +++ b/mobileprint/po/CMakeLists.txt @@ -0,0 +1,35 @@ +# for i18n + +#SET(POFILES en_US.po nl.po de.po zh_HK.po zh_CN.po ru.po ko.po zh_TW.po ja.po es.po el.po it.po tr_TR.po pt.po fr.po) +SET(POFILES + ar.po da.po en_US.po fi.po hi.po it_IT.po + lt.po pl.po sk.po uk.po zh_TW.po az.po + de_DE.po es_ES.po fr_CA.po hr.po ja_JP.po + lv.po pt_BR.po sl.po uz.po bg.po el_GR.po + es_US.po fr_FR.po hu.po ka.po mk.po pt_PT.po + sr.po zh_CN.po ca.po en.po et.po ga.po hy.po + kk.po nb.po ro.po sv.po zh_HK.po cs.po en_PH.po + eu.po gl.po is.po ko_KR.po nl_NL.po ru_RU.po + tr_TR.po zh_SG.po + ) + +SET(MSGFMT "/usr/bin/msgfmt") + +FOREACH(pofile ${POFILES}) + SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}) + MESSAGE("PO: ${pofile}") + GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE) + GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE) + SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + ADD_CUSTOM_COMMAND( + OUTPUT ${moFile} + COMMAND ${MSGFMT} -o ${moFile} ${absPofile} + DEPENDS ${absPofile} + ) + INSTALL(FILES ${moFile} + DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo) + SET(moFiles ${moFiles} ${moFile}) +ENDFOREACH(pofile) + +MESSAGE(".mo files: ${moFiles}") +ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles}) diff --git a/mobileprint/po/POTFILES.in b/mobileprint/po/POTFILES.in new file mode 100755 index 0000000..b6f4c3e --- /dev/null +++ b/mobileprint/po/POTFILES.in @@ -0,0 +1,6 @@ +# List of source files containing translatable strings. +app/mobileprint.c +app/pts_common.c +app/pts_list_view.c +app/pts_main_view.c +app/pts_setting_view.c diff --git a/mobileprint/po/ar.po b/mobileprint/po/ar.po new file mode 100644 index 0000000..1594aec --- /dev/null +++ b/mobileprint/po/ar.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "إخفاء" + +msgid "IDS_COM_SK_REFRESH" +msgstr "إنعاش" + +msgid "IDS_COM_SK_CANCEL" +msgstr "إلغاء" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "تدوير" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "خطأ بالنظام" + +msgid "IDS_COM_SK_BACK" +msgstr "رجوع" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "موافق" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "نوع ملف غير مدعوم" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "غير مدعوم" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "الصفحة الحالية" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "تم توصيل الطابعة" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "اتصل بشبكة Wi-Fi للطباعة" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "تحديد طابعة" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "معاينة" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "طباعة" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "الحجم" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "تغيير الحجم" + +msgid "IDS_COM_BODY_SETTING" +msgstr "الضبط" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "ملاءمة للورقة" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "ضبط مخصص" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "العرض" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "الطول" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "الاحتفاظ بنسبة العرض إلى الارتفاع" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "بوصة" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "سم" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d صفحات في الورقة الواحدة" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "إعدادات الطابعة" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "طابعة" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "حجم الورقة" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "عدد النسخ" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "نطاق الطباعة" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "اللون" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "المسودة" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "عادي" + +msgid "IDS_COM_BODY_HIGH" +msgstr "عالي" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "عادي" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "جار انتظار الطباعة..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "جار التجهيز للطباعة..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "قيد الطباعة" + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "فوتوغرافي" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "راقي" + +msgid "IDS_DIC_BODY_ALL" +msgstr "الكل" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "جودة الطباعة" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "رمادي" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "لا توجد طابعات متوفرة" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "لا توجد أجهزة" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "تم إلغاء الطباعة" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "الذاكرة ممتلئة" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "جار البحث عن طابعات..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "فحص حالة الطابعة" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "فشل البحث" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "خطأ طباعة" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "تم قطع اتصال Wi-Fi" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "ورق" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "تم فصل الطابعة" + diff --git a/mobileprint/po/az.po b/mobileprint/po/az.po new file mode 100644 index 0000000..7adc1ea --- /dev/null +++ b/mobileprint/po/az.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Gizlə" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Yenilǝ" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Ləğv et" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Döndər" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Sistemdə yanlışlıq" + +msgid "IDS_COM_SK_BACK" +msgstr "Geriyə" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Dəstəklənməyən fayl tipi" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Dəstəklənmədi" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Cari səhifə" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer qoşuldu" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Çap üçün Wi-Fi şəbəkəsinə qoşul" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Printeri seç" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Ä°lkin baxış" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Çap et" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Ölçü" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Miqyaslama" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Parametr" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Kağıza uyğunlaşdırın" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Zövqə uyğun" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "En" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Yüksəklik" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Nisbəti saxla" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "düym" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "sm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 vərəqdə %d səhifə" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printer parametrləri" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Kağızın ölçüsü" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Surətlərin sayı" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Çap diapazonu" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Rəng" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Qaralama" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standart" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Yüksək" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Çapı gözləyir..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Çapa hazırlayır..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Çap edilir..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotoqrafik" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Hamısını" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Çap keyfiyyəti" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Boz" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Printerlərdən istifadə etmək mümkün deyil" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Cihaz yoxdur" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Çap etmə ləğv edilib" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Yaddaş dolmuşdur" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Printerləri axtarır..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Printerin vəziyyətini yoxla" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Axtarış uğursuz oldu" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Çapla əlaqədar xəta" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi bağlantısı kəsildi" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Kağız" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer ilə əlaqə kəsildi" + diff --git a/mobileprint/po/bg.po b/mobileprint/po/bg.po new file mode 100644 index 0000000..3281ae1 --- /dev/null +++ b/mobileprint/po/bg.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Скриване" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Презар." + +msgid "IDS_COM_SK_CANCEL" +msgstr "Отмени" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Завъртане" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Системна грешка" + +msgid "IDS_COM_SK_BACK" +msgstr "Назад" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Неподдържан тип файл" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Не се поддържа" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Текуща страница" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Принтерът е свързан" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Свързване с Wi-Fi мрежа, за да се отпечатва" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Избор на принтер" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Преглед" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Печат" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Размер" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Мащабиране" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Настройка" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Оразмери според формата на листа" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Персонлз." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ширина" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Височина" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Запази съотношението" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "инч" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "см" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d страници на 1 лист" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Настройки на принтер" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Принтер" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Размер на страницата" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Брой копия" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Печат на диапазон" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Цвят" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Чернова" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Стандартна" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Висок" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Нормален" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Изчакване за печат..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Подготовка за печат..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Отпечатване..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Фотографска" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Бляскъв" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Всички" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Качество на печат" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Сив" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Няма достъпни принтери" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Няма устройства" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Отпечатването е отменено" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Паметта е заета" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Търсене на принтери..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Проверка състояние на принтер" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Търсенето неуспешно" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Грешка при печат" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Прекъсната Wi-Fi връзка" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Хартия" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Принтерът не е свързан" + diff --git a/mobileprint/po/ca.po b/mobileprint/po/ca.po new file mode 100644 index 0000000..47b232a --- /dev/null +++ b/mobileprint/po/ca.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ocultar" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualitzar" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancel·lar" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Girar" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Error del sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Enrere" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Acceptar" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "No s'admet el tipus de fitxer" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "No s'admet" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Pàgina actual" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Impressora connectada" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Connectar a una xarxa Wi-Fi per imprimir" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Seleccionar impressora" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Vista prèvia" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimir" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Mida" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Canvi de mida" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Ajustament" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajustar al paper" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Personal." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Amplària" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Alçària" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Mantenir rel aspecte" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "polzada" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pàgines en 1 full" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Ajustaments d'impressora" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Impressora" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Mida de paper" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Nombre de còpies" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Interval d'impressió" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Color" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Esborrany" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Estàndard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Esperant per imprimir..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparant per imprimir..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Imprimint..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotogràfic" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Tot" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Qualitat d'impressió" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gris" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Cap impressora disponible" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Sense dispositius" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impressió cancel·lada" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memòria plena" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Cercant impressores..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Comprovar l'estat de la impressora" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Error en la cerca" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Error d'impressió" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi desconnectat" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Paper" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Impressora desconnectada" + diff --git a/mobileprint/po/cs.po b/mobileprint/po/cs.po new file mode 100644 index 0000000..f539f6b --- /dev/null +++ b/mobileprint/po/cs.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Skrýt" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Obnovit" + +msgid "IDS_COM_SK_CANCEL" +msgstr "ZruÅ¡it" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Otočit" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systémová chyba" + +msgid "IDS_COM_SK_BACK" +msgstr "Zpět" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nepodporovaný typ souboru" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Není podporováno" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Aktuální stránka" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Tiskárna byla připojena" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Pro tisk připojit k síti Wi-Fi" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Vybrat tiskárnu" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Náhled" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Tisk" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Velikost" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Měřítko" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Nastavení" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Přizpůsobit papíru" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Vlastní" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Šířka" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Výška" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Zachovat poměr stran" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "palec" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d stránek na 1 list" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Nastavení tiskárny" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Tiskárna" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Velikost papíru" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Počet kopií" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Rozsah tisku" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Barva" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Koncept" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standardní" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Vysoká" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normální" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Čeká na tisk..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Probíhá příprava tisku..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Tisk..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografický" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "VÅ¡e" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Kvalita tisku" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Å edá" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Žádné tiskárny nejsou k dispozici" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Žádná zařízení" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Tisk byl zruÅ¡en" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Paměť je plná" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Vyhledávání tiskáren..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Zkontrolovat stav tiskárny" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Hledání se nezdařilo" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Chyba tisku" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi bylo odpojeno" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papír" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Tiskárna byla odpojena" + diff --git a/mobileprint/po/da.po b/mobileprint/po/da.po new file mode 100644 index 0000000..43bdcd5 --- /dev/null +++ b/mobileprint/po/da.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Skjul" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Opdatér" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Annuller" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Roter" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systemfejl" + +msgid "IDS_COM_SK_BACK" +msgstr "Tilbage" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Filtype understøttes ikke" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Understøttes ikke" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Aktuel side" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer tilsluttet" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Slut til Wi-Fi-netværk for at printe" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Vælg printer" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Eksempel" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Udskriv" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Størrelse" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skalerer" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Indstilling" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Tilpas til papir" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Brugerdefineret" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Bredde" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Højde" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Behold højde-bredde-f." + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "tommer" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d sider pÃ¥ 1 ark" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printerindstillinger" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Papirstørrelse" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Antal kopier" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Udskriv interval" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Farve" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Udkast" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Høj" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Venter pÃ¥ udskrivning ..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Gør klar til at udskrive ..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Udskriver..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografisk" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Blank" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Alle" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Udskriftskvalitet" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "GrÃ¥" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Ingen tilgængelige printere" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Ingen enheder" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Udskrivning annulleret" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Hukommelsen er fuld" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Søger efter printere ..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Kontrollér printerstatus" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Søgning mislykkedes" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Udskrivningsfejl" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi frakoblet" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papir" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer frakoblet" + diff --git a/mobileprint/po/de_DE.po b/mobileprint/po/de_DE.po new file mode 100644 index 0000000..17ab732 --- /dev/null +++ b/mobileprint/po/de_DE.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ausblenden" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Aktualisieren" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Abbrechen" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Ausrichten" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systemfehler" + +msgid "IDS_COM_SK_BACK" +msgstr "Zurück" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "WLAN" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nicht unterstützter Dateityp" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nicht unterstützt" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Aktuelle Seite" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Drucker verbunden" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Zum Drucken mit WLAN verbinden" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Drucker auswählen" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Vorsch." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Drucken" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Größe" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skalierung" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Einstellung" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "An Papiergröße anpassen" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Eig.Menü" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Breite" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Größe" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Bildseitenform. beibeh." + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "Zoll" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d Seiten auf 1 Blatt" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Druckereinstellungen" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Drucker" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Papiergröße" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Anzahl der Kopien" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Druckbereich" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Farbe" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Entwurf" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Hoch" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Auf Druck wird gewartet..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Drucken wird vorbereitet..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Druckvorgang läuft..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografisch" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Alle" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Druckqualität" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grau" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Keine Drucker verfügbar" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Keine Geräte" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Druck abgebrochen" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Speicher voll" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Drucker werden gesucht..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Druckerstatus überprüfen" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Suche fehlgeschlagen" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Druckfehler" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "WLAN getrennt" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papier" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Verbindung zum Drucker beendet" + diff --git a/mobileprint/po/el_GR.po b/mobileprint/po/el_GR.po new file mode 100644 index 0000000..a106396 --- /dev/null +++ b/mobileprint/po/el_GR.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Απόκρυψη" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Ανανέωση" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Άκυρο" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Περιστροφή" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Σφάλμα συστήματος" + +msgid "IDS_COM_SK_BACK" +msgstr "Πίσω" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Μη υποστηριζόμενος τύπος αρχείου" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Δεν υποστηρίζεται" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Τρέχουσα σελίδα" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Συνδέθηκε εκτυπωτής" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Για να εκτυπώσετε, συνδεθείτε σε δίκτυο Wi-Fi" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Επιλογή εκτυπωτή" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Προεπ." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Εκτύπωση" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Μέγεθος" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Διαβάθμιση" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Ρύθμιση" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Προσαρμογή στο χαρτί" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Αγαπημένα" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Πλάτος" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Ύψος" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Διατήρηση αναλ. εικόνας" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d σελίδες σε 1 φύλλο" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Ρυθμίσεις εκτυπωτή" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Εκτυπωτής" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Μέγεθος χαρτιού" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Αριθμός αντιγράφων" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Εύρος εκτύπωσης" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Χρώμα" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Πρόχειρο" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Τυπική" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Υψηλή" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Κανονικό" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Αναμονή εκτύπωσης..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Προετοιμασία για εκτύπωση..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Εκτύπωση..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Φωτογραφική" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Όλα" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Ποιότητα εκτύπωσης" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Γκρι" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Δεν υπάρχουν διαθέσιμοι εκτυπωτές" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Καμία συσκευή" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Ακύρωση εκτύπωσης" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Μνήμη ημερολογίου πλήρης" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Αναζήτηση για εκτυπωτές..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Ελέγξτε την κατάσταση του εκτυπωτή" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Αποτυχία αναζήτησης" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Σφάλμα εκτύπωσης" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Αποσύνδεση Wi-Fi" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "ΧΑρτί" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Αποσύνδεση εκτυπωτή" + diff --git a/mobileprint/po/en.po b/mobileprint/po/en.po new file mode 100644 index 0000000..1507df1 --- /dev/null +++ b/mobileprint/po/en.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Hide" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Refresh" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancel" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotate" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "System error" + +msgid "IDS_COM_SK_BACK" +msgstr "Back" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Unsupported file type" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Unsupported" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Current page" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer connected" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Connect to Wi-Fi network to print" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Select printer" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Preview" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Print" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Size" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Scaling" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Setting" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Fit to paper" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Custom" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Width" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Height" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Keep aspect ratio" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pages on 1 sheet" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printer settings" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Paper size" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Number of copies" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Print range" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Colour" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Draft" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "High" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Waiting to print..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparing to print..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Printing..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Photographic" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "All" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Print quality" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grey" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "No printers available" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "No devices" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Printing cancelled" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memory full" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Searching for printers..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Check the printer status" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Search failed" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Printing error" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi disconnected" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Paper" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer disconnected" + diff --git a/mobileprint/po/en_PH.po b/mobileprint/po/en_PH.po new file mode 100644 index 0000000..fc4bab9 --- /dev/null +++ b/mobileprint/po/en_PH.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Hide" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Refresh" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancel" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotate" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "System error" + +msgid "IDS_COM_SK_BACK" +msgstr "Back" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Unsupported file type" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Unsupported" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Current page" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer connected" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Connect to Wi-Fi network to print" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Select printer" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Preview" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Print" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Size" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Scaling" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Setting" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Fit to paper" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Custom" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Width" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Height" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Keep aspect ratio" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inches" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pages on 1 sheet" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printer settings" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Paper size" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Number of copies" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Print range" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Color" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Draft" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "High" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Waiting to print..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparing to print..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Printing..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Photographic" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "All" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Print quality" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gray" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "No printers available" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "No devices" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Printing canceled" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memory full" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Searching for printers..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Check the printer status" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Search failed" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Printing error" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi disconnected" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Paper" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer disconnected" + diff --git a/mobileprint/po/en_US.po b/mobileprint/po/en_US.po new file mode 100644 index 0000000..c5807ee --- /dev/null +++ b/mobileprint/po/en_US.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Hide" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Refresh" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancel" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotate" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "System error" + +msgid "IDS_COM_SK_BACK" +msgstr "Back" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Unsupported file type" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Unsupported" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Current page" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer connected" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Connect to Wi-Fi network to print" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Select printer" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Preview" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Print" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Size" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Scaling" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Setting" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Fit to paper" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Custom" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Width" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Height" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Keep aspect ratio" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pages on 1 sheet" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printer settings" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Paper size" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Number of copies" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Print range" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Color" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Draft" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "High" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Waiting to print..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparing to print..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Printing..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Photographic" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "All" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Print quality" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grey" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "No printers available" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "No devices" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Printing cancelled" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memory full" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Searching for printers..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Check the printer status" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Search failed" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Printing error" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi disconnected" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Paper" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer disconnected" + diff --git a/mobileprint/po/es_ES.po b/mobileprint/po/es_ES.po new file mode 100644 index 0000000..6818597 --- /dev/null +++ b/mobileprint/po/es_ES.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ocultar" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualizar" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancelar" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotar" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Error del sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Atrás" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Aceptar" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tipo de archivo no admitido" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "No admitido" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Página actual" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Impresora conectada" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Conectar a red Wi-Fi para imprimir" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Seleccionar impresora" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Vista previa" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimir" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Tamaño" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Cambiar tamaño" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Ajustes" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajustar a papel" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Personal." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ancho" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Altura" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Mantener rel aspecto" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pulgada" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d páginas en 1 hoja" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Ajustes de impresora" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Impresora" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Tamaño del papel" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Número de copias" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Intervalo de impresión" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Color" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Borrador" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Estándar" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Esperando impresión..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparando para imprimir..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Imprimiendo..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotográfico" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Brillante" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Todas" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Calidad de impresión" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gris" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Ninguna impresora disponible" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "No hay dispositivos" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impresión cancelada" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memoria llena" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Buscando impresoras..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Comprobar estado de impresora" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Error de búsqueda" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Error de impresión" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi desconectado" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papel" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Impresora desconectada" + diff --git a/mobileprint/po/es_US.po b/mobileprint/po/es_US.po new file mode 100644 index 0000000..4ebdf39 --- /dev/null +++ b/mobileprint/po/es_US.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ocultar" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualizar" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancelar" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotar" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Error del sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Atrás" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Aceptar" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tipo de archivo no admitido" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Directo" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "No compatible" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Página actual" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Impresora conectada" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Conectar a red Wi-Fi para imprimir" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Seleccionar impresora" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Vista previa" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimir" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Tamaño" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Redimensionar" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Configuración" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajustar a papel" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Person." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ancho" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Alto" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Mant. relación de asp." + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pulgada" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d páginas en 1 hoja" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Configuración de impresora" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Impresora" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Tamaño del papel" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Número de copias" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Rango de impresión" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Color" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Borrador" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Estándar" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Esperando para imprimir..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparando para imprimir..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Imprimiendo..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotográfico" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Xilófono" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Todo" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Calidad de impresión" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gris" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "No hay impresoras disponibles" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "No hay dispositivos" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impresión cancelada" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memoria llena" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Buscando impresoras..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Comprobar estado de impresora" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Error de búsqueda" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Error de impresión" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi desconectado" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papel" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Impresora desconectada" + diff --git a/mobileprint/po/et.po b/mobileprint/po/et.po new file mode 100644 index 0000000..d943f4c --- /dev/null +++ b/mobileprint/po/et.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Peida" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Värskenda" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Tühista" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Pööra" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Süsteemi tõrge" + +msgid "IDS_COM_SK_BACK" +msgstr "Tagasi" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Toetuseta failitüüp" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Toetuseta" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Hetkel kuvatav leht" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer on ühendatud" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Printimiseks looge ühendus Wi-Fi võrguga" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Vali printer" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Eelvaade" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Prindi" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Suurus" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skaleerimine" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Seadistus" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Mahuta paberile" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Kohandat." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Laius" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Kõrgus" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Hoia kuvasuhet" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "toll" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d lehte 1 lehel" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printeri seaded" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Paberi formaat" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Koopiate arv" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Printimise ulatus" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Värv" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Mustand" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Kõrge" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Tavaline" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Printimise ootamine..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Valmistumine printimiseks..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Printimine..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotograafiline" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Kõik" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Prindi kvaliteet" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Hall" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Printerid pole saadaval" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Seadmeid pole" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Printimine tühistatud" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Mälu on täis" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Printerite otsimine..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Kontrolli printeri olekut" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Otsing nurjus" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Tõrge printimisel" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi ühendus on katkestatud" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Paber" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printeri ühendus on katk." + diff --git a/mobileprint/po/eu.po b/mobileprint/po/eu.po new file mode 100644 index 0000000..2d8fc63 --- /dev/null +++ b/mobileprint/po/eu.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ezkutatu" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Eguneratu" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Ezeztatu" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Biratu" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Sistemaren errorea" + +msgid "IDS_COM_SK_BACK" +msgstr "Atzera" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Ados" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Fitxategi mota ez bateragarria" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Ez bateragarria" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Uneko orria" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Inprimagailua konektatuta" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Konektatu Wi-Fi sarera inprimatzeko" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Aukeratu inprimagailua" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Aurrebista" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Inpri-matu" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Tamaina" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Eskala" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Konfiguraz." + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Doitu paperera" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Pertsona." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Zabalera" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Garaiera" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Eutsi aspek. ratioari" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "hazbetea" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "zm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d orrialde orri batean" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Inprimagailuaren ezarpenak" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Inprimagailua" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Paper tamaina" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Kopia kopurua" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Inprimaketa tartea" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Kolorea" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Zirriborroa" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Estandarra" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Handia" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Arrunta" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Inprimatzeko itxaroten..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Inprimatzeko prestatzen..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Inprimatzen..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografikoa" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Distiratsua" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Guztia(k)" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Inprimaketa kalitatea" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grisa" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Ez dago inprimagailurik erabilgarri" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Gailurik ez" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Inprimaketa eten da" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memoria beteta" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Inprimagailuak bilatzen..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Inprimagailuaren egoera egiaztatu" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Bilaketak huts egin du" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Inprimatze errorea" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fia deskonektatuta" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papera" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Inprimagailua konektatu gabe dago" + diff --git a/mobileprint/po/fi.po b/mobileprint/po/fi.po new file mode 100644 index 0000000..5b42c07 --- /dev/null +++ b/mobileprint/po/fi.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Piilota" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Päivitä" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Peruuta" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Kierrä" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Järjestelmävirhe" + +msgid "IDS_COM_SK_BACK" +msgstr "Takaisin" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tiedostotyyppiä ei tueta" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Ei tuettu" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Nykyinen sivu" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Tulostin kytketty" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Muodosta Wi-Fi-yhteys tulostamista varten" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Valitse tulostin" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Esikats." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Tulosta" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Koko" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skaalaus" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Asetus" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Sovita paperille" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Mukaut." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Leveys" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Korkeus" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Säilytä kuvasuhde" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "tuuma" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d sivua 1 arkilla" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Tulostimen asetukset" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Tulostin" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Paperikoko" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Kopioiden määrä" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Tulostusalue" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Väri" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Luonnos" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Normaali" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Korkea" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normaali" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Odotetaan tulostusta..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Valmistellaan tulostusta..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Tulostetaan..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Valokuvamainen" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Kaikki" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Tulostuslaatu" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Harmaa" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Tulostimia ei ole käytettävissä" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Ei laitteita" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Tulostus peruutettu" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Muisti on täynnä" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Haetaan tulostimia..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Tarkista tulostimen tila" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Haku epäonnistui" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Tulostusvirhe" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi katkaistu" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Paperi" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Yhteys tulostimeen katkaistu" + diff --git a/mobileprint/po/fr_CA.po b/mobileprint/po/fr_CA.po new file mode 100644 index 0000000..a1a98f3 --- /dev/null +++ b/mobileprint/po/fr_CA.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Masquer" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualiser" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Annuler" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Pivoter" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Erreur système" + +msgid "IDS_COM_SK_BACK" +msgstr "Retour" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wifi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Type de fichier non pris en charge" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wifi direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Non pris en charge" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Page en cours" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Imprimante connectée" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Connectez-vous au réseau Wifi pour imprimer" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Sélectionner une imprimante" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Aperçu" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimer" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Taille" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Mise à l'échelle" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Paramètre" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajuster papier" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Mon menu" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Largeur" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Hauteur" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Cons. taille affichage" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pouce" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pages sur 1 feuille" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Paramètres de l'imprimante" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Imprimante" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Taille du papier" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Nombre de copies" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Zone d'impression" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Couleur" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Brouillons" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Haute" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "En attente d'impression..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Préparation de l'impression..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Impression..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Photo" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Tous" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Qualité de l'impression" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gris" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Aucune imprimante disponible" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Aucun périphérique" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impression annulée" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Mémoire saturée" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Recherche d'imprimante..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Vérifier l'état de l'imprimante" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Échec de la recherche" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Erreur d'impression" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "wifi déconnecté" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papier" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Imprimante déconnectée" + diff --git a/mobileprint/po/fr_FR.po b/mobileprint/po/fr_FR.po new file mode 100644 index 0000000..afa5fa7 --- /dev/null +++ b/mobileprint/po/fr_FR.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Masquer" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualiser" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Annuler" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Pivoter" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Erreur système" + +msgid "IDS_COM_SK_BACK" +msgstr "Retour" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Type de fichier non pris en charge" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Non pris en charge" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Page en cours" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Imprimante connectée" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Connectez-vous au réseau Wi-Fi pour imprimer" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Sélectionner une imprimante" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Aperçu" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimer" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Taille" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Mise à l'échelle" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Paramètres" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajuster papier" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Personnaliser" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Largeur" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Hauteur" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Cons. taille affichage" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pouce" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pages sur 1 feuille" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Paramètres de l'imprimante" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Imprimante" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Taille du papier" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Nombre de copies" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Zone d'impression" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Couleur" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Brouillons" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Haute" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "En attente d'impression..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Préparation de l'impression..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Impression..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Photo" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Tout" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Qualité de l'impression" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gris" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Aucune imprimante disponible" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Aucun périphérique" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impression annulée" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Mémoire saturée" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Recherche d'imprimante..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Vérifier l'état de l'imprimante" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Echec de la recherche" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Erreur d'impression" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi déconnecté" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papier" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Imprimante déconnectée" + diff --git a/mobileprint/po/ga.po b/mobileprint/po/ga.po new file mode 100644 index 0000000..3e7028f --- /dev/null +++ b/mobileprint/po/ga.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Folaigh" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Athnuaigh" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cuir ar ceal" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rothlaigh" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Earráid córais" + +msgid "IDS_COM_SK_BACK" +msgstr "Siar" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Cineál comhaid gan tacú" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Gan tacú" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Leathanach reatha" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printéir ceangailte" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Nasc le líonra Wi-Fi le priontáil" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Roghnaigh printéir" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Ré-amharc" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Priontáil" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Méid" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Scálú" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Socrú" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Oir do pháipéar" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Saincheap" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Leithead" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Aird" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Seas cóimheas dreacha" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "orlach" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d lch ar 1 leathán" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Socruithe printéara" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printéir" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Méid an pháipéir" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Líon na gcóipeanna" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Raon priontála" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Dath" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Dréacht" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Caighdeánach" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Ard" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normálta" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Ag fanacht le priontáil..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Ag ullmhú le priontáil..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Ag priontáil..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fótagrafach" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Snasta" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Gach" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Cáilíocht phriontála" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Liath" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Níl aon phrintéirí ar fáil" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Níl gléasanna ann" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Priontáil curtha ar ceal" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Cuimhne lán" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Cuardach le haghaidh printéirí..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Seiceáil stádas an phrintéara" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Theip ar an gcuardach" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Earráid phriontála" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi dínasctha" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Páipéar" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printéir dícheangailte" + diff --git a/mobileprint/po/gl.po b/mobileprint/po/gl.po new file mode 100644 index 0000000..d20cdb5 --- /dev/null +++ b/mobileprint/po/gl.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ocultar" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualizar" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancelar" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Xirar" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Erro do sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Atrás" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Aceptar" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tipo de arquivo non admitido" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Non admitido" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Páxina actual" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Impresora conectada" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Conectar á rede Wi-Fi para imprimir" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Seleccionar impresora" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Vista previa" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimir" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Tamaño" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Escalado" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Axustes" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Axustar ao papel" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Persoal" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ancho" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Altura" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Manter relación aspecto" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "polgada" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d páxinas en 1 folla" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Axustes de impresora" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Impresora" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Tamaño do papel" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Número de copias" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Rango de impresión" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Cor" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "BORRADOR" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Estándar" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Agardando para imprimir..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparando para imprimir..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Imprimindo..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotográfico" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Todo" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Calidade de impresión" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gris" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Non hai impresoras dispoñibles" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Non hai dispositivos" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impresión cancelada" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memoria chea" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Buscando impresoras..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Comprobar o estado da impresora" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Erro na busca" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Erro de impresión" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi desconectada" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papel" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Impresora desconectada" + diff --git a/mobileprint/po/hi.po b/mobileprint/po/hi.po new file mode 100644 index 0000000..74e9762 --- /dev/null +++ b/mobileprint/po/hi.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "छिपाएँ" + +msgid "IDS_COM_SK_REFRESH" +msgstr "रिफ्रेश" + +msgid "IDS_COM_SK_CANCEL" +msgstr "रद्द" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "घुमाएँ" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "सिस्‍टम त्रुटि" + +msgid "IDS_COM_SK_BACK" +msgstr "पीछे" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "ओके" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "असमर्थित फाइल प्रकार" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi डायरेक्ट" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "असमर्थित" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "वर्तमान पेज" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "प्रिंटर कनेक्ट किया गया" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "प्रिंट करने के लिए Wi-Fi नेटवर्क से कनेक्‍ट करें" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "प्रिंटर चुनें" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "प्रिव्यू" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "प्रिंट करें" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "आकार" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "स्केलिंग" + +msgid "IDS_COM_BODY_SETTING" +msgstr "सेटिंग" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "पेपर में फिट करें" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "कस्टम" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "चौड़ाई" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "ऊँचाई" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "पक्ष अनुपात रखें" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 शीट पर %d पेज" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "प्रिंटर सेटिंग्स" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "प्रिंटर" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "पेपर आकार" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "प्रतियों की संख्या" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "प्रिंट सीमा" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "रंग" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "ड्राफ्ट" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "मानक" + +msgid "IDS_COM_BODY_HIGH" +msgstr "उच्च" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "सामान्य" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "प्रिंट करने के लिए प्रतीक्षा कर रहा है..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "प्रिंट करने के लिए तैयार हो रहा है…" + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "प्रिंट हो रहा है..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "फ़ोटोग्राफ़िक" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "चमकदार" + +msgid "IDS_DIC_BODY_ALL" +msgstr "सभी" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "प्रिन्ट गुणवत्ता" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "भूरा" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "कोई प्रिंटर उपलब्ध नहीं" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "डिवाइस नहीं" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "प्रिंट करना रद्द किया गया" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "मेमोरी पूर्ण" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "प्रिंटर्स के लिए खोज रहा है..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "प्रिन्टर की स्थिति जाँचें" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "खोज विफल" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "प्रिंटिंग त्रुटि" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi डिसकनेक्ट किया गया" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "काग़ज़" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "प्रिंटर डिसकनेक्ट किया गया" + diff --git a/mobileprint/po/hr.po b/mobileprint/po/hr.po new file mode 100644 index 0000000..2e0a772 --- /dev/null +++ b/mobileprint/po/hr.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Sakrij" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Aktualiziraj" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Prekid" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotiraj" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "PogreÅ¡ka sustava" + +msgid "IDS_COM_SK_BACK" +msgstr "Nazad" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nepodržana datoteka" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nepodržano" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Trenutna stranica" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Pisač spojen" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Spojite se na Wi-Fi mrežu za ispis" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Odaberite pisač" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Pregled" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Ispis" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Veličina" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skaliranje" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Postavka" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Prilagodi papiru" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Prilagodi" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Å irina" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Visina" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Zadrži omjer slike" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d stranica na 1 listu" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Postavke pisača" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Pisač" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Veličina papira" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Broj kopija" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "IspiÅ¡i sve" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Boja" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Priprema" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standardno" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Visoki" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normalno" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Čekanje ispisa..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Priprema za ispis..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Ispisuje se..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografski" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Sve" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Kvaliteta ispisa" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Sivo" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nema dostupnih pisača" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nema uređaja" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Ispis je prekinut" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memorija puna" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Traženje pisača..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Provjera statusa pisača" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "GreÅ¡ka pretraživanja" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "GreÅ¡ka ispisa" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi isključen" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papir" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Pisač isključen" + diff --git a/mobileprint/po/hu.po b/mobileprint/po/hu.po new file mode 100644 index 0000000..4b82804 --- /dev/null +++ b/mobileprint/po/hu.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Elrejtés" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Frissít" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Mégse" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Elforgatás" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Rendszerhiba" + +msgid "IDS_COM_SK_BACK" +msgstr "Vissza" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "A fájltípus\nnem támogatott" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nem támogatott" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Jelenlegi oldal" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Nyomtató csatlakoztatva" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "A nyomtatáshoz létesítsen Wi-Fi-hálózati kapcsolatot" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Nyomtató kiválasztása" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Előnézet" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Nyomtat" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Méret" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Méretezés" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Beállítás" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Laphoz illesztés" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Egyéni" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Szélesség" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Magasság" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Képoldalarány megőrzése" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "coll" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d oldal 1 lapon" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Nyomtató beállításai" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Nyomtató" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Papírméret" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Példányszám" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Nyomtatási tartomány" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Szín" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Piszkozat" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Normál" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Magas" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normál" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Várakozás nyomtatásra..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Nyomtatás előkészítése..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Nyomtatás..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fénykép" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Mind" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Nyomtatási minőség" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Szürke" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nincs elérhető nyomtató" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nincs eszköz" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Nyomtatás megszakítva" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memória megtelt" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Nyomtatókeresés..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Ellenőrizze a nyomtató állapotát" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "A keresés sikertelen" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Nyomtatási hiba" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi-kapcsolat bontva" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papír" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Nyomtató leválasztva" + diff --git a/mobileprint/po/hy.po b/mobileprint/po/hy.po new file mode 100644 index 0000000..2db80ec --- /dev/null +++ b/mobileprint/po/hy.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Թքցնել" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Թարմացնել" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Չեղարկել" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Պտտեցնել" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Համակարգի Õ½Õ­Õ¡Õ¬" + +msgid "IDS_COM_SK_BACK" +msgstr "Հետ" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Ֆայլի չսատարվող Õ¿Õ¥Õ½Õ¡Õ¯" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Չսատարվող" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Ընթացիկ Õ§Õ»" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Տպիչը միացված Õ§" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Տպելու համար միացեք Wi-Fi ցանցին" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Ընտրել Õ¿ÕºÕ«Õ¹Õ¨" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Դիտում" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Տպել" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Չափս" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Մասշտաբավորում" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Կայանք" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Տեղավորել Õ©Õ²Õ©Õ« վրա" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Հատուկ" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Լայնություն" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Բարձրություն" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Պահեք չափերի հրբրկցթյնը" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "դյույմ" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "Õ½Õ´" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d էջեր 1 թերթի վրա" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Տպիչի դրվածքներ" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Տպիչ" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Ô¹Õ²Õ©Õ« չափ" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Պատճենների քանակը" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Տպման տիրույթ" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Գույն" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Նախագիծ" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Ստանդարտ" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Բարձր" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Նորմալ" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Սպասում Õ§ Õ¿ÕºÕ´Õ¡Õ¶..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Պատրաստվում Õ§ Õ¿ÕºÕ¥Õ¬..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Տպում Õ§..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Լուսանկարչական" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Բոլոր" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Տպագրության որակ" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Մոխրագույն" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Մատչելի տպիչներ Õ¹Õ¯Õ¡Õ¶" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Սարքեր Õ¹Õ¯Õ¡Õ¶" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Տպումը դադարեցվեց" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Հիշողութունը լիքն Õ§" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Որոնվում տպիչներ..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Ստուգեք Õ¿ÕºÕ«Õ¹Õ« կարգավիճակը" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Որոնումը ձախողվեց" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Տպման Õ½Õ­Õ¡Õ¬" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi-Õ¶ Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ§" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Թուղթ" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Տպիչն Õ¡Õ¶Õ»Õ¡Õ¿Õ¾Õ¡Õ® Õ§" + diff --git a/mobileprint/po/is.po b/mobileprint/po/is.po new file mode 100644 index 0000000..12faa84 --- /dev/null +++ b/mobileprint/po/is.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Hylja" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Endurnýja" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Hætta við" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Snúa" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Kerfisvilla" + +msgid "IDS_COM_SK_BACK" +msgstr "Bakka" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Í lagi" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Óstutt skrársnið" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Óstutt" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Opin síða" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Prentari tengdur" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Tengjast við Wi-Fi net til að prenta" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Velja prentara" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Skoða" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Prenta" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Stærð" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Kvörðun" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Stilling" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Passa á pappír" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Sérstilla" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Breidd" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Hæð" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Halda myndhlutfalli" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "tomma" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d síður á 1 blaði" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Prentarastillingar" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Prentari" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Pappírsstærð" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Fjöldi eintaka" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Prentsvið" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Litur" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Drög" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Venjuleg" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Mikið" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Venjulegt" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Bíð þess að prenta..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Prentun undirbúin..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Verið er að prenta..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fyrir ljósmyndir" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Allt" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Prentgæði" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grár" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Engir prentarar tiltækir" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Engin tæki" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Hætt við prentun" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Minni er fullt" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Leita að prenturum..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Kanna stöðu prentara" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Leit mistókst" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Prentvilla" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi aftengt" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Pappír" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Prentari ótengdur" + diff --git a/mobileprint/po/it_IT.po b/mobileprint/po/it_IT.po new file mode 100644 index 0000000..a9e384c --- /dev/null +++ b/mobileprint/po/it_IT.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Nascondi" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Aggiorna" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Annulla" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Ruota" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Errore di sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Indietro" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tipo file non supportato" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Non supportato" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Pagina corrente" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Stampante connessa" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Per stampare, collegarsi alla rete Wi-Fi" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Seleziona stampante" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Anteprima" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Stampa" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Dimensioni" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Proporzioni" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Impostazione" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Adatta a carta" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Personale" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Larghezza" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Altezza" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Mantieni proporzioni" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pollici" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pagine su 1 foglio" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Impostazioni stampante" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Stampante" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Formato carta" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Numero di copie" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Intervallo di stampa" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Colore" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Bozza" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normale" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "In attesa di stampa..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparazione della stampa in corso..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Stampa..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografica" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Lucente" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Tutti" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Qualità di stampa" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grigio" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nessuna stampante disponibile" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nessun dispositivo" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Stampa annullata" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memoria piena" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Ricerca stampanti in corso..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Verificare lo stato della stampante" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Ricerca non riuscita" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Errore di stampa" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi disconnesso" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Carta" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Stampante disconnessa" + diff --git a/mobileprint/po/ja_JP.po b/mobileprint/po/ja_JP.po new file mode 100644 index 0000000..d9bea85 --- /dev/null +++ b/mobileprint/po/ja_JP.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "非表示" + +msgid "IDS_COM_SK_REFRESH" +msgstr "更新" + +msgid "IDS_COM_SK_CANCEL" +msgstr "キャンセル" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "回転" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "システムエラー" + +msgid "IDS_COM_SK_BACK" +msgstr "戻る" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "未​対応​の​ファイル​です。" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "未対応です" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "現在のページ" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "プリンターが接続されました。" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "印刷するためには、Wi-Fiネットワークに接続してください。" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "プリンターの選択" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "プレビュー" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "印刷" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "サイズ" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "拡大​縮小" + +msgid "IDS_COM_BODY_SETTING" +msgstr "設定" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "用紙​に​合わせる" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "カスタム" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "幅" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "高さ" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "縦横比​を​保持" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "インチ" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1枚​に​%dページ" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "プリンター​設定" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "プリンター" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "プリント​サイズ" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "枚数" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "印刷​範囲" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "色" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "下書き" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "標準" + +msgid "IDS_COM_BODY_HIGH" +msgstr "高" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "標準" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "印刷を待機しています..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "印刷​準備中..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "印刷中..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "写真​用" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "全て" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "印刷​品質" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "グレイ" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "利用​できる​プリンター​が​あり​ません。" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "デバイス​が​あり​ません。" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "印刷をキャンセルしました。" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "メモリがいっぱいです。" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "プリンター​を​検索​中..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "プリンター​状況​を​確認​して​ください" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "検索​に​失敗​しました" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "印刷​エラー" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi​が切断​されました。" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "ペーパー" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "プリンターが取り外されました。" + diff --git a/mobileprint/po/ka.po b/mobileprint/po/ka.po new file mode 100644 index 0000000..578c42f --- /dev/null +++ b/mobileprint/po/ka.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "დამალვა" + +msgid "IDS_COM_SK_REFRESH" +msgstr "განახლება" + +msgid "IDS_COM_SK_CANCEL" +msgstr "გაუქმება" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "ბრუნვა" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "სისტემის შეცდომა" + +msgid "IDS_COM_SK_BACK" +msgstr "უკან" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "ფაილის ტიპი გაუთვალისწინებელია" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "გაუთვალისწინებელი" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "მიმდინარე გვერდი" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "პრინტერი დაკავშირებულია" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "დაუკავშირდით Wi-Fi ქსელს და ამობეჭდეთ" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "აირჩიეთ პრინტერი" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "გადახედვა" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "ამობეჭდვა" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "ზომა" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "ზომის შეცვლა" + +msgid "IDS_COM_BODY_SETTING" +msgstr "პარამეტრები" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "ფურცელზე მორგება" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "მორგებული" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "სიგანე" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "სიმაღლე" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "შეფარდების შენარჩუნება" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "დიუმი" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "სმ." + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d გვერდი 1 ფურცელზე" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "პრინტერის პარამეტრები" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "პრინტერი" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "ფურცლის ზომა" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "ასლების რაოდენობა" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "ბეჭდვის დიაპაზონი" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "ფერი" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "მონახაზი" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "სტანდარტული" + +msgid "IDS_COM_BODY_HIGH" +msgstr "მაღალი" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "ნორმალური" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "ელოდება ბეჭდვას..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "ემზადება ამოსაბეჭდად..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "იბეჭდება..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "ფოტოგრაფია" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "ყველა" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "ბეჭდვის ხარისხი" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "ნაცრისფერი" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "პრინტერები ვერ იძებნება" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "მოწყობილობები არ არის" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "დაბეჭდვა შეწყდა" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "მეხსიერება შევსებულია" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "იძებნება პრინტერები..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "შეამოწმეთ პრინტერის სტატუსი" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "ძებნა ვერ შესრულდა" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "ბეჭდვის შეცდომა" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi გამოირთო" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "ქაღალდი" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "პრინტერი გათიშულია" + diff --git a/mobileprint/po/kk.po b/mobileprint/po/kk.po new file mode 100644 index 0000000..31445d9 --- /dev/null +++ b/mobileprint/po/kk.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Жасыру" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Жаңарту" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Тоқтату" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Бұру" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Жүйе қателігі" + +msgid "IDS_COM_SK_BACK" +msgstr "Aртқа" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Қолдаусыз файл түрі" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Қолдаусыз" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Ағымдағы бет" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Принтер қосылды" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Басып шығару үшін Wi-Fi желісіне қосылу" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Принтер таңдау" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Көру" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Басып шығару" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Өлшемі" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Ауқымды өзгерту" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Қондырғылар" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Қағазға сәйкестендіру" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Таңдаулы" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ені" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Биіктігі" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Арақатынасты сақтау" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "дюйм" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cм" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 парақта %d бет" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Принтер параметрлері" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Басып шығарғыш" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Қағаз көлемі" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Көшірмелер саны" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Принтер ауқымы" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Түс" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Кесте" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Стандартты" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Жоғары" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Қалыпты" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Басып шығаруды күтуде..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Басып шығаруға дайындауда..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Басып шығаруда..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Фотографиялық" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Барлығы" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Басып шығару сапасы" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Сұр" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Қол жетімді принтерлер жоқ" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Құрылғылар жоқ" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Басып шығару болдырылмады" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Жад толып кеткен" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Принтерлерді іздеуде..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Принтер күйін тексеру" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Ізделмеді" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Басып шығару қатесі" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi ажыратылған" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Қағаз" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Принтер ажыратылды" + diff --git a/mobileprint/po/ko_KR.po b/mobileprint/po/ko_KR.po new file mode 100644 index 0000000..8c6c499 --- /dev/null +++ b/mobileprint/po/ko_KR.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "숨기기" + +msgid "IDS_COM_SK_REFRESH" +msgstr "새로고침" + +msgid "IDS_COM_SK_CANCEL" +msgstr "취소" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "회전" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "시스템 오류가 발생하였습니다" + +msgid "IDS_COM_SK_BACK" +msgstr "이전" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "확인" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "지원되지 않는 파일 형식입니다" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "지원되지 않습니다" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "현재 페이지" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "프린터가 연결되었습니다" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "인쇄하려면 Wi-Fi 네트워크에 연결하세요" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "프린터 선택" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "미리보기" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "출력" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "크기" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "크기 조정" + +msgid "IDS_COM_BODY_SETTING" +msgstr "설정" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "용지 크기에 맞추기" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "사용자 설정" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "넓이" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "높이" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "비율 유지" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1장에 %d 페이지" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "프린터 설정" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "프린터" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "용지 크기" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "인쇄 매수" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "인쇄 범위" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "색상" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "초안" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "표준" + +msgid "IDS_COM_BODY_HIGH" +msgstr "높음" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "보통" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "인쇄 대기 중..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "인쇄 준비 중..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "인쇄 중..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "사진" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "글로시" + +msgid "IDS_DIC_BODY_ALL" +msgstr "전체" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "인쇄 품질" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "회색조" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "사용할 수 있는 프린터가 없습니다" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "기기 목록이 없습니다" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "인쇄가 취소되었습니다" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "저장 공간이 부족합니다" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "프린터 검색 중..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "프린터 상태를 확인하세요" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "검색하지 못하였습니다" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "인쇄 오류가 발생하였습니다" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi 연결이 끊어졌습니다" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "종이" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "프린터와 연결이 끊어졌습니다" + diff --git a/mobileprint/po/lt.po b/mobileprint/po/lt.po new file mode 100644 index 0000000..aeafe8c --- /dev/null +++ b/mobileprint/po/lt.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Nerodyti" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Naujinti" + +msgid "IDS_COM_SK_CANCEL" +msgstr "AtÅ¡aukti" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Sukti" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Sistemos klaida" + +msgid "IDS_COM_SK_BACK" +msgstr "Atgal" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "„Wi-Fi“" + +msgid "IDS_COM_SK_OK" +msgstr "Gerai" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nepalaikomas failo tipas" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "„Wi-Fi Direct“" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nepalaikoma" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Dabartinis puslpais" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Prijungtas spausdintuvas" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Prisijunkite prie „Wi-Fi“ tinklo, jei norite spausdinti" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Pasirinkti spausdintuvą" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "PeržiÅ«ra" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Spausdinti" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Dydis" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Mastelio parinkimas" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Nustatymas" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Pritaikyti pagal lapo formatą" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Pasirink." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Plotis" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "AukÅ¡tis" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "IÅ¡saug. vaizdo formatą" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "colis" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d psl. 1 lape" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Spausdintuvo nustatymai" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Spausdintuvas" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Popieriaus formatas" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Kopijų skaičius" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Spausdinimo diapazonas" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Spalva" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "JuodraÅ¡tis" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standartinis" + +msgid "IDS_COM_BODY_HIGH" +msgstr "AukÅ¡ta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Ä®prastas" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Laukiama, kol bus spausdinama..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "RuoÅ¡iamasi spausdinti..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Spausdinama..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografinis" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Blizgus" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Visos" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Spausdinimo kokybė" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Pilka" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Spausdintuvų nėra" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nėra įrenginių" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Spausdinimas atÅ¡auktas" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Atmintis pilna" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "IeÅ¡koma spausdintuvų..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Patikrinti spausdintuvo bÅ«seną" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "PaieÅ¡ka nepavyko" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Spausdinimo klaida" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "„Wi-Fi“ atjungtas" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Popierius" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Spausdintuvas atjungtas" + diff --git a/mobileprint/po/lv.po b/mobileprint/po/lv.po new file mode 100644 index 0000000..a64cd1e --- /dev/null +++ b/mobileprint/po/lv.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Slēpt" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Atsvaidz." + +msgid "IDS_COM_SK_CANCEL" +msgstr "Atcelt" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Pagriezt" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Sistēmas kļūda" + +msgid "IDS_COM_SK_BACK" +msgstr "Atpakaļ" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Labi" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "NeatbalstÄ«ts faila veids" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "NeatbalstÄ«ts" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "PaÅ¡reizējā lapa" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printeris pievienots" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Lai drukātu, izveidojiet savienojumu ar Wi-Fi tÄ«klu" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Izvēlēties printeri" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "PriekÅ¡sk." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Drukāt" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Lielums" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "MērogoÅ¡ana" + +msgid "IDS_COM_BODY_SETTING" +msgstr "IestatÄ«jums" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Pielāgot papÄ«ram" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Sava izv." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Platums" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Augstums" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Saglabāt proporcijas" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "colla" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d lappuses 1 lapā" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printera iestatÄ«jumi" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printeris" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "PapÄ«ra formāts" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Kopiju skaits" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Drukas diapazons" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Krāsa" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Melnraksts" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standarta" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Augsta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Parasts" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Gaida, lai drukātu..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Sagatavo drukāšanai..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Drukā..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotogrāfisks" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "SpÄ«dÄ«gs" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Visi" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Drukas kvalitāte" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Pelēks" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nav pieejams neviens printeris" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nav ierīču" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Drukāšana atcelta" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Atmiņa pilna" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Meklē printerus..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "PārbaudÄ«t printera statusu" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Meklēšana neizdevās" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Drukāšanas kļūda" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi ir atvienots" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "PapÄ«rs" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printeris atvienots" + diff --git a/mobileprint/po/mk.po b/mobileprint/po/mk.po new file mode 100644 index 0000000..501c2cd --- /dev/null +++ b/mobileprint/po/mk.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Прикриј" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Обнови" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Откажи" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Заврти" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Системска грешка" + +msgid "IDS_COM_SK_BACK" +msgstr "Назад" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Неподдржан тип на фајл" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Неподдржано" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Тековна страница" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Поврзан е печатач" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Поврзете се со мрежа Wi-Fi за печатење" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Изберете печатач" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Назад" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Печати" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Големина" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Размер" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Нагодување" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "На цела хартија" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Прилагод." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ширина" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Висина" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Запази размер на слика" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "инч" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d страници на 1 лист" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Опции за печатачот" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Печатач" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Големина на хартија" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Број на копии" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Опсег на печатење" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Боја" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "За скица" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Стандардна" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Висок" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Нормално" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Се чека печатење..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Се подготвува печатење..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Се печати..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Фотографски" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Сите" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Квалитет на печатење" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Сива палета" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Не се достапни печатачи" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Нема уреди" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Печатењето е откажано" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Меморијата е полна" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Се бараат печатачи..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Проверете го печатачот" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Неуспешно пребарување" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Грешка во печатењето" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi е прекинато" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Хартија" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Печатачот не е поврзан" + diff --git a/mobileprint/po/mobileprint.pot b/mobileprint/po/mobileprint.pot new file mode 100644 index 0000000..de35177 --- /dev/null +++ b/mobileprint/po/mobileprint.pot @@ -0,0 +1,254 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-04-28 11:39+0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: app/pts_list_view.c:230 +msgid "No device found" +msgstr "" + +#: app/pts_list_view.c:263 +msgid "Can not register the printer" +msgstr "" + +#: app/pts_list_view.c:282 +msgid "No Memory" +msgstr "" + +#: app/pts_list_view.c:304 +msgid "Printer List" +msgstr "" + +#: app/pts_list_view.c:416 +msgid "Search printer failed" +msgstr "" + +#: app/pts_list_view.c:458 +msgid "IDS_COM_POP_SEARCHING" +msgstr "" + +#: app/pts_list_view.c:462 +msgid "Cancel" +msgstr "" + +#: app/pts_main_view.c:158 +msgid "Please check the WiFi status" +msgstr "" + +#: app/pts_main_view.c:207 app/pts_main_view.c:876 +msgid "Can not get USB/WIFI status" +msgstr "" + +#: app/pts_main_view.c:289 +msgid "Print Error" +msgstr "" + +#: app/pts_main_view.c:321 +msgid "Please check the printer status" +msgstr "" + +#: app/pts_main_view.c:475 +msgid "IDS_BT_BODY_PRINTING_ING" +msgstr "" + +#: app/pts_main_view.c:574 +msgid "Please check the WIFI/USB connection status" +msgstr "" + +#: app/pts_main_view.c:576 +msgid "Can not print this file" +msgstr "" + +#: app/pts_main_view.c:597 +msgid "Please select one printer to print" +msgstr "" + +#: app/pts_main_view.c:626 +msgid "IDS_PRT_SK_PRINT" +msgstr "" + +#: app/pts_main_view.c:899 +msgid "No activated printer!" +msgstr "" + +#: app/pts_main_view.c:969 +msgid "No devices" +msgstr "" + +#: app/pts_main_view.c:1277 +msgid "Back" +msgstr "" + +#: app/pts_main_view.c:1280 +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "" + +#: app/pts_setting_view.c:340 +msgid "IDS_PRT_BODY_PRINTER" +msgstr "" + +#: app/pts_setting_view.c:348 +msgid "IDS_SETTINGS_CAPTION" +msgstr "" + +#: app/pts_setting_view.c:403 +msgid "IDS_BT_BODY_COPIES" +msgstr "" + +#: app/pts_setting_view.c:405 +msgid "IDS_BT_BODY_PAPERSIZE" +msgstr "" + +#: app/pts_setting_view.c:407 +msgid "IDS_BT_BODY_ORIENTATION" +msgstr "" + +#: app/pts_setting_view.c:409 +msgid "IDS_BT_PRINT_RANGE" +msgstr "" + +#: app/pts_setting_view.c:411 +msgid "IDS_BT_BODY_SCALING" +msgstr "" + +#: app/pts_setting_view.c:413 +msgid "IDS_BT_BODY_GRAYSCALE" +msgstr "" + +#: app/pts_setting_view.c:415 +msgid "IDS_BT_QUALITY" +msgstr "" + +#: app/pts_setting_view.c:417 +msgid "IDS_BT_PAPER" +msgstr "" + +#: app/pts_setting_view.c:419 app/pts_setting_view.c:546 +msgid "Error option" +msgstr "" + +#: app/pts_setting_view.c:453 app/pts_setting_view.c:787 +msgid "L" +msgstr "" + +#: app/pts_setting_view.c:455 app/pts_setting_view.c:789 +msgid "2L" +msgstr "" + +#: app/pts_setting_view.c:457 app/pts_setting_view.c:791 +msgid "Hagaki Postcard" +msgstr "" + +#: app/pts_setting_view.c:459 app/pts_setting_view.c:793 +msgid "Business card" +msgstr "" + +#: app/pts_setting_view.c:461 app/pts_setting_view.c:795 +msgid "4x6" +msgstr "" + +#: app/pts_setting_view.c:463 app/pts_setting_view.c:797 +msgid "8x10" +msgstr "" + +#: app/pts_setting_view.c:465 app/pts_setting_view.c:799 +msgid "Letter" +msgstr "" + +#: app/pts_setting_view.c:467 app/pts_setting_view.c:801 +msgid "11x17" +msgstr "" + +#: app/pts_setting_view.c:469 app/pts_setting_view.c:803 +msgid "A4" +msgstr "" + +#: app/pts_setting_view.c:476 app/pts_setting_view.c:728 +msgid "IDS_BR_OPT_AUTO" +msgstr "" + +#: app/pts_setting_view.c:478 app/pts_setting_view.c:730 +msgid "IDS_BR_OPT_PORTRAIT" +msgstr "" + +#: app/pts_setting_view.c:480 app/pts_setting_view.c:732 +msgid "IDS_BR_OPT_LANDSCAPE" +msgstr "" + +#: app/pts_setting_view.c:487 app/pts_setting_view.c:910 +msgid "IDS_BR_OPT_RANGE_ALL" +msgstr "" + +#: app/pts_setting_view.c:489 app/pts_setting_view.c:912 +msgid "IDS_BR_OPT_RANGE_CURRENT" +msgstr "" + +#: app/pts_setting_view.c:496 app/pts_setting_view.c:755 +msgid "IDS_BR_OPT_FIT_TO_PAGE" +msgstr "" + +#: app/pts_setting_view.c:498 app/pts_setting_view.c:757 +msgid "IDS_BR_OPT_ORIGINAL_SIZE" +msgstr "" + +#: app/pts_setting_view.c:500 app/pts_setting_view.c:759 +msgid "IDS_BR_OPT_TWO_PAGES" +msgstr "" + +#: app/pts_setting_view.c:502 app/pts_setting_view.c:761 +msgid "IDS_BR_OPT_FOUR_PAGES" +msgstr "" + +#: app/pts_setting_view.c:513 app/pts_setting_view.c:826 +msgid "IDS_BR_OPT_COLOUR" +msgstr "" + +#: app/pts_setting_view.c:515 app/pts_setting_view.c:828 +msgid "IDS_BR_OPT_GRAYSCALE" +msgstr "" + +#: app/pts_setting_view.c:517 app/pts_setting_view.c:830 +msgid "IDS_BR_OPT_BLACKNWHITE" +msgstr "" + +#: app/pts_setting_view.c:524 app/pts_setting_view.c:853 +msgid "IDS_BR_OPT_DRAFT" +msgstr "" + +#: app/pts_setting_view.c:526 app/pts_setting_view.c:855 +msgid "IDS_BR_OPT_NORMAL" +msgstr "" + +#: app/pts_setting_view.c:528 app/pts_setting_view.c:857 +msgid "IDS_BR_OPT_HIGH" +msgstr "" + +#: app/pts_setting_view.c:535 app/pts_setting_view.c:881 +msgid "IDS_BR_OPT_PT_DEFAULT" +msgstr "" + +#: app/pts_setting_view.c:537 app/pts_setting_view.c:883 +msgid "IDS_BR_OPT_PT_GLOSSY" +msgstr "" + +#: app/pts_setting_view.c:539 app/pts_setting_view.c:885 +msgid "IDS_BR_OPT_PT_PHOTO" +msgstr "" + +#: app/pts_setting_view.c:1197 +msgid "IDS_COM_BODY_SETTINGS" +msgstr "" diff --git a/mobileprint/po/nb.po b/mobileprint/po/nb.po new file mode 100644 index 0000000..047d160 --- /dev/null +++ b/mobileprint/po/nb.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Skjul" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Oppdater" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Avbryt" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Roter" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systemfeil" + +msgid "IDS_COM_SK_BACK" +msgstr "Tilbake" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Filtypen støttes ikke" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Støttes ikke" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Aktuell side" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Skriver tilkoblet" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Koble til Wi-Fi-nettverk for Ã¥ skrive ut" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Velg skriver" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "ForhÃ¥ndsvisning" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Skriv ut" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Størrelse" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skalerer" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Innstilling" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Tilpass til papir" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Egendef." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Bredde" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Høyde" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Behold sideforhold" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "tommer" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d sider pÃ¥ 1 ark" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Skriverinnstillinger" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Papirstørrelse" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Antall kopier" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "UtskriftsomrÃ¥de" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Farge" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Utkast" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Høy" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Venter pÃ¥ utskrift..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Forbereder utskrift..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Skriver ut..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografisk" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Alle" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Utskriftskvalitet" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "GrÃ¥" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Ingen tilgjengelige skrivere" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Ingen enheter" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Utskrift avbrutt" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Minnet er fullt" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Søker etter skrivere..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Sjekk skriverstatus" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Søk mislyktes" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Utskriftsfeil" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi frakoblet" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papir" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Skriver frakoblet" + diff --git a/mobileprint/po/nl_NL.po b/mobileprint/po/nl_NL.po new file mode 100644 index 0000000..637685f --- /dev/null +++ b/mobileprint/po/nl_NL.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Verberg." + +msgid "IDS_COM_SK_REFRESH" +msgstr "Vernieuw" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Annuleren" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Draaien" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systeemfout" + +msgid "IDS_COM_SK_BACK" +msgstr "Terug" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Niet-ondersteund bestandstype" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Niet ondersteund" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Huidige pagina" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer aangesloten" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Met Wi-Fi-netwerk verbinden om af te drukken" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Printer selecteren" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Voorbeeld" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Af- drukken" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Grootte" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Schaal" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Instelling" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Passend maken" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Aangepast" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Breedte" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Hoogte" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Verhouding behouden" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pagina´s op 1 vel" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printerinstellingen" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Papierformaat" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Aantal exemplaren" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Afdrukbereik" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Kleur" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Concept" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standaard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Hoog" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normaal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Wachten op afdrukken..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Voorbereiden voor afdrukken..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Afdrukken..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografisch" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Alles" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Afdrukkwaliteit" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Grijs" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Geen printers beschikbaar" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Geen apparaten" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Afdrukken geannuleerd" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Geheugen vol" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Zoeken naar printers..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Printerstatus controleren" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Zoeken mislukt" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Afdrukfout" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi-verbinding verbroken" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papier" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer losgekoppeld" + diff --git a/mobileprint/po/pl.po b/mobileprint/po/pl.po new file mode 100644 index 0000000..6655e4a --- /dev/null +++ b/mobileprint/po/pl.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ukryj" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Odśwież" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Anuluj" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Obróć" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Błąd systemu" + +msgid "IDS_COM_SK_BACK" +msgstr "Wstecz" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nieobsługiwany typ pliku" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nieobsługiwane" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Bieżąca strona" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Drukarka podłączona" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Połącz z siecią Wi-Fi, aby wydrukować" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Wybierz drukarkę" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Podgląd" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Drukuj" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Rozmiar" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skalowanie" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Ustawienie" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Dopasuj do papieru" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Skróty" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Szerokość" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Wysokość" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Zachowaj proporcje" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "cal" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "Stron na arkusz: %d" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Ustawienia drukarki" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Drukarka" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Rozmiar papieru" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Liczba kopii" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Zakres drukowania" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Kolor" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Wersja robocza" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard." + +msgid "IDS_COM_BODY_HIGH" +msgstr "Wysoki" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normalny" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Oczekiwanie na drukowanie..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Przygotowywanie do drukowania..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Drukowanie..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotograficzny" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Wszystkie" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Jakość wydruku" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Szary" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Brak dostępnych drukarek" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Brak urządzeń" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Anulowano drukowanie" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Pamięć pełna" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Wyszukiwanie drukarek..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Sprawdź stan drukarki" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Wyszukiwanie nie powiodło się" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Błąd drukowania" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi wyłączone" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papier" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Drukarka odłączona" + diff --git a/mobileprint/po/pt_BR.po b/mobileprint/po/pt_BR.po new file mode 100644 index 0000000..e67f684 --- /dev/null +++ b/mobileprint/po/pt_BR.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ocultar" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Atualizar" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancelar" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Girar" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Erro de sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Voltar" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tipo de arquivo não suportado" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Não suportado" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Página atual" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Impressora conectada" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Conectar à rede Wi-Fi para imprimir" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Selecionar impressora" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Prever" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimir" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Tamanho" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Escala" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Configurações" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajustar ao papel" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Pessoal" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Largura" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Altura" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Manter proporção" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pol" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d páginas em 1 folha" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Configurações da impressora" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Impressora" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Tamanho do papel" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Número de cópias" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Intervalo de impressão" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Cor" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Rascunho" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Padrão" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Aguardando para imprimir..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Preparando para imprimir..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Imprimindo…" + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotográfico" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Todos" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Qualidade de impressão" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Cinza" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nenhuma impressora disponível" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nenhum dispositivo" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impressão cancelada" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memória cheia" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Procurando por impressoras..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Verificar o estado da impressora" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Procura falhou" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Erro de impressão" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi desativado" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papel" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Impressora desconectada" + diff --git a/mobileprint/po/pt_PT.po b/mobileprint/po/pt_PT.po new file mode 100644 index 0000000..9885d4f --- /dev/null +++ b/mobileprint/po/pt_PT.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ocultar" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Actualizar" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Cancelar" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rodar" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Erro de sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Voltar" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tipo de ficheiro não suportado" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Não suportado" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Página actual" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Impressora ligada" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Ligar à rede Wi-Fi para imprimir" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Seleccionar impressora" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Pré-vis." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprimir" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Tamanho" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Alterar escala" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Definição" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Ajustar ao papel" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Meu Menu" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Largura" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Altura" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Manter relaç. de visual" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "pol" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d páginas por folha" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Definições de impressora" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Impressora" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Tamanho do papel" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Número de cópias" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Intervalo de impressão" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Cor" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Rascunho" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Padrão" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Alta" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "A aguardar para imprimir..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "A preparar para imprimir..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "A imprimir..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografia" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Tudo" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Qualidade de impressão" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Cinzento" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nenhuma impressora disponível" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nenhuns dispositivos" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Impressão cancelada" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memória cheia" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "A procurar impressoras..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Verificar o estado da impressora" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Procura falhou" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Erro de impressão" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi desligado" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papel" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Impressora desligada" + diff --git a/mobileprint/po/ro.po b/mobileprint/po/ro.po new file mode 100644 index 0000000..bcc6377 --- /dev/null +++ b/mobileprint/po/ro.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Ascundere" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Reîncărc." + +msgid "IDS_COM_SK_CANCEL" +msgstr "Anulare" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotire" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Eroare de sistem" + +msgid "IDS_COM_SK_BACK" +msgstr "Înapoi" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Tip fişier neacceptat" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Neacceptat" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Pagină actuală" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Imprimantă conectată" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "ConectaÅ£i-vă la reÅ£eaua Wi-Fi pentru imprimare" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Selectare imprimantă" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Previz." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Imprim." + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Dimensiune" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Scalare" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Setare" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Potrivire la dimensiunea hârtiei" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Particul." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "lăţime" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "înălÅ£ime" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Păstr. rap. de asp." + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inch" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d pagini pe 1 foaie" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Setări imprimantă" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Imprimantă" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Dimensiune hârtie" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Număr de exemplare" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Interval imprimare" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Culoare" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Ciornă" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Ridicată" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Se aşteaptă imprimarea..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Se pregăteşte pentru imprimare..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Se imprimă.." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografic" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Toate" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Calitate imprimare" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gri" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Nu sunt disponibile imprimante" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nu există dispozitive" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Imprimare revocată" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memorie plină" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Se caută imprimante..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Verificare stare imprimantă" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Căutare nereuşită" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Eroare imprimare" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi deconectat" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Hârtie" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Imprimantă deconectată" + diff --git a/mobileprint/po/ru_RU.po b/mobileprint/po/ru_RU.po new file mode 100644 index 0000000..135a2f9 --- /dev/null +++ b/mobileprint/po/ru_RU.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Скрыть" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Обновить" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Отмена" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Повернуть" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Системная ошибка" + +msgid "IDS_COM_SK_BACK" +msgstr "Назад" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Да" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Неподдерживаемый тип файла" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Не поддерживается" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Текущая страница" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Принтер подключен" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Чтобы печатать, подключитесь к сети Wi-Fi" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Выберите принтер" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Просмотр" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Печать" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Размер" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Масштабирование" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Настройки" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "По ширине бумаги" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Перейти" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Ширина" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Высота" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Сохранять пропорции" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "дюйм" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "см" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d стр. на 1 листе" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Параметры принтера" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Принтер" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Размер бумаги" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Число копий" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Печать диапазона" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Цвет" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Черновик" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Стандартное" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Высокий" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Обычный" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Ожидание печати..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Подготовка к печати..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Печать..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Фотопечать" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Все" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Качество печати" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Серый" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Нет доступных принтеров" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Нет устройств" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Печать отменена" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Память заполнена" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Поиск принтеров..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Проверить состояние принтера" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Сбой поиска" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Ошибка печати" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi откл." + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Бумага" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Принтер отключен" + diff --git a/mobileprint/po/sk.po b/mobileprint/po/sk.po new file mode 100644 index 0000000..be663bd --- /dev/null +++ b/mobileprint/po/sk.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "SkryÅ¥" + +msgid "IDS_COM_SK_REFRESH" +msgstr "AktualizovaÅ¥" + +msgid "IDS_COM_SK_CANCEL" +msgstr "ZruÅ¡iÅ¥" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "OtočiÅ¥" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systémová chyba" + +msgid "IDS_COM_SK_BACK" +msgstr "Späť" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nepodporovaný typ súboru" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nie je podporované" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Aktuálna stránka" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Tlačiareň je pripojená" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Pred tlačou sa pripojte na sieÅ¥ Wi-Fi" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Výber tlačiarne" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Ukážka" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "TlačiÅ¥" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "VeľkosÅ¥" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Zmena mierky" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Nastavenie" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "PrispôsobiÅ¥ papieru" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Vlastné" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Šírka" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Výška" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "ZachovaÅ¥ pomer strán" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "palec" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "Strany na 1 hárok: %d" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Nastavenia tlačiarne" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Tlačiareň" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "VeľkosÅ¥ papiera" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Počet kópií" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Rozsah tlače" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Farba" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Koncept" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Å tandard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Vysoká" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normál." + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Čaká sa na vytlačenie..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Pripravuje sa tlač..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Tlačí sa..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografický" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "VÅ¡etko" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Kvalita tlače" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Sivá" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Žiadne dostupné tlačiarne" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Žiadne zariadenia" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Tlač bola zruÅ¡ená" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Pamäť plná" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Hľadajú sa tlačiarne..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "SkontrolovaÅ¥ stav tlačiarne" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Hľadanie zlyhalo" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Chyba tlače" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi odpojené" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papier" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Tlačiareň je odpojená" + diff --git a/mobileprint/po/sl.po b/mobileprint/po/sl.po new file mode 100644 index 0000000..ffab290 --- /dev/null +++ b/mobileprint/po/sl.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Skrij" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Osveži" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Prekliči" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Obrni" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Sistemska napaka" + +msgid "IDS_COM_SK_BACK" +msgstr "Nazaj" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "V redu" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nepodprta vrsta datoteke" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Ni podprto" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Trenutna stran" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Tiskalnik je povezan" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Povežite se z omrežjem Wi-Fi, če želite tiskati" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Izberi tiskalnik" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Pre." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Natisni" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Velikost" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Prilagajanje velikosti" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Nastavitev" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Prilagodi papirju" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Po meri" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Å irina" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "ViÅ¡ina" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Ohr. raz. viÅ¡ina/Å¡irina" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "palec" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d strani na 1 list" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Nastavitve tiskalnika" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Tiskalnik" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Velikost papirja" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Å tevilo kopij" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Obseg tiskanja" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Barva" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Osnutek" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standardno" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Visoka" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normalno" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Čakanje na tiskanje ..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Priprava na tiskanje ..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Tiskanje ..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografski" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Vse" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Kakovost tiskanja" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Siva" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Noben tiskalnik ni na voljo" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Ni naprav" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Tiskanje je preklicano" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Pomnilnik je poln" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Iskanje tiskalnikov ..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Preverite stanje tiskalnika" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Iskanje ni uspelo" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Napaka pri tiskanju" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi prekinjen" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papir" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Tiskalnik je odstranjen" + diff --git a/mobileprint/po/sr.po b/mobileprint/po/sr.po new file mode 100644 index 0000000..37c8046 --- /dev/null +++ b/mobileprint/po/sr.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Sakrij" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Osveži" + +msgid "IDS_COM_SK_CANCEL" +msgstr "PoniÅ¡ti" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotiraj" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "GreÅ¡ka sistema" + +msgid "IDS_COM_SK_BACK" +msgstr "Nazad" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Nepodržani tip fajla" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Nepodržano" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Trenutna strana" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Å tampač je priključen" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Poveži se na Wi-Fi mrežu radi Å¡tampanja" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Izaberi Å¡tampač" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Pregled" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Å¡tampaj" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Veličina" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "PodeÅ¡avanje razmere" + +msgid "IDS_COM_BODY_SETTING" +msgstr "PodeÅ¡avanja" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Podesi prema papiru" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Prilagođ." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Å irina" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Visina" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Održi razmeru" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inča" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d strana na 1 listu" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "PodeÅ¡avanje Å¡tampača" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Å tampač" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Veličina papira" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Broj kopija" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Opseg Å¡tampanja" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Boja" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Skice" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standardni" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Visok" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normalan" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Čeka se Å¡tampanje" + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Priprema Å¡tampanja..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Å tampanje..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografski" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Sve" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Kvalitet Å¡tampe" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Siva skala" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Å tampači nisu dostupni" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Nema uređaja" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Å tampanje otkazano" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Memorija puna" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Traženje Å¡tampača..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Proveri stanje Å¡tampača" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Pretraga neuspeÅ¡na" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "GreÅ¡ka Å¡tampanja" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi otkačen" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papir" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Å tampač otkačen" + diff --git a/mobileprint/po/sv.po b/mobileprint/po/sv.po new file mode 100644 index 0000000..bd84779 --- /dev/null +++ b/mobileprint/po/sv.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Dölj" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Uppdatera" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Avbryt" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Rotera" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Systemfel" + +msgid "IDS_COM_SK_BACK" +msgstr "Åter" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Filtypen stöds inte" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Stöds inte" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Denna sida" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Skrivare ansluten" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Kunde inte ansluta till Wi-Fi för att skriva ut" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Välj skrivare" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Förhandsg" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Skriv ut" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Storlek" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Skalar" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Inställning" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Anpassa efter papper" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Anpassat" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Bredd" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Höjd" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "BehÃ¥ll bildförhÃ¥llande" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "tum" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "%d sidor per ark" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Skrivarinställningar" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Skrivare" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Pappersstorlek" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Antal kopior" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Utskriftsintervall" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Färg" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Utkast" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standard" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Hög" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Väntar pÃ¥ utskrift..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Förbereder utskrift..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Skriver ut..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografi" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Allt" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Utskriftskvalitet" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "GrÃ¥skala" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Inga tillgängliga skrivare" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Inga enheter" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Utskriften avbruten" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Minnet fullt" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Söker efter skrivare..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Kontrollera skrivarstatus" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Sökningen misslyckades" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Utskriftsfel" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi har kopplats frÃ¥n" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Papper" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Skrivare frÃ¥nkopplad" + diff --git a/mobileprint/po/tr_TR.po b/mobileprint/po/tr_TR.po new file mode 100644 index 0000000..73a74ff --- /dev/null +++ b/mobileprint/po/tr_TR.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Gizle" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Yenile" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Ä°ptal" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Döndür" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Sistem hatası" + +msgid "IDS_COM_SK_BACK" +msgstr "Geri" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "Tamam" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Desteklenmeyen dosya türü" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Desteklenmiyor" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Geçerli sayfa" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Yazıcı bağlı" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Yazdırmak için Wi-Fi ağına bağlan" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Yazıcı seç" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Önizleme" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Yazdır" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Boyut" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Ölçekleme" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Ayarlama" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Kağıda sığdır" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Özel" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Genişlik" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Yükseklik" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "En-boy oranını koru" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "inç" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "cm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 kağıtta %d sayfa" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Yazıcı ayarları" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Yazıcı" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Kağıt boyutu" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Kopya sayısı" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Yazdırma aralığı" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Renkli" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Taslak" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standart" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Yüksek" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Yazdırma bekleniyor..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Yazdırmaya hazırlanıyor..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Yazdırılıyor..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotoğrafik" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Parlak" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Hepsi" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Baskı kalitesi" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Gri" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Kullanılabilir yazıcı yok" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Cihaz yok" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Yazdırma iptal edildi" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Bellek dolu" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Yazıcılar aranıyor..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Yazıcı durumunu denetle" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Arama başarısız" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Yazdırma hatası" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi bağlantısı koparıldı" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Kağıt" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Yazıcı bağlantısı kesildi" + diff --git a/mobileprint/po/uk.po b/mobileprint/po/uk.po new file mode 100644 index 0000000..59b0088 --- /dev/null +++ b/mobileprint/po/uk.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Приховати" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Оновити" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Скасувати" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Обернути" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Помилка системи" + +msgid "IDS_COM_SK_BACK" +msgstr "Назад" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "ОК" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Формат не підтримується" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Не підтримується" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Поточна сторінка" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Принтер підключено" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Підключення до мережі Wi-Fi для друку" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Вибір принтера" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Перегл." + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Друкувати" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "Розмір" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Масштабування" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Установка" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "За розміром паперу" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Признач." + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "По ширині" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "По висоті" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Зберег. співвідн. сторін" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "дюйм" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "см" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "Стор. на 1 аркуші: %d" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Установки принтера" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Принтер" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Розмір паперу" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Кількість копій" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Діапазон друку" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Колір" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Чернетка" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Стандартний" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Високий" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Звичайний" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Очікування друку..." + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Підготовка до друку..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Друк..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Фотографічний" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Всі" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Якість друку" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Сірий" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Немає доступних принтерів" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Немає пристроїв" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Друк скасовано" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Пам'ять заповнено" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Пошук принтерів..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Перевірте стан принтера" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Збій пошуку" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Помилка друку" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi відключено" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Папір" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Принтер відключено" + diff --git a/mobileprint/po/update-po.sh b/mobileprint/po/update-po.sh new file mode 100755 index 0000000..b79157d --- /dev/null +++ b/mobileprint/po/update-po.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +PACKAGE=mobileprint +SRCROOT=.. +POTFILES=POTFILES.in + +ALL_LINGUAS="ar da en_US fi hi it_IT lt pl sk uk zh_TW az de_DE es_ES fr_CA hr ja_JP lv pt_BR sl uz bg el_GR es_US fr_FR hu ka mk pt_PT sr zh_CN ca en et ga hy kk nb ro sv zh_HK cs en_PH eu gl is ko_KR nl_NL ru_RU tr_TR zh_SG" + +XGETTEXT=/usr/bin/xgettext +MSGMERGE=/usr/bin/msgmerge + +echo -n "Make ${PACKAGE}.pot " +if [ ! -e $POTFILES ] ; then + echo "$POTFILES not found" + exit 1 +fi + +$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \ + --keyword=_ --keyword=N_ --files-from=$POTFILES +if [ $? -ne 0 ]; then + echo "xgettext error" + exit 1 +fi + +if [ ! -f ${PACKAGE}.po ]; then + echo "No such file: ${PACKAGE}.po" + exit 1 +fi + +rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot +echo "done" + +for LANG in $ALL_LINGUAS; do + echo "$LANG : " + + if [ ! -e $LANG.po ] ; then + sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po + echo "${LANG}.po created" + else + if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then + if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then + rm -f ${LANG}.new.po + else + if mv -f ${LANG}.new.po ${LANG}.po; then + echo "" + else + echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2 + rm -f ${LANG}.new.po + exit 1 + fi + fi + else + echo "msgmerge for $LANG failed!" + rm -f ${LANG}.new.po + fi + fi + echo "" +done + diff --git a/mobileprint/po/uz.po b/mobileprint/po/uz.po new file mode 100644 index 0000000..6682f5a --- /dev/null +++ b/mobileprint/po/uz.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "Yashirish" + +msgid "IDS_COM_SK_REFRESH" +msgstr "Yangilash" + +msgid "IDS_COM_SK_CANCEL" +msgstr "Bekor q." + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "Aylantirish" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "Tizim xatosi" + +msgid "IDS_COM_SK_BACK" +msgstr "Orqaga" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "OK" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "Qo‘llab-quvvatlanmaydigan fayl turi" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "Qo‘llab-quvvatlanmaydigan" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "Joriy sahifa" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "Printer ulandi" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "Chop etish uchun Wi-Fi tarmoqqa ulanish" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "Printerni tanlash" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "Dast. k/c" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "Chop etish" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "O‘lcham" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "Masshtab tanlash" + +msgid "IDS_COM_BODY_SETTING" +msgstr "Parametr" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "Qog‘ozga moslash" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "Maxsus" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "Kenglik" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "Balandlik" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "Proporsiyani saqlash" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "dyum" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "sm" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 betda %dta sahifa" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "Printer parametrlari" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "Printer" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "Qog‘oz o‘lchami" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "Nusxalar soni" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "Chop etish diapazoni" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "Rang" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "Qoralama" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "Standart" + +msgid "IDS_COM_BODY_HIGH" +msgstr "Yuqori" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "Normal" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "Chop etilyapti…" + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "Chop etishga tayyorlanmoqda..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "Chop etmoqda..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "Fotografik" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Yaltiroq" + +msgid "IDS_DIC_BODY_ALL" +msgstr "Barchasi" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "Chop etish sifati" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "Kul rang" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "Birorta ham printer mavjud emas" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "Qurilmalar yo‘q" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "Chop etish bekor qilindi" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "Xotira to‘la" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "Printerlar qidirilmoqda..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "Printer holatini tekshirish" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "Qidirish bajarilmadi" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "Chop etishdagi xato" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi uzilgan" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "Qog‘oz" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "Printer chiqarib olindi" + diff --git a/mobileprint/po/zh_CN.po b/mobileprint/po/zh_CN.po new file mode 100644 index 0000000..6ebce12 --- /dev/null +++ b/mobileprint/po/zh_CN.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "隐藏" + +msgid "IDS_COM_SK_REFRESH" +msgstr "刷新" + +msgid "IDS_COM_SK_CANCEL" +msgstr "取消" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "旋转" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "系统出错" + +msgid "IDS_COM_SK_BACK" +msgstr "返回" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "确定" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "不支持的文件类型" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi直连" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "不支持" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "当前页面" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "打印机已连接" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "连接Wi-Fi网络以打印" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "选择打印机" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "预览" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "打印" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "大小" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "缩放比例" + +msgid "IDS_COM_BODY_SETTING" +msgstr "设定" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "符合纸张大小" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "自定义" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "宽" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "高" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "保持宽高比" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "英寸" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "厘米" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 张上 %d 页" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "打印机设置" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "打印机" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "纸张尺寸" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "拷贝份数" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "打印范围" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "颜色" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "草稿" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "标准" + +msgid "IDS_COM_BODY_HIGH" +msgstr "高" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "正常" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "正在等待打印…" + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "准备打印…" + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "打印中..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "摄影" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "平滑" + +msgid "IDS_DIC_BODY_ALL" +msgstr "全部" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "打印质量" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "灰色" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "无可用打印机" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "没有设备" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "打印已取消" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "内存已满" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "正在搜索打印机…" + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "检查打印机状态" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "搜索失败" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "打印故障" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi已断开" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "纸" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "打印机已断开" + diff --git a/mobileprint/po/zh_HK.po b/mobileprint/po/zh_HK.po new file mode 100644 index 0000000..55e3a77 --- /dev/null +++ b/mobileprint/po/zh_HK.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "隱藏" + +msgid "IDS_COM_SK_REFRESH" +msgstr "重新整理" + +msgid "IDS_COM_SK_CANCEL" +msgstr "取消" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "旋轉" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "系統錯誤" + +msgid "IDS_COM_SK_BACK" +msgstr "返回" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "確定" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "不支援的檔案類型" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "不支援" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "目前頁面" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "打印機已連接" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "連接到 Wi-Fi 網絡以打印" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "選擇打印機" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "預覽" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "列印" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "大小" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "縮放比例" + +msgid "IDS_COM_BODY_SETTING" +msgstr "設定" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "符合紙張大小" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "自訂" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "闊度" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "高度" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "保持長寬比" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "英寸" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "厘米" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 張上有 %d 頁" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "打印機設定" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "打印機" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "紙張大小" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "列印份數" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "列印範圍" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "顏色" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "草稿" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "標準" + +msgid "IDS_COM_BODY_HIGH" +msgstr "高" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "正常" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "正在等待列印…" + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "正在準備列印..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "正在列印..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "攝影" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "全部" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "列印質素" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "灰色" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "無可用的打印機" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "無裝置" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "已取消列印" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "記憶體已滿" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "正在搜尋打印機..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "檢查打印機狀態" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "搜尋失敗" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "列印錯誤" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi已中斷連接" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "紙張" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "打印機已中斷連接" + diff --git a/mobileprint/po/zh_SG.po b/mobileprint/po/zh_SG.po new file mode 100644 index 0000000..e642542 --- /dev/null +++ b/mobileprint/po/zh_SG.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "隐藏" + +msgid "IDS_COM_SK_REFRESH" +msgstr "重新显示" + +msgid "IDS_COM_SK_CANCEL" +msgstr "取消" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "旋转" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "系统出错" + +msgid "IDS_COM_SK_BACK" +msgstr "返回" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "确认" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "不支持的文件类型" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "直接Wi-Fi" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "不支持" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "当前页面" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "打印机已连接" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "连接Wi-Fi网络以打印" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "选择打印机" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "预览" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "打印" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "大小" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "缩放比例" + +msgid "IDS_COM_BODY_SETTING" +msgstr "设定" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "符合纸张大小" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "自定义" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "宽" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "高" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "保持宽高比" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "英寸" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "厘米" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 张上 %d 页" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "打印机设置" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "打印机" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "纸张大小" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "份数" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "打印范围" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "颜色" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "草稿" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "标准" + +msgid "IDS_COM_BODY_HIGH" +msgstr "高" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "普通" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "正在等待打印…" + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "正在准备打印..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "打印中..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "摄影" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "光面" + +msgid "IDS_DIC_BODY_ALL" +msgstr "全部" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "打印素质" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "灰色" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "无可用打印机" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "没有设备" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "打印已取消" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "内存已满" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "正在搜索打印机…" + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "检查打印机状态" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "搜索失败" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "打印故障" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi-Fi已断开" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "纸" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "打印机已断开" + diff --git a/mobileprint/po/zh_TW.po b/mobileprint/po/zh_TW.po new file mode 100644 index 0000000..11bef9c --- /dev/null +++ b/mobileprint/po/zh_TW.po @@ -0,0 +1,171 @@ +msgid "IDS_COM_SK_HIDE" +msgstr "隱藏" + +msgid "IDS_COM_SK_REFRESH" +msgstr "重新整理" + +msgid "IDS_COM_SK_CANCEL" +msgstr "取消" + +msgid "IDS_IMGE_OPT_ROTATE" +msgstr "旋轉" + +msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR" +msgstr "系統錯誤" + +msgid "IDS_COM_SK_BACK" +msgstr "返回" + +msgid "IDS_COM_BODY_WI_FI" +msgstr "Wi-Fi" + +msgid "IDS_COM_SK_OK" +msgstr "確定" + +msgid "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE" +msgstr "不支援的檔案類型" + +msgid "IDS_COM_OPT1_WI_FI_DIRECT" +msgstr "Wi-Fi Direct" + +msgid "IDS_COM_POP_UNSUPPORTED" +msgstr "不支援" + +msgid "IDS_BR_BODY_CURRENT_PAGE" +msgstr "目前頁面" + +msgid "IDS_COM_POP_PRINTER_CONNECTED_ABB2" +msgstr "印表機已連接" + +msgid "IDS_PRT_BODY_CONNECT_TO_WI_FI_NETWORK_TO_PRINT" +msgstr "連接Wi-Fi網路印表機" + +msgid "IDS_PRT_BODY_SELECT_PRINTER" +msgstr "選擇印表機" + +msgid "IDS_PRT_SK_PRINT_PREVIEW" +msgstr "預覽" + +msgid "IDS_SMPOS_SK3_PRINT" +msgstr "列印" + +msgid "IDS_IMGE_BODY_SIZE" +msgstr "大小" + +msgid "IDS_PRT_BODY_SCALING_ABB" +msgstr "縮放比例" + +msgid "IDS_COM_BODY_SETTING" +msgstr "設定" + +msgid "IDS_BT_OPT_FIT_TO_PAPER" +msgstr "符合紙張大小" + +msgid "IDS_COM_SK_CUSTOM" +msgstr "自訂" + +msgid "IDS_IMGE_BODY_WIDTH" +msgstr "寬度" + +msgid "IDS_IMGE_BODY_HEIGHT" +msgstr "高度" + +msgid "IDS_PRT_BODY_KEEP_ASPECT_RATIO_ABB" +msgstr "保持長寬比" + +msgid "IDS_COM_BODY_UNIT_INCH" +msgstr "英吋" + +msgid "IDS_COM_BODY_UNIT_CM" +msgstr "公分" + +msgid "IDS_PRT_BODY_PD_PAGES_ON_1_SHEET_ABB" +msgstr "1 張上有 %d 頁" + +msgid "IDS_SMPOS_HEADER_PRINTER_SETTINGS" +msgstr "印表機設定" + +msgid "IDS_PRT_BODY_PRINTER" +msgstr "印表機" + +msgid "IDS_PRT_BODY_PAPERSIZE" +msgstr "紙張大小" + +msgid "IDS_PRT_BODY_NUMBEROFCOPIES" +msgstr "份數" + +msgid "IDS_PRT_BODY_PRINT_RANGE_ABB" +msgstr "列印範圍" + +msgid "IDS_PRT_BODY_COLOUR" +msgstr "顏色" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_DRAFT" +msgstr "草稿" + +msgid "IDS_PRT_OPT_PRINTSETTINGS_STANDARD" +msgstr "標準" + +msgid "IDS_COM_BODY_HIGH" +msgstr "高" + +msgid "IDS_ST_BODY_NORMAL" +msgstr "正常" + +msgid "IDS_PRT_POP_WAITING_TO_PRINT_ING" +msgstr "正在等待列印…" + +msgid "IDS_PRT_POP_PREPARING_TO_PRINT_ING" +msgstr "正在準備列印..." + +msgid "IDS_PRT_HEADER_MEDIABOX_PRINTING" +msgstr "正在列印..." + +msgid "IDS_PRT_BODY_PHOTOGRAPHIC_ABB" +msgstr "攝影" + +msgid "IDS_ST_BODY_GLOSSY" +msgstr "Glossy" + +msgid "IDS_DIC_BODY_ALL" +msgstr "全部" + +msgid "IDS_PRT_BODY_PRINTSETTINGS_PRINT_QUALITY" +msgstr "列印品質" + +msgid "IDS_IMGE_HEADER_GREY" +msgstr "灰色" + +msgid "IDS_PRT_BODY_NO_PRINTERS_AVAILABLE" +msgstr "無可用的印表機" + +msgid "IDS_COM_BODY_NO_DEVICES" +msgstr "沒有找到裝置" + +msgid "IDS_PRT_POP_PRINTING_CANCELED" +msgstr "已取消列印" + +msgid "IDS_COM_POP_MEMORY_FULL" +msgstr "記憶體已滿" + +msgid "IDS_PRT_BODY_SEARCHING_FOR_PRINTERS_ING" +msgstr "正在搜尋印表機..." + +msgid "IDS_PRT_POP_CHECKPRINTERSTATE" +msgstr "檢查印表機狀態" + +msgid "IDS_ASEML_POP_SEARCH_FAILED" +msgstr "搜尋失敗" + +msgid "IDS_PRT_POP_PRINTINGERROR" +msgstr "列印錯誤" + +msgid "IDS_WIFI_POP_WI_FI_DISCONNECTED" +msgstr "Wi - Fi斷開" + +msgid "IDS_IMGE_BUTTON_PAPER_M_STICKER" +msgstr "紙張" + +msgid "IDS_COM_POP_PRINTER_DISCONNECTED_ABB2" +msgstr "印表機已中斷連接" + diff --git a/mobileprint/preview_engine/CMakeLists.txt b/mobileprint/preview_engine/CMakeLists.txt new file mode 100644 index 0000000..0f1ceec --- /dev/null +++ b/mobileprint/preview_engine/CMakeLists.txt @@ -0,0 +1,8 @@ +INCLUDE(FindPkgConfig) +pkg_check_modules(preview_engine_pkgs REQUIRED dlog evas elementary edje + ecore ecore-input ecore-x) +FOREACH(flag ${preview_engine_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS_SMSC "${EXTRA_CFLAGS_SMSC} ${flag}") +ENDFOREACH(flag) + +ADD_SUBDIRECTORY(lib) diff --git a/mobileprint/preview_engine/include/preview_engine.h b/mobileprint/preview_engine/include/preview_engine.h new file mode 100644 index 0000000..07ec56a --- /dev/null +++ b/mobileprint/preview_engine/include/preview_engine.h @@ -0,0 +1,93 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEW_ENGINE_H_INCLUDED_ +#define _PREVIEW_ENGINE_H_INCLUDED_ + +struct preview_engine; +struct initial_preview_data; +enum preview_engine_event_status; + +#include + +#include +#include + +#include "preview_model.h" +#include "preview_task_model.h" + + +enum preview_engine_state { + PREVIEW_ENGINE_STATE_INITIAL = 0, + PREVIEW_ENGINE_STATE_PROCESSING, + PREVIEW_ENGINE_STATE_ERROR, + PREVIEW_ENGINE_STATE_READY, + PREVIEW_ENGINE_STATE_STOPPING, + PREVIEW_ENGINE_STATE_DELETED +}; + +enum preview_engine_event_status { + PREVIEW_ENGINE_EVENT_INITIAL_ERROR = -2, + PREVIEW_ENGINE_EVENT_PAGE_ERROR = -1, + PREVIEW_ENGINE_EVENT_PAGE_PROCESSING, + PREVIEW_ENGINE_EVENT_PAGE_READY, + PREVIEW_ENGINE_EVENT_INITIAL_READY, + PREVIEW_ENGINE_EVENT_EMPTY_PAGE_PROCESSING, + PREVIEW_ENGINE_EVENT_EMPTY_PAGE_READY + /* add cancelled state? */ +}; + +struct preview_engine_event { + int page; + enum preview_engine_event_status status; +}; + +struct initial_preview_data { + struct preview_conf conf; + + struct preview_engine *engine; /* not for use in thread */ +}; + +struct preview_engine { + enum preview_engine_state state; + struct preview_task_model task_model; + struct preview_model p_model; + + struct initial_preview_data *next_preview_data; + + int page_ready_event_type; +}; + + +int init_preview_engine(struct preview_engine *engine); +int process_preview_engine_file(struct preview_engine *engine, + char **const fnames, int files_count, + const char *ppd, + const struct paper_size_pts *paper_size, + const struct size_px *max_available_size_px, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale); +void preview_engine_send_page_message(struct preview_engine *engine, + enum preview_engine_event_status status, int page); +int preview_engine_init_done(struct preview_engine *engine, + const struct preview_conf *conf); + + +#endif /* _PREVIEW_ENGINE_H_INCLUDED_ */ + diff --git a/mobileprint/preview_engine/include/preview_model.h b/mobileprint/preview_engine/include/preview_model.h new file mode 100644 index 0000000..8a3ccb9 --- /dev/null +++ b/mobileprint/preview_engine/include/preview_model.h @@ -0,0 +1,92 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEW_MODEL_H_INCLUDED_ +#define _PREVIEW_MODEL_H_INCLUDED_ + +struct preview_model; + +#include +#include +#include + +#include "preview_task_model.h" + + +enum preview_page_state { + PREVIEW_PAGE_STATE_NA = 0, + PREVIEW_PAGE_STATE_PROCESSING, + /*PREVIEW_PAGE_STATE_SIZE_READY,*/ /* TODO */ + PREVIEW_PAGE_STATE_READY, + PREVIEW_PAGE_STATE_ERROR +}; + +#if 0 +struct preview_page_info { + enum preview_page_state page_state; + /* TODO: page data */ +}; +#endif + +struct preview_engine; + +struct preview_conf { + int pages_count; + char **initial_fnames; + int files_count; + char *fname; + char *ppd; /*PPD file name*/ + //int is_original_size; + struct page_scale scale; + int n_up; + struct preview_page_req settings_req; + enum page_orientation orientation; + struct paper_size_pts paper_size; + /*struct size_px max_available_size_px; + int is_grayscale;*/ +}; + +struct preview_model { + //int pages_count; + enum preview_page_state *pages_state; + struct preview_conf conf; + enum preview_page_state empty_page_state; + //struct preview_task_model *task_model; + struct preview_engine *engine; +}; + +#include "preview_engine.h" + + +void destroy_preview_conf(struct preview_conf *conf); +int copy_preview_conf(struct preview_conf *dest, + const struct preview_conf *src); + +int init_preview_model(struct preview_model *model, + const struct preview_conf *conf, + struct preview_engine *engine); +void destroy_preview_model(struct preview_model *model); +int preview_model_request_empty_page(struct preview_model *model); +int preview_model_request_page(struct preview_model *model, int page); +int preview_model_page_available(struct preview_model *model, + enum preview_engine_event_status status, int page); + + +#endif /* _PREVIEW_MODEL_H_INCLUDED_ */ + diff --git a/mobileprint/preview_engine/include/preview_task_model.h b/mobileprint/preview_engine/include/preview_task_model.h new file mode 100644 index 0000000..4fbb5df --- /dev/null +++ b/mobileprint/preview_engine/include/preview_task_model.h @@ -0,0 +1,60 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEW_TASK_MODEL_H_INCLUDED_ +#define _PREVIEW_TASK_MODEL_H_INCLUDED_ + +//#define MAX_PREVIEW_TASK_COUNT 3 /* TODO: autodetection */ +#define PREVIEW_EMPTY_PAGE_FNAME PREVIEW_TEMP_DIR "/empty_page.ppm" + +struct preview_task_model; +struct preview_conf; + +#include +#include /* PREVIEW_TEMP_DIR definition */ + +struct preview_task_model { + Eina_List *task_list; + Ecore_Exe *previewgen_handle; + Ecore_Event_Handler *event_handler; + + int is_stop_processing; + + struct preview_engine *engine; +}; + +#include "preview_model.h" + + +#define PREVIEW_EMPTY_PAGE_FNAME PREVIEW_TEMP_DIR "/empty_page.ppm" + + +int init_preview_task_model(struct preview_task_model *model, + struct preview_engine *engine); +int preview_task_stop_processing(struct preview_task_model *task_model); +int add_preview_task_initial(struct preview_task_model *model, + const struct preview_conf *conf); +int add_preview_task_empty_page(struct preview_task_model *model, + struct preview_model *pmodel); +int add_preview_task(struct preview_task_model *model, int page, + struct preview_model *pmodel); + + +#endif /* _PREVIEW_TASK_MODEL_H_INCLUDED_ */ + diff --git a/mobileprint/preview_engine/lib/CMakeLists.txt b/mobileprint/preview_engine/lib/CMakeLists.txt new file mode 100644 index 0000000..f1167aa --- /dev/null +++ b/mobileprint/preview_engine/lib/CMakeLists.txt @@ -0,0 +1,5 @@ +FILE(GLOB SRCS *.c) + +ADD_LIBRARY(preview_engine ${SRCS}) +SET_TARGET_PROPERTIES(preview_engine PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS_SMSC} -fpie") + diff --git a/mobileprint/preview_engine/lib/preview_engine.c b/mobileprint/preview_engine/lib/preview_engine.c new file mode 100644 index 0000000..0b34b07 --- /dev/null +++ b/mobileprint/preview_engine/lib/preview_engine.c @@ -0,0 +1,194 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include +#include + +#include "pts_debug.h" +#include "preview_engine.h" + +int init_preview_engine(struct preview_engine *engine) +{ + int ret; + int errsv; + + PTS_TRACE_BEGIN; + PTS_RETV_IF(engine == NULL, -1, "engine is NULL"); + + /*engine->fname = NULL; + DBG("preview_engine: fname = %s", fname);*/ + + memset(engine, 0, sizeof(struct preview_engine)); + + engine->state = PREVIEW_ENGINE_STATE_INITIAL; + engine->next_preview_data = NULL; + + memset(&(engine->p_model), 0, sizeof(struct preview_model)); + + ret = mkdir(PREVIEW_TEMP_DIR, 0777); + errsv = errno; + PTS_RETV_IF(ret < 0 && errsv != EEXIST, -1, + "Failed to mkdir " PREVIEW_TEMP_DIR + ", errno = %d", errsv); + + if (init_preview_task_model(&(engine->task_model), engine) < 0) { + PTS_TRACE_BEGIN; + return -1; + } + /*if (init_preview_model(&(engine->p_model)) < 0) + return -1;*/ + + /*engine->preview_data.pages_count = -1; + engine->preview_data.fname = strdup(fname);*/ + + engine->page_ready_event_type = ecore_event_type_new(); + + PTS_TRACE_END; + return 0; +} + +/* TODO: engine destruction */ + +int preview_engine_init_done(struct preview_engine *engine, + const struct preview_conf *conf) +{ + PTS_TRACE_BEGIN; + if (conf->pages_count > 0) { + engine->state = PREVIEW_ENGINE_STATE_READY; + if (init_preview_model(&(engine->p_model), + conf, engine) < 0) { + PTS_DEBUG("ERROR in preview model initialization"); + engine->state = PREVIEW_ENGINE_STATE_ERROR; + preview_engine_send_page_message(engine, + PREVIEW_ENGINE_EVENT_INITIAL_ERROR, -1); + PTS_TRACE_END; + return -1; + } + preview_engine_send_page_message(engine, + PREVIEW_ENGINE_EVENT_INITIAL_READY, 0); + PTS_TRACE_END; + return 0; + } + + PTS_DEBUG("ERROR: no pages"); + engine->state = PREVIEW_ENGINE_STATE_ERROR; + preview_engine_send_page_message(engine, + PREVIEW_ENGINE_EVENT_INITIAL_ERROR, -1); + PTS_TRACE_END; + return 0; +} + +int process_preview_engine_file(struct preview_engine *engine, + char **const fnames, int files_count, + const char *ppd, + const struct paper_size_pts *paper_size, + const struct size_px *max_available_size_px, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(NULL == engine || + NULL == fnames || + files_count <= 0 || + NULL == fnames[0] || + NULL == ppd || + NULL == paper_size || + NULL == scale || + NULL == max_available_size_px + , -1 , "Invalid argument"); + + struct initial_preview_data *data; + struct size_px shadow_size_px = {10, 10}; + int i; + + data = malloc(sizeof(struct initial_preview_data)); + PTS_RETV_IF(data == NULL, -1, "Insufficient memory"); + + + data->conf.initial_fnames = calloc(files_count + 1, sizeof(char*)); + if (NULL == data->conf.initial_fnames) { + PTS_IF_FREE_MEM(data); + PTS_RETV_IF(1, -1, "Insufficient memory"); + } + for (i = 0; i < files_count; ++i) { + data->conf.initial_fnames[i] = strdup(fnames[i]); + PTS_DEBUG("Fname %d: %s", i, fnames[i]); + if (NULL == data->conf.initial_fnames[i]) { + /* memory error */ + destroy_preview_conf(&(data->conf)); + PTS_IF_FREE_MEM(data); + PTS_RETV_IF(1, -1, "Insufficient memory"); + } + } + data->conf.files_count = files_count; + + data->conf.ppd = strdup(ppd); + data->conf.fname = strdup(TEMP_PDFTOPDF_FNAME); + data->conf.paper_size = *paper_size; + data->conf.paper_size.name = strdup(paper_size->name); + //data->conf.max_available_size_px = *max_available_size_px; + data->conf.orientation = orientation; + data->conf.n_up = n_up; + data->conf.scale = *scale; + //data->conf.is_grayscale = is_grayscale; + + data->conf.settings_req.paper_size = paper_size->s; + data->conf.settings_req.available_size_px = *max_available_size_px; + data->conf.settings_req.shadow_offset = shadow_size_px; + data->conf.settings_req.is_rotate90 = + (PAGE_ORIENTATION_LANDSCAPE == orientation); + data->conf.settings_req.is_grayscale = is_grayscale; + + data->engine = engine; + + + //careful memory release: + if (data->conf.ppd == NULL || data->conf.fname == NULL + || data->conf.paper_size.name == NULL) { + destroy_preview_conf(&(data->conf)); + PTS_IF_FREE_MEM(data); + PTS_RETV_IF(1, -1, "Insufficient memory"); + } + + engine->state = PREVIEW_ENGINE_STATE_PROCESSING; + add_preview_task_initial(&(engine->task_model), &(data->conf)); + PTS_IF_FREE_MEM(data); + + PTS_TRACE_END; + return 0; +} + +void preview_engine_send_page_message(struct preview_engine *engine, + enum preview_engine_event_status status, int page) +{ + PTS_RET_IF(engine == NULL, "engine is NULL"); + + struct preview_engine_event *event_data = malloc(sizeof(*event_data)); + PTS_TRACE_BEGIN; + + PTS_DEBUG("Send event: [%d, %d]", page, status); + + /* TODO: check for active preview model */ + event_data->page = page; + event_data->status = status; + ecore_event_add(engine->page_ready_event_type, event_data, NULL, NULL); + PTS_TRACE_END; +} diff --git a/mobileprint/preview_engine/lib/preview_model.c b/mobileprint/preview_engine/lib/preview_model.c new file mode 100644 index 0000000..5bc94f1 --- /dev/null +++ b/mobileprint/preview_engine/lib/preview_model.c @@ -0,0 +1,224 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include +#include + +#include "preview_model.h" + + +void destroy_preview_conf(struct preview_conf *conf) +{ + int i; + PTS_RET_IF(NULL == conf, "Argument error"); + + if (conf->initial_fnames != NULL) + for (i = 0; i < conf->files_count; ++i) + PTS_IF_FREE_MEM(conf->initial_fnames[i]); + PTS_IF_FREE_MEM(conf->initial_fnames); + conf->files_count = 0; + + PTS_IF_FREE_MEM(conf->fname); + PTS_IF_FREE_MEM(conf->ppd); + PTS_IF_FREE_MEM(conf->paper_size.name); + conf->pages_count = 0; +} + + +int copy_preview_conf(struct preview_conf *dest, const struct preview_conf *src) +{ + int i; + PTS_RETV_IF(NULL == dest || NULL == src, -1, "Argument error"); + memset(dest, 0, sizeof(struct preview_conf)); + *dest = *src; + + dest->initial_fnames = calloc(src->files_count + 1, sizeof(char*)); + if (NULL == dest->initial_fnames) + goto ERR_CASE; + for (i = 0; i < src->files_count; ++i) { + dest->initial_fnames[i] = strdup(src->initial_fnames[i]); + if (NULL == dest->initial_fnames[i]) + goto ERR_CASE; + } + + dest->fname = strdup(src->fname); + dest->ppd = strdup(src->ppd); + dest->paper_size.name = strdup(src->paper_size.name); + if (NULL == dest->fname || NULL == dest->ppd + || NULL == dest->paper_size.name) + goto ERR_CASE; + + return 0; + +ERR_CASE: + destroy_preview_conf(dest); + PTS_RETV_IF(1, -1, "Insufficient memory"); +} + + +int init_preview_model(struct preview_model *model, + const struct preview_conf *conf, + struct preview_engine *engine) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || conf == NULL || engine == NULL, + -1, "Invalid argument"); + + //model->conf = *conf; + model->pages_state = malloc(sizeof(enum preview_page_state) + * (conf->pages_count + 1)); + PTS_RETV_IF(model->pages_state == NULL, -1, "Insufficient memory"); + + if (copy_preview_conf(&(model->conf), conf) < 0) { + PTS_IF_FREE_MEM(model->pages_state); + PTS_RETV_IF(1, -1, "Error in configuration copy"); + } + + int i; + for (i = 1; i <= conf->pages_count; ++i) { + model->pages_state[i] = PREVIEW_PAGE_STATE_NA; + } + + model->engine = engine; + model->empty_page_state = PREVIEW_PAGE_STATE_NA; + + PTS_TRACE_END; + return 0; +} + +void destroy_preview_model(struct preview_model *model) +{ + PTS_TRACE_BEGIN; + PTS_RET_IF(model == NULL, "Invalid argument"); + + PTS_IF_FREE_MEM(model->pages_state); + destroy_preview_conf(&(model->conf)); + + PTS_TRACE_END; +} + +int preview_model_request_empty_page(struct preview_model *model) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL, -1, "model is NULL"); + PTS_RETV_IF(model->pages_state == NULL, -1, "model is not initialized"); + + if (model->empty_page_state != PREVIEW_PAGE_STATE_READY) + preview_engine_send_page_message(model->engine, + PREVIEW_ENGINE_EVENT_EMPTY_PAGE_PROCESSING, 0); + + if (PREVIEW_PAGE_STATE_NA == model->empty_page_state) { + add_preview_task_empty_page( + &(model->engine->task_model), model); + model->empty_page_state = PREVIEW_PAGE_STATE_READY; + } else { + preview_engine_send_page_message(model->engine, + PREVIEW_ENGINE_EVENT_EMPTY_PAGE_READY, 0); + } + + PTS_TRACE_END; + return 0; +} + +int preview_model_request_page(struct preview_model *model, int page) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL, -1, "model is NULL"); + PTS_RETV_IF(model->pages_state == NULL, -1, "model is not initialized"); + PTS_RETV_IF(model->conf.pages_count - 1 < page - 1, -1 , "page is incorrect"); + + /* send message for empty page */ + if (model->pages_state[page] != PREVIEW_PAGE_STATE_READY) { + preview_engine_send_page_message(model->engine, + PREVIEW_ENGINE_EVENT_PAGE_PROCESSING, page); + } + + if (PREVIEW_PAGE_STATE_NA == model->pages_state[page]) { + add_preview_task(&(model->engine->task_model), page, model); + model->pages_state[page] = PREVIEW_PAGE_STATE_PROCESSING; + } else if (PREVIEW_PAGE_STATE_READY == model->pages_state[page]) { + preview_engine_send_page_message(model->engine, + PREVIEW_ENGINE_EVENT_PAGE_READY, page); + } + + PTS_TRACE_END; + return 0; +} + +int preview_model_page_available(struct preview_model *model, + enum preview_engine_event_status status, int page) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || model->pages_state == NULL, -1, "model is not initialized"); + + if (PREVIEW_ENGINE_EVENT_PAGE_READY == status) + model->pages_state[page] = PREVIEW_PAGE_STATE_READY; + else if (PREVIEW_ENGINE_EVENT_EMPTY_PAGE_READY == status) + model->empty_page_state = PREVIEW_PAGE_STATE_READY; + + preview_engine_send_page_message(model->engine, + status, page); + + PTS_TRACE_END; + return 0; +} + + +int preview_model_debug_print_pages_state(struct preview_model *model) +{ + int i; + int pages_count; + char *outstr; + char s; + + PTS_TRACE_BEGIN; + PTS_RETV_IF(NULL == model, -1, "Argument error"); + pages_count = model->conf.pages_count; + if (pages_count <= 0 || pages_count > PDF_PAGE_MAX_VAL) + return -1; + + outstr = malloc(sizeof(char) * (pages_count + 1)); + for (i = 1; i <= pages_count; ++i) { + s = '?'; + switch(model->pages_state[i]) { + case PREVIEW_PAGE_STATE_NA: + s = 'N'; + break; + case PREVIEW_PAGE_STATE_PROCESSING: + s = 'P'; + break; + case PREVIEW_PAGE_STATE_READY: + s = 'R'; + break; + case PREVIEW_PAGE_STATE_ERROR: + s = 'E'; + break; + } + outstr[i - 1] = s; + } + outstr[pages_count - 1] = '\0'; + PTS_DEBUG("pages: %d, state: %s", pages_count, outstr); + free(outstr); + + PTS_TRACE_END; + return 0; +} + diff --git a/mobileprint/preview_engine/lib/preview_task_model.c b/mobileprint/preview_engine/lib/preview_task_model.c new file mode 100644 index 0000000..99bbae7 --- /dev/null +++ b/mobileprint/preview_engine/lib/preview_task_model.c @@ -0,0 +1,552 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include +#include +#include +#include + +#include "pts_debug.h" + +#include "preview_task_model.h" + + +#define PREVIEWGEN_EXECUTABLE BINDIR "/previewgen-tool" +#define SHADOW_SIZE_PX_X 10 +#define SHADOW_SIZE_PX_Y 10 + +#define CMD_STR_MAX_LEN 1024 + +#define SINGLE_PAGE_PREVIEWGEN + + +/* TODO: task model destruction */ +enum preview_task_type { + PREVIEW_TASK_EMPTY_PAGE, + PREVIEW_TASK_GENERIC, + PREVIEW_TASK_INITIAL +}; + + +struct preview_task_data { + int page; + enum preview_task_type task_type; + struct preview_conf conf; + char out_pic_fname[sizeof(PREVIEW_TEMP_DIR "/mobileprint_xxxx.ppm ")]; + enum file_type ftype; + int is_task_ok; + + struct preview_model *pmodel; + struct preview_task_model *task_model; + char *previewgen_exe_cmd; +}; + + +int init_preview_task_model(struct preview_task_model *model, + struct preview_engine *engine) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || engine == NULL, -1 , "Invalid argument"); + + /*model->task_count = MAX_PREVIEW_TASK_COUNT; + model->tasks = malloc(sizeof(struct preview_task) * model->task_count); + if (NULL == model->tasks) { + model->task_count = 0; + return -1; + }*/ + model->task_list = NULL; + model->previewgen_handle = NULL; + model->event_handler = NULL; + model->is_stop_processing = 0; + model->engine = engine; + + //model->pdata = pdata; + PTS_TRACE_END; + return 0; +} + + +int clear_preview_task_queue(struct preview_task_model *task_model) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(task_model == NULL , -1 , "Invalid argument"); + + struct preview_task_data *ptd; + Eina_List *cur; + + if (task_model->task_list != NULL) { + /* clean task list */ + EINA_LIST_FOREACH(task_model->task_list, cur, ptd) { + PTS_IF_FREE_MEM(ptd); + } + eina_list_free(task_model->task_list); + } + task_model->task_list = NULL; + PTS_TRACE_END; + return 0; +} + + +int parse_previewgen_output(Ecore_Exe_Event_Data *data_from_process, + enum file_type ftype, int *pages_count) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(NULL == pages_count || NULL == data_from_process + || data_from_process->size <= 0, + -1, "Invalid argument"); + PTS_DEBUG("data_from_process->size : %d\n", data_from_process->size); + char *msg = calloc(1, data_from_process->size + 1); + PTS_RETV_IF(NULL == msg, -1, "Memory allocation error"); + + strncpy(msg, data_from_process->data, data_from_process->size); + msg[data_from_process->size] = '\0'; + *pages_count = 0; + + PTS_DEBUG("msg: %s", msg); + + switch (ftype) { + case FILE_TYPE_IMAGE: + sscanf(msg, "init img: pages count: %d", pages_count); + break; + case FILE_TYPE_PDF: + sscanf(msg, "init pdf: pages count: %d", pages_count); + break; + case FILE_TYPE_INCORRECT: + *pages_count = 0; + break; + } + PTS_IF_FREE_MEM(msg); + PTS_TRACE_END; + PTS_RETV_IF (*pages_count <= 0, -1, "Error"); + return 0; +} + + +static Eina_Bool preview_handler_end_cb(void *d, int type, void *event) +{ + PTS_TRACE_BEGIN; + + PTS_RETV_IF(d == NULL, ECORE_CALLBACK_DONE, "Invalid argument"); + + struct preview_task_data *ptd = (struct preview_task_data *)d; + struct preview_task_data *next_ptd; + struct preview_task_model *task_model = ptd->task_model; + int is_init_engine = 1; + int res; + + /* TODO: check for next initialization in queue */ + + switch (ptd->task_type) { + case PREVIEW_TASK_EMPTY_PAGE: + preview_model_page_available(ptd->pmodel, + PREVIEW_ENGINE_EVENT_EMPTY_PAGE_READY, + 0); + break; + case PREVIEW_TASK_GENERIC: + /* TODO: check does task OK (parse output) */ + //if (ptd->is_task_ok) { + preview_model_page_available(ptd->pmodel, + PREVIEW_ENGINE_EVENT_PAGE_READY, + ptd->page); + /*} else { + preview_model_page_available(ptd->pmodel, + PREVIEW_ENGINE_EVENT_PAGE_ERROR, + ptd->page); + }*/ + break; + case PREVIEW_TASK_INITIAL: + if (task_model->task_list != NULL) { + next_ptd = (struct preview_task_data *) + eina_list_data_get(task_model->task_list); + if (PREVIEW_TASK_INITIAL == next_ptd->task_type) { + is_init_engine = 0; + } + } + if (is_init_engine) { + res = parse_previewgen_output( + (Ecore_Exe_Event_Data *)event, + ptd->ftype, + &(ptd->conf.pages_count)); + if (res >= 0) + preview_engine_init_done(task_model->engine, + &(ptd->conf)); + /* TODO: ERROR condition in case of res < 0 */ + } + PTS_DEBUG("releasing memory"); + destroy_preview_conf(&(ptd->conf)); + PTS_DEBUG("memory released"); + break; + } + + task_model->previewgen_handle = NULL; + ecore_event_handler_del(task_model->event_handler); + task_model->event_handler = NULL; + PTS_DEBUG("Freeing memory"); + PTS_IF_FREE_MEM(ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd); + + /* manage tasks queue */ + if (task_model->task_list != NULL) { + ptd = (struct preview_task_data *) + eina_list_data_get(task_model->task_list); + task_model->task_list = eina_list_remove_list( + task_model->task_list, task_model->task_list); + task_model->previewgen_handle = + ecore_exe_pipe_run(ptd->previewgen_exe_cmd, + ECORE_EXE_PIPE_READ_LINE_BUFFERED + | ECORE_EXE_PIPE_READ, NULL); + if (NULL == task_model->previewgen_handle) { + PTS_DEBUG("ecore_exe_pipe_run error (%s)", + ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd); + PTS_TRACE_END; + return ECORE_CALLBACK_DONE; + } + task_model->event_handler = ecore_event_handler_add( + ECORE_EXE_EVENT_DATA, + preview_handler_end_cb, ptd); + } + + PTS_TRACE_END; + return ECORE_CALLBACK_DONE; +} + + +int add_preview_task_initial(struct preview_task_model *model, + const struct preview_conf *conf) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || conf == NULL, -1, "Invalid argument"); + + char *fnames_str; + struct preview_task_data *ptd; + int i; + int fnames_strlen; + + /* fill the preview_task_data structure */ + ptd = malloc(sizeof(struct preview_task_data)); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + + memset(ptd, 0, sizeof(struct preview_task_data)); + ptd->task_type = PREVIEW_TASK_INITIAL; + ptd->conf = *conf; + ptd->task_model = model; + /* fill cmd with arguments from ptd depending on file type*/ + /* TODO: check for each file */ + ptd->ftype = get_file_type(ptd->conf.initial_fnames[0]); + + ptd->previewgen_exe_cmd = NULL; + + enum page_scale_type scale_type = ptd->conf.scale.type; + switch (ptd->ftype) { + case FILE_TYPE_IMAGE: + /* calculate correct string length to support + many images*/ + fnames_strlen = 0; + for (i = 0; i < conf->files_count; ++i) + fnames_strlen += strlen(ptd->conf.initial_fnames[i]) + + 1; + fnames_str = (char*)malloc(sizeof(char) * (fnames_strlen + 1)); + if (NULL == fnames_str) { + PTS_IF_FREE_MEM(ptd); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + } + /* generate fnames list string */ + fnames_str[0] = '\0'; + for (i = 0; i < conf->files_count; ++i) { + strncat(fnames_str, ptd->conf.initial_fnames[i], + fnames_strlen); + strncat(fnames_str, " ", fnames_strlen); + } + fnames_str[fnames_strlen] = '\0'; + /* generate command string */ + ptd->previewgen_exe_cmd = (char*)malloc(sizeof(char) + * (CMD_STR_MAX_LEN + fnames_strlen + 1)); + if (NULL == ptd->previewgen_exe_cmd) { + PTS_IF_FREE_MEM(ptd); + PTS_IF_FREE_MEM(fnames_str); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + } + PTS_DEBUG("processing image"); + snprintf(ptd->previewgen_exe_cmd, CMD_STR_MAX_LEN, + PREVIEWGEN_EXECUTABLE " init img " + "%s%s %s %s %lf %lf %d %d %s %d %s %d %lf %lf %d", + fnames_str, ptd->conf.fname, + ptd->conf.ppd, ptd->conf.paper_size.name, + ptd->conf.paper_size.s.x, ptd->conf.paper_size.s.y, + ptd->conf.settings_req.available_size_px.x, + ptd->conf.settings_req.available_size_px.y, + (PAGE_ORIENTATION_LANDSCAPE == ptd->conf.orientation) + ? "landscape" : + (PAGE_ORIENTATION_PORTRAIT == ptd->conf.orientation) + ? "portrait" : "", + ptd->conf.n_up, + (SCALE_FIT_TO_PAPER == scale_type) ? "fit_to_paper" : + (SCALE_CUSTOM == scale_type) ? "custom" : + (SCALE_RELATIVE == scale_type) ? "relative" : + (SCALE_ORIGINAL == scale_type) ? "original" : "", + ptd->conf.scale.zoom, ptd->conf.scale.w, ptd->conf.scale.h, + ptd->conf.settings_req.is_grayscale); + PTS_IF_FREE_MEM(fnames_str); + PTS_DEBUG("cmd: %s", ptd->previewgen_exe_cmd); + break; + case FILE_TYPE_PDF: + PTS_DEBUG("processing PDF"); + ptd->previewgen_exe_cmd = malloc(sizeof(char) + * (CMD_STR_MAX_LEN + 1)); + snprintf(ptd->previewgen_exe_cmd, CMD_STR_MAX_LEN, + PREVIEWGEN_EXECUTABLE " init pdf " + "%s %s %s %s %lf %lf %s %d %s %d %lf %lf %d", + ptd->conf.initial_fnames[0], ptd->conf.fname, + ptd->conf.ppd, ptd->conf.paper_size.name, + ptd->conf.paper_size.s.x, ptd->conf.paper_size.s.y, + (PAGE_ORIENTATION_LANDSCAPE == ptd->conf.orientation) ? "landscape" : + (PAGE_ORIENTATION_PORTRAIT == ptd->conf.orientation) ? "portrait" : "", + ptd->conf.n_up, + (SCALE_FIT_TO_PAPER == scale_type) ? "fit_to_paper" : + (SCALE_CUSTOM == scale_type) ? "custom" : + (SCALE_RELATIVE == scale_type) ? "relative" : + (SCALE_ORIGINAL == scale_type) ? "original" : "", + ptd->conf.scale.zoom, ptd->conf.scale.w, ptd->conf.scale.h, + ptd->conf.settings_req.is_grayscale); + PTS_DEBUG("cmd: %s", ptd->previewgen_exe_cmd); + break; + case FILE_TYPE_INCORRECT: + PTS_DEBUG("Incorrect file type"); + PTS_IF_FREE_MEM(ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd); + PTS_TRACE_END; + return -1; + } + + /* TODO: clear task queue, disable generic tasks */ + clear_preview_task_queue(model); + + /* manage task queue */ + if (NULL != model->previewgen_handle) { + /* plan task for calculation in future */ + /* TODO: check, does we have current tasks in task model */ + model->task_list = eina_list_append(model->task_list, ptd); + /* TODO: leave only 4 last page requests in queue */ + } else { + /* this task is a top task - just process */ + model->previewgen_handle = ecore_exe_pipe_run( + ptd->previewgen_exe_cmd, + ECORE_EXE_PIPE_READ, NULL); + if (NULL == model->previewgen_handle) { + PTS_DEBUG("ecore_exe_pipe_run error (%s)", + ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd->previewgen_exe_cmd); + destroy_preview_conf(&(ptd->conf)); + PTS_IF_FREE_MEM(ptd); + PTS_TRACE_END; + return 0; + } + model->event_handler = ecore_event_handler_add( + ECORE_EXE_EVENT_DATA, + preview_handler_end_cb, ptd); + } + + PTS_TRACE_END; + return 0; +} + + +int process_preview_task_ptd(struct preview_task_model *model, + struct preview_task_data *ptd) +{ + struct preview_task_data *next_ptd; + + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || NULL == ptd, + -1, "Argument error"); + + if (NULL != model->previewgen_handle) { + if (NULL != model->task_list) { + next_ptd = (struct preview_task_data *) + eina_list_data_get(model->task_list); + if (next_ptd == NULL || PREVIEW_TASK_INITIAL + == next_ptd->task_type) { + /* incorret list content or initialization + is planned */ + PTS_IF_FREE_MEM(ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd); + PTS_TRACE_END; + return 0; + } + /* plan task for calculation in future */ + model->task_list = eina_list_append( + model->task_list, ptd); + } else { /* NULL == model->task_list */ + model->task_list = eina_list_append( + model->task_list, ptd); + } + /* TODO: leave only 4 last page requests in queue */ + } else { + /* this task is a top task - just process */ + model->previewgen_handle = ecore_exe_pipe_run( + ptd->previewgen_exe_cmd, + ECORE_EXE_PIPE_READ_LINE_BUFFERED + | ECORE_EXE_PIPE_READ, NULL); + if (NULL == model->previewgen_handle) { + PTS_DEBUG("ecore_exe_pipe_run error (%s)", + ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd->previewgen_exe_cmd); + PTS_IF_FREE_MEM(ptd); + PTS_TRACE_END; + return 0; + } + model->event_handler = ecore_event_handler_add( + ECORE_EXE_EVENT_DATA, + preview_handler_end_cb, ptd); + } + + PTS_TRACE_END; + return 0; +} + + +int add_preview_task_empty_page(struct preview_task_model *model, + struct preview_model *pmodel) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || pmodel == NULL, -1, "Invalid argument"); + PTS_RETV_IF(model->is_stop_processing, -1, "is_stop_processing is %d", + model->is_stop_processing); + + int res; + struct preview_task_data *ptd; + struct preview_task_data *next_ptd; + + /* fill the preview_task_data structure */ + ptd = malloc(sizeof(struct preview_task_data)); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + + ptd->page = 0; + ptd->task_type = PREVIEW_TASK_EMPTY_PAGE; + strncpy(ptd->out_pic_fname, PREVIEW_TEMP_DIR "/empty_page.ppm", sizeof(ptd->out_pic_fname) - 1); + ptd->is_task_ok = 0; + ptd->conf = pmodel->conf; + ptd->pmodel = pmodel; + ptd->task_model = model; + + ptd->previewgen_exe_cmd = malloc(sizeof(char) * (CMD_STR_MAX_LEN + 1)); + if (NULL == ptd->previewgen_exe_cmd) { + PTS_IF_FREE_MEM(ptd); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + } + + int to_be_previewed_as_landscape = + (PAGE_ORIENTATION_LANDSCAPE == ptd->conf.orientation); + /* for number_up 2 page should be rotated to be viewed correctly */ + if (2 == ptd->conf.n_up) { + switch_size_pts_coords(&(ptd->conf.paper_size.s)); + //switch_size_px_coords(&(ptd->conf.settings_req.available_size_px)); + } + + /* fill cmd with arguments from ptd */ + snprintf(ptd->previewgen_exe_cmd, CMD_STR_MAX_LEN, + PREVIEWGEN_EXECUTABLE " empty_gen " + "%s %lf %lf %d %d %d %d %d", + ptd->out_pic_fname, + ptd->conf.paper_size.s.x, ptd->conf.paper_size.s.y, + ptd->conf.settings_req.available_size_px.x, + ptd->conf.settings_req.available_size_px.y, + ptd->conf.settings_req.shadow_offset.x, + ptd->conf.settings_req.shadow_offset.y, + to_be_previewed_as_landscape); + PTS_DEBUG("cmd: %s", ptd->previewgen_exe_cmd); + + res = process_preview_task_ptd(model, ptd); + + PTS_TRACE_END; + return res; +} + + +int add_preview_task(struct preview_task_model *model, int page, + struct preview_model *pmodel) +{ + PTS_TRACE_BEGIN; + PTS_RETV_IF(model == NULL || pmodel == NULL , -1, "Invalid argument"); + PTS_RETV_IF(model->is_stop_processing, -1, "is_stop_processing is %d", model->is_stop_processing); + + int res; + struct preview_task_data *ptd; + struct preview_task_data *next_ptd; + + /* fill the preview_task_data structure */ + ptd = malloc(sizeof(struct preview_task_data)); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + + ptd->page = page; + ptd->task_type = PREVIEW_TASK_GENERIC; + snprintf(ptd->out_pic_fname, sizeof(ptd->out_pic_fname), + "/tmp/mobileprint/mobileprint_%04d.ppm", page); + ptd->is_task_ok = 0; + ptd->conf = pmodel->conf; + ptd->pmodel = pmodel; + ptd->task_model = model; + + ptd->previewgen_exe_cmd = malloc(sizeof(char) * (CMD_STR_MAX_LEN + 1)); + if (NULL == ptd->previewgen_exe_cmd) { + PTS_IF_FREE_MEM(ptd); + PTS_RETV_IF(ptd == NULL, -1, "malloc failed"); + } + + int to_be_previewed_as_landscape = (PAGE_ORIENTATION_LANDSCAPE == ptd->conf.orientation); + /* for number_up 2 page should be rotated to be viewed correctly */ + if (2 == ptd->conf.n_up) { + switch_size_pts_coords(&(ptd->conf.paper_size.s)); + //switch_size_px_coords(&(ptd->conf.settings_req.available_size_px)); + } + + /* fill cmd with arguments from ptd */ + snprintf(ptd->previewgen_exe_cmd, CMD_STR_MAX_LEN, + PREVIEWGEN_EXECUTABLE " pagegen " + "%s %d %s %lf %lf %d %d %d %d %d %d", + ptd->conf.fname, page, ptd->out_pic_fname, + ptd->conf.paper_size.s.x, ptd->conf.paper_size.s.y, + ptd->conf.settings_req.available_size_px.x, + ptd->conf.settings_req.available_size_px.y, + ptd->conf.settings_req.shadow_offset.x, + ptd->conf.settings_req.shadow_offset.y, + to_be_previewed_as_landscape, + ptd->conf.settings_req.is_grayscale); + PTS_DEBUG("cmd: %s", ptd->previewgen_exe_cmd); + + res = process_preview_task_ptd(model, ptd); + + PTS_TRACE_END; + return res; +} + + +int debug_print_preview_task_list(struct preview_task_model *model) +{ + /*struct preview_task_data *ptd; + Eina_List *cur; + char *outstr;*/ + PTS_DEBUG("task_list size: %d", eina_list_count(model->task_list)); + return 0; +} + diff --git a/mobileprint/previewgen/CMakeLists.txt b/mobileprint/previewgen/CMakeLists.txt new file mode 100644 index 0000000..a7b53b4 --- /dev/null +++ b/mobileprint/previewgen/CMakeLists.txt @@ -0,0 +1,11 @@ +#ADD_DEFINITIONS("-Wall -pedantic") #enable all warnings + +INCLUDE(FindPkgConfig) +pkg_check_modules(previewgen_pkgs REQUIRED dlog + evas ecore) +FOREACH(flag ${previewgen_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS_PREVIEWGEN "${EXTRA_CFLAGS_PREVIEWGEN} ${flag}") +ENDFOREACH(flag) + +ADD_SUBDIRECTORY(lib) +ADD_SUBDIRECTORY(util) diff --git a/mobileprint/previewgen/default.ppd b/mobileprint/previewgen/default.ppd new file mode 100644 index 0000000..86e758e --- /dev/null +++ b/mobileprint/previewgen/default.ppd @@ -0,0 +1,91 @@ +*PPD-Adobe: "4.3" +*FormatVersion: "4.3" +*FileVersion: "1.1" +*LanguageVersion: English +*LanguageEncoding: ISOLatin1 +*PCFileName: "default.ppd" +*Manufacturer: "Default Printer" +*Product: "Default Printer" +*cupsVersion: 1.2 +*cupsManualCopies: True +*cupsFilter: "application/vnd.cups-raster 0 -" +*ModelName: "Default Printer" +*ShortNickName: "Default Printer" +*NickName: "Default Printer" +*PSVersion: "(3010.000) 81501" +*LanguageLevel: "3" +*ColorDevice: True +*DefaultColorSpace: RGB +*FileSystem: False +*Throughput: "1" +*LandscapeOrientation: Plus90 +*VariablePaperSize: False +*TTRasterizer: Type42 + +*OpenUI *PageSize/Media Size: PickOne +*OrderDependency: 10 AnySetup *PageSize +*DefaultPageSize: A4 +*PageSize A4/A4: "<>setpagedevice" +*CloseUI: *PageSize + +*OpenUI *PageRegion: PickOne +*OrderDependency: 10 AnySetup *PageRegion +*DefaultPageRegion: A4 +*PageRegion A4/A4: "<>setpagedevice" +*CloseUI: *PageRegion + +*DefaultImageableArea: A4 +*ImageableArea A4/A4: "18 36 577 806" + +*DefaultPaperDimension: A4 +*PaperDimension A4/A4: "595 842" + +*OpenUI *MediaType/Media Type: PickOne +*OrderDependency: 10 AnySetup *MediaType +*DefaultMediaType: Plain +*MediaType Plain/Plain Paper: "<>setpagedevice" +*CloseUI: *MediaType + +*OpenUI *InputSlot/Media Source: PickOne +*OrderDependency: 10 AnySetup *InputSlot +*DefaultInputSlot: Tray +*InputSlot Tray/Tray: "<>setpagedevice" +*CloseUI: *InputSlot + +*OpenUI *Duplex/Double-Sided Printing: PickOne +*OrderDependency: 20 AnySetup *Duplex +*DefaultDuplex: None +*Duplex None/Off: "<>setpagedevice" +*CloseUI: *Duplex + +*OpenUI *Resolution/Output Resolution: PickOne +*OrderDependency: 20 AnySetup *Resolution +*DefaultResolution: 300dpi +*Resolution 300dpi/300 DPI: "<>setpagedevice" +*CloseUI: *Resolution + +*OpenUI *ColorModel/Output Mode: PickOne +*OrderDependency: 10 AnySetup *ColorModel +*DefaultColorModel: CMYK +*ColorModel W: "<>setpagedevice" +*ColorModel K: "<>setpagedevice" +*ColorModel CMYK: "<>setpagedevice" +*CloseUI: *ColorModel + +*OpenUI *cupsBitsPerColor/Bits Per Color: PickOne +*OrderDependency: 10 AnySetup *cupsBitsPerColor +*DefaultcupsBitsPerColor: 8 +*cupsBitsPerColor 8: "<>setpagedevice" +*CloseUI: *cupsBitsPerColor + +*OpenUI *cupsColorOrder/Color Order: PickOne +*OrderDependency: 10 AnySetup *cupsColorOrder +*DefaultcupsColorOrder: Chunked +*cupsColorOrder Chunked: "<>setpagedevice" +*CloseUI: *cupsColorOrder + +*DefaultFont: Times-Roman +*Font Times-Roman: Standard "(001.007S)" Standard ROM +*% +*% End of "$Id$". +*% diff --git a/mobileprint/previewgen/include/evas_render.h b/mobileprint/previewgen/include/evas_render.h new file mode 100644 index 0000000..61f730b --- /dev/null +++ b/mobileprint/previewgen/include/evas_render.h @@ -0,0 +1,37 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _EVAS_RENDER_H_INCLUDED_ +#define _EVAS_RENDER_H_INCLUDED_ + +#include + +#include "paper_size.h" + + +int init_buffer_canvas(Evas *canvas, const struct size_px *page_size); +int init_temp_buffer_canvas(Evas *canvas); +int reinit_buffer_canvas(Evas *canvas, const struct size_px *page_size); +Evas *create_canvas(const struct size_px *page_size); +void destroy_canvas(Evas *canvas); +void draw_scene(Evas *canvas); +void save_scene(Evas *canvas, const char *dest); + +#endif /* _EVAS_RENDER_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/image_scaler.h b/mobileprint/previewgen/include/image_scaler.h new file mode 100644 index 0000000..1f5b60e --- /dev/null +++ b/mobileprint/previewgen/include/image_scaler.h @@ -0,0 +1,29 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _IMAGE_SCALER_H_INCLUDED_ +#define _IMAGE_SCALER_H_INCLUDED_ + +#include "paper_size.h" + +int downscale_image(const char *fname, const char *outfname_ppm, + const struct size_px *available_size); + +#endif /* _IMAGE_SCALER_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/page_preview.h b/mobileprint/previewgen/include/page_preview.h new file mode 100644 index 0000000..cd0fab5 --- /dev/null +++ b/mobileprint/previewgen/include/page_preview.h @@ -0,0 +1,96 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PAGE_PREVIEW_H_INCLUDED_ +#define _PAGE_PREVIEW_H_INCLUDED_ + +#include + +#include +#include + +#include "pdfgen.h" + + +#define IMAGE_CONVERT_TEMP_FILE PREVIEW_TEMP_DIR "/convert_tmp.ppm" + + +Evas *get_pdf_preview_page_image(const char *fname, int first_page, + const struct preview_page_px *settings_px); + +int save_pdf_preview_page_image(const char *pdf_fname, int first_page, + const struct preview_page_req *settings_pts, + const char *out_pic_fname); +int save_empty_preview_page_image(const struct preview_page_req *settings_pts, + const char *out_pic_fname); + +#if 0 +int get_pdf_preview_pages(const char *fname, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, + int n_up, int is_original_size, int is_grayscale); + +int get_img_preview_pages(char **const fnames, int files_count, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, + int n_up, int is_original_size, int is_grayscale); +#endif + +int save_pdf_preview_page_image_w_np(void *img_buf, int img_size, + int page_num, int pages_count, + //const struct preview_page_req *settings_pts, + const struct preview_settings_px *settings_px, + const char *out_pic_fname); +int save_pdf_preview_page_image_w_np_fname(const char *pdf_fname, + int page_num, int pages_count, + const struct preview_settings_px *settings_px, + const char *out_pic_fname); + +int pdf2pdf_preview_pages(const char *fname, const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale); + +int img2pdf_preview_pages(const char *fname, const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale); +int img_files2pdf_preview_pages(char **const fnames, + int files_count, + const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale); + +int process_image_downscale(const char *fname, const char *out_fname, + const struct size_px *available_size_px); + +int load_pdf_page_img(const char *fname, int page, + const struct preview_page_px *settings_px, + void **out_img, int *size); + +#endif /* _PAGE_PREVIEW_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/paper_size.h b/mobileprint/previewgen/include/paper_size.h new file mode 100644 index 0000000..e7e9ae2 --- /dev/null +++ b/mobileprint/previewgen/include/paper_size.h @@ -0,0 +1,51 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PAPER_SIZE_H_INCLUDED_ +#define _PAPER_SIZE_H_INCLUDED_ + +//#include + +struct size_px { + int x; + int y; +}; + +struct size_pts { + double x; + double y; +}; + +struct paper_size_pts { + char *name; + struct size_pts s; +}; + +void switch_size_pts_coords(struct size_pts *s); +void switch_size_px_coords(struct size_px *s); +void add_size_pts(const struct size_pts *from, struct size_pts *to); +void neg_size_pts(struct size_pts *s); + +int get_paper_size_pts(const char *name, struct paper_size_pts *s); +int pts_size2px(const struct size_pts *s_pts, + const struct size_px *border_s_px, + struct size_px *px); + +#endif /* _PAPER_SIZE_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/pdfgen.h b/mobileprint/previewgen/include/pdfgen.h new file mode 100644 index 0000000..a50b3b6 --- /dev/null +++ b/mobileprint/previewgen/include/pdfgen.h @@ -0,0 +1,66 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PDFGEN_H_INCLUDED_ +#define _PDFGEN_H_INCLUDED_ + + +#define TEMP_PDFTOPDF_FNAME "/tmp/mobileprint/pdftopdf_tmp.pdf" + +#define SCALE_WALLET_W 3.30709 +#define SCALE_WALLET_H + +enum page_orientation { + //PAGE_ORIENTATION_AUTO, + PAGE_ORIENTATION_PORTRAIT=3, + PAGE_ORIENTATION_LANDSCAPE +}; + +enum page_scale_type { + SCALE_FIT_TO_PAPER, + SCALE_CUSTOM, + SCALE_RELATIVE, + SCALE_ORIGINAL +}; + +struct page_scale { + enum page_scale_type type; + int zoom; + double w; + double h; +}; + +struct pdfgen_settings { + int n_up; + char *paper_name; + char *ppd_filename; + struct page_scale scale; + enum page_orientation orientation; +}; + + +int call_pdftopdf(const char *path, const char *outfile, + const struct pdfgen_settings *settings); +int call_imagetopdf(const char *path, const char *outfile, + const struct pdfgen_settings *settings); +int call_pdfunite(char **const infiles_z, const char *outfile); + + +#endif /* _PDFGEN_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/pgen_debug.h b/mobileprint/previewgen/include/pgen_debug.h new file mode 100644 index 0000000..7d1425b --- /dev/null +++ b/mobileprint/previewgen/include/pgen_debug.h @@ -0,0 +1,120 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PGEN_DEBUG_H_INCLUDED_ +#define _PGEN_DEBUG_H_INCLUDED_ + + +/* debugging macros definitions */ + +/*#define PREVIEWGEN_STANDALONE_DEBUG*/ +#define PREVIEWGEN_DLOG_DEBUG +#if defined PREVIEWGEN_STANDALONE_DEBUG +/* standalone preview generation (e.g. for testing) */ + +#include + +#define PGEN_DEBUG(fmt, arg...) \ + do { \ + fprintf(stderr, "DEBUG:%s:%s(%d): " fmt "\n", \ + __FILE__, __func__, __LINE__, ##arg); \ + } while (0) +#define PGEN_TRACE_BEGIN fprintf(stderr, "TRACE:%s ENTER\n", __func__); +#define PGEN_TRACE_END fprintf(stderr, "TRACE:%s LEAVE\n", __func__); + +#define PGEN_RET_IF(expr, fmt, args...) \ + do { \ + if(expr) { \ + PGEN_DEBUG("[%s] Return, message "fmt, #expr, ##args );\ + return; \ + } \ + } while (0) + +#define PGEN_RETV_IF(expr, val, fmt, args...) \ + do { \ + if(expr) { \ + PGEN_DEBUG("[%s] Return value, message "fmt, #expr, ##args );\ + return (val); \ + } \ + } while (0) + +#define PGEN_IF_FREE_MEM(mem) \ + do { \ + if(mem) { \ + free(mem); \ + mem = NULL; \ + } \ + } while (0) + + +#elif defined PREVIEWGEN_DLOG_DEBUG +/* standalone debugging with dlog */ +#undef LOG_TAG +#define LOG_TAG "MOBILEPRINT_PREVIEWGEN" +#include + +#define PGEN_DEBUG LOGD +#define PGEN_INFO LOGI +#define PGEN_RET_IF(expr, fmt, args...) \ + do { \ + if(expr) { \ + PGEN_DEBUG("[%s] Return, message "fmt, \ + #expr, ##args ); \ + return; \ + } \ + } while (0) + +#define PGEN_RETV_IF(expr, val, fmt, args...) \ + do { \ + if(expr) { \ + PGEN_DEBUG("[%s] Return value, message "fmt, \ + #expr, ##args ); \ + return (val); \ + } \ + } while (0) + +#define PGEN_TRACE_BEGIN PGEN_INFO("ENTER FUNCTION: %s\n", __FUNCTION__); +#define PGEN_TRACE_END PGEN_INFO("EXIT FUNCTION: %s\n", __FUNCTION__); + +#define PGEN_IF_FREE_MEM(mem) \ + do { \ + if(mem) { \ + free(mem); \ + mem = NULL; \ + } \ + } while (0) + + +#else +/* connection to mobileprint debugging */ + +#include + +#define PGEN_DEBUG(fmt, arg...) PTS_DEBUG(fmt, ##arg) +#define PGEN_TRACE_BEGIN PTS_TRACE_BEGIN +#define PGEN_TRACE_END PTS_TRACE_END +#define PGEN_RET_IF PTS_RET_IF +#define PGEN_RETV_IF PTS_RETV_IF +#define PGEN_IF_FREE_MEM PTS_IF_FREE_MEM + +#endif /* PREVIEWGEN_DEBUG */ + + +#endif /* _PGEN_DEBUG_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/preview_coords.h b/mobileprint/previewgen/include/preview_coords.h new file mode 100644 index 0000000..588f1f0 --- /dev/null +++ b/mobileprint/previewgen/include/preview_coords.h @@ -0,0 +1,77 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEW_COORDS_H_INCLUDED_ +#define _PREVIEW_COORDS_H_INCLUDED_ + +#include +#include + + +#define PAGE_SIDE_SHOW_COEFF 0.1 +#define MIN_PAGE_SPACE_COEFF 0.06 + + +struct preview_page_req { + //struct paper_size_pts paper_size; + struct size_pts paper_size; + struct size_px available_size_px; + //struct size_pts border_size; + struct size_px shadow_offset; + //int is_landscape; + int is_rotate90; + int is_grayscale; + //struct size_pts *parts; + //int parts_count; + //int n_up2; /* power of 2 for n-up */ + //int is_borders; /* TODO: borders size */ + //int is_original_zoom; + //int page; /* number of real page */ +}; + +struct preview_page_px { + struct size_px full_size; + struct size_px paper_size; + struct size_px area_size; + struct size_px area_offset; + int is_grayscale; + int is_rotate90; + //int parts_count; +}; + +/* request for page with it's near parts */ +/*struct preview_settings_req { + struct preview_page_req page_req; +};*/ + +struct preview_settings_px { + struct preview_page_px page_px; + int center_off; + int left_off; + int right_off; + struct size_px full_size; +}; + +int get_preview_page_settings(const struct preview_page_req *req, + struct preview_page_px *res); +int get_preview_settings(const struct preview_page_req *req, + struct preview_settings_px *res); + +#endif /* _PREVIEW_COORDS_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/include/preview_util.h b/mobileprint/previewgen/include/preview_util.h new file mode 100644 index 0000000..ffe41eb --- /dev/null +++ b/mobileprint/previewgen/include/preview_util.h @@ -0,0 +1,28 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEW_UTIL_H_INCLUDED_ +#define _PREVIEW_UTIL_H_INCLUDED_ + +#include + +int get_image_resolution(const char *path, int *resx, int *resy); +int rotate90_image(Evas_Object *img); + +#endif /* _PREVIEW_UTIL_H_INCLUDED_ */ diff --git a/mobileprint/previewgen/include/previewgen.h b/mobileprint/previewgen/include/previewgen.h new file mode 100644 index 0000000..10e2351 --- /dev/null +++ b/mobileprint/previewgen/include/previewgen.h @@ -0,0 +1,64 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _PREVIEWGEN_H_INCLUDED_ +#define _PREVIEWGEN_H_INCLUDED_ + + +#include + +#include "paper_size.h" + + +#define PDF_PAGE_MAX_VAL 999999 +#define PDF_PAGE_MAX_STR_LEN (sizeof("999999") - 1) + + +struct pdf_preview_settings { + int w; + int h; + int page; /* page from 1 */ +}; + +enum file_type { + FILE_TYPE_IMAGE, + FILE_TYPE_PDF, + FILE_TYPE_INCORRECT +}; + +/* TODO: check for additional types */ +#define IMG_FILE_EXTS {"png", "ppm", "jpg", "jpeg", "tif", "tiff", "gif", \ + "bmp", "pcx", NULL} +#define PDF_FILE_EXT "pdf" + +#define PREVIEW_TEMP_DIR "/tmp/mobileprint" +#define IMG_TEMP_FILE_NAME PREVIEW_TEMP_DIR "/out.ppm" +#define PREVIEW_IMG_TEMP_FILE_NAME IMG_TEMP_FILE_NAME + + +int is_page_landscape(struct size_pts *s); +int get_pdf_page_size(const char *path, struct size_pts *s); +int get_pdf_pages_count(const char *path); +int get_pdf_preview(const char *path, + const struct pdf_preview_settings *settings, + void **out_img, int *size); +enum file_type get_file_type(const char *fname); + +#endif /* _PREVIEWGEN_H_INCLUDED_ */ + diff --git a/mobileprint/previewgen/lib/CMakeLists.txt b/mobileprint/previewgen/lib/CMakeLists.txt new file mode 100644 index 0000000..77a877d --- /dev/null +++ b/mobileprint/previewgen/lib/CMakeLists.txt @@ -0,0 +1,16 @@ +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/previewgen/include) + +FILE(GLOB SRCS *.c) + +#INCLUDE(FindPkgConfig) +#pkg_check_modules(previewgen_pkgs REQUIRED dlog +# evas +# ) +#FOREACH(flag ${previewgen_pkgs_CFLAGS}) +# SET(EXTRA_CFLAGS_PREVIEWGEN "${EXTRA_CFLAGS_PREVIEWGEN} ${flag}") +#ENDFOREACH(flag) + +ADD_LIBRARY(previewgen ${SRCS}) +SET_TARGET_PROPERTIES(previewgen PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS_PREVIEWGEN} -fpie") +#TARGET_LINK_LIBRARIES(previewgen ${previewgen_pkgs_LDFLAGS}) + diff --git a/mobileprint/previewgen/lib/evas_render.c b/mobileprint/previewgen/lib/evas_render.c new file mode 100644 index 0000000..18667ab --- /dev/null +++ b/mobileprint/previewgen/lib/evas_render.c @@ -0,0 +1,201 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include + +#include "paper_size.h" +#include "pgen_debug.h" + +#include "evas_render.h" + +int init_buffer_canvas(Evas *canvas, const struct size_px *page_size) +{ + PGEN_TRACE_BEGIN; + Evas_Engine_Info_Buffer *einfo; + Eina_Bool ret; + int method; + void *pixels; + int width = page_size->x; + int height = page_size->y; + + PGEN_RETV_IF(page_size == NULL || canvas == NULL, -1 , "Invalid argument"); + + method = evas_render_method_lookup("buffer"); + PGEN_RETV_IF(method <= 0 , -1, "method is less than zero"); + + evas_output_method_set(canvas, method); + evas_output_size_set(canvas, width, height); + evas_output_viewport_set(canvas, 0, 0, width, height); + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + PGEN_RETV_IF(einfo == NULL, -1, "einfo is NULL"); + + PGEN_DEBUG("pixels malloc(%d) width %d height %d ",width*height*sizeof(int), width, height); + pixels = malloc(width * height * sizeof(int)); + PGEN_RETV_IF(pixels == NULL, -1, "pixels is NULL"); + memset(pixels, 0, width * height * sizeof(int)); + + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + einfo->info.dest_buffer = pixels; + einfo->info.dest_buffer_row_bytes = width * sizeof(int); + einfo->info.use_color_key = 0; + einfo->info.alpha_threshold = 0; + einfo->info.func.new_update_region = NULL; + einfo->info.func.free_update_region = NULL; + ret = evas_engine_info_set(canvas, (Evas_Engine_Info *)einfo); + PGEN_RETV_IF(ret == EINA_FALSE, -1, "Failed to evas_engine_info_set"); + + PGEN_TRACE_END; + return 0; +} + +int init_temp_buffer_canvas(Evas *canvas) +{ + PGEN_RETV_IF(canvas == NULL, -1 , "Invalid argument"); + struct size_px page_size = {100, 100}; + return init_buffer_canvas(canvas, &page_size); +} + +int reinit_buffer_canvas(Evas *canvas, const struct size_px *page_size) +{ + Evas_Engine_Info_Buffer *einfo; + void *oldbuf; + + PGEN_RETV_IF(canvas == NULL || page_size == NULL, -1, "Invalid argument"); + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + PGEN_RETV_IF(einfo == NULL, -1 , "einfo is NULL"); + + oldbuf = einfo->info.dest_buffer; + if (init_buffer_canvas(canvas, page_size) < 0) { + return -1; + } + //memcpy(einfo->info.dest_buffer, oldbuf, 100 * 100 * sizeof(int)); + PGEN_IF_FREE_MEM(oldbuf); + + return 0; +} + +/** + * @brief Provides Evas canvas based on memory buffer + * (based on Evas usage example) + * @param[in] page size in px + * @return canvas based on memory buffer + */ +Evas *create_canvas(const struct size_px *page_size) +{ + PGEN_TRACE_BEGIN; + Evas *canvas; + PGEN_RETV_IF(page_size == NULL, NULL, "Invalid argument"); + + canvas = evas_new(); + PGEN_RETV_IF(canvas == NULL, NULL, "canvas is NULL"); + + if (init_buffer_canvas(canvas, page_size) < 0) { + evas_free(canvas); + return NULL; + } + + PGEN_TRACE_END; + return canvas; +} + +void destroy_canvas(Evas *canvas) +{ + PGEN_TRACE_BEGIN; + PGEN_RET_IF(canvas == NULL, "Invalid argument"); + + Evas_Engine_Info_Buffer *einfo; + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + if (!einfo) { + PGEN_DEBUG("ERROR: could not get evas engine info!\n"); + evas_free(canvas); + return; + } + PGEN_IF_FREE_MEM(einfo->info.dest_buffer); + evas_free(canvas); + + PGEN_TRACE_END; +} + +/** + * @brief Renders canvas (based on Evas usage example) + * @param[in] canvas canvas to render + */ +void draw_scene(Evas *canvas) +{ + PGEN_TRACE_BEGIN; + PGEN_RET_IF(canvas == NULL, "Invalid argument"); + + Eina_List *updates;/*, *n;*/ + /*Eina_Rectangle *update; */ + + /* render and get the updated rectangles: */ + updates = evas_render_updates(canvas); + + /* free list of updates */ + evas_render_updates_free(updates); + + PGEN_TRACE_END; +} + +/** + * @brief Saves canvas to specified image file in PPM format + * (based on Evas usage example) + * @param[in] canvas canvas to save + * @param[in] dest output PPM file name + */ +void save_scene(Evas *canvas, const char *dest) +{ + PGEN_TRACE_BEGIN; + PGEN_RET_IF(canvas == NULL || dest == NULL, "Invalid argument"); + + Evas_Engine_Info_Buffer *einfo; + const unsigned int *pixels, *pixels_end; + int width, height; + FILE *f; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); + PGEN_RET_IF(einfo == NULL, "einfo is NULL"); + + evas_output_size_get(canvas, &width, &height); + f = fopen(dest, "wb+"); + PGEN_RET_IF(f == NULL, "ERROR: could not open for writing '%s': %s",dest, strerror(errno)); + + pixels = einfo->info.dest_buffer; + pixels_end = pixels + (width * height); + + /* PPM P6 format is dead simple to write: */ + fprintf(f, "P6\n%d %d\n255\n", width, height); + for (; pixels < pixels_end; pixels++) { + int r, g, b; + + r = ((*pixels) & 0xff0000) >> 16; + g = ((*pixels) & 0x00ff00) >> 8; + b = (*pixels) & 0x0000ff; + + fprintf(f, "%c%c%c", r, g, b); + } + + fclose(f); + PGEN_DEBUG("saved scene as '%s'\n", dest); + + PGEN_TRACE_END; +} + diff --git a/mobileprint/previewgen/lib/image_scaler.c b/mobileprint/previewgen/lib/image_scaler.c new file mode 100644 index 0000000..91ff2c4 --- /dev/null +++ b/mobileprint/previewgen/lib/image_scaler.c @@ -0,0 +1,101 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include + +#include "evas_render.h" +#include "paper_size.h" +#include "pgen_debug.h" +#include "preview_util.h" + +#include "image_scaler.h" + +#define DOWNSCALE_LEVEL 2 + +int downscale_image(const char *fname, const char *outfname_ppm, + const struct size_px *available_size) +{ + Evas *canvas; + Evas_Object *img; + int rw, rh; + struct size_pts rsize; + struct size_px pic_size = {400, 400}; + struct size_px size_limits; + + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(fname == NULL || outfname_ppm == NULL || available_size == NULL, -1, "Invalid argument"); + + PGEN_DEBUG("available_size(%d,%d)",available_size->x, available_size->y); + + size_limits.x = available_size->x / DOWNSCALE_LEVEL; + size_limits.y = available_size->y / DOWNSCALE_LEVEL; + + if (get_image_resolution(fname, &rw, &rh) < 0) { + PGEN_TRACE_END; + return -1; + } + + PGEN_RETV_IF(rw <= 0 || rh <= 0, -1, "Failed to get resolution"); + + rsize.x = rw; + rsize.y = rh; + PGEN_DEBUG("size_limits before: (%d, %d)", + size_limits.x, size_limits.y); + if (rsize.x > rsize.y) { + if (size_limits.x < size_limits.y) { + switch_size_px_coords(&size_limits); + } + } else if (size_limits.x > size_limits.y) { + switch_size_px_coords(&size_limits); + } + PGEN_DEBUG("size_limits after: (%d, %d)", + size_limits.x, size_limits.y); + pts_size2px(&rsize, &size_limits, &pic_size); + + PGEN_DEBUG("new canvas"); + PGEN_DEBUG("canvas init, (%d; %d)", pic_size.x, pic_size.y); + + canvas = create_canvas(&pic_size); + PGEN_RETV_IF(canvas == NULL, -1, "canvas is NULL"); + + /*PGEN_DEBUG("new image");*/ + img = evas_object_image_filled_add(canvas); + if (NULL == img) { + destroy_canvas(canvas); + PGEN_TRACE_END; + return -1; + } + /*PGEN_DEBUG("setting image file %s", fname);*/ + evas_object_image_file_set(img, fname, NULL); + + evas_object_resize(img, pic_size.x, pic_size.y); + evas_object_move(img, 0, 0); + evas_object_show(img); + + /*PGEN_DEBUG("canvas draw");*/ + draw_scene(canvas); + /*PGEN_DEBUG("saving canvas in %s", outfname_ppm);*/ + save_scene(canvas, outfname_ppm); + destroy_canvas(canvas); + + PGEN_TRACE_END; + return 0; +} + diff --git a/mobileprint/previewgen/lib/page_preview.c b/mobileprint/previewgen/lib/page_preview.c new file mode 100644 index 0000000..d05d168 --- /dev/null +++ b/mobileprint/previewgen/lib/page_preview.c @@ -0,0 +1,661 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +/*#include */ + +#include +#include +#include +#include +#include + +#include + +const int gl_is_image_downscale = 1; +const int gl_is_half_pdf_raster = 1; + +/** + * @brief Get PDF page content image + * @param[in] canvas canvas of new image object + * @param[in] img_buf + * @param[in] img_size + * @return image object with page content image + */ +Evas_Object *get_pdf_img(Evas *canvas, + void *img_buf, int img_size) +{ + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(canvas == NULL || img_buf == NULL || img_size <= 0, NULL, "Invalid argument"); + + Evas_Object *img = NULL; + img = evas_object_image_filled_add(canvas); + evas_object_image_memfile_set(img, img_buf, img_size,"ppm", NULL); + PGEN_IF_FREE_MEM(img_buf); /* copy saved in image */ + + PGEN_TRACE_END; + return img; +} + +/** + * @brief Grayscales provided RGBA pixel + * @param[in] rgba_val pixel to grayscale + * @result grayscaled pixel + */ +inline int grayscale_rgba(int rgba_val) +{ + /* just sumple formula for sRGB conversion, maybe gamma-correction + or color profile using is required */ + unsigned char *bytes = (unsigned char *)&rgba_val; + double res = 0.21 * bytes[0] + 0.72 * bytes[1] + 0.07 * bytes[2]; + int i; + + for (i = 0; i < 3; ++i) { + bytes[i] = (unsigned char)res; + } + + return rgba_val; +} + +/** + * @brief Grayscales image + * @param[in] img image to grayscale + */ +void grayscale_img(Evas_Object *img) +{ + int h; + int w; + int i; + int *data; + + PGEN_TRACE_BEGIN; + PGEN_RET_IF(img == NULL, "Invalid argument"); + + evas_object_image_size_get(img, &w, &h); + PGEN_RET_IF(w == 0 || h == 0 , "can't get (w, h)"); + PGEN_DEBUG("grayscale_img(): size: (%d, %d)", w, h); + + data = evas_object_image_data_get(img, EINA_TRUE); + PGEN_RET_IF(data == NULL, "can't get data"); + + for (i = 0; i < w * h; ++i) { + data[i] = grayscale_rgba(data[i]); + } + evas_object_image_data_set(img, data); + + PGEN_TRACE_END; +} + +int set_canvas_background(Evas *canvas, const struct size_px *full_size) +{ + Evas_Object *bg; + + PGEN_RETV_IF(canvas == NULL || full_size == NULL, -1, "Invalid argument"); + + /* background */ + bg = evas_object_rectangle_add(canvas); + //evas_object_color_set(bg, 242, 238, 233, 255); + //evas_object_color_set(bg, 255, 255, 255, 255); + evas_object_color_set(bg, 0, 0, 0, 255); + evas_object_move(bg, 0, 0); + evas_object_resize(bg, full_size->x, full_size->y); + evas_object_show(bg); + + return 0; +} + +/** + * @brief Set blank preview page image on provided canvas + * @param[in-out] canvas Canvas to draw page image + * @param[in] b_s Full page image size (with shadow, + * border) + * @param[in] p_s Page size (to put page image) + * @param[in] border_size Page border size + * @param[in] off Page image offset on canvas + * @result Error code, 0 is OK, <0 - error + */ +int set_preview_page(Evas *canvas, + const struct size_px *b_s, const struct size_px *p_s, + const struct size_px *border_size, + const struct size_px *off) +{ + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(canvas == NULL || b_s == NULL || p_s == NULL || off == NULL, -1 , "Invalid argument"); + + Evas_Object *bg; + int shadow_offset_x; + int shadow_offset_y; + + shadow_offset_x = (b_s->x - p_s->x); + shadow_offset_y = (b_s->y - p_s->y); + + bg = evas_object_rectangle_add(canvas); + evas_object_color_set(bg, 50, 50, 50, 255); /* shadow color */ + evas_object_move(bg, shadow_offset_x + off->x - border_size->x * 2, + shadow_offset_y + off->y - border_size->y * 2); + evas_object_resize(bg, p_s->x + border_size->x, + p_s->y + border_size->y); + evas_object_show(bg); + + bg = evas_object_rectangle_add(canvas); + evas_object_color_set(bg, 0, 0, 0, 255); /* border color */ + evas_object_move(bg, off->x, off->y); + evas_object_resize(bg, p_s->x + border_size->x * 2, + p_s->y + border_size->y * 2); + evas_object_show(bg); + + bg = evas_object_rectangle_add(canvas); + evas_object_color_set(bg, 255, 255, 255, 255); /* page color */ + evas_object_move(bg, border_size->x + off->x, border_size->y + off->y); + evas_object_resize(bg, p_s->x, p_s->y); + evas_object_show(bg); + + PGEN_TRACE_END; + return 0; +} + +int load_pdf_page_img(const char *fname, int page, + const struct preview_page_px *settings_px, + void **out_img, int *size) +{ + struct pdf_preview_settings pdf_settings; + PGEN_RETV_IF(fname == NULL || page <= 0 || settings_px == NULL || out_img == NULL || size == NULL + , -1 , "Invalid argument"); + + /* put page image */ + pdf_settings.w = settings_px->area_size.x; + pdf_settings.h = settings_px->area_size.y; + if (gl_is_half_pdf_raster) { + /* half-rasterization hack is used to increase speed */ + pdf_settings.w = pdf_settings.w / 2; + pdf_settings.h = pdf_settings.h / 2; + } + pdf_settings.page = page; + + return get_pdf_preview(fname, &pdf_settings, out_img, size); +} + +/** + * + * + * + */ +int set_pdf_preview_page_image(Evas *canvas, + void *img_buf, int img_size, + const struct size_px *off, + const struct preview_page_px *settings_px) +{ + PGEN_RETV_IF(canvas == NULL || img_buf == NULL || img_size <=0 || off == NULL || settings_px == NULL + , -1 , "Invalid argument"); + + Evas_Object *img; + struct size_px border_size = {1, 1}; + + if (set_preview_page(canvas, &(settings_px->full_size), + &(settings_px->paper_size), &border_size, off) < 0) { + PGEN_DEBUG("ERROR in set_preview_page()"); + return -1; + } + + img = get_pdf_img(canvas, img_buf, img_size); + PGEN_RETV_IF(img == NULL, -1 , "img is NULL"); + + if (settings_px->is_rotate90 + && rotate90_image(img) < 0) { + PGEN_DEBUG("ERROR in rotate90_image()"); + return -1; + } + evas_object_resize(img, settings_px->area_size.x, + settings_px->area_size.y); + if (settings_px->is_grayscale) { + PGEN_DEBUG("Grayscaling image"); + grayscale_img(img); + } + + evas_object_move(img, settings_px->area_offset.x + off->x, + settings_px->area_offset.y + off->y); + evas_object_show(img); + + return 0; +} + + +/** + * @brief Writes preview page images to file + * @param[in] pdf_fname input PDF file name + * @param[in] page_num page number + * @param[in] settings_pts preview generation settings + * @param[in] out_pic_fname output image file name (PPM) + * @return -1 error + * 0 OK + */ +int save_pdf_preview_page_image(const char *pdf_fname, int page_num, + const struct preview_page_req *settings_pts, + const char *out_pic_fname) +{ + Evas *canvas; + struct preview_page_px settings_px; + struct size_px off = {0, 0}; + void *img_buf; + int img_size; + + PGEN_TRACE_BEGIN; + + if (get_preview_page_settings(settings_pts, &settings_px) < 0) { + PGEN_DEBUG("ERROR: get_pdf_preview_page_image():" + " get_preview_page_settings()"); + PGEN_TRACE_END; + return -1; + } + + canvas = create_canvas(&(settings_px.full_size)); + PGEN_RETV_IF(canvas == NULL, -1, "canvas is NULL"); + + /* till we save page images in PPM this is required */ + if (set_canvas_background(canvas, &(settings_px.full_size)) < 0) { + PGEN_DEBUG("ERROR in set_canvas_background()"); + destroy_canvas(canvas); + PGEN_TRACE_END; + return -1; + } + + if (load_pdf_page_img(pdf_fname, page_num, &settings_px, + &img_buf, &img_size) < 0) { + destroy_canvas(canvas); + PGEN_TRACE_END; + return -1; + } + + PGEN_RETV_IF(img_buf == NULL, -1, "img_buf is NULL"); + if (set_pdf_preview_page_image(canvas, img_buf, img_size, + &off, &settings_px) < 0) { + PGEN_DEBUG("ERROR in set_pdf_preview_page_image()"); + destroy_canvas(canvas); + PGEN_TRACE_END; + return -1; + } + + draw_scene(canvas); + save_scene(canvas, out_pic_fname); + destroy_canvas(canvas); + + PGEN_TRACE_END; + + return 0; +} + + +int save_empty_preview_page_image(const struct preview_page_req *settings_pts, + const char *out_pic_fname) +{ + Evas *canvas; + struct preview_page_px settings_px; + struct size_px off = {0, 0}; + struct size_px border_size = {1, 1}; + + PGEN_TRACE_BEGIN; + + if (get_preview_page_settings(settings_pts, &settings_px) < 0) { + PGEN_DEBUG("ERROR: get_pdf_preview_page_image():" + " get_preview_page_settings()"); + PGEN_TRACE_END; + return -1; + } + + canvas = create_canvas(&(settings_px.full_size)); + PGEN_RETV_IF(canvas == NULL, -1, "canvas is NULL"); + + /* till we save page images in PPM this is required */ + if (set_canvas_background(canvas, &(settings_px.full_size)) < 0) { + PGEN_DEBUG("ERROR in set_canvas_background()"); + destroy_canvas(canvas); + PGEN_TRACE_END; + return -1; + } + + if (set_preview_page(canvas, &(settings_px.full_size), + &(settings_px.paper_size), &border_size, &off) < 0) { + PGEN_DEBUG("ERROR in set_preview_page()"); + destroy_canvas(canvas); + PGEN_TRACE_END; + return -1; + } + + draw_scene(canvas); + save_scene(canvas, out_pic_fname); + destroy_canvas(canvas); + + PGEN_TRACE_END; + + return 0; +} + + +/* fix pdftopdf page rotation problem by manual scaling option */ +int fix_pdf_page_scale(const char *fname, + const struct size_pts *req_size, + struct pdfgen_settings *settings) +{ + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(NULL == fname || NULL == req_size || NULL == settings, -1, "Invalid argument"); + + struct size_pts input_pdf_pts = {0.0, }; + + int result = get_pdf_page_size(fname, &input_pdf_pts); + PGEN_RETV_IF(result < 0, -1, "can't get pdf page size"); + + /* check rotation */ + if ((PAGE_ORIENTATION_LANDSCAPE == settings->orientation + && input_pdf_pts.x < input_pdf_pts.y) + || (PAGE_ORIENTATION_PORTRAIT == settings->orientation + && input_pdf_pts.x > input_pdf_pts.y)) { + double tmp = input_pdf_pts.x; + input_pdf_pts.x = input_pdf_pts.y; + input_pdf_pts.y = tmp; + + /*when page is rotated we need to fix its size + if source page is small and desired is big, then enlarge + if source is big and desired is small, diminish*/ + int zoomHorizontal = + (int)(100 * req_size->x / input_pdf_pts.x); + int zoomVertical = + (int)(100 * req_size->y / input_pdf_pts.y); + + /* minimal zoom is needed from vertical/horizontal + - for the whole picture fitness */ + settings->scale.zoom = (zoomHorizontal < zoomVertical) + ? zoomHorizontal : zoomVertical; + settings->scale.type = SCALE_RELATIVE; + } + settings->scale.w = 0; + settings->scale.h = 0; + + PGEN_DEBUG("page zoom fix calculated"); + PGEN_DEBUG("input_pdf_size (x,y) = (%lf, %lf)", + input_pdf_pts.x, input_pdf_pts.y); + PGEN_DEBUG("req_size (x,y) = (%lf, %lf)", + req_size->x, req_size->y); + + PGEN_TRACE_END; + return 0; +} + + +/** + * @brief Generates preview images for all PDF pages in temporary files + * (/tmp/mobileprint_xxxx.ppm) + * @param[in] fname PDF file name + * @param[in] paper_size paper size in pts + * @param[in] available_size_px available size for images in px + * @param[in] is_grayscale is image must be grascaled + * @return -1 error + * > 0 generated pages count + */ +int generate_pdf_preview_pages(const char *fname, + const struct size_pts *paper_size, + const struct size_px *available_size_px, + int is_grayscale) +{ + int pages_count; + int cur_page; + struct size_pts page_size = {0.0, 0.0}; + + struct size_px shadow_size_px = {10, 10}; + struct preview_page_req settings_req; + /*struct preview_settings_px settings_px;*/ + char out_fname[sizeof("/tmp/mobileprint_xxxx.ppm ")]; + + PGEN_TRACE_BEGIN; + + /*PGEN_DEBUG("available_size: (%d, %d)", + available_size_px->x, available_size_px->y);*/ + + + if (get_pdf_page_size(fname, &page_size) < 0) { + PGEN_DEBUG("ERROR in get_pdf_page_size()\n"); + return -1; + } + pages_count = get_pdf_pages_count(fname); + if (pages_count <= 0) { + PGEN_DEBUG("ERROR: pages_count = %d (<=0)\n", pages_count); + return -1; + } + + settings_req.paper_size = *paper_size; + settings_req.available_size_px = *available_size_px; + settings_req.shadow_offset = shadow_size_px; + settings_req.is_rotate90 = 0; + settings_req.is_grayscale = is_grayscale; + + /*if (get_preview_settings(&settings_req, &settings_px) < 0) { + PGEN_DEBUG("ERROR in get_preview_settings()"); + PGEN_TRACE_END; + return -1; + }*/ + + for (cur_page = 0; cur_page < pages_count; ++cur_page) { + snprintf(out_fname, sizeof(out_fname), "/tmp/mobileprint_%04d.ppm", cur_page + 1); + save_pdf_preview_page_image(fname, + cur_page + 1, &settings_req, + out_fname); + } + + PGEN_TRACE_END; + return pages_count; +} + + +/** + * @brief Process PDF preview generation with CUPS filters to PDF with + * specific options + * @param[in] fname input PDF file name + * @param[in] printer_ppd_fname PPD file name for current active printer + * @param[in] paper_size paper size with CUPS name + * @param[in] orientation requested printing orientation + * @param[in] n_up number-up + * @param[in] scale scaling of image + * @param[in] is_grayscale image must be grascaled + * @return -1 error + * 0 success + */ +int pdf2pdf_preview_pages(const char *fname, const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale) +{ + struct pdfgen_settings pg_settings; + + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(!fname || !scale, -1, "Invalid argument"); + PGEN_DEBUG("processing file name: %s", fname); + + /* generate result pdf */ + pg_settings.n_up = n_up; + pg_settings.paper_name = paper_size->name; + pg_settings.scale = *scale; + pg_settings.orientation = orientation; + pg_settings.ppd_filename = (char *)printer_ppd_fname; + + int result = fix_pdf_page_scale(fname, &(paper_size->s), &pg_settings); + PGEN_RETV_IF(result < 0, -1, "ERROR in fix_pdf_page_scale()"); + + PGEN_DEBUG("pg_settings.paper_name = %s", pg_settings.paper_name); + PGEN_DEBUG("pg_settings.orientation = %d", + (int)pg_settings.orientation); + PGEN_DEBUG("pg_settings.scale.zoom = %d", pg_settings.scale.zoom); + PGEN_DEBUG("pg_settings.scale.type = %d", + (int)pg_settings.scale.type); + + result = call_pdftopdf(fname, out_pdf_fname, &pg_settings); + PGEN_RETV_IF(result < 0, -1, "ERROR in call_pdftopdf()"); + + PGEN_TRACE_END; + return 0; +} + + +/** + * @brief Process PDF preview generation with CUPS filters into temporary + * pages image files (/tmp/mobileprint_xxxx.ppm) + * @param[in] fname input PDF file name + * @param[in] paper_size paper size with CUPS name + * @param[in] available_size_px available size for image in px + * @param[in] orientation requested printing orientation + * @param[in] n_up number-up + * @param[in] scale + * @param[in] is_grayscale image must be grascaled + * @return -1 error + * > 0 generated pages count + */ +int get_pdf_preview_pages(const char *fname, const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, + int n_up, const struct page_scale *scale, int is_grayscale) +{ + int res; + PGEN_TRACE_BEGIN; + pdf2pdf_preview_pages(fname, out_pdf_fname, printer_ppd_fname, + paper_size, orientation, + n_up, scale, is_grayscale); + + res = generate_pdf_preview_pages(TEMP_PDFTOPDF_FNAME, + &(paper_size->s), available_size_px, + is_grayscale); + PGEN_TRACE_END; + return res; +} + + +int process_image_downscale(const char *fname, const char *out_fname, + const struct size_px *available_size_px) +{ + struct size_px new_size; + PGEN_RETV_IF(fname == NULL || out_fname == NULL || available_size_px == NULL, -1, "Invalid argument"); + new_size.x = available_size_px->x / 2; + new_size.y = available_size_px->y / 2; + downscale_image(fname, out_fname, &new_size); + return 0; +} + +int img2pdf_preview_pages(const char *fname, const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale) +{ + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(!fname || !out_pdf_fname || !printer_ppd_fname || + !paper_size || !available_size_px || !scale, + -1, "Invalid argument"); + + struct pdfgen_settings pg_settings; + + /* generate result pdf */ + + /* TODO: use pdfunite for multiple files, currently only first file */ + pg_settings.n_up = n_up; + pg_settings.paper_name = paper_size->name; + pg_settings.scale = *scale; + pg_settings.orientation = orientation; + pg_settings.ppd_filename = (char *)printer_ppd_fname; + + int result = call_imagetopdf(fname, out_pdf_fname, &pg_settings); + PGEN_RETV_IF(result < 0, -1, "ERROR in call_imagetopdf()"); + + PGEN_TRACE_END; + return 0; +} + + +int img_files2pdf_preview_pages(char **const fnames, + int files_count, + const char *out_pdf_fname, + const char *printer_ppd_fname, + const struct paper_size_pts *paper_size, + const struct size_px *available_size_px, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale) +{ + int i; + struct pdfgen_settings pg_settings; + int out_fname_size = sizeof(PREVIEW_TEMP_DIR "/mobileprint_xxxx.pdf "); + int res; + char **out_fnames; + char *cur_fname; + int is_err = 0; + PGEN_TRACE_BEGIN; + + PGEN_RETV_IF(files_count <= 0 || files_count > 9999, + -1, "Incorrect files_count"); + + pg_settings.n_up = 1; /* TODO: n_up */ + pg_settings.paper_name = paper_size->name; + pg_settings.scale = *scale; + pg_settings.orientation = orientation; + pg_settings.ppd_filename = (char *)printer_ppd_fname; + + /* generate images pdf files and their files list */ + out_fnames = (char **)malloc(sizeof(char*) * (files_count + 1)); + PGEN_RETV_IF(NULL == out_fnames, -1, "Out of memory"); + memset(out_fnames, 0, sizeof(char*) * (files_count + 1)); + for (i = 0; i < files_count; ++i) { + cur_fname = (char*)malloc( + sizeof(char) * (out_fname_size + 1)); + if (NULL == cur_fname) { + is_err = 1; + break; + } + out_fnames[i] = cur_fname; + cur_fname[out_fname_size] = '\0'; + snprintf(cur_fname, out_fname_size, + PREVIEW_TEMP_DIR "/mobileprint_%04d.pdf", + i + 1); + res = call_imagetopdf(fnames[i], cur_fname, &pg_settings); + PGEN_DEBUG("res = %d, i = %d", res, i); + } + + /* connect images pdf files into one file */ + if (!is_err) + res = call_pdfunite(out_fnames, out_pdf_fname); + + /* free allocated memory */ + for (i = 0; i < files_count; ++i) + PGEN_IF_FREE_MEM(out_fnames[i]); + PGEN_IF_FREE_MEM(out_fnames); + if (is_err) + PGEN_RETV_IF(1, -1, "Out of memory"); + + + PGEN_TRACE_END; + return 0; +} + diff --git a/mobileprint/previewgen/lib/paper_size.c b/mobileprint/previewgen/lib/paper_size.c new file mode 100644 index 0000000..b951871 --- /dev/null +++ b/mobileprint/previewgen/lib/paper_size.c @@ -0,0 +1,142 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include + +#include "pgen_debug.h" + +#include "paper_size.h" + + +/* could be used as stub for paper size */ +struct paper_size_pts paper_sizes[] = { + {"L", {890,1270}}, + {"2L", {1270,1780}}, + {"Hagaki_Postcard", {1000,1480}}, + {"Business_card", {540,856}}, + {"4x6", {1016,1524}}, + {"8x10", {2032,2540}}, + {"Letter", { 612, 792 }}, + {"11x17", {2794,4318}}, + {"A4", { 595, 842 }}, + {"A5", { 420, 595 }}, + {"B5", { 516, 729 }}, + {NULL, { 0, 0 }} +}; + + +void switch_size_pts_coords(struct size_pts *s) +{ + PGEN_RET_IF(s == NULL, "Invalid argument"); + double val; + val = s->x; + s->x = s->y; + s->y = val; +} + +void switch_size_px_coords(struct size_px *s) +{ + PGEN_RET_IF(s == NULL, "Invalid argument"); + int val; + val = s->x; + s->x = s->y; + s->y = val; +} + +void add_size_pts(const struct size_pts *from, struct size_pts *to) +{ + PGEN_RET_IF(from == NULL || to == NULL, "Invalid argument"); + to->x += from->x; + to->y += from->y; +} + + +void neg_size_pts(struct size_pts *s) +{ + PGEN_RET_IF(s == NULL, "Invalid argument"); + s->x = -s->x; + s->y = -s->y; +} + + +/** + * @brief Works with fixed list of sizes! + * In mobileprint only for usage as stub. + * @param[in] name paper name + * @param[out] s paper size + */ +int get_paper_size_pts(const char *name, struct paper_size_pts *s) +{ + int i; + struct paper_size_pts *cur_s; + + PGEN_RETV_IF(name == NULL || s == NULL, -1, "Invalid argument"); + + for (i = 0; paper_sizes[i].name != NULL; ++i) { + cur_s = &(paper_sizes[i]); + /* call without of limit is safe till we have static page + sizes */ + if (strcmp(cur_s->name, name) == 0) { + //memcpy(s, cur_s, sizeof(*cur_s)); + *s = *cur_s; + return 0; + } + } + + return 1; +} + + +/** + * @brief get raster size for specifyed borders + * @param[in] s_pts size in points + * @param[in] border_s_px specified borders of available size + * @param[out] px raster size + */ +int pts_size2px(const struct size_pts *s_pts, + const struct size_px *border_s_px, + struct size_px *px) +{ + PGEN_TRACE_BEGIN; + + double ratio_x; + double ratio_y; + + PGEN_RETV_IF(s_pts == NULL || border_s_px == NULL || px == NULL, -1 , "Invalid argument"); + + ratio_x = border_s_px->x / s_pts->x; + ratio_y = border_s_px->y / s_pts->y; + + /* get smallest one */ + if (ratio_x > ratio_y) { + ratio_x = ratio_y; + } else { + ratio_y = ratio_x; + } + + /* result */ + px->x = ratio_x * s_pts->x; + px->y = ratio_y * s_pts->y; + + PGEN_DEBUG("px->x px->y :(%d, %d)",px->x, px->y); + PGEN_TRACE_END; + return 0; +} + diff --git a/mobileprint/previewgen/lib/pdfgen.c b/mobileprint/previewgen/lib/pdfgen.c new file mode 100644 index 0000000..c073164 --- /dev/null +++ b/mobileprint/previewgen/lib/pdfgen.c @@ -0,0 +1,237 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include + +#include "pgen_debug.h" +#include "previewgen.h" +#include "preview_util.h" + +#include "pdfgen.h" + + +#define CUPS_OPTION_PORTRAIT "orientation-requested=3" +#define CUPS_OPTION_LANDSCAPE "orientation-requested=4" + +#define CUPS_FILTER_DIR "/usr/lib/cups/filter" + +#define PPI_MAX_VAL 10000 +#define PPI_STR_MAX_LEN sizeof("10000") + +#define PDFGEN_CMDSTR_MAXLEN 1024 + +#define PDFUNITE_PATH "/usr/bin/pdfunite" + +/** + * @brief This function securely executes cmd line request with popen + * @param[in] cmd_str command line to execute + * @return 0 success + * -1 error + */ +int call_cmd(const char *cmd_str) +{ + PGEN_TRACE_BEGIN; + + //NOTICE : Use popen or fork/execv function instead of system() which has security hole. + + FILE *cmd_output = popen(cmd_str, "r"); + if (cmd_output == NULL) { + PGEN_DEBUG("popen error (%s)", cmd_str); + PGEN_TRACE_END; + return -1; + } + + char *str_buf = NULL; + size_t len = 0; + ssize_t read_len = 0; + + do { + read_len = getline(&str_buf, &len, cmd_output); + } while (read_len != -1); + + PGEN_IF_FREE_MEM(str_buf); + pclose(cmd_output); + + PGEN_TRACE_END; + return 0; +} + +/** + * @brief This function forms and executes cmd line request to CUPS + * pdftopdf filter to convert PDF file + * @param[in] path path to destination PDF file + * @param[in] outfile destination file name + * @param[in] settings several settings of generating PDF + * @return 0 success + * -1 error + */ +int call_pdftopdf(const char *infile, const char *outfile, + const struct pdfgen_settings *settings) +{ + PGEN_TRACE_BEGIN; + + PGEN_RETV_IF(infile == NULL || outfile == NULL || settings == NULL || settings->ppd_filename == NULL, + -1, "Invalid argument"); + + int err_code = 0; + char cmd_str[1024]; + + /* placing n_up number of pages on the specified media */ + snprintf(cmd_str, 1024, "PPD=%s " CUPS_FILTER_DIR "/pdftopdf job user title 1 \"%s number-up=%d PageSize=%s fit-to-page=True pdftopdfAutoRotate=false\" \"%s\"" + " >%s 2> " PREVIEW_TEMP_DIR "/errlog", + settings->ppd_filename, + PAGE_ORIENTATION_PORTRAIT == settings->orientation ? CUPS_OPTION_PORTRAIT : + PAGE_ORIENTATION_LANDSCAPE == settings->orientation ? CUPS_OPTION_LANDSCAPE : "", + settings->n_up, + settings->paper_name, infile, outfile); + + PGEN_DEBUG("call_pdftopdf(): %s", cmd_str); + err_code = call_cmd(cmd_str); + PGEN_RETV_IF(err_code, -1, "call_pdftopdf returned non-zero error code"); + + PGEN_TRACE_END; + return err_code; +} + + +int strcat_img_scale_option(char *res, const char *img_path, + const struct page_scale *scale) +{ + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(res == NULL , -1 , "res is NULL"); + PGEN_RETV_IF(img_path == NULL , -1 , "img_path is NULL"); + PGEN_RETV_IF(scale == NULL , -1 , "scale is NULL"); + //PGEN_RETV_IF(scale->w == 0 , -1 , "scale->w is 0"); + + int imgw; + int imgh; + int ppi; + char ppi_str[PPI_STR_MAX_LEN + 1]; + int result; + + switch (scale->type) { + case SCALE_FIT_TO_PAPER: + strcat(res, "fit-to-page=true"); + return 0; + case SCALE_ORIGINAL: + strcat(res, "scaling=100"); + return 0; + case SCALE_CUSTOM: + break; + } + + result = get_image_resolution(img_path, &imgw, &imgh); + PGEN_RETV_IF(result < 0, -1 , "Can't get resolution"); + + ppi = (double)imgw / scale->w; + PGEN_RETV_IF(ppi >= PPI_MAX_VAL, -1 , "Resolution is too big"); + + snprintf(ppi_str, PPI_STR_MAX_LEN, "%d", ppi); + ppi_str[PPI_STR_MAX_LEN] = '\0'; + strcat(res, "PPI="); + strcat(res, ppi_str); + + return 0; +} + + +/** + * @brief This function forms and executes cmd line request to CUPS + * imagetopdf filter to convert image to PDF file + * @param[in] path path to destination PDF file + * @param[in] outfile destination file name + * @param[in] settings several settings of generating PDF + * @return 0 success + * -1 error + */ +int call_imagetopdf(const char *infile, const char *outfile, + const struct pdfgen_settings *settings) +{ + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(infile== NULL || outfile == NULL || settings == NULL || settings->ppd_filename == NULL, + -1 , "Invalid argument"); + + int err_code = 0; + char cmd_str[1024]; + char scale_str[256]; + + scale_str[0] = '\0'; + strcat_img_scale_option(scale_str, infile, &(settings->scale)); + + /* placing n_up number of pages on the specified media */ + snprintf(cmd_str, 1024, "PPD=%s " CUPS_FILTER_DIR + "/imagetopdf job user title 1 \"%s" + " number-up=%d PageSize=%s" + /*fit-to-page=%s*/ + " %s" + " \" \"%s\"" + " >%s 2> /tmp/mobileprint/errlog", + settings->ppd_filename, + PAGE_ORIENTATION_PORTRAIT == settings->orientation + ? CUPS_OPTION_PORTRAIT " " + : PAGE_ORIENTATION_LANDSCAPE == settings->orientation + ? CUPS_OPTION_LANDSCAPE " " + : "", + settings->n_up, + settings->paper_name, + /*SCALE_FIT_TO_PAPER == settings->scale.type + ? "True" : "False",*/ + scale_str, + infile, outfile); + + PGEN_DEBUG("call_imagetopdf(): %s", cmd_str); + err_code = call_cmd(cmd_str); + PGEN_RETV_IF(err_code, -1, "call_pdftopdf returned non-zero error code"); + + PGEN_TRACE_END; + return 0; +} + + +int call_pdfunite(char **const infiles_z, const char *outfile) +{ + int err_code = 0; + char cmd_str[PDFGEN_CMDSTR_MAXLEN + 1]; + int i; + + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(NULL == infiles_z || NULL == infiles_z[0] + || NULL == outfile, -1, "Argument error"); + + cmd_str[0] = '\0'; + strncat(cmd_str, PDFUNITE_PATH, PDFGEN_CMDSTR_MAXLEN); + + i = 0; + while (infiles_z[i] != NULL) { + strncat(cmd_str, " ", PDFGEN_CMDSTR_MAXLEN); + strncat(cmd_str, infiles_z[i], PDFGEN_CMDSTR_MAXLEN); + ++i; + } + + strncat(cmd_str, " ", PDFGEN_CMDSTR_MAXLEN); + strncat(cmd_str, outfile, PDFGEN_CMDSTR_MAXLEN); + cmd_str[PDFGEN_CMDSTR_MAXLEN] = '\0'; + + err_code = call_cmd(cmd_str); + + PGEN_TRACE_END; + return 0; +} + diff --git a/mobileprint/previewgen/lib/preview_coords.c b/mobileprint/previewgen/lib/preview_coords.c new file mode 100644 index 0000000..9d0348c --- /dev/null +++ b/mobileprint/previewgen/lib/preview_coords.c @@ -0,0 +1,173 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include "paper_size.h" +#include "pgen_debug.h" + +#include "preview_coords.h" + + +void debug_print_preview_page_req(const struct preview_page_req *r) +{ + PGEN_DEBUG("+-----------------------------+"); + PGEN_DEBUG("| struct preview_page_req |"); + PGEN_DEBUG("+---------------------+-------+"); + PGEN_DEBUG("| paper_size.x | %5f |", r->paper_size.x); + PGEN_DEBUG("| paper_size.y | %5f |", r->paper_size.y); + PGEN_DEBUG("| available_size_px.x | %5d |", r->available_size_px.x); + PGEN_DEBUG("| available_size_px.y | %5d |", r->available_size_px.y); + PGEN_DEBUG("| shadow_offset.x | %5d |", r->shadow_offset.x); + PGEN_DEBUG("| shadow_offset.y | %5d |", r->shadow_offset.y); + PGEN_DEBUG("| is_rotate90 | %5d |", r->is_rotate90); + PGEN_DEBUG("+---------------------+-------+"); +} + + +void debug_print_preview_page_px(const struct preview_page_px *s) +{ + PGEN_DEBUG("+------------------------+"); + PGEN_DEBUG("| struct preview_page_px |"); + PGEN_DEBUG("+---------------+--------+"); + PGEN_DEBUG("| full_size.x | %6d |", s->full_size.x); + PGEN_DEBUG("| full_size.y | %6d |", s->full_size.y); + PGEN_DEBUG("| paper_size.x | %6d |", s->paper_size.x); + PGEN_DEBUG("| paper_size.y | %6d |", s->paper_size.y); + PGEN_DEBUG("| area_size.x | %6d |", s->area_size.x); + PGEN_DEBUG("| area_size.y | %6d |", s->area_size.y); + PGEN_DEBUG("| area_offset.x | %6d |", s->area_offset.x); + PGEN_DEBUG("| area_offset.y | %6d |", s->area_offset.y); + PGEN_DEBUG("| is_grayscale | %6d |", s->is_grayscale); + PGEN_DEBUG("| is_rotate90 | %6d |", s->is_rotate90); + PGEN_DEBUG("+---------------+--------+"); +} + + +void debug_print_preview_settings_px(const struct preview_settings_px *s) +{ + PGEN_DEBUG("+----------------------------+"); + PGEN_DEBUG("| struct preview_settings_px |"); + PGEN_DEBUG("+-------------+--------------+"); + PGEN_DEBUG("| center_off | %9d |", s->center_off); + PGEN_DEBUG("| left_off | %9d |", s->left_off); + PGEN_DEBUG("| right_off | %9d |", s->right_off); + PGEN_DEBUG("| full_size.x | %9d |", s->full_size.x); + PGEN_DEBUG("| full_size.y | %9d |", s->full_size.y); + PGEN_DEBUG("+-------------+--------------+"); +} + + +int process_preview_page_settings(const struct preview_page_req *req, + struct preview_page_px *res) +{ + PGEN_RETV_IF(req == NULL || res == NULL, -1, "Invalid argument"); + + /*debug_print_preview_page_req(req);*/ + + if (pts_size2px(&(req->paper_size), &(req->available_size_px), + &(res->full_size)) < 0) { + PGEN_DEBUG("ERROR: pts_size2px()\n"); + return -1; + } + + res->paper_size.x = res->full_size.x - req->shadow_offset.x; + res->paper_size.y = res->full_size.y - req->shadow_offset.y; + + res->area_offset.x = 2; + res->area_offset.y = 2; + + res->area_size.x = res->paper_size.x - res->area_offset.x * 2; + res->area_size.y = res->paper_size.y - res->area_offset.y * 2; + + res->is_grayscale = req->is_grayscale; + res->is_rotate90 = req->is_rotate90; + + /*debug_print_preview_page_px(res);*/ + + return 0; +} + +/* for backward compatibility */ +int get_preview_page_settings(const struct preview_page_req *req, + struct preview_page_px *res) +{ + struct preview_page_req newreq; + + PGEN_RETV_IF(req == NULL || res == NULL, -1, "Invalid argument"); + + newreq = *req; + + if (req->is_rotate90) { + switch_size_pts_coords(&(newreq.paper_size)); + } + + return process_preview_page_settings(&newreq, res); +} + + +int get_preview_settings(const struct preview_page_req *req, + struct preview_settings_px *res) +{ + struct size_pts canvas_size; + double side_w_pts; + double space_w_pts; + struct preview_page_req newreq; + + PGEN_RETV_IF(req == NULL || res == NULL, -1, "Invalid argument"); + + /*debug_print_preview_page_req(req);*/ + + newreq = *req; + + if (req->is_rotate90) { + switch_size_pts_coords(&(newreq.paper_size)); + } + + /* calculate space for page images */ + /* we will use smaller side of page */ + side_w_pts = req->paper_size.x * PAGE_SIDE_SHOW_COEFF; + space_w_pts = req->paper_size.x * MIN_PAGE_SPACE_COEFF; + canvas_size.y = newreq.paper_size.y; + canvas_size.x = newreq.paper_size.x + side_w_pts * 2 + space_w_pts * 2; + + if (pts_size2px(&canvas_size, &(req->available_size_px), + &(newreq.available_size_px)) < 0) { + PGEN_DEBUG("ERROR: full_size: pts_size2px()\n"); + return -1; + } + + /* calculate single-page size */ + //newreq.available_size_px = res->full_size; + process_preview_page_settings(&newreq, &(res->page_px)); + + res->full_size.x = req->available_size_px.x; + res->full_size.y = newreq.available_size_px.y; + + /* calculate offsets */ + res->center_off = res->full_size.x / 2 - res->page_px.full_size.x / 2; + res->left_off = res->page_px.full_size.x * (PAGE_SIDE_SHOW_COEFF - 1); + res->right_off = res->full_size.x + - res->page_px.full_size.x * PAGE_SIDE_SHOW_COEFF; + + /*debug_print_preview_settings_px(res);*/ + + return 0; +} + diff --git a/mobileprint/previewgen/lib/preview_util.c b/mobileprint/previewgen/lib/preview_util.c new file mode 100644 index 0000000..9a6c27a --- /dev/null +++ b/mobileprint/previewgen/lib/preview_util.c @@ -0,0 +1,131 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include +#include +//#include + +#include "pgen_debug.h" + +#include "preview_util.h" + + +int get_image_resolution(const char *path, int *resx, int *resy) +{ + PGEN_TRACE_BEGIN; + int width = 0; + int height = 0; + + Evas *canvas; + Ecore_Evas *ee; + + Evas_Object *img; + + PGEN_RETV_IF(path == NULL || resx == NULL || resy == NULL, -1 , "Invalid argument"); + + ee = ecore_evas_buffer_new(1, 1); + PGEN_RETV_IF(ee == NULL, -1 , "ee is NULL"); + + canvas = ecore_evas_get(ee); + img = evas_object_image_add(canvas); + + evas_object_image_file_set(img, NULL, NULL); + evas_object_image_load_orientation_set(img, EINA_TRUE); + evas_object_image_load_scale_down_set(img, 0); + + evas_object_image_file_set(img, path, NULL); + Evas_Load_Error error = evas_object_image_load_error_get(img); + if (error != EVAS_LOAD_ERROR_NONE) { + PGEN_DEBUG("Decoding Error(%d) : %s", error, path); + evas_object_del(img); + ecore_evas_free(ee); + return -1; + } + + evas_object_image_size_get(img, &width, &height); + + evas_object_image_file_set(img, NULL, NULL); + evas_object_del(img); + + ecore_evas_free(ee); + + *resx = width; + *resy = height; + + PGEN_DEBUG("width & height is [%d, %d]", width, height); + + PGEN_TRACE_END; + return 0; +} + + +/** + * @brief Rotate image on 90 degrees + * @param[in] img image to rotate + */ +int rotate90_image(Evas_Object *img) +{ + int *old_data; + int *new_data; + int *outp; /* current writing pointer */ + int w; + int h; + int data_size; + int off; /* offset from output beginning */ + + int ix; + int iy; + + PGEN_TRACE_BEGIN; + PGEN_RETV_IF(img == NULL, -1, "Invalid argument"); + + /* allocate temporary memory */ + evas_object_image_size_get(img, &w, &h); + PGEN_RETV_IF(w == 0 || h == 0 , -1, "Failed to allocate memory"); + PGEN_DEBUG("w = %d h = %d", w, h); + + data_size = w * h; + old_data = evas_object_image_data_get(img, EINA_FALSE); + PGEN_RETV_IF(old_data == NULL, -1 , "Failed to get image data"); + + new_data = malloc(sizeof(int) * (data_size + 1)); + PGEN_RETV_IF(new_data == NULL, -1 , "Failed to malloc"); + + /* write rotated image data */ + for (iy = 0; iy < h; ++iy) + for (ix = 0; ix < w; ++ix) { + off = h * (ix + 1) - 1 - iy; + if (off < 0 || off >= data_size) { + PGEN_DEBUG("ERROR: off = %d, lim: %d", off, data_size); + } + outp = new_data + off; + *outp = old_data[ix + w * iy]; + } + + /* store rotated image */ + evas_object_image_size_set(img, h, w); + evas_object_image_data_copy_set(img, new_data); + PGEN_IF_FREE_MEM(new_data); + + PGEN_TRACE_END; + return 0; +} + diff --git a/mobileprint/previewgen/lib/previewgen.c b/mobileprint/previewgen/lib/previewgen.c new file mode 100644 index 0000000..8db4a5c --- /dev/null +++ b/mobileprint/previewgen/lib/previewgen.c @@ -0,0 +1,447 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include //basename and dirname +#include +#include +#include +#include +#include +#include +#include + +#include "pgen_debug.h" +#include "previewgen.h" + +#define PDF_CONV_UTIL "/usr/bin/pdftoppm" +#define PDF_INFO_UTIL "/usr/bin/pdfinfo" +#define MAX_PATH_LEN 4096 +#define IMG_MAX_SIZE (1024 * 1024 * 2) /* 2MB */ +#define PDF_INFO_STR_MAX_SIZE 511 + +#define PDF_INFO_TEMP_FNAME "/tmp/mobileprint/pdfinfo.txt" + +#define PDF_PX_MAX_VAL 999999 +#define PDF_PX_VAL_MAX_STR_LEN (sizeof("999999") - 1) + + +/* Just simple stub for further development + TODO: use pipe output, current implementation have high security risk +*/ +int call_pdftoppm(const char *path, const struct pdf_preview_settings *settings) +{ + char conv_cmd[] = PDF_CONV_UTIL " "; //" -f 1 -l 1 "; + char output_cmd[] = " > " IMG_TEMP_FILE_NAME; + char *cmd_str; + char x_val_str[PDF_PX_VAL_MAX_STR_LEN + 1]; + char y_val_str[PDF_PX_VAL_MAX_STR_LEN + 1]; + char page_str[PDF_PAGE_MAX_VAL + 1]; + int path_len; + int cmd_len; + + PGEN_RETV_IF(path == NULL || settings == NULL, -1, "Invalid argument"); + path_len = strnlen(path, MAX_PATH_LEN); + PGEN_RETV_IF(path_len <= 0 || path_len >= MAX_PATH_LEN, -1, "path_len is out of scope"); + + /* check for correct picture size */ + if (settings->w >= PDF_PX_MAX_VAL + || settings->w <= 0 + || settings->h >= PDF_PX_MAX_VAL + || settings->h <= 0 + || settings->page < 0 + || settings->page >= PDF_PAGE_MAX_VAL) { + PGEN_DEBUG("call_pdftoppm(): ERROR in settings;" + " w = %d, h = %d, page = %d", + settings->w, settings->h, settings->page); + return -1; + } + + x_val_str[0] = '\0'; + snprintf(x_val_str, sizeof(x_val_str), "%d", settings->w); + y_val_str[0] = '\0'; + snprintf(y_val_str, sizeof(y_val_str), "%d", settings->h); + page_str[0] = '\0'; + snprintf(page_str, sizeof(page_str), "%d", settings->page); + + + cmd_len = (sizeof(conv_cmd) - 1) + + strlen("-f ") + strlen(page_str) + 1 + + strlen("-l ") + strlen(page_str) + 1 + + strlen("-scale-to-x ") + strlen(x_val_str) + 1 + + strlen("-scale-to-y ") + strlen(y_val_str) + 1 + + path_len + sizeof(output_cmd); + cmd_str = malloc(sizeof(char) * (cmd_len + 1)); + + PGEN_RETV_IF(cmd_str == NULL, -1, "cmd_str malloc failed"); + memset(cmd_str, 0, sizeof(char) * (cmd_len + 1)); + cmd_str[0] = '\0'; + + strcat(cmd_str, conv_cmd); + strcat(cmd_str, "-f "); + strcat(cmd_str, page_str); + strcat(cmd_str, " "); + strcat(cmd_str, "-l "); + strcat(cmd_str, page_str); + strcat(cmd_str, " "); + strcat(cmd_str, "-scale-to-x "); + strcat(cmd_str, x_val_str); + strcat(cmd_str, " "); + strcat(cmd_str, "-scale-to-y "); + strcat(cmd_str, y_val_str); + strcat(cmd_str, " "); + strcat(cmd_str, path); + strcat(cmd_str, output_cmd); + + cmd_str[cmd_len] = '\0'; + + PGEN_DEBUG("call_pdftoppm(): cmd_str = %s", cmd_str); + + if (system(cmd_str) < 0) { + PGEN_DEBUG("Failed to call system"); + } + + PGEN_IF_FREE_MEM(cmd_str); + + return 0; +} + + +int call_pdfinfo(const char *path, const char *field) +{ + char *cmd_str; + int path_len; + int cmd_len; + + PGEN_RETV_IF(path == NULL || field == NULL, -1, "Invalid argument"); + path_len = strnlen(path, MAX_PATH_LEN); + PGEN_RETV_IF(path_len <= 0 || path_len >= MAX_PATH_LEN, -1, "path_len is out of scope"); + + cmd_len = sizeof(PDF_INFO_UTIL) + sizeof(" '") + path_len + + sizeof("' | grep '") + strlen(field) + + strlen("' > " PDF_INFO_TEMP_FNAME); // strlen(output_cmd); + cmd_str = malloc(sizeof(char) * (cmd_len + 1)); + + PGEN_RETV_IF(cmd_str == NULL, -1, "cmd_str malloc failed"); + memset(cmd_str, 0, sizeof(char) * (cmd_len + 1)); + + cmd_str[0] = '\0'; + strcat(cmd_str, PDF_INFO_UTIL); + strcat(cmd_str, " '"); + strcat(cmd_str, path); + strcat(cmd_str, "' | grep '"); + strcat(cmd_str, field); + strcat(cmd_str, "' > " PDF_INFO_TEMP_FNAME); + //strcat(cmd_str, output_cmd); + cmd_str[cmd_len] = '\0'; + + PGEN_DEBUG("call_pdfinfo(): cmd_str = %s", cmd_str); + + if (system(cmd_str) < 0) { + PGEN_DEBUG("Failed to call system"); + } + + PGEN_IF_FREE_MEM(cmd_str); + + return 0; +} + + +/** + * @brief + * @param[in] path path to PDF file + */ +int call_pdfinfo_pagesize(const char *path) +{ + /* TODO: page number */ + return call_pdfinfo(path, "Page size:"); +} + + +int call_pdfinfo_pages(const char *path) +{ + return call_pdfinfo(path, "Pages:"); +} + + +int is_page_landscape(struct size_pts *s) +{ + PGEN_RETV_IF(s == NULL, -1, "Invalid argument"); + + if (s->x > s->y) { + return 1; + } + + return 0; +} + + +/** + * @brief get PDF file page size in pts + * @param[in] path PDF file path + * @param[out] ow width in pts + * @param[out] oh height in pts + */ +int get_pdf_page_size(const char *path, struct size_pts *s) +{ + int res; + char cmd_str[MAX_PATH_LEN] = {0,}; + + PGEN_RETV_IF(path == NULL || s == NULL, -1, "Invalid argument"); + + //NOTICE : Usage : pdfinfo [options] , we use "pdfinfo " to get page size + snprintf(cmd_str, MAX_PATH_LEN, "%s %s", PDF_INFO_UTIL, path); + PGEN_DEBUG("call_pdfinfo(): cmd_str = %s", cmd_str); + + FILE *fp = NULL; + if ((fp=popen(cmd_str, "r"))==NULL) { + PGEN_DEBUG("popen error(%s)",cmd_str); + return -1; + } + + char *str_buf = NULL; + size_t len = 0; + ssize_t read_len = 0; + char temp[MAX_PATH_LEN] = {0,}; + + do { + read_len = getline(&str_buf, &len, fp); + if (strstr(str_buf, "Page size:") != NULL) { + res = sscanf(str_buf, "Page size:\t%lf x %lf%s", &(s->x), &(s->y), temp); + if (res != 3) { + PGEN_DEBUG("ERROR: get_pdf_page_size(): incorrect output\n"); + return -1; + } + break; + } else { + continue; + } + } while (read_len != -1); + PGEN_IF_FREE_MEM(str_buf); + + PGEN_DEBUG("Page size : [%f %f]",s->x, s->y); + + int ret = pclose(fp); + if (!WIFEXITED(ret) || (WEXITSTATUS(ret) != 0)) { + PGEN_DEBUG("pclose error!"); + } + + return 0; +} + +/** + * + * + * + */ +int get_pdf_pages_count(const char *path) +{ + PGEN_RETV_IF(path == NULL, -1, "Invalid argument"); + + int res = -1; + int val = -1; + int path_len = 0; + char cmd_str[MAX_PATH_LEN] = {0,}; + + path_len = strnlen(path, MAX_PATH_LEN); + PGEN_RETV_IF(path_len <= 0 || path_len >= MAX_PATH_LEN, -1, "path_len is out of scope"); + + //NOTICE : Usage : pdfinfo [options] , we use "pdfinfo " to get pages + snprintf(cmd_str, MAX_PATH_LEN, "%s %s", PDF_INFO_UTIL, path); + PGEN_DEBUG("call_pdfinfo(): cmd_str = %s", cmd_str); + + FILE *fp = NULL; + if ((fp=popen(cmd_str, "r"))==NULL) { + PGEN_DEBUG("popen error(%s)",cmd_str); + return -1; + } + + char *str_buf = NULL; + size_t len = 0; + ssize_t read_len = 0; + + do { + read_len = getline(&str_buf, &len, fp); + if (strstr(str_buf, "Pages:") != NULL) { + res = sscanf(str_buf, "Pages:\t%d", &val); + if (res != 1) { + PGEN_DEBUG("ERROR: get_pdf_pages_count(): incorrect output\n"); + return -1; + } + break; + } else { + continue; + } + } while (read_len != -1); + PGEN_IF_FREE_MEM(str_buf); + + PGEN_DEBUG("Pages : %d", val); + + int ret = pclose(fp); + if (!WIFEXITED(ret) || (WEXITSTATUS(ret) != 0)) { + PGEN_DEBUG("pclose error!"); + } + return val; +} + +/** + * @brief get PDF preview + * @param[in] path path to PDF to generate preview + * @param[in] settings currently just ignored + * @param[out] out_img pointer to return allocated buffer, user is + * responsible for it's memory deallocation + * (format: PPM) + * @param[out] size image data size + * @retval 0 Success + * @retval <0 Error + */ +int get_pdf_preview(const char *path, + const struct pdf_preview_settings *settings, + void **out_img, int *size) +{ + int img_fd; + unsigned char *imgbuf; + PGEN_RETV_IF(size == NULL || settings == NULL || out_img == NULL , -1, "Invalid argument"); + + if (call_pdftoppm(path, settings) < 0) { + PGEN_DEBUG("ERROR: get_pdf_preview(): call_pdftoppm() error"); + return -1; + } + + /* just stub, insecure in case of multiple printing requests */ + img_fd = open(IMG_TEMP_FILE_NAME, O_RDONLY); + PGEN_RETV_IF(img_fd == -1, -1, "Failed to open temporary file"); + + /* STUB: currently just with enough big memory area, no check for + higher memory requirements */ + imgbuf = malloc(sizeof(char) * IMG_MAX_SIZE); + if (imgbuf == NULL) { + close(img_fd); + PGEN_DEBUG("malloc failed"); + return -1; + } + memset(imgbuf, 0, sizeof(char) * IMG_MAX_SIZE); + *size = read(img_fd, imgbuf, IMG_MAX_SIZE); + close(img_fd); + + if (*size <= 0) { + PGEN_IF_FREE_MEM(imgbuf); + PGEN_DEBUG("ERROR: get_pdf_preview(): read error"); + return -1; + } + + *out_img = imgbuf; + + return 0; +} + +#if 0 +/* Check for file extension + * 0/1 + */ +int is_file_ext(const char *fname, int fname_len, const char *ext) +{ + const char *ptr, *ext_ptr; + int ext_len; + + PGEN_RETV_IF(fname == NULL || ext == NULL, 0, "Invalid argument"); + + ext_len = strlen(ext); + if (fname_len < ext_len + 1) { + return 0; + } + + ptr = fname + fname_len - ext_len - 1; + ext_ptr = ptr + 1; + + if (*ptr == '.' && strcasecmp(ext_ptr, ext) == 0) { + return 1; + } + + return 0; +} + +/** + * @brief get file type from its name (extension-based) + * @param[in] fname file name (may be with path) + * @retval file type + */ +enum file_type get_file_type(const char *fname) +{ + int fname_len; + const char *img_file_types[] = IMG_FILE_EXTS; + const char *pdf_ftype = PDF_FILE_EXT; + int i; + + /* check for corectness */ + PGEN_RETV_IF(fname == NULL, FILE_TYPE_INCORRECT, "Incorrect file type"); + + fname_len = strnlen(fname, MAX_PATH_LEN); + PGEN_RETV_IF(fname_len >= MAX_PATH_LEN, FILE_TYPE_INCORRECT, "Too long file name"); + + /* check for pdf extension */ + if (is_file_ext(fname, fname_len, pdf_ftype)) { + return FILE_TYPE_PDF; + } + + /* check for image extensions */ + for (i = 0; img_file_types[i] != NULL; i++) { + if (is_file_ext(fname, fname_len, img_file_types[i])) { + return FILE_TYPE_IMAGE; + } + } + + return FILE_TYPE_INCORRECT; +} + +#else +/** + * @brief get file type from its name (extension-based) + * @param[in] fname file name (may be with path) + * @retval file type + */ +enum file_type get_file_type(const char *fname) +{ + PGEN_RETV_IF(fname == NULL, FILE_TYPE_INCORRECT, "fname is NULL"); + char *fname_copy = strdup(fname); + PGEN_RETV_IF(fname_copy == NULL, FILE_TYPE_INCORRECT, "fname_copy is NULL"); + + char *bname = basename(fname_copy); + char *ext = strrchr(bname, '.'); + PGEN_RETV_IF(ext == NULL, FILE_TYPE_INCORRECT, "ext is NULL"); + + const char *img_file_types[] = IMG_FILE_EXTS; + const char *pdf_ftype = PDF_FILE_EXT; + int ret = FILE_TYPE_INCORRECT; + int i = 0; + + if (strcasestr(ext, pdf_ftype) != NULL) { + ret = FILE_TYPE_PDF; + } else { + for (i = 0; img_file_types[i] != NULL; i++) { + if (strcasestr(ext, img_file_types[i]) != NULL) { + ret = FILE_TYPE_IMAGE; + break; + } + } + } + + PGEN_IF_FREE_MEM(fname_copy); + return ret; +} +#endif diff --git a/mobileprint/previewgen/util/CMakeLists.txt b/mobileprint/previewgen/util/CMakeLists.txt new file mode 100644 index 0000000..00309f6 --- /dev/null +++ b/mobileprint/previewgen/util/CMakeLists.txt @@ -0,0 +1,11 @@ +FILE(GLOB SRCS *.c) + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/mobileprint/previewgen/include) +LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/mobileprint/previewgen/lib) +ADD_EXECUTABLE(previewgen-tool ${SRCS}) + +SET_TARGET_PROPERTIES(previewgen-tool PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS_PREVIEWGEN} -fpie") +TARGET_LINK_LIBRARIES(previewgen-tool previewgen ${previewgen_pkgs_LDFLAGS} -lecore_evas) + +INSTALL(TARGETS previewgen-tool DESTINATION ${BINDIR}) + diff --git a/mobileprint/previewgen/util/main.c b/mobileprint/previewgen/util/main.c new file mode 100644 index 0000000..6c1ff28 --- /dev/null +++ b/mobileprint/previewgen/util/main.c @@ -0,0 +1,492 @@ +/* +* Mobileprint +* +* Copyright 2012 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +void show_help() +{ + printf("Usage: previewgen-tool cmd ...\n" + "Commands:" + "\n" + "help - show help\n" + "\n" + "init img - generate PDF for image\n" + "Arguments:\n" + "\tfname1 ... fnameN outfname_pdf ppdfname\n" + "\tpaper_name paper_s_x paper_s_y\n" + "\tav_s_x av_s_y orientation n_up\n" + "\tscale_type scale_zoom scale_w scale_h\n" + "\tis_grayscale\n" + "\n" + "init pdf - generate PDF for PDF\n" + "Arguments:\n" + "\tfname toutfname_pdf ppdfname\n" + "\tpaper_name paper_s_x paper_s_y\n" + "\torientation n_up\n" + "\tscale_type scale_zoom scale_w scale_h\n" + "\tis_grayscale\n" + "\n" + "empty_gen - generate empty page image\n" + "Arguments:\n" + "\toutfname_ppm paper_s_x paper_s_y av_s_x av_s_y\n" + "\tshadow_x shadow_y is_rotate90\n" + "\n" + "pagegen - generate single page image for PDF\n" + "\tfname page outfname_ppm\n" + "\tpaper_s_x paper_s_y av_s_x av_s_y\n" + "\tshadow_x shadow_y is_rotate90 is_grayscale\n" + ); +} + + +int parse_page_orientation(char *str, enum page_orientation *res) +{ + if (NULL == str || NULL == res) { + printf("ERROR in orientation string\n"); + return -1; + } + + if (strcasecmp(str, "portrait") == 0) { + *res = PAGE_ORIENTATION_PORTRAIT; + return 0; + } + if (strcasecmp(str, "landscape") == 0) { + *res = PAGE_ORIENTATION_LANDSCAPE; + return 0; + } + + return -1; +} + + +int parse_scale_type(char *str, enum page_scale_type *res) +{ + if (NULL == str || NULL == res) { + printf("ERROR in scale type string\n"); + return -1; + } + + if (strcasecmp(str, "fit_to_paper") == 0) { + *res = SCALE_FIT_TO_PAPER; + return 0; + } + if (strcasecmp(str, "custom") == 0) { + *res = SCALE_CUSTOM; + return 0; + } + if (strcasecmp(str, "relative") == 0) { + *res = SCALE_RELATIVE; + return 0; + } + if (strcasecmp(str, "original") == 0) { + *res = SCALE_ORIGINAL; + return 0; + } + + printf("ERROR in scale type string\n"); + return -1; +} + + +void destroy_str_list(char **str_list, int list_len) +{ + int i; + PGEN_RET_IF(NULL == str_list || list_len <= 0 || NULL == str_list[0], + "Argument error"); + for (i = 0; i < list_len; ++i) { + PGEN_IF_FREE_MEM(str_list[i]); + } +} + + +void remove_tmp_files(char **const files, int files_count) +{ + int i; + PGEN_RET_IF(NULL == files || files_count <= 0 || NULL == files[0], + "Arguments error"); + for (i = 0; i <= files_count; ++i) + unlink(files[i]); +} + + +int process_init_img_files(int argc, char *argv[]) +{ + char **fnames; + int files_count; + char *outfname; + char *ppd_fname; + struct paper_size_pts paper_size; + struct size_px av_size; + enum page_orientation orientation; + int n_up; + struct page_scale scale; + int is_grayscale; + + char **tmp_fnames; + int len; + char *tmp_str; + + int res; + int is_err = 0; + int pages_count; + int i; + + if (argc < 15) { + printf("ERROR in init img arguments count\n"); + return -1; + } + PGEN_DEBUG("argc: %d", argc); + + fnames = argv; + files_count = argc - 15; + i = argc - 15 - 1; + outfname = argv[i + 1]; + ppd_fname = argv[i + 2]; + + PGEN_DEBUG("files_count: %d", files_count); + PGEN_DEBUG("outfname: %s", outfname); + PGEN_DEBUG("i: %d", i); + + paper_size.name = argv[i + 3]; + paper_size.s.x = atof(argv[i + 4]); + paper_size.s.y = atof(argv[i + 5]); + + av_size.x = atoi(argv[i + 6]); + av_size.y = atoi(argv[i + 7]); + + PGEN_DEBUG("orientation: %s", argv[i + 8]); + if (parse_page_orientation(argv[i + 8], &orientation) < 0) + return -1; + + n_up = atoi(argv[i + 9]); + + PGEN_DEBUG("scale_type"); + if (parse_scale_type(argv[i + 10], &(scale.type)) < 0) + return -1; + scale.zoom = atoi(argv[i + 11]); + scale.w = atof(argv[i + 12]); + scale.h = atof(argv[i + 13]); + + is_grayscale = atoi(argv[i + 14]); + + if (files_count < 1 || files_count > 9999) { + printf("Files count ERROR\n"); + return -1; + } + + /* TODO: downscale each image file */ + /* generate temporary names based on pid */ + tmp_fnames = (char**)calloc(files_count + 1, sizeof(char*)); + for (i = 0; i < files_count; ++i) { + len = sizeof(PREVIEW_TEMP_DIR + "/convert_tmp_XXXXXXXX_XXXX.ppm"); + tmp_str = (char*)malloc(sizeof(char) * (len + 1)); + if (NULL == tmp_str) { + is_err = 1; + break; + } + tmp_str[len] = '\0'; + snprintf(tmp_str, len, PREVIEW_TEMP_DIR + "/convert_tmp_%08X_%04d.ppm", getpid(), i + 1); + tmp_fnames[i] = tmp_str; + } + if (is_err) { + destroy_str_list(tmp_fnames, files_count); + PGEN_IF_FREE_MEM(tmp_fnames); + printf("ERROR: out of memory\n"); + return -1; + } + + for (i = 0; i < files_count; ++i) { + res = process_image_downscale( + fnames[i], tmp_fnames[i], &av_size); + if (res < 0) { + printf("ERROR in image downscale\n"); + is_err = 1; + break; + } + } + if (is_err) { + remove_tmp_files(tmp_fnames, files_count); + destroy_str_list(tmp_fnames, files_count); + PGEN_IF_FREE_MEM(tmp_fnames); + return -1; + } + + /* convert to pdf */ + if (files_count > 1) + res = img_files2pdf_preview_pages(tmp_fnames, files_count, + outfname, ppd_fname, &paper_size, &av_size, + orientation, n_up, &scale, is_grayscale); + else + res = img2pdf_preview_pages(tmp_fnames[0], outfname, ppd_fname, + &paper_size, &av_size, orientation, n_up, + &scale, is_grayscale); + + /* remove temporary files */ + remove_tmp_files(tmp_fnames, files_count); + destroy_str_list(tmp_fnames, files_count); + PGEN_IF_FREE_MEM(tmp_fnames); + + if (res < 0) { + printf("ERROR in init img\n"); + return -1; + } else { + PGEN_DEBUG("PDF generation OK"); + } + pages_count = get_pdf_pages_count(outfname); + printf("init img: pages count: %d\n", pages_count); + + return res; +} + + +int process_init_pdf(int argc, char *argv[]) +{ + char *fname; + char *outfname; + char *ppd_fname; + struct paper_size_pts paper_size; + enum page_orientation orientation; + int n_up; + struct page_scale scale; + int is_grayscale; + + int res; + int pages_count; + + if (argc < 13) { + printf("ERROR in init pdf arguments count\n"); + return -1; + } + + fname = argv[0]; + outfname = argv[1]; + ppd_fname = argv[2]; + + paper_size.name = argv[3]; + paper_size.s.x = atof(argv[4]); + paper_size.s.y = atof(argv[5]); + + if (parse_page_orientation(argv[6], &orientation) < 0) + return -1; + + n_up = atoi(argv[7]); + + if (parse_scale_type(argv[8], &(scale.type)) < 0) + return -1; + scale.zoom = atoi(argv[9]); + scale.w = atof(argv[10]); + scale.h = atof(argv[11]); + + is_grayscale = atoi(argv[12]); + + + res = pdf2pdf_preview_pages(fname, outfname, ppd_fname, + &paper_size, orientation, n_up, + &scale, is_grayscale); + if (res < 0) { + printf("ERROR in init pdf\n"); + return -1; + } + pages_count = get_pdf_pages_count(outfname); + printf("init pdf: pages count: %d\n", pages_count); + return 0; +} + + +int process_pagegen(int argc, char *argv[]) +{ + char *pdf_fname; + char *outfname_ppm; + int page; + struct size_pts paper_size; + struct size_px av_size; + struct size_px shadow_size; + int is_rotate90; + int is_grayscale; + + struct preview_page_req settings_req; + + int res; + + + if (argc < 11) { + printf("ERROR in gen arguments count\n"); + return -1; + } + + pdf_fname = argv[0]; + page = atoi(argv[1]); + outfname_ppm = argv[2]; + + paper_size.x = atof(argv[3]); + paper_size.y = atof(argv[4]); + + av_size.x = atoi(argv[5]); + av_size.y = atoi(argv[6]); + + shadow_size.x = atoi(argv[7]); + shadow_size.y = atoi(argv[8]); + + is_rotate90 = atoi(argv[9]); + is_grayscale = atoi(argv[10]); + + + settings_req.paper_size = paper_size; + settings_req.available_size_px = av_size; + settings_req.shadow_offset = shadow_size; + settings_req.is_rotate90 = is_rotate90; + settings_req.is_grayscale = is_grayscale; + + /*if (get_preview_settings(&settings_req, &settings_px) < 0) { + printf("ERROR in settings\n"); + return -1; + }*/ + + res = save_pdf_preview_page_image(pdf_fname, page, + &settings_req, outfname_ppm); + if (res <= 0) { + printf("ERROR in preview page image generation\n"); + return -1; + } + printf("OK\n"); + return 0; +} + + +int process_empty_gen(int argc, char *argv[]) +{ + char *outfname_ppm; + struct size_pts paper_size; + struct size_px av_size; + struct size_px shadow_size; + int is_rotate90; + + struct preview_page_req settings_req; + + int res; + + + if (argc < 8) { + printf("ERROR in empty_gen arguments count\n"); + return -1; + } + + outfname_ppm = argv[0]; + + paper_size.x = atof(argv[1]); + paper_size.y = atof(argv[2]); + + av_size.x = atoi(argv[3]); + av_size.y = atoi(argv[4]); + + shadow_size.x = atoi(argv[5]); + shadow_size.y = atoi(argv[6]); + + is_rotate90 = atoi(argv[7]); + + settings_req.paper_size = paper_size; + settings_req.available_size_px = av_size; + settings_req.shadow_offset = shadow_size; + settings_req.is_rotate90 = is_rotate90; + settings_req.is_grayscale = 0; + + + res = save_empty_preview_page_image(&settings_req, outfname_ppm); + if (res <= 0) { + printf("ERROR in preview page image generation\n"); + return -1; + } + printf("OK\n"); + + return 0; +} + + +int process_cmd(int argc, char *argv[]) +{ + if (strcasecmp("init", argv[1]) == 0) { + if (argc <= 2) { + printf("ERROR in init cmd usage\n"); + return -1; + } + if (strcasecmp("img", argv[2]) == 0) + return process_init_img_files(argc - 2, &(argv[3])); + if (strcasecmp("pdf", argv[2]) == 0) + return process_init_pdf(argc - 2, &(argv[3])); + printf("ERROR in init cmd usage\n"); + return -1; + } + + if (strcasecmp("pagegen", argv[1]) == 0) + return process_pagegen(argc - 1, &(argv[2])); + + if (strcasecmp("empty_gen", argv[1]) == 0) + return process_empty_gen(argc - 1, &(argv[2])); + + return 0; +} + + +int main(int argc, char *argv[]) +{ + int res; + int ret; + int errsv; + + if (argc <= 1) { + printf("ERROR: no arguments, type help for usage\n"); + return 1; + } + + if (strcasecmp("help", argv[1]) == 0) { + show_help(); + return 0; + } + + ret = mkdir(PREVIEW_TEMP_DIR, 0777); + errsv = errno; + if (ret < 0 && errsv != EEXIST) { + printf("Failed to mkdir temporary directory " PREVIEW_TEMP_DIR + ", errno = %d\n", errsv); + return 1; + } + + evas_init(); + res = process_cmd(argc, argv); + evas_shutdown(); + if (res < 0) { + printf("Arguments ERROR\n"); + return 1; + } + + return 0; +} + diff --git a/mobileprint/smsc/CMakeLists.txt b/mobileprint/smsc/CMakeLists.txt new file mode 100644 index 0000000..bd126b8 --- /dev/null +++ b/mobileprint/smsc/CMakeLists.txt @@ -0,0 +1,8 @@ +INCLUDE(FindPkgConfig) +pkg_check_modules(smsc_pkgs REQUIRED dlog evas elementary edje + ecore ecore-input ecore-x) +FOREACH(flag ${smsc_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS_SMSC "${EXTRA_CFLAGS_SMSC} ${flag}") +ENDFOREACH(flag) + +ADD_SUBDIRECTORY(lib) diff --git a/mobileprint/smsc/include/smsc_control.h b/mobileprint/smsc/include/smsc_control.h new file mode 100644 index 0000000..fcc3ada --- /dev/null +++ b/mobileprint/smsc/include/smsc_control.h @@ -0,0 +1,51 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _SMSC_CONTROL_H_INCLUDED_ +#define _SMSC_CONTROL_H_INCLUDED_ + +#include + +#include "smsc_position.h" + + +struct smsc_control { + int is_pressed; + int last_x; + //int last_y; + //int cur_x; + //int cur_y; + Ecore_Animator *move_anim; + int anim_xdiff; + int anim_initial_offset; + + struct smsc_position *position; +}; + + +int init_smsc_control(struct smsc_control *control, + struct smsc_position *position); + +int reset_smsc_control(struct smsc_control *control); +int smsc_control_begin_move(struct smsc_control *control, int xpos); +int smsc_control_process_move(struct smsc_control *control, int xpos); +int smsc_control_finish_move(struct smsc_control *control, int xpos); + +#endif /* _SMSC_CONTROL_H_INCLUDED_ */ + diff --git a/mobileprint/smsc/include/smsc_debug.h b/mobileprint/smsc/include/smsc_debug.h new file mode 100644 index 0000000..7e11445 --- /dev/null +++ b/mobileprint/smsc/include/smsc_debug.h @@ -0,0 +1,78 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _SMSC_DEBUG_H_INCLUDED_ +#define _SMSC_DEBUG_H_INCLUDED_ + +//#define SMSC_DEBUG_SILENT +#ifdef SMSC_DEBUG_SILENT +#define SMSC_DEBUG +#define SMSC_TRACE_BEGIN +#define SMSC_TRACE_END +#else /* !SMSC_DEBUG_SILENT */ + +/*#define SMSC_DEBUG_STANDALONE*/ +#ifdef SMSC_DEBUG_STANDALONE + +/* standalone debugging */ +#include +#define SMSC_DEBUG(fmt, arg...) do { \ + printf("DEBUG: %s: " fmt "\n", __FUNCTION__, ##arg); } while (0) +#define SMSC_TRACE_BEGIN SMSC_DEBUG("TRACE: %s enter", __FUNCTION__) +#define SMSC_TRACE_END SMSC_DEBUG("TRACE: %s leave", __FUNCTION__) + +#define SMSC_IF_FREE_MEM(mem) \ + do { \ + if(mem) { \ + free(mem); \ + mem = NULL; \ + } \ + } while (0) +#define SMSC_RET_IF(expr, fmt, args...) \ + do { \ + if(expr) { \ + PTS_PRT("[%s] Return, message "fmt, #expr, ##args );\ + return; \ + } \ + } while (0) +#define SMSC_RETV_IF(expr, val, fmt, args...) \ + do { \ + if(expr) { \ + PTS_PRT("[%s] Return value, message "fmt, #expr, ##args );\ + return (val); \ + } \ + } while (0) + +#else /* !SMSC_DEBUG_STANDALONE */ + +#include +#define SMSC_DEBUG(fmt, arg...) PTS_DEBUG(fmt, ##arg) +#define SMSC_TRACE_BEGIN PTS_TRACE_BEGIN +#define SMSC_TRACE_END PTS_TRACE_END + +#define SMSC_IF_FREE_MEM PTS_IF_FREE_MEM +#define SMSC_RET_IF PTS_RET_IF +#define SMSC_RETV_IF PTS_RETV_IF + +#endif /* SMSC_DEBUG_STANDALONE */ +#endif /* SMSC_DEBUG_SILENT */ + + +#endif /* _SMSC_DEBUG_H_INCLUDED_ */ + diff --git a/mobileprint/smsc/include/smsc_position.h b/mobileprint/smsc/include/smsc_position.h new file mode 100644 index 0000000..f941ca0 --- /dev/null +++ b/mobileprint/smsc/include/smsc_position.h @@ -0,0 +1,58 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _SMSC_POSITION_H_INCLUDED_ +#define _SMSC_POSITION_H_INCLUDED_ + +#include + +struct smsc_position { + int is_configured; + struct size_px available_size; + struct size_px page_size_px; + int page_space; + int pages_count; + int offset; + + int position_update_event_type; +}; + + +struct smsc_position_event { + int is_ok; /* STUB */ +}; + + +int init_smsc_position(struct smsc_position *position); +int set_smsc_position_settings(struct smsc_position *position, int pages_count, + const struct size_px *available_size_px, + const struct size_pts *page_size); +int get_smsc_position_all_width(const struct smsc_position *position); +int get_smsc_position_cur_page(const struct smsc_position *position); +int *get_smsc_position_visible_pages(const struct smsc_position *position); +int get_smsc_position_page(const struct smsc_position *position, + int page, int *is_ok); +int get_smsc_position_cur_page_center_xdiff( + const struct smsc_position *position, int *is_ok); +int move_smsc_position(struct smsc_position *position, int xdiff); +int set_smsc_position(struct smsc_position *position, int offset); + + +#endif /* _SMSC_POSITION_H_INCLUDED_ */ + diff --git a/mobileprint/smsc/include/smsc_smart.h b/mobileprint/smsc/include/smsc_smart.h new file mode 100644 index 0000000..8f67100 --- /dev/null +++ b/mobileprint/smsc/include/smsc_smart.h @@ -0,0 +1,46 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _SMSC_SMART_H_INCLUDED_ +#define _SMSC_SMART_H_INCLUDED_ + +#include + +#include +#include + + +Evas_Object *evas_smart_smsc_add(Evas *evas); +int evas_smart_smsc_set_file(Evas_Object *o, char **const fname, + int files_count, const char *ppd, + const struct paper_size_pts *paper_size, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale); +int evas_smart_smsc_set_layout(Evas_Object *o, Evas_Object *layout); +int init_smsc_accessability_support(Evas_Object *o); +int set_main_view_accessability_info(Evas_Object *o, + Evas_Object *layout, + const char *access_info, + const char *access_type, + const char *access_context_info); +int evas_smart_smsc_calculate_page_number(Evas_Object *o); +int evas_smart_smsc_get_pages_count(Evas_Object *o); + +#endif /* _SMSC_SMART_H_INCLUDED_ */ + diff --git a/mobileprint/smsc/include/smsc_widget.h b/mobileprint/smsc/include/smsc_widget.h new file mode 100644 index 0000000..5f8e1d7 --- /dev/null +++ b/mobileprint/smsc/include/smsc_widget.h @@ -0,0 +1,72 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#ifndef _SMSC_WIDGET_H_INCLUDED_ +#define _SMSC_WIDGET_H_INCLUDED_ + + +#include +#include + +#include + +#include "smsc_control.h" +#include "smsc_position.h" + + +struct smsc_page_data { + int num; + Evas_Object *page_obj; +}; + +struct smsc_widget { + int is_ready; + Eina_List *pages_list; + + struct smsc_position position; + struct smsc_control control; + + Evas_Object *loading_animation; + Evas_Object *parent; + Evas_Object *layout; + + Evas *canvas; + + int posy; + + int off_x; + int off_y; + + struct preview_engine engine; +}; + + +int init_smsc_widget(struct smsc_widget *widget, Evas_Object *parent); +int clear_smsc_position_settings(struct smsc_position *position); + +int clear_smsc_widget(struct smsc_widget *widget); +int hide_smsc_widget(struct smsc_widget *widget); +int show_smsc_widget(struct smsc_widget *widget); +int smsc_widget_set_layout(struct smsc_widget *widget, Evas_Object *layout); + +int move_smsc_widget_pages(struct smsc_widget *widget); + + +#endif /* _SMSC_WIDGET_H_INCLUDED_ */ + diff --git a/mobileprint/smsc/lib/CMakeLists.txt b/mobileprint/smsc/lib/CMakeLists.txt new file mode 100644 index 0000000..fb88ed7 --- /dev/null +++ b/mobileprint/smsc/lib/CMakeLists.txt @@ -0,0 +1,5 @@ +FILE(GLOB SRCS *.c) + +ADD_LIBRARY(smsc ${SRCS}) +SET_TARGET_PROPERTIES(smsc PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS_SMSC} -fpie") + diff --git a/mobileprint/smsc/lib/smsc_control.c b/mobileprint/smsc/lib/smsc_control.c new file mode 100644 index 0000000..73eba0d --- /dev/null +++ b/mobileprint/smsc/lib/smsc_control.c @@ -0,0 +1,131 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include "smsc_debug.h" + +#include "smsc_control.h" + + +int init_smsc_control(struct smsc_control *control, + struct smsc_position *position) +{ + memset(control, 0, sizeof(struct smsc_control)); + + control->position = position; + + control->is_pressed = 0; + control->last_x = 0; + control->move_anim = NULL; + //control->last_y = 0; + //control->cur_x = 0; + //control->cur_y = 0; + + return 0; +} + + +int smsc_control_remove_animator(struct smsc_control *control) +{ + SMSC_RETV_IF(NULL == control, -1, "Argument error"); + if (NULL == control->move_anim) + return 0; + + ecore_animator_del(control->move_anim); + control->move_anim = NULL; + + return 0; +} + + +int reset_smsc_control(struct smsc_control *control) +{ + control->is_pressed = 0; + smsc_control_remove_animator(control); + return 0; +} + + +int smsc_control_begin_move(struct smsc_control *control, int xpos) +{ + SMSC_RETV_IF(NULL == control, -1, "Argument error"); + + control->is_pressed = 1; + control->last_x = xpos; + + SMSC_DEBUG("smsc_control_begin_move()"); + smsc_control_remove_animator(control); + + return 0; +} + + +int smsc_control_process_move(struct smsc_control *control, int xpos) +{ + int xpos_diff; + + SMSC_RETV_IF(NULL == control, -1, "Argument error"); + + if (control->is_pressed) { + xpos_diff = control->last_x - xpos; + //int all_width = get_smsc_position_all_width(control->position); + /* simple stubbed logic */ + /* TODO: inertia, fixation */ + //SMSC_DEBUG("smsc_control_process_move(): moving"); + move_smsc_position(control->position, xpos_diff); + control->last_x = xpos; + } + + return 0; +} + + +static Eina_Bool smsc_control_pagefix_anim(void *data, double pos) +{ + struct smsc_control *control = (struct smsc_control*)data; + SMSC_RETV_IF(NULL == control, ECORE_CALLBACK_CANCEL, "Argument error"); + /* TODO */ + set_smsc_position(control->position, pos * control->anim_xdiff + + control->anim_initial_offset); + return ECORE_CALLBACK_RENEW; +} + + +int smsc_control_finish_move(struct smsc_control *control, int xpos) +{ + int is_ok; + SMSC_RETV_IF(NULL == control, -1, "Argument error"); + SMSC_DEBUG("smsc_control_finish_move()"); + /* provide page center fixation */ + /* provide animated fixation */ + control->anim_xdiff = get_smsc_position_cur_page_center_xdiff( + control->position, &is_ok); + SMSC_RETV_IF(0 == is_ok, -1, "Current xdiff calculation ERROR"); + control->anim_initial_offset = control->position->offset; + smsc_control_remove_animator(control); + control->move_anim = ecore_animator_timeline_add( + 0.2, smsc_control_pagefix_anim, control); + + control->last_x = xpos; + control->is_pressed = 0; + + return 0; +} + diff --git a/mobileprint/smsc/lib/smsc_position.c b/mobileprint/smsc/lib/smsc_position.c new file mode 100644 index 0000000..26d69e7 --- /dev/null +++ b/mobileprint/smsc/lib/smsc_position.c @@ -0,0 +1,297 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include +#include + +#include + +#include + +#include "smsc_debug.h" + +#include "smsc_position.h" + + +int init_smsc_position(struct smsc_position *position) +{ + SMSC_DEBUG("init_smsc_position() started"); + + memset(position, 0, sizeof(struct smsc_position)); + + /* event of position update */ + position->position_update_event_type = ecore_event_type_new(); + + SMSC_DEBUG("init_smsc_position() finished"); + + return 0; +} + + +int set_smsc_position_settings(struct smsc_position *position, int pages_count, + const struct size_px *available_size_px, + const struct size_pts *page_size) +{ + /* calculate page size in pixels */ + struct size_pts min_area_size; + struct size_px min_area_size_px; + //int vis_pages = 3; + + position->is_configured = 1; + position->pages_count = pages_count; + position->available_size = *available_size_px; + position->offset = 0; + + min_area_size.x = page_size->x + * (1 + PAGE_SIDE_SHOW_COEFF * 2 + MIN_PAGE_SPACE_COEFF * 2); + min_area_size.y = page_size->y; + + if (pts_size2px(&min_area_size, available_size_px, + &min_area_size_px) < 0) { + //PGEN_DEBUG("ERROR: full_size: pts_size2px()\n"); + return -1; + } + + position->page_size_px.x = min_area_size_px.x + / (1 + PAGE_SIDE_SHOW_COEFF * 2 + MIN_PAGE_SPACE_COEFF * 2); + position->page_size_px.y = min_area_size_px.y; + SMSC_DEBUG("init_smsc_position(): page_size_px: (%d, %d)", + position->page_size_px.x, position->page_size_px.y); + + return 0; +} + + +int clear_smsc_position_settings(struct smsc_position *position) +{ + position->is_configured = 0; + position->pages_count = -1; + return 0; +} + + +int get_smsc_position_all_width(const struct smsc_position *position) +{ + if (position->is_configured == 0) + return -1; + if (1 == position->pages_count) + return 0; + return position->page_size_px.x * (position->pages_count - 1) + * (1 + MIN_PAGE_SPACE_COEFF); +} + + +int get_smsc_position_cur_page(const struct smsc_position *position) +{ + float res; + + SMSC_RETV_IF(NULL == position, -1, "Argument error"); + SMSC_RETV_IF(!position->is_configured, -1, "Position not configured"); + + /*SMSC_DEBUG("position->offset = %d", position->offset); + SMSC_DEBUG("position->page_size_px.x = %d", position->page_size_px.x); + SMSC_DEBUG("MIN_PAGE_SPACE_COEFF = %f", MIN_PAGE_SPACE_COEFF); + SMSC_DEBUG("position->pages_count = %d", position->pages_count);*/ + res = (position->offset + (position->page_size_px.x / 2) + * (1 + MIN_PAGE_SPACE_COEFF)) + / (position->page_size_px.x * (1 + MIN_PAGE_SPACE_COEFF)); + //SMSC_DEBUG("res = %f", res); + if (res >= position->pages_count) + return position->pages_count - 1; + else if (res < 0) + return 0; + + return res; +} + +int get_smsc_position_max_vispages_count(const struct smsc_position *position) +{ + int all_sizex; + int page_sizex; + int page_count; + + if (NULL == position) + return -1; + + page_sizex = position->page_size_px.x; + all_sizex = position->available_size.x; + page_count = ceil(all_sizex * (1 + MIN_PAGE_SPACE_COEFF) + / (page_sizex * (1 + MIN_PAGE_SPACE_COEFF))); + //SMSC_DEBUG("page_count = %d", page_count); + if (page_count > 0) { + /* provide odd page_count to have central page */ + page_count = page_count + 1 - page_count % 2; + //SMSC_DEBUG("corrected page_count = %d", page_count); + return page_count; + } + return 1; +} + +int *get_smsc_position_visible_pages(const struct smsc_position *position) +{ + int *res; + int cur_page_i; + int cur_page; + int max_vispage_count; + int vispages_right; + int vispages_left; + int vispages; + int middle_page; + int i; + + if (position->is_configured == 0) + return NULL; + + if (1 == position->pages_count) { + res = malloc(sizeof(int) * (1 + 1)); + res[0] = 0; + res[1] = -1; + return res; + } + + cur_page_i = get_smsc_position_cur_page(position); + if (cur_page_i < 0) + return NULL; + cur_page = cur_page_i + 1; + max_vispage_count = get_smsc_position_max_vispages_count(position); + if (max_vispage_count < 1) + return NULL; + + middle_page = 1 + max_vispage_count / 2; + vispages_left = cur_page - 1; + if (vispages_left > middle_page - 1) + vispages_left = middle_page - 1; + vispages_right = position->pages_count - cur_page; + if (vispages_right > middle_page - 1) + vispages_right = middle_page - 1; + vispages = vispages_right + vispages_left + 1; + + res = malloc(sizeof(int) * (vispages + 1)); + if (NULL == res) + return NULL; + /*SMSC_DEBUG("vispages = %d, vispages_left = %d, vispages_right = %d, " + "middle_page = %d", + vispages, vispages_left, vispages_right, middle_page);*/ + + for (i = 0; i < vispages; ++i) + res[i] = cur_page + (i + 1 - (vispages_left + 1)) - 1; + res[vispages] = -1; + + return res; +} + + +int get_smsc_position_page(const struct smsc_position *position, + int page, int *is_ok) +{ + int res; + + SMSC_RETV_IF(NULL == position || NULL == is_ok, -1, "Argument error"); + + *is_ok = 1; + if (position->is_configured == 0) { + *is_ok = 0; + return 0; + } + if (NULL == position || page < 0 || page >= position->pages_count) { + /*SMSC_DEBUG("ERROR in get_smsc_position_page(), page = %d," + " pages_count = %d", + page, position->pages_count);*/ + *is_ok = 0; + return 0; + } + res = position->available_size.x / 2 - position->offset + + page * position->page_size_px.x + * (1 + MIN_PAGE_SPACE_COEFF) + - position->page_size_px.x / 2; + //SMSC_DEBUG("get_smsc_position_page(): page %d: res = %d", page, res); + return res; +} + + +int get_smsc_position_cur_page_center_xdiff( + const struct smsc_position *position, int *is_ok) +{ + int page; + int res; + SMSC_RETV_IF(NULL == is_ok, -1, "Argument error"); + *is_ok = 0; + SMSC_RETV_IF(NULL == position, -1, "Argument error"); + *is_ok = 1; + page = get_smsc_position_cur_page(position); + SMSC_RETV_IF(page < 0, -1, "Error in current page calculation"); + res = page * (position->page_size_px.x * (1 + MIN_PAGE_SPACE_COEFF)) + - position->offset; + return res; +} + + +int move_smsc_position(struct smsc_position *position, int xdiff) +{ + struct smsc_position_event *event_data; + int all_width; + + SMSC_RETV_IF(NULL == position, -1, "Argument error"); + SMSC_RETV_IF(position->is_configured == 0, -1, "Not configured"); + + all_width = get_smsc_position_all_width(position); + SMSC_RETV_IF(all_width < 0, -1, "Width calculation error"); + //SMSC_DEBUG("move_smsc_position() started"); + if (xdiff + position->offset >= all_width) + position->offset = all_width; + else if (xdiff + position->offset <= 0) + position->offset = 0; + else + position->offset = position->offset + xdiff; + + /* emit ecore event */ + event_data = malloc(sizeof(struct smsc_position_event)); + memset(event_data, 0, sizeof(struct smsc_position_event)); + ecore_event_add(position->position_update_event_type, + event_data, NULL, NULL); + + return 0; +} + + +int set_smsc_position(struct smsc_position *position, int offset) +{ + struct smsc_position_event *event_data; + int all_width; + + SMSC_RETV_IF(NULL == position || offset < 0, -1, "Argument error"); + + all_width = get_smsc_position_all_width(position); + SMSC_RETV_IF(all_width < 0, -1, "Width calculation error"); + + if (offset >= all_width) + position->offset = all_width; + else + position->offset = offset; + + /* emit ecore event */ + event_data = malloc(sizeof(struct smsc_position_event)); + memset(event_data, 0, sizeof(struct smsc_position_event)); + ecore_event_add(position->position_update_event_type, + event_data, NULL, NULL); + + return 0; +} + diff --git a/mobileprint/smsc/lib/smsc_smart.c b/mobileprint/smsc/lib/smsc_smart.c new file mode 100644 index 0000000..6622288 --- /dev/null +++ b/mobileprint/smsc/lib/smsc_smart.c @@ -0,0 +1,412 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include + +#include "smsc_debug.h" +#include "smsc_widget.h" + +#include "smsc_smart.h" + + +#define _evas_smart_smsc_type "Evas_Smart_Smsc" + + +#define _evas_smart_smsc_type "Evas_Smart_Smsc" +#define EVT_CHILDREN_NUMBER_CHANGED "children,changed" + + +static const Evas_Smart_Cb_Description _smart_callbacks[] = +{ + {EVT_CHILDREN_NUMBER_CHANGED, "i"}, + {NULL, NULL} +}; + + +struct _Evas_Smart_Smsc_Data { + Evas_Object_Smart_Clipped_Data base; + struct smsc_widget widget; + Evas_Object *screen_reader_rectangle; + + int is_ready; + struct size_px widget_size; + + int is_process_file; + char **fnames; + int files_count; + char *ppd; + struct paper_size_pts paper_size; + enum page_orientation orientation; + int n_up; + struct page_scale scale; + int is_grayscale; +}; + + +typedef struct _Evas_Smart_Smsc_Data Evas_Smart_Smsc_Data; + + +#define EVAS_SMART_SMSC_DATA_GET(o, ptr) \ + Evas_Smart_Smsc_Data *ptr = evas_object_smart_data_get(o) + +#define EVAS_SMART_SMSC_DATA_GET_OR_RETURN(o, ptr) \ + EVAS_SMART_SMSC_DATA_GET(o, ptr); \ + if (!ptr) { \ + SMSC_DEBUG("No widget data for object %p (%s)!", \ + o, evas_object_type_get(o)); \ + abort(); \ + return; \ + } + +#define EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ + EVAS_SMART_SMSC_DATA_GET(o, ptr); \ + if (!ptr) { \ + SMSC_DEBUG("No widget data for object %p (%s)!", \ + o, evas_object_type_get(o)); \ + abort(); \ + return val; \ + } + +EVAS_SMART_SUBCLASS_NEW(_evas_smart_smsc_type, _evas_smart_smsc, + Evas_Smart_Class, Evas_Smart_Class, + evas_object_smart_clipped_class_get, _smart_callbacks); + + +static void _evas_smart_smsc_smart_add(Evas_Object *o) +{ + SMSC_TRACE_BEGIN; + EVAS_SMART_DATA_ALLOC(o, Evas_Smart_Smsc_Data); + + init_smsc_widget(&(priv->widget), o); + priv->is_ready = 0; + memset(&(priv->widget_size), 0, sizeof(priv->widget_size)); + + priv->is_process_file = 0; + priv->fnames = NULL; + priv->files_count = 0; + priv->ppd = NULL; + memset(&(priv->paper_size), 0, sizeof(priv->paper_size)); + priv->orientation = PAGE_ORIENTATION_PORTRAIT; + priv->n_up = 1; + memset(&(priv->scale), 0, sizeof(priv->scale)); + priv->is_grayscale = 0; + priv->screen_reader_rectangle = NULL; + + _evas_smart_smsc_parent_sc->add(o); + SMSC_TRACE_END; +} + + +static void _evas_smart_smsc_smart_del(Evas_Object *o) +{ + //EVAS_SMART_SMSC_DATA_GET(o, priv); + + /* remove childrens */ + /* TODO: destroy smsc_widget */ + + _evas_smart_smsc_parent_sc->del(o); +} + + +static void _evas_smart_smsc_smart_show(Evas_Object *o) +{ + EVAS_SMART_SMSC_DATA_GET(o, priv); + /* show smsc_widget */ + show_smsc_widget(&(priv->widget)); + _evas_smart_smsc_parent_sc->show(o); +} + + +static void _evas_smart_smsc_smart_hide(Evas_Object *o) +{ + EVAS_SMART_SMSC_DATA_GET(o, priv); + /* hide childrens */ + /* TODO: save hide state for smsc_widget */ + hide_smsc_widget(&(priv->widget)); + _evas_smart_smsc_parent_sc->hide(o); +} + + +static void _evas_smart_smsc_smart_move(Evas_Object *o, + Evas_Coord x, Evas_Coord y) +{ + /* TODO: correct move event usage (provide picture moving animation) */ + SMSC_TRACE_BEGIN; + EVAS_SMART_SMSC_DATA_GET_OR_RETURN(o, priv); + priv->widget.off_x = x; + priv->widget.off_y = y; + move_smsc_widget_pages(&(priv->widget)); + evas_object_move(priv->widget.loading_animation, x, y); + SMSC_TRACE_END; +} + + +static void _evas_smart_smsc_smart_resize(Evas_Object *o, + Evas_Coord w, Evas_Coord h) +{ + SMSC_TRACE_BEGIN; + Evas_Coord ow, oh; + evas_object_geometry_get(o, NULL, NULL, &ow, &oh); + if ((ow == w) && (oh == h)) { + SMSC_TRACE_END; + return; + } + + evas_object_smart_changed(o); + SMSC_TRACE_END; +} + + +void evas_smart_smsc_free_process_file_args(Evas_Smart_Smsc_Data *priv) +{ + int i; + SMSC_RET_IF(NULL == priv, "priv is NULL"); + if (priv->fnames != NULL) + for (i = 0; i < priv->files_count; ++i) + SMSC_IF_FREE_MEM(priv->fnames[i]); + SMSC_IF_FREE_MEM(priv->fnames); + priv->files_count = 0; + SMSC_IF_FREE_MEM(priv->ppd); + SMSC_IF_FREE_MEM(priv->paper_size.name); + + priv->is_process_file = 0; +} + + +static void _evas_smart_smsc_smart_calculate(Evas_Object *o) +{ + SMSC_TRACE_BEGIN; + Evas_Coord x, y, w, h; + + EVAS_SMART_SMSC_DATA_GET_OR_RETURN(o, priv); + evas_object_geometry_get(o, &x, &y, &w, &h); + SMSC_DEBUG("Geometry: (%d, %d) : (%d, %d)", + x, y, w, h); + + /* change children sizes */ + + priv->widget_size.x = w; + priv->widget_size.y = h; + priv->is_ready = 1; + + /* set widget offset */ + priv->widget.off_x = x; + priv->widget.off_y = y; + + /* resize rectangle for accessibility support */ + evas_object_move(priv->screen_reader_rectangle, x, y); + evas_object_resize(priv->screen_reader_rectangle, w, h); + + clear_smsc_widget(&(priv->widget)); + + /* request to preview_engine for recalculation */ + if (priv->is_process_file) + process_preview_engine_file(&(priv->widget.engine), + priv->fnames, priv->files_count, + priv->ppd, &(priv->paper_size), + &(priv->widget_size), priv->orientation, + priv->n_up, &(priv->scale), priv->is_grayscale); + + SMSC_TRACE_END; +} + + +/* set smart interface */ +static void _evas_smart_smsc_smart_set_user(Evas_Smart_Class *sc) +{ + SMSC_TRACE_BEGIN; + sc->add = _evas_smart_smsc_smart_add; + sc->del = _evas_smart_smsc_smart_del; + sc->show = _evas_smart_smsc_smart_show; + sc->hide = _evas_smart_smsc_smart_hide; + sc->move = _evas_smart_smsc_smart_move; + + sc->resize = _evas_smart_smsc_smart_resize; + sc->calculate = _evas_smart_smsc_smart_calculate; + SMSC_TRACE_END; +} + + +Evas_Object *evas_smart_smsc_add(Evas *evas) +{ + Evas_Object *res; + SMSC_TRACE_BEGIN; + res = evas_object_smart_add(evas, _evas_smart_smsc_smart_class_new()); + SMSC_TRACE_END; + return res; +} + + +int evas_smart_smsc_set_file(Evas_Object *o, char **const fnames, + int files_count, const char *ppd, + const struct paper_size_pts *paper_size, + enum page_orientation orientation, int n_up, + const struct page_scale *scale, int is_grayscale) +{ + int res = 0; + int i; + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == o || NULL == fnames || files_count <= 0 + || NULL == fnames[0] || NULL == ppd + || NULL == paper_size || NULL == scale, + -1, "Argument error"); + EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, priv, -1); + + /* save configuration for future usage */ + evas_smart_smsc_free_process_file_args(priv); + + priv->fnames = malloc(sizeof(char*) * (files_count + 1)); + SMSC_RETV_IF(NULL == priv->fnames, -1, "Out of memory"); + memset(priv->fnames, 0, sizeof(char*) * (files_count + 1)); + for (i = 0; i < files_count; ++i) { + priv->fnames[i] = strdup(fnames[i]); + if (NULL == priv->fnames[i]) { + evas_smart_smsc_free_process_file_args(priv); + SMSC_RETV_IF(1, -1, "Out of memory"); + } + } + priv->files_count = files_count; + priv->ppd = strdup(ppd); + priv->paper_size = *paper_size; + priv->paper_size.name = strdup(paper_size->name); + priv->orientation = orientation; + priv->n_up = n_up; + priv->scale = *scale; + priv->is_grayscale = is_grayscale; + + priv->is_process_file = 1; + + if (NULL == priv->ppd || NULL == priv->paper_size.name) { + evas_smart_smsc_free_process_file_args(priv); + SMSC_RETV_IF(1, -1, "Out of memory"); + } + + /* request preview_engine for recalculation */ + if (priv->is_ready) { + clear_smsc_widget(&(priv->widget)); + res = process_preview_engine_file(&(priv->widget.engine), + priv->fnames, priv->files_count, priv->ppd, + &(priv->paper_size), &(priv->widget_size), + priv->orientation, priv->n_up, &(priv->scale), + priv->is_grayscale); + } + + SMSC_TRACE_END; + return res; +} + +//needed to get events MOUSE_IN for correct Screen Reader work +void smsc_mouse_in_cb(void *data, Evas *evas, + Evas_Object *obj, void *event_info) +{ + SMSC_TRACE_BEGIN; + SMSC_TRACE_END; +} + +int evas_smart_smsc_set_layout(Evas_Object *o, Evas_Object *layout) +{ + EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, priv, -1); + smsc_widget_set_layout(&(priv->widget), layout); + evas_object_event_callback_add(priv->screen_reader_rectangle, EVAS_CALLBACK_MOUSE_IN, + smsc_mouse_in_cb, &(priv->widget)); + return 0; +} + +/* transparent rectangle to support Screen Reader */ +int init_smsc_accessability_support(Evas_Object *o) +{ + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == o, -1, "Invalid arguments"); + EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, priv, -1); + struct smsc_widget *widget = &(priv->widget); + + SMSC_RETV_IF(NULL == widget || NULL == widget->parent || NULL == widget->canvas, -1, + "Can't get widget of object."); + if (NULL == priv->screen_reader_rectangle) + { + priv->screen_reader_rectangle = evas_object_rectangle_add(widget->canvas); + SMSC_RETV_IF(NULL == priv->screen_reader_rectangle, -1, + "Failed to add rectangle to smart object widget canvas"); + } + + evas_object_color_set(priv->screen_reader_rectangle, 0, 0, 0, 0); + evas_object_smart_member_add(priv->screen_reader_rectangle, widget->parent); + evas_object_move(priv->screen_reader_rectangle, + priv->widget.off_x, priv->widget.off_y); + evas_object_resize(priv->screen_reader_rectangle, + priv->widget_size.x, + priv->widget_size.y); + evas_object_raise(priv->screen_reader_rectangle); + evas_object_show(priv->screen_reader_rectangle); + + SMSC_TRACE_END; + return 0; +} + +/* rectangle for screen reader creating and registering in access */ +int set_main_view_accessability_info(Evas_Object *o, + Evas_Object *layout, + const char *access_info, + const char *access_type, + const char *access_context_info) +{ + SMSC_TRACE_BEGIN; + EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, priv, -1); + + Evas_Object *ao; + ao = elm_access_object_get(priv->screen_reader_rectangle); + if (NULL == ao) { + ao = elm_access_object_register(priv->screen_reader_rectangle, layout); + SMSC_RETV_IF(NULL == ao, -1, "ERROR: Failed to register smsc in access!"); + } + SMSC_DEBUG("Setting main view accessibility info for screen reader: %s", access_info); + elm_access_info_set(ao, ELM_ACCESS_INFO, access_info); + elm_access_info_set(ao, ELM_ACCESS_TYPE, access_type); + elm_access_info_set(ao, ELM_ACCESS_CONTEXT_INFO, access_context_info); + SMSC_TRACE_END; + return 0; +} + + +/** + * @brief Calculate current page number based on current page offset + * @param[in] o Smooth scrolling widget + * @return <0 Error (argument error or not initialized) + * >=0 Current page number starting from 0 + */ +int evas_smart_smsc_calculate_page_number(Evas_Object *o) +{ + EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, priv, -1); + return get_smsc_position_cur_page(&(priv->widget.position)); +} + + +/** + * @brief Get pages count + * @param[in] o Smooth scrolling widget + * return <=0 Error (argument error or not initialized) + * >0 Pages count + */ +int evas_smart_smsc_get_pages_count(Evas_Object *o) +{ + EVAS_SMART_SMSC_DATA_GET_OR_RETURN_VAL(o, priv, -1); + SMSC_RETV_IF(!priv->widget.position.is_configured, + -1, "Not initialized"); + return priv->widget.position.pages_count; +} diff --git a/mobileprint/smsc/lib/smsc_widget.c b/mobileprint/smsc/lib/smsc_widget.c new file mode 100644 index 0000000..1e0fbc0 --- /dev/null +++ b/mobileprint/smsc/lib/smsc_widget.c @@ -0,0 +1,674 @@ +/* +* Mobileprint +* +* Copyright 2013 Samsung Electronics Co., Ltd + +* Licensed under the Flora License, Version 1.1 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://floralicense.org/license/ + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ + +#include +#include + +//#include + +#include "smsc_debug.h" + +#include "smsc_widget.h" + + +int add_smsc_widget_page(struct smsc_widget *widget, int page_num) +{ + struct smsc_page_data *page_data; + int posx; + int is_ok; + char img_fname[sizeof(PREVIEW_TEMP_DIR "/mobileprint_xxxx.ppm ")]; + + /*int w; + int h; + int x; + int y;*/ + + SMSC_TRACE_BEGIN; + + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + SMSC_RETV_IF(page_num < 0 + || widget->engine.p_model.conf.pages_count <= 0 + || widget->engine.p_model.conf.pages_count <= page_num, + -1, "Incorrect page number"); + + posx = get_smsc_position_page(&(widget->position), page_num, &is_ok); + SMSC_RETV_IF(!is_ok, -1, "Error in page position"); + + snprintf(img_fname, sizeof(img_fname), PREVIEW_TEMP_DIR "/mobileprint_%04d.ppm", + page_num + 1); + page_data = (struct smsc_page_data*) + malloc(sizeof(struct smsc_page_data)); + SMSC_RETV_IF(NULL == page_data, -1, "Memory allocation error"); + page_data->num = page_num; + + page_data->page_obj = evas_object_image_filled_add(widget->canvas); + if (widget->engine.p_model.pages_state[page_num + 1] + == PREVIEW_PAGE_STATE_READY) { + SMSC_DEBUG("loading image %s", img_fname); + evas_object_image_file_set( + page_data->page_obj, img_fname, NULL); + } else { + SMSC_DEBUG("page %d state: %d", page_num + 1, + widget->engine.p_model + .pages_state[page_num + 1]); + evas_object_image_file_set(page_data->page_obj, + PREVIEW_EMPTY_PAGE_FNAME, NULL); + } + //evas_object_image_preload(page_data->page_obj, EINA_FALSE); + //evas_object_color_set(page_data->page_obj, 0, 0, 0, 255); + + SMSC_DEBUG("posx = %d," + " widget->off_x = %d", + posx, widget->off_x); + evas_object_move(page_data->page_obj, + posx + widget->off_x, widget->posy); + evas_object_resize(page_data->page_obj, + widget->position.page_size_px.x, + widget->position.page_size_px.y); + evas_object_pass_events_set(page_data->page_obj, EINA_TRUE); + /* add object to smart object */ + evas_object_smart_member_add(page_data->page_obj, widget->parent); + evas_object_show(page_data->page_obj); + + widget->pages_list = eina_list_append( + widget->pages_list, (void*)page_data); + + SMSC_TRACE_END; + return 0; +} + + +int destroy_smsc_widget_page(struct smsc_page_data *page_data) +{ + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == page_data, -1, "Invalid page data pointer"); + + evas_object_hide(page_data->page_obj); + evas_object_del(page_data->page_obj); + free(page_data); + + SMSC_TRACE_END; + return 0; +} + + +int destroy_smsc_widget_pages(struct smsc_widget *widget) +{ + struct smsc_page_data* page_data; + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + EINA_LIST_FREE(widget->pages_list, page_data) + destroy_smsc_widget_page(page_data); + widget->pages_list = NULL; + SMSC_TRACE_END; + + return 0; +} + + +int update_smsc_widget_page(struct smsc_widget *widget, int page_num) +{ + Eina_List *cur_page = NULL; + char img_fname[sizeof(PREVIEW_TEMP_DIR "/mobileprint_xxxx.ppm ")]; + struct smsc_page_data* page_data; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + SMSC_RETV_IF(page_num < 0 + || widget->engine.p_model.conf.pages_count <= 0 + || widget->engine.p_model.conf.pages_count <= page_num, + -1, "Incorrect page number"); + + if (widget->engine.p_model.pages_state[page_num + 1] + != PREVIEW_PAGE_STATE_READY) + return -1; + + snprintf(img_fname, sizeof(img_fname), PREVIEW_TEMP_DIR + "/mobileprint_%04d.ppm", page_num + 1); + SMSC_DEBUG("page_num = %d", page_num); + + EINA_LIST_FOREACH(widget->pages_list, cur_page, page_data) + if (page_data->num == page_num) + evas_object_image_file_set( + page_data->page_obj, img_fname, NULL); + + SMSC_TRACE_END; + return 0; +} + + +int move_smsc_widget_pages(struct smsc_widget *widget) +{ + int is_ok; + int posx; + Eina_List *cur_page = NULL; + struct smsc_page_data* page_data; + + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + EINA_LIST_FOREACH(widget->pages_list, cur_page, page_data) + if (page_data != NULL) { + posx = get_smsc_position_page(&(widget->position), + page_data->num, &is_ok); + if (is_ok) + evas_object_move(page_data->page_obj, + posx + widget->off_x, + widget->posy); + } + + return 0; +} + + +int update_smsc_widget_positions(struct smsc_widget *widget) +{ + int *vis_pages; + int i; + Eina_List *old_pages_list = NULL; + Eina_List *cur_page = NULL; + int is_found; + int posx; + int is_ok; + struct smsc_page_data* page_data; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + //SMSC_DEBUG("update_smsc_widget_positions() started"); + + vis_pages = get_smsc_position_visible_pages(&(widget->position)); + SMSC_RETV_IF(NULL == vis_pages, -1, "Invalid visible pages list"); + + /* construct new visible pages list */ + old_pages_list = widget->pages_list; + widget->pages_list = NULL; + EINA_LIST_FREE(old_pages_list, page_data) { + is_found = 0; + if (page_data != NULL) { + for (i = 0; vis_pages[i] >= 0; ++i) { + /*SMSC_DEBUG("update_smsc_widget_positions():" + " i = %d, vis_pages[i] = %d", i, + vis_pages[i]);*/ + if (page_data->num == vis_pages[i]) { + is_found = 1; + /* move page to new list */ + widget->pages_list = eina_list_append( + widget->pages_list, + page_data); + posx = get_smsc_position_page( + &(widget->position), + vis_pages[i], &is_ok); + /*SMSC_DEBUG("posx = %d," + " widget->off_x = %d", + posx, widget->off_x);*/ + if (is_ok) + evas_object_move( + page_data->page_obj, + posx + widget->off_x, + widget->posy); + } + } + if (!is_found) + destroy_smsc_widget_page(page_data); + } + } + + /* add new pages */ + for (i = 0; vis_pages[i] >= 0; ++i) { + is_found = 0; + EINA_LIST_FOREACH(widget->pages_list, cur_page, page_data) + if (page_data != NULL && page_data->num == vis_pages[i]) + is_found = 1; + if (!is_found) { + /*SMSC_DEBUG("update_smsc_widget_positions(): adding," + " i = %d, vis_pages[i] = %d", + i, vis_pages[i]);*/ + add_smsc_widget_page(widget, vis_pages[i]); + } + } + + free(vis_pages); + + SMSC_TRACE_END; + return 0; +} + + +int hide_smsc_widget(struct smsc_widget *widget) +{ + Eina_List *cur_page = NULL; + struct smsc_page_data* page_data; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + + EINA_LIST_FOREACH(widget->pages_list, cur_page, page_data) + if (page_data != NULL) + evas_object_hide(page_data->page_obj); + + SMSC_TRACE_END; + return 0; +} + + +int show_smsc_widget(struct smsc_widget *widget) +{ + Eina_List *cur_page = NULL; + struct smsc_page_data* page_data; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + + EINA_LIST_FOREACH(widget->pages_list, cur_page, page_data) + if (page_data != NULL) + evas_object_show(page_data->page_obj); + + SMSC_TRACE_END; + return 0; +} + + +Evas_Object *loading_animation_add(Evas_Object *parent) +{ + Evas_Object *res; + res = elm_progressbar_add(parent); + SMSC_RETV_IF(res == NULL, NULL, "res is NULL"); + + elm_object_style_set(res, "list_process"); + evas_object_size_hint_align_set(res, EVAS_HINT_FILL, 0.5); + evas_object_size_hint_weight_set(res, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_progressbar_pulse(res, EINA_TRUE); + return res; +} + + +void show_smsc_widget_loading_animation(struct smsc_widget *widget) +{ + SMSC_TRACE_BEGIN; + SMSC_RET_IF(NULL == widget || NULL == widget->loading_animation, + "Invalid widget pointer"); + + evas_object_move(widget->loading_animation, + widget->off_x, widget->off_y); + evas_object_resize(widget->loading_animation, + widget->position.available_size.x, + widget->position.available_size.y); + evas_object_raise(widget->loading_animation); + evas_object_show(widget->loading_animation); + SMSC_TRACE_END; +} + + +void hide_smsc_widget_loading_animation(struct smsc_widget *widget) +{ + SMSC_TRACE_BEGIN; + SMSC_RET_IF(NULL == widget, "Invalid widget pointer"); + if (NULL == widget->loading_animation) + return; + evas_object_hide(widget->loading_animation); + SMSC_TRACE_END; +} + + +int update_smsc_widget_loading_animation(struct smsc_widget *widget) +{ + int page_num; + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + page_num = get_smsc_position_cur_page(&widget->position); + if (widget->engine.p_model.conf.pages_count <= 0) { + show_smsc_widget_loading_animation(widget); + SMSC_TRACE_END; + return 0; + } + if (widget->engine.p_model.pages_state[page_num + 1] + != PREVIEW_PAGE_STATE_READY) + show_smsc_widget_loading_animation(widget); + else + hide_smsc_widget_loading_animation(widget); + SMSC_TRACE_END; + return 0; +} + + +int smsc_widget_update_page_number(struct smsc_widget *widget) +{ + int page_num; + char pages[16]; + + Evas *e; + int x; + int y; + int w; + int h; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget, -1, "Invalid widget pointer"); + + page_num = get_smsc_position_cur_page(&widget->position); + /* update page number */ + if (widget->position.pages_count > 1) { + snprintf(pages, 15, "%d / %d", + page_num + 1, widget->position.pages_count); + pages[15] = '\0'; + } else { + strcpy(pages, " "); + } + edje_object_part_text_set(elm_layout_edje_get(widget->layout), + "pagenumber", pages); + + /* !!! hack to enforce text updating to avoid text image caching */ + e = evas_object_evas_get(widget->layout); + evas_output_viewport_get(e, &x, &y, &w, &h); + /* enforce bottom updating */ + evas_damage_rectangle_add(e, 0, h * 6 / 7, w, h / 7); + + SMSC_TRACE_END; + return 0; +} + + +Eina_Bool smsc_widget_update_position(void *data, int type, void *event) +{ + int *vis_pages; + int i; + struct smsc_widget *widget; + //int page_num; + //char pages[15]; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == data || NULL == event, + ECORE_CALLBACK_DONE, "Invalid pointer"); + + widget = (struct smsc_widget*)data; + /* update paper images positions */ + update_smsc_widget_positions(widget); + smsc_widget_update_page_number(widget); + update_smsc_widget_loading_animation(widget); + + //preview_model_debug_print_pages_state(&(widget->engine.p_model)); + + if (widget->engine.p_model.conf.pages_count <= 0) + return ECORE_CALLBACK_DONE; + + /* request engine for new pages */ + vis_pages = get_smsc_position_visible_pages(&(widget->position)); + + if (NULL == vis_pages) + return ECORE_CALLBACK_DONE; + for (i = 0; vis_pages[i] >= 0; ++i) + if (widget->engine.p_model.pages_state[vis_pages[i] + 1] + == PREVIEW_PAGE_STATE_NA) + preview_model_request_page( + &(widget->engine.p_model), + vis_pages[i] + 1); + free(vis_pages); + SMSC_TRACE_END; + return ECORE_CALLBACK_DONE; +} + +void smsc_widget_mouse_up_cb(void *data, Evas *evas, + Evas_Object *obj, void *event_info) +{ + struct smsc_widget *widget = (struct smsc_widget*)data; + SMSC_TRACE_BEGIN; + SMSC_RET_IF(NULL == data || NULL == event_info, "Argument error"); + Evas_Event_Mouse_Down *ev = event_info; + smsc_control_finish_move(&(widget->control), ev->canvas.x); + SMSC_TRACE_END; +} + + +void smsc_widget_mouse_down_cb(void *data, Evas *evas, + Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + struct smsc_widget *widget = (struct smsc_widget*)data; + SMSC_TRACE_BEGIN; + + if (NULL == widget) { + SMSC_TRACE_END; + return; + } + /* send to smsc_control new coordinates and moving beginning */ + smsc_control_begin_move(&(widget->control), ev->canvas.x); + SMSC_TRACE_END; +} + + +void smsc_widget_mouse_move_cb(void *data, Evas *evas, + Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + struct smsc_widget *widget = (struct smsc_widget*)data; + /* send to smsc_control new coordinates */ + smsc_control_process_move(&(widget->control), ev->canvas.x); +} + + +int clear_smsc_widget(struct smsc_widget *widget) +{ + SMSC_TRACE_BEGIN; + hide_smsc_widget_loading_animation(widget); + if (widget->pages_list != NULL) + destroy_smsc_widget_pages(widget); + reset_smsc_control(&(widget->control)); + clear_smsc_position_settings(&(widget->position)); + smsc_widget_update_page_number(widget); /* clear page number */ + //show_smsc_widget_loading_animation(widget); + SMSC_TRACE_END; + return 0; +} + + +int smsc_widget_load_near_pages(struct smsc_widget *widget, int page_num) +{ + Eina_List *cur_page = NULL; + struct smsc_page_data* page_data; + + if (widget->engine.p_model.conf.pages_count <= 0) + return 0; + + EINA_LIST_FOREACH(widget->pages_list, cur_page, page_data) { + SMSC_DEBUG("page_data->num = %d", page_data->num); + if (page_num == page_data->num) { + if (page_num + 1 < widget->engine + .p_model.conf.pages_count + && PREVIEW_PAGE_STATE_NA + == widget->engine + .p_model.pages_state[page_num + 2]) + preview_model_request_page( + &(widget->engine.p_model), + page_num + 1 + 1); + if (page_num + 1 > 1 + && PREVIEW_PAGE_STATE_NA + == widget->engine + .p_model.pages_state[page_num]) + preview_model_request_page( + &(widget->engine.p_model), + page_num + 1 - 1); + } + } + + return 0; +} + + +int smsc_widget_calculate_posy(struct smsc_widget *widget, int page_h) +{ + int h; + //int y; + int cy; + + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget || page_h <= 0, -1, "Incorrect arguments"); + + //evas_object_geometry_get(widget->parent, NULL, &y, NULL, &h); + h = widget->position.available_size.y; + if (h <= 0) + return -1; + + cy = widget->off_y + (h - page_h) / 2; + + SMSC_DEBUG("cy = %d, off_y = %d, h = %d, page_h = %d", + cy, widget->off_y, h, page_h); + + return cy; +} + + +Eina_Bool smsc_widget_page_ready_cb(void *data, int type, void *event) +{ + int pages_count; + struct smsc_widget *widget = (struct smsc_widget*)data; + struct preview_engine_event *event_data = + (struct preview_engine_event*)event; + + struct size_px *available_size_px; + struct size_pts page_size; + /*struct size_px shadow_size_px = {10, 10}; + struct preview_page_req settings_req;*/ + //struct preview_page_px settings_px; + + SMSC_TRACE_BEGIN; + + switch (event_data->status) { + case PREVIEW_ENGINE_EVENT_INITIAL_READY: + /* initialization done: request for page */ + pages_count = widget->engine.p_model.conf.pages_count; + if (pages_count <= 0) + break; + SMSC_DEBUG("PREVIEW_ENGINE_EVENT_INITIAL_READY," + " pages_count = %d", pages_count); + available_size_px = &(widget->engine.p_model.conf + .settings_req.available_size_px); + + page_size = widget->engine.p_model.conf.paper_size.s; + if (widget->engine.p_model.conf.settings_req.is_rotate90) + switch_size_pts_coords(&page_size); + + clear_smsc_widget(widget); + set_smsc_position_settings(&(widget->position), pages_count, + available_size_px, &page_size); + + /* request empty page image */ + preview_model_request_empty_page( + &(widget->engine.p_model)); + //update_smsc_widget_loading_animation(widget); + break; + + case PREVIEW_ENGINE_EVENT_EMPTY_PAGE_READY: + preview_model_request_page(&(widget->engine.p_model), 1); + + /* show empty pages */ + widget->posy = smsc_widget_calculate_posy(widget, + widget->position.page_size_px.y); + + smsc_widget_update_page_number(widget); + update_smsc_widget_positions(widget); + show_smsc_widget_loading_animation(widget); + break; + + case PREVIEW_ENGINE_EVENT_PAGE_READY: + /* load page */ + SMSC_DEBUG("PREVIEW_ENGINE_EVENT_PAGE_READY," + " event_data->page = %d", event_data->page); + update_smsc_widget_page(widget, event_data->page - 1); + update_smsc_widget_loading_animation(widget); + smsc_widget_load_near_pages(widget, event_data->page - 1); + break; + + case PREVIEW_ENGINE_EVENT_PAGE_PROCESSING: + /* TODO: show empty page */ + /*if (event_data->page == ugd->pt_files.current_index + 1) { + show_loading_animation(ugd); + }*/ + break; + + case PREVIEW_ENGINE_EVENT_INITIAL_ERROR: + case PREVIEW_ENGINE_EVENT_PAGE_ERROR: + /* TODO: something in error case */ + break; + } + + SMSC_TRACE_END; + return ECORE_CALLBACK_DONE; +} + + +int smsc_widget_set_layout(struct smsc_widget *widget, Evas_Object *layout) +{ + SMSC_TRACE_BEGIN; + SMSC_RETV_IF(NULL == widget || NULL == layout, -1, + "Invalid arguments"); + + /* mouse events */ + widget->layout = layout; + evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_DOWN, + smsc_widget_mouse_down_cb, widget); + evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_UP, + smsc_widget_mouse_up_cb, widget); + evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_MOVE, + smsc_widget_mouse_move_cb, widget); + + SMSC_TRACE_END; + return 0; +} + + +int init_smsc_widget(struct smsc_widget *widget, + Evas_Object *parent) +{ + SMSC_TRACE_BEGIN; + + SMSC_RETV_IF(NULL == widget || NULL == parent, -1, + "Invalid arguments"); + + memset(widget, 0, sizeof(struct smsc_widget)); + widget->parent = parent; + widget->layout = NULL; + widget->canvas = evas_object_evas_get(parent); + widget->loading_animation = loading_animation_add(widget->parent); + evas_object_smart_member_add(widget->loading_animation, widget->parent); + + show_smsc_widget_loading_animation(widget); + init_smsc_position(&(widget->position)); + init_smsc_control(&(widget->control), &(widget->position)); + init_preview_engine(&(widget->engine)); + + /* connect events */ + /* position event */ + ecore_event_handler_add(widget->position.position_update_event_type, + smsc_widget_update_position, widget); + + /* preview engine events */ + ecore_event_handler_add(widget->engine.page_ready_event_type, + smsc_widget_page_ready_cb, widget); + + widget->is_ready = 1; + + SMSC_TRACE_END; + + return 0; +} + + +/* TODO: widget destruction */ + + + diff --git a/org.tizen.mobileprint.manifest b/org.tizen.mobileprint.manifest new file mode 100644 index 0000000..433abb2 --- /dev/null +++ b/org.tizen.mobileprint.manifest @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/org.tizen.mobileprint.rule b/org.tizen.mobileprint.rule new file mode 100644 index 0000000..ed8b620 --- /dev/null +++ b/org.tizen.mobileprint.rule @@ -0,0 +1,196 @@ +_ org.tizen.mobileprint rwx +org.tizen.mobileprint _ rw +org.tizen.mobileprint system::vconf rwxat +org.tizen.mobileprint system::media rwxat +org.tizen.mobileprint system::homedir rwxat +org.tizen.mobileprint system::share rwxat +org.tizen.mobileprint pulseaudio rwxat +org.tizen.mobileprint sys-assert::core rwxat +e17 org.tizen.mobileprint rwx-- +org.tizen.app-tray org.tizen.mobileprint r-xat +org.tizen.mobileprint system::use_internet rwxat +system::use_internet org.tizen.mobileprint rw--- +org.tizen.mobileprint dbus rwxat +org.tizen.mobileprint device::printer rw--- +device::printer org.tizen.mobileprint rw--- +org.tizen.mobileprint device::app_logging -w--- +org.tizen.mobileprint wifi_direct_manager rw--- +org.tizen.mobileprint isf rwx-- +org.tizen.mobileprint ug-image-viewer-efl rwxat +org.tizen.mobileprint system::home rwxat +org.tizen.mobileprint org.tizen.indicator rwx-- +org.tizen.mobileprint contacts-service rwx-- +org.tizen.mobileprint org.tizen.gallery rwxa- +org.tizen.mobileprint org.tizen.gallery-service rwx-- +org.tizen.mobileprint cbhm rwx-- +org.tizen.mobileprint data-provider-master rw--- +org.tizen.mobileprint data-provider-master::shortcut rw--- +org.tizen.mobileprint data-provider-master::utility rw--- +org.tizen.mobileprint data-provider-master::notification rwx-- +org.tizen.mobileprint data-provider-master::notification.client -wx-- +org.tizen.mobileprint allshare::svc rwx-- +org.tizen.mobileprint sound_server rwx-- +org.tizen.mobileprint ail::db rw--- +org.tizen.mobileprint net-config r-x-- +org.tizen.mobileprint xorg rwx-- +org.tizen.mobileprint media-server rwx-- +org.tizen.mobileprint media-data::db rw--- +org.tizen.mobileprint pkgmgr r---- +org.tizen.mobileprint efreet r-x-- +org.tizen.mobileprint system-server rwxa- +org.tizen.mobileprint deviced rwxa- +org.tizen.mobileprint org.tizen.setting rwx-- +org.tizen.mobileprint org.tizen.myfile rw--- +org.tizen.mobileprint dali rwxat +org.tizen.mobileprint csc-manager rwx-- +org.tizen.mobileprint crash-worker --x-- +org.tizen.mobileprint download-provider rw--- +org.tizen.mobileprint msg-service rwx-- +org.tizen.mobileprint cloud-content-sync::db rw--- +org.tizen.mobileprint cloud-content-sync rwx-- +org.tizen.mobileprint drmfw rw--- +org.tizen.mobileprint device::video rw--- +org.tizen.mobileprint device::hwcodec rw--- +org.tizen.mobileprint org.tizen.gallery::web-media.db rwx-- +org.tizen.mobileprint org.tizen.gallery::gallery-media.db rwx-- +org.tizen.mobileprint org.tizen.gallery::face-svc.db rwx-- +org.tizen.mobileprint ug-email-viewer-efl rwx-- +org.tizen.mobileprint email-service rwx-- +org.tizen.mobileprint ug-email-docsearch-efl --x-- +org.tizen.mobileprint camera-external-engine rw--- +org.tizen.mobileprint system::vconf_setting rwxat +org.tizen.mobileprint system::vconf_inouse r---- +org.tizen.mobileprint system::vconf_privacy r---- +org.tizen.mobileprint system::vconf_system rw--- +org.tizen.mobileprint system::vconf_multimedia rw--- +org.tizen.mobileprint system::vconf_network rw--- +org.tizen.mobileprint system::vconf_misc r---- +aul org.tizen.mobileprint rwx-- +isf org.tizen.mobileprint r---- +org.tizen.gallery-service org.tizen.mobileprint rwx-- +org.tizen.cluster-home ug-image-viewer-efl r-x-- +org.tizen.lockscreen ug-image-viewer-efl r-x-- +org.tizen.mobileprint xorg::screencapture r---- +org.tizen.mobileprint contacts-service::db rwx-- +org.tizen.mobileprint org.tizen.smemo rwx-- +org.tizen.mobileprint ims-service::db rw--- +org.tizen.mobileprint app-svc::db rw--- +org.tizen.mobileprint org.tizen.message rwx-- +org.tizen.mobileprint mdm-server rwx-- +org.tizen.mobileprint system::vconf_inhouse rwxat +org.tizen.mobileprint ug-msg-composer-efl rwxat +media-server org.tizen.mobileprint -w--- +org.tizen.mobileprint contacts-service::svc rw--- +org.tizen.mobileprint contacts-service::phonelog rw--- +org.tizen.mobileprint msg-service::read rw--- +org.tizen.mobileprint msg-service::write rw--- +org.tizen.mobileprint msg-service::wappush rw--- +org.tizen.mobileprint telephony_framework::api_manager r---- +org.tizen.mobileprint telephony_framework::api_modem -w--- +org.tizen.mobileprint org.tizen.contacts rwx-- +org.tizen.mobileprint org.tizen.cluster-home rwx-- +org.tizen.cluster-home org.tizen.mobileprint r-x-- +context-service org.tizen.mobileprint r-x-- +org.tizen.mobileprint smemo::db rw--- +org.tizen.mobileprint org.tizen.browser rwx-- +org.tizen.mobileprint org.tizen.image-editor r---- +org.tizen.mobileprint org.tizen.email rwx-- +org.tizen.mobileprint org.tizen.calendar rwx-- +org.tizen.mobileprint calendar-service rwx-- +org.tizen.mobileprint device::sys_logging -w--- +org.tizen.mobileprint email-service::db rw--- +org.tizen.mobileprint webkit2-efl r-x-- +org.tizen.mobileprint data-provider-master::badge rw--- +org.tizen.mobileprint resman::db rw--- +org.tizen.mobileprint map-efl rwxat +org.tizen.mobileprint ug-email-composer-efl rwxat +org.tizen.mobileprint ui-gadget::client --x-- +org.tizen.mobileprint secure-storage::pkcs12 r---- +org.tizen.mobileprint email-service::write rw--- +org.tizen.mobileprint calendar-service::svc rw--- +org.tizen.mobileprint ug_bluetooth r-x-- +org.tizen.mobileprint syspopup::db rwx-- +org.tizen.mobileprint bt-service::admin -w--- +org.tizen.mobileprint bt-service::gap -w--- +org.tizen.mobileprint bt-service::manager -w--- +org.tizen.mobileprint system::app_logging -w--- +org.tizen.mobileprint svi-data rwxat +org.tizen.mobileprint immvibed rwx-- +org.tizen.mobileprint libaccounts-svc::db rw--- +org.tizen.mobileprint org.tizen.volume rwx-- +org.tizen.mobileprint org.tizen.setting::default-resources r-x-- +org.tizen.mobileprint device::camera rw--- +org.tizen.mobileprint device::mdnie rw--- +org.tizen.mobileprint pkgmer::db r---- +org.tizen.mobileprint power_manager rwx-- +org.tizen.mobileprint stt-server rwx-- +org.tizen.mobileprint tts-server rwx-- +org.tizen.mobileprint ug-camera-efl rwxat +org.tizen.mobileprint vcs-server rwx-- +org.tizen.mobileprint image-filter-d::db rw--- +org.tizen.mobileprint location_fw::db rw--- +org.tizen.mobileprint pkgmgr::db rw--- +org.tizen.mobileprint org.tizen.svoice rwxat +org.tizen.mobileprint org.tizen.dropbox r-x-- +org.tizen.mobileprint org.tizen.facebook r-x-- +org.tizen.mobileprint oma-ds-agent rwx-- +oma-ds-agent org.tizen.mobileprint rwx-- +org.tizen.mobileprint oma-ds-agent::cfg rwxat +org.tizen.setting org.tizen.mobileprint r-x-- +org.tizen.setting oma-ds-agent::cfg rwx-- +system::use_internet oma-ds-agent rwx-- +oma-ds-agent system::use_internet rwx-- +org.tizen.mobileprint syslogd rwx-- +org.tizen.mobileprint e17 r---- +org.tizen.mobileprint dlogutil r-x-- +org.tizen.mobileprint telephony_framework r-x-- +org.tizen.mobileprint aul r-x-- +org.tizen.mobileprint ode r-x-- +org.tizen.mobileprint sensor-framework r-x-- +org.tizen.mobileprint secure-storage r-x-- +org.tizen.mobileprint starter r-x-- +org.tizen.mobileprint osp-app-service r-x-- +org.tizen.mobileprint osp-security-service r-x-- +org.tizen.mobileprint osp-channel-service r-x-- +org.tizen.mobileprint org.tizen.app-tray r-x-- +org.tizen.mobileprint org.tizen.quickpanel r-x-- +org.tizen.mobileprint connman rwx-- +org.tizen.mobileprint mobicore-daemon r-x-- +org.tizen.mobileprint alarm-server rwx-- +org.tizen.mobileprint brcm_daemon r-x-- +org.tizen.mobileprint resman r-x-- +org.tizen.mobileprint osp-connectivity-service rwx-- +org.tizen.mobileprint push-service rwx-- +org.tizen.mobileprint eas-engine rwx-- +org.tizen.mobileprint org.tizen.data-provider-slave rwx-- +org.tizen.mobileprint org.tizen.data-provider-slave rwx-- +org.tizen.mobileprint usb-server rwx-- +org.tizen.mobileprint mtp-responder rwx-- +org.tizen.mobileprint sdbd rwx-- +ui-gadget::client oma-ds-agent::svc rw--- +org.tizen.mobileprint samsung-account-front r-x-- +org.tizen.mobileprint worldclock::db rw--- +org.tizen.mobileprint thumb-server r---- +org.tizen.mobileprint data-provider-master::shortcut.shortcut -w--- +org.tizen.mobileprint data-provider-master::notification.client -w--- +org.tizen.mobileprint location_fw::client rwx-- +org.tizen.mobileprint org.tizen.smartsearch --x-- +org.tizen.mobileprint ug-map-efl rwxat +org.tizen.mobileprint obexd r-x-- +org.tizen.mobileprint phone-misc::db rw--- +org.tizen.mobileprint msg-service::db rw--- +org.tizen.mobileprint ug-msg-viewer-efl rwxat +org.tizen.mobileprint org.tizen.fileshare-service rwxat +org.tizen.fileshare-service org.tizen.mobileprint r-x-- +org.tizen.mobileprint nfc-manager rwx-- +org.tizen.mobileprint nfc-manager::p2p rwx-- +org.tizen.mobileprint nfc-manager::admin rwx-- +org.tizen.mobileprint ug-setting-gallery-efl rwxat +org.tizen.mobileprint org.tizen.music-player --x-- +org.tizen.mobileprint notification::db rw--- +org.tizen.indicator org.tizen.mobileprint rwx-- +org.tizen.lockscreen org.tizen.mobileprint r-x-- +org.tizen.quickpanel org.tizen.mobileprint r-x-- +net.wifi-qs org.tizen.mobileprint rw--- +stest-service org.tizen.mobileprint r-x-- +org.tizen.mobileprint stest-service -w--- diff --git a/packaging/mobileprint.spec b/packaging/mobileprint.spec new file mode 100644 index 0000000..b0751c3 --- /dev/null +++ b/packaging/mobileprint.spec @@ -0,0 +1,73 @@ +Name: mobileprint +Summary: Library for writing UNIX daemons +Version: 0.2.24 +Release: 1 +Group: System/Libraries +License: Flora-1.1 +Source0: %{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: gettext-tools +BuildRequires: edje-tools +BuildRequires: sysman-devel +BuildRequires: pkgconfig(appcore-efl) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(appsvc) +BuildRequires: pkgconfig(print-service) +BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(ui-gadget-1) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(syspopup-caller) +BuildRequires: pkgconfig(notification) +BuildRequires: pkgconfig(pmapi) +BuildRequires: efl-assist-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Mobile Print application + +%package -n org.tizen.mobileprint +Summary: Mobile Print application +Group: Development/Libraries +Requires: sys-assert +Requires: print-service +Requires: efl-assist + +%description -n org.tizen.mobileprint +Mobile Print application + +%prep +%setup -q + +%build +%define PREFIX /usr/apps/org.tizen.mobileprint +cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} + +%install +rm -rf %{buildroot} +%make_install + +mkdir -p %{buildroot}/usr/share/license +cp %{_builddir}/%{buildsubdir}/LICENSE.Flora %{buildroot}/usr/share/license/org.tizen.mobileprint + +mkdir -p %{buildroot}/opt/etc/smack/accesses.d/ +cp -v %{_builddir}/%{buildsubdir}/org.tizen.mobileprint.rule %{buildroot}/opt/etc/smack/accesses.d/ + +%clean +rm -rf %{buildroot} + +%post -n org.tizen.mobileprint + chown -R 5000:5000 /opt/%{PREFIX}/data + +%files -n org.tizen.mobileprint +%manifest org.tizen.mobileprint.manifest +/opt/etc/smack/accesses.d/org.tizen.mobileprint.rule +%defattr(-,root,root,-) +/usr/share/license/org.tizen.mobileprint +%{PREFIX}/* +/opt/%{PREFIX}/* +/usr/share/icons/default/small/org.tizen.mobileprint.png +#for appfw new manifest +/usr/share/packages/org.tizen.mobileprint.xml + +%changelog -- 2.7.4