diff -Nru chmsee-1.0.7/AUTHORS chmsee-1.3.0/AUTHORS --- chmsee-1.0.7/AUTHORS 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/AUTHORS 2011-01-16 13:48:42.000000000 +0000 @@ -1,7 +1,7 @@ -zhong - --- After Version 0.9.6 -- +Ji YongGang -Ji YongGang +-- 1.0.3 -> 1.0.7 -- LI Daobing -rae l + +-- Before 0.9.6 -- +zhong diff -Nru chmsee-1.0.7/ChangeLog chmsee-1.3.0/ChangeLog --- chmsee-1.0.7/ChangeLog 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/ChangeLog 2011-01-16 13:48:42.000000000 +0000 @@ -1 +1,2 @@ -See: http://github.com/lidaobing/chmsee/commits/master +You can view the most recently git repository commit log at: +http://github.com/jungleji/chmsee/commits/master diff -Nru chmsee-1.0.7/ChangeLog.old chmsee-1.3.0/ChangeLog.old --- chmsee-1.0.7/ChangeLog.old 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/ChangeLog.old 1970-01-01 00:00:00.000000000 +0000 @@ -1,320 +0,0 @@ -Sat May 17 16:36:24 HKT 2008 Ji YongGang - * Fix m4/chmlib.m4 bug. - -Sat May 17 16:20:59 HKT 2008 Ji YongGang - * Add default-prefs-firefox.js - -Sat May 17 16:17:02 HKT 2008 Ji YongGang - * Update ChangeLog - -Sat May 17 15:55:59 HKT 2008 Ji YongGang - * Add chmlib default lib path. - -Fri May 16 18:10:24 HKT 2008 jungle@soforge-studio.com - * Release ChmSee 1.0.1 - -Fri May 16 17:41:12 HKT 2008 jungle@soforge-studio.com - * Add xulrunner1.9 support. - -Mon Aug 6 13:56:57 HKT 2007 Ji YongGang - * Add cs2w.1 to cs2w/Makefile.am - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-28) - -Mon Aug 6 13:40:45 HKT 2007 Ji YongGang - * Add cs2w man page, written by Li Daobing. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-27) - -Fri Jul 27 14:09:35 HKT 2007 Ji YongGang - * Release 1.0.0 - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-26) - -Thu Jul 12 09:56:14 HKT 2007 Ji YongGang - * Add cs2w python script. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-25) - -Tue May 8 18:34:52 HKT 2007 Ji YongGang - * Support more LCID code, thanks crquan. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-24) - -Sat Apr 7 09:53:05 HKT 2007 Ji YongGang - * Release ChmSee 1.0.0 beta2. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-23) - -Fri Apr 6 22:38:45 HKT 2007 Ji YongGang - * Import chmsee man(1), which is provided by Li Daobing. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-22) - -Fri Apr 6 18:29:26 HKT 2007 Ji YongGang - * Add %f to Exec=chmsee in chmsee.desktop.in, thanks Li Daobing. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-21) - -Thu Apr 5 22:28:38 HKT 2007 Ji YongGang - * If no hhc file found in chm, do not show toc notebook page. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-20) - -Thu Apr 5 09:57:55 HKT 2007 Ji YongGang - * Update title to html tab label. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-19) - -Tue Apr 3 13:27:47 HKT 2007 Ji YongGang - * make chmsee.desktop and chmsee.keys intltoolize, thanks Li Daobing. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-18) - -Mon Apr 2 15:56:22 HKT 2007 Ji YongGang - * Fix bookmarks link select signal memory leak. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-17) - -Sun Apr 1 15:52:22 HKT 2007 Ji YongGang - * Fix bookmarks current link and some memory leak bugs. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-16) - -Sun Mar 25 12:16:08 HKT 2007 Ji YongGang - * Popup a message dialog when failed loading chmfile. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-15) - -Fri Mar 23 17:16:29 HKT 2007 Ji YongGang - * Increase and decrease html font size. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-14) - -Fri Mar 23 13:24:51 HKT 2007 Ji YongGang - * Fix bookmarks add & remove bug. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-13) - -Thu Mar 22 17:41:28 HKT 2007 Ji YongGang - * Popup html context menu. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-12) - -Tue Mar 20 15:03:44 HKT 2007 Ji YongGang - * Add Auto-Detect Lang in setup dialog. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-11) - -Mon Mar 19 18:31:56 HKT 2007 Ji YongGang - * Using pkg-config checking gecko support library - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-10) - -Thu Mar 15 15:16:53 HKT 2007 Ji YongGang - * Show link message on status bar. - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-9) - -Thu Mar 1 20:41:29 HKT 2007 Ji YongGang - * remove search.c from po/POFILES.in - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-8) - -Mon Feb 5 11:00:47 HKT 2007 Ji YongGang - * Update ChmSee to 1.0.0 beta - Keywords: - - - - Patches applied: - - * jungle@server--2006/chmsee--local--1.0.0--base-0 - tag of jungle@gro.clinux.org--2006/chmsee--main--0--patch-6 - - * jungle@server--2006/chmsee--local--1.0.0--patch-1 - detect chmsee_no_link in booktree link callback. - - * jungle@server--2006/chmsee--local--1.0.0--patch-2 - fix empty title bug - - * jungle@server--2006/chmsee--local--1.0.0--patch-3 - update to 1.0.0 beta - - * jungle@server--2006/chmsee--local--1.0.0--patch-4 - remove search.h search.c - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-7) - -Wed Sep 20 15:57:11 HKT 2006 Ji YongGang - * rewrite code with Gtk2+ OOP and using gecko engine. - Keywords: - - - - Patches applied: - - * jungle@server--2006/chmsee--local--0.9.8--base-0 - tag of jungle@gro.clinux.org--2006/chmsee--main--0--patch-5 - - * jungle@server--2006/chmsee--local--0.9.8--patch-1 - rewrite ChmSee with gtk+ OOP - - * jungle@server--2006/chmsee--local--0.9.8--patch-2 - using gecko utils. - - * jungle@server--2006/chmsee--local--0.9.8--patch-3 - font setting in setup window. - - * jungle@server--2006/chmsee--local--0.9.8--patch-4 - close current tab - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-6) - -Thu Jul 6 14:46:21 HKT 2006 Ji YongGang - * clean up 0.9.7 - Keywords: - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-5) - -Wed Jun 21 16:28:15 HKT 2006 Ji YongGang - * version 0.9.7-alpha - Keywords: - - version 0.9.7-alpha - - Patches applied: - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-5 - add context popup menu - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-6 - BookInfo struct - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-7 - test file case insensitive - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-8 - version 0.9.7-alpha - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-4) - -Fri Jun 16 11:46:04 HKT 2006 Ji YongGang - * change id tagging method - Keywords: - - - - Patches applied: - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-4 - change id-tagging method to tagline - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-3) - -Wed Jun 14 18:06:48 HKT 2006 Ji YongGang - * merge with local dev-branch - Keywords: - - - - Patches applied: - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-2 - modify ChmSee glade gui - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-3 - using getopt parse command line options. - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-2) - -Mon Jun 12 21:05:02 HKT 2006 Ji YongGang - * merge local archive to gro public server - Keywords: - - - - Patches applied: - - * jungle@server--2006/chmsee--jungle--0.9.7--base-0 - tag of jungle@gro.clinux.org--2006/chmsee--main--0--base-0 - - * jungle@server--2006/chmsee--jungle--0.9.7--patch-1 - developing 0.9.7 - - - (jungle@gro.clinux.org--2006/chmsee--main--0--patch-1) - -Sun Jun 11 20:33:18 HKT 2006 Ji YongGang - * import ChmSee 0.9.6 - Keywords: - New-files: AUTHORS COPYING ChangeLog ChangeLog-0.9.5 INSTALL - Makefile.am Makefile.in NEWS README README-0.9.5 TODO - aclocal.m4 autogen.sh chmsee-splash.png chmsee.desktop - chmsee.glade chmsee.gladep chmsee.html chmsee.keys - chmsee.mime chmsee.png chmsee.spec chmsee.spec.in compile - config.guess config.h.in config.sub configure configure.ac - depcomp install-sh intltool-extract.in intltool-merge.in - intltool-update.in ltmain.sh m4/chmlib.m4 m4/openssl.m4 - missing mkinstalldirs po/ChangeLog po/Makefile.in.in - po/POTFILES.in po/zh_CN.po src/Makefile.am - src/Makefile.in src/bookmarks.c src/bookmarks.h - src/charset.c src/charset.h src/chmfile.c src/chmfile.h - src/chmsee.c src/chmsee.h src/chmsee_config.c - src/chmsee_config.h src/exchm.c src/exchm.h src/html.c - src/html.h src/main.c src/menu_popup.c src/menu_popup.h - src/parse_hh.c src/parse_hh.h src/search.c src/search.h - src/setup.c src/setup.h src/startup.c src/startup.h - src/topuri.c src/topuri.h src/utils.c src/utils.h - New-patches: jungle@gro.clinux.org--2006/chmsee--main--0--base-0 - - - (jungle@gro.clinux.org--2006/chmsee--main--0--base-0) diff -Nru chmsee-1.0.7/CMakeLists.txt chmsee-1.3.0/CMakeLists.txt --- chmsee-1.0.7/CMakeLists.txt 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/CMakeLists.txt 2011-01-16 13:48:42.000000000 +0000 @@ -1,71 +1,58 @@ project(chmsee) -cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) -set(PACKAGE_VERSION "1.0.7" ) +cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) + +set(PACKAGE_VERSION "1.3.0" ) + +set(CMAKE_BUILD_TYPE Release) + find_package(PkgConfig) -pkg_check_modules (CHMSEE REQUIRED gthread-2.0 glib-2.0 libxml-2.0 gtk+-2.0 libglade-2.0 nspr) -pkg_search_module(XULRUNNER REQUIRED libxul-embedding-unstable>=1.9 xulrunner-gtkmozembed>=1.8) +pkg_check_modules (CHMSEE REQUIRED gthread-2.0>=2.22 glib-2.0>=2.22 libxml-2.0 gtk+-2.0>=2.18 nspr) +pkg_search_module(XULRUNNER REQUIRED mozilla-gtkmozembed-embedding>=1.9 xulrunner-gtkmozembed>=1.9) + set(CHMSEE_INCLUDE_DIRS ${CHMSEE_INCLUDE_DIRS} ${XULRUNNER_INCLUDE_DIRS}) set(CHMSEE_CFLAGS_OTHER ${CHMSEE_CFLAGS_OTHER} ${XULRUNNER_CFLAGS_OTHER} -Wall) set(CHMSEE_LIBRARY_DIRS ${CHMSEE_LIBRARY_DIRS} ${XULRUNNER_LIBRARY_DIRS}) set(CHMSEE_LIBRARIES ${CHMSEE_LIBRARIES} ${XULRUNNER_LIBRARIES} chm gcrypt) - -if(XULRUNNER_VERSION MATCHES "1\\.8\\..*") - set(XULRUNNER18 1) -endif() -if(XULRUNNER_VERSION MATCHES "1\\.9\\..*") - set(XULRUNNER19 1) -endif() -if(XULRUNNER_VERSION MATCHES "1\\.9\\.0\\..*") - set(XULRUNNER190 1) -endif() -if(XULRUNNER_VERSION MATCHES "1\\.9\\.1\\..*") - set(XULRUNNER191 1) -endif() - -set(CHMSEE_BOOKMARK_FILE "chmsee_bookmarks") +set(CHMSEE_CONFIG_FILE "config") +set(CHMSEE_BOOKMARKS_FILE "chmsee_bookmarks") set(CHMSEE_BOOKINFO_FILE "chmsee_bookinfo") set(CHMSEE_NO_LINK "chmsee_no_link") set(CHMSEE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/chmsee") -set(GECKO_FLAVOUR "libxul") -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) +set(CHMSEE_BOOKSHELF_DEFAULT "bookshelf") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/src/config.h @ONLY) find_program(INTLTOOL_MERGE intltool-merge) if(${INTLTOOL_MERGE} STREQUAL "INTLTOOL_MERGE-NOTFOUND") - message(FATAL_ERROR "intltool-merge not found, you can find one in http://ftp.gnome.org/pub/gnome/sources/intltool/") -endif() - -find_program(GLIB_GENMARSHAL glib-genmarshal) -if(${GLIB_GENMARSHAL} STREQUAL "GLIB_GENMARSHAL-NOTFOUND") - message(FATAL_ERROR "glib-genmarshal not found, check your glib-2.0 development environment") + message(FATAL_ERROR "intltool-merge not found, you can find one in http://ftp.gnome.org/pub/gnome/sources/intltool/") endif() find_library(LIBCHM chm) if(${LIBCHM} STREQUAL "LIBCHM-NOTFOUND") - message(FATAL_ERROR "libchm not found, you can find one in http://www.jedrea.com/chmlib/") + message(FATAL_ERROR "libchm not found, you can find one in http://www.jedrea.com/chmlib/") endif() find_library(LIBGCRYPT gcrypt) if(${LIBGCRYPT} STREQUAL "LIBGCRYPT-NOTFOUND") - message(FATAL_ERROR "libgcrypt not found, you can find one in ftp://ftp.gnupg.org/gcrypt/libgcrypt/") + message(FATAL_ERROR "libgcrypt not found, you can find one in ftp://ftp.gnupg.org/gcrypt/libgcrypt/") endif() +# Set RPATH for installing +set(CMAKE_SKIP_BUILD_RPATH FALSE) +set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +set(CMAKE_INSTALL_RPATH ${CMAKE_SYSTEM_LIBRARY_PATH}) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) -add_subdirectory(test) -add_custom_target(report - COMMAND gtester -o gtester.xml test/test - COMMAND gtester-report gtester.xml > report.html - DEPENDS test - VERBATIM) -add_custom_target(love - COMMAND src/chmsee -vvv --datadir=data - DEPENDS chmsee - ) -add_custom_target(love-gdb - COMMAND gdb --args src/chmsee --g-fatal-warnings -vv --datadir=data - DEPENDS chmsee - ) +#add_subdirectory(gtkmoz) + +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "chmsee-1.3.0") +SET(CPACK_SOURCE_GENERATOR "TGZ") +SET(CPACK_SOURCE_IGNORE_FILES ".*~;/.git/;.gitignore;ID;TAGS;/gtkmoz/") + +INCLUDE(CPack) diff -Nru chmsee-1.0.7/.cproject chmsee-1.3.0/.cproject --- chmsee-1.0.7/.cproject 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/.cproject 1970-01-01 00:00:00.000000000 +0000 @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -make - -test -true -true -true - - -make -report -true -true -true - - -make -clean -true -true -true - - -make - -love -true -true -true - - - - - - - - - diff -Nru chmsee-1.0.7/data/about-dialog.ui chmsee-1.3.0/data/about-dialog.ui --- chmsee-1.0.7/data/about-dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/data/about-dialog.ui 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + True + center + normal + http://code.google.com/p/chmsee + http://code.google.com/p/chmsee + Ji YongGang <jungleji@gmail.com> +LI Daobing <lidaobing@gmail.com> +zhong <iam_zhong@yahoo.com.cn> + + translator-credits + chmsee-icon.png + + + vertical + + + + False + end + 0 + + + + + + diff -Nru chmsee-1.0.7/data/chmsee.desktop.in chmsee-1.3.0/data/chmsee.desktop.in --- chmsee-1.0.7/data/chmsee.desktop.in 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/chmsee.desktop.in 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,4 @@ [Desktop Entry] -Version=1.0 _Name=ChmSee _Comment=HTML Help(CHM) viewer Exec=chmsee %f diff -Nru chmsee-1.0.7/data/chmsee.glade chmsee-1.3.0/data/chmsee.glade --- chmsee-1.0.7/data/chmsee.glade 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/chmsee.glade 1970-01-01 00:00:00.000000000 +0000 @@ -1,386 +0,0 @@ - - - - - - ChmSee - 800 - 600 - chmsee-icon.png - - - True - - - True - - - False - False - 2 - 3 - - - - - - - True - 5 - Setup - center - - - True - - - True - 0 - none - - - True - 12 - - - True - - - True - - - True - True - False - - - 3 - 0 - - - - - gtk-clear - True - True - False - 5 - True - - - False - False - 5 - 1 - - - - - 0 - - - - - True - CHM files extracted in this cache folder, you can press Clear button to free disk space. - -NOTE: If you are viewing a CHM file, you need reopen it after cleaning. - True - - - False - False - 5 - 1 - - - - - - - - - True - <b>Cache</b> - True - - - label_item - - - - - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - - - True - - - True - Variable Width: - - - False - False - 3 - 0 - - - - - True - False - True - False - True - - - 5 - 1 - - - - - False - False - 2 - 0 - - - - - True - - - True - Fixed Width: - - - False - False - 3 - 0 - - - - - True - False - True - False - True - - - 5 - 1 - - - - - 1 - - - - - - - - - True - <b>Font</b> - True - - - label_item - - - - - 1 - - - - - True - 0 - none - - - True - 12 - - - True - - - True - Auto-Detect: - - - False - False - 3 - 0 - - - - - True - Universal -Simplified Chinese -Traditional Chinese -Japanese -Korean -Russian -Ukrainian - - - 5 - 1 - - - - - - - - - True - <b>Charset</b> - True - - - label_item - - - - - 2 - - - - - True - end - - - gtk-close - True - True - True - False - 6 - True - - - False - False - 0 - - - - - 3 - - - - - - - True - center - normal - The HTML Help(CHM) viewer for Unix/Linux - http://code.google.com/p/chmsee - http://code.google.com/p/chmsee - zhong <iam_zhong@yahoo.com.cn> -Ji YongGang <jungle@soforge-studio.com> -LI Daobing <lidaobing@gmail.com> -rae l <crquan@gmail.com> - translator-credits - chmsee-icon.png - - - - - - False - end - 0 - - - - - - - True - Open File - True - dialog - - - True - 25 - - - True - end - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-open - -5 - True - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - diff -Nru chmsee-1.0.7/data/chmsee.keys chmsee-1.3.0/data/chmsee.keys --- chmsee-1.0.7/data/chmsee.keys 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/chmsee.keys 2011-01-16 13:48:42.000000000 +0000 @@ -1,10 +1,10 @@ application/x-chm - default_application_id=chmsee + default_application_id=chmsee description=HTML Help category=Documents - default_component_iid= + default_component_iid= icon_filename=chmsee-icon.png - default_action_type=application - short_list_application_ids_for_novice_user_level=chmsee - short_list_application_ids_for_intermediate_user_level=chmsee - short_list_application_ids_for_advanced_user_level=chmsee + default_action_type=application + short_list_application_ids_for_novice_user_level=chmsee + short_list_application_ids_for_intermediate_user_level=chmsee + short_list_application_ids_for_advanced_user_level=chmsee Binary files /tmp/QIFEq85cJU/chmsee-1.0.7/data/chmsee-splash.png and /tmp/LX5SijC71r/chmsee-1.3.0/data/chmsee-splash.png differ diff -Nru chmsee-1.0.7/data/CMakeLists.txt chmsee-1.3.0/data/CMakeLists.txt --- chmsee-1.0.7/data/CMakeLists.txt 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/CMakeLists.txt 2011-01-16 13:48:42.000000000 +0000 @@ -1,22 +1,18 @@ add_custom_command( - OUTPUT chmsee.desktop - COMMAND intltool-merge -d ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR}/chmsee.desktop.in chmsee.desktop - DEPENDS chmsee.desktop.in - ) -add_custom_command( - OUTPUT default-prefs.js - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/default-prefs-common.js - ${CMAKE_CURRENT_SOURCE_DIR}/default-prefs-${GECKO_FLAVOUR}.js > default-prefs.js - DEPENDS default-prefs-common.js default-prefs-${GECKO_FLAVOUR}.js - ) + OUTPUT chmsee.desktop + COMMAND intltool-merge -d ${CMAKE_SOURCE_DIR}/po ${CMAKE_CURRENT_SOURCE_DIR}/chmsee.desktop.in chmsee.desktop + DEPENDS chmsee.desktop.in + ) add_custom_target(driver ALL DEPENDS chmsee.desktop default-prefs.js) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/chmsee.desktop DESTINATION share/applications) install(FILES chmsee.mime chmsee.keys DESTINATION share/mime-info) install(FILES chmsee-icon.png DESTINATION share/pixmaps) install(FILES - book-closed.png book-open.png chmsee-icon.png chmsee-splash.png - helpdoc.png hide-pane.png show-pane.png chmsee.glade - ${CMAKE_CURRENT_BINARY_DIR}/default-prefs.js - DESTINATION - share/chmsee) + book-closed.png book-open.png chmsee-icon.png + helpdoc.png hide-pane.png show-pane.png + about-dialog.ui openfile-dialog.ui setup-window.ui + default-prefs.js + DESTINATION share/chmsee) + +add_subdirectory(icons) diff -Nru chmsee-1.0.7/data/default-prefs-common.js chmsee-1.3.0/data/default-prefs-common.js --- chmsee-1.0.7/data/default-prefs-common.js 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/default-prefs-common.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -// mouse wheel: disable mozilla's ctrl+wheel zooming, and enable our own -// set numlines to -1 to reverse directions, see bug #306110 -pref("mousewheel.withcontrolkey.action", 0); -pref("mousewheel.withcontrolkey.numlines", -1); -pref("mousewheel.withcontrolkey.sysnumlines", false); - -// fix horizontal scroll with 2nd wheel, see bug #148557 -pref("mousewheel.horizscroll.withnokey.action", 0); -pref("mousewheel.horizscroll.withnokey.sysnumlines", true); - -// don't allow opening file:/// URLs on pages from network sources (http, etc.) -pref("security.checkloaduri", true); - -// enable line wrapping in View Source -pref("view_source.wrap_long_lines", true); - -// disable sidebar What's Related, we don't use it -pref("browser.related.enabled", false); - -// Work around for mozilla focus bugs -pref("mozilla.widget.raise-on-setfocus", false); - -// disable sucky XUL ftp view, have nice ns4-like html page instead -pref("network.dir.generate_html", true); - -// deactivate mailcap support, it breaks Gnome-based helper apps -pref("helpers.global_mailcap_file", ""); -pref("helpers.private_mailcap_file", ""); - -// use the mozilla defaults for mime.types files to let mozilla guess proper -// Content-Type for file uploads instead of always falling back to -// application/octet-stream -pref("helpers.global_mime_types_file", ""); -pref("helpers.private_mime_types_file", ""); - -// enable keyword search -pref("keyword.enabled", false); - -// disable usless security warnings -pref("security.warn_entering_secure", false); -pref("security.warn_entering_secure.show_once", true); -pref("security.warn_leaving_secure", false); -pref("security.warn_leaving_secure.show_once", false); -pref("security.warn_submit_insecure", false); -pref("security.warn_submit_insecure.show_once", false); -pref("security.warn_viewing_mixed", true); -pref("security.warn_viewing_mixed.show_once", false); - -// fonts -pref("browser.display.use_document_fonts", 0); -pref("font.size.unit", "pt"); -pref("font.size.fixed.x-western", 12); -pref("font.size.fixed.zh-CN", 12); -pref("font.size.variable.x-western", 12); -pref("font.size.variable.zh-CN", 12); - -// protocols -pref("network.protocol-handler.external-default", false); -pref("network.protocol-handler.warn-external-default", false); -pref("network.protocol-handler.external.ftp", true); -pref("network.protocol-handler.external.http", true); -pref("network.protocol-handler.external.https", true); -pref("network.protocol-handler.external.news", true); -pref("network.protocol-handler.external.mailto", true); -pref("network.protocol-handler.external.irc", true); -pref("network.protocol-handler.external.webcal", true); - -// disable xpinstall -pref("xpinstall.enabled", false); - -// enable typeahead find -pref("accessibility.typeaheadfind", false); - -// disable pings -pref("browser.send_pings", false); - diff -Nru chmsee-1.0.7/data/default-prefs-firefox.js chmsee-1.3.0/data/default-prefs-firefox.js --- chmsee-1.0.7/data/default-prefs-firefox.js 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/default-prefs-firefox.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -// enable plugin finder -pref("plugin.default_plugin_disabled", true); - -// enable locale matching -pref("intl.locale.matchOS", true); - -// enable fixed-up typeaheadfind extension -pref("accessibility.typeaheadfindsea", false); -pref("accessibility.typeaheadfindsea.autostart", true); -pref("accessibility.typeaheadfindsea.linksonly", true); - -// disable image resizing -pref("browser.enable_automatic_image_resizing", false); diff -Nru chmsee-1.0.7/data/default-prefs.js chmsee-1.3.0/data/default-prefs.js --- chmsee-1.0.7/data/default-prefs.js 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/data/default-prefs.js 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,75 @@ +// mouse wheel: using mozilla's ctrl+wheel zooming +pref("mousewheel.withcontrolkey.action", 3); +pref("mousewheel.withcontrolkey.numlines", 1); +pref("mousewheel.withcontrolkey.sysnumlines", false); + +// mouse wheel: using mozilla's shift+wheel smooth scrolling +pref("mousewheel.withshiftkey.action", 0); +pref("mousewheel.withshiftkey.numlines", 1); +pref("mousewheel.withshiftkey.sysnumlines", false); + +// horizontal scroll with 2nd wheel +pref("mousewheel.horizscroll.withnokey.action", 0); +pref("mousewheel.horizscroll.withnokey.sysnumlines", true); + +// enable line wrapping in View Source +pref("view_source.wrap_long_lines", true); + +// disable sidebar What's Related, we don't use it +pref("browser.related.enabled", false); + +// Work around for mozilla focus bugs +pref("mozilla.widget.raise-on-setfocus", false); + +// disable sucky XUL ftp view, have nice ns4-like html page instead +pref("network.dir.generate_html", true); + +// deactivate mailcap support, it breaks Gnome-based helper apps +pref("helpers.global_mailcap_file", ""); +pref("helpers.private_mailcap_file", ""); + +// use the mozilla defaults for mime.types files to let mozilla guess proper +// Content-Type for file uploads instead of always falling back to +// application/octet-stream +pref("helpers.global_mime_types_file", ""); +pref("helpers.private_mime_types_file", ""); + +// enable keyword search +pref("keyword.enabled", false); + +// disable usless security warnings +pref("security.warn_entering_secure", false); +pref("security.warn_entering_secure.show_once", true); +pref("security.warn_leaving_secure", false); +pref("security.warn_leaving_secure.show_once", false); +pref("security.warn_submit_insecure", false); +pref("security.warn_submit_insecure.show_once", false); +pref("security.warn_viewing_mixed", true); +pref("security.warn_viewing_mixed.show_once", false); + +// fonts +pref("browser.display.use_document_fonts", 0); +pref("font.size.unit", "pt"); + +// protocols +pref("network.protocol-handler.external-default", false); +pref("network.protocol-handler.warn-external-default", true); +pref("network.protocol-handler.external.ftp", true); +pref("network.protocol-handler.external.http", true); +pref("network.protocol-handler.external.https", true); +pref("network.protocol-handler.external.news", true); +pref("network.protocol-handler.external.mailto", true); +pref("network.protocol-handler.external.irc", true); +pref("network.protocol-handler.external.webcal", true); + +// disable xpinstall +pref("xpinstall.enabled", false); + +// enable typeahead find +pref("accessibility.typeaheadfind", false); + +// disable pings +pref("browser.send_pings", false); + +pref("browser.display.use_document_colors", true); +//pref("browser.display.use_system_colors", true); diff -Nru chmsee-1.0.7/data/default-prefs-libxul.js chmsee-1.3.0/data/default-prefs-libxul.js --- chmsee-1.0.7/data/default-prefs-libxul.js 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/default-prefs-libxul.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -pref("browser.display.use_document_colors", false); - diff -Nru chmsee-1.0.7/data/default-prefs-mozilla.js chmsee-1.3.0/data/default-prefs-mozilla.js --- chmsee-1.0.7/data/default-prefs-mozilla.js 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/default-prefs-mozilla.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -// enable typeahead find -pref("accessibility.typeaheadfind", true); - -// don't show the stupid wallet master password dialogue -pref("wallet.caveat", false); diff -Nru chmsee-1.0.7/data/default-prefs-xulrunner.js chmsee-1.3.0/data/default-prefs-xulrunner.js --- chmsee-1.0.7/data/default-prefs-xulrunner.js 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/data/default-prefs-xulrunner.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -// use system colours -pref("browser.display.use_system_colors", true); - diff -Nru chmsee-1.0.7/data/icons/CMakeLists.txt chmsee-1.3.0/data/icons/CMakeLists.txt --- chmsee-1.0.7/data/icons/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/data/icons/CMakeLists.txt 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,4 @@ +install(FILES hicolor/scalable/mimetypes/chm.svg DESTINATION share/icons/hicolor/scalable/mimetypes) +install(FILES hicolor/16x16/mimetypes/chm.png DESTINATION share/icons/hicolor/16x16/mimetypes) +install(FILES hicolor/32x32/mimetypes/chm.png DESTINATION share/icons/hicolor/32x32/mimetypes) +install(FILES hicolor/48x48/mimetypes/chm.png DESTINATION share/icons/hicolor/48x48/mimetypes) Binary files /tmp/QIFEq85cJU/chmsee-1.0.7/data/icons/hicolor/16x16/mimetypes/chm.png and /tmp/LX5SijC71r/chmsee-1.3.0/data/icons/hicolor/16x16/mimetypes/chm.png differ Binary files /tmp/QIFEq85cJU/chmsee-1.0.7/data/icons/hicolor/32x32/mimetypes/chm.png and /tmp/LX5SijC71r/chmsee-1.3.0/data/icons/hicolor/32x32/mimetypes/chm.png differ Binary files /tmp/QIFEq85cJU/chmsee-1.0.7/data/icons/hicolor/48x48/mimetypes/chm.png and /tmp/LX5SijC71r/chmsee-1.3.0/data/icons/hicolor/48x48/mimetypes/chm.png differ diff -Nru chmsee-1.0.7/data/icons/hicolor/scalable/mimetypes/chm.svg chmsee-1.3.0/data/icons/hicolor/scalable/mimetypes/chm.svg --- chmsee-1.0.7/data/icons/hicolor/scalable/mimetypes/chm.svg 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/data/icons/hicolor/scalable/mimetypes/chm.svg 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru chmsee-1.0.7/data/openfile-dialog.ui chmsee-1.3.0/data/openfile-dialog.ui --- chmsee-1.0.7/data/openfile-dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/data/openfile-dialog.ui 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,64 @@ + + + + + + True + Open File + True + dialog + + + True + vertical + 25 + + + True + end + + + gtk-cancel + True + True + True + False + True + + + False + False + 0 + + + + + gtk-open + True + True + True + True + False + True + + + False + False + 1 + + + + + False + end + 0 + + + + + + button4 + button5 + + + diff -Nru chmsee-1.0.7/data/setup-window.ui chmsee-1.3.0/data/setup-window.ui --- chmsee-1.0.7/data/setup-window.ui 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/data/setup-window.ui 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,296 @@ + + + + + + True + 5 + Setup + False + True + center + + + True + vertical + + + True + 0 + none + + + True + 12 + + + True + vertical + + + True + + + True + True + False + + + 3 + 0 + + + + + gtk-clear + True + True + False + 5 + True + + + False + False + 5 + 1 + + + + + 0 + + + + + True + CHM files extracted in this cache folder, you can press Clear button to free disk space. + +NOTE: If you are viewing a CHM file, you need reopen it after cleaning. + True + + + False + False + 5 + 1 + + + + + + + + + True + <b>Cache</b> + True + + + + + False + 0 + + + + + True + 0 + none + + + True + 12 + + + True + 2 + 2 + 5 + 5 + + + True + 0 + Fixed Width: + + + 1 + 2 + GTK_FILL + + + + + True + True + True + True + + + 1 + 2 + 1 + 2 + + + + + True + True + True + True + + + 1 + 2 + + + + + True + 0 + Variable Width: + + + GTK_FILL + + + + + + + + + True + <b>Font</b> + True + + + + + 1 + + + + + True + 0 + none + + + True + 12 + + + True + + + True + Charset: + + + False + False + 3 + 0 + + + + + True + + + 5 + 1 + + + + + + + + + True + <b>Language</b> + True + + + + + 2 + + + + + True + 0 + none + + + True + 12 + + + True + start + + + Load last opened file. + True + True + False + True + + + False + False + 0 + + + + + + + + + True + <b>Startup</b> + True + + + + + 3 + + + + + True + end + + + gtk-ok + True + True + True + False + 6 + True + + + False + False + 0 + + + + + 4 + + + + + + diff -Nru chmsee-1.0.7/debian/changelog chmsee-1.3.0/debian/changelog --- chmsee-1.0.7/debian/changelog 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/debian/changelog 2011-05-12 03:05:16.000000000 +0000 @@ -1,23 +1,49 @@ -chmsee (1.0.7-1.2ubuntu1) lucid; urgency=low +chmsee (1.3.0-2ubuntu1~ppa1~lucid1) lucid; urgency=low - [ Micah Gersten ] - * debian/patches/xulrunner1.9.2.diff: - - libxul-embedding is no longer unstable - - Bump GRE version - - Add XULRUNNER192 variable - - [ Chris Coulson ] - * Merge from Debian unstable, remaining changes: - - debian/control: - + Build-depend on quilt - - debian/rules: - + Include patchsys-quilt.mk - * debian/patches/xulrunner1.9.2.diff: - - Update for new source version - - Ensure regex for testing for xulrunner 1.9.2 matches "1.9.2" as - well as "1.9.2.*" + * Backport to Lucidbleed ppa. - -- Chris Coulson Sun, 21 Mar 2010 01:16:14 +0000 + -- Nicola Ferralis Wed, 11 May 2011 23:04:13 -0400 + +chmsee (1.3.0-2ubuntu1) natty; urgency=low + + * Fix LP: #761715 - chmsee will stop working with the Firefox 4.0.1 + release + - add debian/patches/series + - add debian/patches/01_fix_gecko_version.patch + + -- Chris Coulson Fri, 15 Apr 2011 13:52:05 +0100 + +chmsee (1.3.0-2) unstable; urgency=low + + * Fix "Please add libnspr4-dev to build-deps"(Closes: #610889) + - debian/control: add build depends on libnspr4-dev + + -- LI Daobing Sun, 20 Feb 2011 16:51:23 +0800 + +chmsee (1.3.0-1) unstable; urgency=low + + * new upstream release. + + -- LI Daobing Sun, 23 Jan 2011 15:27:29 +0800 + +chmsee (1.2.0-1) unstable; urgency=low + + * new upstream release (closes: #592194). + * debian/watch: updated. + * debian/control: bump standards version to 3.9.1. + + -- LI Daobing Sat, 14 Aug 2010 16:24:07 +0800 + +chmsee (1.1.0-1) unstable; urgency=low + + * new upstream release. + * debian/source/format: 3.0. + * debian/rules: ChangeLog.old no longer exist. + * debian/control: bump standards version to 3.8.4. + * debian/patches/debian-changes-1.1.0-1: fix crash when compile under + xulrunner 1.9.2. + + -- LI Daobing Mon, 12 Apr 2010 20:00:24 +0800 chmsee (1.0.7-1.2) unstable; urgency=low @@ -51,26 +77,6 @@ -- LI Daobing Mon, 14 Sep 2009 22:24:01 +0800 -chmsee (1.0.6-1ubuntu2) karmic; urgency=low - - * LP: #455517 - supersede firefox 3.0 and xulrunner-1.9 in karmic; - chmsee is already ported, its just that the binary depends is - still (regression?) wrong. - - -- Alexander Sack Tue, 20 Oct 2009 11:15:05 +0200 - -chmsee (1.0.6-1ubuntu1) karmic; urgency=low - - * Merge with Debian unstable (LP: #416346), remaining changes - + xulrunner-1.9.1 by default transition - see: https://blueprints.launchpad.net/ubuntu/+spec/desktop-karmic-firefox-3.5 - - bump minimal xulrunner-dev version - * debian/control, debian/rules: use quilt patch system. - * Added xulrunner1.9.1.diff patch from upstream to support building against - xulrunner 1.9.1 - - -- أحمد المحمودي (Ahmed El-Mahmoudy) Thu, 20 Aug 2009 14:17:32 +0300 - chmsee (1.0.6-1) unstable; urgency=low * New Upstream Version @@ -83,14 +89,6 @@ -- LI Daobing Sun, 12 Jul 2009 11:28:18 +0800 -chmsee (1.0.5-1ubuntu1) karmic; urgency=low - - * xulrunner-1.9.1 by default transition - + see: https://blueprints.launchpad.net/ubuntu/+spec/desktop-karmic-firefox-3.5 - - bump minimal xulrunner-dev version - - -- Alexander Sack Thu, 06 Aug 2009 15:30:17 +0200 - chmsee (1.0.5-1) unstable; urgency=low * new upstream release. diff -Nru chmsee-1.0.7/debian/control chmsee-1.3.0/debian/control --- chmsee-1.0.7/debian/control 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/debian/control 2011-04-15 12:51:48.000000000 +0000 @@ -4,9 +4,10 @@ Maintainer: Ubuntu Developers XSBC-Original-Maintainer: LI Daobing Build-Depends: cdbs (>= 0.4.23-1.1), cmake (>= 2.6.2), debhelper (>= 5), - xulrunner-dev (>= 1.9.2), libchm-dev, libgcrypt11-dev, intltool, - pkg-config, libglade2-dev (>= 2.4.0), libgtk2.0-dev (>= 2.8.0), quilt -Standards-Version: 3.8.3 + xulrunner-dev (>= 1.9.1.3-2), libchm-dev, libgcrypt11-dev, intltool, + pkg-config, libglade2-dev (>= 2.4.0), libgtk2.0-dev (>= 2.8.0), + libnspr4-dev +Standards-Version: 3.9.1 DM-Upload-Allowed: yes Vcs-Browser: http://git.debian.org/?p=chinese/chmsee.git Vcs-Git: git://git.debian.org/git/chinese/chmsee.git diff -Nru chmsee-1.0.7/debian/patches/01_fix_gecko_version.patch chmsee-1.3.0/debian/patches/01_fix_gecko_version.patch --- chmsee-1.0.7/debian/patches/01_fix_gecko_version.patch 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/debian/patches/01_fix_gecko_version.patch 2011-04-15 12:49:47.000000000 +0000 @@ -0,0 +1,11 @@ +--- a/src/components/gecko-utils.cpp ++++ b/src/components/gecko-utils.cpp +@@ -182,7 +182,7 @@ gecko_utils_init(void) + + static const GREVersionRange greVersion = { + "1.9a", PR_TRUE, +- "2", PR_TRUE ++ "2.0.*", PR_TRUE + }; + + char xpcomLocation[PATH_MAX]; diff -Nru chmsee-1.0.7/debian/patches/series chmsee-1.3.0/debian/patches/series --- chmsee-1.0.7/debian/patches/series 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/debian/patches/series 2011-04-15 12:49:18.000000000 +0000 @@ -1 +1 @@ -xulrunner1.9.2.diff +01_fix_gecko_version.patch diff -Nru chmsee-1.0.7/debian/patches/xulrunner1.9.2.diff chmsee-1.3.0/debian/patches/xulrunner1.9.2.diff --- chmsee-1.0.7/debian/patches/xulrunner1.9.2.diff 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/debian/patches/xulrunner1.9.2.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -Index: chmsee-1.0.7/CMakeLists.txt -=================================================================== ---- chmsee-1.0.7.orig/CMakeLists.txt 2010-03-21 02:07:43.580783390 +0000 -+++ chmsee-1.0.7/CMakeLists.txt 2010-03-21 02:36:14.690847242 +0000 -@@ -4,16 +4,13 @@ - find_package(PkgConfig) - - pkg_check_modules (CHMSEE REQUIRED gthread-2.0 glib-2.0 libxml-2.0 gtk+-2.0 libglade-2.0 nspr) --pkg_search_module(XULRUNNER REQUIRED libxul-embedding-unstable>=1.9 xulrunner-gtkmozembed>=1.8) -+pkg_search_module(XULRUNNER REQUIRED libxul-embedding>=1.9.2 libxul-embedding-unstable>=1.9 xulrunner-gtkmozembed>=1.9) - set(CHMSEE_INCLUDE_DIRS ${CHMSEE_INCLUDE_DIRS} ${XULRUNNER_INCLUDE_DIRS}) - set(CHMSEE_CFLAGS_OTHER ${CHMSEE_CFLAGS_OTHER} ${XULRUNNER_CFLAGS_OTHER} -Wall) - set(CHMSEE_LIBRARY_DIRS ${CHMSEE_LIBRARY_DIRS} ${XULRUNNER_LIBRARY_DIRS}) - set(CHMSEE_LIBRARIES ${CHMSEE_LIBRARIES} ${XULRUNNER_LIBRARIES} chm gcrypt) - - --if(XULRUNNER_VERSION MATCHES "1\\.8\\..*") -- set(XULRUNNER18 1) --endif() - if(XULRUNNER_VERSION MATCHES "1\\.9\\..*") - set(XULRUNNER19 1) - endif() -@@ -23,6 +20,9 @@ - if(XULRUNNER_VERSION MATCHES "1\\.9\\.1\\..*") - set(XULRUNNER191 1) - endif() -+if(XULRUNNER_VERSION MATCHES "1\\.9\\.2\\..*" OR XULRUNNER_VERSION MATCHES "1\\.9\\.2") -+ set(XULRUNNER192 1) -+endif() - - set(CHMSEE_BOOKMARK_FILE "chmsee_bookmarks") - set(CHMSEE_BOOKINFO_FILE "chmsee_bookinfo") -Index: chmsee-1.0.7/src/config.h.in -=================================================================== ---- chmsee-1.0.7.orig/src/config.h.in 2010-03-21 02:07:43.530784089 +0000 -+++ chmsee-1.0.7/src/config.h.in 2010-03-21 02:36:14.690847242 +0000 -@@ -10,8 +10,8 @@ - #define GETTEXT_PACKAGE "chmsee" - #define PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale" - #cmakedefine XULRUNNER_VERSION "${XULRUNNER_VERSION}" --#cmakedefine XULRUNNER18 1 - #cmakedefine XULRUNNER19 1 - #cmakedefine XULRUNNER190 1 - #cmakedefine XULRUNNER191 1 -+#cmakedefine XULRUNNER192 1 - #cmakedefine GECKO_LIB_ROOT "${GECKO_LIB_ROOT}" -Index: chmsee-1.0.7/src/gecko_utils.cpp -=================================================================== ---- chmsee-1.0.7.orig/src/gecko_utils.cpp 2010-03-21 02:07:43.550786979 +0000 -+++ chmsee-1.0.7/src/gecko_utils.cpp 2010-03-21 02:36:41.013283402 +0000 -@@ -210,10 +210,10 @@ - #ifdef XPCOM_GLUE - NS_LogInit(); - --#if XULRUNNER191 -+#if XULRUNNER191 || XULRUNNER192 - static const GREVersionRange greVersion = { - "1.9.1", PR_TRUE, -- "1.9.2", PR_FALSE -+ "1.9.3", PR_FALSE - }; - #else - static const GREVersionRange greVersion = { diff -Nru chmsee-1.0.7/debian/rules chmsee-1.3.0/debian/rules --- chmsee-1.0.7/debian/rules 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/debian/rules 2011-04-15 12:51:56.000000000 +0000 @@ -5,13 +5,11 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/cmake.mk -include /usr/share/cdbs/1/rules/patchsys-quilt.mk INSTROOT = $(CURDIR)/debian/chmsee DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS=" -Wl,--as-needed" DEB_CONFIGURE_EXTRA_FLAGS += --with-gecko=libxul DEB_INSTALL_CHANGELOGS_ALL += ChangeLog -DEB_INSTALL_DOCS_ALL += ChangeLog.old # copy from /usr/share/cdbs/1/class/gnome.mk clean:: diff -Nru chmsee-1.0.7/debian/source/format chmsee-1.3.0/debian/source/format --- chmsee-1.0.7/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/debian/source/format 2011-05-12 03:12:49.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru chmsee-1.0.7/debian/watch chmsee-1.3.0/debian/watch --- chmsee-1.0.7/debian/watch 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/debian/watch 2011-02-20 08:43:09.000000000 +0000 @@ -1,3 +1,2 @@ version=3 -http://code.google.com/p/chmsee/downloads/list \ -http://chmsee.googlecode.com/files/chmsee-(.*)\.tar\.gz +http://googlecode.debian.net/p/chmsee/chmsee-([\d.]+)\.tar\.gz diff -Nru chmsee-1.0.7/doc/chmsee.1 chmsee-1.3.0/doc/chmsee.1 --- chmsee-1.0.7/doc/chmsee.1 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/doc/chmsee.1 2011-01-16 13:48:42.000000000 +0000 @@ -1,7 +1,7 @@ -.TH "CHMSEE" "1" -.SH "NAME" +.TH "CHMSEE" "1" +.SH "NAME" chmsee \(em A chm file viewer written in GTK -.SH "SYNOPSIS" +.SH "SYNOPSIS" .B chmsee [\fIFILE\fR] .PP @@ -10,23 +10,22 @@ .PP .B chmsee \-\-version -.SH "DESCRIPTION" +.SH "DESCRIPTION" .B chmsee -is a viewer for Compiled HTML Help (CHM) files. It, can show the -contents tree if one is available, print the current page and do the -usual history stunts. It allows you to change fonts, use bookmarks. -.SH "SEE ALSO" -.PP -xchm (1). -.SH "AUTHOR" -.PP -This manual page was written by LI Daobing for -the \fBDebian\fP system (but may be used by others). Permission is -granted to copy, distribute and/or modify this document under -the terms of the GNU General Public License, Version 2 any -later version published by the Free Software Foundation. - -.PP -On Debian systems, the complete text of the GNU General Public -License can be found in /usr/share/common-licenses/GPL. - +is a viewer for Compiled HTML Help (CHM) files. It, can show the +contents tree if one is available and do the usual history stunts. +It allows you to change fonts, use bookmarks. +.SH "SEE ALSO" +.PP +xchm (1). +.SH "AUTHOR" +.PP +This manual page was written by LI Daobing for +the \fBDebian\fP system (but may be used by others). Permission is +granted to copy, distribute and/or modify this document under +the terms of the GNU General Public License, Version 2 any +later version published by the Free Software Foundation. + +.PP +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common-licenses/GPL. diff -Nru chmsee-1.0.7/.gitignore chmsee-1.3.0/.gitignore --- chmsee-1.0.7/.gitignore 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -*.a -*.bak -*.cache -*.desktop -*.gmo -*.mo -*.m4 -*.o -*.swp -*.cmake -*~ -.deps -/.cproject -/.project -/.settings -/config.status.lineno -/cscope.files -cscope.out -ABOUT-NLS -Makefile -Makefile.in -POTFILES -TAGS -aclocal.m4 -build -compile -config.guess -config.h -config.log -config.rpath -config.status -config.sub -configure -depcomp -gmon.out -install-sh -intltool-* -missing -po/*.header -po/*.sed -po/*.sin -po/.intltool-merge-cache -po/Makevars.template -po/Rules-quot -src/chmsee -src/default-prefs.js -src/marshal.c -src/marshal.h -stamp* -tags -CMakeCache.txt -CMakeFiles -data/default-prefs.js -gtester.xml -report.html -test/test -install_manifest.txt diff -Nru chmsee-1.0.7/NEWS chmsee-1.3.0/NEWS --- chmsee-1.0.7/NEWS 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/NEWS 2011-01-16 13:48:42.000000000 +0000 @@ -1,3 +1,32 @@ +ChmSee 1.3.0 2011-01-16 +----------------------- +* Use XDG Base Directory Specification for config and bookshelf cache +* Starup splash screen removed +* Add global font setting +* Fix a bug which get homepage from #STRINGS +* Change Prev&Next page hotkey from Alt to Control +* Fix filter bug in cs_tree_view +* Remove extracting progressbar + +ChmSee 1.2.0 2010-07-23 +----------------------- +* Add previous and next page function +* Improve language charset setting +* Open specified page in file.chm::page.html format +* Display progress bar during file extraction +* Fix hhk keyword parse problem +* Fix filename case insensitive checking bug +* Need gtk+ >= 2.20 for gecko multi-threads compatible + +ChmSee 1.1.0 2010-04-12 +----------------------- +* Only support Gecko > 1.9 (Firefox3) +* Need gtk+ >= 2.16 (for using gtkbuilder and g_uri functions) +* Add index page filter string (Thanks Mingxi Wu) +* Add page find function +* Add Recent Files feature +* Add loading last file at starup option + ChmSee 1.0.7 2009-09-14 ----------------------- @@ -67,7 +96,7 @@ ~~~~ * issue 19: Arabic language support in sidebar. -* issue 25: Double-click on topic title (in sidebar) to open its sub-topics +* issue 25: Double-click on topic title (in sidebar) to open its sub-topics * a safer hcc parser. l10n @@ -125,7 +154,7 @@ ChmSee 1.0.0 2007-07-23 ------------------------ -* Add cs2w, written by rae l . It's a Python script +* Add cs2w, written by rae l. It's a Python script that can convert CHM file to web browser friendly pages. ChmSee 1.0.0-beta2 2007-04-07 diff -Nru chmsee-1.0.7/po/bn.po chmsee-1.3.0/po/bn.po --- chmsee-1.0.7/po/bn.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/bn.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-01-11 09:27+0000\n" "Last-Translator: LI Daobing \n" "Language-Team: Bengali \n" @@ -17,272 +17,694 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" faisal https://launchpad.net/~faisal-ahmed\n" +"\n" +"Launchpad Contributions:\n" +" LI Daobing https://launchpad.net/~lidaobing\n" +" faisal https://launchpad.net/~faisal-ahmed" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML সহায়িকা(CHM) প্রদর্শক" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "ফাইল খুলুন" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "ক্যাশ" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Charset" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "ফন্ট" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "সম্বন্ধে" - -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "সম্বন্ধে..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "সয়ন্ক্রিয়ভাবে সনাক্ত করা" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "ক্যাশ" -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "পেছনে" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Charset" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" "\n" "NOTE: If you are viewing a CHM file, you need reopen it after cleaning." msgstr "" -"CHM ফাইলগুলো এই ক্যাশ ফোল্ডারে খোলা হয়েছে, ডিস্কের জায়গা খালি করতে চাইলে " -"আপনি ক্লিয়ার বাটনে চাপ দিতে পারেন। \n" +"CHM ফাইলগুলো এই ক্যাশ ফোল্ডারে খোলা হয়েছে, ডিস্কের জায়গা খালি করতে চাইলে আপনি " +"ক্লিয়ার বাটনে চাপ দিতে পারেন। \n" "\n" -"লক্ষ্য করুন: আপনি যদি একটি CHM ফাইল দেখতে থাকেন, তবে পরিস্কার করার পরে " -"আপনাকে সেটি আবার খুলে দেখতে হবে।" +"লক্ষ্য করুন: আপনি যদি একটি CHM ফাইল দেখতে থাকেন, তবে পরিস্কার করার পরে আপনাকে " +"সেটি আবার খুলে দেখতে হবে।" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Charset" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "নির্দিষ্ট প্রস্থ:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "অগ্রসর" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "স্বাভাবিক" +#: ../data/setup-window.ui.h:11 +msgid "Setup" +msgstr "সেটআপ" -#: ../data/chmsee.glade.h:17 -msgid "Open File" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "পরিবর্তনযোগ্য প্রস্থ" + +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "" + +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "" + +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "" + +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "" + +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" + +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" msgstr "ফাইল খুলুন" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "প্যানেল" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "ফাইল খুলুন" -#: ../data/chmsee.glade.h:21 -msgid "Setup" -msgstr "সেটআপ" +#: ../src/chmsee.c:195 +msgid "New _Tab" +msgstr "" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "প্যানেল দেখানো/লুকানো" +#: ../src/chmsee.c:196 +msgid "_Close Tab" +msgstr "" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "ইউনিক্স/লিনাক্সের HTML সাহায্য প্রদর্শক (CHM)" +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"সার্বজনীন\n" -"সাধারণ চাইনিজ\n" -"ঐতিহ্যগত চাইনিজ\n" -"জাপানিজ\n" -"কোরিয়ান\n" -"রাশিয়ান\n" -"ইউক্রেনিয়ান" +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "পরিবর্তনযোগ্য প্রস্থ" +#: ../src/chmsee.c:199 ../src/components/book.c:121 +msgid "_Copy" +msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "" + +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +#, fuzzy +msgid "_Back" +msgstr "পেছনে" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 +#, fuzzy +msgid "_Forward" +msgstr "অগ্রসর" + +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" + +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" + +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "সম্বন্ধে" + +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" msgstr "বড় করে দেখানো" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "স্বাভাবিক" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" msgstr "ছোট করে দেখানো" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -"Launchpad Contributions:\n" -" faisal https://launchpad.net/~faisal-ahmed\n" -"\n" -"Launchpad Contributions:\n" -" LI Daobing https://launchpad.net/~lidaobing\n" -" faisal https://launchpad.net/~faisal-ahmed" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML সহায়িকা(CHM) প্রদর্শক" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "প্যানেল দেখানো/লুকানো" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM ফাইলসমূহ" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "সমস্ত ফাইলসমূহ" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "প্রস্তুত!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "বিষয়" +#: ../src/chmsee.c:985 +#, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "" -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "বুকমার্কসমূহ" +#: ../src/main.c:220 +msgid "Display ChmSee version" +msgstr "" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "শিরোনাম নাই" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "ত্রুটিপূর্নভাবে চালু হওয়া ফাইল '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "বুকমার্ক" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "সম্বন্ধে" -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" +#: ../src/setup.c:132 +msgid "West European" msgstr "" -#: ../data/chmsee.glade.h:15 -msgid "Home" +#: ../src/setup.c:133 +msgid "East European" msgstr "" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" +#: ../src/setup.c:134 +msgid "East Asian" msgstr "" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" +#: ../src/setup.c:135 +msgid "SE & SW Asian" msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#: ../src/setup.c:136 +msgid "Middle Eastern" msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" +#: ../src/setup.c:137 +msgid "Unicode" msgstr "" -#: ../data/chmsee.glade.h:36 -msgid "_Close Tab" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" msgstr "" -#: ../data/chmsee.glade.h:37 -msgid "_Copy" +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" msgstr "" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" +#: ../src/setup.c:143 +msgid "Western (IBM-850)" msgstr "" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" +#: ../src/setup.c:144 +msgid "Western (MacRoman)" msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" msgstr "" -#: ../data/chmsee.glade.h:41 -msgid "_Forward" +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" msgstr "" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" msgstr "" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" msgstr "" -#: ../src/models/chmfile.c:246 -#, c-format -msgid "Extract chmfile failed: %s" +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" msgstr "" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" msgstr "" -#: ../src/models/chmfile.c:322 -#, c-format -msgid "Can not open chm file %s." +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" msgstr "" -#: ../src/main.cpp:88 -msgid "Display the version and exit" +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" msgstr "" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" msgstr "" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" +#: ../src/setup.c:183 +msgid "Korean (UHC)" msgstr "" -#: ../src/main.cpp:135 +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "শিরোনাম নাই" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "বিষয়" + +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "বুকমার্কসমূহ" + +#: ../src/components/book.c:1019 +#, c-format +msgid "Can not find link target file at \"%s\"" +msgstr "" + +#: ../src/models/chmfile.c:293 +#, c-format +msgid "Cannot open chmfile: %s" +msgstr "" + +#: ../src/models/chmfile.c:303 #, c-format -msgid "more than 1 argument\n" +msgid "Extract chmfile failed: %s" msgstr "" + +#: ../src/models/chmfile.c:328 +#, c-format +msgid "Open \"%s\" failed: %s" +msgstr "" + +#: ../src/models/chmfile.c:519 +#, c-format +msgid "Can not open chm file %s." +msgstr "" + +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "ইউনিক্স/লিনাক্সের HTML সাহায্য প্রদর্শক (CHM)" + +#~ msgid "Auto-Detect:" +#~ msgstr "সয়ন্ক্রিয়ভাবে সনাক্ত করা" + +#~ msgid "Error loading file '%s'" +#~ msgstr "ত্রুটিপূর্নভাবে চালু হওয়া ফাইল '%s'" + +#~ msgid "Bookmark" +#~ msgstr "বুকমার্ক" + +#~ msgid "About..." +#~ msgstr "সম্বন্ধে..." + +#~ msgid "Panel" +#~ msgstr "প্যানেল" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "সার্বজনীন\n" +#~ "সাধারণ চাইনিজ\n" +#~ "ঐতিহ্যগত চাইনিজ\n" +#~ "জাপানিজ\n" +#~ "কোরিয়ান\n" +#~ "রাশিয়ান\n" +#~ "ইউক্রেনিয়ান" diff -Nru chmsee-1.0.7/po/ca.po chmsee-1.3.0/po/ca.po --- chmsee-1.0.7/po/ca.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/ca.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-06-07 00:29+0000\n" "Last-Translator: el_libre XDDDDDDDDDDDDDDDDDDDDDDDDDDD \n" "Language-Team: Catalan \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 -msgid "Cache" +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" msgstr "" -#: ../data/chmsee.glade.h:2 -msgid "Charset" +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" msgstr "" +"Launchpad Contributions:\n" +" el_libre XDDDDDDDDDDDDDDDDDDDDDDDDDDD https://launchpad.net/~el-libre" -#: ../data/chmsee.glade.h:3 -msgid "Font" -msgstr "Font" +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Sobre" +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Sobre..." +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Obre Arxiu" -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" +#: ../data/setup-window.ui.h:1 +msgid "Cache" msgstr "" -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Torna" +#: ../data/setup-window.ui.h:2 +msgid "Font" +msgstr "Font" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Font" + +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Font" + +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -53,220 +66,615 @@ "NOTE: If you are viewing a CHM file, you need reopen it after cleaning." msgstr "" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" +#: ../data/setup-window.ui.h:8 +msgid "Charset:" msgstr "" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Endavant" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Inici" +#: ../data/setup-window.ui.h:11 +msgid "Setup" +msgstr "Configuració" -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "" -#: ../data/chmsee.glade.h:17 -msgid "Open File" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Arxiu" + +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Edita" + +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Veu" + +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Ajut" + +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" + +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" msgstr "Obre Arxiu" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Obre Arxiu" + +#: ../src/chmsee.c:195 +msgid "New _Tab" msgstr "" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panell" +#: ../src/chmsee.c:196 +msgid "_Close Tab" +msgstr "" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" +#: ../src/chmsee.c:197 +msgid "E_xit" msgstr "" -#: ../data/chmsee.glade.h:21 -msgid "Setup" -msgstr "Configuració" +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" +#: ../src/chmsee.c:199 ../src/components/book.c:121 +msgid "_Copy" +msgstr "_Copia" + +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#: ../src/chmsee.c:202 +msgid "_Find" msgstr "" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" +#: ../src/chmsee.c:204 +msgid "_Preferences" msgstr "" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/chmsee.c:204 +msgid "Preferences" msgstr "" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Inici" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +#, fuzzy +msgid "_Back" +msgstr "Torna" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 +msgid "_Forward" +msgstr "_Endavant" + +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" + +#: ../src/chmsee.c:210 +msgid "_Next" msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Sobre" + +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" msgstr "Amplia" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" msgstr "Redueix" -#: ../data/chmsee.glade.h:35 -msgid "_Back" +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -#: ../data/chmsee.glade.h:36 -msgid "_Close Tab" +#: ../src/chmsee.c:225 +msgid "Side _Pane" msgstr "" -#: ../data/chmsee.glade.h:37 -msgid "_Copy" -msgstr "_Copia" +#: ../src/chmsee.c:486 +msgid "CHM Files" +msgstr "" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" +#: ../src/chmsee.c:491 +msgid "All Files" msgstr "" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Edita" +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Arxiu" +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" -#: ../data/chmsee.glade.h:41 -msgid "_Forward" -msgstr "_Endavant" +#: ../src/chmsee.c:802 +msgid "Ready!" +msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/chmsee.c:985 +#, c-format +msgid "Error: Can not open spectified file '%s'" msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Ajut" +#: ../src/main.c:220 +msgid "Display ChmSee version" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Veu" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Sobre" + +#: ../src/setup.c:132 +msgid "West European" msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/setup.c:133 +msgid "East European" msgstr "" -"Launchpad Contributions:\n" -" el_libre XDDDDDDDDDDDDDDDDDDDDDDDDDDD https://launchpad.net/~el-libre" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" +#: ../src/setup.c:134 +msgid "East Asian" msgstr "" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:135 +msgid "SE & SW Asian" msgstr "" -#: ../src/chmsee.c:610 -msgid "CHM Files" +#: ../src/setup.c:136 +msgid "Middle Eastern" msgstr "" -#: ../src/chmsee.c:615 -msgid "All Files" +#: ../src/setup.c:137 +msgid "Unicode" msgstr "" -#: ../src/chmsee.c:1135 -msgid "Ready!" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" msgstr "" -#: ../src/chmsee.c:1191 +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Temes" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Favorits" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" +msgid "Can not find link target file at \"%s\"" msgstr "" -#: ../src/models/chmfile.c:239 +#: ../src/models/chmfile.c:293 #, c-format -msgid "cannot open chmfile: %s" +msgid "Cannot open chmfile: %s" msgstr "" -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "" -#: ../src/models/chmfile.c:272 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copia" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Favorit" +#~ msgid "Bookmark" +#~ msgstr "Favorit" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "" +#~ msgid "About..." +#~ msgstr "Sobre..." -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" +#~ msgid "Forward" +#~ msgstr "Endavant" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" - -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "" +#~ msgid "Panel" +#~ msgstr "Panell" diff -Nru chmsee-1.0.7/po/chmsee.pot chmsee-1.3.0/po/chmsee.pot --- chmsee-1.0.7/po/chmsee.pot 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/chmsee.pot 2011-01-16 13:48:42.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-09-06 18:35+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,23 +16,44 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../data/chmsee.glade.h:1 -msgid "Cache" +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" msgstr "" -#: ../data/chmsee.glade.h:2 -msgid "Charset" +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "" + +#: ../data/setup-window.ui.h:1 +msgid "Cache" msgstr "" -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "" -#: ../data/chmsee.glade.h:4 -msgid "Auto-Detect:" +#: ../data/setup-window.ui.h:3 +msgid "Language" msgstr "" -#: ../data/chmsee.glade.h:5 +#: ../data/setup-window.ui.h:4 +msgid "Startup" +msgstr "" + +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -40,146 +61,588 @@ "NOTE: If you are viewing a CHM file, you need reopen it after cleaning." msgstr "" -#: ../data/chmsee.glade.h:8 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" +#: ../data/setup-window.ui.h:8 +msgid "Charset:" msgstr "" -#: ../data/chmsee.glade.h:9 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "" -#: ../data/chmsee.glade.h:10 -msgid "Open File" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." msgstr "" -#: ../data/chmsee.glade.h:11 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "" -#: ../data/chmsee.glade.h:12 -msgid "The HTML Help(CHM) viewer for Unix/Linux" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" msgstr "" -#: ../data/chmsee.glade.h:13 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" +#: ../src/chmsee.c:187 +msgid "_File" msgstr "" -#: ../data/chmsee.glade.h:20 -msgid "Variable Width:" +#: ../src/chmsee.c:188 +msgid "_Edit" msgstr "" -#: ../data/chmsee.glade.h:21 -msgid "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:189 +msgid "_View" msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:23 -msgid "translator-credits" +#: ../src/chmsee.c:190 +msgid "_Help" msgstr "" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" +#: ../src/chmsee.c:192 +msgid "_Open" msgstr "" -#: ../src/chmsee.c:484 ../src/ui_chmfile.c:418 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:192 +msgid "Open a file" +msgstr "" + +#: ../src/chmsee.c:193 +msgid "_Recent Files" +msgstr "" + +#: ../src/chmsee.c:195 +msgid "New _Tab" +msgstr "" + +#: ../src/chmsee.c:196 +msgid "_Close Tab" +msgstr "" + +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +msgid "Exit ChmSee" +msgstr "" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 +msgid "_Copy" +msgstr "" + +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "" + +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 +msgid "_Forward" +msgstr "" + +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" + +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" + +#: ../src/chmsee.c:212 +msgid "_About" +msgstr "" + +#: ../src/chmsee.c:212 +msgid "About ChmSee" +msgstr "" + +#: ../src/chmsee.c:214 +msgid "Zoom _In" msgstr "" -#: ../src/chmsee.c:555 +#: ../src/chmsee.c:215 +msgid "_Normal Size" +msgstr "" + +#: ../src/chmsee.c:216 +msgid "Zoom _Out" +msgstr "" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "" + +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "" -#: ../src/chmsee.c:560 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "" -#: ../src/chmsee.c:839 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "" -#: ../src/chmsee.c:971 +#: ../src/chmsee.c:985 #, c-format -msgid "Error loading file '%s'" +msgid "Error: Can not open spectified file '%s'" msgstr "" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" +#: ../src/main.c:220 +msgid "Display ChmSee version" msgstr "" -#: ../src/ui_chmfile.c:664 -msgid "Topics" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" msgstr "" -#: ../src/ui_chmfile.c:673 -msgid "Index" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" msgstr "" -#: ../src/ui_chmfile.c:679 -msgid "Bookmarks" +#: ../src/setup.c:131 +msgid "Auto" msgstr "" -#. Custom label widget, with a close button -#: ../src/ui_chmfile.c:869 ../src/ui_chmfile.c:1002 -msgid "No Title" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" msgstr "" -#: ../src/main.cpp:108 -msgid "Specify index" +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" msgstr "" -#: ../src/main.cpp:109 -msgid "INDEX" +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" msgstr "" -#: ../src/main.cpp:113 -msgid "Display the version and exit" +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" msgstr "" -#: ../src/main.cpp:118 -msgid "be verbose, repeat 3 times to get all info" +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" msgstr "" -#: ../src/main.cpp:123 -msgid "be quiet, repeat 2 times to disable all info" +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" msgstr "" -#: ../src/main.cpp:129 -msgid "PATH" +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" msgstr "" -#: ../src/main.cpp:160 +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "" + +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "" + +#: ../src/components/book.c:1019 #, c-format -msgid "more than 1 argument\n" +msgid "Can not find link target file at \"%s\"" msgstr "" -#: ../src/models/chmfile.c:254 +#: ../src/models/chmfile.c:293 #, c-format -msgid "cannot open chmfile: %s" +msgid "Cannot open chmfile: %s" msgstr "" -#: ../src/models/chmfile.c:261 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "" -#: ../src/models/chmfile.c:287 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "" -#: ../src/models/chmfile.c:337 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "" - -#: ../src/models/chmfile.c:595 -msgid "Can't found hhc file." -msgstr "" diff -Nru chmsee-1.0.7/po/CMakeLists.txt chmsee-1.3.0/po/CMakeLists.txt --- chmsee-1.0.7/po/CMakeLists.txt 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/CMakeLists.txt 2011-01-16 13:48:42.000000000 +0000 @@ -1,29 +1,42 @@ set(CATALOGS bn ca cs da de el en_GB es fr he id it ms nb pl pt pt_BR ro ru sk sv sw uk vi zh_CN zh_TW) set(UPDATE_PO_TARGETS ) set(COMPILE_PO_TARGETS ) -add_custom_target(update-pot - COMMAND intltool-update -p -g chmsee - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + +file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/chmsee.pot) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/chmsee.pot + COMMAND intltool-update -p -g chmsee + DEPENDS POTFILES.in + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + foreach(catalog ${CATALOGS}) - add_custom_target(update-${catalog}.po - COMMAND intltool-update -d ${catalog} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} - update-${catalog}.po) - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES") - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo - COMMAND msgfmt -c -o - ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo - ${CMAKE_CURRENT_SOURCE_DIR}/${catalog}.po - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${catalog}.po) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo - DESTINATION share/locale/${catalog}/LC_MESSAGES) - set(COMPILE_PO_TARGETS ${COMPILE_PO_TARGETS} - ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo) -endforeach(catalog) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/update-${catalog}.po + COMMAND intltool-update -d ${catalog} -g chmsee + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/chmsee.pot + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + + set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${catalog}.po) + + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES") + + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo + COMMAND msgfmt -c -o + ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo + ${CMAKE_CURRENT_SOURCE_DIR}/${catalog}.po + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${catalog}.po) + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo + DESTINATION share/locale/${catalog}/LC_MESSAGES) + + set(COMPILE_PO_TARGETS ${COMPILE_PO_TARGETS} ${CMAKE_CURRENT_BINARY_DIR}/${catalog}/LC_MESSAGES/chmsee.mo) +endforeach() + add_custom_target(update-po - DEPENDS update-pot ${UPDATE_PO_TARGETS}) + DEPENDS ${UPDATE_PO_TARGETS}) + add_custom_target(compile-po - ALL - DEPENDS ${COMPILE_PO_TARGETS}) + ALL + DEPENDS ${COMPILE_PO_TARGETS}) diff -Nru chmsee-1.0.7/po/cs.po chmsee-1.3.0/po/cs.po --- chmsee-1.0.7/po/cs.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/cs.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-06-09 10:21+0000\n" "Last-Translator: Vojtěch Trefný \n" "Language-Team: Czech \n" @@ -17,268 +17,718 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Vojtěch Trefný https://launchpad.net/~vojtech.trefny" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Prohlížeč HTML Help(CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Otevřít soubor" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Vyrovnávací paměť" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Znaková sada" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Písmo" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "O aplikaci" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Vyrovnávací paměť" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "O aplikaci..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Autodetekce" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Zpět" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Znaková sada" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" +#: ../data/setup-window.ui.h:5 +msgid "" +"CHM files extracted in this cache folder, you can press Clear button to free " +"disk space.\n" +"\n" +"NOTE: If you are viewing a CHM file, you need reopen it after cleaning." +msgstr "" +"Soubory CHM jsou do tohoto adresáře rozbalovány, kliknutím na tlačítko " +"Vymazat uvolníte místo na disku.\n" +"\n" +"POZNÁMKA: Pokud právě prohlížíte nějaký soubor, musíte jej po vyčištění " +"znovu otevřít." + +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Znaková sada" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Pevná šířka:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Vpřed" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Domů" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normální" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Otevřít soubor" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Otevřít odkaz v nové _kartě" +#: ../data/setup-window.ui.h:11 +msgid "Setup" +msgstr "Nastavení" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Proměnná šířka" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Vybrat _vše" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Soubor" -#: ../data/chmsee.glade.h:21 -msgid "Setup" -msgstr "Nastavení" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Upravit" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Zobrazit/Skrýt panel" - -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "HTML Help(CHM) prohlížeč pro Unix/Linux" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Zobrazit" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Univerzální\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Nápověda" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Proměnná šířka" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Přiblížit" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Otevřít soubor" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Oddálit" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Otevřít soubor" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Zpět" +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nová karta" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Zavřít kartu" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Kopírovat" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Kopírovat adresu odkazu" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Vybrat _vše" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Upravit" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Soubor" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Domů" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Zpět" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Vpřed" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Nápověda" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nová karta" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Zobrazit" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "O aplikaci" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Prohlížeč HTML Help(CHM)" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Přiblížit" + +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normální" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Oddálit" + +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Celá obrazovka" + +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "_Postranní panel" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Soubory CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Všechny soubory" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Připraven!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "Témata" +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Nemohu otevřít soubor %s" -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "Záložky" +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Zobrazit verzi ukončit" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "bez názvu" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "Chyba při načítání souboru '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "nemohu otevřít soubor: %s" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "O aplikaci" -#: ../src/models/chmfile.c:246 -#, c-format -msgid "Extract chmfile failed: %s" -msgstr "Rozbalení souboru selhalo: %s" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" -msgstr "otevírání \"%s\" selhalo: %s" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" -#: ../src/models/chmfile.c:322 -#, c-format -msgid "Can not open chm file %s." -msgstr "Nemohu otevřít soubor %s" +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Nemohu najít hhc soubor." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Záložka" +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Zobrazit verzi ukončit" +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "víc jak jeden argument\n" +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" -#: ../data/chmsee.glade.h:8 -msgid "" -"CHM files extracted in this cache folder, you can press Clear button to free " -"disk space.\n" -"\n" -"NOTE: If you are viewing a CHM file, you need reopen it after cleaning." +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" msgstr "" -"Soubory CHM jsou do tohoto adresáře rozbalovány, kliknutím na tlačítko " -"Vymazat uvolníte místo na disku.\n" -"\n" -"POZNÁMKA: Pokud právě prohlížíte nějaký soubor, musíte jej po vyčištění " -"znovu otevřít." -#: ../data/chmsee.glade.h:12 +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Otevřít odkaz v nové _kartě" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Kopírovat adresu odkazu" + +#: ../src/components/book.c:127 msgid "Copy Page _Location" msgstr "Kopírovat _umístění stránky" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "_Postranní panel" +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Celá obrazovka" +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/components/book.c:271 +msgid "Next" msgstr "" -"Launchpad Contributions:\n" -" Vojtěch Trefný https://launchpad.net/~vojtech.trefny" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Přesměrování: \"%s\" -> \"%s\"" +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "bez názvu" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "Témata" + +#: ../src/components/book.c:916 +msgid "Index" msgstr "" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "Záložky" + +#: ../src/components/book.c:1019 +#, c-format +msgid "Can not find link target file at \"%s\"" msgstr "" + +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Nemohu otevřít soubor %s" + +#: ../src/models/chmfile.c:303 +#, c-format +msgid "Extract chmfile failed: %s" +msgstr "Rozbalení souboru selhalo: %s" + +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" +msgstr "otevírání \"%s\" selhalo: %s" + +#: ../src/models/chmfile.c:519 +#, c-format +msgid "Can not open chm file %s." +msgstr "Nemohu otevřít soubor %s" + +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "HTML Help(CHM) prohlížeč pro Unix/Linux" + +#~ msgid "more than 1 argument\n" +#~ msgstr "víc jak jeden argument\n" + +#~ msgid "Auto-Detect:" +#~ msgstr "Autodetekce" + +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopírovat" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Přesměrování: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "nemohu otevřít soubor: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Chyba při načítání souboru '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Záložka" + +#~ msgid "Can't found hhc file." +#~ msgstr "Nemohu najít hhc soubor." + +#~ msgid "About..." +#~ msgstr "O aplikaci..." + +#~ msgid "Back" +#~ msgstr "Zpět" + +#~ msgid "Forward" +#~ msgstr "Vpřed" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Zobrazit/Skrýt panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Univerzální\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" diff -Nru chmsee-1.0.7/po/da.po chmsee-1.3.0/po/da.po --- chmsee-1.0.7/po/da.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/da.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-05-23 19:44+0000\n" "Last-Translator: Jimmy Frydkær Jensen \n" "Language-Team: Danish \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Jimmy Frydkær Jensen https://launchpad.net/~jimmy-frydkaer" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSe" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML Help(CHM) viewer" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Åbn fil" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Tegnsæt" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Skrifttype" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Om" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Om..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-opdag:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Tilbage" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Tegnsæt" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -56,227 +69,666 @@ "at frigive diskplads.\n" "NOTE: Hvis du kigger en CHM-fil skal du genåbne den efter oprydning." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSe" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Kopier Side _Lokation" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Tegnsæt" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Fast bredde:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Fremad" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Start" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Åbn fil" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Gå til adressen i nyt _faneblad" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Vælg _alle" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Opsætning" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Vis/Skjul panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Variabel bredde:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "Side_panel" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Fil" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "HTML-hjælpen(CHM) kigger til Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Rediger" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universal\n" -"Simplificeret Kinesisk\n" -"Traditionel Kinesisk\n" -"Japansk\n" -"Koreansk\n" -"Russisk\n" -"Ukrainsk" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Vis" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Variabel bredde:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Hjælp" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Zoom ind" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Zoom ud" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Åbn fil" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "Til_bage" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Åbn fil" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nyt faneblad" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Luk faneblad" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSe" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Kopiér" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Kopiér adresse" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Vælg _alle" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Rediger" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Fil" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Start" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "Til_bage" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Næste" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Fuldskærm" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Hjælp" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nyt faneblad" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Om" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Vis" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSe" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Zoom ind" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Jimmy Frydkær Jensen https://launchpad.net/~jimmy-frydkaer" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML Help(CHM) viewer" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Zoom ud" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI omdiriger: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Fuldskærm" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "Side_panel" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM Filer" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Alle filer" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Klar!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Kan ikke åbne chm-fil %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Vis versionsnummeret og afslut" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "Vær verbose, gentag 3 gange for at få alle info" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "vær stille, gentag 2 gange for at deaktivere alle info" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Om" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Gå til adressen i nyt _faneblad" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Kopiér adresse" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Kopier Side _Lokation" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Ingen titel" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Emner" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Bogmærker" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Ingen titel" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Fejl ved indlæsning af fil '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "kan ikke åbne chmfil: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Kan ikke åbne chm-fil %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Udpakning af chmfil fejlede: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "åbn \"%s\" fejlede: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Kan ikke åbne chm-fil %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Kan ikke finde hhc-fil." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Bogmærke" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "HTML-hjælpen(CHM) kigger til Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Vis versionsnummeret og afslut" +#~ msgid "more than 1 argument\n" +#~ msgstr "flere end 1 argument\n" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "Vær verbose, gentag 3 gange for at få alle info" +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-opdag:" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "vær stille, gentag 2 gange for at deaktivere alle info" - -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "flere end 1 argument\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopiér" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "URI omdiriger: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "kan ikke åbne chmfil: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Fejl ved indlæsning af fil '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Bogmærke" + +#~ msgid "Can't found hhc file." +#~ msgstr "Kan ikke finde hhc-fil." + +#~ msgid "About..." +#~ msgstr "Om..." + +#~ msgid "Back" +#~ msgstr "Tilbage" + +#~ msgid "Forward" +#~ msgstr "Fremad" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Vis/Skjul panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universal\n" +#~ "Simplificeret Kinesisk\n" +#~ "Traditionel Kinesisk\n" +#~ "Japansk\n" +#~ "Koreansk\n" +#~ "Russisk\n" +#~ "Ukrainsk" diff -Nru chmsee-1.0.7/po/de.po chmsee-1.3.0/po/de.po --- chmsee-1.0.7/po/de.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/de.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-14 21:48+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-07-28 15:41+0000\n" "Last-Translator: Moritz Baumann \n" "Language-Team: English (United Kingdom) \n" @@ -17,35 +17,51 @@ "X-Launchpad-Export-Date: 2009-09-06 10:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Überstzungen von\n" +"\n" +"Launchpad Contributions:\n" +" Bart https://launchpad.net/~bart-neeneenee\n" +" Moritz Baumann https://launchpad.net/~mo-germany" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML-Hilfe(CHM)-Betrachter" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Datei öffnen" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Zeichensatz" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Schriftart" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Über" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Über..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Automatisch:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Zurück" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Zeichensatz" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -57,232 +73,656 @@ " Hinweis: Wenn Sie gerade eine CHM-Datei betrachten müssen Sie diese danach " "noch einmal öffnen." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Adresse der Seite kopieren" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Zeichensatz" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Dicktengleich:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Weiter" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Startseite" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normale Größe" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Datei öffnen" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Link in einem neuen Rei_ter öffnen" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Seitenleiste" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Alles auswählen" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Einstellungen" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Seitenleiste anzeigen/verbergen" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Variabel:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "Seitenleiste" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Datei" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Der HTML-Hilfe(CHM) Betrachter für Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Bearbeiten" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" -msgstr "" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Ansicht" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Variabel:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Hilfe" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Vergrößern" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Verkleinern" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Datei öffnen" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Zurück" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Datei öffnen" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Neuer Reiter" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Reiter schließen" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Kopieren" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Link-Adresse kopieren" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Alles auswählen" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Bearbeiten" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Datei" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Home" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Zurück" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "Weiter" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "Vollbild" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Hilfe" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Neuer Reiter" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Über" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Ansicht" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Vergrößern" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Überstzungen von\n" -"\n" -"Launchpad Contributions:\n" -" Bart https://launchpad.net/~bart-neeneenee\n" -" Moritz Baumann https://launchpad.net/~mo-germany" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normale Größe" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML-Hilfe(CHM)-Betrachter" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Verkleinern" -#: ../src/chmsee.c:506 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI-Weiterleitung: »%s« -> »%s«" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "Vollbild" + +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "Seitenleiste" -#: ../src/chmsee.c:671 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM-Dateien" -#: ../src/chmsee.c:676 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Alle Dateien" -#: ../src/chmsee.c:1196 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Fertig!" -#: ../src/chmsee.c:1253 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Die CHM-Datei %s kann nicht geöffnet werden." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Die Version anzeigen und beenden" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" +"ausführliche Anzeige, 3 mal wiederholen um alle Informationen zu erhalten" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" +"dezente Anzeige, 2 mal wiederholen um alle Informationen zu unterdrücken" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Über" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Link in einem neuen Rei_ter öffnen" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Link-Adresse kopieren" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Adresse der Seite kopieren" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Unbenannt" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Inhalt" -#: ../src/chmsee.c:1267 +#: ../src/components/book.c:916 msgid "Index" msgstr "" -#: ../src/chmsee.c:1276 +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Lesezeichen" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1440 ../src/chmsee.c:1615 -msgid "No Title" -msgstr "Unbenannt" - -#: ../src/chmsee.c:1719 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Fehler beim Laden der Datei '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:253 -#, c-format -msgid "cannot open chmfile: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" msgstr "Die CHM-Datei %s kann nicht geöffnet werden." -#: ../src/models/chmfile.c:260 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Extrahieren der CHM-Datei %s ist gescheitert." -#: ../src/models/chmfile.c:286 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "\"%s\" zu öffnen ist gescheitert: %s" -#: ../src/models/chmfile.c:336 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Die CHM-Datei %s kann nicht geöffnet werden." -#: ../src/models/chmfile.c:594 -msgid "Can't found hhc file." -msgstr "Die hhc-Datei wurde nicht gefunden." +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Der HTML-Hilfe(CHM) Betrachter für Unix/Linux" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Lesezeichen" +#~ msgid "more than 1 argument\n" +#~ msgstr "Mehr als 1 Argument erhalten\n" -#: ../src/main.cpp:107 -msgid "Display the version and exit" -msgstr "Die Version anzeigen und beenden" +#~ msgid "Auto-Detect:" +#~ msgstr "Automatisch:" -#: ../src/main.cpp:112 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" -"ausführliche Anzeige, 3 mal wiederholen um alle Informationen zu erhalten" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopieren" -#: ../src/main.cpp:117 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" -"dezente Anzeige, 2 mal wiederholen um alle Informationen zu unterdrücken" +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "URI-Weiterleitung: »%s« -> »%s«" -#: ../src/main.cpp:154 -#, c-format -msgid "more than 1 argument\n" -msgstr "Mehr als 1 Argument erhalten\n" +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Die CHM-Datei %s kann nicht geöffnet werden." + +#~ msgid "Error loading file '%s'" +#~ msgstr "Fehler beim Laden der Datei '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Lesezeichen" + +#~ msgid "Can't found hhc file." +#~ msgstr "Die hhc-Datei wurde nicht gefunden." + +#~ msgid "About..." +#~ msgstr "Über..." + +#~ msgid "Back" +#~ msgstr "Zurück" + +#~ msgid "Forward" +#~ msgstr "Weiter" + +#~ msgid "Home" +#~ msgstr "Startseite" + +#~ msgid "Panel" +#~ msgstr "Seitenleiste" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Seitenleiste anzeigen/verbergen" #~ msgid "" #~ "Universal\n" @@ -301,8 +741,5 @@ #~ "Russisch\n" #~ "Ukrainainisch" -#~ msgid "_Home" -#~ msgstr "_Home" - #~ msgid "_Setup" #~ msgstr "_Setup" diff -Nru chmsee-1.0.7/po/el.po chmsee-1.3.0/po/el.po --- chmsee-1.0.7/po/el.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/el.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-05-16 00:23+0000\n" "Last-Translator: Μάριος Ζηντίλης \n" "Language-Team: Greek \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Μάριος Ζηντίλης https://launchpad.net/~m-zindilis" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Προβολέας βοήθειας HTML (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Άνοιγμα αρχείου" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Προσωρινή μνήμη" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Κωδικοσελίδα" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Γραμματοσειρά" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Περί" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Προσωρινή μνήμη" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Περί..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Αυτόματος εντοπισμός:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Πίσω" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Κωδικοσελίδα" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -58,228 +71,667 @@ "ΣΗΜΕΙΩΣΗ: Αν βλέπετε ένα αρχείο CHM, θα πρέπει να το ξανανοίξετε μετά το " "καθάρισμα." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Αντιγραφή _τοποθεσίας σελίδας" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Κωδικοσελίδα" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Σταθερού πλάτους:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Μπροστά" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Αρχή" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Κανονικό" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Άνοιγμα αρχείου" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Άνοιγμα συνδέσμου σε νέα _καρτέλα" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Πλευρική στήλη" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Επιλ_ογή όλων" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Ρυθμίσεις" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Εμφάνιση/απόκρυψη πλευρικής στήλης" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Μεταβλητού πλάτους" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "Πλευρική _στήλη" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Αρχείο" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Ο προβολέας βοήθειας HTML (CHM) για το Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Επεξεργασία" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Καθολική\n" -"Απλά Κινέζικα\n" -"Παραδοσιακά Κινέζικα\n" -"Ιαπωνικά\n" -"Κορεατικά\n" -"Ρωσικά\n" -"Ουκρανικά" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Προβολή" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Μεταβλητού πλάτους" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Βοήθεια" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Μεγέθυνση" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Σμίκρυνση" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Άνοιγμα αρχείου" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Πίσω" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Άνοιγμα αρχείου" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Νέα καρτέλα" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Κλείσιμο καρτέλας" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Αντιγραφή" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Αντιγραφή τοποθεσίας δεσμού" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Επιλ_ογή όλων" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Επεξεργασία" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Αρχείο" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Αρχή" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Πίσω" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Μπροστά" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "Πλήρης _οθόνη" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Βοήθεια" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Νέα καρτέλα" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Περί" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Προβολή" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Μεγέθυνση" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Μάριος Ζηντίλης https://launchpad.net/~m-zindilis" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Κανονικό" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Προβολέας βοήθειας HTML (CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Σμίκρυνση" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Αναδρομολόγηση URI: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "Πλήρης _οθόνη" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "Πλευρική _στήλη" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Αρχεία CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Όλα τα αρχεία" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Έτοιμο!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Αδύνατο το άνοιγμα του chm αρχείου %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Εμφάνιση της έκδοσης και έξοδος" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "να είναι αναλυτικό, επανάληψη 3 φορές για λήψη όλων των πληροφοριών" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" +"να είναι σιωπηλό, επανάληψη 2 φορές για απενεργοποίηση όλων των πληροφοριών" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Περί" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Άνοιγμα συνδέσμου σε νέα _καρτέλα" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Αντιγραφή τοποθεσίας δεσμού" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Αντιγραφή _τοποθεσίας σελίδας" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Χωρίς τίτλο" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Θέματα" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Σελιδοδείκτες" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Χωρίς τίτλο" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Σφάλμα κατα τη φόρτωση του αρχείου: '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "αδύνατο το άνοιγμα του αρχείου chm: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Αδύνατο το άνοιγμα του chm αρχείου %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Αποτυχία αποσυμπίεσης αρχείου chm: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "το άνοιγμα του \"%s\" απέτυχε: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Αδύνατο το άνοιγμα του chm αρχείου %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Δε βρέθηκε το αρχείο hhc." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Σελιδοδείκτης" - -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Εμφάνιση της έκδοσης και έξοδος" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Ο προβολέας βοήθειας HTML (CHM) για το Unix/Linux" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "να είναι αναλυτικό, επανάληψη 3 φορές για λήψη όλων των πληροφοριών" +#~ msgid "more than 1 argument\n" +#~ msgstr "περισσότερα από 1 ορίσματα\n" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" -"να είναι σιωπηλό, επανάληψη 2 φορές για απενεργοποίηση όλων των πληροφοριών" +#~ msgid "Auto-Detect:" +#~ msgstr "Αυτόματος εντοπισμός:" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "περισσότερα από 1 ορίσματα\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Αντιγραφή" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Αναδρομολόγηση URI: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "αδύνατο το άνοιγμα του αρχείου chm: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Σφάλμα κατα τη φόρτωση του αρχείου: '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Σελιδοδείκτης" + +#~ msgid "Can't found hhc file." +#~ msgstr "Δε βρέθηκε το αρχείο hhc." + +#~ msgid "About..." +#~ msgstr "Περί..." + +#~ msgid "Back" +#~ msgstr "Πίσω" + +#~ msgid "Forward" +#~ msgstr "Μπροστά" + +#~ msgid "Panel" +#~ msgstr "Πλευρική στήλη" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Εμφάνιση/απόκρυψη πλευρικής στήλης" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Καθολική\n" +#~ "Απλά Κινέζικα\n" +#~ "Παραδοσιακά Κινέζικα\n" +#~ "Ιαπωνικά\n" +#~ "Κορεατικά\n" +#~ "Ρωσικά\n" +#~ "Ουκρανικά" diff -Nru chmsee-1.0.7/po/en_GB.po chmsee-1.3.0/po/en_GB.po --- chmsee-1.0.7/po/en_GB.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/en_GB.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-03-06 14:09+0000\n" "Last-Translator: Jen Ockwell \n" "Language-Team: English (United Kingdom) \n" @@ -17,35 +17,51 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Jen Ockwell https://launchpad.net/~rj-ockwell\n" +"\n" +"Launchpad Contributions:\n" +" Jen Ockwell https://launchpad.net/~rj-ockwell" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML Help(CHM) viewer" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Open File" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Charset" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Font" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "About" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "About..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-Detect:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Back" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Charset" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -57,236 +73,652 @@ "\n" "NOTE: If you are viewing a CHM file, you need reopen it after cleaning." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Copy Page _Location" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Charset" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Fixed Width:" -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Home" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" +#: ../data/setup-window.ui.h:11 +msgid "Setup" +msgstr "Setup" -#: ../data/chmsee.glade.h:17 -msgid "Open File" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Variable Width:" + +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_File" + +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Edit" + +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_View" + +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Help" + +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" + +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" msgstr "Open File" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Open Link in New _Tab" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Open File" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_New Tab" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Select _All" +#: ../src/chmsee.c:196 +msgid "_Close Tab" +msgstr "_Close Tab" -#: ../data/chmsee.glade.h:21 -msgid "Setup" -msgstr "Setup" +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Show/Hide Panel" +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "The HTML Help(CHM) viewer for Unix/Linux" +#: ../src/chmsee.c:199 ../src/components/book.c:121 +msgid "_Copy" +msgstr "_Copy" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Select _All" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Variable Width:" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Zoom In" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Zoom Out" +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:35 +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Home" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 msgid "_Back" msgstr "_Back" -#: ../data/chmsee.glade.h:36 -msgid "_Close Tab" -msgstr "_Close Tab" - -#: ../data/chmsee.glade.h:37 -msgid "_Copy" -msgstr "_Copy" +#: ../src/chmsee.c:208 ../src/components/book.c:123 +msgid "_Forward" +msgstr "" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Copy Link Location" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Edit" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_File" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "About" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Help" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_New Tab" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Zoom In" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_View" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Zoom Out" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -"Launchpad Contributions:\n" -" Jen Ockwell https://launchpad.net/~rj-ockwell\n" -"\n" -"Launchpad Contributions:\n" -" Jen Ockwell https://launchpad.net/~rj-ockwell" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML Help(CHM) viewer" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Show/Hide Panel" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM Files" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "All Files" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Ready!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "Topics" +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "cannot open chmfile: %s" -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "Bookmarks" +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Display the version and exit" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "No Title" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "Error loading file '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "cannot open chmfile: %s" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "About" -#: ../src/models/chmfile.c:246 -#, c-format -msgid "Extract chmfile failed: %s" -msgstr "Extract chmfile failed: %s" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" -msgstr "open \"%s\" failed: %s" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Bookmark" +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Display the version and exit" +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "more than 1 argument\n" +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" -#~ msgid "_Home" -#~ msgstr "_Home" +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" -#~ msgid "_Setup" -#~ msgstr "_Setup" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" -#: ../data/chmsee.glade.h:14 -msgid "Forward" +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#: ../src/setup.c:143 +msgid "Western (IBM-850)" msgstr "" -#: ../data/chmsee.glade.h:41 -msgid "_Forward" +#: ../src/setup.c:144 +msgid "Western (MacRoman)" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" msgstr "" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" msgstr "" -#: ../src/models/chmfile.c:322 -#, c-format -msgid "Can not open chm file %s." +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" msgstr "" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" msgstr "" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Open Link in New _Tab" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Copy Link Location" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Copy Page _Location" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "No Title" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "Topics" + +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "Bookmarks" + +#: ../src/components/book.c:1019 +#, c-format +msgid "Can not find link target file at \"%s\"" +msgstr "" + +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "cannot open chmfile: %s" + +#: ../src/models/chmfile.c:303 +#, c-format +msgid "Extract chmfile failed: %s" +msgstr "Extract chmfile failed: %s" + +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" +msgstr "open \"%s\" failed: %s" + +#: ../src/models/chmfile.c:519 +#, c-format +msgid "Can not open chm file %s." +msgstr "" + +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "The HTML Help(CHM) viewer for Unix/Linux" + +#~ msgid "more than 1 argument\n" +#~ msgstr "more than 1 argument\n" + +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-Detect:" + +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copy" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Error loading file '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Bookmark" + +#~ msgid "About..." +#~ msgstr "About..." + +#~ msgid "Back" +#~ msgstr "Back" + +#~ msgid "Home" +#~ msgstr "Home" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" + +#~ msgid "_Setup" +#~ msgstr "_Setup" diff -Nru chmsee-1.0.7/po/es.po chmsee-1.3.0/po/es.po --- chmsee-1.0.7/po/es.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/es.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-14 21:48+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-08-14 00:51+0000\n" "Last-Translator: Mauro de Carvalho \n" "Language-Team: Spanish \n" @@ -17,35 +17,52 @@ "X-Launchpad-Export-Date: 2009-09-06 10:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" DiegoJ https://launchpad.net/~diegojromerolopez\n" +"\n" +"Launchpad Contributions:\n" +" DiegoJ https://launchpad.net/~diegojromerolopez\n" +" Mauro de Carvalho https://launchpad.net/~mauro-dec" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Visor de Ayuda HTML (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Abrir archivo" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Caché" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Juego de caracteres" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Tipografía" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Acerca de" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Caché" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Acerca de..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-detectar:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Atrás" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Juego de caracteres" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -55,239 +72,671 @@ "Los archivos CHM se extraen en la carpeta de caché, puedes pulsar el botón " "de Limpiar para liberar ese espacio de disco." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Copiar _localización de página" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Juego de caracteres" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Ancho fijo:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Adelante" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Inicio" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Abrir archivo" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Abrir enlace en nueva _pestaña" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Seleccionar _todos" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Configurar" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Mostrar/Ocultar panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Ancho variable:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "_Panel lateral" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Archivo" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "El visor de Ayuda HTML (CHM) para Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Editar" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" -msgstr "" -"Universal\n" -"Chino Simplificado\n" -"Chino Tradicional\n" -"Japonés\n" -"Coreano\n" -"Ruso\n" -"Ucraniano" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Ver" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Ancho variable:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Ayuda" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Aumentar" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Alejar" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Abrir archivo" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Atrás" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Abrir archivo" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nueva pestaña" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Cerrar pestaña" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Copiar" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Copiar destino de enlace" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Seleccionar _todos" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Editar" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Archivo" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Inicio" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Atrás" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Adelante" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Pantalla completa" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Ayuda" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nueva pestaña" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Acerca de" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Ver" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Aumentar" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" DiegoJ https://launchpad.net/~diegojromerolopez\n" -"\n" -"Launchpad Contributions:\n" -" DiegoJ https://launchpad.net/~diegojromerolopez\n" -" Mauro de Carvalho https://launchpad.net/~mauro-dec" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Visor de Ayuda HTML (CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Alejar" -#: ../src/chmsee.c:506 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Redirección de URI: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Pantalla completa" -#: ../src/chmsee.c:671 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "_Panel lateral" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Archivos CHM" -#: ../src/chmsee.c:676 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Todos los archivos" -#: ../src/chmsee.c:1196 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "¡Listo!" -#: ../src/chmsee.c:1253 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "No se puede abrir el archivo chm %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Mostrar la versión y salir" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "ser más explícito, repítalo 3 veces para obtener toda la información" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "ser silencioso, repítalo 2 veces para deshabilitar toda la información" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Acerca de" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Abrir enlace en nueva _pestaña" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Copiar destino de enlace" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Copiar _localización de página" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Sin título" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Temas" -#: ../src/chmsee.c:1267 +#: ../src/components/book.c:916 msgid "Index" msgstr "Índice" -#: ../src/chmsee.c:1276 +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Marcadores" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1440 ../src/chmsee.c:1615 -msgid "No Title" -msgstr "Sin título" - -#: ../src/chmsee.c:1719 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Error cargando el archivo '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:253 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "no se puede abrir el archivo CHM: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "No se puede abrir el archivo chm %s." -#: ../src/models/chmfile.c:260 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Ha fallado la extracción del archivo CHM: %s" -#: ../src/models/chmfile.c:286 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "la apertura de \"%s\" ha fallado: %s" -#: ../src/models/chmfile.c:336 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "No se puede abrir el archivo chm %s." -#: ../src/models/chmfile.c:594 -msgid "Can't found hhc file." -msgstr "No se encontró el archivo hhc" - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Marcador" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "El visor de Ayuda HTML (CHM) para Unix/Linux" -#: ../src/main.cpp:107 -msgid "Display the version and exit" -msgstr "Mostrar la versión y salir" +#~ msgid "more than 1 argument\n" +#~ msgstr "más de un argumento\n" -#: ../src/main.cpp:112 -msgid "be verbose, repeat 3 times to get all info" -msgstr "ser más explícito, repítalo 3 veces para obtener toda la información" +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-detectar:" -#: ../src/main.cpp:117 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" -"ser silencioso, repítalo 2 veces para deshabilitar toda la información" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copiar" -#: ../src/main.cpp:154 -#, c-format -msgid "more than 1 argument\n" -msgstr "más de un argumento\n" +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Redirección de URI: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "no se puede abrir el archivo CHM: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Error cargando el archivo '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Marcador" + +#~ msgid "Can't found hhc file." +#~ msgstr "No se encontró el archivo hhc" + +#~ msgid "About..." +#~ msgstr "Acerca de..." + +#~ msgid "Back" +#~ msgstr "Atrás" + +#~ msgid "Forward" +#~ msgstr "Adelante" + +#~ msgid "Home" +#~ msgstr "Inicio" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Mostrar/Ocultar panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Traditional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainian" +#~ msgstr "" +#~ "Universal\n" +#~ "Chino Simplificado\n" +#~ "Chino Tradicional\n" +#~ "Japonés\n" +#~ "Coreano\n" +#~ "Ruso\n" +#~ "Ucraniano" #~ msgid "" #~ "Universal\n" @@ -308,6 +757,3 @@ #~ msgid "_Setup" #~ msgstr "_Configurar" - -#~ msgid "_Home" -#~ msgstr "_Inicio" diff -Nru chmsee-1.0.7/po/fr.po chmsee-1.3.0/po/fr.po --- chmsee-1.0.7/po/fr.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/fr.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-04-13 22:36+0000\n" "Last-Translator: Pierre Slamich \n" "Language-Team: French \n" @@ -17,35 +17,52 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" appzer0 https://launchpad.net/~appzer0\n" +"\n" +"Launchpad Contributions:\n" +" Pierre Slamich https://launchpad.net/~pierre-slamich\n" +" appzer0 https://launchpad.net/~appzer0" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Visualiseur d'aide HTML (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Ouvrir un fichier" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Encodage" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Police" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "À propos" - -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "À propos..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Détection auto. :" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Retour" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Encodage" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -58,237 +75,659 @@ "Note : si vous êtes en train de visualiser un fichier CHM, il vous faudra " "l'ouvrir à nouveau." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Copier l'UR_L de la page" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Encodage" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Chasse fixe :" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Suivant" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Accueil" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Ouvrir un fichier" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Ouvrir le lien dans un nouvel ongle_t" +#: ../data/setup-window.ui.h:11 +msgid "Setup" +msgstr "Paramètres" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panneau" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Tout sélectionner" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Fichier" -#: ../data/chmsee.glade.h:21 -msgid "Setup" -msgstr "Paramètres" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "Édit_er" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Afficher/cacher le panneau" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Visualiser" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Le visualiseur de fichiers d'aide en HTML (CHM) pour Unix/Linux" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "Aide" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universel\n" -"Chinois simplifié\n" -"Chinois traditionnel\n" -"Japonais\n" -"Coréen\n" -"Russe\n" -"Ukrainien" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Zoomer" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Ouvrir un fichier" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Dézoomer" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Ouvrir un fichier" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "Retour" +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nouvel onglet" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "Fermer l'onglet" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Copier" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Copier l'adresse du lien" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Tout sélectionner" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "Édit_er" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Fichier" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "Accueil" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "Retour" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "Suivant" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "Aide" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nouvel onglet" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Visualiser" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "À propos" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Zoomer" + +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Dézoomer" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -"Launchpad Contributions:\n" -" appzer0 https://launchpad.net/~appzer0\n" -"\n" -"Launchpad Contributions:\n" -" Pierre Slamich https://launchpad.net/~pierre-slamich\n" -" appzer0 https://launchpad.net/~appzer0" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Visualiseur d'aide HTML (CHM)" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Afficher/cacher le panneau" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Fichiers CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Tous les fichiers" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Prêt !" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Le fichier chm %s n'a pas pu être ouvert." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Afficher la version et quitter" + +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" + +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "À propos" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Ouvrir le lien dans un nouvel ongle_t" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Copier l'adresse du lien" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Copier l'UR_L de la page" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Sans titre" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Rubriques" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Marque-pages" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Sans titre" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Erreur au chargement de '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "Impossible d'ouvrir le fichier CHM : '%s'" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Le fichier chm %s n'a pas pu être ouvert." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Échec à l'extraction du fichier CHM : '%s'" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "Échec à l'ouverture de '%s' : '%s'" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Le fichier chm %s n'a pas pu être ouvert." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Le fichier hhc est introuvable." +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Le visualiseur de fichiers d'aide en HTML (CHM) pour Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Afficher la version et quitter" +#~ msgid "more than 1 argument\n" +#~ msgstr "plus d'un argument\n" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "plus d'un argument\n" +#~ msgid "Auto-Detect:" +#~ msgstr "Détection auto. :" -#~ msgid "_Home" -#~ msgstr "Accueil" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copier" -#~ msgid "_Setup" -#~ msgstr "Paramètre_s" +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Impossible d'ouvrir le fichier CHM : '%s'" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "" +#~ msgid "Error loading file '%s'" +#~ msgstr "Erreur au chargement de '%s'" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "" +#~ msgid "Can't found hhc file." +#~ msgstr "Le fichier hhc est introuvable." -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "" +#~ msgid "About..." +#~ msgstr "À propos..." -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "" +#~ msgid "Back" +#~ msgstr "Retour" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "" +#~ msgid "Forward" +#~ msgstr "Suivant" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" +#~ msgid "Home" +#~ msgstr "Accueil" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" +#~ msgid "Panel" +#~ msgstr "Panneau" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universel\n" +#~ "Chinois simplifié\n" +#~ "Chinois traditionnel\n" +#~ "Japonais\n" +#~ "Coréen\n" +#~ "Russe\n" +#~ "Ukrainien" + +#~ msgid "_Setup" +#~ msgstr "Paramètre_s" diff -Nru chmsee-1.0.7/po/he.po chmsee-1.3.0/po/he.po --- chmsee-1.0.7/po/he.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/he.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-01-11 09:27+0000\n" "Last-Translator: Yaron \n" "Language-Team: Hebrew \n" @@ -17,31 +17,51 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Yaron https://launchpad.net/~sh-yaron\n" +"\n" +"Launchpad Contributions:\n" +" Yaron https://launchpad.net/~sh-yaron" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "מציג ה־CHM‏ (ChmSee)" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "מציג קבצי עזרה ב־HTML דחוסים (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "פתח קובץ" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "מטמון" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "ערכת תווים" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "גופן" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "אודות" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "מטמון" -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "זיהוי־אוטומטי" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "הקודם" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "ערכת תווים" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -53,233 +73,632 @@ "\n" "הערה: אם הינך צופה בקובץ CHM, תאלץ לפתוח אותו מחדש לאחר שתרוקן." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "מציג ה־CHM‏ (ChmSee)" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "ערכת תווים" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "רוחב קבוע" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "התקדם" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "בית" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "רגיל" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "פתח קובץ" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "פתח קישור ב_לשונית חדשה" +#: ../data/setup-window.ui.h:11 +msgid "Setup" +msgstr "הגדרות" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "חלונית" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "רוחב משתנה:" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "בחר ה_כל" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_קובץ" -#: ../data/chmsee.glade.h:21 -msgid "Setup" -msgstr "הגדרות" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "ע_ריכה" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "הצג/הסתר חלונית" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_תצוגה" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "תוכנה המציגה קבצי עזרה ב־HTML דחוסים (CHM) עבור יוניקס/לינוקס" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "ע_זרה" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "רוחב משתנה:" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "התקרבות" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "פתח קובץ" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "התרחקות" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "פתח קובץ" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_חזור" +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "לשונית _חדשה" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "סגור _לשונית" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "מציג ה־CHM‏ (ChmSee)" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "ה_עתק" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "העתק את _מיקום הקישור" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "בחר ה_כל" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "ע_ריכה" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_קובץ" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_בית" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_חזור" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "ה_תקדם" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "ע_זרה" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "לשונית _חדשה" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_תצוגה" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "אודות" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "מציג ה־CHM‏ (ChmSee)" + +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "התקרבות" + +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "רגיל" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "התרחקות" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -"Launchpad Contributions:\n" -" Yaron https://launchpad.net/~sh-yaron\n" -"\n" -"Launchpad Contributions:\n" -" Yaron https://launchpad.net/~sh-yaron" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "מציג קבצי עזרה ב־HTML דחוסים (CHM)" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "הצג/הסתר חלונית" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "קבצי CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "כל הקבצים" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "מוכן!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "נושאים" +#: ../src/chmsee.c:985 +#, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "" -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "סימניות" +#: ../src/main.c:220 +msgid "Display ChmSee version" +msgstr "" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "אין כותרת" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "שגיאה בטעינת הקובץ '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "סימנייה" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "אודות" -#~ msgid "_Home" -#~ msgstr "_בית" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" -#~ msgid "_Setup" -#~ msgstr "ה_גדרות" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" -#: ../data/chmsee.glade.h:5 -msgid "About..." +#: ../src/setup.c:134 +msgid "East Asian" msgstr "" -#: ../data/chmsee.glade.h:12 +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "פתח קישור ב_לשונית חדשה" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "העתק את _מיקום הקישור" + +#: ../src/components/book.c:127 +#, fuzzy msgid "Copy Page _Location" +msgstr "העתק את _מיקום הקישור" + +#: ../src/components/book.c:246 +msgid "Find:" msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#: ../src/components/book.c:261 +msgid "Previous" msgstr "" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/components/book.c:271 +msgid "Next" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/components/book.c:281 +msgid "Match case" msgstr "" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "אין כותרת" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "נושאים" + +#: ../src/components/book.c:916 +msgid "Index" msgstr "" -#: ../src/chmsee.c:449 +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "סימניות" + +#: ../src/components/book.c:1019 #, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +msgid "Can not find link target file at \"%s\"" msgstr "" -#: ../src/models/chmfile.c:239 +#: ../src/models/chmfile.c:293 #, c-format -msgid "cannot open chmfile: %s" +msgid "Cannot open chmfile: %s" msgstr "" -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "" -#: ../src/models/chmfile.c:272 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "תוכנה המציגה קבצי עזרה ב־HTML דחוסים (CHM) עבור יוניקס/לינוקס" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "" +#~ msgid "Auto-Detect:" +#~ msgstr "זיהוי־אוטומטי" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "ה_עתק" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" +#~ msgid "Error loading file '%s'" +#~ msgstr "שגיאה בטעינת הקובץ '%s'" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "" +#~ msgid "Bookmark" +#~ msgstr "סימנייה" + +#~ msgid "Back" +#~ msgstr "הקודם" + +#~ msgid "Forward" +#~ msgstr "התקדם" + +#~ msgid "Home" +#~ msgstr "בית" + +#~ msgid "Panel" +#~ msgstr "חלונית" + +#~ msgid "_Setup" +#~ msgstr "ה_גדרות" diff -Nru chmsee-1.0.7/po/id.po chmsee-1.3.0/po/id.po --- chmsee-1.0.7/po/id.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/id.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-06-28 17:47+0000\n" "Last-Translator: Auriza Akbar \n" "Language-Team: Indonesian \n" @@ -17,35 +17,49 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Auriza Akbar https://launchpad.net/~auriza.akbar\n" +" ekoyudhip https://launchpad.net/~ekoyudhiprastowo" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Pembuka HTML Help (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Buka Berkas" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Set Karakter" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Jenis Huruf" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Tentang" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Tentang..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Deteksi-Otomatis:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Kembali" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Set Karakter" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -57,228 +71,666 @@ "Catatan: Jika Anda sedang membuka file CHM, Anda harus membuka kembali " "berkas tersebut setelah pembersihan." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Salin _Lokasi Halaman" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Set Karakter" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Lebar Tetap:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Lanjut" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Awal" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Buka Berkas" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Buka Tautan pada _Tab Baru" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Pilih Semu_a" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Pengaturan" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Tampilkan/Sembunyikan Panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Lebar Variabel:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "_Panel Sisi" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Berkas" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Pembuka HTML Help (CHM) untuk UNIX/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Sunting" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universal\n" -"China Sederhana\n" -"China Tradisional\n" -"Jepang\n" -"Korea\n" -"Rusia\n" -"Ukraina" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Lihat" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Lebar Variabel:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Bantuan" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Perbesar" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Perkecil" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Buka Berkas" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Kembali" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Buka Berkas" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Tab Baru" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Tutup Tab" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Salin" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Salin Lokasi Tautan" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Pilih Semu_a" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Sunting" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Berkas" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Awal" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Kembali" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Teruskan" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Layar Penuh" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Bantuan" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Tab Baru" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Tentang" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Lihat" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Perbesar" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Auriza Akbar https://launchpad.net/~auriza.akbar\n" -" ekoyudhip https://launchpad.net/~ekoyudhiprastowo" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Pembuka HTML Help (CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Perkecil" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Pengalihan URI: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Layar Penuh" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "_Panel Sisi" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Berkas CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Semua Berkas" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Siap!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Tidak dapat membuka berkas chm %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Tampilkan versi dan keluar" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "menjadi cerewet, ulangi 3 kali untuk mendapatkan semua info" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "menjadi pendiam, ulangi 2 kali untuk mematikan semua info" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Tentang" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Buka Tautan pada _Tab Baru" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Salin Lokasi Tautan" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Salin _Lokasi Halaman" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Tanpa Judul" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Topik" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Penanda" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Tanpa Judul" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Gagal memuat berkas '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "tidak dapat membuka berkas CHM: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Tidak dapat membuka berkas chm %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Pengekstrakan berkas CHM gagal: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "membuka \"%s\" gagal: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Tidak dapat membuka berkas chm %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Tidak dapat menemukan berkas hhc." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Penanda" - -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Tampilkan versi dan keluar" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Pembuka HTML Help (CHM) untuk UNIX/Linux" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "menjadi cerewet, ulangi 3 kali untuk mendapatkan semua info" +#~ msgid "more than 1 argument\n" +#~ msgstr "lebih dari 1 argumen\n" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "menjadi pendiam, ulangi 2 kali untuk mematikan semua info" +#~ msgid "Auto-Detect:" +#~ msgstr "Deteksi-Otomatis:" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "lebih dari 1 argumen\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Salin" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Pengalihan URI: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "tidak dapat membuka berkas CHM: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Gagal memuat berkas '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Penanda" + +#~ msgid "Can't found hhc file." +#~ msgstr "Tidak dapat menemukan berkas hhc." + +#~ msgid "About..." +#~ msgstr "Tentang..." + +#~ msgid "Back" +#~ msgstr "Kembali" + +#~ msgid "Forward" +#~ msgstr "Lanjut" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Tampilkan/Sembunyikan Panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universal\n" +#~ "China Sederhana\n" +#~ "China Tradisional\n" +#~ "Jepang\n" +#~ "Korea\n" +#~ "Rusia\n" +#~ "Ukraina" diff -Nru chmsee-1.0.7/po/it.po chmsee-1.3.0/po/it.po --- chmsee-1.0.7/po/it.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/it.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-01-11 09:21+0000\n" "Last-Translator: Luca Livraghi \n" "Language-Team: Italian \n" @@ -17,35 +17,51 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Luca Livraghi https://launchpad.net/~luca91\n" +"\n" +"Launchpad Contributions:\n" +" Luca Livraghi https://launchpad.net/~luca91" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Visualizzatore Help(CHM) HTML" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Apri File" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Codifica Caratteri" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Carattere" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Informazioni" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Informazioni su..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Rileva Automaticamente:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Indietro" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Codifica Caratteri" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -58,236 +74,652 @@ "NOTA: Se si sta visualizzando un file CHM, è necessario riaprirlo dopo la " "pulizia." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Codifica Caratteri" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Larghezza Fissa:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Avanti" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Home" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normale" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Apri File" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Apri Collegamento in una Nuova _Scheda" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Pannello" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Seleziona _Tutto" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Configurazione" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Mostra/Nascondi Pannello" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Larghezza Variabile:" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Il visualizzatore Help(CHM) HTML per Unix/Linux" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_File" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universale\n" -"Cinese Semplificato\n" -"Cinese Tradizionale\n" -"Giapponese\n" -"Coreano\n" -"Russo\n" -"Ucraino" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Modifica" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Larghezza Variabile:" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Visualizza" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Ingrandisci" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Aiuto" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Riduci" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Indietro" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Apri File" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Apri File" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nuova scheda" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Chiudi scheda" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Copia" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Copia Posizione Collegamento" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Seleziona _Tutto" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Modifica" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_File" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Home" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Indietro" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Avanti" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Aiuto" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nuova scheda" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Visualizza" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Informazioni" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Ingrandisci" + +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normale" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Riduci" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -"Launchpad Contributions:\n" -" Luca Livraghi https://launchpad.net/~luca91\n" -"\n" -"Launchpad Contributions:\n" -" Luca Livraghi https://launchpad.net/~luca91" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Visualizzatore Help(CHM) HTML" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Mostra/Nascondi Pannello" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "File CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Tutti i File" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Pronto!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "Argomenti" +#: ../src/chmsee.c:985 +#, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "" -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "Segnalibri" +#: ../src/main.c:220 +msgid "Display ChmSee version" +msgstr "" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Nessun Titolo" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "Errore durante il caricamento del file '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Segnalibro" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Informazioni" -#~ msgid "_Home" -#~ msgstr "_Home" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" -#~ msgid "_Setup" -#~ msgstr "_Configurazione" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" -#: ../data/chmsee.glade.h:12 +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Apri Collegamento in una Nuova _Scheda" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Copia Posizione Collegamento" + +#: ../src/components/book.c:127 +#, fuzzy msgid "Copy Page _Location" +msgstr "_Copia Posizione Collegamento" + +#: ../src/components/book.c:246 +msgid "Find:" msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#: ../src/components/book.c:261 +msgid "Previous" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/components/book.c:271 +msgid "Next" msgstr "" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" +#: ../src/components/book.c:281 +msgid "Match case" msgstr "" -#: ../src/chmsee.c:449 +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Nessun Titolo" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "Argomenti" + +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "Segnalibri" + +#: ../src/components/book.c:1019 #, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +msgid "Can not find link target file at \"%s\"" msgstr "" -#: ../src/models/chmfile.c:239 +#: ../src/models/chmfile.c:293 #, c-format -msgid "cannot open chmfile: %s" +msgid "Cannot open chmfile: %s" msgstr "" -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "" -#: ../src/models/chmfile.c:272 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Il visualizzatore Help(CHM) HTML per Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "" - -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" +#~ msgid "Auto-Detect:" +#~ msgstr "Rileva Automaticamente:" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copia" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Errore durante il caricamento del file '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Segnalibro" + +#~ msgid "About..." +#~ msgstr "Informazioni su..." + +#~ msgid "Back" +#~ msgstr "Indietro" + +#~ msgid "Forward" +#~ msgstr "Avanti" + +#~ msgid "Home" +#~ msgstr "Home" + +#~ msgid "Panel" +#~ msgstr "Pannello" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universale\n" +#~ "Cinese Semplificato\n" +#~ "Cinese Tradizionale\n" +#~ "Giapponese\n" +#~ "Coreano\n" +#~ "Russo\n" +#~ "Ucraino" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "" +#~ msgid "_Setup" +#~ msgstr "_Configurazione" diff -Nru chmsee-1.0.7/po/ms.po chmsee-1.3.0/po/ms.po --- chmsee-1.0.7/po/ms.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/ms.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-06-21 17:11+0000\n" "Last-Translator: abuyop \n" "Language-Team: Malay \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" abuyop https://launchpad.net/~abuyop" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Pelihat Bantuan HTML(CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Buka Fail" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cecikut" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Charset" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Fon" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Perihal" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cecikut" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Perihal..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-Kenalpasti" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Kembali" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Charset" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -58,227 +71,662 @@ "NOTA: Jika anda sedang membaca fail CHM, anda perlu membukanya semula " "selepas pembersihan." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Salin Lokasi _Halaman" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Charset" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Lebar Tetap:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Hadapan" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Runah" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Buka Fail" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Buka Pautan pada _Tab Baru" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Pilih _Semua" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Tetapan" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Papar/Sembunyi Panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Lebar Boleh Ubah" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "_Pane Sisi" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Fail" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Pelihat Bantuan HTML (CHM) untuk Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Sunting" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universal/n\n" -"China Mudah/n\n" -"China Tradisional/n\n" -"Jepun/n\n" -"Korea/n\n" -"Rusia/n\n" -"Ukraine" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Papar" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Lebar Boleh Ubah" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Bantuan" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Zum masuk" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Zum Keluar" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Buka Fail" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Kembali" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Buka Fail" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "Tab _Baru" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Tutup Tab" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Salin" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Salin Lokasi Pautan" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Pilih _Semua" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Sunting" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Fail" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Runah" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Kembali" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Hadapan" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "Skrin Penuh" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Bantuan" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "Tab _Baru" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Perihal" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Papar" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Zum masuk" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" abuyop https://launchpad.net/~abuyop" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Pelihat Bantuan HTML(CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Zum Keluar" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "Skrin Penuh" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "_Pane Sisi" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Fail CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Semua Fail" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Sedia!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Tidak dapat membuka fail chm: %s" + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Papar versi dan keluar" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "panjang berjela, ulang 3 kali untuk dapatkan semua info" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "senyap, ulang 2 kali untuk lumpuhkan semua info" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Perihal" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Buka Pautan pada _Tab Baru" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Salin Lokasi Pautan" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Salin Lokasi _Halaman" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Tiada Tajuk" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Topik" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Tanda Buku" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Tiada Tajuk" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Ralat memuatkan fail '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "Tidak dapat membuka failchm: '%s'" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Tidak dapat membuka fail chm: %s" -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Ekstrak failchm gagal: '%s'" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "buka '%s' gagal: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Tidak dapat membuka fail chm: %s" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Tidak jumpa fail hhc." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Tanda Buku" - -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Papar versi dan keluar" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Pelihat Bantuan HTML (CHM) untuk Unix/Linux" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "panjang berjela, ulang 3 kali untuk dapatkan semua info" +#~ msgid "more than 1 argument\n" +#~ msgstr "lebih dari 1 argumen/n\n" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "senyap, ulang 2 kali untuk lumpuhkan semua info" +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-Kenalpasti" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "lebih dari 1 argumen/n\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Salin" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Tidak dapat membuka failchm: '%s'" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Ralat memuatkan fail '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Tanda Buku" + +#~ msgid "Can't found hhc file." +#~ msgstr "Tidak jumpa fail hhc." + +#~ msgid "About..." +#~ msgstr "Perihal..." + +#~ msgid "Back" +#~ msgstr "Kembali" + +#~ msgid "Forward" +#~ msgstr "Hadapan" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Papar/Sembunyi Panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universal/n\n" +#~ "China Mudah/n\n" +#~ "China Tradisional/n\n" +#~ "Jepun/n\n" +#~ "Korea/n\n" +#~ "Rusia/n\n" +#~ "Ukraine" diff -Nru chmsee-1.0.7/po/nb.po chmsee-1.3.0/po/nb.po --- chmsee-1.0.7/po/nb.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/nb.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-03-06 14:09+0000\n" "Last-Translator: Mikal Krogstad \n" "Language-Team: Norwegian Bokmal \n" @@ -17,35 +17,51 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Mikal Krogstad https://launchpad.net/~mikal-krogstad\n" +"\n" +"Launchpad Contributions:\n" +" Mikal Krogstad https://launchpad.net/~mikal-krogstad" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Framviser for HTML-hjelp (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Åpne fil" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Hurtiglager" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Tegnkoding" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Skrift" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Om" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Hurtiglager" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Om..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Autogjenkjenn:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Tilbake" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Tegnkoding" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -57,236 +73,655 @@ "\n" "Har du en CHM-fil åpen, må du åpne den på nytt etter tømming." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Kopier side_plassering" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Tegnkoding" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Fastsatt bredde:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Fremover" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Hjem" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Åpne fil" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Åpne lenke i ny _fane" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Velg _alt" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Brukervalg" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Vis/gjem panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Variabel bredde:" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Framviser for HTML-hjelp (CHM) for Unix/Linux" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Fil" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universell\n" -"Forenklet kinesisk\n" -"Tradisjonell kinesisk\n" -"Japanesk\n" -"Koreansk\n" -"Russisk\n" -"Ukrainsk" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "R_ediger" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Variabel bredde:" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Vis" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Forstørr" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Hjelp" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Forminsk" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "Til_bake" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Åpne fil" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Åpne fil" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Ny fane" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Lukk fane" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Kopier" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Kopier lenkemål" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Velg _alt" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "R_ediger" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Fil" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Hjem" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "Til_bake" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Fremover" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Hjelp" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Ny fane" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Vis" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Om" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Forstørr" + +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Forminsk" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" msgstr "" -"Launchpad Contributions:\n" -" Mikal Krogstad https://launchpad.net/~mikal-krogstad\n" -"\n" -"Launchpad Contributions:\n" -" Mikal Krogstad https://launchpad.net/~mikal-krogstad" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Framviser for HTML-hjelp (CHM)" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Vis/gjem panel" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM-filer" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Alle filer" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Klar!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "Emner" +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "kan ikke åpne chm-fil: %s" -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "Bokmerker" +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Vis versjon og avslutt" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Ingen tittel" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "Feil ved lesing av '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "kan ikke åpne chm-fil: %s" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Om" -#: ../src/models/chmfile.c:246 -#, c-format -msgid "Extract chmfile failed: %s" -msgstr "Utpakking av chm-fil mislyktes: %s" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" -msgstr "lesing av \"%s\" mislyktes: %s" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Legg til bokmerke" +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Vis versjon og avslutt" +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "mer enn ett argument\n" +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" -#~ msgid "_Home" -#~ msgstr "_Hjem" +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" -#~ msgid "_Setup" -#~ msgstr "Opp_sett" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/setup.c:143 +msgid "Western (IBM-850)" msgstr "" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:144 +msgid "Western (MacRoman)" msgstr "" -#: ../src/models/chmfile.c:322 -#, c-format -msgid "Can not open chm file %s." +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" msgstr "" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" msgstr "" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Åpne lenke i ny _fane" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Kopier lenkemål" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Kopier side_plassering" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Ingen tittel" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "Emner" + +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "Bokmerker" + +#: ../src/components/book.c:1019 +#, c-format +msgid "Can not find link target file at \"%s\"" +msgstr "" + +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "kan ikke åpne chm-fil: %s" + +#: ../src/models/chmfile.c:303 +#, c-format +msgid "Extract chmfile failed: %s" +msgstr "Utpakking av chm-fil mislyktes: %s" + +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" +msgstr "lesing av \"%s\" mislyktes: %s" + +#: ../src/models/chmfile.c:519 +#, c-format +msgid "Can not open chm file %s." +msgstr "" + +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Framviser for HTML-hjelp (CHM) for Unix/Linux" + +#~ msgid "more than 1 argument\n" +#~ msgstr "mer enn ett argument\n" + +#~ msgid "Auto-Detect:" +#~ msgstr "Autogjenkjenn:" + +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopier" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Feil ved lesing av '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Legg til bokmerke" + +#~ msgid "About..." +#~ msgstr "Om..." + +#~ msgid "Back" +#~ msgstr "Tilbake" + +#~ msgid "Forward" +#~ msgstr "Fremover" + +#~ msgid "Home" +#~ msgstr "Hjem" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universell\n" +#~ "Forenklet kinesisk\n" +#~ "Tradisjonell kinesisk\n" +#~ "Japanesk\n" +#~ "Koreansk\n" +#~ "Russisk\n" +#~ "Ukrainsk" + +#~ msgid "_Setup" +#~ msgstr "Opp_sett" diff -Nru chmsee-1.0.7/po/pl.po chmsee-1.3.0/po/pl.po --- chmsee-1.0.7/po/pl.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/pl.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-05-22 21:08+0000\n" "Last-Translator: Mateusz Szyper \n" "Language-Team: Polish \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 -msgid "Cache" +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" msgstr "" +"Launchpad Contributions:\n" +" Mateusz Szyper https://launchpad.net/~mateyko" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Układ znaków" +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Wyświetlacz pomocy HTML(CHM)" -#: ../data/chmsee.glade.h:3 +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Otwórz plik" + +#: ../data/setup-window.ui.h:1 +msgid "Cache" +msgstr "" + +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Czcionka" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "O programie" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Układ znaków" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "O programie..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Autodetekcja" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Wstecz" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Układ znaków" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -53,227 +66,647 @@ "NOTE: If you are viewing a CHM file, you need reopen it after cleaning." msgstr "" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Układ znaków" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Stała szerokość:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Dalej" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:15 -msgid "Home" +#: ../data/setup-window.ui.h:11 +msgid "Setup" msgstr "" -#: ../data/chmsee.glade.h:16 -msgid "Normal" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Zmienna szerokość:" + +#: ../src/chmsee.c:187 +msgid "_File" msgstr "" -#: ../data/chmsee.glade.h:17 -msgid "Open File" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "" + +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "" + +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "" + +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" + +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" msgstr "Otwórz plik" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Otwórz plik" + +#: ../src/chmsee.c:195 +msgid "New _Tab" +msgstr "" + +#: ../src/chmsee.c:196 +msgid "_Close Tab" msgstr "" -#: ../data/chmsee.glade.h:19 -msgid "Panel" +#: ../src/chmsee.c:197 +msgid "E_xit" msgstr "" -#: ../data/chmsee.glade.h:20 +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 +msgid "_Copy" +msgstr "_Kopiuj" + +#: ../src/chmsee.c:200 ../src/components/book.c:126 msgid "Select _All" msgstr "" -#: ../data/chmsee.glade.h:21 -msgid "Setup" +#: ../src/chmsee.c:202 +msgid "_Find" msgstr "" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Pokaż/ukryj panel" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#: ../src/chmsee.c:204 +msgid "Preferences" msgstr "" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" +#: ../src/chmsee.c:206 +msgid "_Home" msgstr "" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Uniwersalny\n" -"Chiński uproszczony\n" -"Chiński tradycyjny\n" -"Japoński\n" -"Koreański\n" -"Rosyjski\n" -"Ukraiński" +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Wstecz" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Zmienna szerokość:" +#: ../src/chmsee.c:208 ../src/components/book.c:123 +#, fuzzy +msgid "_Forward" +msgstr "Dalej" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" + +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" + +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "O programie" + +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" msgstr "Powiększ" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" +#: ../src/chmsee.c:215 +msgid "_Normal Size" +msgstr "" + +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" msgstr "Pomniejsz" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Wstecz" +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "" -#: ../data/chmsee.glade.h:36 -msgid "_Close Tab" +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Pokaż/ukryj panel" + +#: ../src/chmsee.c:486 +msgid "CHM Files" +msgstr "Pliki CHM" + +#: ../src/chmsee.c:491 +msgid "All Files" +msgstr "Wszystkie pliki" + +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " msgstr "" -#: ../data/chmsee.glade.h:37 -msgid "_Copy" -msgstr "_Kopiuj" +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Skopiuj adres łącza" +#: ../src/chmsee.c:802 +msgid "Ready!" +msgstr "" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Nie można otworzyć pliku chm: %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Wyświetl wersję i wyjdź" + +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" msgstr "" -#: ../data/chmsee.glade.h:41 -msgid "_Forward" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "O programie" + +#: ../src/setup.c:132 +msgid "West European" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/setup.c:133 +msgid "East European" msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" +#: ../src/setup.c:134 +msgid "East Asian" msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" +#: ../src/setup.c:135 +msgid "SE & SW Asian" msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" +#: ../src/setup.c:136 +msgid "Middle Eastern" msgstr "" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" msgstr "" -"Launchpad Contributions:\n" -" Mateusz Szyper https://launchpad.net/~mateyko" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Wyświetlacz pomocy HTML(CHM)" +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:143 +msgid "Western (IBM-850)" msgstr "" -#: ../src/chmsee.c:610 -msgid "CHM Files" -msgstr "Pliki CHM" +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" -#: ../src/chmsee.c:615 -msgid "All Files" -msgstr "Wszystkie pliki" +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" -#: ../src/chmsee.c:1135 -msgid "Ready!" +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" msgstr "" -#: ../src/chmsee.c:1191 +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Skopiuj adres łącza" + +#: ../src/components/book.c:127 +#, fuzzy +msgid "Copy Page _Location" +msgstr "_Skopiuj adres łącza" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Bez tytułu" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Tematy" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Zakładki" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Bez tytułu" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Błąd podczas ładowania pliku '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "Nie udało się otworzyć pliku chm: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Nie można otworzyć pliku chm: %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "Otwarcie \"%s\" nie powiodło się: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Nie można otworzyć pliku chm: %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Nie można odnaleźć pliku hhc." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Zakładka" +#~ msgid "more than 1 argument\n" +#~ msgstr "więcej niż 1 argument\n" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Wyświetl wersję i wyjdź" +#~ msgid "Auto-Detect:" +#~ msgstr "Autodetekcja" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" - -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" - -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "więcej niż 1 argument\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopiuj" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Nie udało się otworzyć pliku chm: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Błąd podczas ładowania pliku '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Zakładka" + +#~ msgid "Can't found hhc file." +#~ msgstr "Nie można odnaleźć pliku hhc." + +#~ msgid "About..." +#~ msgstr "O programie..." + +#~ msgid "Back" +#~ msgstr "Wstecz" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Uniwersalny\n" +#~ "Chiński uproszczony\n" +#~ "Chiński tradycyjny\n" +#~ "Japoński\n" +#~ "Koreański\n" +#~ "Rosyjski\n" +#~ "Ukraiński" diff -Nru chmsee-1.0.7/po/POTFILES.in chmsee-1.3.0/po/POTFILES.in --- chmsee-1.0.7/po/POTFILES.in 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/POTFILES.in 2011-01-16 13:48:42.000000000 +0000 @@ -1,26 +1,21 @@ # List of source files containing translatable strings. # Please keep this file sorted alphabetically. -data/chmsee.glade +[type: gettext/glade]data/about-dialog.ui data/chmsee.desktop.in -src/booktree.c +[type: gettext/glade]data/openfile-dialog.ui +[type: gettext/glade]data/setup-window.ui src/chmsee.c -src/html.c -src/html-factory.c -src/ihtml.c -src/marshal.c -src/marshal_main.c +src/main.c src/setup.c -src/startup.c -src/ui_bookmarks.c -src/ui_chmfile.c -src/ui_index.c -src/gecko_utils.cpp -src/main.cpp -src/models/bookmarks.c +src/utils.c +src/components/book.c +src/components/bookmarks.c +src/components/gecko-utils.cpp +src/components/html-gecko.c +src/components/index.c +src/components/toc.c +src/components/treeview.c +src/models/bookmarksfile.c src/models/chmfile.c -src/models/chmfile-factory.c -src/models/chmindex.c -src/models/hhc.c -src/models/ichmfile.c src/models/link.c -src/utils/utils.c +src/models/parser.c diff -Nru chmsee-1.0.7/po/pt_BR.po chmsee-1.3.0/po/pt_BR.po --- chmsee-1.0.7/po/pt_BR.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/pt_BR.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-04-12 22:53+0000\n" "Last-Translator: Andrius Gabriel da Luz \n" "Language-Team: Brazilian Portuguese \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Andrius Gabriel da Luz https://launchpad.net/~andriusgabriel" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Visualizador de arquivos de ajuda HTML (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Abrir arquivo" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Codificação" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Fonte" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Sobre" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Sobre..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-detectar:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Anterior" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Codificação" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -55,227 +68,663 @@ "Os arquivos CHM foram extraídos nesta pasta, aperte o botão Limpar para " "liberar espaço em disco." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Copiar o local da página" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Codificação" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Largura fixa:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Próximo" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Pasta pessoal" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Abrir arquivo" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Abrir link em nova a_ba" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Painel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Selecionar _tudo" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Configuração" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Exibir/ocultar painel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Largura variável:" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "O visualizador de ajuda HTML (CHM) para Unix/Linux" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Arquivo" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universal\n" -"Chinês simplificado\n" -"Chinês tradicional\n" -"Japonês\n" -"Coreano\n" -"Russo\n" -"Ucraniano" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Editar" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Largura variável:" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Visualizar" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Ampliar" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Ajuda" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Reduzir" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Voltar" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Abrir arquivo" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Abrir arquivo" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nova aba" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Fechar aba" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Copiar" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Copiar local do link" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Selecionar _tudo" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Editar" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Arquivo" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Pasta pessoal" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Voltar" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Avançar" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Ajuda" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nova aba" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Visualizar" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Sobre" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Visualizador de arquivos de ajuda HTML (CHM)" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Ampliar" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Redirecionamento uniforme: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Reduzir" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "" + +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Exibir/ocultar painel" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Arquivos CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Todos os arquivos" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Pronto!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Não foi possível abrir o arquivo chm %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Exibe a versão e sai" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "ruidoso, repetir 3 vezes para obter todas as informações" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "silencioso, repetir 2 vezes para desativar todas as informações" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Sobre" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Abrir link em nova a_ba" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Copiar local do link" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Copiar o local da página" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Sem título" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Tópicos" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Favoritos" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Sem título" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Erro ao carregar o arquivo '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "não foi possível abrir o arquivo chm: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Não foi possível abrir o arquivo chm %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Erro na extração de arquivo chm: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "falha ao abrir %s\": %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Não foi possível abrir o arquivo chm %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Arquivo hhc não encontrado" - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Favorito" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "O visualizador de ajuda HTML (CHM) para Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Exibe a versão e sai" +#~ msgid "more than 1 argument\n" +#~ msgstr "mais que 1 argumento\n" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "ruidoso, repetir 3 vezes para obter todas as informações" - -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "silencioso, repetir 2 vezes para desativar todas as informações" - -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "mais que 1 argumento\n" +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-detectar:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "" - -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "" - -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Andrius Gabriel da Luz https://launchpad.net/~andriusgabriel" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copiar" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Redirecionamento uniforme: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "não foi possível abrir o arquivo chm: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Erro ao carregar o arquivo '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Favorito" + +#~ msgid "Can't found hhc file." +#~ msgstr "Arquivo hhc não encontrado" + +#~ msgid "About..." +#~ msgstr "Sobre..." + +#~ msgid "Back" +#~ msgstr "Anterior" + +#~ msgid "Forward" +#~ msgstr "Próximo" + +#~ msgid "Panel" +#~ msgstr "Painel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universal\n" +#~ "Chinês simplificado\n" +#~ "Chinês tradicional\n" +#~ "Japonês\n" +#~ "Coreano\n" +#~ "Russo\n" +#~ "Ucraniano" diff -Nru chmsee-1.0.7/po/pt.po chmsee-1.3.0/po/pt.po --- chmsee-1.0.7/po/pt.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/pt.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-04-30 11:03+0000\n" "Last-Translator: skkeeper \n" "Language-Team: Portuguese \n" @@ -17,44 +17,49 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Sem Título" +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Lebre https://launchpad.net/~tiagolebre\n" +" skkeeper https://launchpad.net/~skkeeper" -#: ../data/chmsee.glade.h:1 -msgid "Cache" +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" msgstr "" -#: ../data/chmsee.glade.h:2 -msgid "Charset" +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Abrir Ficheiro" + +#: ../data/setup-window.ui.h:1 +msgid "Cache" msgstr "" -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Tipo de letra" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Sobre" - -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Sobre..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-detectar:" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Tipo de letra" -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Voltar" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Tipo de letra" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -62,212 +67,614 @@ "NOTE: If you are viewing a CHM file, you need reopen it after cleaning." msgstr "" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" +#: ../data/setup-window.ui.h:8 +msgid "Charset:" msgstr "" -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "" - -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Largura Fixa" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Avançar" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:15 -msgid "Home" +#: ../data/setup-window.ui.h:11 +msgid "Setup" msgstr "" -#: ../data/chmsee.glade.h:17 -msgid "Open File" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "" + +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Ficheiro" + +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Editar" + +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Visualizar" + +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Ajuda" + +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" + +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" msgstr "Abrir Ficheiro" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Abrir Ficheiro" + +#: ../src/chmsee.c:195 +msgid "New _Tab" +msgstr "" + +#: ../src/chmsee.c:196 +msgid "_Close Tab" +msgstr "" + +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +msgid "Exit ChmSee" msgstr "" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Painel" +#: ../src/chmsee.c:199 ../src/components/book.c:121 +msgid "_Copy" +msgstr "Copiar" -#: ../data/chmsee.glade.h:20 +#: ../src/chmsee.c:200 ../src/components/book.c:126 msgid "Select _All" msgstr "Seleccionar _Todos" -#: ../data/chmsee.glade.h:21 -msgid "Setup" +#: ../src/chmsee.c:202 +msgid "_Find" msgstr "" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Mostrar/Ocultar Painel" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:23 +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +#, fuzzy +msgid "_Back" +msgstr "Voltar" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 +msgid "_Forward" +msgstr "_Avançar" + +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" + +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" + +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Sobre" + +#: ../src/chmsee.c:212 +msgid "About ChmSee" +msgstr "" + +#: ../src/chmsee.c:214 +msgid "Zoom _In" +msgstr "" + +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" + +#: ../src/chmsee.c:216 +msgid "Zoom _Out" +msgstr "" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "" + +#: ../src/chmsee.c:225 +#, fuzzy msgid "Side _Pane" +msgstr "Mostrar/Ocultar Painel" + +#: ../src/chmsee.c:486 +msgid "CHM Files" +msgstr "" + +#: ../src/chmsee.c:491 +msgid "All Files" msgstr "" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "O Visualizador HTML (CHM) para Unix/Linux" +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/chmsee.c:628 +msgid ")" msgstr "" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" +#: ../src/chmsee.c:802 +msgid "Ready!" msgstr "" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" +#: ../src/chmsee.c:985 +#, c-format +msgid "Error: Can not open spectified file '%s'" msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" +#: ../src/main.c:220 +msgid "Display ChmSee version" msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" msgstr "" -#: ../data/chmsee.glade.h:36 -msgid "_Close Tab" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" msgstr "" -#: ../data/chmsee.glade.h:37 -msgid "_Copy" -msgstr "Copiar" +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Sobre" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" +#: ../src/setup.c:132 +msgid "West European" msgstr "" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Editar" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Ficheiro" +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" -#: ../data/chmsee.glade.h:41 -msgid "_Forward" -msgstr "_Avançar" +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/setup.c:136 +msgid "Middle Eastern" msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Ajuda" +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Visualizar" +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" +#: ../src/setup.c:143 +msgid "Western (IBM-850)" msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/setup.c:144 +msgid "Western (MacRoman)" msgstr "" -"Launchpad Contributions:\n" -" Lebre https://launchpad.net/~tiagolebre\n" -" skkeeper https://launchpad.net/~skkeeper" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" msgstr "" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" msgstr "" -#: ../src/chmsee.c:610 -msgid "CHM Files" +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" msgstr "" -#: ../src/chmsee.c:615 -msgid "All Files" +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" msgstr "" -#: ../src/chmsee.c:1135 -msgid "Ready!" +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" msgstr "" -#: ../src/chmsee.c:1191 +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Sem Título" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "" -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" +msgid "Can not find link target file at \"%s\"" msgstr "" -#: ../src/models/chmfile.c:239 +#: ../src/models/chmfile.c:293 #, c-format -msgid "cannot open chmfile: %s" +msgid "Cannot open chmfile: %s" msgstr "" -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "" -#: ../src/models/chmfile.c:272 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "O Visualizador HTML (CHM) para Unix/Linux" -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "" +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-detectar:" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "Copiar" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" +#~ msgid "About..." +#~ msgstr "Sobre..." -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" +#~ msgid "Forward" +#~ msgstr "Avançar" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "" +#~ msgid "Panel" +#~ msgstr "Painel" diff -Nru chmsee-1.0.7/po/ro.po chmsee-1.3.0/po/ro.po --- chmsee-1.0.7/po/ro.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/ro.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-06-16 19:30+0000\n" "Last-Translator: bitter \n" "Language-Team: Romanian \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" bitter https://launchpad.net/~hrdaniel03" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Program de vizualizare HTML Help(CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Deschide Fișier" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Set de caractere" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Font" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Despre" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Despre..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Auto-Detectare:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Înapoi" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Set de caractere" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -57,227 +70,666 @@ "Notă: Dacă vizualizați un fișier CHM, este necesară redeschiderea acestuia " "după curățenie." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Copiază _Locația Paginii" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Set de caractere" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Reparat cu:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Înainte" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Acasă" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Deschide Fișier" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Deschide Legătura în _Tab Nou" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panou" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Selectează _Tot" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Configurare" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Arată/Ascunde Panoul" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Lățime Variabilă" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "_Panou Lateral" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Fișier" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Program de vizualizare HTML Help(CHM) pentru Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Editează" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Universal\n" -"Chineză Simplificată\n" -"Chineză Tradițională\n" -"Japoneză\n" -"Koreană\n" -"Rusă\n" -"Ucrainiană" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Vizualizează" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Lățime Variabilă" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Ajutor" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Mărește" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Micșorează" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Deschide Fișier" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Înapoi" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Deschide Fișier" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Tab Nou" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Închide Tab" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Copiază" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Copiază Locația Legăturii" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Selectează _Tot" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Editează" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Fișier" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Acasă" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Înapoi" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Înainte" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Tot Ecranul" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Ajutor" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Tab Nou" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Despre" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Vizualizează" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Mărește" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" bitter https://launchpad.net/~hrdaniel03" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Program de vizualizare HTML Help(CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Micșorează" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI redirectează: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Tot Ecranul" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "_Panou Lateral" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Fișiere CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Toate Fișierele" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Gata!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Nu se poate deschide fișierul chm %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Afișare versiune și ieșire." + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "fii guraliv, repetă de 3 ori pentru a obține toate informațiile" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "fii tăcut, repetă de 2 ori pentru a elimina toate informațiile" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Despre" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Deschide Legătura în _Tab Nou" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Copiază Locația Legăturii" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Copiază _Locația Paginii" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Nici un Titlu" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Subiecte" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Semne de carte" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Nici un Titlu" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Eroare la încărcarea fișierului '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "nu se paote deschide fișierul chm: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Nu se poate deschide fișierul chm %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Extragerea fișierului chm eșuată: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "deschidere \"%s\" eșuată: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Nu se poate deschide fișierul chm %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Nu s-a găsit fișierul hhc." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Semn de carte" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Program de vizualizare HTML Help(CHM) pentru Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Afișare versiune și ieșire." +#~ msgid "more than 1 argument\n" +#~ msgstr "mai mult de 1 argument\n" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "fii guraliv, repetă de 3 ori pentru a obține toate informațiile" +#~ msgid "Auto-Detect:" +#~ msgstr "Auto-Detectare:" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "fii tăcut, repetă de 2 ori pentru a elimina toate informațiile" - -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "mai mult de 1 argument\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Copiază" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "URI redirectează: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "nu se paote deschide fișierul chm: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Eroare la încărcarea fișierului '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Semn de carte" + +#~ msgid "Can't found hhc file." +#~ msgstr "Nu s-a găsit fișierul hhc." + +#~ msgid "About..." +#~ msgstr "Despre..." + +#~ msgid "Back" +#~ msgstr "Înapoi" + +#~ msgid "Forward" +#~ msgstr "Înainte" + +#~ msgid "Panel" +#~ msgstr "Panou" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Arată/Ascunde Panoul" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Universal\n" +#~ "Chineză Simplificată\n" +#~ "Chineză Tradițională\n" +#~ "Japoneză\n" +#~ "Koreană\n" +#~ "Rusă\n" +#~ "Ucrainiană" diff -Nru chmsee-1.0.7/po/ru.po chmsee-1.3.0/po/ru.po --- chmsee-1.0.7/po/ru.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/ru.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-14 21:48+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-08-11 00:08+0000\n" "Last-Translator: Dmitry Korzhenevsky \n" "Language-Team: Russian \n" @@ -17,35 +17,57 @@ "X-Launchpad-Export-Date: 2009-09-06 10:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Max Habets https://launchpad.net/~sky3\n" +" andvalb https://launchpad.net/~andvalb\n" +"\n" +"Launchpad Contributions:\n" +" Alexander Slovesnik https://launchpad.net/~unghost\n" +" Dmitry Korzhenevsky https://launchpad.net/~lynx-programist\n" +" Max Habets https://launchpad.net/~sky3\n" +" Nkolay Parukhin https://launchpad.net/~parukhin\n" +" Vadim Peretokin https://launchpad.net/~vperetokin\n" +" andvalb https://launchpad.net/~andvalb" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Просмоторщик файлов HTML Help (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Открыть файл" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Кэш" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Кодировка" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Шрифт" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "О программе" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Кэш" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "О программе..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Автоопределение:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Назад" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Кодировка" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -58,250 +80,675 @@ "ВНИМАНИЕ: Если вы просматриваете CHM файл, вам необходимо открыть его заново " "после очистки." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Копировать Page _Location" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Кодировка" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Фиксированной ширины:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Вперед" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Домой" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Обычный" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Открыть файл" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Открыть в новой _вкладке" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Панель" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Вы_делить всё" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Настройки" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Показать/скрыть панель" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Изменяемой ширины:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "Боковая _панель" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Файл" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Просмоторщик файлов HTML Help (СHM) для Unix\\Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Правка" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" -msgstr "" -"Общий\n" -"Упрощенный Китайский\n" -"Традиционный Китайский\n" -"Японский\n" -"Корейский\n" -"Русский\n" -"Украинский" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Просмотр" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Изменяемой ширины:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Справка" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Увеличить" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Уменьшить" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Открыть файл" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Назад" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Открыть файл" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Новая вкладка" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Закрыть вкладку" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Копировать" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Копировать ссылку" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Вы_делить всё" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Правка" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Файл" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Домой" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Назад" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Вперед" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Во весь экран" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Справка" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Новая вкладка" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "О программе" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Просмотр" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Увеличить" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Max Habets https://launchpad.net/~sky3\n" -" andvalb https://launchpad.net/~andvalb\n" -"\n" -"Launchpad Contributions:\n" -" Alexander Slovesnik https://launchpad.net/~unghost\n" -" Dmitry Korzhenevsky https://launchpad.net/~lynx-programist\n" -" Max Habets https://launchpad.net/~sky3\n" -" Nkolay Parukhin https://launchpad.net/~parukhin\n" -" Vadim Peretokin https://launchpad.net/~vperetokin\n" -" andvalb https://launchpad.net/~andvalb" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Обычный" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Просмоторщик файлов HTML Help (CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Уменьшить" -#: ../src/chmsee.c:506 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Перенаправление ссылки: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Во весь экран" + +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "Боковая _панель" -#: ../src/chmsee.c:671 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Файлы CHM" -#: ../src/chmsee.c:676 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Все файлы" -#: ../src/chmsee.c:1196 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Готов!" -#: ../src/chmsee.c:1253 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Не удалось открыть chm файл %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Отобразить версию и выйти" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "подробно, для вывода всей информации повторить 3 раза" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "тихо, для отключения вывода всей информации повторить 2 раза" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "О программе" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Открыть в новой _вкладке" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Копировать ссылку" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Копировать Page _Location" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Заголовок отсутствует" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Содержание" -#: ../src/chmsee.c:1267 +#: ../src/components/book.c:916 msgid "Index" msgstr "Индекс" -#: ../src/chmsee.c:1276 +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Закладки" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1440 ../src/chmsee.c:1615 -msgid "No Title" -msgstr "Заголовок отсутствует" - -#: ../src/chmsee.c:1719 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Ошибка загрузки файла '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:253 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "не могу открыть файл chm: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Не удалось открыть chm файл %s." -#: ../src/models/chmfile.c:260 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Ошибка извлечения файла chm: %s" -#: ../src/models/chmfile.c:286 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "при открытии \"%s\" ошибка: %s" -#: ../src/models/chmfile.c:336 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Не удалось открыть chm файл %s." -#: ../src/models/chmfile.c:594 -msgid "Can't found hhc file." -msgstr "Не удалось найти hhc файл." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Закладка" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Просмоторщик файлов HTML Help (СHM) для Unix\\Linux" -#: ../src/main.cpp:107 -msgid "Display the version and exit" -msgstr "Отобразить версию и выйти" +#~ msgid "more than 1 argument\n" +#~ msgstr "больше чем 1 аргумент\n" -#: ../src/main.cpp:112 -msgid "be verbose, repeat 3 times to get all info" -msgstr "подробно, для вывода всей информации повторить 3 раза" +#~ msgid "Auto-Detect:" +#~ msgstr "Автоопределение:" -#: ../src/main.cpp:117 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "тихо, для отключения вывода всей информации повторить 2 раза" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Копировать" -#: ../src/main.cpp:154 -#, c-format -msgid "more than 1 argument\n" -msgstr "больше чем 1 аргумент\n" +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Перенаправление ссылки: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "не могу открыть файл chm: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Ошибка загрузки файла '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Закладка" + +#~ msgid "Can't found hhc file." +#~ msgstr "Не удалось найти hhc файл." + +#~ msgid "About..." +#~ msgstr "О программе..." + +#~ msgid "Back" +#~ msgstr "Назад" + +#~ msgid "Forward" +#~ msgstr "Вперед" + +#~ msgid "Home" +#~ msgstr "Домой" + +#~ msgid "Panel" +#~ msgstr "Панель" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Показать/скрыть панель" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Traditional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainian" +#~ msgstr "" +#~ "Общий\n" +#~ "Упрощенный Китайский\n" +#~ "Традиционный Китайский\n" +#~ "Японский\n" +#~ "Корейский\n" +#~ "Русский\n" +#~ "Украинский" #~ msgid "_Setup" #~ msgstr "_Установить" -#~ msgid "_Home" -#~ msgstr "_Домой" - #~ msgid "" #~ "Universal\n" #~ "Simplified Chinese\n" diff -Nru chmsee-1.0.7/po/sk.po chmsee-1.3.0/po/sk.po --- chmsee-1.0.7/po/sk.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/sk.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-05-11 19:34+0000\n" "Last-Translator: Maor \n" "Language-Team: Slovak \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Maor https://launchpad.net/~martin336" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Prehliadač HTML nápovedy (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Otvoriť súbor" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Zásobník" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Znaková sada" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Písmo" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "O programe" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Zásobník" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "O programe..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Autodetekcia:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Späť" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Znaková sada" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -58,227 +71,662 @@ "UPOZORNENIE: Ak si prezeráte CHM súbor, je potrebné ho znovu otvoriť po " "vymazaní." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "_Kopírovať umiestnenie stránky" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Znaková sada" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Pevná šírka:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Dopredu" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Domov" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normálne" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Otvoriť súbor" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Otvoriť odkaz na novej kar_te" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Vybr_ať všetko" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Nastavenie" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Ukázať/Skryť Panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Premenlivá šírka:" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Prehliadač HTML Nápovedy (CHM) pre Unix/Linux" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Súbor" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Univerzálne\n" -"Zjednodušená čínština\n" -"Tradičná čínština\n" -"Japonsky\n" -"Kórejsky\n" -"Rusky\n" -"Ukrajinsky" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Upraviť" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Premenlivá šírka:" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Zobraziť" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Priblížiť" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Pomocník" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Oddialiť" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Späť" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Otvoriť súbor" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Otvoriť súbor" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Nová karta" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Zatvoriť kartu" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Kopírovať" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Kopírovať adresu odkazu" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Vybr_ať všetko" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Upraviť" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Súbor" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Domov" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Späť" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Dopredu" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Pomocník" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Nová karta" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Zobraziť" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "O programe" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Prehliadač HTML nápovedy (CHM)" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Priblížiť" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI presmerovanie: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normálne" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Oddialiť" + +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "Na _celú obrazovku" + +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Ukázať/Skryť Panel" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM Súbory" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Všetky súbory" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Pripravený!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Nemôžem otvoriť chm súbor %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Zobrazí verziu a skončí" + +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" + +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "O programe" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Otvoriť odkaz na novej kar_te" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Kopírovať adresu odkazu" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "_Kopírovať umiestnenie stránky" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Bez názvu" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Témy" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Záložky" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Bez názvu" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Chyba pri načítaní suboru '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "Nemôžem otvoriť CHM súbor: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Nemôžem otvoriť chm súbor %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Extrahovanie CHM súboru: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "otváranie \"%s\" zlyhalo: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Nemôžem otvoriť chm súbor %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Nemôžem nájsť hhc súbor." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Záložka" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Prehliadač HTML Nápovedy (CHM) pre Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Zobrazí verziu a skončí" +#~ msgid "more than 1 argument\n" +#~ msgstr "viac než 1 argument\n" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "viac než 1 argument\n" +#~ msgid "Auto-Detect:" +#~ msgstr "Autodetekcia:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "" - -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "Na _celú obrazovku" - -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Maor https://launchpad.net/~martin336" - -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" - -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopírovať" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "URI presmerovanie: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Nemôžem otvoriť CHM súbor: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Chyba pri načítaní suboru '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Záložka" + +#~ msgid "Can't found hhc file." +#~ msgstr "Nemôžem nájsť hhc súbor." + +#~ msgid "About..." +#~ msgstr "O programe..." + +#~ msgid "Back" +#~ msgstr "Späť" + +#~ msgid "Forward" +#~ msgstr "Dopredu" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Univerzálne\n" +#~ "Zjednodušená čínština\n" +#~ "Tradičná čínština\n" +#~ "Japonsky\n" +#~ "Kórejsky\n" +#~ "Rusky\n" +#~ "Ukrajinsky" diff -Nru chmsee-1.0.7/po/sv.po chmsee-1.3.0/po/sv.po --- chmsee-1.0.7/po/sv.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/sv.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-14 21:48+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-08-26 11:45+0000\n" "Last-Translator: Martin Lindhe \n" "Language-Team: Swedish \n" @@ -17,35 +17,52 @@ "X-Launchpad-Export-Date: 2009-09-06 10:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Daniel Nylander https://launchpad.net/~yeager\n" +"\n" +"Launchpad Contributions:\n" +" Daniel Nylander https://launchpad.net/~yeager\n" +" Martin Lindhe https://launchpad.net/~martin-unicorn" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML-hjälpvisare (CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Öppna fil" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cacheminne" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Teckenuppsättning" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Typsnitt" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Om" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cacheminne" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Om..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Identifiera automatiskt" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Bakåt" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Teckenuppsättning" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -57,231 +74,654 @@ "\n" "OBSERVERA: Om du visar en CHM-fil så behöver du öppna den igen efter tömning." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Kopiera sidans _sökväg" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Teckenuppsättning" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Fast bredd:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Framåt" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Hem" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Normal" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Öppna fil" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Öppna länk i ny _flik" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Panel" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Markera _allt" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Inställningar" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Visa/dölj panel" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Variabel bredd:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "Sido_panel" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Arkiv" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "HTML-hjälpvisare (CHM) för Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "R_edigera" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" -msgstr "" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Visa" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Variabel bredd:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Hjälp" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Zooma in" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Zooma ut" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Öppna fil" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Bakåt" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Öppna fil" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Ny flik" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "S_täng flik" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "_Kopiera" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Kopiera länkadress" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Markera _allt" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "R_edigera" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Arkiv" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "_Hem" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Bakåt" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "_Framåt" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "_Helskärm" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Hjälp" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Ny flik" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Om" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Visa" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Zooma in" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Daniel Nylander https://launchpad.net/~yeager\n" -"\n" -"Launchpad Contributions:\n" -" Daniel Nylander https://launchpad.net/~yeager\n" -" Martin Lindhe https://launchpad.net/~martin-unicorn" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Normal" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML-hjälpvisare (CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Zooma ut" -#: ../src/chmsee.c:506 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI omdirigering: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "_Helskärm" + +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "Sido_panel" -#: ../src/chmsee.c:671 +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM-filer" -#: ../src/chmsee.c:676 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Alla filer" -#: ../src/chmsee.c:1196 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Redo!" -#: ../src/chmsee.c:1253 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Kan inte öppna chm-fil %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Visa versionen och avsluta" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "var detaljerad, upprepa 3 gånger för att visa all information" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "var tyst, upprepa 2 gånger för att stänga av all information" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Om" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Öppna länk i ny _flik" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Kopiera länkadress" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Kopiera sidans _sökväg" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Ingen titel" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Ämnen" -#: ../src/chmsee.c:1267 +#: ../src/components/book.c:916 msgid "Index" msgstr "Översikt" -#: ../src/chmsee.c:1276 +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Bokmärken" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1440 ../src/chmsee.c:1615 -msgid "No Title" -msgstr "Ingen titel" - -#: ../src/chmsee.c:1719 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Fel vid inläsning av filen \"%s\"" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:253 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "Kan inte öppna chm-fil: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Kan inte öppna chm-fil %s." -#: ../src/models/chmfile.c:260 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Misslyckades att packa upp chm-fil: %s" -#: ../src/models/chmfile.c:286 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "Misslyckades att öppna \"%s\": %s" -#: ../src/models/chmfile.c:336 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Kan inte öppna chm-fil %s." -#: ../src/models/chmfile.c:594 -msgid "Can't found hhc file." -msgstr "Kan inte hitta hhc-fil." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Bokmärke" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "HTML-hjälpvisare (CHM) för Unix/Linux" -#: ../src/main.cpp:107 -msgid "Display the version and exit" -msgstr "Visa versionen och avsluta" +#~ msgid "more than 1 argument\n" +#~ msgstr "mer än ett argument\n" -#: ../src/main.cpp:112 -msgid "be verbose, repeat 3 times to get all info" -msgstr "var detaljerad, upprepa 3 gånger för att visa all information" +#~ msgid "Auto-Detect:" +#~ msgstr "Identifiera automatiskt" -#: ../src/main.cpp:117 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "var tyst, upprepa 2 gånger för att stänga av all information" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "_Kopiera" -#: ../src/main.cpp:154 -#, c-format -msgid "more than 1 argument\n" -msgstr "mer än ett argument\n" +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "URI omdirigering: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Kan inte öppna chm-fil: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Fel vid inläsning av filen \"%s\"" + +#~ msgid "Bookmark" +#~ msgstr "Bokmärke" + +#~ msgid "Can't found hhc file." +#~ msgstr "Kan inte hitta hhc-fil." + +#~ msgid "About..." +#~ msgstr "Om..." + +#~ msgid "Back" +#~ msgstr "Bakåt" + +#~ msgid "Forward" +#~ msgstr "Framåt" + +#~ msgid "Home" +#~ msgstr "Hem" + +#~ msgid "Panel" +#~ msgstr "Panel" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Visa/dölj panel" #~ msgid "" #~ "Universal\n" @@ -302,6 +742,3 @@ #~ msgid "_Setup" #~ msgstr "_Inställningar" - -#~ msgid "_Home" -#~ msgstr "_Hem" diff -Nru chmsee-1.0.7/po/sw.po chmsee-1.3.0/po/sw.po --- chmsee-1.0.7/po/sw.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/sw.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-04-07 16:48+0000\n" "Last-Translator: Emanuel Feruzi \n" "Language-Team: Swahili \n" @@ -17,35 +17,54 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" Emanuel Feruzi https://launchpad.net/~emanuel-feruzi\n" +"\n" +"Launchpad Contributions:\n" +" Emanuel Feruzi https://launchpad.net/~emanuel-feruzi\n" +"\n" +"Launchpad Contributions:\n" +" Emanuel Feruzi https://launchpad.net/~emanuel-feruzi" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Kiangalia cha Msaada HTML(CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Fungua Faile" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Kache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Seti Kiwambo" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Fonti" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Kuhusu" - -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Kuhusu..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Gundua Kiotomati" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Kache" -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Nyuma" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Seti Kiwambo" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -55,239 +74,668 @@ "Faili la CHM limeng'olewa ndani ya folda hili la kache, unaweza bonyeza " "kitufe cha Safisha kutoa nafasi hii ya disk" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Nakili _Mahali pa Ukurasa" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Seti Kiwambo" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Upana usibadilika" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Mbele" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Kaya" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Kawaida" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Fungua Faile" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Fungua Kiungo kweye Tabo Mpya" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Paneli" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Chagua Yote" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Usanidi" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Onyesha/Ficha Paneli" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Upana unaobadilika" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Kiangalia cha Msaada HTML(CHM) kwa Unix/Linux" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "Faili" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Kiuliwengu\n" -"Mchina wa Sasa\n" -"Mchina wa Kale\n" -"Mjapani\n" -"Mkorea\n" -"Mrusi\n" -"Myukrein" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "Hariri" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Upana unaobadilika" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "Angalia" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Tutuza" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "Msaada" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Fifiza" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "Nyuma" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Fungua Faile" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Fungua Faile" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "Tabo Mpya" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "Funga Tabo" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "Nakili" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "Nakili Mahali pa Kiungo" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Chagua Yote" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "Hariri" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "Faili" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "Nyumbani" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "Nyuma" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "Mbele" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "Msaada" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "Tabo Mpya" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "Angalia" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Kuhusu" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" Emanuel Feruzi https://launchpad.net/~emanuel-feruzi\n" -"\n" -"Launchpad Contributions:\n" -" Emanuel Feruzi https://launchpad.net/~emanuel-feruzi\n" -"\n" -"Launchpad Contributions:\n" -" Emanuel Feruzi https://launchpad.net/~emanuel-feruzi" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Tutuza" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Kiangalia cha Msaada HTML(CHM)" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Kawaida" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Badili kwelekeo wa URI: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Fifiza" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Onyesha/Ficha Paneli" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Mafaili ya CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Mafaili yote" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Tayari!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Faili %s la chm limeshishwa funguliwa." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Onyesha toleo na utoke" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "piga kelele, rudua mara 3 kupata taarifa zote" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "kuwa mkimya, rudua mara 3 kulemaza taarifa zote" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Kuhusu" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Fungua Kiungo kweye Tabo Mpya" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "Nakili Mahali pa Kiungo" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Nakili _Mahali pa Ukurasa" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Hakuna Jina" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Mada" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Maalamisho" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Hakuna Jina" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Hitilafu kwenye upakiaji was faili '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "haikuwezekana kufungua faili la chm: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Faili %s la chm limeshishwa funguliwa." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Ungoaji wa faili la chm %s umeshidikana" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "kufungua \"%s\" kumeshindikana: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Faili %s la chm limeshishwa funguliwa." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Faili la hhc halipatikani." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Alamisho" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Kiangalia cha Msaada HTML(CHM) kwa Unix/Linux" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Onyesha toleo na utoke" - -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "piga kelele, rudua mara 3 kupata taarifa zote" +#~ msgid "more than 1 argument\n" +#~ msgstr "zaidi ya agyument 1\n" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "kuwa mkimya, rudua mara 3 kulemaza taarifa zote" - -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "zaidi ya agyument 1\n" +#~ msgid "Auto-Detect:" +#~ msgstr "Gundua Kiotomati" -#~ msgid "_Home" -#~ msgstr "Nyumbani" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "Nakili" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Badili kwelekeo wa URI: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "haikuwezekana kufungua faili la chm: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Hitilafu kwenye upakiaji was faili '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Alamisho" + +#~ msgid "Can't found hhc file." +#~ msgstr "Faili la hhc halipatikani." + +#~ msgid "About..." +#~ msgstr "Kuhusu..." + +#~ msgid "Back" +#~ msgstr "Nyuma" + +#~ msgid "Forward" +#~ msgstr "Mbele" + +#~ msgid "Home" +#~ msgstr "Kaya" + +#~ msgid "Panel" +#~ msgstr "Paneli" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Kiuliwengu\n" +#~ "Mchina wa Sasa\n" +#~ "Mchina wa Kale\n" +#~ "Mjapani\n" +#~ "Mkorea\n" +#~ "Mrusi\n" +#~ "Myukrein" #~ msgid "_Setup" #~ msgstr "Usanidi" - -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "" - -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "" diff -Nru chmsee-1.0.7/po/uk.po chmsee-1.3.0/po/uk.po --- chmsee-1.0.7/po/uk.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/uk.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-05-03 02:57+0000\n" "Last-Translator: svv \n" "Language-Team: Ukrainian \n" @@ -17,256 +17,683 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:3 -msgid "Font" -msgstr "Шрифт" - -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Про" +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Про..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Автовизначення" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Назад" +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" svv https://launchpad.net/~skrypnychuk" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 +#: ../data/chmsee.desktop.in.h:1 msgid "ChmSee" msgstr "ChmSee" -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Скопіювати _розташування сторінки" - -#: ../data/chmsee.glade.h:13 -msgid "Fixed Width:" -msgstr "Фіксована ширина:" - -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Вперед" +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Оглядач довідки HTML (CHM)" -#: ../data/chmsee.glade.h:17 +#: ../data/openfile-dialog.ui.h:1 msgid "Open File" msgstr "Відкрити файл" -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Відкрити посилання у новій вк_ладці" +#: ../data/setup-window.ui.h:1 +msgid "Cache" +msgstr "" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Панель" +#: ../data/setup-window.ui.h:2 +msgid "Font" +msgstr "Шрифт" -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Вибрати _все" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Шрифт" + +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Шрифт" + +#: ../data/setup-window.ui.h:5 +msgid "" +"CHM files extracted in this cache folder, you can press Clear button to free " +"disk space.\n" +"\n" +"NOTE: If you are viewing a CHM file, you need reopen it after cleaning." +msgstr "" + +#: ../data/setup-window.ui.h:8 +msgid "Charset:" +msgstr "" + +#: ../data/setup-window.ui.h:9 +msgid "Fixed Width:" +msgstr "Фіксована ширина:" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" + +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Налаштування" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Показати/сховати панель" - -#: ../data/chmsee.glade.h:32 +#: ../data/setup-window.ui.h:12 msgid "Variable Width:" msgstr "Змінна ширина:" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Наблизити" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_Файл" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Віддалити" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "_Редагувати" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "_Назад" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Вигляд" + +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "_Довідка" + +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" + +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Відкрити файл" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Відкрити файл" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "_Нова вкладка" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "_Закрити вкладку" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "С_копіювати" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Скопіювати посилання" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Вибрати _все" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "_Редагувати" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_Файл" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "_Назад" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "В_перед" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "_Довідка" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "_Нова вкладка" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Вигляд" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Про" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Оглядач довідки HTML (CHM)" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Наблизити" + +#: ../src/chmsee.c:215 +msgid "_Normal Size" +msgstr "" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Віддалити" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "" + +#: ../src/chmsee.c:225 +#, fuzzy +msgid "Side _Pane" +msgstr "Показати/сховати панель" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "Файли CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Всі файли" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Готово!" -#: ../src/chmsee.c:1191 -msgid "Topics" -msgstr "Теми" +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Не можу відкрити chm-файл %s." -#: ../src/chmsee.c:1208 -msgid "Bookmarks" -msgstr "Закладки" +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Відобразити версію та вийти" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Без заголовка" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "" -#: ../src/chmsee.c:1649 -#, c-format -msgid "Error loading file '%s'" -msgstr "Сталася помилка при завантаженні файла '%s'" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "" -#: ../src/models/chmfile.c:322 -#, c-format -msgid "Can not open chm file %s." -msgstr "Не можу відкрити chm-файл %s." +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Про" -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Не можу знайти файл hhc." - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Закладка" +#: ../src/setup.c:132 +msgid "West European" +msgstr "" -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Відобразити версію та вийти" +#: ../src/setup.c:133 +msgid "East European" +msgstr "" -#: ../data/chmsee.glade.h:1 -msgid "Cache" +#: ../src/setup.c:134 +msgid "East Asian" msgstr "" -#: ../data/chmsee.glade.h:2 -msgid "Charset" +#: ../src/setup.c:135 +msgid "SE & SW Asian" msgstr "" -#: ../data/chmsee.glade.h:8 -msgid "" -"CHM files extracted in this cache folder, you can press Clear button to free " -"disk space.\n" -"\n" -"NOTE: If you are viewing a CHM file, you need reopen it after cleaning." +#: ../src/setup.c:136 +msgid "Middle Eastern" msgstr "" -#: ../data/chmsee.glade.h:15 -msgid "Home" +#: ../src/setup.c:137 +msgid "Unicode" msgstr "" -#: ../data/chmsee.glade.h:16 -msgid "Normal" +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" msgstr "" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" msgstr "" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Переглядач HTML-довідки (CHM) для Юнікс/Лінукс" +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/setup.c:144 +msgid "Western (MacRoman)" msgstr "" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" msgstr "" -"Launchpad Contributions:\n" -" svv https://launchpad.net/~skrypnychuk" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" msgstr "" -#: ../src/models/chmfile.c:239 +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Відкрити посилання у новій вк_ладці" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Скопіювати посилання" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Скопіювати _розташування сторінки" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Без заголовка" + +#: ../src/components/book.c:899 +msgid "Topics" +msgstr "Теми" + +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 +msgid "Bookmarks" +msgstr "Закладки" + +#: ../src/components/book.c:1019 #, c-format -msgid "cannot open chmfile: %s" +msgid "Can not find link target file at \"%s\"" msgstr "" -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Не можу відкрити chm-файл %s." + +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Не вдалося видобути файл chm: %s" -#: ../src/models/chmfile.c:272 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "" +#: ../src/models/chmfile.c:519 +#, c-format +msgid "Can not open chm file %s." +msgstr "Не можу відкрити chm-файл %s." -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Переглядач HTML-довідки (CHM) для Юнікс/Лінукс" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "" +#~ msgid "Auto-Detect:" +#~ msgstr "Автовизначення" + +#, fuzzy +#~ msgid "Copy" +#~ msgstr "С_копіювати" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "Не можу відкрити chm-файл %s." + +#~ msgid "Error loading file '%s'" +#~ msgstr "Сталася помилка при завантаженні файла '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Закладка" + +#~ msgid "Can't found hhc file." +#~ msgstr "Не можу знайти файл hhc." + +#~ msgid "About..." +#~ msgstr "Про..." + +#~ msgid "Back" +#~ msgstr "Назад" + +#~ msgid "Forward" +#~ msgstr "Вперед" + +#~ msgid "Panel" +#~ msgstr "Панель" diff -Nru chmsee-1.0.7/po/vi.po chmsee-1.3.0/po/vi.po --- chmsee-1.0.7/po/vi.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/vi.po 2011-01-16 13:48:42.000000000 +0000 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: chmsee\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2009-05-10 22:47+0800\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-06-08 13:36+0000\n" "Last-Translator: huanctv \n" "Language-Team: Vietnamese \n" @@ -17,35 +17,48 @@ "X-Launchpad-Export-Date: 2009-07-04 04:44+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "Copy text \t http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"Launchpad Contributions:\n" +" huanctv https://launchpad.net/~huanctv" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "Trình duyệt HTML Help(CHM)" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "Mở File" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "Cache" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "Charset" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "Font" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "Về CHMSee" - -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "Thông tin..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "Tự động dò:" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "Cache" -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "Trước đó" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "Charset" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -56,227 +69,666 @@ "giải phóng vùng nhớ.\n" "Lưu ý: Nếu bạn đang đọc một file CHM, bạn cần phải mở lại nó sau khi đã xóa." -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "Sao chép _vị trí trang" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "Charset" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "Cố định độ rộng:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "Phần sau đó" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "Trang chính" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "Bình thường" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "Mở File" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "Mở liên kết trong _Tab mới" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "Bảng" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "Chọ_n toàn bộ" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "Cài đặt" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "Hiện/Ẩn Bảng" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "Độ rộng thay đổi:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "Side _Pane" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "_File" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Trình duyệt HTML Help(CHM) cho Unix/Linux" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "Soạn _thảo" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" -msgstr "" -"Phổ thông\n" -"Simplified Chinese\n" -"Tradtional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainain" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "_Xem" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "Độ rộng thay đổi:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "T_rợ giúp" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "Phóng to" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "Thu nhỏ" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "Mở File" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "Trước đó" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "Mở File" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "Tab mớ_i" + +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "Đón_g Tab" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "Sao _chép" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "_Sao chép đường link" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "Chọ_n toàn bộ" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "Soạn _thảo" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "_File" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "Trang chính" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "Trước đó" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "P_hần sau" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "Toàn _màn hình" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "T_rợ giúp" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "Tab mớ_i" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "Về CHMSee" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "_Xem" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "ChmSee" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "Copy text \t http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "Phóng to" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"Launchpad Contributions:\n" -" huanctv https://launchpad.net/~huanctv" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "Bình thường" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "Trình duyệt HTML Help(CHM)" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "Thu nhỏ" -#: ../src/chmsee.c:449 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "Tự chuyển URL: \"%s\" -> \"%s\"" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "Toàn _màn hình" -#: ../src/chmsee.c:610 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "Side _Pane" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "File CHM" -#: ../src/chmsee.c:615 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "Toàn bộ File" -#: ../src/chmsee.c:1135 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "Sẵn sàng!" -#: ../src/chmsee.c:1191 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "Không thể mở file chm %s." + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "Hiển thị phiên bản và thoát" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "lặp lại 3 lần để lấy toàn bộ thông tin" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "lặp lại 2 lần để ngắt toàn bộ thông tin" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "Về CHMSee" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "Mở liên kết trong _Tab mới" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "_Sao chép đường link" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "Sao chép _vị trí trang" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "Vô đề" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "Chủ đề" -#: ../src/chmsee.c:1208 +#: ../src/components/book.c:916 +msgid "Index" +msgstr "" + +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "Đánh dấu" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1370 ../src/chmsee.c:1545 -msgid "No Title" -msgstr "Vô đề" - -#: ../src/chmsee.c:1649 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "Lỗi trong quá trình tải file '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:239 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "không thể mở file: %s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "Không thể mở file chm %s." -#: ../src/models/chmfile.c:246 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "Lỗi khi giản nén file: %s" -#: ../src/models/chmfile.c:272 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "mở \"%s\" bị lỗi: %s" -#: ../src/models/chmfile.c:322 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "Không thể mở file chm %s." -#: ../src/models/chmfile.c:580 -msgid "Can't found hhc file." -msgstr "Không tìm thấy file hhc" - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "Đánh dấu" - -#: ../src/main.cpp:88 -msgid "Display the version and exit" -msgstr "Hiển thị phiên bản và thoát" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Trình duyệt HTML Help(CHM) cho Unix/Linux" -#: ../src/main.cpp:93 -msgid "be verbose, repeat 3 times to get all info" -msgstr "lặp lại 3 lần để lấy toàn bộ thông tin" +#~ msgid "more than 1 argument\n" +#~ msgstr "nhiều hơn 1 tham số\n" -#: ../src/main.cpp:98 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "lặp lại 2 lần để ngắt toàn bộ thông tin" +#~ msgid "Auto-Detect:" +#~ msgstr "Tự động dò:" -#: ../src/main.cpp:135 -#, c-format -msgid "more than 1 argument\n" -msgstr "nhiều hơn 1 tham số\n" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "Sao _chép" + +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "Tự chuyển URL: \"%s\" -> \"%s\"" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "không thể mở file: %s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "Lỗi trong quá trình tải file '%s'" + +#~ msgid "Bookmark" +#~ msgstr "Đánh dấu" + +#~ msgid "Can't found hhc file." +#~ msgstr "Không tìm thấy file hhc" + +#~ msgid "About..." +#~ msgstr "Thông tin..." + +#~ msgid "Back" +#~ msgstr "Trước đó" + +#~ msgid "Forward" +#~ msgstr "Phần sau đó" + +#~ msgid "Panel" +#~ msgstr "Bảng" + +#~ msgid "Show/Hide Panel" +#~ msgstr "Hiện/Ẩn Bảng" + +#~ msgid "" +#~ "Universal\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" +#~ msgstr "" +#~ "Phổ thông\n" +#~ "Simplified Chinese\n" +#~ "Tradtional Chinese\n" +#~ "Japanese\n" +#~ "Korean\n" +#~ "Russian\n" +#~ "Ukrainain" diff -Nru chmsee-1.0.7/po/zh_CN.po chmsee-1.3.0/po/zh_CN.po --- chmsee-1.0.7/po/zh_CN.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/zh_CN.po 2011-01-16 13:48:42.000000000 +0000 @@ -1,51 +1,65 @@ # Simplified Chinese translation of ChmSee # This file is distributed under the same license as the chmsee package. -# Ji YongGang , 2008. +# Ji YongGang , 2010. # LI Daobing , 2009. # msgid "" msgstr "" -"Project-Id-Version: ChmSee 1.0.2\n" +"Project-Id-Version: ChmSee 1.1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-14 21:48+0800\n" -"PO-Revision-Date: 2009-08-27 03:19+0000\n" -"Last-Translator: Careone \n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" +"PO-Revision-Date: 2010-08-24 16:31+0800\n" +"Last-Translator: Ji YongGang \n" "Language-Team: szlug \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-09-06 10:48+0000\n" -"X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"翻译人员\n" +"\n" +"Launchpad Contributions:\n" +" Careone https://launchpad.net/~zzbusagain\n" +" LI Daobing https://launchpad.net/~lidaobing\n" +" zhangmiao https://launchpad.net/~mymzhang" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "ChmSee" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML Help(CHM) 文件阅读工具" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "打开文件" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "缓冲区" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "字符集" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "字体" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "关于" - -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "关于..." - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "自动检测:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "后退" +#: ../data/setup-window.ui.h:3 +msgid "Language" +msgstr "语言" + +#: ../data/setup-window.ui.h:4 +msgid "Startup" +msgstr "启动" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -56,260 +70,600 @@ "\n" "注意:假如您正在浏览 CHM 文件,清空后需要重新打开该文件。" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "ChmSee" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "拷贝页面地址(_L)" +#: ../data/setup-window.ui.h:8 +msgid "Charset:" +msgstr "字符集" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "固定宽度:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "前进" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "首页" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "原始大小" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "打开文件" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "在新标签页(_T)打开" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "加载最后打开的文件。" -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "导航栏" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "全部(_A)选择" - -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "设置" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "显示/隐藏导航栏" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "可变宽度:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "侧边栏(_P)" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "文件(_F)" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "Unix/Linux 下的 HTML Help(CHM) 阅读工具" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "编辑(_E)" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" -msgstr "" -"Copy text \t\n" -"Universal (通用)\n" -"Simplified Chinese (简体中文)\n" -"Traditional Chinese (繁体中文)\n" -"Japanese (日语)\n" -"Korean (朝鲜语)\n" -"Russian (俄语)\n" -"Ukrainian (乌克兰语)" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "查看(_V)" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "可变宽度:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "帮助(_H)" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "放大" - -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "缩小" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "打开(_O)" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "后退(_B)" +#: ../src/chmsee.c:192 +msgid "Open a file" +msgstr "打开文件" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:193 +msgid "_Recent Files" +msgstr "最近打开的文件(_R)" + +#: ../src/chmsee.c:195 +msgid "New _Tab" +msgstr "打开标签页(_T)" + +#: ../src/chmsee.c:196 msgid "_Close Tab" -msgstr "关闭(_C) Tab" +msgstr "关闭标签页(_C)" + +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "退出(_X)" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "Exit ChmSee" +msgstr "退出 ChmSee" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "复制(_C)" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "复制(_C)链接地址" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "全选(_A)" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "编辑(_E)" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "搜寻(_F)" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "文件(_F)" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "配置(_P)" + +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "配置" + +#: ../src/chmsee.c:206 +msgid "_Home" +msgstr "首页(_H)" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "回退(_B)" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "前进(_F)" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "全屏(_F)" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "上一页" + +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "下一页" + +#: ../src/chmsee.c:212 +msgid "_About" +msgstr "关于(_A)" + +#: ../src/chmsee.c:212 +msgid "About ChmSee" +msgstr "关于 ChmSee" + +#: ../src/chmsee.c:214 +msgid "Zoom _In" +msgstr "放大(_I)" + +#: ../src/chmsee.c:215 +msgid "_Normal Size" +msgstr "还原(_N)" + +#: ../src/chmsee.c:216 +msgid "Zoom _Out" +msgstr "缩小(_O)" + +#: ../src/chmsee.c:224 +msgid "Full _Screen" +msgstr "全屏(_S)" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "帮助(_H)" +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "侧边栏(_P)" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "新建(_N)标签页" +#: ../src/chmsee.c:486 +msgid "CHM Files" +msgstr "CHM 文件" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "查看(_V)" +#: ../src/chmsee.c:491 +msgid "All Files" +msgstr "所有文件" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" +#: ../src/chmsee.c:628 +msgid ")" msgstr "" -"翻译人员\n" -"\n" -"Launchpad Contributions:\n" -" Careone https://launchpad.net/~zzbusagain\n" -" Ji YongGang https://launchpad.net/~jungle-soforge-studio\n" -" LI Daobing https://launchpad.net/~lidaobing\n" -" zhangmiao https://launchpad.net/~mymzhang" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML Help(CHM) 文件阅读工具" +#: ../src/chmsee.c:802 +msgid "Ready!" +msgstr "就绪!" -#: ../src/chmsee.c:506 +#: ../src/chmsee.c:985 #, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI 重定向: \"%s\" -> \"%s\"" +msgid "Error: Can not open spectified file '%s'" +msgstr "出错: 无法打开 chm 文件 %s。" -#: ../src/chmsee.c:671 -msgid "CHM Files" -msgstr "CHM 文件" +#: ../src/main.c:220 +msgid "Display ChmSee version" +msgstr "显示版本" -#: ../src/chmsee.c:676 -msgid "All Files" -msgstr "所有文件" +#: ../src/main.c:225 +msgid "Be verbose, repeat 3 times to get all information" +msgstr "详细,重复 3 次获得全部信息" -#: ../src/chmsee.c:1196 -msgid "Ready!" -msgstr "就绪!" +#: ../src/main.c:230 +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "安静,重复 2 次关闭全部信息" + +#: ../src/setup.c:131 +msgid "Auto" +msgstr "自动" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "西欧" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "东欧" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "东亚" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "东南亚和南亚" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "中东" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "Unicode" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" -#: ../src/chmsee.c:1253 +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "简体中文 (GB2312)" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "简体中文 (GBK)" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "简体中文 (GB18030)" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "简体中文 (HZ)" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "简体中文 (ISO-2022-CN)" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "Unicode (UTF-8)" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "Unicode (UTF-16LE)" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "Unicode (UTF-16BE)" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "Unicode (UTF-32)" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "Unicode (UTF-32LE)" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "Unicode (UTF-32BE)" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "在新标签页打开(_T)" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "复制链接地址(_C)" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "复制页面地址(_L)" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "搜寻:" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "前一个" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "后一个" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "区分大小写字母" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "无标题" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "目录" -#: ../src/chmsee.c:1267 +#: ../src/components/book.c:916 msgid "Index" msgstr "索引" -#: ../src/chmsee.c:1276 +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "书签" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1440 ../src/chmsee.c:1615 -msgid "No Title" -msgstr "无标题" - -#: ../src/chmsee.c:1719 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "打开文件错误 '%s'" +msgid "Can not find link target file at \"%s\"" +msgstr "无法找到链接对应的文件 \"%s\"" -#: ../src/models/chmfile.c:253 +#: ../src/models/chmfile.c:293 #, c-format -msgid "cannot open chmfile: %s" -msgstr "无法打开 chmfile: %s" +msgid "Cannot open chmfile: %s" +msgstr "无法打开 chm 文件 %s。" -#: ../src/models/chmfile.c:260 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "解包 chmfile 失败: %s" -#: ../src/models/chmfile.c:286 +#: ../src/models/chmfile.c:328 #, c-format -msgid "open \"%s\" failed: %s" +msgid "Open \"%s\" failed: %s" msgstr "打开 \"%s\" 失败: %s" -#: ../src/models/chmfile.c:336 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "无法打开 chm 文件 %s。" -#: ../src/models/chmfile.c:594 -msgid "Can't found hhc file." -msgstr "无法找到 hhc 文件。" - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "书签" - -#: ../src/main.cpp:107 -msgid "Display the version and exit" -msgstr "显示版本并退出" - -#: ../src/main.cpp:112 -msgid "be verbose, repeat 3 times to get all info" -msgstr "详细,重复 3 次获得全部信息" - -#: ../src/main.cpp:117 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "安静,重复 2 次关闭全部信息" - -#: ../src/main.cpp:154 -#, c-format -msgid "more than 1 argument\n" -msgstr "超过 1 个参数\n" +#~ msgid "Processing... %.0f%% complete" +#~ msgstr "正在处理... %.0f%% " -#~ msgid "" -#~ "Universal\n" -#~ "Simplified Chinese\n" -#~ "Tradtional Chinese\n" -#~ "Japanese\n" -#~ "Korean\n" -#~ "Russian\n" -#~ "Ukrainain" -#~ msgstr "" -#~ "自动选择\n" -#~ "简体中文\n" -#~ "繁体中文\n" -#~ "日语\n" -#~ "朝鲜语\n" -#~ "俄语\n" -#~ "乌克兰语" +#~ msgid "Processing done. Loading..." +#~ msgstr "处理完毕。正在加载..." -#~ msgid "_Home" -#~ msgstr "首页(_H)" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "Unix/Linux 下的 HTML Help(CHM) 阅读工具" -#~ msgid "_Setup" -#~ msgstr "设置(_S)" +#~ msgid "more than 1 argument\n" +#~ msgstr "超过 1 个参数\n" diff -Nru chmsee-1.0.7/po/zh_TW.po chmsee-1.3.0/po/zh_TW.po --- chmsee-1.0.7/po/zh_TW.po 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/po/zh_TW.po 2011-01-16 13:48:42.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: chmsee 1.0.6\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-07-14 21:48+0800\n" +"POT-Creation-Date: 2011-01-16 21:47+0800\n" "PO-Revision-Date: 2009-07-14 15:36+0000\n" "Last-Translator: Wei-Lun Chao \n" "Language-Team: Chinese (traditional) \n" @@ -17,35 +17,50 @@ "X-Launchpad-Export-Date: 2009-09-06 10:48+0000\n" "X-Generator: Launchpad (build Unknown)\n" -#: ../data/chmsee.glade.h:1 +#: ../data/about-dialog.ui.h:1 +msgid "http://code.google.com/p/chmsee" +msgstr "http://code.google.com/p/chmsee" + +#. TRANSLATORS: Replace this string with your names, one name per line. +#: ../data/about-dialog.ui.h:3 +msgid "translator-credits" +msgstr "" +"趙惟倫 \n" +"\n" +"Launchpad Contributions:\n" +" Wei-Lun Chao https://launchpad.net/~chaoweilun" + +#: ../data/chmsee.desktop.in.h:1 +msgid "ChmSee" +msgstr "檢視 CHM" + +#: ../data/chmsee.desktop.in.h:2 +msgid "HTML Help(CHM) viewer" +msgstr "HTML 說明檔(CHM) 檢視器" + +#: ../data/openfile-dialog.ui.h:1 +msgid "Open File" +msgstr "開啟檔案" + +#: ../data/setup-window.ui.h:1 msgid "Cache" msgstr "快取" -#: ../data/chmsee.glade.h:2 -msgid "Charset" -msgstr "字元集" - -#: ../data/chmsee.glade.h:3 +#: ../data/setup-window.ui.h:2 msgid "Font" msgstr "字型" -#: ../data/chmsee.glade.h:4 -msgid "About" -msgstr "關於" +#: ../data/setup-window.ui.h:3 +#, fuzzy +msgid "Language" +msgstr "快取" -#: ../data/chmsee.glade.h:5 -msgid "About..." -msgstr "關於…" - -#: ../data/chmsee.glade.h:6 -msgid "Auto-Detect:" -msgstr "自動偵測:" - -#: ../data/chmsee.glade.h:7 -msgid "Back" -msgstr "向後" +#: ../data/setup-window.ui.h:4 +#, fuzzy +msgid "Startup" +msgstr "字元集" -#: ../data/chmsee.glade.h:8 +#: ../data/setup-window.ui.h:5 msgid "" "CHM files extracted in this cache folder, you can press Clear button to free " "disk space.\n" @@ -56,229 +71,652 @@ "\n" "註:如果您正在觀看 CHM 檔案,您需要在清理之後重新開啟它。" -#: ../data/chmsee.glade.h:11 ../data/chmsee.desktop.in.h:1 -msgid "ChmSee" -msgstr "檢視 CHM" - -#: ../data/chmsee.glade.h:12 -msgid "Copy Page _Location" -msgstr "複製頁面位置(_L)" +#: ../data/setup-window.ui.h:8 +#, fuzzy +msgid "Charset:" +msgstr "字元集" -#: ../data/chmsee.glade.h:13 +#: ../data/setup-window.ui.h:9 msgid "Fixed Width:" msgstr "固定寬度:" -#: ../data/chmsee.glade.h:14 -msgid "Forward" -msgstr "向前" - -#: ../data/chmsee.glade.h:15 -msgid "Home" -msgstr "首頁" - -#: ../data/chmsee.glade.h:16 -msgid "Normal" -msgstr "原始大小" - -#: ../data/chmsee.glade.h:17 -msgid "Open File" -msgstr "開啟檔案" - -#: ../data/chmsee.glade.h:18 -msgid "Open Link in New _Tab" -msgstr "在新分頁中開啟鏈結(_T)" - -#: ../data/chmsee.glade.h:19 -msgid "Panel" -msgstr "面板" - -#: ../data/chmsee.glade.h:20 -msgid "Select _All" -msgstr "全選(_A)" +#: ../data/setup-window.ui.h:10 +msgid "Load last opened file." +msgstr "" -#: ../data/chmsee.glade.h:21 +#: ../data/setup-window.ui.h:11 msgid "Setup" msgstr "設定" -#: ../data/chmsee.glade.h:22 -msgid "Show/Hide Panel" -msgstr "顯示/隱藏面板" +#: ../data/setup-window.ui.h:12 +msgid "Variable Width:" +msgstr "可變寬度:" -#: ../data/chmsee.glade.h:23 -msgid "Side _Pane" -msgstr "側邊窗格(_P)" +#: ../src/chmsee.c:187 +msgid "_File" +msgstr "檔案(_F)" -#: ../data/chmsee.glade.h:24 -msgid "The HTML Help(CHM) viewer for Unix/Linux" -msgstr "用於 Unix/Linux 的 HTML 說明檔(CHM) 檢視器" +#: ../src/chmsee.c:188 +msgid "_Edit" +msgstr "編輯(_E)" -#: ../data/chmsee.glade.h:25 -msgid "" -"Universal\n" -"Simplified Chinese\n" -"Traditional Chinese\n" -"Japanese\n" -"Korean\n" -"Russian\n" -"Ukrainian" -msgstr "" +#: ../src/chmsee.c:189 +msgid "_View" +msgstr "檢視(_V)" -#: ../data/chmsee.glade.h:32 -msgid "Variable Width:" -msgstr "可變寬度:" +#: ../src/chmsee.c:190 +msgid "_Help" +msgstr "求助(_H)" -#: ../data/chmsee.glade.h:33 -msgid "Zoom In" -msgstr "放大" +#: ../src/chmsee.c:192 +msgid "_Open" +msgstr "" -#: ../data/chmsee.glade.h:34 -msgid "Zoom Out" -msgstr "縮小" +#: ../src/chmsee.c:192 +#, fuzzy +msgid "Open a file" +msgstr "開啟檔案" -#: ../data/chmsee.glade.h:35 -msgid "_Back" -msgstr "向後(_B)" +#: ../src/chmsee.c:193 +#, fuzzy +msgid "_Recent Files" +msgstr "開啟檔案" + +#: ../src/chmsee.c:195 +#, fuzzy +msgid "New _Tab" +msgstr "新分頁(_N)" -#: ../data/chmsee.glade.h:36 +#: ../src/chmsee.c:196 msgid "_Close Tab" msgstr "關閉分頁(_C)" -#: ../data/chmsee.glade.h:37 +#: ../src/chmsee.c:197 +msgid "E_xit" +msgstr "" + +#: ../src/chmsee.c:197 +#, fuzzy +msgid "Exit ChmSee" +msgstr "檢視 CHM" + +#: ../src/chmsee.c:199 ../src/components/book.c:121 msgid "_Copy" msgstr "複製(_C)" -#: ../data/chmsee.glade.h:38 -msgid "_Copy Link Location" -msgstr "複製鏈結位置(_C)" +#: ../src/chmsee.c:200 ../src/components/book.c:126 +msgid "Select _All" +msgstr "全選(_A)" -#: ../data/chmsee.glade.h:39 -msgid "_Edit" -msgstr "編輯(_E)" +#: ../src/chmsee.c:202 +msgid "_Find" +msgstr "" -#: ../data/chmsee.glade.h:40 -msgid "_File" -msgstr "檔案(_F)" +#: ../src/chmsee.c:204 +msgid "_Preferences" +msgstr "" -#: ../data/chmsee.glade.h:41 +#: ../src/chmsee.c:204 +msgid "Preferences" +msgstr "" + +#: ../src/chmsee.c:206 +#, fuzzy +msgid "_Home" +msgstr "首頁" + +#: ../src/chmsee.c:207 ../src/components/book.c:122 +msgid "_Back" +msgstr "向後(_B)" + +#: ../src/chmsee.c:208 ../src/components/book.c:123 msgid "_Forward" msgstr "向前(_F)" -#: ../data/chmsee.glade.h:42 -msgid "_Full Screen" -msgstr "全螢幕(_F)" +#: ../src/chmsee.c:209 +msgid "_Prev" +msgstr "" -#: ../data/chmsee.glade.h:43 -msgid "_Help" -msgstr "求助(_H)" +#: ../src/chmsee.c:210 +msgid "_Next" +msgstr "" -#: ../data/chmsee.glade.h:44 -msgid "_New Tab" -msgstr "新分頁(_N)" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "_About" +msgstr "關於" -#: ../data/chmsee.glade.h:45 -msgid "_View" -msgstr "檢視(_V)" +#: ../src/chmsee.c:212 +#, fuzzy +msgid "About ChmSee" +msgstr "檢視 CHM" -#: ../data/chmsee.glade.h:46 -msgid "http://code.google.com/p/chmsee" -msgstr "http://code.google.com/p/chmsee" +#: ../src/chmsee.c:214 +#, fuzzy +msgid "Zoom _In" +msgstr "放大" -#. TRANSLATORS: Replace this string with your names, one name per line. -#: ../data/chmsee.glade.h:48 -msgid "translator-credits" -msgstr "" -"趙惟倫 \n" -"\n" -"Launchpad Contributions:\n" -" Wei-Lun Chao https://launchpad.net/~chaoweilun" +#: ../src/chmsee.c:215 +#, fuzzy +msgid "_Normal Size" +msgstr "原始大小" -#: ../data/chmsee.desktop.in.h:2 -msgid "HTML Help(CHM) viewer" -msgstr "HTML 說明檔(CHM) 檢視器" +#: ../src/chmsee.c:216 +#, fuzzy +msgid "Zoom _Out" +msgstr "縮小" -#: ../src/chmsee.c:506 -#, c-format -msgid "URI redirect: \"%s\" -> \"%s\"" -msgstr "URI 重新導向:「%s」->「%s」" +#: ../src/chmsee.c:224 +#, fuzzy +msgid "Full _Screen" +msgstr "全螢幕(_F)" -#: ../src/chmsee.c:671 +#: ../src/chmsee.c:225 +msgid "Side _Pane" +msgstr "側邊窗格(_P)" + +#: ../src/chmsee.c:486 msgid "CHM Files" msgstr "CHM 檔案" -#: ../src/chmsee.c:676 +#: ../src/chmsee.c:491 msgid "All Files" msgstr "所有檔案" -#: ../src/chmsee.c:1196 +#: ../src/chmsee.c:628 +msgid "(Build with xulrunner " +msgstr "" + +#: ../src/chmsee.c:628 +msgid ")" +msgstr "" + +#: ../src/chmsee.c:802 msgid "Ready!" msgstr "就緒!" -#: ../src/chmsee.c:1253 +#: ../src/chmsee.c:985 +#, fuzzy, c-format +msgid "Error: Can not open spectified file '%s'" +msgstr "無法開啟 chm 檔案 %s。" + +#: ../src/main.c:220 +#, fuzzy +msgid "Display ChmSee version" +msgstr "顯示版本然後離開" + +#: ../src/main.c:225 +#, fuzzy +msgid "Be verbose, repeat 3 times to get all information" +msgstr "細節模式,重複三次以取得所有資訊" + +#: ../src/main.c:230 +#, fuzzy +msgid "Be quiet, repeat 2 times to disable all information" +msgstr "安靜模式,重複兩次以停用全部資訊" + +#: ../src/setup.c:131 +#, fuzzy +msgid "Auto" +msgstr "關於" + +#: ../src/setup.c:132 +msgid "West European" +msgstr "" + +#: ../src/setup.c:133 +msgid "East European" +msgstr "" + +#: ../src/setup.c:134 +msgid "East Asian" +msgstr "" + +#: ../src/setup.c:135 +msgid "SE & SW Asian" +msgstr "" + +#: ../src/setup.c:136 +msgid "Middle Eastern" +msgstr "" + +#: ../src/setup.c:137 +msgid "Unicode" +msgstr "" + +#: ../src/setup.c:141 +msgid "Western (ISO-8859-1)" +msgstr "" + +#. index = 0 +#: ../src/setup.c:142 +msgid "Western (ISO-8859-15)" +msgstr "" + +#: ../src/setup.c:143 +msgid "Western (IBM-850)" +msgstr "" + +#: ../src/setup.c:144 +msgid "Western (MacRoman)" +msgstr "" + +#: ../src/setup.c:145 +msgid "Western (Windows-1252)" +msgstr "" + +#: ../src/setup.c:146 +msgid "Celtic (ISO-8859-14)" +msgstr "" + +#: ../src/setup.c:147 +msgid "Greek (ISO-8859-7)" +msgstr "" + +#: ../src/setup.c:148 +msgid "Greek (MacGreek)" +msgstr "" + +#: ../src/setup.c:149 +msgid "Greek (Windows-1253)" +msgstr "" + +#: ../src/setup.c:150 +msgid "Icelandic (MacIcelandic)" +msgstr "" + +#: ../src/setup.c:151 +msgid "Nordic (ISO-8859-10)" +msgstr "" + +#: ../src/setup.c:152 +msgid "South European (ISO-8859-3)" +msgstr "" + +#: ../src/setup.c:153 +msgid "Baltic (ISO-8859-4)" +msgstr "" + +#. index = 12 +#: ../src/setup.c:154 +msgid "Baltic (ISO-8859-13)" +msgstr "" + +#: ../src/setup.c:155 +msgid "Baltic (Windows-1257)" +msgstr "" + +#: ../src/setup.c:156 +msgid "Central European (IBM-852)" +msgstr "" + +#: ../src/setup.c:157 +msgid "Central European (ISO-8859-2)" +msgstr "" + +#: ../src/setup.c:158 +msgid "Central European (MacCE)" +msgstr "" + +#: ../src/setup.c:159 +msgid "Central European (Windows-1250)" +msgstr "" + +#: ../src/setup.c:160 +msgid "Croatian (MacCroatian)" +msgstr "" + +#: ../src/setup.c:161 +msgid "Cyrillic (IBM-855)" +msgstr "" + +#: ../src/setup.c:162 +msgid "Cyrillic (ISO-8895-5)" +msgstr "" + +#: ../src/setup.c:163 +msgid "Cyrillic (ISO-IR-111)" +msgstr "" + +#: ../src/setup.c:164 +msgid "Cyrillic (KOI8-R)" +msgstr "" + +#: ../src/setup.c:165 +msgid "Cyrillic (MacCyrillic)" +msgstr "" + +#: ../src/setup.c:166 +msgid "Cyrillic (Windows-1251)" +msgstr "" + +#: ../src/setup.c:167 +msgid "Cyrillic/Russian (CP-866)" +msgstr "" + +#: ../src/setup.c:168 +msgid "Cyrillic/Ukrainian (KOI8-U)" +msgstr "" + +#: ../src/setup.c:169 +msgid "Romanian (ISO-8859-16)" +msgstr "" + +#: ../src/setup.c:170 +msgid "Romanian (MacRomanian)" +msgstr "" + +#: ../src/setup.c:171 +msgid "Chinese Simplified (GB2312)" +msgstr "" + +#. index = 30 +#: ../src/setup.c:172 +msgid "Chinese Simplified (GBK)" +msgstr "" + +#: ../src/setup.c:173 +msgid "Chinese Simplified (GB18030)" +msgstr "" + +#: ../src/setup.c:174 +msgid "Chinese Simplified (HZ)" +msgstr "" + +#: ../src/setup.c:175 +msgid "Chinese Simplified (ISO-2022-CN)" +msgstr "" + +#: ../src/setup.c:176 +msgid "Chinese Traditional (Big5)" +msgstr "" + +#: ../src/setup.c:177 +msgid "Chinese Traditional (Big5-HKSCS)" +msgstr "" + +#: ../src/setup.c:178 +msgid "Chinese Traditional (EUC-TW)" +msgstr "" + +#: ../src/setup.c:179 +msgid "Japanese (EUC-JP)" +msgstr "" + +#: ../src/setup.c:180 +msgid "Japanese (ISO-2022-JP)" +msgstr "" + +#: ../src/setup.c:181 +msgid "Japanese (Shift_JIS)" +msgstr "" + +#: ../src/setup.c:182 +msgid "Korean (EUC-KR)" +msgstr "" + +#: ../src/setup.c:183 +msgid "Korean (UHC)" +msgstr "" + +#: ../src/setup.c:184 +msgid "Korean (JOHAB)" +msgstr "" + +#: ../src/setup.c:185 +msgid "Korean (ISO-2022-KR)" +msgstr "" + +#: ../src/setup.c:186 +msgid "Armenian (ARMSCII-8)" +msgstr "" + +#. index = 45 +#: ../src/setup.c:187 +msgid "Georgian (GEOSTD8)" +msgstr "" + +#: ../src/setup.c:188 +msgid "Thai (TIS-620)" +msgstr "" + +#: ../src/setup.c:189 +msgid "Thai (ISO-8859-11)" +msgstr "" + +#: ../src/setup.c:190 +msgid "Thai (Windows-874)" +msgstr "" + +#: ../src/setup.c:191 +msgid "Thai (IBM-874)" +msgstr "" + +#: ../src/setup.c:192 +msgid "Turkish (IBM-857)" +msgstr "" + +#: ../src/setup.c:193 +msgid "Turkish (ISO-8859-9)" +msgstr "" + +#: ../src/setup.c:194 +msgid "Turkish (MacTurkish)" +msgstr "" + +#: ../src/setup.c:195 +msgid "Turkish (Windows-1254)" +msgstr "" + +#: ../src/setup.c:196 +msgid "Vietnamese (TCVN)" +msgstr "" + +#: ../src/setup.c:197 +msgid "Vietnamese (VISCII)" +msgstr "" + +#: ../src/setup.c:198 +msgid "Vietnamese (VPS)" +msgstr "" + +#: ../src/setup.c:199 +msgid "Vietnamese (Windows-1258)" +msgstr "" + +#: ../src/setup.c:200 +msgid "Hindi (MacDevanagari)" +msgstr "" + +#: ../src/setup.c:201 +msgid "Gujarati (MacGujarati)" +msgstr "" + +#: ../src/setup.c:202 +msgid "Gurmukhi (MacGurmukhi)" +msgstr "" + +#: ../src/setup.c:203 +msgid "Arabic (ISO-8859-6)" +msgstr "" + +#. index = 62 +#: ../src/setup.c:204 +msgid "Arabic (Windows-1256)" +msgstr "" + +#: ../src/setup.c:205 +msgid "Arabic (IBM-864)" +msgstr "" + +#: ../src/setup.c:206 +msgid "Arabic (MacArabic)" +msgstr "" + +#: ../src/setup.c:207 +msgid "Farsi (MacFarsi)" +msgstr "" + +#: ../src/setup.c:208 +msgid "Hebrew (ISO-8859-8-I)" +msgstr "" + +#: ../src/setup.c:209 +msgid "Hebrew (Windows-1255)" +msgstr "" + +#: ../src/setup.c:210 +msgid "Hebrew Visual (ISO-8859-8)" +msgstr "" + +#: ../src/setup.c:211 +msgid "Hebrew (IBM-862)" +msgstr "" + +#: ../src/setup.c:212 +msgid "Hebrew (MacHebrew)" +msgstr "" + +#: ../src/setup.c:213 +msgid "Unicode (UTF-8)" +msgstr "" + +#. index = 72 +#: ../src/setup.c:214 +msgid "Unicode (UTF-16LE)" +msgstr "" + +#: ../src/setup.c:215 +msgid "Unicode (UTF-16BE)" +msgstr "" + +#: ../src/setup.c:216 +msgid "Unicode (UTF-32)" +msgstr "" + +#: ../src/setup.c:217 +msgid "Unicode (UTF-32LE)" +msgstr "" + +#: ../src/setup.c:218 +msgid "Unicode (UTF-32BE)" +msgstr "" + +#: ../src/components/book.c:124 +msgid "Open Link in New _Tab" +msgstr "在新分頁中開啟鏈結(_T)" + +#: ../src/components/book.c:125 +msgid "_Copy Link Location" +msgstr "複製鏈結位置(_C)" + +#: ../src/components/book.c:127 +msgid "Copy Page _Location" +msgstr "複製頁面位置(_L)" + +#: ../src/components/book.c:246 +msgid "Find:" +msgstr "" + +#: ../src/components/book.c:261 +msgid "Previous" +msgstr "" + +#: ../src/components/book.c:271 +msgid "Next" +msgstr "" + +#: ../src/components/book.c:281 +msgid "Match case" +msgstr "" + +#. customized label, add a close button rightmost +#: ../src/components/book.c:464 ../src/components/book.c:710 +#: ../src/models/parser.c:180 +msgid "No Title" +msgstr "無標題" + +#: ../src/components/book.c:899 msgid "Topics" msgstr "主題" -#: ../src/chmsee.c:1267 +#: ../src/components/book.c:916 msgid "Index" msgstr "索引" -#: ../src/chmsee.c:1276 +#: ../src/components/book.c:932 msgid "Bookmarks" msgstr "書籤" -#. Custom label widget, with a close button -#: ../src/chmsee.c:1440 ../src/chmsee.c:1615 -msgid "No Title" -msgstr "無標題" - -#: ../src/chmsee.c:1719 +#: ../src/components/book.c:1019 #, c-format -msgid "Error loading file '%s'" -msgstr "載入檔案「%s」時發生錯誤" +msgid "Can not find link target file at \"%s\"" +msgstr "" -#: ../src/models/chmfile.c:253 -#, c-format -msgid "cannot open chmfile: %s" -msgstr "無法開啟 chm 檔案:%s" +#: ../src/models/chmfile.c:293 +#, fuzzy, c-format +msgid "Cannot open chmfile: %s" +msgstr "無法開啟 chm 檔案 %s。" -#: ../src/models/chmfile.c:260 +#: ../src/models/chmfile.c:303 #, c-format msgid "Extract chmfile failed: %s" msgstr "擷取 chm 檔案時失敗:%s" -#: ../src/models/chmfile.c:286 -#, c-format -msgid "open \"%s\" failed: %s" +#: ../src/models/chmfile.c:328 +#, fuzzy, c-format +msgid "Open \"%s\" failed: %s" msgstr "開啟「%s」時失敗:%s" -#: ../src/models/chmfile.c:336 +#: ../src/models/chmfile.c:519 #, c-format msgid "Can not open chm file %s." msgstr "無法開啟 chm 檔案 %s。" -#: ../src/models/chmfile.c:594 -msgid "Can't found hhc file." -msgstr "無法找到 hhc 檔案。" - -#: ../src/ui_bookmarks.c:315 -msgid "Bookmark" -msgstr "加入書籤" +#~ msgid "The HTML Help(CHM) viewer for Unix/Linux" +#~ msgstr "用於 Unix/Linux 的 HTML 說明檔(CHM) 檢視器" -#: ../src/main.cpp:107 -msgid "Display the version and exit" -msgstr "顯示版本然後離開" +#~ msgid "more than 1 argument\n" +#~ msgstr "多於一項引數\n" -#: ../src/main.cpp:112 -msgid "be verbose, repeat 3 times to get all info" -msgstr "細節模式,重複三次以取得所有資訊" +#~ msgid "Auto-Detect:" +#~ msgstr "自動偵測:" -#: ../src/main.cpp:117 -msgid "be quiet, repeat 2 times to disable all info" -msgstr "安靜模式,重複兩次以停用全部資訊" +#, fuzzy +#~ msgid "Copy" +#~ msgstr "複製(_C)" -#: ../src/main.cpp:154 -#, c-format -msgid "more than 1 argument\n" -msgstr "多於一項引數\n" +#, fuzzy +#~ msgid "CS_BOOK >>> URI redirect: \"%s\" -> \"%s\"" +#~ msgstr "URI 重新導向:「%s」->「%s」" + +#, fuzzy +#~ msgid "CS_CHMFILE >>> cannot open chmfile: %s" +#~ msgstr "無法開啟 chm 檔案:%s" + +#~ msgid "Error loading file '%s'" +#~ msgstr "載入檔案「%s」時發生錯誤" + +#~ msgid "Bookmark" +#~ msgstr "加入書籤" + +#~ msgid "Can't found hhc file." +#~ msgstr "無法找到 hhc 檔案。" + +#~ msgid "About..." +#~ msgstr "關於…" + +#~ msgid "Back" +#~ msgstr "向後" + +#~ msgid "Forward" +#~ msgstr "向前" + +#~ msgid "Panel" +#~ msgstr "面板" + +#~ msgid "Show/Hide Panel" +#~ msgstr "顯示/隱藏面板" #~ msgid "" #~ "Universal\n" diff -Nru chmsee-1.0.7/.project chmsee-1.3.0/.project --- chmsee-1.0.7/.project 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/.project 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ - - - chmsee - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.cnature - - diff -Nru chmsee-1.0.7/README chmsee-1.3.0/README --- chmsee-1.0.7/README 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/README 2011-01-16 13:48:42.000000000 +0000 @@ -1,38 +1,51 @@ +Introduction +============ + ChmSee is an HTML Help viewer for Unix/Linux. It is based on CHMLIB -and use GTK+ as frontend toolkit. Because of using gecko as HTML +and use GTK+ as its frontend toolkit. Because of using gecko HTML rendering engine, ChmSee can support rich features of modern HTML -page, such as CSS and JavaScript. +page, specially CSS. Homepage: http://code.google.com/p/chmsee - Dependencies ============ -Compile ChmSee from source you need following packages: - * cmake >= 2.6 - * libgtk2.0-dev >= 2.8 - * libglade2-dev >= 2.4 - * xulrunner-dev >= 1.9 < 1.9.1 - * libchm-dev - * libgcrypt-dev +To compile ChmSee from source, the following packages should have been +installed and met their version on your system: + + * cmake >= 2.8 + * gtk2 >= 2.20 + * xulrunner >= 1.9 + * chmlib >= 0.39 + * libxml2 + * libgcrypt Installation ============ -$ cd chmsee-$VERSION -$ cmake . +$ tar xzf chmsee-$VERSION.tar.gz +$ mkdir build +$ cd build +$ cmake ../chmsee-$VERSION $ make -$ make install +# make install + +Source code repository +====================== + +You can use git command below to retrive develping ChmSee code: + +$ git clone git://github.com/jungleji/chmsee.git Report bug ========== -If you find any problem, please file this bug in +If you encounter any ChmSee problem, please report them to http://code.google.com/p/chmsee/issues/entry, thanks. -Help translation -================ +About ChmSee logo +================= -please view the following site: -https://translations.launchpad.net/chmsee/trunk/+pots/chmsee +ChmSee logo comes from Open Clip Art Library. The author is AJ Ashton. +http://www.openclipart.org/detail/17922 diff -Nru chmsee-1.0.7/src/booktree.c chmsee-1.3.0/src/booktree.c --- chmsee-1.0.7/src/booktree.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/booktree.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,473 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "booktree.h" - -#include "models/hhc.h" -#include "utils/utils.h" - -#define selfp (self->priv) - -static void booktree_dispose(GObject *); -static void booktree_finalize(GObject *); - -static void booktree_selection_changed_cb(GtkTreeSelection *, BookTree *); - -static void booktree_create_pixbufs(BookTree *); -static void booktree_add_columns(BookTree *); -static void booktree_setup_selection(BookTree *); -static void booktree_populate_tree(BookTree *); -static void booktree_insert_node(BookTree *, GNode *, GtkTreeIter *); -static void on_row_activated(BookTree* self, GtkTreePath* path); - -typedef struct { - GdkPixbuf *pixbuf_opened; - GdkPixbuf *pixbuf_closed; - GdkPixbuf *pixbuf_doc; -} BookTreePixbufs; - -typedef struct { - const gchar *uri; - gboolean found; - GtkTreeIter iter; - GtkTreePath *path; -} FindURIData; - -struct _BookTreePrivate { - GtkTreeStore *store; - BookTreePixbufs *pixbufs; - Hhc *link_tree; -}; - -/* Signals */ -enum { - LINK_SELECTED, - LAST_SIGNAL -}; - -enum { - COL_OPEN_PIXBUF, - COL_CLOSED_PIXBUF, - COL_TITLE, - COL_LINK, - N_COLUMNS -}; - -static gint signals[LAST_SIGNAL] = { 0 }; - -#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), TYPE_BOOKTREE, BookTreePrivate)) - -G_DEFINE_TYPE (BookTree, booktree, GTK_TYPE_TREE_VIEW); - -static void -booktree_class_init(BookTreeClass *klass) -{ - GObjectClass *object_class; - g_type_class_add_private(klass, sizeof(BookTreePrivate)); - - object_class = (GObjectClass *)klass; - - object_class->dispose = booktree_dispose; - object_class->finalize = booktree_finalize; - - signals[LINK_SELECTED] = - g_signal_new ("link_selected", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (BookTreeClass, link_selected), - NULL, - NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, - 1, - G_TYPE_POINTER); -} - -static void -booktree_init(BookTree *self) -{ - self->priv = GET_PRIVATE(self); - selfp->store = gtk_tree_store_new(N_COLUMNS, - GDK_TYPE_PIXBUF, - GDK_TYPE_PIXBUF, - G_TYPE_STRING, - G_TYPE_POINTER); - gtk_tree_view_set_model(GTK_TREE_VIEW (self), - GTK_TREE_MODEL (selfp->store)); - gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (self), FALSE); - gtk_tree_view_set_enable_search(GTK_TREE_VIEW(self), TRUE); - - booktree_create_pixbufs(self); - booktree_add_columns(self); - booktree_setup_selection(self); - - g_signal_connect(G_OBJECT(self), - "row-activated", - G_CALLBACK(on_row_activated), - NULL); -} - -static void -booktree_dispose(GObject* object) { - BookTree* self = BOOKTREE(object); - - if(selfp->store) { - g_object_unref(selfp->store); - selfp->store = NULL; - } - - if(selfp->pixbufs->pixbuf_opened) { - g_object_unref(selfp->pixbufs->pixbuf_opened); - selfp->pixbufs->pixbuf_opened = NULL; - } - - if(selfp->pixbufs->pixbuf_closed) { - g_object_unref(selfp->pixbufs->pixbuf_closed); - selfp->pixbufs->pixbuf_closed = NULL; - } - - if(selfp->pixbufs->pixbuf_doc) { - g_object_unref(selfp->pixbufs->pixbuf_doc); - selfp->pixbufs->pixbuf_doc = NULL; - } -} - -static void -booktree_finalize(GObject *object) -{ - BookTree *self; - - self = BOOKTREE (object); - - g_free(selfp->pixbufs); - - G_OBJECT_CLASS (booktree_parent_class)->finalize(object); -} - -/* internal functions */ - -static void -booktree_create_pixbufs(BookTree *self) -{ - BookTreePixbufs *pixbufs; - - pixbufs = g_new0(BookTreePixbufs, 1); - - pixbufs->pixbuf_closed = gdk_pixbuf_new_from_file(get_resource_path("book-closed.png"), NULL); - pixbufs->pixbuf_opened = gdk_pixbuf_new_from_file(get_resource_path("book-open.png"), NULL); - pixbufs->pixbuf_doc = gdk_pixbuf_new_from_file(get_resource_path("helpdoc.png"), NULL); - - selfp->pixbufs = pixbufs; -} - -static void -booktree_add_columns(BookTree *tree) -{ - GtkCellRenderer *cell; - GtkTreeViewColumn *column; - - column = gtk_tree_view_column_new(); - - cell = gtk_cell_renderer_pixbuf_new(); - gtk_tree_view_column_pack_start(column, cell, FALSE); - gtk_tree_view_column_set_attributes( - column, - cell, - "pixbuf", COL_OPEN_PIXBUF, - "pixbuf-expander-open", COL_OPEN_PIXBUF, - "pixbuf-expander-closed", COL_CLOSED_PIXBUF, - NULL); - - cell = gtk_cell_renderer_text_new(); - g_object_set(cell, - "ellipsize", PANGO_ELLIPSIZE_END, - NULL); - gtk_tree_view_column_pack_start(column, cell, TRUE); - gtk_tree_view_column_set_attributes(column, cell, - "text", COL_TITLE, - NULL); - - gtk_tree_view_append_column(GTK_TREE_VIEW (tree), column); -} - -static void -booktree_setup_selection(BookTree *tree) -{ - GtkTreeSelection *selection; - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (tree)); - gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE); - - g_signal_connect(selection, - "changed", - G_CALLBACK (booktree_selection_changed_cb), - tree); -} - -static void -booktree_populate_tree(BookTree *self) -{ - GNode *node; - - for (node = g_node_first_child(selfp->link_tree); - node; - node = g_node_next_sibling(node)) - { - booktree_insert_node(self, node, NULL); - } -} - -static void -booktree_insert_node(BookTree *self, GNode *node, GtkTreeIter *parent_iter) -{ - GtkTreeIter iter; - Link *link; - GNode *child; - - link = node->data; - - if (g_node_n_children(node)) - link_change_type(link, LINK_TYPE_BOOK); - - gtk_tree_store_append(selfp->store, &iter, parent_iter); - -/* d(g_debug("insert node::name = %s", link->name)); */ -/* d(g_debug("insert node::uri = %s", link->uri)); */ - - if (link->type == LINK_TYPE_BOOK) { - gtk_tree_store_set(selfp->store, &iter, - COL_OPEN_PIXBUF, selfp->pixbufs->pixbuf_opened, - COL_CLOSED_PIXBUF, selfp->pixbufs->pixbuf_closed, - COL_TITLE, link->name, - COL_LINK, link, - -1); - } else { - gtk_tree_store_set(selfp->store, &iter, - COL_OPEN_PIXBUF, selfp->pixbufs->pixbuf_doc, - COL_CLOSED_PIXBUF, selfp->pixbufs->pixbuf_doc, - COL_TITLE, link->name, - COL_LINK, link, - -1); - } - - for (child = g_node_first_child(node); - child; - child = g_node_next_sibling(child)) { - booktree_insert_node(self, child, &iter); - } -} - -static gboolean -booktree_find_uri_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, FindURIData *data) -{ - Link *link; - - gtk_tree_model_get(model, iter, COL_LINK, &link, -1); - - if (g_str_has_suffix(data->uri, link->uri)) { - g_debug("data->uri: %s", data->uri); - g_debug("link->uri: %s", link->uri); - - data->found = TRUE; - data->iter = *iter; - data->path = gtk_tree_path_copy(path); - } - - return data->found; -} - -static gboolean -booktree_find_name_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, FindURIData *data) -{ - Link *link; - - gtk_tree_model_get(model, iter, COL_LINK, &link, -1); - - if (g_strcmp0(data->uri, link->name) == 0) { - data->found = TRUE; - data->iter = *iter; - data->path = gtk_tree_path_copy(path); - } - - return data->found; -} - - -/* callbacks */ - -static void -booktree_selection_changed_cb(GtkTreeSelection *selection, BookTree *self) -{ - GtkTreeIter iter; - Link *link; - - if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { - gtk_tree_model_get(GTK_TREE_MODEL (selfp->store), - &iter, COL_LINK, &link, -1); - - g_debug("book tree emiting '%s'\n", link->uri); - - g_signal_emit(self, signals[LINK_SELECTED], 0, link); - } -} - -/* external functions */ - -GtkWidget * -booktree_new(GNode *link_tree) -{ - BookTree *self; - - self = g_object_new(TYPE_BOOKTREE, NULL); - - selfp->link_tree = link_tree; - - booktree_populate_tree(self); - - return GTK_WIDGET (self); -} - -void booktree_set_model(BookTree* self, GNode* model) { - g_object_unref(selfp->store); - selfp->store = gtk_tree_store_new(N_COLUMNS, - GDK_TYPE_PIXBUF, - GDK_TYPE_PIXBUF, - G_TYPE_STRING, - G_TYPE_POINTER); - gtk_tree_view_set_model(GTK_TREE_VIEW (self), - GTK_TREE_MODEL (selfp->store)); - - - selfp->link_tree = model; - booktree_populate_tree(self); -} - - -void -booktree_select_uri(BookTree *self, const gchar *uri) -{ - GtkTreeSelection *selection; - FindURIData data; - gchar *real_uri; - - g_return_if_fail(IS_BOOKTREE (self)); - - real_uri = get_real_uri(uri); - - data.found = FALSE; - data.uri = real_uri; - - gtk_tree_model_foreach(GTK_TREE_MODEL (selfp->store), - (GtkTreeModelForeachFunc) booktree_find_uri_foreach, - &data); - - if (!data.found) { - g_debug("booktree select uri: cannot found data"); - return; - } - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (self)); - - g_signal_handlers_block_by_func(selection, - booktree_selection_changed_cb, - self); - - gtk_tree_view_expand_to_path(GTK_TREE_VIEW (self), data.path); - gtk_tree_selection_select_iter(selection, &data.iter); - gtk_tree_view_set_cursor(GTK_TREE_VIEW (self), data.path, NULL, 0); - - g_signal_handlers_unblock_by_func(selection, - booktree_selection_changed_cb, - self); - - gtk_tree_path_free(data.path); - g_free(real_uri); -} - -const gchar * -booktree_get_selected_book_title(BookTree *tree) -{ - GtkTreeSelection *selection; - GtkTreeModel *model; - GtkTreeIter iter; - GtkTreePath *path; - Link *link; - - g_return_val_if_fail(IS_BOOKTREE (tree), NULL); - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (tree)); - - if (!gtk_tree_selection_get_selected(selection, &model, &iter)) - return NULL; - - path = gtk_tree_model_get_path(model, &iter); - - /* Get the book node for this link. */ - while (gtk_tree_path_get_depth(path) > 1) - gtk_tree_path_up(path); - - gtk_tree_model_get_iter(model, &iter, path); - gtk_tree_path_free(path); - - gtk_tree_model_get(model, &iter, - COL_LINK, &link, - -1); - - return link->name; -} - -void on_row_activated(BookTree* self, GtkTreePath* path) { - g_return_if_fail(IS_BOOKTREE(self)); - if(gtk_tree_view_row_expanded(GTK_TREE_VIEW(self), path)) { - gtk_tree_view_collapse_row(GTK_TREE_VIEW(self), path); - } else { - gtk_tree_view_expand_row(GTK_TREE_VIEW(self), path, FALSE); - } -} - -gboolean booktree_select_link_by_name(BookTree* self, const gchar* name) { - GtkTreeSelection *selection; - FindURIData data; - - g_return_val_if_fail(IS_BOOKTREE (self), FALSE); - - data.found = FALSE; - data.uri = name; - - gtk_tree_model_foreach(GTK_TREE_MODEL (selfp->store), - (GtkTreeModelForeachFunc) booktree_find_name_foreach, - &data); - - if (!data.found) { - g_debug("booktree select uri: cannot found data"); - return FALSE; - } - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (self)); - - gtk_tree_view_expand_to_path(GTK_TREE_VIEW (self), data.path); - gtk_tree_selection_select_iter(selection, &data.iter); - gtk_tree_view_set_cursor(GTK_TREE_VIEW (self), data.path, NULL, 0); - - gtk_tree_path_free(data.path); - return TRUE; -} - diff -Nru chmsee-1.0.7/src/booktree.h chmsee-1.3.0/src/booktree.h --- chmsee-1.0.7/src/booktree.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/booktree.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __CHMSEE_BOOKTREE_H__ -#define __CHMSEE_BOOKTREE_H__ - -#include -#include - -#include "models/link.h" - -#define TYPE_BOOKTREE \ - (booktree_get_type()) -#define BOOKTREE(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_BOOKTREE, BookTree)) -#define BOOKTREE_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_BOOKTREE, BookTreeClass)) -#define IS_BOOKTREE(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_BOOKTREE)) -#define IS_BOOKTREE_CLASS(k) \ - (G_TYPE_CHECK_CLASS_TYPE ((o), TYPE_BOOKTREE)) - - -typedef struct _BookTree BookTree; -typedef struct _BookTreePrivate BookTreePrivate; -typedef struct _BookTreeClass BookTreeClass; - -struct _BookTree { - GtkTreeView parent; - BookTreePrivate* priv; -}; - -struct _BookTreeClass { - GtkTreeViewClass parent_class; - - /* Signals */ - void (*link_selected) (BookTree *booktree, Link *link); -}; - -GType booktree_get_type(void); - -GtkWidget* booktree_new(GNode* model); -void booktree_set_model(BookTree* self, GNode* model); - -void booktree_select_uri(BookTree *, const gchar *); -const gchar *booktree_get_selected_book_title(BookTree *); - -/** - * @return true if successful. else return false. - */ -gboolean booktree_select_link_by_name(BookTree* self, const gchar* name); - -#endif /* !__BOOKTREE_H__ */ diff -Nru chmsee-1.0.7/src/chmsee.c chmsee-1.3.0/src/chmsee.c --- chmsee-1.0.7/src/chmsee.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/chmsee.c 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * Copyright (C) 2009 LI Daobing * * ChmSee is free software; you can redistribute it and/or modify @@ -29,528 +29,459 @@ ***************************************************************************/ #include "config.h" -#include "chmsee.h" #include #include #include #include -#include /* R_OK */ - #include #include #include -#include -#include "ihtml.h" -#include "html-factory.h" -#include "booktree.h" -#include "ui_bookmarks.h" -#include "ui_index.h" -#include "ui_chmfile.h" +#include "chmsee.h" #include "setup.h" #include "link.h" -#include "utils/utils.h" +#include "utils.h" +#include "components/book.h" +#include "components/html-gecko.h" +#include "models/chmfile.h" + +typedef struct _ChmseePrivate ChmseePrivate; + +struct _ChmseePrivate { + GtkWidget *menubar; + GtkWidget *toolbar; + GtkWidget *book; + GtkWidget *statusbar; + + CsChmfile *chmfile; + CsConfig *config; + + GtkActionGroup *action_group; + GtkUIManager *ui_manager; + guint scid_default; -#include "models/chmfile-factory.h" + gint state; /* see enum CHMSEE_STATE_* */ +}; enum { - CHMSEE_STATE_INIT, /* init state, no book is loaded */ - CHMSEE_STATE_LOADING, /* loading state, don't pop up an error window when open homepage failed */ - CHMSEE_STATE_NORMAL /* normal state, one book is loaded */ + CHMSEE_STATE_INIT, /* init state, no book is loaded */ + CHMSEE_STATE_LOADING, /* loading state, don't pop up an error window when open homepage failed */ + CHMSEE_STATE_NORMAL /* normal state, one book is loaded */ }; -struct _ChmSeePrivate { - GtkWidget* menubar; - GtkWidget* toolbar; - GtkWidget* ui_chmfile; - GtkWidget *statusbar; - - - GtkActionGroup* action_group; - GtkUIManager* ui_manager; - guint scid_default; - - gboolean has_toc; - gboolean has_index; - gint pos_x; - gint pos_y; - gint width; - gint height; - gint hpaned_position; - gint lang; - gboolean fullscreen; - gboolean expect_fullscreen; - - ChmseeIchmfile *book; - - gchar *home; - gchar *cache_dir; - gchar *last_dir; - gchar* context_menu_link; - gint state; /* see enum CHMSEE_STATE_* */ +static const GtkTargetEntry view_drop_targets[] = { + { "text/uri-list", 0, 0 } }; +static const char *ui_description = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; +#define CHMSEE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHMSEE_TYPE, ChmseePrivate)) -#define selfp (self->priv) -#define CHMSEE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_CHMSEE, ChmSeePrivate)) - +static void chmsee_class_init(ChmseeClass *); +static void chmsee_init(Chmsee *); static void chmsee_finalize(GObject *); -static void chmsee_dispose(GObject* self); -static void chmsee_load_config(ChmSee *self); -static void chmsee_save_config(ChmSee *self); -static void chmsee_set_fullscreen(ChmSee* self, gboolean fullscreen); - -static gboolean delete_cb(GtkWidget *, GdkEvent *, ChmSee *); -static void destroy_cb(GtkWidget *, ChmSee *); -static gboolean on_configure_event(GtkWidget *, GdkEventConfigure *, ChmSee *); +static void chmsee_dispose(GObject *); + +static gboolean delete_cb(GtkWidget *, GdkEvent *, Chmsee *); +static gboolean window_state_event_cb(Chmsee *, GdkEventWindowState *); +static gboolean configure_event_cb(GtkWidget *, GdkEventConfigure *, Chmsee *); +static void book_model_changed_cb(Chmsee *, CsChmfile *, const gchar *); +static void book_html_changed_cb(Chmsee *, CsBook *); +static void book_message_notify_cb(Chmsee *, GParamSpec *, CsBook *); -static void open_response_cb(GtkWidget *, gint, ChmSee *); +static void open_file_response_cb(GtkWidget *, gint, Chmsee *); static void about_response_cb(GtkDialog *, gint, gpointer); -static void show_sidepane(ChmSee* self); -static void hide_sidepane(ChmSee* self); -static void set_sidepane_state(ChmSee* self, gboolean state); - -static void on_keyboard_escape(GtkWidget*, ChmSee* self); -static void on_open(GtkWidget *, ChmSee *); -static void on_setup(GtkWidget *, ChmSee *); -static void on_copy(GtkWidget *, ChmSee *); -static void on_copy_page_location(GtkWidget*, ChmSee*); -static void on_select_all(GtkWidget *, ChmSee *); -static void on_back(GtkWidget *, ChmSee *); -static void on_forward(GtkWidget *, ChmSee *); -static void on_home(GtkWidget *, ChmSee *); -static void on_zoom_in(GtkWidget *, ChmSee *); -static void on_zoom_reset(GtkWidget *, ChmSee *); -static void on_zoom_out(GtkWidget *, ChmSee *); -static void on_about(GtkWidget *); -static void on_open_new_tab(GtkWidget *, ChmSee *); -static void on_close_current_tab(GtkWidget *, ChmSee *); -static void on_context_new_tab(GtkWidget *, ChmSee *); -static void on_context_copy_link(GtkWidget *, ChmSee *); -static void on_fullscreen_toggled(GtkWidget*, ChmSee* self); -static void on_sidepane_toggled(GtkWidget*, ChmSee* self); -static void on_map(ChmSee* self); -static gboolean on_window_state_event(ChmSee* self, GdkEventWindowState* event); -static gboolean on_scroll_event(ChmSee* self, GdkEventScroll* event); - -static void on_ui_chmfile_model_changed(ChmSee* self, ChmseeIchmfile* chm_file); -static void on_ui_chmfile_html_changed(ChmSee* self, ChmseeIhtml* html); -static void on_ui_chmfile_html_link_message_notify(ChmSee* self, GParamSpec* pspec, ChmseeUiChmfile* ui_chmfile); - -static void chmsee_quit(ChmSee *); -static void chmsee_open_uri(ChmSee *chmsee, const gchar *uri); -static void chmsee_open_file(ChmSee *self, const gchar *filename); -static GtkWidget *get_widget(ChmSee *, gchar *); -static void populate_window(ChmSee *); -static void new_tab(ChmSee *, const gchar *); -static ChmseeIhtml *get_active_html(ChmSee *); -static void reload_current_page(ChmSee *); -static void update_status_bar(ChmSee *, const gchar *); -static void -chmsee_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *selection_data, - guint info, - guint time); -/* static gchar *context_menu_link = NULL; */ -static const GtkTargetEntry view_drop_targets[] = { - { "text/uri-list", 0, 0 } -}; +static void on_open_file(GtkAction *, Chmsee *); +static void on_recent_files(GtkRecentChooser *, Chmsee *); +static void on_open_new_tab(GtkAction *, Chmsee *); +static void on_close_current_tab(GtkAction *, Chmsee *); + +static void on_quit(GtkAction *, Chmsee *); +static void on_menu_file(GtkAction *, Chmsee *); +static void on_menu_edit(GtkAction *, Chmsee *); +static void on_home(GtkAction *, Chmsee *); +static void on_back(GtkAction *, Chmsee *); +static void on_forward(GtkAction *, Chmsee *); +static void on_prev(GtkAction *, Chmsee *); +static void on_next(GtkAction *, Chmsee *); +static void on_zoom_in(GtkAction *, Chmsee *); +static void on_zoom_reset(GtkAction *, Chmsee *); +static void on_zoom_out(GtkAction *, Chmsee *); +static void on_setup(GtkAction *, Chmsee *); +static void on_about(GtkAction *); +static void on_copy(GtkAction *, Chmsee *); +static void on_select_all(GtkAction *, Chmsee *); +static void on_find(GtkAction *, Chmsee *); +static void on_keyboard_escape(GtkAction *, Chmsee *); +static void on_fullscreen_toggled(GtkToggleAction *, Chmsee *); +static void on_sidepane_toggled(GtkToggleAction *, Chmsee *); + +static void populate_windows(Chmsee *); +static void set_fullscreen(Chmsee *, gboolean); +static void set_sidepane_state(Chmsee *, gboolean); +static void open_draged_file(Chmsee *, const gchar *); +static void drag_data_received(GtkWidget *, GdkDragContext *, gint, gint, + GtkSelectionData *, guint, guint); +static void update_status_bar(Chmsee *, const gchar *); /* Normal items */ static const GtkActionEntry entries[] = { - { "FileMenu", NULL, "_File" }, - { "EditMenu", NULL, "_Edit" }, - { "ViewMenu", NULL, "_View" }, - { "HelpMenu", NULL, "_Help" }, - - { "Open", GTK_STOCK_OPEN, "_Open", "O", "Open a file", G_CALLBACK(on_open)}, - { "NewTab", NULL, "_New Tab", "T", NULL, G_CALLBACK(on_open_new_tab)}, - { "CloseTab", NULL, "_Close Tab", "W", NULL, G_CALLBACK(on_close_current_tab)}, - { "Exit", GTK_STOCK_QUIT, "E_xit", "Q", "Exit the program", G_CALLBACK(destroy_cb)}, - - { "Copy", GTK_STOCK_COPY, "_Copy", "C", NULL, G_CALLBACK(on_copy)}, - { "Preferences", GTK_STOCK_PREFERENCES, "_Preferences", NULL, NULL, G_CALLBACK(on_setup)}, - - { "Home", GTK_STOCK_HOME, "_Home", NULL, NULL, G_CALLBACK(on_home)}, - { "Back", GTK_STOCK_GO_BACK, "_Back", "Left", NULL, G_CALLBACK(on_back)}, - { "Forward", GTK_STOCK_GO_FORWARD, "_Forward", "Right", NULL, G_CALLBACK(on_forward)}, - - { "About", GTK_STOCK_ABOUT, "_About", NULL, NULL, G_CALLBACK(on_about)}, - - { "ZoomIn", GTK_STOCK_ZOOM_IN, "Zoom _In", "plus", NULL, G_CALLBACK(on_zoom_in)}, - { "ZoomReset", GTK_STOCK_ZOOM_100, "Normal Size", "0", NULL, G_CALLBACK(on_zoom_reset)}, - { "ZoomOut", GTK_STOCK_ZOOM_OUT, "Zoom _Out", "minus", NULL, G_CALLBACK(on_zoom_out)}, - - { "OpenLinkInNewTab", NULL, "Open Link in New _Tab", NULL, NULL, G_CALLBACK(on_context_new_tab)}, - { "CopyLinkLocation", NULL, "_Copy Link Location", NULL, NULL, G_CALLBACK(on_context_copy_link)}, - { "SelectAll", NULL, "Select _All", NULL, NULL, G_CALLBACK(on_select_all)}, - { "CopyPageLocation", NULL, "Copy Page _Location", NULL, NULL, G_CALLBACK(on_copy_page_location)}, + { "FileMenu", NULL, N_("_File"), NULL, NULL, G_CALLBACK(on_menu_file) }, + { "EditMenu", NULL, N_("_Edit"), NULL, NULL, G_CALLBACK(on_menu_edit) }, + { "ViewMenu", NULL, N_("_View") }, + { "HelpMenu", NULL, N_("_Help") }, + + { "Open", GTK_STOCK_OPEN, N_("_Open"), "O", N_("Open a file"), G_CALLBACK(on_open_file)}, + { "RecentFiles", NULL, N_("_Recent Files"), NULL, NULL, NULL}, + + { "NewTab", NULL, N_("New _Tab"), "T", NULL, G_CALLBACK(on_open_new_tab)}, + { "CloseTab", NULL, N_("_Close Tab"), "W", NULL, G_CALLBACK(on_close_current_tab)}, + { "Exit", GTK_STOCK_QUIT, N_("E_xit"), "Q", N_("Exit ChmSee"), G_CALLBACK(on_quit)}, + + { "Copy", NULL, N_("_Copy"), NULL, NULL, G_CALLBACK(on_copy)}, + { "SelectAll", NULL, N_("Select _All"), NULL, NULL, G_CALLBACK(on_select_all)}, + + { "Find", GTK_STOCK_FIND, N_("_Find"), "F", NULL, G_CALLBACK(on_find)}, + + { "Preferences", GTK_STOCK_PREFERENCES, N_("_Preferences"), NULL, N_("Preferences"), G_CALLBACK(on_setup)}, - { "OnKeyboardEscape", NULL, NULL, "Escape", NULL, G_CALLBACK(on_keyboard_escape)}, - { "OnKeyboardControlEqual", NULL, NULL, "equal", NULL, G_CALLBACK(on_zoom_in)} + { "Home", GTK_STOCK_HOME, N_("_Home"), NULL, NULL, G_CALLBACK(on_home)}, + { "Back", GTK_STOCK_GO_BACK, N_("_Back"), "Left", NULL, G_CALLBACK(on_back)}, + { "Forward", GTK_STOCK_GO_FORWARD, N_("_Forward"), "Right", NULL, G_CALLBACK(on_forward)}, + { "Prev", GTK_STOCK_GO_UP, N_("_Prev"), "Up", NULL, G_CALLBACK(on_prev)}, + { "Next", GTK_STOCK_GO_DOWN, N_("_Next"), "Down", NULL, G_CALLBACK(on_next)}, + + { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, N_("About ChmSee"), G_CALLBACK(on_about)}, + + { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _In"), "plus", NULL, G_CALLBACK(on_zoom_in)}, + { "ZoomReset", GTK_STOCK_ZOOM_100, N_("_Normal Size"), "0", NULL, G_CALLBACK(on_zoom_reset)}, + { "ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "minus", NULL, G_CALLBACK(on_zoom_out)}, + + { "OnKeyboardEscape", NULL, NULL, "Escape", NULL, G_CALLBACK(on_keyboard_escape)}, + { "OnKeyboardControlEqual", NULL, NULL, "equal", NULL, G_CALLBACK(on_zoom_in)} }; /* Toggle items */ static const GtkToggleActionEntry toggle_entries[] = { - { "FullScreen", NULL, "_Full Screen", "F11", "Switch between full screen and windowed mode", G_CALLBACK(on_fullscreen_toggled), FALSE }, - { "SidePane", NULL, "Side _Pane", "F9", NULL, G_CALLBACK(on_sidepane_toggled), TRUE } + { "FullScreen", NULL, N_("Full _Screen"), "F11", "Switch between fullscreen and window mode", G_CALLBACK(on_fullscreen_toggled), FALSE }, + { "SidePane", NULL, N_("Side _Pane"), "F9", NULL, G_CALLBACK(on_sidepane_toggled), FALSE } }; /* Radio items */ static const GtkRadioActionEntry radio_entries[] = { }; -static const char *ui_description = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - "" - "" - ""; - - -G_DEFINE_TYPE (ChmSee, chmsee, GTK_TYPE_WINDOW); - -static void -chmsee_class_init(ChmSeeClass *klass) -{ - g_type_class_add_private(klass, sizeof(ChmSeePrivate)); - G_OBJECT_CLASS(klass)->finalize = chmsee_finalize; - G_OBJECT_CLASS(klass)->dispose = chmsee_dispose; - GTK_WIDGET_CLASS(klass)->drag_data_received = chmsee_drag_data_received; -} - -static void -chmsee_init(ChmSee* self) -{ - self->priv = CHMSEE_GET_PRIVATE(self); - selfp->home = g_build_filename(g_get_home_dir(), ".chmsee", NULL); - - g_debug("chmsee home = %s", selfp->home); - - if (!g_file_test(selfp->home, G_FILE_TEST_IS_DIR)) - mkdir(selfp->home, 0777); - - selfp->cache_dir = g_build_filename(selfp->home, "bookshelf", NULL); - - if (!g_file_test(selfp->cache_dir, G_FILE_TEST_IS_DIR)) - mkdir(selfp->cache_dir, 0777); - - selfp->lang = 0; - selfp->last_dir = g_strdup(g_get_home_dir()); - selfp->context_menu_link = NULL; - - selfp->book = NULL; - selfp->pos_x = -100; - selfp->pos_y = -100; - selfp->width = 0; - selfp->height = 0; - selfp->hpaned_position = -1; - selfp->has_toc = FALSE; - selfp->has_index = FALSE; - selfp->fullscreen = FALSE; - selfp->expect_fullscreen = FALSE; - selfp->state = CHMSEE_STATE_INIT; - - gtk_widget_add_events(GTK_WIDGET(self), - GDK_STRUCTURE_MASK | GDK_BUTTON_PRESS_MASK ); - - g_signal_connect(G_OBJECT(self), - "scroll-event", - G_CALLBACK(on_scroll_event), - NULL); - g_signal_connect(G_OBJECT(self), - "map", - G_CALLBACK(on_map), - NULL); - g_signal_connect(G_OBJECT(self), - "window-state-event", - G_CALLBACK(on_window_state_event), - NULL); - gtk_drag_dest_set (GTK_WIDGET (self), - GTK_DEST_DEFAULT_ALL, - view_drop_targets, - G_N_ELEMENTS (view_drop_targets), - GDK_ACTION_COPY); - /* Quit event handle */ - g_signal_connect(G_OBJECT (self), - "delete_event", - G_CALLBACK (delete_cb), - self); - g_signal_connect(G_OBJECT (self), - "destroy", - G_CALLBACK (destroy_cb), - self); - - /* Widget size changed event handle */ - g_signal_connect(G_OBJECT (self), - "configure-event", - G_CALLBACK (on_configure_event), - self); - - /* Init gecko */ - chmsee_html_init_system(); - chmsee_html_set_default_lang(selfp->lang); - - populate_window(self); - chmsee_load_config(self); - if (selfp->pos_x >= 0 && selfp->pos_y >= 0) - gtk_window_move(GTK_WINDOW (self), selfp->pos_x, selfp->pos_y); - - if (selfp->width > 0 && selfp->height > 0) - gtk_window_resize(GTK_WINDOW (self), selfp->width, selfp->height); - else - gtk_window_resize(GTK_WINDOW (self), 800, 600); +static const gchar *active_actions[] = { + "NewTab", "CloseTab", "SelectAll", "Home", "Find", "SidePane", + "ZoomIn", "ZoomOut", "ZoomReset", "Back", "Forward", "Prev", "Next", + "" +}; + +/* GObject functions */ + +G_DEFINE_TYPE (Chmsee, chmsee, GTK_TYPE_WINDOW); - gtk_window_set_title(GTK_WINDOW (self), "ChmSee"); - gtk_window_set_icon_from_file(GTK_WINDOW (self), get_resource_path("chmsee-icon.png"), NULL); +static void +chmsee_class_init(ChmseeClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private(klass, sizeof(ChmseePrivate)); + + object_class->finalize = chmsee_finalize; + object_class->dispose = chmsee_dispose; + GTK_WIDGET_CLASS(klass)->drag_data_received = drag_data_received; } static void -chmsee_finalize(GObject *object) +chmsee_init(Chmsee *self) { - ChmSee* self = CHMSEE(object); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + + priv->chmfile = NULL; + priv->config = NULL; + priv->state = CHMSEE_STATE_INIT; + + gtk_widget_add_events(GTK_WIDGET(self), + GDK_STRUCTURE_MASK | GDK_BUTTON_PRESS_MASK); - if(selfp->home) { - g_free(selfp->home); - selfp->home = NULL; - } + g_signal_connect(G_OBJECT (self), + "window-state-event", + G_CALLBACK (window_state_event_cb), + NULL); - if(selfp->cache_dir) { - g_free(selfp->cache_dir); - selfp->cache_dir = NULL; - } + gtk_drag_dest_set(GTK_WIDGET (self), + GTK_DEST_DEFAULT_ALL, + view_drop_targets, + G_N_ELEMENTS (view_drop_targets), + GDK_ACTION_COPY); + + /* quit event handle */ + g_signal_connect(G_OBJECT (self), + "delete-event", + G_CALLBACK (delete_cb), + self); - if(selfp->last_dir) { - g_free(selfp->last_dir); - selfp->last_dir = NULL; - } + /* start up html render engine */ + if(!cs_html_gecko_init_system()) { + g_error("Initialize html render engine failed!"); + exit(1); + } - g_free(selfp->context_menu_link); - selfp->context_menu_link = NULL; - G_OBJECT_CLASS (chmsee_parent_class)->finalize (object); + populate_windows(self); } -static void chmsee_dispose(GObject* gobject) +static void +chmsee_dispose(GObject *gobject) { - ChmSee* self = CHMSEE(gobject); + g_debug("Chmsee >>> dispose"); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (CHMSEE (gobject)); + + if (priv->chmfile != NULL) { + /* save last opened page */ + const gchar *bookfolder = cs_chmfile_get_bookfolder(priv->chmfile); + gchar *location = cs_book_get_location(CS_BOOK (priv->book)); + gchar *page = g_strrstr(location, bookfolder); - if(selfp->book) { - g_object_unref(selfp->book); - selfp->book = NULL; - } + if (page != NULL) { + page = page + strlen(bookfolder); + gchar *last_file = g_strdup_printf("%s::%s", priv->config->last_file, page); + g_free(priv->config->last_file); + priv->config->last_file = last_file; + } - if(selfp->action_group) { - g_object_unref(selfp->action_group); - selfp->action_group = NULL; - } + g_free(location); - if(selfp->ui_manager) { - g_object_unref(selfp->ui_manager); - selfp->ui_manager = NULL; - } + g_object_unref(priv->chmfile); + priv->chmfile = NULL; + } - G_OBJECT_CLASS(chmsee_parent_class)->dispose(gobject); + if (priv->action_group != NULL) { + g_object_unref(priv->action_group); + g_object_unref(priv->ui_manager); + priv->action_group = NULL; + priv->ui_manager = NULL; + } + + G_OBJECT_CLASS (chmsee_parent_class)->dispose(gobject); } +static void +chmsee_finalize(GObject *object) +{ + g_debug("Chmsee >>> finalize"); + + G_OBJECT_CLASS (chmsee_parent_class)->finalize (object); +} -/* callbacks */ +/* Callbacks */ static gboolean -delete_cb(GtkWidget *widget, GdkEvent *event, ChmSee *chmsee) +delete_cb(GtkWidget *widget, GdkEvent *event, Chmsee *self) { - g_message("window delete"); - return FALSE; + g_debug("Chmsee >>> window delete"); + on_quit(NULL, self); + return TRUE; } -static void -destroy_cb(GtkWidget *widget, ChmSee *chmsee) +static gboolean +window_state_event_cb(Chmsee *self, GdkEventWindowState *event) { - chmsee_quit(chmsee); + g_return_val_if_fail(IS_CHMSEE (self), FALSE); + g_return_val_if_fail(event->type == GDK_WINDOW_STATE, FALSE); + + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + + g_debug("Chmsee >>> on_window_state_event with event->changed_mask = %d and event->new_window_state = %d", + event->changed_mask, + event->new_window_state + ); + + if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) { + if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) { + if (priv->config->fullscreen) { + priv->config->fullscreen = TRUE; + gtk_widget_hide(priv->menubar); + gtk_widget_hide(priv->toolbar); + gtk_widget_hide(priv->statusbar); + } else { + g_warning("expect not fullscreen but got a fullscreen event, restored"); + set_fullscreen(self, FALSE); + return TRUE; + } + } else { + if (!priv->config->fullscreen) { + priv->config->fullscreen = FALSE; + gtk_widget_show(priv->menubar); + gtk_widget_show(priv->toolbar); + gtk_widget_show(priv->statusbar); + } else { + g_warning("expect fullscreen but got an unfullscreen event, restored"); + set_fullscreen(self, TRUE); + return TRUE; + } + } + } + + return FALSE; } static gboolean -on_configure_event(GtkWidget *widget, GdkEventConfigure *event, ChmSee *self) +configure_event_cb(GtkWidget *widget, GdkEventConfigure *event, Chmsee *self) { - if (event->width != selfp->width || event->height != selfp->height) { - reload_current_page(self); - } + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - if(!selfp->fullscreen) { - selfp->width = event->width; - selfp->height = event->height; - selfp->pos_x = event->x; - selfp->pos_y = event->y; + if (!priv->config->fullscreen) { + priv->config->width = event->width; + priv->config->height = event->height; + priv->config->pos_x = event->x; + priv->config->pos_y = event->y; } return FALSE; } static void -open_response_cb(GtkWidget *widget, gint response_id, ChmSee *chmsee) +book_model_changed_cb(Chmsee *self, CsChmfile *chmfile, const gchar *filename) { - gchar *filename = NULL; - - if (response_id == GTK_RESPONSE_OK) - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (widget)); - - gtk_widget_destroy(widget); + g_debug("Chmsee >>> receive book model changed callback %s", filename); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + gboolean has_model = (chmfile != NULL); + + gint n = 0; + while (strlen(active_actions[n])) { + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, active_actions[n++]), has_model); + } - if (filename != NULL) - chmsee_open_file(chmsee, filename); + gtk_widget_set_sensitive(priv->book, has_model); - g_free(filename); + if (filename + && g_str_has_prefix(filename, "file://") + && (g_str_has_suffix(filename, ".chm") || g_str_has_suffix(filename, ".CHM"))) { + open_draged_file(self, filename); + } } -#if 0 -static gboolean -html_open_uri_cb(ChmseeIhtml* html, const gchar *uri, ChmSee *self) +static void +book_html_changed_cb(Chmsee *self, CsBook *book) { - g_debug("enter html_open_uri_cb with uri = %s", uri); - static const char* prefix = "file://"; - static int prefix_len = 7; - - if(g_str_has_prefix(uri, prefix)) { - /* FIXME: can't disable the DND function of GtkMozEmbed */ - if(g_str_has_suffix(uri, ".chm") - || g_str_has_suffix(uri, ".CHM")) { - chmsee_open_uri(self, uri); - } - - if(g_access(uri+prefix_len, R_OK) < 0) { - g_debug("%s:%d:html_open_uri_cb:%s does not exist", __FILE__, __LINE__, uri+prefix_len); - gchar* newfname = correct_filename(uri+prefix_len); - if(newfname) { - g_message(_("URI redirect: \"%s\" -> \"%s\""), uri, newfname); - chmsee_ihtml_open_uri(html, newfname); - g_free(newfname); - return TRUE; - } + g_debug("Chmsee >>> recieve html_changed signal"); - if(selfp->state == CHMSEE_STATE_LOADING) { - return TRUE; - } - } - } + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - if ((html == get_active_html(self)) && selfp->has_toc) - booktree_select_uri(BOOKTREE (selfp->booktree), uri); - - return FALSE; + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Home"), + cs_book_has_homepage(book)); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Back"), + cs_book_can_go_back(book)); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Forward"), + cs_book_can_go_forward(book)); } -#endif -#if 0 -/* Popup html context menu */ static void -html_context_normal_cb(ChmseeIhtml *html, ChmSee *self) +book_message_notify_cb(Chmsee *self, GParamSpec *pspec, CsBook *book) { - g_message("html context-normal event"); - gtk_menu_popup(GTK_MENU(gtk_ui_manager_get_widget(selfp->ui_manager, "/HtmlContextNormal")), - NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); + gchar *message; + g_object_get(book, "book-message", &message, NULL); + + update_status_bar(self, message); + g_free(message); } -/* Popup html context menu when mouse over hyper link */ static void -html_context_link_cb(ChmseeIhtml *html, const gchar *link, ChmSee* self) +open_file_response_cb(GtkWidget *widget, gint response_id, Chmsee *self) { - g_debug("html context-link event: %s", link); - chmsee_set_context_menu_link(self, link); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "OpenLinkInNewTab"), - g_str_has_prefix(selfp->context_menu_link, "file://")); + gchar *filename = NULL; - gtk_menu_popup(GTK_MENU(gtk_ui_manager_get_widget(selfp->ui_manager, "/HtmlContextLink")), - NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); + if (response_id == GTK_RESPONSE_OK) + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (widget)); + gtk_widget_destroy(widget); + + if (filename != NULL) { + chmsee_open_file(self, filename); + g_free(filename); + } } -#endif -#if 0 -static void -html_link_message_cb(ChmseeIhtml *html, const gchar *url, ChmSee *chmsee) -{ - update_status_bar(chmsee, url); -} -#endif /* Toolbar button events */ static void -on_open(GtkWidget *widget, ChmSee *self) +on_open_file(GtkAction *action, Chmsee *self) { - GladeXML *glade; - GtkWidget *dialog; - GtkFileFilter *filter; + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + + /* create open file dialog */ + GtkBuilder *builder = gtk_builder_new(); + gtk_builder_add_from_file(builder, RESOURCE_FILE ("openfile-dialog.ui"), NULL); - /* create openfile dialog */ - glade = glade_xml_new(get_resource_path(GLADE_FILE), "openfile_dialog", NULL); - dialog = glade_xml_get_widget(glade, "openfile_dialog"); + GtkWidget *dialog = BUILDER_WIDGET (builder, "openfile_dialog"); g_signal_connect(G_OBJECT (dialog), "response", - G_CALLBACK (open_response_cb), + G_CALLBACK (open_file_response_cb), self); - /* File list fiter */ + /* file list fiter */ + GtkFileFilter *filter; filter = gtk_file_filter_new(); gtk_file_filter_set_name(filter, _("CHM Files")); gtk_file_filter_add_pattern(filter, "*.[cC][hH][mM]"); @@ -561,95 +492,115 @@ gtk_file_filter_add_pattern(filter, "*"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filter); - /* Previous opened folder */ - if (selfp->last_dir) { - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), selfp->last_dir); + /* previous opened file folder */ + gchar *last_dir = NULL; + if (priv->config->last_file) { + last_dir = g_path_get_dirname(priv->config->last_file); + } else { + last_dir = g_strdup(g_get_home_dir()); + } + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), last_dir); + g_free(last_dir); + + g_object_unref(G_OBJECT (builder)); +} + +static void +on_recent_files(GtkRecentChooser *chooser, Chmsee *self) +{ + gchar *uri = gtk_recent_chooser_get_current_uri(chooser); + + if (uri != NULL) { + gchar *filename = g_filename_from_uri(uri, NULL, NULL); + + chmsee_open_file(self, filename); + g_free(filename); + g_free(uri); } +} - g_object_unref(glade); +static void +on_copy(GtkAction *action, Chmsee *self) +{ + cs_book_copy(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_copy(GtkWidget *widget, ChmSee *self) +on_select_all(GtkAction *action, Chmsee *self) { - g_debug("On Copy"); - chmsee_ihtml_copy_selection(get_active_html(self)); + cs_book_select_all(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_copy_page_location(GtkWidget* widget, ChmSee* chmsee) { - ChmseeIhtml* html = get_active_html(chmsee); - const gchar* location = chmsee_ihtml_get_location(html); - if(!location) return; +on_setup(GtkAction *action, Chmsee *self) +{ + setup_window_new(self); +} - gtk_clipboard_set_text( - gtk_clipboard_get(GDK_SELECTION_PRIMARY), - location, - -1); - gtk_clipboard_set_text( - gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), - location, - -1); +static void +on_back(GtkAction *action, Chmsee *self) +{ + cs_book_go_back(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_select_all(GtkWidget *widget, ChmSee *self) +on_forward(GtkAction *action, Chmsee *self) { - ChmseeIhtml *html; - g_message("On Select All"); - html = get_active_html(self); - chmsee_ihtml_select_all(html); + cs_book_go_forward(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_setup(GtkWidget *widget, ChmSee *chmsee) +on_prev(GtkAction *action, Chmsee *self) { - setup_window_new(chmsee); + cs_book_go_prev(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_back(GtkWidget *widget, ChmSee *chmsee) +on_next(GtkAction *action, Chmsee *self) { - chmsee_ihtml_go_back(get_active_html(chmsee)); + cs_book_go_next(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_forward(GtkWidget *widget, ChmSee *chmsee) +on_menu_file(GtkAction *action, Chmsee *self) { - chmsee_ihtml_go_forward(get_active_html(chmsee)); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "CloseTab"), + cs_book_can_close_tab(CS_BOOK (priv->book))); +} + +static void +on_menu_edit(GtkAction *action, Chmsee *self) +{ + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Copy"), + cs_book_can_copy(CS_BOOK (priv->book))); } static void -on_home(GtkWidget *widget, ChmSee *self) +on_home(GtkAction *action, Chmsee *self) { - if (chmsee_ichmfile_get_home(selfp->book) != NULL) { - /* TODO: - * open_homepage(self); */ - } + cs_book_homepage(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_zoom_in(GtkWidget *widget, ChmSee *self) +on_zoom_in(GtkAction *action, Chmsee *self) { - ChmseeIhtml* html = get_active_html(self); - if(html != NULL) { - chmsee_ihtml_increase_size(html); - } + cs_book_zoom_in(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_zoom_reset(GtkWidget *widget, ChmSee *chmsee) +on_zoom_out(GtkAction *action, Chmsee *self) { - chmsee_ihtml_reset_size(get_active_html(chmsee)); + cs_book_zoom_out(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_zoom_out(GtkWidget *widget, ChmSee *self) +on_zoom_reset(GtkAction *action, Chmsee *self) { - ChmseeIhtml* html = get_active_html(self); - if(html != NULL) { - chmsee_ihtml_decrease_size(html); - } + cs_book_zoom_reset(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void @@ -660,13 +611,12 @@ } static void -on_about(GtkWidget *widget) +on_about(GtkAction *action) { - GladeXML *glade; - GtkWidget *dialog; + GtkBuilder *builder = gtk_builder_new(); + gtk_builder_add_from_file(builder, RESOURCE_FILE ("about-dialog.ui"), NULL); - glade = glade_xml_new(get_resource_path(GLADE_FILE), "about_dialog", NULL); - dialog = glade_xml_get_widget(glade, "about_dialog"); + GtkWidget *dialog = BUILDER_WIDGET (builder, "about_dialog"); g_signal_connect(G_OBJECT (dialog), "response", @@ -674,293 +624,357 @@ NULL); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG (dialog), PACKAGE_VERSION); + gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG (dialog), + _("(Build with xulrunner " XULRUNNER_VERSION ")")); - g_object_unref(glade); + g_object_unref(builder); } static void -on_open_new_tab(GtkWidget *widget, ChmSee *self) +on_open_new_tab(GtkAction *action, Chmsee *self) { - ChmseeIhtml *html; - const gchar *location; + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - g_message("Open new tab"); - - html = get_active_html(self); - location = chmsee_ihtml_get_location(html); - - if (location != NULL) { - new_tab(self, location); - } + gchar *location = cs_book_get_location(CS_BOOK (priv->book)); + cs_book_new_tab_with_fulluri(CS_BOOK (priv->book), location); + g_free(location); } static void -on_context_new_tab(GtkWidget *widget, ChmSee *self) +on_close_current_tab(GtkAction *action, Chmsee *self) { - g_debug("On context open new tab: %s", selfp->context_menu_link); - - if (selfp->context_menu_link != NULL) { - new_tab(self, selfp->context_menu_link); - } + cs_book_close_current_tab(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } static void -on_context_copy_link(GtkWidget *widget, ChmSee *self) +on_keyboard_escape(GtkAction *action, Chmsee *self) { - g_debug("On context copy link: %s", selfp->context_menu_link); - - if (selfp->context_menu_link != NULL) { - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), - selfp->context_menu_link, -1); - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), - selfp->context_menu_link, -1); - } + cs_book_findbar_hide(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } - -/* internal functions */ - static void -chmsee_quit(ChmSee *self) +on_fullscreen_toggled(GtkToggleAction *action, Chmsee *self) { - chmsee_save_config(self); + set_fullscreen(self, gtk_toggle_action_get_active(action)); +} - if(get_active_html(self)) { - chmsee_ihtml_shutdown(get_active_html(self)); - } +static void +on_sidepane_toggled(GtkToggleAction *action, Chmsee *self) +{ + set_sidepane_state(self, gtk_toggle_action_get_active(action)); +} - gtk_main_quit(); +static void +on_find(GtkAction *action, Chmsee *self) +{ + cs_book_findbar_show(CS_BOOK (CHMSEE_GET_PRIVATE (self)->book)); } -static GtkWidget * -get_widget(ChmSee *chmsee, gchar *widget_name) +/* internal functions */ + +static void +on_quit(GtkAction *action, Chmsee *self) { - GladeXML *glade; - GtkWidget *widget; + g_message("Chmsee >>> quit"); - glade = g_object_get_data(G_OBJECT (chmsee), "glade"); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - widget = GTK_WIDGET (glade_xml_get_widget(glade, widget_name)); + cs_html_gecko_shutdown_system(); + priv->config->hpaned_pos = cs_book_get_hpaned_position(CS_BOOK (priv->book)); + gtk_widget_destroy(GTK_WIDGET (self)); - return widget; + gtk_main_quit(); } static void -populate_window(ChmSee *self) +drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, + GtkSelectionData *selection_data, guint info, guint time) { - GtkWidget* vbox = gtk_vbox_new(FALSE, 0); - - GladeXML *glade; + gchar **uris; - glade = glade_xml_new(get_resource_path(GLADE_FILE), "main_vbox", NULL); - - if (glade == NULL) { - g_error("Cannot find glade file!"); - exit(1); + uris = gtk_selection_data_get_uris(selection_data); + if (uris == NULL) { + gtk_drag_finish(context, FALSE, FALSE, time); + return; } - g_object_set_data(G_OBJECT (self), "glade", glade); - - GtkWidget *main_vbox; - main_vbox = get_widget(self, "main_vbox"); - gtk_container_add(GTK_CONTAINER (self), vbox); - - GtkActionGroup* action_group = gtk_action_group_new ("MenuActions"); - selfp->action_group = action_group; - gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), self); - gtk_action_group_add_toggle_actions (action_group, toggle_entries, G_N_ELEMENTS (toggle_entries), self); - - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "NewTab"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "CloseTab"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "Home"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "Back"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "Forward"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "SidePane"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "ZoomIn"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "ZoomOut"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "ZoomReset"), FALSE); - - GtkUIManager* ui_manager = gtk_ui_manager_new (); - selfp->ui_manager = ui_manager; - gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); - - GtkAccelGroup* accel_group = gtk_ui_manager_get_accel_group (ui_manager); - gtk_window_add_accel_group (GTK_WINDOW (self), accel_group); - - GError* error = NULL; - if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) - { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - exit (EXIT_FAILURE); - } - - GtkWidget* menubar = gtk_handle_box_new(); - selfp->menubar = menubar; - gtk_container_add(GTK_CONTAINER(menubar), gtk_ui_manager_get_widget (ui_manager, "/MainMenu")); - gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0); - - GtkWidget* toolbar = gtk_handle_box_new(); - selfp->toolbar = toolbar; - gtk_container_add(GTK_CONTAINER(toolbar), gtk_ui_manager_get_widget(ui_manager, "/toolbar")); - gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); - - GtkWidget* ui_chmfile = chmsee_ui_chmfile_new(); - selfp->ui_chmfile = ui_chmfile; - gtk_box_pack_start(GTK_BOX(vbox), ui_chmfile, TRUE, TRUE, 0); - gtk_container_set_focus_child(GTK_CONTAINER(vbox), ui_chmfile); - g_signal_connect_swapped(ui_chmfile, - "model_changed", - G_CALLBACK(on_ui_chmfile_model_changed), - self); - g_signal_connect_swapped(ui_chmfile, - "html_changed", - G_CALLBACK(on_ui_chmfile_html_changed), - self); - g_signal_connect_swapped(ui_chmfile, - "notify::link-message", - G_CALLBACK(on_ui_chmfile_html_link_message_notify), - self); - - gtk_tool_button_set_icon_widget( - GTK_TOOL_BUTTON(gtk_ui_manager_get_widget(ui_manager, "/toolbar/sidepane")), - gtk_image_new_from_file(get_resource_path("show-pane.png"))); + gint i; + for (i = 0; uris[i]; i++) { + gchar *uri = uris[i]; + if (g_str_has_prefix(uri, "file://") + && (g_str_has_suffix(uri, ".chm") || g_str_has_suffix(uri, ".CHM"))) { + open_draged_file(CHMSEE (widget), uri); + break; + } + } - gtk_box_pack_start (GTK_BOX (vbox), main_vbox, FALSE, FALSE, 0); - gtk_widget_show_all(vbox); + gtk_drag_finish(context, TRUE, FALSE, time); - accel_group = g_object_new(GTK_TYPE_ACCEL_GROUP, NULL); - gtk_window_add_accel_group(GTK_WINDOW (self), accel_group); + g_strfreev(uris); +} - /* status bar */ - selfp->statusbar = glade_xml_get_widget(glade, "statusbar"); - selfp->scid_default = gtk_statusbar_get_context_id(GTK_STATUSBAR (selfp->statusbar), - "default"); - update_status_bar(self, _("Ready!")); +static void +open_draged_file(Chmsee *chmsee, const gchar *file) +{ + gchar *fname = g_uri_unescape_string(file+7, NULL); // +7 remove "file://" prefix + chmsee_open_file(chmsee, fname); + g_free(fname); } -void -chmsee_set_model(ChmSee* self, ChmseeIchmfile *book) +static void +populate_windows(Chmsee *self) { - g_debug("display book"); - selfp->state = CHMSEE_STATE_LOADING; + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - /* Close currently opened book */ - if (selfp->book) { - g_object_unref(selfp->book); - } + GtkWidget *vbox = GTK_WIDGET (gtk_vbox_new(FALSE, 2)); - selfp->book = g_object_ref(book); - chmsee_ui_chmfile_set_model(CHMSEE_UI_CHMFILE(selfp->ui_chmfile), book); + priv->action_group = gtk_action_group_new("MenuActions"); + gtk_action_group_set_translation_domain(priv->action_group, NULL); + gtk_action_group_add_actions(priv->action_group, entries, G_N_ELEMENTS (entries), self); + gtk_action_group_add_toggle_actions(priv->action_group, toggle_entries, G_N_ELEMENTS (toggle_entries), self); - /* Window title */ - gchar *window_title; + gint n = 0; + while (strlen(active_actions[n])) { + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, active_actions[n++]), FALSE); + } - if (chmsee_ichmfile_get_title(selfp->book) != NULL - && g_ascii_strcasecmp(chmsee_ichmfile_get_title(selfp->book), "(null)") != 0 ) { - window_title = g_strdup_printf("%s - ChmSee", chmsee_ichmfile_get_title(selfp->book)); - } else { - window_title = g_strdup_printf("%s - ChmSee", - g_path_get_basename(chmsee_ichmfile_get_filename(book))); - } + priv->ui_manager = gtk_ui_manager_new(); + gtk_ui_manager_insert_action_group(priv->ui_manager, priv->action_group, 0); - gtk_window_set_title(GTK_WINDOW (self), window_title); - g_free(window_title); + gtk_window_add_accel_group(GTK_WINDOW (self), + gtk_ui_manager_get_accel_group(priv->ui_manager)); - selfp->state = CHMSEE_STATE_NORMAL; + GError *error = NULL; + if (!gtk_ui_manager_add_ui_from_string(priv->ui_manager, ui_description, -1, &error)) { + g_warning("Chmsee >>> building menus failed: %s", error->message); + g_error_free(error); + exit(EXIT_FAILURE); + } - selfp->last_dir = g_strdup_printf("%s", g_path_get_dirname( - chmsee_ichmfile_get_filename(book))); -} + priv->menubar = gtk_handle_box_new(); + gtk_container_add(GTK_CONTAINER (priv->menubar), gtk_ui_manager_get_widget(priv->ui_manager, "/MainMenu")); + gtk_box_pack_start(GTK_BOX (vbox), priv->menubar, FALSE, FALSE, 0); + + GtkWidget *recent_menu = gtk_recent_chooser_menu_new_for_manager(gtk_recent_manager_get_default()); + gtk_recent_chooser_set_show_not_found(GTK_RECENT_CHOOSER (recent_menu), FALSE); + gtk_recent_chooser_set_local_only(GTK_RECENT_CHOOSER (recent_menu), TRUE); + gtk_recent_chooser_set_limit(GTK_RECENT_CHOOSER (recent_menu), 10); + gtk_recent_chooser_set_show_icons(GTK_RECENT_CHOOSER (recent_menu), FALSE); + gtk_recent_chooser_set_sort_type(GTK_RECENT_CHOOSER (recent_menu), GTK_RECENT_SORT_MRU); + gtk_recent_chooser_menu_set_show_numbers(GTK_RECENT_CHOOSER_MENU (recent_menu), TRUE); + + GtkRecentFilter *filter = gtk_recent_filter_new(); + gtk_recent_filter_add_application(filter, g_get_application_name()); + gtk_recent_chooser_set_filter(GTK_RECENT_CHOOSER (recent_menu), filter); + + g_signal_connect(recent_menu, + "item-activated", + G_CALLBACK (on_recent_files), + self); -#if 0 -static void -open_homepage(ChmSee *self) -{ - ChmseeIhtml *html; + gtk_menu_item_set_submenu(GTK_MENU_ITEM (gtk_ui_manager_get_widget(priv->ui_manager, "/MainMenu/FileMenu/RecentFiles")), + recent_menu); - html = get_active_html(self); + priv->toolbar = gtk_handle_box_new(); + gtk_container_add(GTK_CONTAINER (priv->toolbar), gtk_ui_manager_get_widget(priv->ui_manager, "/toolbar")); + gtk_box_pack_start(GTK_BOX (vbox), priv->toolbar, FALSE, FALSE, 0); + /* gtk_toolbar_set_style(GTK_TOOLBAR (gtk_ui_manager_get_widget(ui_manager, "/toolbar")), */ + /* GTK_TOOLBAR_ICONS);// FIXME: issue 43 */ + gtk_tool_button_set_icon_widget( + GTK_TOOL_BUTTON(gtk_ui_manager_get_widget(priv->ui_manager, "/toolbar/sidepane")), + gtk_image_new_from_file(RESOURCE_FILE ("show-pane.png"))); - /* g_signal_handlers_block_by_func(html, html_open_uri_cb, self); */ + priv->book = cs_book_new(); + gtk_box_pack_start(GTK_BOX(vbox), priv->book, TRUE, TRUE, 0); + g_signal_connect_swapped(priv->book, + "model-changed", + G_CALLBACK (book_model_changed_cb), + self); - chmsee_ihtml_open_uri(html, g_build_filename(chmsee_ichmfile_get_dir(selfp->book), - chmsee_ichmfile_get_home(selfp->book), NULL)); + /* status bar */ + priv->statusbar = gtk_statusbar_new(); + gtk_box_pack_start(GTK_BOX(vbox), priv->statusbar, FALSE, FALSE, 0); - /* g_signal_handlers_unblock_by_func(html, html_open_uri_cb, self); */ + priv->scid_default = gtk_statusbar_get_context_id(GTK_STATUSBAR (priv->statusbar), "default"); - if (selfp->has_toc) { - booktree_select_uri(BOOKTREE (selfp->booktree), - chmsee_ichmfile_get_home(selfp->book)); - } + gtk_container_add(GTK_CONTAINER (self), vbox); - check_history(self, html); + update_status_bar(self, _("Ready!")); + gtk_widget_show_all(GTK_WIDGET (self)); + cs_book_findbar_hide(CS_BOOK (priv->book)); + g_debug("Chmsee >>> populate window finished."); } -#endif static void -reload_current_page(ChmSee *self) +set_fullscreen(Chmsee *self, gboolean fullscreen) { - ChmseeIhtml*html; - const gchar *location; - - g_message("Reload current page"); + g_debug("Chmsee >>> set_fullscreen with fullscreen = %d", fullscreen); - html = get_active_html(self); - location = chmsee_ihtml_get_location(html); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + priv->config->fullscreen = fullscreen; - if (location != NULL) { - chmsee_ihtml_open_uri(html, location); + if (fullscreen) { + g_debug("Chmsee >>> call gtk_window_fullscreen"); + gtk_window_fullscreen(GTK_WINDOW (self)); + } else { + g_debug("ChmSee >>> call gtk_window_unfullscreen"); + gtk_window_unfullscreen(GTK_WINDOW (self)); } } -static ChmseeIhtml * -get_active_html(ChmSee *self) +static void +update_status_bar(Chmsee *self, const gchar *message) { - return chmsee_ui_chmfile_get_active_html(CHMSEE_UI_CHMFILE(selfp->ui_chmfile)); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + gchar *status = g_strdup_printf(" %s", message); + + gtk_statusbar_pop(GTK_STATUSBAR(priv->statusbar), priv->scid_default); + gtk_statusbar_push(GTK_STATUSBAR(priv->statusbar), priv->scid_default, status); + + g_free(status); } static void -update_status_bar(ChmSee *self, const gchar *message) +set_sidepane_state(Chmsee *self, gboolean state) { - gchar *status; + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - status = g_strdup_printf(" %s", message); + g_object_set(priv->book, + "sidepane-visible", state, + NULL); + const gchar *pane_icon = state ? RESOURCE_FILE ("hide-pane.png") : RESOURCE_FILE ("show-pane.png"); - gtk_statusbar_pop(GTK_STATUSBAR(selfp->statusbar), selfp->scid_default); - gtk_statusbar_push(GTK_STATUSBAR(selfp->statusbar), selfp->scid_default, status); + GtkWidget *icon_widget = gtk_image_new_from_file(pane_icon); + gtk_widget_show(icon_widget); - g_free(status); -} + gtk_tool_button_set_icon_widget( + GTK_TOOL_BUTTON (gtk_ui_manager_get_widget(priv->ui_manager, "/toolbar/sidepane")), + icon_widget); +}; -/* external functions */ +/* External functions */ -ChmSee * -chmsee_new(const gchar* filename) +Chmsee * +chmsee_new(CsConfig *config) { - ChmSee *self; + Chmsee *self = g_object_new(CHMSEE_TYPE, NULL); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - self = g_object_new(TYPE_CHMSEE, NULL); + priv->config = config; - if(filename != NULL) { - chmsee_open_file(self, filename); + if (config->pos_x >= 0 && config->pos_y >= 0) + gtk_window_move(GTK_WINDOW (self), config->pos_x, config->pos_y); + + if (config->width <= 0 || config->height <= 0) { + config->width = DEFAULT_WIDTH; + config->height = DEFAULT_HEIGHT; } + gtk_window_resize(GTK_WINDOW (self), config->width, config->height); + + gtk_window_set_title(GTK_WINDOW (self), "ChmSee"); + gtk_window_set_icon_from_file(GTK_WINDOW (self), RESOURCE_FILE ("chmsee-icon.png"), NULL); + + cs_book_set_hpaned_position(CS_BOOK (priv->book), config->hpaned_pos); + set_sidepane_state(self, FALSE); //hide + + /* widget size changed event handle */ + g_signal_connect(G_OBJECT (self), + "configure-event", + G_CALLBACK (configure_event_cb), + self); + g_message("Chmsee >>> created"); return self; } void -chmsee_open_file(ChmSee *self, const gchar *filename) +chmsee_open_file(Chmsee *self, const gchar *filename) { - ChmseeIchmfile* book; - g_return_if_fail(IS_CHMSEE (self)); - /* Extract chm and get file infomation */ - book = chmsee_chmfile_new(filename); + g_message("Chmsee >>> open file = %s", filename); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + + /* create chmfile, get file infomation */ + CsChmfile *new_chmfile = cs_chmfile_new(filename, priv->config->bookshelf); + + if (new_chmfile != NULL) { + /* close currently opened book */ + if (priv->chmfile != NULL) + g_object_unref(priv->chmfile); + + priv->chmfile = new_chmfile; + + /* set global charset and font to this file */ + if (!strlen(cs_chmfile_get_charset(priv->chmfile)) && strlen(priv->config->charset)) + cs_chmfile_set_charset(priv->chmfile, priv->config->charset); + if (!strlen(cs_chmfile_get_variable_font(priv->chmfile))) + cs_chmfile_set_variable_font(priv->chmfile, priv->config->variable_font); + if (!strlen(cs_chmfile_get_fixed_font(priv->chmfile))) + cs_chmfile_set_fixed_font(priv->chmfile, priv->config->fixed_font); + + priv->state = CHMSEE_STATE_LOADING; + + cs_book_set_model(CS_BOOK (priv->book), priv->chmfile); + + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON (gtk_ui_manager_get_widget(priv->ui_manager, "/toolbar/sidepane")), TRUE); + gtk_container_set_focus_child(GTK_CONTAINER(self), priv->book); + + g_signal_connect_swapped(priv->book, + "html-changed", + G_CALLBACK (book_html_changed_cb), + self); + g_signal_connect_swapped(priv->book, + "notify::book-message", + G_CALLBACK (book_message_notify_cb), + self); + + /* update window title */ + gchar *window_title = g_strdup_printf("%s - ChmSee", cs_chmfile_get_bookname(priv->chmfile)); + g_debug("Chmsee >>> update window title %s", window_title); + gtk_window_set_title(GTK_WINDOW (self), window_title); + g_free(window_title); + + /* record last opened file */ + if (priv->config->last_file != NULL) + g_free(priv->config->last_file); + + priv->config->last_file = g_strdup(cs_chmfile_get_filename(priv->chmfile)); + g_debug("Chmsee >>> record last file = %s", priv->config->last_file); + + /* recent files */ + gchar *content; + gsize length; + + if (g_file_get_contents(filename, &content, &length, NULL)) { + static gchar *groups[] = { + "CHM Viewer", + NULL + }; + + GtkRecentData *data = g_slice_new(GtkRecentData); + data->display_name = NULL; + data->description = NULL; + data->mime_type = "application/x-chm"; + data->app_name = (gchar*)g_get_application_name(); + data->app_exec = g_strjoin(" ", g_get_prgname(), "%u", NULL); + data->groups = groups; + data->is_private = FALSE; + + gchar *uri = g_filename_to_uri(filename, NULL, NULL); + + GtkRecentManager *manager = gtk_recent_manager_get_default(); + gtk_recent_manager_add_full(manager, uri, data); + + g_free(uri); + g_free(data->app_exec); + g_slice_free(GtkRecentData, data); + } - if (book) { - chmsee_set_model(self, book); + priv->state = CHMSEE_STATE_NORMAL; } else { + g_warning("CS_BOOK >>> Can not open spectified file %s", filename); + /* Popup an error message dialog */ GtkWidget *msg_dialog; @@ -968,394 +982,145 @@ GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - _("Error loading file '%s'"), + _("Error: Can not open spectified file '%s'"), filename); + gtk_window_set_position(GTK_WINDOW (msg_dialog), GTK_WIN_POS_CENTER); gtk_dialog_run(GTK_DIALOG (msg_dialog)); gtk_widget_destroy(msg_dialog); } } -void -chmsee_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *selection_data, - guint info, - guint time) -{ - gchar **uris; - gint i = 0; - - uris = gtk_selection_data_get_uris (selection_data); - if (!uris) { - gtk_drag_finish (context, FALSE, FALSE, time); - return; - } - - for (i = 0; uris[i]; i++) { - gchar* uri = uris[i]; - if(g_str_has_prefix(uri, "file://") - && (g_str_has_suffix(uri, ".chm") - || g_str_has_suffix(uri, ".CHM"))) { - chmsee_open_uri(CHMSEE(widget), uri); - break; - } - } - - gtk_drag_finish (context, TRUE, FALSE, time); - - g_strfreev (uris); -} - -void chmsee_open_uri(ChmSee *chmsee, const gchar *uri) { - if(!g_str_has_prefix(uri, "file://")) { - return; - } - - gchar* fname = g_uri_unescape_string(uri+7, NULL); - chmsee_open_file(chmsee, fname); - g_free(fname); -} - -int chmsee_get_hpaned_position(ChmSee* self) { - gint position; - g_object_get(G_OBJECT(selfp->ui_chmfile), - "position", &position, - NULL - ); - return position; -} - -void chmsee_set_hpaned_position(ChmSee* self, int hpaned_position) { - selfp->hpaned_position = hpaned_position; - /* - g_object_set(G_OBJECT(get_widget(self, "hpaned1")), - "position", hpaned_position, - NULL - ); - */ -} - -void on_fullscreen_toggled(GtkWidget* menu, ChmSee* self) { - g_return_if_fail(IS_CHMSEE(self)); - gboolean active; - g_object_get(G_OBJECT(menu), - "active", &active, - NULL); - g_debug("enter on_fullscreen_toggled with menu.active = %d", active); - chmsee_set_fullscreen(self, active); -} - -void on_sidepane_toggled(GtkWidget* menu, ChmSee* self) { - g_return_if_fail(IS_CHMSEE(self)); - gboolean active; - g_object_get(G_OBJECT(menu), - "active", &active, - NULL); - if(active) { - show_sidepane(self); - } else { - hide_sidepane(self); - } -} - -void set_sidepane_state(ChmSee* self, gboolean state) { - GtkWidget* icon_widget; - g_object_set(selfp->ui_chmfile, - "sidepane-visible", state, - NULL); - - if (state) { - icon_widget = gtk_image_new_from_file(get_resource_path("hide-pane.png")); - } else { - icon_widget = gtk_image_new_from_file(get_resource_path("show-pane.png")); - } - gtk_widget_show(icon_widget); - gtk_tool_button_set_icon_widget( - GTK_TOOL_BUTTON(gtk_ui_manager_get_widget(selfp->ui_manager, "/toolbar/sidepane")), - icon_widget); -}; - -void show_sidepane(ChmSee* self) { - set_sidepane_state(self, TRUE); -} - -void hide_sidepane(ChmSee* self) { - set_sidepane_state(self, FALSE); -} - +gboolean +chmsee_get_startup_lastfile(Chmsee *self) +{ + g_return_val_if_fail(IS_CHMSEE (self), FALSE); -void on_map(ChmSee* self) { - if(selfp->hpaned_position >= 0) { - g_object_set(G_OBJECT(selfp->ui_chmfile), - "position", selfp->hpaned_position, - NULL - ); - } + return CHMSEE_GET_PRIVATE (self)->config->startup_lastfile; } +void +chmsee_set_startup_lastfile(Chmsee *self, gboolean state) +{ + g_return_if_fail(IS_CHMSEE (self)); -static void on_fullscreen(ChmSee* self) { - g_debug("enter on_fullscreen"); - selfp->fullscreen = TRUE; - gtk_widget_hide(selfp->menubar); - gtk_widget_hide(selfp->toolbar); - gtk_widget_hide(get_widget(self, "statusbar")); -} - -static void on_unfullscreen(ChmSee* self) { - g_debug("enter on_unfullscreen"); - selfp->fullscreen = FALSE; - gtk_widget_show(selfp->menubar); - gtk_widget_show(selfp->toolbar); - gtk_widget_show(get_widget(self, "statusbar")); + g_debug("Chmsee >>> set startup lastfile = %d", state); + CHMSEE_GET_PRIVATE (self)->config->startup_lastfile = state; } -gboolean on_window_state_event(ChmSee* self, GdkEventWindowState* event) { - g_return_val_if_fail(IS_CHMSEE(self), FALSE); - g_return_val_if_fail(event->type == GDK_WINDOW_STATE, FALSE); - - g_debug("enter on_window_state_event with event->changed_mask = %d and event->new_window_state = %d", - event->changed_mask, - event->new_window_state - ); - - if(!(event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)) { - return FALSE; - } - - if(event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) { - if(selfp->expect_fullscreen) { - on_fullscreen(self); - } else { - g_warning("expect not fullscreen but got a fullscreen event, restored"); - chmsee_set_fullscreen(self, FALSE); - return TRUE; - } - } else { - if(!selfp->expect_fullscreen) { - on_unfullscreen(self); - } else { - g_warning("expect fullscreen but got an unfullscreen event, restored"); - chmsee_set_fullscreen(self, TRUE); - return TRUE; - } - } +const gchar * +chmsee_get_variable_font(Chmsee *self) +{ + g_return_val_if_fail(IS_CHMSEE (self), NULL); - return FALSE; + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + if (priv->chmfile != NULL) + return cs_chmfile_get_variable_font(priv->chmfile); + else + return priv->config->variable_font; } -static gboolean on_scroll_event(ChmSee* self, GdkEventScroll* event) { - if(event->direction == GDK_SCROLL_UP && (event->state & GDK_CONTROL_MASK)) { - on_zoom_in(NULL, self); - return TRUE; - } else if(event->direction == GDK_SCROLL_DOWN && (event->state & GDK_CONTROL_MASK)) { - on_zoom_out(NULL, self); - return TRUE; - } else { - g_debug("event->direction: %d", event->direction); - g_debug("event->state: %x", event->state); - } +void +chmsee_set_variable_font(Chmsee *self, const gchar *font_name) +{ + g_return_if_fail(IS_CHMSEE (self)); - return FALSE; -} + g_debug("Chmsee >>> set variable font = %s", font_name); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); -const gchar* chmsee_get_cache_dir(ChmSee* self) { - return selfp->cache_dir; + if (priv->chmfile != NULL) { + cs_html_gecko_set_variable_font(font_name); + cs_chmfile_set_variable_font(priv->chmfile, font_name); + } else { + g_free(priv->config->variable_font); + priv->config->variable_font = g_strdup(font_name); + } } -const gchar* chmsee_get_variable_font(ChmSee* self) { - g_return_val_if_fail(selfp->book, NULL); - return chmsee_ichmfile_get_variable_font(selfp->book); -} +const gchar * +chmsee_get_fixed_font(Chmsee *self) +{ + g_return_val_if_fail(IS_CHMSEE (self), NULL); -void chmsee_set_variable_font(ChmSee* self, const gchar* font_name) { - g_return_if_fail(selfp->book); - chmsee_ichmfile_set_variable_font(selfp->book, font_name); -} + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); -const gchar* chmsee_get_fixed_font(ChmSee* self) { - g_return_val_if_fail(selfp->book, NULL); - return chmsee_ichmfile_get_fixed_font(selfp->book); + if (priv->chmfile != NULL) + return cs_chmfile_get_fixed_font(priv->chmfile); + else + return priv->config->fixed_font; } -void chmsee_set_fixed_font(ChmSee* self, const gchar* font_name) { - g_return_if_fail(selfp->book); - chmsee_ichmfile_set_fixed_font(selfp->book, font_name); -} +void +chmsee_set_fixed_font(Chmsee *self, const gchar *font_name) +{ + g_return_if_fail(IS_CHMSEE (self)); -int chmsee_get_lang(ChmSee* self) { - return selfp->lang; -} -void chmsee_set_lang(ChmSee* self, int lang) { - selfp->lang = lang; -} + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); -gboolean chmsee_has_book(ChmSee* self) { - return selfp->book != NULL; + if (priv->chmfile != NULL) { + cs_html_gecko_set_fixed_font(font_name); + cs_chmfile_set_fixed_font(priv->chmfile, font_name); + } else { + g_free(priv->config->fixed_font); + priv->config->fixed_font = g_strdup(font_name); + } } -void -chmsee_load_config(ChmSee *self) +const gchar * +chmsee_get_charset(Chmsee *self) { - g_debug("enter chmsee_load_config"); - GList *pairs, *list; - gchar *path; - - path = g_build_filename(selfp->home, "config", NULL); - - g_debug("config path = %s", path); - - pairs = parse_config_file("config", path); - - for (list = pairs; list; list = list->next) { - Item *item; - - item = list->data; - - /* Get user prefered language */ - if (strstr(item->id, "LANG")) { - selfp->lang = atoi(item->value); - continue; - } - - /* Get last directory */ - if (strstr(item->id, "LAST_DIR")) { - selfp->last_dir = g_strdup(item->value); - continue; - } - - /* Get window position */ - if (strstr(item->id, "POS_X")) { - selfp->pos_x = atoi(item->value); - continue; - } - if (strstr(item->id, "POS_Y")) { - selfp->pos_y = atoi(item->value); - continue; - } - if (strstr(item->id, "WIDTH")) { - selfp->width = atoi(item->value); - continue; - } - if (strstr(item->id, "HEIGHT")) { - selfp->height = atoi(item->value); - continue; - } - if(strstr(item->id, "HPANED_POSTION")) { - chmsee_set_hpaned_position(self, atoi(item->value)); - continue; - } - if(strstr(item->id, "FULLSCREEN")) { - if(strcmp(item->value, "true") == 0) { - chmsee_set_fullscreen(self, TRUE); - } else if(strcmp(item->value, "false") == 0) { - chmsee_set_fullscreen(self, FALSE); - } else { - g_warning("%s:%d:unknown value of FULLSCREEN %s", __FILE__, __LINE__, item->value); - } - } - } + g_return_val_if_fail(IS_CHMSEE (self), NULL); - free_config_list(pairs); - g_free(path); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + if (priv->chmfile != NULL) + return cs_chmfile_get_charset(priv->chmfile); + else + return priv->config->charset; } void -chmsee_save_config(ChmSee *self) +chmsee_set_charset(Chmsee *self, const gchar *charset) { - FILE *file; - gchar *path; - - path = g_build_filename(selfp->home, "config", NULL); + g_return_if_fail(IS_CHMSEE (self)); - file = fopen(path, "w"); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); - if (!file) { - g_print("Faild to open chmsee config: %s", path); - return; + if (priv->chmfile != NULL) { + cs_chmfile_set_charset(priv->chmfile, charset); + cs_book_reload_current_page(CS_BOOK (priv->book)); + } else { + g_free(priv->config->charset); + priv->config->charset = g_strdup(charset); } - - save_option(file, "LANG", g_strdup_printf("%d", selfp->lang)); - save_option(file, "LAST_DIR", selfp->last_dir); - save_option(file, "POS_X", g_strdup_printf("%d", selfp->pos_x)); - save_option(file, "POS_Y", g_strdup_printf("%d", selfp->pos_y)); - save_option(file, "WIDTH", g_strdup_printf("%d", selfp->width)); - save_option(file, "HEIGHT", g_strdup_printf("%d", selfp->height)); - save_option(file, "HPANED_POSTION", g_strdup_printf("%d", chmsee_get_hpaned_position(self))); - save_option(file, "FULLSCREEN", selfp->fullscreen ? "true" : "false" ); - - fclose(file); - g_free(path); } -void chmsee_set_fullscreen(ChmSee* self, gboolean fullscreen) { - g_debug("enter chmsee_set_fullscreen with fullscreen = %d", fullscreen); - selfp->expect_fullscreen = fullscreen; - - if(fullscreen) { - g_debug("call gtk_window_fullscreen"); - gtk_window_fullscreen(GTK_WINDOW(self)); - } else { - g_debug("call gtk_window_unfullscreen"); - gtk_window_unfullscreen(GTK_WINDOW(self)); - } -} - - -gboolean chmsee_jump_index_by_name(ChmSee* self, const gchar* name) { - g_return_val_if_fail(IS_CHMSEE(self), FALSE); - return chmsee_ui_chmfile_jump_index_by_name(CHMSEE_UI_CHMFILE(selfp->ui_chmfile), name); -} - -static void on_keyboard_escape(GtkWidget* widget, ChmSee* self) { - if(selfp->fullscreen) { - chmsee_set_fullscreen(self, FALSE); - } else { - gtk_window_iconify(GTK_WINDOW(self)); - } -} - -static void new_tab(ChmSee * self, const gchar * location) { - chmsee_ui_chmfile_new_tab(CHMSEE_UI_CHMFILE(selfp->ui_chmfile), location); -} +gboolean +chmsee_has_book(Chmsee *self) +{ + g_return_val_if_fail(IS_CHMSEE (self), FALSE); -static void on_close_current_tab(GtkWidget* widget, ChmSee* self) { - chmsee_ui_chmfile_close_current_tab(CHMSEE_UI_CHMFILE(selfp->ui_chmfile)); + return CHMSEE_GET_PRIVATE (self)->chmfile != NULL; } -void on_ui_chmfile_model_changed(ChmSee* self, ChmseeIchmfile* chm_file) { - gboolean has_model = (chm_file != NULL); - - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "NewTab"), has_model); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "CloseTab"), has_model); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "Home"), has_model); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "SidePane"), has_model); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "ZoomIn"), has_model); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "ZoomOut"), has_model); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "ZoomReset"), has_model); -} - -void on_ui_chmfile_html_changed(ChmSee* self, ChmseeIhtml* html) { - gboolean back_state, forward_state; - - g_debug("%s:%d:recieve html_changed signal from %p", __FILE__, __LINE__, html); +void +chmsee_close_book(Chmsee *self) +{ + g_return_if_fail(IS_CHMSEE (self)); - back_state = chmsee_ihtml_can_go_back(html); - forward_state = chmsee_ihtml_can_go_forward(html); + ChmseePrivate *priv = CHMSEE_GET_PRIVATE (self); + if (priv->chmfile != NULL) { + g_object_unref(priv->chmfile); + priv->chmfile = NULL; + } - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "Back"), back_state); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "Forward"), forward_state); + book_model_changed_cb(self, NULL, NULL); + priv->state = CHMSEE_STATE_NORMAL; } -void on_ui_chmfile_html_link_message_notify(ChmSee* self, GParamSpec* pspec, ChmseeUiChmfile* ui_chmfile) { - gchar* link_message; - g_object_get(ui_chmfile, - "link-message", &link_message, - NULL); +const gchar * +chmsee_get_bookshelf(Chmsee *self) +{ + g_return_val_if_fail(IS_CHMSEE (self), NULL); - update_status_bar(self, link_message); - g_free(link_message); + return CHMSEE_GET_PRIVATE (self)->config->bookshelf; } diff -Nru chmsee-1.0.7/src/chmsee.h chmsee-1.3.0/src/chmsee.h --- chmsee-1.0.7/src/chmsee.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/chmsee.h 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * * ChmSee is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,56 +34,64 @@ #include #include -#include "models/ichmfile.h" - G_BEGIN_DECLS -typedef struct _ChmSee ChmSee; -typedef struct _ChmSeePrivate ChmSeePrivate; -typedef struct _ChmSeeClass ChmSeeClass; - -#define TYPE_CHMSEE \ - (chmsee_get_type ()) -#define CHMSEE(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CHMSEE, ChmSee)) -#define CHMSEE_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CHMSEE, ChmSeeClass)) -#define IS_CHMSEE(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CHMSEE)) -#define IS_CHMSEE_CLASS(k) \ - (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CHMSEE)) -#define CHMSEE_GET_CLASS(o) \ - (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CHMSEE, ChmSeeClass)) - - -struct _ChmSee { - GtkWindow parent; - ChmSeePrivate* priv; +typedef struct _Chmsee Chmsee; +typedef struct _ChmseeClass ChmseeClass; + +#define CHMSEE_TYPE (chmsee_get_type ()) +#define CHMSEE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CHMSEE_TYPE, Chmsee)) +#define CHMSEE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CHMSEE_TYPE, ChmseeClass)) +#define CHMSEE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CHMSEE_TYPE, ChmseeClass)) +#define IS_CHMSEE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CHMSEE_TYPE)) +#define IS_CHMSEE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CHMSEE_TYPE)) + +struct _Chmsee { + GtkWindow window; +}; + +struct _ChmseeClass { + GtkWindowClass parent_class; }; -struct _ChmSeeClass { - GtkWindowClass parent_class; +typedef struct _CsConfig CsConfig; + +struct _CsConfig { + gchar *home; + gchar *bookshelf; + gchar *last_file; + gchar *charset; + gchar *variable_font; + gchar *fixed_font; + + gint pos_x; + gint pos_y; + gint height; + gint width; + gint hpaned_pos; + gboolean fullscreen; + gboolean startup_lastfile; }; -GType chmsee_get_type(void); -ChmSee * chmsee_new(const gchar* fname); -void chmsee_set_model(ChmSee* self, ChmseeIchmfile *book); -gboolean chmsee_jump_index_by_name(ChmSee* self, const gchar* name); -/* void chmsee_open_file(ChmSee *, const gchar *); */ -int chmsee_get_hpaned_position(ChmSee* self); -void chmsee_set_hpaned_position(ChmSee* self, int hpaned_position); -const gchar* chmsee_get_cache_dir(ChmSee* self); - -const gchar* chmsee_get_variable_font(ChmSee* self); -void chmsee_set_variable_font(ChmSee* self, const gchar* font_name); +GType chmsee_get_type(void); +Chmsee *chmsee_new(CsConfig *); +void chmsee_open_file(Chmsee *, const gchar *); +void chmsee_close_book(Chmsee *); + +const gchar *chmsee_get_variable_font(Chmsee *); +void chmsee_set_variable_font(Chmsee *, const gchar *); + +const gchar *chmsee_get_fixed_font(Chmsee *); +void chmsee_set_fixed_font(Chmsee *, const gchar *); -const gchar* chmsee_get_fixed_font(ChmSee* self); -void chmsee_set_fixed_font(ChmSee* self, const gchar* font_name); +const gchar *chmsee_get_charset(Chmsee *); +void chmsee_set_charset(Chmsee *, const gchar *); -int chmsee_get_lang(ChmSee* self); -void chmsee_set_lang(ChmSee* self, int lang); +gboolean chmsee_get_startup_lastfile(Chmsee *); +void chmsee_set_startup_lastfile(Chmsee *, gboolean); -gboolean chmsee_has_book(ChmSee* self); +gboolean chmsee_has_book(Chmsee *); +const gchar *chmsee_get_bookshelf(Chmsee *); G_END_DECLS diff -Nru chmsee-1.0.7/src/CMakeLists.txt chmsee-1.3.0/src/CMakeLists.txt --- chmsee-1.0.7/src/CMakeLists.txt 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/CMakeLists.txt 2011-01-16 13:48:42.000000000 +0000 @@ -1,59 +1,50 @@ include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CHMSEE_INCLUDE_DIRS} - ) + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CHMSEE_INCLUDE_DIRS} + ) add_definitions( - ${CHMSEE_CFLAGS_OTHER} - ) -add_custom_command( - OUTPUT marshal.h - COMMAND ${GLIB_GENMARSHAL} --prefix=marshal ${CMAKE_CURRENT_SOURCE_DIR}/marshal.list --header > marshal.h - DEPENDS marshal.list - ) - -add_custom_command( - OUTPUT marshal.c - COMMAND ${GLIB_GENMARSHAL} --prefix=marshal ${CMAKE_CURRENT_SOURCE_DIR}/marshal.list --body > marshal.c - DEPENDS marshal.list - ) + ${CHMSEE_CFLAGS_OTHER} + ) link_directories( - ${CHMSEE_LIBRARY_DIRS} - ) + ${CHMSEE_LIBRARY_DIRS} + ) set(CHMSEE_SRCS - booktree.c chmsee.c gecko_utils.cpp html.c - setup.c startup.c ui_bookmarks.c booktree.h chmsee.h - gecko_utils.h html.h setup.h startup.h ui_bookmarks.h - marshal.h marshal.c - ihtml.h ihtml.c - html-factory.h html-factory.c - ui_index.h ui_index.c - ui_chmfile.h ui_chmfile.c - ) + chmsee.h chmsee.c + setup.h setup.c + utils.h utils.c + ) set(CHMSEE_SRCS - ${CHMSEE_SRCS} - utils/utils.h utils/utils.c) + ${CHMSEE_SRCS} + components/book.h components/book.c + components/toc.h components/toc.c + components/index.h components/index.c + components/bookmarks.h components/bookmarks.c + components/treeview.h components/treeview.c + components/html-gecko.h components/html-gecko.c + components/gecko-utils.h components/gecko-utils.cpp + ) set(CHMSEE_SRCS - ${CHMSEE_SRCS} - models/bookmarks.h models/bookmarks.c - models/chmfile.h models/chmfile.c - models/hhc.h models/hhc.c - models/link.h models/link.c - models/ichmfile.h models/ichmfile.c - models/chmfile-factory.h models/chmfile-factory.c - models/chmindex.h models/chmindex.c - ) + ${CHMSEE_SRCS} + models/bookmarksfile.h models/bookmarksfile.c + models/chmfile.h models/chmfile.c + models/parser.h models/parser.c + models/link.h models/link.c + ) add_library(chmseelib STATIC ${CHMSEE_SRCS}) target_link_libraries(chmseelib - ${CHMSEE_LIBRARIES} - ) + ${CHMSEE_LIBRARIES} + ) -add_executable(chmsee main.cpp) +add_executable(chmsee main.c) target_link_libraries(chmsee - chmseelib - ) - + chmseelib + ) +set_target_properties(chmsee + PROPERTIES LINKER_LANGUAGE CXX + ) + install(TARGETS chmsee DESTINATION bin) diff -Nru chmsee-1.0.7/src/components/book.c chmsee-1.3.0/src/components/book.c --- chmsee-1.0.7/src/components/book.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/book.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,1278 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with Chmsee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include +#include +#include +#include + +#include "book.h" +#include "toc.h" +#include "bookmarks.h" +#include "index.h" +#include "html-gecko.h" +#include "utils.h" +#include "models/chmfile.h" +#include "models/link.h" + +/* Signals */ +enum { + MODEL_CHANGED, + HTML_CHANGED, + LAST_SIGNAL +}; +static gint signals[LAST_SIGNAL] = { 0 }; + +enum { + PROP_0, + + PROP_SIDEPANE_VISIBLE, + PROP_BOOK_MESSAGE +}; + +typedef struct _CsBookPrivate CsBookPrivate; + +struct _CsBookPrivate { + GtkWidget *hpaned; + GtkWidget *findbar; + + GtkWidget *control_notebook; + GtkWidget *html_notebook; + + GtkWidget *toc_page; + GtkWidget *index_page; + GtkWidget *bookmarks_page; + + GtkActionGroup *action_group; + GtkUIManager *ui_manager; + + CsChmfile *model; + CsHtmlGecko *active_html; + + gchar *context_menu_link; + gchar *book_message; +}; + +#define CS_BOOK_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CS_TYPE_BOOK, CsBookPrivate)) + +static void cs_book_class_init(CsBookClass *); +static void cs_book_init(CsBook *); +static void cs_book_dispose(GObject *); +static void cs_book_finalize(GObject *); +static void cs_book_set_property(GObject *, guint, const GValue *, GParamSpec *); +static void cs_book_get_property(GObject *, guint, GValue *, GParamSpec *); + +static void find_entry_changed_cb(GtkEntry *, CsBook *); +static void find_entry_activate_cb(GtkEntry *, CsBook *); +static void link_selected_cb(GtkWidget *, Link *, CsBook *); +static void html_notebook_switch_page_cb(GtkNotebook *, GtkNotebookPage *, guint , CsBook *); +static void html_location_changed_cb(CsHtmlGecko *, const gchar *, CsBook *); +static gboolean html_open_uri_cb(CsHtmlGecko *, const gchar *, CsBook *); +static void html_title_changed_cb(CsHtmlGecko *, const gchar *, CsBook *); +static void html_context_normal_cb(CsHtmlGecko *, CsBook *); +static void html_context_link_cb(CsHtmlGecko *, const gchar *, CsBook *); +static void html_open_new_tab_cb(CsHtmlGecko *, const gchar *, CsBook *); +static void html_link_message_cb(CsHtmlGecko *, const gchar *, CsBook *); + +static void on_tab_close(GtkWidget *, CsBook *); +static void on_copy(GtkAction *, CsBook *); +static void on_copy_page_location(GtkAction *, CsBook *); +static void on_select_all(GtkAction *, CsBook *); +static void on_back(GtkAction *, CsBook *); +static void on_forward(GtkAction *, CsBook *); +static void on_context_new_tab(GtkAction *, CsBook *); +static void on_context_copy_link(GtkAction *, CsBook *); +static void on_findbar_hide(GtkWidget *, CsBook *); +static void on_findbar_back(GtkWidget *, CsBook *); +static void on_findbar_forward(GtkWidget *, CsBook *); + +static void update_book_message(CsBook *, const gchar *); +static gint new_html_tab(CsBook *); +static GtkWidget *new_tab_label(CsBook *, const gchar *); +static void update_tab_title(CsBook *, CsHtmlGecko *, const gchar *); +static void update_tab_label_state(CsBook *); +static void set_context_menu_link(CsBook *, const gchar *); +static void find_text(GtkWidget *, CsBook *, gboolean); +static gint uri_compare(gconstpointer, gconstpointer); +static const gchar *get_short_uri(CsChmfile *, const gchar *); +static GList *get_toc_current(CsBook *); + +static const GtkActionEntry entries[] = { + { "Copy", GTK_STOCK_COPY, N_("_Copy"), "C", NULL, G_CALLBACK(on_copy)}, + { "Back", GTK_STOCK_GO_BACK, N_("_Back"), "Left", NULL, G_CALLBACK(on_back)}, + { "Forward", GTK_STOCK_GO_FORWARD, N_("_Forward"), "Right", NULL, G_CALLBACK(on_forward)}, + { "OpenLinkInNewTab", NULL, N_("Open Link in New _Tab"), NULL, NULL, G_CALLBACK(on_context_new_tab)}, + { "CopyLinkLocation", NULL, N_("_Copy Link Location"), NULL, NULL, G_CALLBACK(on_context_copy_link)}, + { "SelectAll", NULL, N_("Select _All"), NULL, NULL, G_CALLBACK(on_select_all)}, + { "CopyPageLocation", NULL, N_("Copy Page _Location"), NULL, NULL, G_CALLBACK(on_copy_page_location)}, +}; + +/* Radio items */ +static const GtkRadioActionEntry radio_entries[] = { +}; + +static const char *ui_description = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + + +/* GObject functions */ + +G_DEFINE_TYPE (CsBook, cs_book, GTK_TYPE_VBOX); + +static void +cs_book_class_init(CsBookClass *klass) +{ + GParamSpec* pspec; + + g_type_class_add_private(klass, sizeof(CsBookPrivate)); + + G_OBJECT_CLASS(klass)->finalize = cs_book_finalize; + G_OBJECT_CLASS(klass)->dispose = cs_book_dispose; + + signals[MODEL_CHANGED] = + g_signal_new("model-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + gtk_marshal_VOID__POINTER_POINTER, + G_TYPE_NONE, + 2, + G_TYPE_POINTER, G_TYPE_POINTER); + + signals[HTML_CHANGED] = + g_signal_new("html-changed", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + gtk_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); + + G_OBJECT_CLASS(klass)->set_property = cs_book_set_property; + G_OBJECT_CLASS(klass)->get_property = cs_book_get_property; + + pspec = g_param_spec_boolean("sidepane-visible", NULL, NULL, TRUE, G_PARAM_READWRITE); + g_object_class_install_property(G_OBJECT_CLASS(klass), PROP_SIDEPANE_VISIBLE, pspec); + + pspec = g_param_spec_string("book-message", NULL, NULL, "", G_PARAM_READABLE); + g_object_class_install_property(G_OBJECT_CLASS(klass), PROP_BOOK_MESSAGE, pspec); +} + +static void +cs_book_init(CsBook *self) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + priv->context_menu_link = NULL; + + priv->model = NULL; + priv->active_html = NULL; + priv->book_message = NULL; + priv->toc_page = NULL; + + priv->hpaned = gtk_hpaned_new(); + gtk_box_pack_start(GTK_BOX (self), priv->hpaned, TRUE, TRUE, 0); + + priv->control_notebook = gtk_notebook_new(); + gtk_notebook_set_tab_vborder(GTK_NOTEBOOK (priv->control_notebook), 4); + gtk_notebook_set_show_border(GTK_NOTEBOOK (priv->control_notebook), FALSE); + gtk_paned_add1(GTK_PANED(priv->hpaned), priv->control_notebook); + + priv->html_notebook = gtk_notebook_new(); + g_signal_connect(G_OBJECT (priv->html_notebook), + "switch-page", + G_CALLBACK (html_notebook_switch_page_cb), + self); + + gtk_notebook_set_tab_vborder(GTK_NOTEBOOK (priv->html_notebook), 0); + gtk_notebook_set_show_border(GTK_NOTEBOOK (priv->html_notebook), FALSE); + gtk_paned_add2(GTK_PANED (priv->hpaned), priv->html_notebook); + + /* string find bar */ + priv->findbar = GTK_WIDGET (gtk_hbox_new(FALSE, 2)); + + GtkWidget *close_button = gtk_button_new(); + gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE); + GtkWidget *close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_SMALL_TOOLBAR); + gtk_container_add(GTK_CONTAINER (close_button), close_image); + + g_signal_connect(G_OBJECT (close_button), + "clicked", + G_CALLBACK (on_findbar_hide), + self); + gtk_box_pack_start(GTK_BOX (priv->findbar), close_button, FALSE, FALSE, 0); + + gtk_box_pack_start(GTK_BOX (priv->findbar), gtk_label_new(_("Find:")), FALSE, FALSE, 0); + + GtkWidget *find_entry = gtk_entry_new(); + gtk_entry_set_max_length(GTK_ENTRY (find_entry), ENTRY_MAX_LENGTH); + gtk_box_pack_start(GTK_BOX (priv->findbar), find_entry, FALSE, FALSE, 0); + g_object_set_data(G_OBJECT (priv->findbar), "find-entry", find_entry); + g_signal_connect(find_entry, + "changed", + G_CALLBACK (find_entry_changed_cb), + self); + g_signal_connect(find_entry, + "activate", + G_CALLBACK (find_entry_activate_cb), + self); + + GtkWidget *find_back = gtk_button_new_with_label(_("Previous")); + gtk_button_set_image(GTK_BUTTON (find_back), + gtk_image_new_from_stock(GTK_STOCK_GO_BACK, GTK_ICON_SIZE_SMALL_TOOLBAR)); + g_signal_connect(G_OBJECT (find_back), + "clicked", + G_CALLBACK (on_findbar_back), + self); + gtk_box_pack_start(GTK_BOX (priv->findbar), find_back, FALSE, FALSE, 0); + gtk_button_set_relief(GTK_BUTTON(find_back), GTK_RELIEF_NONE); + + GtkWidget *find_forward = gtk_button_new_with_label(_("Next")); + gtk_button_set_image(GTK_BUTTON (find_forward), + gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_SMALL_TOOLBAR)); + g_signal_connect(G_OBJECT (find_forward), + "clicked", + G_CALLBACK (on_findbar_forward), + self); + gtk_box_pack_start(GTK_BOX (priv->findbar), find_forward, FALSE, FALSE, 0); + gtk_button_set_relief(GTK_BUTTON(find_forward), GTK_RELIEF_NONE); + + GtkWidget *find_case = gtk_check_button_new_with_label(_("Match case")); + gtk_box_pack_start(GTK_BOX (priv->findbar), find_case, FALSE, FALSE, 0); + g_object_set_data(G_OBJECT (priv->findbar), "find-case", find_case); + + gtk_box_pack_start(GTK_BOX (self), priv->findbar, FALSE, FALSE, 0); + + /* HTML content popup menu */ + priv->action_group = gtk_action_group_new("BookActions"); + gtk_action_group_set_translation_domain(priv->action_group, NULL); + gtk_action_group_add_actions(priv->action_group, entries, G_N_ELEMENTS (entries), self); + + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Back"), FALSE); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Forward"), FALSE); + + priv->ui_manager = gtk_ui_manager_new(); + gtk_ui_manager_insert_action_group(priv->ui_manager, priv->action_group, 0); + + GError* error = NULL; + if (!gtk_ui_manager_add_ui_from_string(priv->ui_manager, ui_description, -1, &error)) { + g_warning("CS_BOOK >>> building menus failed %s", error->message); + g_error_free(error); + exit(EXIT_FAILURE); + } + + gtk_box_set_homogeneous(GTK_BOX (self), FALSE); + gtk_widget_show_all(GTK_WIDGET (self)); +} + +static void +cs_book_dispose(GObject* gobject) +{ + g_debug("CS_BOOK >>> dispose"); + + CsBook *self = CS_BOOK(gobject); + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + if (priv->model != NULL) { + GList *old_list = cs_bookmarks_get_model(CS_BOOKMARKS (priv->bookmarks_page)); + cs_chmfile_update_bookmarks_list(priv->model, old_list); + + g_object_unref(priv->model); + priv->model = NULL; + } + + if (priv->action_group != NULL) { + g_object_unref(priv->action_group); + g_object_unref(priv->ui_manager); + priv->action_group = NULL; + priv->ui_manager = NULL; + } + + G_OBJECT_CLASS(cs_book_parent_class)->dispose(gobject); +} + +static void +cs_book_finalize(GObject *object) +{ + g_debug("CS_BOOK >>> finalize"); + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (CS_BOOK(object)); + + g_free(priv->context_menu_link); + g_free(priv->book_message); + + G_OBJECT_CLASS (cs_book_parent_class)->finalize(object); +} + +/* Callbacks */ + +static void +find_entry_changed_cb(GtkEntry *entry, CsBook *self) +{ + find_text(GTK_WIDGET (entry), self, FALSE); +} + +static void +find_entry_activate_cb(GtkEntry *entry, CsBook *self) +{ + find_text(GTK_WIDGET (entry), self, FALSE); +} + +static void +link_selected_cb(GtkWidget *widget, Link *link, CsBook *self) +{ + g_debug("CS_BOOK >>> link selected callback, url = %s", link->uri); + if (!g_ascii_strcasecmp(CHMSEE_NO_LINK, link->uri) || strlen(link->uri) == 0) + return; + + char *scheme = g_uri_parse_scheme(link->uri); + if (scheme && g_strcmp0(scheme, "file")) { + g_message("%s is unsupported protocol.", scheme); + gchar *message = g_strdup_printf("URI %s with unsupported protocol: %s", link->uri, scheme); + update_book_message(self, message); + g_free(message); + } else { + cs_book_load_url(self, link->uri, FALSE); + } + g_free(scheme); +} + +static void +html_notebook_switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint new_page_num, CsBook *self) +{ + g_debug("CS_BOOK >>> enter switch page callback"); + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + GtkWidget *new_page = gtk_notebook_get_nth_page(notebook, new_page_num); + g_debug("CS_BOOK >>> switch page new_page_num = %d, new_page = %p", new_page_num, new_page); + + if (new_page != NULL) { + g_debug("CS_BOOK >>> switch page callback, set active_html = %p", priv->active_html); + priv->active_html = CS_HTML_GECKO (new_page); + cs_book_reload_current_page(self); + } + + g_signal_emit(self, signals[HTML_CHANGED], 0, self); +} + +static void +html_location_changed_cb(CsHtmlGecko *html, const gchar *location, CsBook *self) +{ + g_debug("CS_BOOK >>> html location changed cb: %s", location); + + g_signal_emit(self, signals[HTML_CHANGED], 0, self); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + char *scheme = g_uri_parse_scheme(location); + + if (!g_strcmp0(scheme, "file") && priv->toc_page) { + gchar *real_uri = get_real_uri(location); + gchar *filename = g_filename_from_uri(real_uri, NULL, NULL); + + const gchar *uri = get_short_uri(priv->model, filename); + gchar *toc_uri = g_strdup_printf("%s%s", uri, location + strlen(real_uri)); + + cs_toc_sync(CS_TOC (priv->toc_page), toc_uri); + + g_free(real_uri); + g_free(filename); + g_free(toc_uri); + } +} + +static gboolean +html_open_uri_cb(CsHtmlGecko *html, const gchar *full_uri, CsBook *self) +{ + g_debug("CS_BOOK >>> enter html_open_uri_cb with uri = %s", full_uri); + if (full_uri == NULL || strlen(full_uri) == 0) + return TRUE; + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + char *scheme = g_uri_parse_scheme(full_uri); + + if (scheme != NULL) { + const gchar *bookfolder = cs_chmfile_get_bookfolder(priv->model); + + if (!g_strcmp0(scheme, "file")) { + /* DND chmfile check */ + if (g_str_has_suffix(full_uri, ".chm") || g_str_has_suffix(full_uri, ".CHM")) { + g_debug("CS_BOOK >>> open chm file = %s", full_uri); + g_signal_emit(self, signals[MODEL_CHANGED], 0, NULL, full_uri); + } else if (g_strrstr(full_uri, bookfolder)) { + const gchar *uri = get_short_uri(priv->model, full_uri); + + g_debug("CS_BOOK >>> html_open_uri call load url = %s", uri); + cs_book_load_url(self, uri, TRUE); + } + } else if (!g_strcmp0(scheme, "about") || !g_strcmp0(scheme, "jar")) { + return FALSE; + } + } + + return TRUE; +} + +static void +html_title_changed_cb(CsHtmlGecko *html, const gchar *title, CsBook *self) +{ + g_debug("CS_BOOK >>> html title changed cb title = %s", title); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + const gchar *label_text = _("No Title"); + + if (title && title[0] != '\0') + label_text = title; + + update_tab_title(self, html, label_text); + + /* update bookmarks title entry */ + gchar *location = cs_html_gecko_get_location(html); + + if (location != NULL && strlen(location)) { + if (!g_str_has_prefix(location, "about:")) { + Link *link = link_new(LINK_TYPE_PAGE, + label_text, + get_short_uri(priv->model, location)); + + cs_bookmarks_set_current_link(CS_BOOKMARKS (priv->bookmarks_page), link); + link_free(link); + } + g_free(location); + } +} + +static void +html_context_normal_cb(CsHtmlGecko *html, CsBook *self) +{ + g_debug("CS_BOOK >>> html context-normal event"); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + gboolean can_copy = cs_html_gecko_can_copy_selection(priv->active_html); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Copy"), + can_copy); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Back"), + cs_book_can_go_back(self)); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "Forward"), + cs_book_can_go_forward(self)); + + const gchar *pop_menu = can_copy ? "/HtmlContextNormalCopy" : "/HtmlContextNormal"; + gtk_menu_popup(GTK_MENU (gtk_ui_manager_get_widget(priv->ui_manager, pop_menu)), + NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); +} + +static void +html_context_link_cb(CsHtmlGecko *html, const gchar *link, CsBook *self) +{ + g_debug("CS_BOOK >>> html context-link event: %s", link); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + set_context_menu_link(self, link); + gtk_action_set_sensitive(gtk_action_group_get_action(priv->action_group, "OpenLinkInNewTab"), + g_str_has_prefix(priv->context_menu_link, "file://")); + + gtk_menu_popup(GTK_MENU(gtk_ui_manager_get_widget(priv->ui_manager, "/HtmlContextLink")), + NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); +} + +static void +html_open_new_tab_cb(CsHtmlGecko *html, const gchar *location, CsBook *self) +{ + g_debug("CS_BOOK >>> html open new tab callback: %s", location); + cs_book_new_tab_with_fulluri(self, location); +} + +static void +html_link_message_cb(CsHtmlGecko *html, const gchar *url, CsBook *self) +{ + update_book_message(self, url); +} + +static void +on_tab_close(GtkWidget *widget, CsBook *self) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + if (gtk_notebook_get_n_pages(GTK_NOTEBOOK (priv->html_notebook)) >= 1) { + GtkWidget *hbox = gtk_widget_get_ancestor(widget, GTK_TYPE_HBOX); + GtkWidget *html = g_object_get_data(G_OBJECT (hbox), "html"); + + gint num = gtk_notebook_page_num(GTK_NOTEBOOK (priv->html_notebook), html); + g_debug("CS_BOOK >>> close tab find page %d", num); + if (num >= 0) + gtk_notebook_remove_page(GTK_NOTEBOOK (priv->html_notebook), num); + + update_tab_label_state(self); + } +} + +static void +on_copy(GtkAction *action, CsBook *self) +{ + cs_book_copy(self); +} + +static void +on_copy_page_location(GtkAction *action, CsBook *self) +{ + gchar *location = cs_html_gecko_get_location(CS_BOOK_GET_PRIVATE (self)->active_html); + GdkAtom selection = location != NULL ? GDK_SELECTION_PRIMARY : GDK_SELECTION_CLIPBOARD; + gtk_clipboard_set_text(gtk_clipboard_get(selection), location, -1); + g_free(location); +} + +static void +on_select_all(GtkAction *action, CsBook *self) +{ + cs_book_select_all(self); +} + +static void +on_back(GtkAction *action, CsBook *self) +{ + cs_book_go_back(self); +} + +static void +on_forward(GtkAction *action, CsBook *self) +{ + cs_book_go_forward(self); +} + +static void +on_context_new_tab(GtkAction *action, CsBook *self) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + g_debug("CS_BOOK >>> On context open new tab: %s", priv->context_menu_link); + + if (priv->context_menu_link != NULL) + cs_book_new_tab_with_fulluri(self, priv->context_menu_link); +} + +static void +on_context_copy_link(GtkAction *action, CsBook *self) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + g_debug("CS_BOOK >>> On context copy link: %s", priv->context_menu_link); + GdkAtom selection = priv->context_menu_link != NULL ? GDK_SELECTION_PRIMARY : GDK_SELECTION_CLIPBOARD; + gtk_clipboard_set_text(gtk_clipboard_get(selection), priv->context_menu_link, -1); +} + +static void +on_findbar_hide(GtkWidget *widget, CsBook *self) +{ + gtk_widget_hide(CS_BOOK_GET_PRIVATE (self)->findbar); +} + +static void +on_findbar_back(GtkWidget *widget, CsBook *self) +{ + find_text(widget, self, TRUE); +} + +static void +on_findbar_forward(GtkWidget *widget, CsBook *self) +{ + find_text(widget, self, FALSE); +} + +/* Internal functions */ + +static void +cs_book_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) +{ + GtkWidget *pane = gtk_paned_get_child1(GTK_PANED (CS_BOOK_GET_PRIVATE (CS_BOOK (object))->hpaned)); + + switch (property_id) { + case PROP_SIDEPANE_VISIBLE: + g_value_get_boolean(value) ? gtk_widget_show(pane) : gtk_widget_hide(pane); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +cs_book_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (CS_BOOK (object)); + + switch (property_id) { + case PROP_SIDEPANE_VISIBLE: + g_value_set_boolean(value, GTK_WIDGET_VISIBLE (gtk_paned_get_child1(GTK_PANED (priv->hpaned)))); + break; + case PROP_BOOK_MESSAGE: + g_value_set_string(value, priv->book_message); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +update_book_message(CsBook *self, const gchar *message) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + if (priv->book_message) + g_free(priv->book_message); + + priv->book_message = g_strdup(message); + g_object_notify(G_OBJECT(self), "book-message"); +} + +static gint +new_html_tab(CsBook *self) +{ + g_debug("CS_BOOK >>> cs_book_new_tab"); + g_return_val_if_fail(IS_CS_BOOK (self), 0); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + GtkWidget *html = cs_html_gecko_new(); + gtk_widget_show(html); + + g_signal_connect(G_OBJECT (html), + "title-changed", + G_CALLBACK (html_title_changed_cb), + self); + g_signal_connect(G_OBJECT (html), + "open-uri", + G_CALLBACK (html_open_uri_cb), + self); + g_signal_connect(G_OBJECT (html), + "location-changed", + G_CALLBACK (html_location_changed_cb), + self); + g_signal_connect(G_OBJECT (html), + "context-normal", + G_CALLBACK (html_context_normal_cb), + self); + g_signal_connect(G_OBJECT (html), + "context-link", + G_CALLBACK (html_context_link_cb), + self); + g_signal_connect(G_OBJECT (html), + "open-new-tab", + G_CALLBACK (html_open_new_tab_cb), + self); + g_signal_connect(G_OBJECT (html), + "link-message", + G_CALLBACK (html_link_message_cb), + self); + + /* customized label, add a close button rightmost */ + GtkWidget *tab_label = new_tab_label(self, _("No Title")); + g_object_set_data(G_OBJECT (tab_label), "html", html); + + gint page_num = gtk_notebook_append_page(GTK_NOTEBOOK (priv->html_notebook), + html, + tab_label); + gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK (priv->html_notebook), + html, + TRUE, TRUE, + GTK_PACK_START); + + g_debug("CS_BOOK >>> new tab html_notebook append page = %d", page_num); + + return page_num; +} + +static GtkWidget* +new_tab_label(CsBook *self, const gchar *str) +{ + GtkWidget *hbox = gtk_hbox_new(FALSE, 2); + + GtkWidget *label = gtk_label_new(str); + gtk_label_set_ellipsize(GTK_LABEL (label), PANGO_ELLIPSIZE_END); + gtk_label_set_single_line_mode(GTK_LABEL (label), TRUE); + gtk_misc_set_alignment(GTK_MISC (label), 0.0, 0.5); + gtk_misc_set_padding(GTK_MISC (label), 0, 0); + gtk_box_pack_start(GTK_BOX (hbox), label, TRUE, TRUE, 0); + g_object_set_data(G_OBJECT (hbox), "label", label); + + GtkWidget *close_button = gtk_button_new(); + gtk_button_set_relief(GTK_BUTTON (close_button), GTK_RELIEF_NONE); + gtk_container_set_border_width(GTK_CONTAINER (close_button), 0); + + GtkWidget *close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); + gtk_misc_set_padding(GTK_MISC (close_image), 0, 0); + gtk_button_set_image(GTK_BUTTON (close_button), close_image); + + /* gtk_container_add(GTK_CONTAINER (close_button), close_image); */ + + g_signal_connect(G_OBJECT (close_button), + "clicked", + G_CALLBACK (on_tab_close), + self); + + gtk_box_pack_start(GTK_BOX (hbox), close_button, FALSE, FALSE, 0); + + gtk_widget_show_all(hbox); + + return hbox; +} + +static void +update_tab_title(CsBook *self, CsHtmlGecko *html, const gchar *title) +{ + g_debug("CS_BOOK >>> update tab title = %s", title); + GtkWidget *widget = gtk_notebook_get_tab_label(GTK_NOTEBOOK (CS_BOOK_GET_PRIVATE (self)->html_notebook), + GTK_WIDGET (html)); + GtkWidget *label = g_object_get_data(G_OBJECT (widget), "label"); + gtk_label_set_text(GTK_LABEL (label), title); +} + +static void +set_context_menu_link(CsBook *self, const gchar *link) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + g_free(priv->context_menu_link); + priv->context_menu_link = g_strdup(link); +} + +static void +find_text(GtkWidget *widget, CsBook *self, gboolean backward) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + GtkWidget *match_case = g_object_get_data(G_OBJECT (priv->findbar), "find-case"); + gboolean mcase = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (match_case)); + + GtkWidget *find_entry = g_object_get_data(G_OBJECT (priv->findbar), "find-entry"); + const gchar *text = gtk_entry_get_text(GTK_ENTRY (find_entry)); + + if (GTK_IS_BUTTON (widget) && backward && mcase) { + if (g_str_has_prefix(text, "gecko:about:")) { + g_debug("CS_BOOK >>> call Gecko about: protocol = %s", text); + cs_html_gecko_load_url(priv->active_html, text+6); + return; + } + } + + cs_html_gecko_find(priv->active_html, text, backward, mcase); +} + +static void +update_tab_label_state(CsBook *self) +{ + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + gboolean show = gtk_notebook_get_n_pages(GTK_NOTEBOOK (priv->html_notebook)) > 1 ? TRUE : FALSE; + gtk_notebook_set_show_tabs(GTK_NOTEBOOK (priv->html_notebook), show); +} + +static gint +uri_compare(gconstpointer a, gconstpointer b) +{ + return ncase_compare_utf8_string(((Link *)a)->uri, (gchar *)b); +} + +static const gchar * +get_short_uri(CsChmfile *chmfile, const gchar *uri) +{ + const gchar *bookfolder = cs_chmfile_get_bookfolder(chmfile); + + const gchar *short_uri = g_strrstr(uri, bookfolder); + if (short_uri == NULL) + short_uri = uri; + else + short_uri = short_uri + strlen(bookfolder); + + if (short_uri[0] == '/') + short_uri = short_uri + 1; + + return short_uri; +} + +static GList *get_toc_current(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), NULL); + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + GList *toc_list = cs_chmfile_get_toc_list(priv->model); + gchar *location = cs_html_gecko_get_location(priv->active_html); + const gchar *short_uri = get_short_uri(priv->model, location); + GList *current = g_list_find_custom(toc_list, short_uri, uri_compare); + g_free(location); + + return current; +} + +/* External functions*/ + +GtkWidget * +cs_book_new(void) +{ + g_debug("CS_BOOK >>> create"); + return GTK_WIDGET (g_object_new(CS_TYPE_BOOK, NULL)); +} + +void +cs_book_set_model(CsBook *self, CsChmfile *model) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + g_debug("CS_BOOK >>> set model, file = %p", model); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + /* close opened book */ + if (priv->model) { + GList *old_list = cs_bookmarks_get_model(CS_BOOKMARKS (priv->bookmarks_page)); + cs_chmfile_update_bookmarks_list(priv->model, old_list); + + /* remove all notebook page tab */ + gint i, num; + num = gtk_notebook_get_n_pages(GTK_NOTEBOOK (priv->control_notebook)); + for (i = 0; i < num; i++) { + gtk_notebook_remove_page(GTK_NOTEBOOK (priv->control_notebook), -1); + } + + num = gtk_notebook_get_n_pages(GTK_NOTEBOOK (priv->html_notebook)); + for (i = 0; i < num; i++) { + gtk_notebook_remove_page(GTK_NOTEBOOK (priv->html_notebook), -1); + } + + g_object_unref(priv->model); + } + + priv->model = g_object_ref(model); + + cs_html_gecko_set_variable_font(cs_chmfile_get_variable_font(model)); + cs_html_gecko_set_fixed_font(cs_chmfile_get_fixed_font(model)); + + gint cur_page = 0; + + /* TOC */ + GNode *toc_tree = cs_chmfile_get_toc_tree(model); + if (toc_tree != NULL) { + priv->toc_page = GTK_WIDGET (cs_toc_new()); + cs_toc_set_model(CS_TOC (priv->toc_page), toc_tree); + cur_page = gtk_notebook_append_page(GTK_NOTEBOOK (priv->control_notebook), + priv->toc_page, + gtk_label_new(_("Topics"))); + + g_signal_connect(G_OBJECT (priv->toc_page), + "link-selected", + G_CALLBACK (link_selected_cb), + self); + } else { + g_message("CS_BOOK >>> this book dose not include a toc"); + } + + /* index */ + GList* index_list = cs_chmfile_get_index_list(model); + if(index_list != NULL) { + priv->index_page = GTK_WIDGET (cs_index_new()); + cs_index_set_model(CS_INDEX (priv->index_page), index_list); + cur_page = gtk_notebook_append_page(GTK_NOTEBOOK (priv->control_notebook), + priv->index_page, + gtk_label_new(_("Index"))); + + g_signal_connect(G_OBJECT (priv->index_page), + "link-selected", + G_CALLBACK (link_selected_cb), + self); + } else { + g_message("CS_BOOK >>> this book dose not include an index"); + } + + /* bookmarks */ + GList *bookmarks_list = cs_chmfile_get_bookmarks_list(model); + priv->bookmarks_page = GTK_WIDGET (cs_bookmarks_new()); + cs_bookmarks_set_model(CS_BOOKMARKS (priv->bookmarks_page), bookmarks_list); + cur_page = gtk_notebook_append_page(GTK_NOTEBOOK (priv->control_notebook), + priv->bookmarks_page, + gtk_label_new (_("Bookmarks"))); + + g_signal_connect(G_OBJECT (priv->bookmarks_page), + "link-selected", + G_CALLBACK (link_selected_cb), + self); + + if (g_list_length(bookmarks_list) == 0) + cur_page = 0; + + gtk_notebook_set_current_page(GTK_NOTEBOOK (priv->control_notebook), cur_page); + gtk_widget_show_all(priv->control_notebook); + + cur_page = new_html_tab(self); + update_tab_label_state(self); + + gtk_notebook_set_current_page(GTK_NOTEBOOK (priv->html_notebook), cur_page); + gtk_widget_show_all(priv->html_notebook); + + const gchar *page = cs_chmfile_get_page(model); + if (page) { + cs_book_load_url(self, page, TRUE); + } else { + cs_book_homepage(self); + } + + g_signal_emit(self, signals[MODEL_CHANGED], 0, model, NULL); +} + +void +cs_book_load_url(CsBook *self, const gchar *uri, gboolean force_reload) +{ + g_debug("CS_BOOK >>> load uri %s", uri); + + g_return_if_fail(IS_CS_BOOK (self)); + + if (uri == NULL || strlen(uri) == 0) + return; + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + /* Concatenate bookfolder and short uri */ + const gchar *pattern = NULL; + if (uri[0] == '/') + pattern = "file://%s%s"; + else + pattern = "file://%s/%s"; + + gchar *full_uri = g_strdup_printf(pattern, cs_chmfile_get_bookfolder(priv->model), uri); + + /* Check file exist */ + gchar *real_uri = get_real_uri(full_uri); + gchar *filename = g_filename_from_uri(real_uri, NULL, NULL); + gboolean file_exist = g_file_test(filename, G_FILE_TEST_EXISTS); + + if (!file_exist) { + /* search again with case insensitive name */ + gchar *found = file_exist_ncase(filename); + if (found != NULL) { + g_free(full_uri); + + full_uri = g_strdup_printf("file://%s%s", found, full_uri+strlen(real_uri)); + g_free(found); + file_exist = TRUE; + } + } + + if (file_exist) { + gchar *location = cs_html_gecko_get_location(priv->active_html); + if (force_reload || g_strcmp0(full_uri, location)) { + /* set user specified charset */ + const gchar *charset = cs_chmfile_get_charset(CS_CHMFILE (priv->model)); + if (charset && strlen(charset)) + cs_html_gecko_set_charset(priv->active_html, charset); + + g_signal_handlers_block_by_func(priv->active_html, html_open_uri_cb, self); + cs_html_gecko_load_url(priv->active_html, full_uri); + g_signal_handlers_unblock_by_func(priv->active_html, html_open_uri_cb, self); + } + g_free(location); + } else { + GtkWidget *msg_dialog; + + msg_dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("Can not find link target file at \"%s\""), + filename); + gtk_dialog_run(GTK_DIALOG (msg_dialog)); + gtk_widget_destroy(msg_dialog); + + g_message("CS_BOOK >>> cannot find target file = %s", filename); + } + + g_free(full_uri); + g_free(real_uri); + g_free(filename); +} + +void +cs_book_new_tab_with_fulluri(CsBook *self, const gchar *full_uri) +{ + g_debug("CS_BOOK >>> new tab with full url %s", full_uri); + + g_return_if_fail(IS_CS_BOOK (self)); + + if (full_uri == NULL || strlen(full_uri) == 0) + return; + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + char *scheme = g_uri_parse_scheme(full_uri); + if (scheme && g_strcmp0(scheme, "file")) { + gchar *message = g_strdup_printf("URI %s with unsupported protocol: %s", full_uri, scheme); + g_message("%s", message); + update_book_message(self, message); + g_free(message); + } else { + gtk_notebook_set_current_page(GTK_NOTEBOOK (priv->html_notebook), + new_html_tab(self)); + update_tab_label_state(self); + + cs_book_load_url(self, + get_short_uri(priv->model, full_uri), + TRUE); + } + g_free(scheme); +} + +gboolean +cs_book_can_close_tab(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), FALSE); + + return (gtk_notebook_get_n_pages(GTK_NOTEBOOK (CS_BOOK_GET_PRIVATE (self)->html_notebook)) > 1); +} + +void +cs_book_close_current_tab(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + if (gtk_notebook_get_n_pages(GTK_NOTEBOOK (priv->html_notebook)) == 1) + return; + + gint page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK (priv->html_notebook)); + g_debug("CS_BOOK >>> cs_book_close_current_tab current page No = %d", page_num); + + if (page_num >= 0) + gtk_notebook_remove_page(GTK_NOTEBOOK (priv->html_notebook), page_num); + + update_tab_label_state(self); +} + +void +cs_book_reload_current_page(CsBook *self) +{ + g_debug("CS_BOOK >>> Reload current page"); + g_return_if_fail(IS_CS_BOOK (self)); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + if (priv->model != NULL) { + const gchar *charset = cs_chmfile_get_charset(CS_CHMFILE (priv->model)); + if (charset && strlen(charset)) + cs_html_gecko_set_charset(priv->active_html, charset); + cs_html_gecko_reload(priv->active_html); + } +} + +void +cs_book_homepage(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + const gchar *homepage = cs_chmfile_get_homepage(CS_BOOK_GET_PRIVATE (self)->model); + + if (homepage != NULL) + cs_book_load_url(self, homepage, FALSE); +} + +gboolean +cs_book_has_homepage(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), FALSE); + + return cs_chmfile_get_homepage(CS_BOOK_GET_PRIVATE (self)->model) != NULL ? TRUE : FALSE; +} + +gboolean +cs_book_can_go_back(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), FALSE); + + return cs_html_gecko_can_go_back(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +gboolean +cs_book_can_go_forward(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), FALSE); + + return cs_html_gecko_can_go_forward(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +void +cs_book_go_back(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_go_back(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +void +cs_book_go_forward(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_go_forward(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +void +cs_book_go_prev(CsBook *self) +{ + g_debug("CS_BOOK >>> go prev"); + g_return_if_fail(IS_CS_BOOK (self)); + + GList *current = get_toc_current(self); + + if (current && current->prev) { + gchar *uri = ((Link *)current->prev->data)->uri; + cs_book_load_url(self, uri, FALSE); + } +} + +void +cs_book_go_next(CsBook *self) +{ + g_debug("CS_BOOK >>> go next"); + g_return_if_fail(IS_CS_BOOK (self)); + + GList *current = get_toc_current(self); + + if (current && current->next) { + gchar *uri = ((Link *)current->next->data)->uri; + cs_book_load_url(self, uri, FALSE); + } +} + +void +cs_book_zoom_in(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_increase_size(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +void +cs_book_zoom_out(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_decrease_size(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +void +cs_book_zoom_reset(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_reset_size(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +gboolean +cs_book_can_copy(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), FALSE); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + if (priv->active_html != NULL) + return cs_html_gecko_can_copy_selection(priv->active_html); + else + return FALSE; +} + +void +cs_book_copy(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_copy_selection(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +void +cs_book_select_all(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + cs_html_gecko_select_all(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +gchar * +cs_book_get_location(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), NULL); + + return cs_html_gecko_get_location(CS_BOOK_GET_PRIVATE (self)->active_html); +} + +int +cs_book_get_hpaned_position(CsBook *self) +{ + g_return_val_if_fail(IS_CS_BOOK (self), 0); + + return gtk_paned_get_position(GTK_PANED (CS_BOOK_GET_PRIVATE (self)->hpaned)); +} + +void +cs_book_set_hpaned_position(CsBook *self, gint position) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + gtk_paned_set_position(GTK_PANED (CS_BOOK_GET_PRIVATE (self)->hpaned), position); +} + +void +cs_book_findbar_show(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + CsBookPrivate *priv = CS_BOOK_GET_PRIVATE (self); + + gtk_widget_show(priv->findbar); + gtk_widget_grab_focus(g_object_get_data(G_OBJECT (priv->findbar), "find-entry")); +} + +void +cs_book_findbar_hide(CsBook *self) +{ + g_return_if_fail(IS_CS_BOOK (self)); + + gtk_widget_hide(CS_BOOK_GET_PRIVATE (self)->findbar); +} diff -Nru chmsee-1.0.7/src/components/book.h chmsee-1.3.0/src/components/book.h --- chmsee-1.0.7/src/components/book.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/book.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_BOOK_H__ +#define __CS_BOOK_H__ + +#include +#include + +#include "models/chmfile.h" + +G_BEGIN_DECLS + +#define CS_TYPE_BOOK (cs_book_get_type ()) +#define CS_BOOK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_BOOK, CsBook)) +#define CS_BOOK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CS_TYPE_BOOK, CsBookClass)) +#define IS_CS_BOOK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_BOOK)) +#define IS_CS_BOOK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CS_TYPE_BOOK)) + +typedef struct _CsBook CsBook; +typedef struct _CsBookClass CsBookClass; + +struct _CsBook { + GtkVBox vbox; +}; + +struct _CsBookClass { + GtkVBoxClass parent_class; +}; + +GType cs_book_get_type(void); + +GtkWidget *cs_book_new(void); +void cs_book_set_model(CsBook *, CsChmfile *); + +void cs_book_new_tab_with_fulluri(CsBook *, const gchar *); +void cs_book_load_url(CsBook *, const gchar *, gboolean); +gboolean cs_book_can_close_tab(CsBook *); +void cs_book_close_current_tab(CsBook *); +void cs_book_reload_current_page(CsBook *); + +gboolean cs_book_has_homepage(CsBook *); +void cs_book_homepage(CsBook *); +gboolean cs_book_can_go_back(CsBook *); +void cs_book_go_back(CsBook *); +gboolean cs_book_can_go_forward(CsBook *); +void cs_book_go_forward(CsBook *); +void cs_book_go_prev(CsBook *); +void cs_book_go_next(CsBook *); + +void cs_book_zoom_in(CsBook *); +void cs_book_zoom_out(CsBook *); +void cs_book_zoom_reset(CsBook *); + +gboolean cs_book_can_copy(CsBook *); +void cs_book_copy(CsBook *); +void cs_book_select_all(CsBook *); + +gchar *cs_book_get_location(CsBook *); +int cs_book_get_hpaned_position(CsBook *); +void cs_book_set_hpaned_position(CsBook *, gint); + +void cs_book_findbar_show(CsBook *); +void cs_book_findbar_hide(CsBook *); + +G_END_DECLS + +#endif /* !__CS_BOOK_H__ */ diff -Nru chmsee-1.0.7/src/components/bookmarks.c chmsee-1.3.0/src/components/bookmarks.c --- chmsee-1.0.7/src/components/bookmarks.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/bookmarks.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,307 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include + +#include "bookmarks.h" +#include "treeview.h" +#include "utils.h" + +/* Signals */ +enum { + LINK_SELECTED, + LAST_SIGNAL +}; + +typedef struct _CsBookmarksPrivate CsBookmarksPrivate; + +struct _CsBookmarksPrivate { + GtkWidget *treeview; + GtkWidget *entry; + GtkWidget *add_button; + GtkWidget *remove_button; + + GList *links; + gchar *current_uri; +}; + +static gint signals[LAST_SIGNAL] = { 0 }; + +static void cs_bookmarks_init(CsBookmarks *); +static void cs_bookmarks_class_init(CsBookmarksClass *); +static void cs_bookmarks_finalize(GObject *); + +static void link_selected_cb(CsBookmarks *, Link *); +static void entry_changed_cb(GtkEntry *, CsBookmarks *); +static void on_bookmarks_add(CsBookmarks *); +static void on_bookmarks_remove(CsBookmarks *); + +static gint link_uri_compare(gconstpointer, gconstpointer); + +#define CS_BOOKMARKS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CS_TYPE_BOOKMARKS, CsBookmarksPrivate)) + +/* GObject functions */ + +G_DEFINE_TYPE (CsBookmarks, cs_bookmarks, GTK_TYPE_VBOX); + +static void +cs_bookmarks_class_init(CsBookmarksClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private(klass, sizeof(CsBookmarksPrivate)); + + object_class->finalize = cs_bookmarks_finalize; + + signals[LINK_SELECTED] = + g_signal_new("link-selected", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (CsBookmarksClass, link_selected), + NULL, + NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); +} + +static void +cs_bookmarks_init(CsBookmarks *self) +{ + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (self); + + priv->current_uri = NULL; + priv->links = NULL; + + /* bookmarks list */ + GtkWidget *frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME (frame), GTK_SHADOW_NONE); + + GtkWidget *list_sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (list_sw), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + + priv->treeview = GTK_WIDGET (cs_tree_view_new(FALSE)); + + g_signal_connect_swapped(priv->treeview, + "link-selected", + G_CALLBACK (link_selected_cb), + self); + + gtk_container_add(GTK_CONTAINER (list_sw), priv->treeview); + gtk_container_add(GTK_CONTAINER (frame), list_sw); + gtk_box_pack_start(GTK_BOX (self), frame, TRUE, TRUE, 0); + + /* bookmark title */ + priv->entry = gtk_entry_new(); + gtk_entry_set_max_length(GTK_ENTRY (priv->entry), ENTRY_MAX_LENGTH); + + g_signal_connect(priv->entry, + "changed", + G_CALLBACK (entry_changed_cb), + self); + + gtk_box_pack_start(GTK_BOX (self), priv->entry, FALSE, FALSE, 2); + + /* add and remove button */ + GtkWidget *hbox = gtk_hbox_new(FALSE, 0); + + priv->add_button = gtk_button_new_from_stock(GTK_STOCK_ADD); + g_signal_connect_swapped(G_OBJECT (priv->add_button), + "clicked", + G_CALLBACK (on_bookmarks_add), + self); + + priv->remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); + g_signal_connect_swapped(G_OBJECT (priv->remove_button), + "clicked", + G_CALLBACK (on_bookmarks_remove), + self); + + gtk_box_pack_end(GTK_BOX (hbox), priv->add_button, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX (hbox), priv->remove_button, TRUE, TRUE, 0); + + gtk_box_pack_start(GTK_BOX (self), hbox, FALSE, FALSE, 2); + + gtk_box_set_spacing(GTK_BOX (self), 2); + + gtk_widget_show_all(GTK_WIDGET (self)); +} + +static void +cs_bookmarks_finalize(GObject *object) +{ + g_debug("CS_BOOKMARKS >>> finalize"); + + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (CS_BOOKMARKS (object)); + + g_free(priv->current_uri); + priv->links = NULL; + + G_OBJECT_CLASS (cs_bookmarks_parent_class)->finalize(object); +} + +/* Callbacks */ + +static void +link_selected_cb(CsBookmarks *self, Link *link) +{ + g_debug("CS_BOOKMARKS >>> Emiting link-selected signal"); + + if (link) + g_signal_emit(self, signals[LINK_SELECTED], 0, link); +} + +static void +entry_changed_cb(GtkEntry *entry, CsBookmarks *self) +{ + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (self); + + const gchar *name = gtk_entry_get_text(entry); + gboolean sensitive = strlen(name) > 2 ? TRUE : FALSE; + + gtk_widget_set_sensitive(priv->add_button, sensitive); +} + +static void +on_bookmarks_add(CsBookmarks *self) +{ + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (self); + g_debug("CS_BOOKMARKS >>> add button clicked, current_uri = %p", priv->current_uri); + + if (priv->current_uri == NULL) + return; + + const gchar *name = gtk_entry_get_text(GTK_ENTRY (priv->entry)); + GList *found_link = g_list_find_custom(priv->links, priv->current_uri, link_uri_compare); + + Link *link; + + if (found_link) { + /* update exist bookmark name */ + link = LINK (found_link->data); + if (ncase_compare_utf8_string(link->name, name) != 0) { + cs_tree_view_remove_link(CS_TREE_VIEW (priv->treeview), link); + g_free(link->name); + + link->name = g_strdup(name); + cs_tree_view_add_link(CS_TREE_VIEW (priv->treeview), link); + } + } else { + /* new bookmark */ + link = link_new(LINK_TYPE_PAGE, name, priv->current_uri); + priv->links = g_list_append(priv->links, link); + + cs_tree_view_add_link(CS_TREE_VIEW (priv->treeview), link); + } +} + +static void +on_bookmarks_remove(CsBookmarks *self) +{ + g_debug("CS_BOOKMARKS >>> remove button clicked"); + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (self); + + Link *link = cs_tree_view_get_selected_link(CS_TREE_VIEW (priv->treeview)); + if (link) { + cs_tree_view_remove_link(CS_TREE_VIEW (priv->treeview), link); + + GList *list = g_list_find_custom(priv->links, link->uri, link_uri_compare); + Link *found_link = (Link *)list->data; + + if (found_link) { + priv->links = g_list_remove(priv->links, found_link); + link_free(found_link); + } + link_free(link); + } +} + +/* Internal functions */ + +static gint +link_uri_compare(gconstpointer a, gconstpointer b) +{ + return ncase_compare_utf8_string(((Link *)a)->uri, (char *)b); +} + +/* External functions */ + +GtkWidget * +cs_bookmarks_new(void) +{ + g_debug("CS_BOOKMARKS >>> create"); + CsBookmarks *self = g_object_new(CS_TYPE_BOOKMARKS, NULL); + + return GTK_WIDGET (self); +} + +void +cs_bookmarks_set_model(CsBookmarks* self, GList* model) +{ + g_debug("CS_BOOKMARKS >>> set model"); + g_return_if_fail(IS_CS_BOOKMARKS (self)); + + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (self); + + priv->links = model; + cs_tree_view_set_model(CS_TREE_VIEW (priv->treeview), model); + gtk_entry_set_text(GTK_ENTRY (priv->entry), ""); +} + +GList * +cs_bookmarks_get_model(CsBookmarks *self) +{ + g_return_val_if_fail(IS_CS_BOOKMARKS (self), NULL); + + return CS_BOOKMARKS_GET_PRIVATE (self)->links; +} + +void +cs_bookmarks_set_current_link(CsBookmarks *self, const Link *link) +{ + g_return_if_fail(IS_CS_BOOKMARKS (self)); + + CsBookmarksPrivate *priv = CS_BOOKMARKS_GET_PRIVATE (self); + + g_debug("CS_BOOKMARKS >>> set bookmarks entry text = %s", link->name); + gchar *entry_text = g_strndup(link->name, ENTRY_MAX_LENGTH - 1); + gtk_entry_set_text(GTK_ENTRY (priv->entry), entry_text); + g_free(entry_text); + + gtk_editable_set_position(GTK_EDITABLE (priv->entry), -1); + gtk_editable_select_region(GTK_EDITABLE (priv->entry), -1, -1); + + g_debug("CS_BOOKMARKS >>> set current link = %s", link->uri); + g_free(priv->current_uri); + priv->current_uri = g_strdup(link->uri); +} + +void +cs_bookmarks_grab_focus(CsBookmarks *self) +{ + g_return_if_fail(IS_CS_BOOKMARKS (self)); + + gtk_widget_grab_focus(CS_BOOKMARKS_GET_PRIVATE (self)->entry); +} diff -Nru chmsee-1.0.7/src/components/bookmarks.h chmsee-1.3.0/src/components/bookmarks.h --- chmsee-1.0.7/src/components/bookmarks.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/bookmarks.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_BOOKMARKS_H__ +#define __CS_BOOKMARKS_H__ + +#include +#include + +#include "models/link.h" + +G_BEGIN_DECLS + +#define CS_TYPE_BOOKMARKS (cs_bookmarks_get_type()) +#define CS_BOOKMARKS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_BOOKMARKS, CsBookmarks)) +#define CS_BOOKMARKS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CS_TYPE_BOOKMARKS, CsBookmarksClass)) +#define IS_CS_BOOKMARKS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_BOOKMARKS)) +#define IS_CS_BOOKMARKS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CS_TYPE_BOOKMARKS)) + +typedef struct _CsBookmarks CsBookmarks; +typedef struct _CsBookmarksClass CsBookmarksClass; + +struct _CsBookmarks { + GtkVBox vbox; +}; + +struct _CsBookmarksClass { + GtkVBoxClass parent_class; + + /* Signals */ + void (*link_selected) (CsBookmarks *self, Link *link); +}; + +GType cs_bookmarks_get_type(void); +GtkWidget *cs_bookmarks_new(void); + +void cs_bookmarks_set_model(CsBookmarks *, GList *); +GList *cs_bookmarks_get_model(CsBookmarks *); +void cs_bookmarks_set_current_link(CsBookmarks *, const Link *); +void cs_bookmarks_grab_focus(CsBookmarks *); + +G_END_DECLS + +#endif /* !__CS_BOOKMARKS_H__ */ diff -Nru chmsee-1.0.7/src/components/gecko-utils.cpp chmsee-1.3.0/src/components/gecko-utils.cpp --- chmsee-1.0.7/src/components/gecko-utils.cpp 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/gecko-utils.cpp 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,450 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/* + * Copyright (C) 2004 Imendio AB + * Copyright (C) 2004 Marco Pesenti Gritti + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + */ + +#include "config.h" + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +// For zoom +#include +// For copy and selectAll +#include +// For find +#include + +#include +#include +#include + +#include + +#include "gecko-utils.h" +#include "utils.h" + +static nsresult gecko_utils_init_prefs(void); +static gboolean util_split_font_string(const gchar *, gchar **, gint *); +static gboolean gecko_prefs_set_bool(const gchar *, gboolean); +static gboolean gecko_prefs_set_string(const gchar *, const gchar *); +static gboolean gecko_prefs_set_int(const gchar *, gint); + +static gboolean +util_split_font_string(const gchar *font_name, gchar **name, gint *size) +{ + PangoFontDescription *desc; + PangoFontMask mask; + gboolean retval = FALSE; + + if (font_name == NULL) + return FALSE; + + mask = (PangoFontMask) (PANGO_FONT_MASK_FAMILY | PANGO_FONT_MASK_SIZE); + + desc = pango_font_description_from_string(font_name); + if (!desc) + return FALSE; + + if ((pango_font_description_get_set_fields(desc) & mask) == mask) { + *size = PANGO_PIXELS(pango_font_description_get_size(desc)); + *name = g_strdup(pango_font_description_get_family(desc)); + + retval = TRUE; + } + + pango_font_description_free(desc); + + return retval; +} + +static gboolean +gecko_prefs_set_bool(const gchar *key, gboolean value) +{ + nsresult rv; + nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + NS_ENSURE_SUCCESS (rv, FALSE); + + nsCOMPtr pref; + rv = prefService->GetBranch("", getter_AddRefs(pref)); + NS_ENSURE_SUCCESS (rv, FALSE); + + rv = pref->SetBoolPref(key, value); + + return NS_SUCCEEDED (rv) != PR_FALSE; +} + +static gboolean +gecko_prefs_set_string(const gchar *key, const gchar *value) +{ + nsresult rv; + nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + NS_ENSURE_SUCCESS (rv, FALSE); + + nsCOMPtr pref; + rv = prefService->GetBranch("", getter_AddRefs(pref)); + NS_ENSURE_SUCCESS (rv, FALSE); + + rv = pref->SetCharPref(key, value); + + return NS_SUCCEEDED (rv) != PR_FALSE; +} + +static gboolean +gecko_prefs_set_int(const gchar *key, gint value) +{ + nsresult rv; + nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + NS_ENSURE_SUCCESS (rv, FALSE); + + nsCOMPtr pref; + rv = prefService->GetBranch("", getter_AddRefs(pref)); + NS_ENSURE_SUCCESS (rv, FALSE); + + rv = pref->SetIntPref(key, value); + + return NS_SUCCEEDED (rv) != PR_FALSE; +} + +static nsresult +gecko_utils_init_prefs(void) +{ + nsresult rv; + + nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); + NS_ENSURE_SUCCESS (rv, rv); + + nsCOMPtr file; + rv = NS_NewNativeLocalFile(nsDependentCString(RESOURCE_FILE ("default-prefs.js")), + PR_TRUE, getter_AddRefs(file)); + NS_ENSURE_SUCCESS (rv, rv); + + rv = prefService->ReadUserPrefs(file); + rv |= prefService->ReadUserPrefs(nsnull); + + NS_ENSURE_SUCCESS (rv, rv); + + return rv; +} + +/* External functions */ + +extern "C" gboolean +gecko_utils_init(void) +{ + nsresult rv; + + static const GREVersionRange greVersion = { + "1.9a", PR_TRUE, + "2", PR_TRUE + }; + + char xpcomLocation[PATH_MAX]; + + rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, + xpcomLocation, sizeof(xpcomLocation)); + if (NS_FAILED (rv)) { + g_warning("GECKO_UTILS >>> Couldn't find a compatible GRE!\n"); + return FALSE; + } + + // Startup the XPCOM Glue that links us up with XPCOM. + rv = XPCOMGlueStartup(xpcomLocation); + if (NS_FAILED (rv)) { + g_warning("GECKO_UTILS >>> Couldn't start XPCOM!\n"); + return FALSE; + } + + rv = GTKEmbedGlueStartup(); + if (NS_FAILED (rv)) { + g_warning("GECKO_UTILS >>> Couldn't find GTKMozEmbed symbols!\n"); + return FALSE; + } + + rv = GTKEmbedGlueStartupInternal(); + if (NS_FAILED (rv)) { + g_warning("GECKO_UTILS >>> Could not startup embed glue (internal)!\n"); + return FALSE; + } + + char *lastSlash = strrchr(xpcomLocation, '/'); + if (lastSlash) + *lastSlash = '\0'; + + gtk_moz_embed_set_path(xpcomLocation); + + /* gecko config directory, default location is ~/.config/chmsee/mozilla */ + gchar *profile_dir = g_build_filename(g_get_user_config_dir(), + PACKAGE, + NULL); + + gtk_moz_embed_set_profile_path(profile_dir, "mozilla"); + g_free(profile_dir); + + gtk_moz_embed_push_startup(); + + gecko_utils_init_prefs(); + + g_debug("GECKO_UTILS >>> initialization finished."); + return TRUE; +} + +extern "C" void +gecko_utils_shutdown(void) +{ + gtk_moz_embed_pop_startup(); +} + +extern "C" gint +gecko_utils_get_mouse_event_button(gpointer event) +{ + nsIDOMMouseEvent *aMouseEvent; + PRUint16 button; + + aMouseEvent = (nsIDOMMouseEvent *) event; + + aMouseEvent->GetButton(&button); + + return button + 1; +} + +extern "C" gint +gecko_utils_get_mouse_event_modifiers(gpointer event) +{ + nsIDOMMouseEvent *aMouseEvent; + PRBool ctrl, alt, shift, meta; + gint mask; + + aMouseEvent = (nsIDOMMouseEvent *) event; + + aMouseEvent->GetCtrlKey(&ctrl); + aMouseEvent->GetAltKey(&alt); + aMouseEvent->GetShiftKey(&shift); + aMouseEvent->GetMetaKey(&meta); + + mask = 0; + if (ctrl) + mask |= GDK_CONTROL_MASK; + + if (alt || meta) + mask |= GDK_MOD1_MASK; + + if (shift) + mask |= GDK_SHIFT_MASK; + + return mask; +} + +extern "C" void +gecko_utils_set_font(gint type, const gchar *fontname) +{ + gchar *name; + gint size; + + name = NULL; + + if (!util_split_font_string(fontname, &name, &size)) { + g_free(name); + return; + } + + switch (type) { + case GECKO_PREF_FONT_VARIABLE: + gecko_prefs_set_string("font.name.variable.x-western", name); + gecko_prefs_set_int("font.size.variable.x-western", size); + break; + case GECKO_PREF_FONT_FIXED: + gecko_prefs_set_string("font.name.fixed.x-western", name); + gecko_prefs_set_int("font.size.fixed.x-western", size); + break; + } + + g_free(name); +} + +extern "C" gboolean +gecko_utils_find(GtkMozEmbed *embed, const gchar *str, gboolean backward, gboolean match_case) +{ + g_debug("GECKO_UTILS >>> find string = %s", str); + + nsCOMPtr webBrowser; + gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); + + nsCOMPtr finder = do_GetInterface(webBrowser); + if (finder) { + finder->SetFindBackwards(backward); + finder->SetMatchCase(match_case); + finder->SetWrapFind(PR_TRUE); + + nsString sstr = NS_ConvertUTF8toUTF16(str); + finder->SetSearchString(PromiseFlatString(sstr).get()); + + PRBool rv; + finder->FindNext(&rv); + if (rv == PR_TRUE) + return TRUE; + } + + return FALSE; +} + +extern "C" void +gecko_utils_select_all(GtkMozEmbed *embed) +{ + nsCOMPtr webBrowser; + gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); + + nsCOMPtr clipboard = do_GetInterface(webBrowser); + g_debug("GECKO_UTILS >>> select all"); + + if (!clipboard) + g_warning("GECKO_UTILS >>> could not get ClipboardCommands Interface."); + else + clipboard->SelectAll(); +} + +extern "C" gboolean +gecko_utils_can_copy_selection(GtkMozEmbed *embed) +{ + nsCOMPtr webBrowser; + gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); + + nsCOMPtr clipboard = do_GetInterface(webBrowser); + + if (!clipboard) { + g_warning("GECKO_UTILS >>> could not get ClipboardCommands Interface."); + return FALSE; + } else { + PRBool rv; + clipboard->CanCopySelection(&rv); + return rv; + } +} + +extern "C" void +gecko_utils_copy_selection(GtkMozEmbed *embed) +{ + nsCOMPtr webBrowser; + gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); + + nsCOMPtr clipboard = do_GetInterface(webBrowser); + + if (!clipboard) + g_warning("GECKO_UTILS >>> could not get ClipboardCommands Interface."); + else + clipboard->CopySelection(); +} + +extern "C" gfloat +gecko_utils_get_zoom(GtkMozEmbed *embed) +{ + nsCOMPtr webBrowser; + nsCOMPtr domWindow; + float zoom; + + gtk_moz_embed_get_nsIWebBrowser(GTK_MOZ_EMBED(embed), getter_AddRefs(webBrowser)); + webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); + + if (!domWindow) { + g_warning("GECKO_UTILS >>> could not get DOMWindow."); + return 1.0; + } + + domWindow->GetTextZoom(&zoom); + + return zoom; +} + +extern "C" void +gecko_utils_set_zoom(GtkMozEmbed *embed, gfloat zoom) +{ + g_debug("GECKO_UTILS >>> set zoom %f", zoom); + nsCOMPtr webBrowser; + nsCOMPtr domWindow; + + gtk_moz_embed_get_nsIWebBrowser(GTK_MOZ_EMBED(embed), getter_AddRefs(webBrowser)); + webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); + + if (!domWindow) { + g_warning("GECKO_UTILS >>> Could not get DOMWindow."); + return; + } + + domWindow->SetTextZoom(zoom); +} + +extern "C" void +gecko_utils_set_charset(GtkMozEmbed *embed, const char *charset) +{ + nsCOMPtr webBrowser; + gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); + + nsCOMPtr docCharset = do_GetInterface(webBrowser); + if (docCharset) { + g_debug("GECKO_UTILS >>> set docCharset to %s", charset); + g_strcmp0(charset, "Auto") ? docCharset->SetCharset(charset) : docCharset->SetCharset(""); + } +} + +extern "C" char * +gecko_utils_get_charset(GtkMozEmbed *embed) +{ + nsCOMPtr webBrowser; + gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); + + char *charset = NULL; + + nsCOMPtr docCharset = do_GetInterface(webBrowser); + if (docCharset) { + docCharset->GetCharset(&charset); + g_debug("GECKO_UTILS >>> get docCharset : %s", charset); + } + + return charset; +} diff -Nru chmsee-1.0.7/src/components/gecko-utils.h chmsee-1.3.0/src/components/gecko-utils.h --- chmsee-1.0.7/src/components/gecko-utils.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/gecko-utils.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/* + * Copyright (C) 2004 Imendio AB + * Copyright (C) 2004 Marco Pesenti Gritti + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + */ + +#ifndef __GECKO_UTILS_H__ +#define __GECKO_UTILS_H__ + +#include + +G_BEGIN_DECLS + +enum { + GECKO_PREF_FONT_VARIABLE, + GECKO_PREF_FONT_FIXED +}; + +gboolean gecko_utils_init(void); +void gecko_utils_shutdown(void); +gint gecko_utils_get_mouse_event_button(gpointer); +gint gecko_utils_get_mouse_event_modifiers(gpointer); +void gecko_utils_set_font(gint, const gchar *); +void gecko_utils_select_all(GtkMozEmbed *); +gboolean gecko_utils_can_copy_selection(GtkMozEmbed *); +void gecko_utils_copy_selection(GtkMozEmbed *); +gfloat gecko_utils_get_zoom(GtkMozEmbed *); +void gecko_utils_set_zoom(GtkMozEmbed *, gfloat); +gboolean gecko_utils_find(GtkMozEmbed *, const gchar *, gboolean, gboolean); + +void gecko_utils_set_charset(GtkMozEmbed *, const char *); +char *gecko_utils_get_charset(GtkMozEmbed *); + +G_END_DECLS + +#endif /* __GECKO_UTILS_H__ */ diff -Nru chmsee-1.0.7/src/components/html-gecko.c chmsee-1.3.0/src/components/html-gecko.c --- chmsee-1.0.7/src/components/html-gecko.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/html-gecko.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,483 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include "html-gecko.h" +#include "utils.h" +#include "gecko-utils.h" + +typedef struct _CsHtmlGeckoPrivate CsHtmlGeckoPrivate; + +struct _CsHtmlGeckoPrivate { + GtkMozEmbed *gecko; + gchar *render_name; + gchar *current_url; +}; + +static void cs_html_gecko_class_init(CsHtmlGeckoClass *); +static void cs_html_gecko_init(CsHtmlGecko *); +static void cs_html_gecko_finalize(GObject *); + +static void gecko_title_cb(GtkMozEmbed *, CsHtmlGecko *); +static void gecko_location_cb(GtkMozEmbed *, CsHtmlGecko *); +static gboolean gecko_open_uri_cb(GtkMozEmbed *, const gchar *, CsHtmlGecko *); +static gboolean gecko_mouse_click_cb(GtkMozEmbed *, gpointer, CsHtmlGecko *); +static void gecko_link_message_cb(GtkMozEmbed *, CsHtmlGecko *); +static void gecko_child_add_cb(GtkMozEmbed *, GtkWidget *, CsHtmlGecko *); +static void gecko_child_remove_cb(GtkMozEmbed *, GtkWidget *, CsHtmlGecko *); +static void gecko_child_grab_focus_cb(GtkWidget *, CsHtmlGecko *); + +/* Signals */ +enum { + TITLE_CHANGED, + LOCATION_CHANGED, + OPEN_URI, + CONTEXT_NORMAL, + CONTEXT_LINK, + OPEN_NEW_TAB, + LINK_MESSAGE, + LAST_SIGNAL +}; + +static gint signals[LAST_SIGNAL] = { 0 }; + +#define CS_HTML_GECKO_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CS_TYPE_HTML_GECKO, CsHtmlGeckoPrivate)) + +/* GObject functions */ + +G_DEFINE_TYPE (CsHtmlGecko, cs_html_gecko, GTK_TYPE_FRAME); + +static void +cs_html_gecko_class_init(CsHtmlGeckoClass *klass) +{ + G_OBJECT_CLASS (klass)->finalize = cs_html_gecko_finalize; + g_type_class_add_private(klass, sizeof(CsHtmlGeckoPrivate)); + + signals[TITLE_CHANGED] = + g_signal_new ("title-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_VOID__STRING, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + signals[LOCATION_CHANGED] = + g_signal_new("location-changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_VOID__STRING, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + signals[OPEN_URI] = + g_signal_new("open-uri", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_BOOLEAN__POINTER, + G_TYPE_BOOLEAN, + 1, G_TYPE_POINTER); + + signals[CONTEXT_NORMAL] = + g_signal_new("context-normal", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + + signals[CONTEXT_LINK] = + g_signal_new("context-link", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_VOID__STRING, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + signals[OPEN_NEW_TAB] = + g_signal_new("open-new-tab", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_VOID__STRING, + G_TYPE_NONE, + 1, G_TYPE_STRING); + + signals[LINK_MESSAGE] = + g_signal_new("link-message", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + gtk_marshal_VOID__STRING, + G_TYPE_NONE, + 1, G_TYPE_STRING); +} + +static void +cs_html_gecko_init(CsHtmlGecko *html) +{ + CsHtmlGeckoPrivate *priv = CS_HTML_GECKO_GET_PRIVATE (html); + priv->gecko = GTK_MOZ_EMBED(gtk_moz_embed_new()); + gtk_widget_show(GTK_WIDGET (priv->gecko)); + priv->render_name = g_strdup("Mozilla Gecko"); + priv->current_url = NULL; + + gtk_frame_set_shadow_type(GTK_FRAME (html), GTK_SHADOW_NONE); + gtk_container_add(GTK_CONTAINER (html), GTK_WIDGET (priv->gecko)); + + g_signal_connect(G_OBJECT (priv->gecko), + "title", + G_CALLBACK (gecko_title_cb), + html); + g_signal_connect(G_OBJECT (priv->gecko), + "location", + G_CALLBACK (gecko_location_cb), + html); + g_signal_connect(G_OBJECT (priv->gecko), + "open-uri", + G_CALLBACK (gecko_open_uri_cb), + html); + g_signal_connect(G_OBJECT (priv->gecko), + "dom_mouse_click", + G_CALLBACK (gecko_mouse_click_cb), + html); + g_signal_connect(G_OBJECT (priv->gecko), + "link_message", + G_CALLBACK (gecko_link_message_cb), + html); + g_signal_connect(G_OBJECT (priv->gecko), + "add", + G_CALLBACK (gecko_child_add_cb), + html); + g_signal_connect(G_OBJECT (priv->gecko), + "remove", + G_CALLBACK (gecko_child_remove_cb), + html); +} + +static void +cs_html_gecko_finalize(GObject *object) +{ + CsHtmlGeckoPrivate *priv = CS_HTML_GECKO_GET_PRIVATE (CS_HTML_GECKO (object)); + + g_free(priv->render_name); + g_free(priv->current_url); + G_OBJECT_CLASS (cs_html_gecko_parent_class)->finalize(object); +} + +/* Callbacks */ + +static void +gecko_title_cb(GtkMozEmbed *embed, CsHtmlGecko *html) +{ + char *new_title = gtk_moz_embed_get_title(embed); + g_signal_emit(html, signals[TITLE_CHANGED], 0, new_title); + g_free(new_title); +} + +static void +gecko_location_cb(GtkMozEmbed *embed, CsHtmlGecko *html) +{ + gchar *location = gtk_moz_embed_get_location(embed); + g_debug("CS_HTML_GECKO >>> send location changed signal, location = %s", location); + g_signal_emit(html, signals[LOCATION_CHANGED], 0, location); + g_free(location); +} + +static gboolean +gecko_open_uri_cb(GtkMozEmbed *embed, const gchar *uri, CsHtmlGecko *html) +{ + gboolean ret_val = TRUE; + + g_debug("CS_HTML_GECKO >>> send open-uri signal, uri = %s", uri); + g_signal_emit(html, signals[OPEN_URI], 0, uri, &ret_val); + + return ret_val; +} + +static gboolean +gecko_mouse_click_cb(GtkMozEmbed *widget, gpointer dom_event, CsHtmlGecko *html) +{ + g_debug("CS_HTML_GECKO >>> mouse click callback"); + CsHtmlGeckoPrivate *priv = CS_HTML_GECKO_GET_PRIVATE (html); + gint button = gecko_utils_get_mouse_event_button(dom_event); + gint mask = gecko_utils_get_mouse_event_modifiers(dom_event); + + g_debug("CS_HTML_GECKO >>> mouse click callback, current_url = %s", priv->current_url); + if (button == 2 || (button == 1 && mask & GDK_CONTROL_MASK)) { + if (priv->current_url && strlen(priv->current_url)) { + g_signal_emit(html, signals[OPEN_NEW_TAB], 0, priv->current_url); + + return TRUE; + } + } else if (button == 3) { + if (priv->current_url && strlen(priv->current_url)) + g_signal_emit(html, signals[CONTEXT_LINK], 0, priv->current_url); + else + g_signal_emit(html, signals[CONTEXT_NORMAL], 0); + + return TRUE; + } else if (button == 1) { + if (priv->current_url && strlen(priv->current_url)) { + char *scheme = g_uri_parse_scheme(priv->current_url); + if (scheme && (!g_strcmp0(scheme, "http") || !g_strcmp0(scheme, "https"))) { + GError *error = NULL; + g_debug("CS_HTML_GECKO >>> mouse click callback, call gtk_show_uri = %s", priv->current_url); + /* call default browser to show external link */ + gtk_show_uri(NULL, priv->current_url, gtk_get_current_event_time(), &error); + + if (error == NULL) + return TRUE; + } + } + } + + return FALSE; +} + +static void +gecko_link_message_cb(GtkMozEmbed *widget, CsHtmlGecko *html) +{ + CsHtmlGeckoPrivate *priv = CS_HTML_GECKO_GET_PRIVATE (html); + + g_free(priv->current_url); + priv->current_url = gtk_moz_embed_get_link_message(widget); + g_signal_emit(html, signals[LINK_MESSAGE], 0, priv->current_url); +} + +static void +gecko_child_add_cb(GtkMozEmbed *embed, GtkWidget *child, CsHtmlGecko *html) +{ + g_debug("CS_HTML_GECKO >>> child add callback"); + g_signal_connect(G_OBJECT (child), + "grab-focus", + G_CALLBACK (gecko_child_grab_focus_cb), + html); +} + +static void +gecko_child_remove_cb(GtkMozEmbed *embed, GtkWidget *child, CsHtmlGecko *html) +{ + g_debug("CS_HTML_GECKO >>> child remove callback"); + g_signal_handlers_disconnect_by_func(child, gecko_child_grab_focus_cb, html); +} + +static void +gecko_child_grab_focus_cb(GtkWidget *widget, CsHtmlGecko *html) +{ + g_debug("CS_HTML_GECKO >>> grab focus callback"); + + GdkEvent *event = gtk_get_current_event(); + + if (event == NULL) + g_signal_stop_emission_by_name(widget, "grab-focus"); + else + gdk_event_free(event); +} + +/* External functions */ + +GtkWidget * +cs_html_gecko_new(void) +{ + CsHtmlGecko *html = g_object_new(CS_TYPE_HTML_GECKO, NULL); + + return GTK_WIDGET (html); +} + +void +cs_html_gecko_load_url(CsHtmlGecko *html, const gchar *url) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + g_return_if_fail(url != NULL); + + g_debug("CS_HTML_GECKO >>> load_url html = %p, uri = %s", html, url); + gtk_moz_embed_load_url(CS_HTML_GECKO_GET_PRIVATE (html)->gecko, url); +} + +void +cs_html_gecko_reload(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gtk_moz_embed_reload(CS_HTML_GECKO_GET_PRIVATE (html)->gecko, GTK_MOZ_EMBED_FLAG_RELOADNORMAL); +} + +gboolean +cs_html_gecko_can_go_forward(CsHtmlGecko *html) +{ + g_return_val_if_fail(IS_CS_HTML_GECKO (html), FALSE); + + return gtk_moz_embed_can_go_forward(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +gboolean +cs_html_gecko_can_go_back(CsHtmlGecko *html) +{ + g_return_val_if_fail(IS_CS_HTML_GECKO (html), FALSE); + + return gtk_moz_embed_can_go_back(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +void +cs_html_gecko_go_forward(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gtk_moz_embed_go_forward(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +void +cs_html_gecko_go_back(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gtk_moz_embed_go_back(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +gchar * +cs_html_gecko_get_title(CsHtmlGecko *html) +{ + g_return_val_if_fail(IS_CS_HTML_GECKO (html), NULL); + + return gtk_moz_embed_get_title(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +gchar * +cs_html_gecko_get_location(CsHtmlGecko *html) +{ + g_return_val_if_fail(IS_CS_HTML_GECKO (html), NULL); + + return gtk_moz_embed_get_location(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +gboolean +cs_html_gecko_can_copy_selection(CsHtmlGecko *html) +{ + g_return_val_if_fail(IS_CS_HTML_GECKO (html), FALSE); + + return gecko_utils_can_copy_selection(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +void +cs_html_gecko_copy_selection(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gecko_utils_copy_selection(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +void +cs_html_gecko_select_all(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gecko_utils_select_all(CS_HTML_GECKO_GET_PRIVATE (html)->gecko); +} + +gboolean +cs_html_gecko_find(CsHtmlGecko *html, const gchar *sstr, gboolean backward, gboolean match_case) +{ + g_return_val_if_fail(IS_CS_HTML_GECKO (html), FALSE); + + return gecko_utils_find(CS_HTML_GECKO_GET_PRIVATE (html)->gecko, sstr, backward, match_case); +} + +void +cs_html_gecko_increase_size(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + CsHtmlGeckoPrivate *priv = CS_HTML_GECKO_GET_PRIVATE (html); + + gfloat zoom = gecko_utils_get_zoom(priv->gecko); + zoom *= 1.2; + + gecko_utils_set_zoom(priv->gecko, zoom); +} + +void +cs_html_gecko_reset_size(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gecko_utils_set_zoom(CS_HTML_GECKO_GET_PRIVATE (html)->gecko, 1.0); +} + +void +cs_html_gecko_decrease_size(CsHtmlGecko *html) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + CsHtmlGeckoPrivate *priv = CS_HTML_GECKO_GET_PRIVATE (html); + + gfloat zoom = gecko_utils_get_zoom(priv->gecko); + zoom /= 1.2; + + gecko_utils_set_zoom(priv->gecko, zoom); +} + +gboolean +cs_html_gecko_init_system(void) +{ + g_message("CS_HTML_GECKO >>> init gecko system"); + return gecko_utils_init(); +} + +void +cs_html_gecko_shutdown_system() +{ + g_message("CS_HTML_GECKO >>> shutdown gecko system"); + gecko_utils_shutdown(); +} + +void +cs_html_gecko_set_variable_font(const gchar *font_name) +{ + g_debug("CS_HTML_GECKO >>> set variable font %s", font_name); + gecko_utils_set_font(GECKO_PREF_FONT_VARIABLE, font_name); +} + +void +cs_html_gecko_set_fixed_font(const gchar *font_name) +{ + g_debug("CS_HTML_GECKO >>> set fixed font %s", font_name); + gecko_utils_set_font(GECKO_PREF_FONT_FIXED, font_name); +} + +void +cs_html_gecko_set_charset(CsHtmlGecko *html, const gchar *charset) +{ + g_return_if_fail(IS_CS_HTML_GECKO (html)); + + gecko_utils_set_charset(CS_HTML_GECKO_GET_PRIVATE (html)->gecko, charset); +} diff -Nru chmsee-1.0.7/src/components/html-gecko.h chmsee-1.3.0/src/components/html-gecko.h --- chmsee-1.0.7/src/components/html-gecko.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/html-gecko.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_HTML_GECKO_H__ +#define __CS_HTML_GECKO_H__ + +#include +#include + +G_BEGIN_DECLS + +#define CS_TYPE_HTML_GECKO (cs_html_gecko_get_type()) +#define CS_HTML_GECKO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_HTML_GECKO, CsHtmlGecko)) +#define CS_HTML_GECKO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CS_TYPE_HTML_GECKO, CsHtmlGeckoClass)) +#define IS_CS_HTML_GECKO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_HTML_GECKO)) +#define IS_CS_HTML_GECKO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CS_TYPE_HTML_GECKO)) + +typedef struct _CsHtmlGecko CsHtmlGecko; +typedef struct _CsHtmlGeckoClass CsHtmlGeckoClass; + +struct _CsHtmlGecko { + GtkFrame frame; +}; + +struct _CsHtmlGeckoClass { + GtkFrameClass parent_class; + + /* Signals */ + void (* title_changed) (CsHtmlGecko *html, const gchar *title); + void (* location_changed) (CsHtmlGecko *html, const gchar *location); + gboolean (* open_uri) (CsHtmlGecko *html, const gchar *uri); + void (* context_normal) (CsHtmlGecko *html); + void (* context_link) (CsHtmlGecko *html, const gchar *link); + void (* open_new_tab) (CsHtmlGecko *html, const gchar *uri); + void (* link_message) (CsHtmlGecko *html, const gchar *link); +}; + +GType cs_html_gecko_get_type(void); +GtkWidget *cs_html_gecko_new(void); +void cs_html_gecko_load_url(CsHtmlGecko *, const gchar *); +void cs_html_gecko_reload(CsHtmlGecko *); + +gboolean cs_html_gecko_can_go_forward(CsHtmlGecko *); +gboolean cs_html_gecko_can_go_back(CsHtmlGecko *); +void cs_html_gecko_go_forward(CsHtmlGecko *); +void cs_html_gecko_go_back(CsHtmlGecko *); +gchar *cs_html_gecko_get_title(CsHtmlGecko *); +gchar *cs_html_gecko_get_location(CsHtmlGecko *); +gboolean cs_html_gecko_can_copy_selection(CsHtmlGecko *); +void cs_html_gecko_copy_selection(CsHtmlGecko *); +void cs_html_gecko_select_all(CsHtmlGecko *); +void cs_html_gecko_increase_size(CsHtmlGecko *); +void cs_html_gecko_reset_size(CsHtmlGecko *); +void cs_html_gecko_decrease_size(CsHtmlGecko *); +gboolean cs_html_gecko_find(CsHtmlGecko *, const gchar *, gboolean, gboolean); + +gboolean cs_html_gecko_init_system(void); +void cs_html_gecko_shutdown_system(void); + +void cs_html_gecko_set_variable_font(const gchar *); +void cs_html_gecko_set_fixed_font(const gchar *); + +void cs_html_gecko_set_charset(CsHtmlGecko *, const gchar *); + +G_END_DECLS + +#endif /* !__CS_HTML_GECKO_H__ */ diff -Nru chmsee-1.0.7/src/components/index.c chmsee-1.3.0/src/components/index.c --- chmsee-1.0.7/src/components/index.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/index.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include "index.h" +#include "treeview.h" +#include "utils.h" +#include "models/link.h" + +/* Signals */ +enum { + LINK_SELECTED, + LAST_SIGNAL +}; + +typedef struct _CsIndexPrivate CsIndexPrivate; + +struct _CsIndexPrivate { + GtkWidget *treeview; + GtkEntry *filter_entry; +}; + +static gint signals[LAST_SIGNAL] = { 0 }; + +static void link_selected_cb(CsIndex *, Link *); +static void filter_changed_cb(GtkEntry *, CsIndex *); + +#define CS_INDEX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CS_TYPE_INDEX, CsIndexPrivate)) + +G_DEFINE_TYPE (CsIndex, cs_index, GTK_TYPE_VBOX); + +static void +cs_index_class_init(CsIndexClass* klass) +{ + g_type_class_add_private(klass, sizeof(CsIndexPrivate)); + + signals[LINK_SELECTED] = + g_signal_new("link-selected", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (CsIndexClass, link_selected), + NULL, + NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); +} + +static void +cs_index_init(CsIndex* self) +{ + CsIndexPrivate *priv = CS_INDEX_GET_PRIVATE(self); + + priv->filter_entry = GTK_ENTRY (gtk_entry_new()); + gtk_entry_set_max_length(GTK_ENTRY (priv->filter_entry), ENTRY_MAX_LENGTH); + g_signal_connect(priv->filter_entry, + "changed", + G_CALLBACK (filter_changed_cb), + self); + gtk_box_pack_start(GTK_BOX (self), GTK_WIDGET (priv->filter_entry), FALSE, FALSE, 0); + + GtkWidget *index_sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (index_sw), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW (index_sw), + GTK_SHADOW_NONE); + + priv->treeview = cs_tree_view_new(TRUE); + g_signal_connect_swapped(priv->treeview, + "link-selected", + G_CALLBACK(link_selected_cb), + self); + + gtk_container_add(GTK_CONTAINER (index_sw), priv->treeview); + gtk_box_pack_start(GTK_BOX (self), index_sw, TRUE, TRUE, 0); + + gtk_widget_show_all(GTK_WIDGET (self)); +} + +/* Callbacks */ + +static void +link_selected_cb(CsIndex* self, Link* link) +{ + g_signal_emit(self, signals[LINK_SELECTED], 0, link); +} + +static void +filter_changed_cb(GtkEntry *entry, CsIndex *self) +{ + cs_tree_view_set_filter_string(CS_TREE_VIEW (CS_INDEX_GET_PRIVATE (self)->treeview), + gtk_entry_get_text(entry)); +} + +/* External functions */ + +GtkWidget * +cs_index_new(void) +{ + g_debug("CS_INDEX >>> create"); + CsIndex* self = CS_INDEX (g_object_new(CS_TYPE_INDEX, NULL)); + + return GTK_WIDGET (self); +} + +void +cs_index_set_model(CsIndex *self, GList *model) +{ + g_debug("CS_INDEX >>> set model"); + g_return_if_fail(IS_CS_INDEX (self)); + + CsIndexPrivate *priv = CS_INDEX_GET_PRIVATE (self); + + gtk_entry_set_text(priv->filter_entry, ""); + cs_tree_view_set_model(CS_TREE_VIEW (priv->treeview), model); +} diff -Nru chmsee-1.0.7/src/components/index.h chmsee-1.3.0/src/components/index.h --- chmsee-1.0.7/src/components/index.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/index.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_INDEX_H_ +#define __CS_INDEX_H_ + +#include + +#include "models/link.h" + +G_BEGIN_DECLS + +#define CS_TYPE_INDEX (cs_index_get_type()) +#define CS_INDEX(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_INDEX, CsIndex)) +#define CS_INDEX_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CS_TYPE_INDEX, CsIndexClass)) +#define IS_CS_INDEX(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_INDEX)) +#define IS_CS_INDEX_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CS_TYPE_INDEX)) + +typedef struct _CsIndex CsIndex; +typedef struct _CsIndexClass CsIndexClass; + +struct _CsIndex { + GtkVBox vbox; +}; + +struct _CsIndexClass { + GtkVBoxClass parent_class; + + /* Signals */ + void (*link_selected) (CsIndex* self, Link *link); +}; + +GType cs_index_get_type(void); +GtkWidget *cs_index_new(void); + +void cs_index_set_model(CsIndex *, GList *); +void cs_index_set_filter_string(CsIndex *, const gchar *); + +G_END_DECLS + +#endif /* !__CS_INDEX_H_ */ diff -Nru chmsee-1.0.7/src/components/toc.c chmsee-1.3.0/src/components/toc.c --- chmsee-1.0.7/src/components/toc.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/toc.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,389 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include + +#include "toc.h" +#include "models/parser.h" +#include "utils.h" + +typedef struct { + GdkPixbuf *pixbuf_opened; + GdkPixbuf *pixbuf_closed; + GdkPixbuf *pixbuf_doc; +} TocPixbufs; + +typedef struct { + const gchar *uri; + gboolean found; + GtkTreeIter iter; + GtkTreePath *path; +} FindURIData; + +typedef struct _CsTocPrivate CsTocPrivate; + +struct _CsTocPrivate { + GtkTreeView *treeview; + GtkTreeStore *store; + TocPixbufs *pixbufs; +}; + +/* Signals */ +enum { + LINK_SELECTED, + LAST_SIGNAL +}; + +enum { + COL_OPEN_PIXBUF, + COL_CLOSED_PIXBUF, + COL_TITLE, + COL_LINK, + N_COLUMNS +}; + +static gint signals[LAST_SIGNAL] = { 0 }; + +static void cs_toc_class_init(CsTocClass *); +static void cs_toc_init(CsToc *); + +static void cs_toc_dispose(GObject *); +static void cs_toc_finalize(GObject *); + +static void row_activated_cb(GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *); +static void cursor_changed_cb(GtkTreeView *, CsToc *); + +static TocPixbufs *create_pixbufs(void); +static GtkTreeViewColumn *create_columns(void); +static void insert_node(CsToc *, GNode *, GtkTreeIter *); + +static gboolean find_uri_foreach(GtkTreeModel *, GtkTreePath *, GtkTreeIter *, FindURIData *); + +#define CS_TOC_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CS_TYPE_TOC, CsTocPrivate)) + +/* GObject functions */ + +G_DEFINE_TYPE (CsToc, cs_toc, GTK_TYPE_VBOX); + +static void +cs_toc_class_init(CsTocClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private(klass, sizeof(CsTocPrivate)); + + object_class->dispose = cs_toc_dispose; + object_class->finalize = cs_toc_finalize; + + signals[LINK_SELECTED] = + g_signal_new ("link-selected", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (CsTocClass, link_selected), + NULL, + NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); +} + +static void +cs_toc_init(CsToc *self) +{ + CsTocPrivate *priv = CS_TOC_GET_PRIVATE (self); + + GtkWidget *toc_sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (toc_sw), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW (toc_sw), + GTK_SHADOW_NONE); + + priv->treeview = GTK_TREE_VIEW (gtk_tree_view_new()); + + priv->store = gtk_tree_store_new(N_COLUMNS, + GDK_TYPE_PIXBUF, + GDK_TYPE_PIXBUF, + G_TYPE_STRING, + G_TYPE_POINTER); + + gtk_tree_view_set_model(GTK_TREE_VIEW (priv->treeview), + GTK_TREE_MODEL (priv->store)); + + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (priv->treeview), FALSE); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW (priv->treeview), FALSE); + + priv->pixbufs = create_pixbufs(); + gtk_tree_view_append_column(GTK_TREE_VIEW (priv->treeview), create_columns()); + + gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW (priv->treeview)), + GTK_SELECTION_BROWSE); + + g_signal_connect(G_OBJECT (priv->treeview), + "row-activated", + G_CALLBACK(row_activated_cb), + NULL); + g_signal_connect(G_OBJECT (priv->treeview), + "cursor-changed", + G_CALLBACK(cursor_changed_cb), + self); + + gtk_container_add(GTK_CONTAINER (toc_sw), GTK_WIDGET (priv->treeview)); + gtk_box_pack_start(GTK_BOX (self), toc_sw, TRUE, TRUE, 0); + + gtk_widget_show_all(GTK_WIDGET (self)); +} + +static void +cs_toc_dispose(GObject* object) +{ + g_debug("CS_TOC >>> dispose"); + CsToc *self = CS_TOC (object); + CsTocPrivate *priv = CS_TOC_GET_PRIVATE (self); + + if (priv->store) { + g_object_unref(priv->store); + g_object_unref(priv->pixbufs->pixbuf_opened); + g_object_unref(priv->pixbufs->pixbuf_closed); + g_object_unref(priv->pixbufs->pixbuf_doc); + priv->store = NULL; + } + + G_OBJECT_CLASS (cs_toc_parent_class)->dispose(object); +} + +static void +cs_toc_finalize(GObject *object) +{ + g_debug("CS_TOC >>> finalize"); + CsTocPrivate *priv = CS_TOC_GET_PRIVATE (CS_TOC (object)); + + g_slice_free(TocPixbufs, priv->pixbufs); + + G_OBJECT_CLASS (cs_toc_parent_class)->finalize(object); +} + +/* Callbacks */ + +static void +row_activated_cb(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column) +{ + if (gtk_tree_view_row_expanded(treeview, path)) + gtk_tree_view_collapse_row(treeview, path); + else + gtk_tree_view_expand_row(treeview, path, FALSE); +} + +static void +cursor_changed_cb(GtkTreeView *treeview, CsToc *self) +{ + g_debug("CS_TOC >>> cursor changed callback"); + CsTocPrivate *priv = CS_TOC_GET_PRIVATE (self); + + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (priv->treeview)); + + GtkTreeIter iter; + if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { + Link *link; + gtk_tree_model_get(GTK_TREE_MODEL (priv->store), + &iter, COL_LINK, &link, -1); + + g_debug("CS_TOC >>> emiting link-selected signal '%s'", link->uri); + g_signal_emit(self, signals[LINK_SELECTED], 0, link); + } +} + +/* Internal functions */ + +static TocPixbufs * +create_pixbufs(void) +{ + TocPixbufs *pixbufs; + + pixbufs = g_slice_new(TocPixbufs); + + pixbufs->pixbuf_closed = gdk_pixbuf_new_from_file(RESOURCE_FILE ("book-closed.png"), NULL); + pixbufs->pixbuf_opened = gdk_pixbuf_new_from_file(RESOURCE_FILE ("book-open.png"), NULL); + pixbufs->pixbuf_doc = gdk_pixbuf_new_from_file(RESOURCE_FILE ("helpdoc.png"), NULL); + + return pixbufs; +} + +static GtkTreeViewColumn * +create_columns(void) +{ + GtkTreeViewColumn *column = gtk_tree_view_column_new(); + GtkCellRenderer *cell = gtk_cell_renderer_pixbuf_new(); + + gtk_tree_view_column_pack_start(column, cell, FALSE); + gtk_tree_view_column_set_attributes( + column, + cell, + "pixbuf", COL_OPEN_PIXBUF, + "pixbuf-expander-open", COL_OPEN_PIXBUF, + "pixbuf-expander-closed", COL_CLOSED_PIXBUF, + NULL); + + cell = gtk_cell_renderer_text_new(); + g_object_set(cell, + "ellipsize", PANGO_ELLIPSIZE_END, + NULL); + gtk_tree_view_column_pack_start(column, cell, TRUE); + gtk_tree_view_column_set_attributes(column, + cell, + "text", COL_TITLE, + NULL); + + return column; +} + +static void +insert_node(CsToc *self, GNode *node, GtkTreeIter *parent_iter) +{ + CsTocPrivate *priv = CS_TOC_GET_PRIVATE (self); + + Link *link = node->data; + + if (g_node_n_children(node)) + link_change_type(link, LINK_TYPE_BOOK); + + GtkTreeIter iter; + gtk_tree_store_append(priv->store, &iter, parent_iter); + + /* g_debug("CS_TOC >>> insert node::name = %s", link->name); */ + /* g_debug("CS_TOC >>> insert node::uri = %s", link->uri); */ + + if (link->type == LINK_TYPE_BOOK) { + gtk_tree_store_set(priv->store, &iter, + COL_OPEN_PIXBUF, priv->pixbufs->pixbuf_opened, + COL_CLOSED_PIXBUF, priv->pixbufs->pixbuf_closed, + COL_TITLE, link->name, + COL_LINK, link, + -1); + } else { + gtk_tree_store_set(priv->store, &iter, + COL_OPEN_PIXBUF, priv->pixbufs->pixbuf_doc, + COL_CLOSED_PIXBUF, priv->pixbufs->pixbuf_doc, + COL_TITLE, link->name, + COL_LINK, link, + -1); + } + + GNode *child; + for (child = g_node_first_child(node); + child; + child = g_node_next_sibling(child)) { + insert_node(self, child, &iter); + } +} + +static gboolean +find_uri_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, FindURIData *data) +{ + Link *link; + gtk_tree_model_get(model, iter, COL_LINK, &link, -1); + + if (!ncase_compare_utf8_string(data->uri, link->uri)) { + /* g_debug("CS_TOC >>> found data->uri: %s", data->uri); */ + /* g_debug("CS_TOC >>> found link->uri: %s", link->uri); */ + + data->found = TRUE; + data->iter = *iter; + data->path = gtk_tree_path_copy(path); + } + + return data->found; +} + +/* External functions */ + +GtkWidget * +cs_toc_new(void) +{ + g_debug("CS_TOC >>> create"); + CsToc *self = g_object_new(CS_TYPE_TOC, NULL); + + return GTK_WIDGET (self); +} + +void +cs_toc_set_model(CsToc *self, GNode *model) +{ + g_return_if_fail(IS_CS_TOC (self)); + + gtk_tree_store_clear(CS_TOC_GET_PRIVATE (self)->store); + + GNode *node; + for (node = g_node_first_child(model); + node; + node = g_node_next_sibling(node)) { + insert_node(self, node, NULL); + } +} + +void +cs_toc_sync(CsToc *self, const gchar *uri) +{ + g_debug("CS_TOC >>> sync uri %s", uri); + g_return_if_fail(IS_CS_TOC (self)); + + CsTocPrivate *priv = CS_TOC_GET_PRIVATE (self); + + FindURIData data; + data.found = FALSE; + if (uri[0] == '/') + data.uri = uri + 1; + else + data.uri = uri; + + gtk_tree_model_foreach(GTK_TREE_MODEL (priv->store), + (GtkTreeModelForeachFunc) find_uri_foreach, + &data); + + if (!data.found) { + gchar *real_uri = get_real_uri(uri); + data.uri = real_uri; + gtk_tree_model_foreach(GTK_TREE_MODEL (priv->store), + (GtkTreeModelForeachFunc) find_uri_foreach, + &data); + g_free(real_uri); + } + + if (!data.found) { + g_debug("CS_TOC >>> sync: cannot find link uri"); + return; + } + + g_signal_handlers_block_by_func(priv->treeview, + cursor_changed_cb, + self); + + gtk_tree_view_expand_to_path(GTK_TREE_VIEW (priv->treeview), data.path); + gtk_tree_view_set_cursor(GTK_TREE_VIEW (priv->treeview), data.path, NULL, 0); + + g_signal_handlers_unblock_by_func(priv->treeview, + cursor_changed_cb, + self); + + gtk_tree_path_free(data.path); +} diff -Nru chmsee-1.0.7/src/components/toc.h chmsee-1.3.0/src/components/toc.h --- chmsee-1.0.7/src/components/toc.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/toc.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_TOC_H__ +#define __CS_TOC_H__ + +#include + +#include "models/link.h" + +G_BEGIN_DECLS + +#define CS_TYPE_TOC (cs_toc_get_type()) +#define CS_TOC(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_TOC, CsToc)) +#define CS_TOC_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CS_TYPE_TOC, CsTocClass)) +#define IS_CS_TOC(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_TOC)) +#define IS_CS_TOC_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((o), CS_TYPE_TOC)) + +typedef struct _CsToc CsToc; +typedef struct _CsTocClass CsTocClass; + +struct _CsToc { + GtkVBox vbox; +}; + +struct _CsTocClass { + GtkVBoxClass parent_class; + + /* Signals */ + void (*link_selected) (CsToc *toc, Link *link); +}; + +GType cs_toc_get_type(void); +GtkWidget *cs_toc_new(void); +void cs_toc_set_model(CsToc *, GNode *); + +void cs_toc_sync(CsToc *, const gchar *); +const gchar *cs_toc_get_selected_book_title(CsToc *); + +G_END_DECLS + +#endif /* !__CS_TOC_H__ */ diff -Nru chmsee-1.0.7/src/components/treeview.c chmsee-1.3.0/src/components/treeview.c --- chmsee-1.0.7/src/components/treeview.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/treeview.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,393 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include + +#include "treeview.h" +#include "utils.h" + +/* Signals */ +enum { + LINK_SELECTED, + LAST_SIGNAL +}; + +/* TreeView Model */ +enum { + COL_TITLE, + COL_URI, + N_COLUMNS +}; + +typedef struct _CsTreeViewPrivate CsTreeViewPrivate; + +struct _CsTreeViewPrivate { + GtkListStore *store; + GtkTreeModel *filter_model; + gchar *filter_string; +}; + +static gint signals[LAST_SIGNAL] = { 0 }; + +static void cs_tree_view_init(CsTreeView *); +static void cs_tree_view_class_init(CsTreeViewClass *); +static void cs_tree_view_dispose(GObject *); +static void cs_tree_view_finalize(GObject *); + +static void row_activated_cb(CsTreeView *, GtkTreePath *, GtkTreeViewColumn *); +static void selection_changed_cb(GtkTreeSelection *, CsTreeView *); + +static gboolean visible_func(GtkTreeModel *, GtkTreeIter *, gpointer); +static void apply_filter_model(CsTreeView *); + +#define CS_TREE_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CS_TYPE_TREE_VIEW, CsTreeViewPrivate)) + +/* GObject functions */ + +G_DEFINE_TYPE (CsTreeView, cs_tree_view, GTK_TYPE_TREE_VIEW); + +static void +cs_tree_view_class_init(CsTreeViewClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private(klass, sizeof(CsTreeViewPrivate)); + + object_class->dispose = cs_tree_view_dispose; + object_class->finalize = cs_tree_view_finalize; + + signals[LINK_SELECTED] = + g_signal_new("link-selected", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (CsTreeViewClass, link_selected), + NULL, + NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); +} + +static void +cs_tree_view_init(CsTreeView *self) +{ + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + + priv->store = NULL; + priv->filter_model = NULL; + priv->filter_string = NULL; + + GtkCellRenderer *cell = gtk_cell_renderer_text_new(); + g_object_set(cell, + "ellipsize", PANGO_ELLIPSIZE_END, + NULL); + + gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW (self), + -1, + "", cell, + "text", 0, + NULL); + + gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (self), FALSE); + gtk_tree_view_set_enable_search(GTK_TREE_VIEW (self), FALSE); + gtk_tree_view_set_search_column(GTK_TREE_VIEW (self), FALSE); + + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (self)); + gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE); + g_signal_connect(selection, + "changed", + G_CALLBACK (selection_changed_cb), + self); + + g_signal_connect(self, + "row_activated", + G_CALLBACK (row_activated_cb), + NULL); + + gtk_widget_show_all(GTK_WIDGET (self)); +} + +static void +cs_tree_view_dispose(GObject *object) +{ + g_debug("CS_TREE_VIEW >>> dispose"); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (CS_TREE_VIEW (object)); + + if (priv->store) { + g_object_unref(priv->store); + priv->store = NULL; + } + + if (priv->filter_model) { + g_object_unref(priv->filter_model); + priv->filter_model = NULL; + } + + G_OBJECT_CLASS (cs_tree_view_parent_class)->dispose(object); +} + +static void +cs_tree_view_finalize(GObject *object) +{ + g_debug("CS_TREE_VIEW >>> finalize"); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (CS_TREE_VIEW (object)); + + if (priv->filter_string) + g_free(priv->filter_string); + + G_OBJECT_CLASS (cs_tree_view_parent_class)->finalize(object); +} + +/* Callbacks */ + +static void +row_activated_cb(CsTreeView *self, GtkTreePath *path, GtkTreeViewColumn *column) +{ + g_debug("CS_TREE_VIEW >>> row_activate callback"); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + GtkTreeModel *model; + GtkTreeIter iter; + gchar *title, *uri; + + if (priv->filter_model) + model = priv->filter_model; + else + model = GTK_TREE_MODEL (priv->store); + + gtk_tree_model_get_iter(model, &iter, path); + gtk_tree_model_get(model, + &iter, + COL_TITLE, &title, + COL_URI, &uri, + -1); + + Link *link = link_new(LINK_TYPE_PAGE, title, uri); + g_debug("CS_TREE_VIEW >>> row activated, link: name = %s uri = %s\n", link->name, link->uri); + g_signal_emit(self, signals[LINK_SELECTED], 0, link); +} + +static void +selection_changed_cb(GtkTreeSelection *selection, CsTreeView *self) +{ + g_debug("CS_TREE_VIEW >>> selection changed"); +} + +/* Internal functions */ + +static gboolean +visible_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) +{ + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (CS_TREE_VIEW (data)); + + if (priv->filter_string == NULL || strlen(priv->filter_string) == 0) + return TRUE; + + gchar *text = NULL; + gboolean visible = FALSE; + + gtk_tree_model_get(model, iter, COL_TITLE, &text, -1); + + if (text != NULL) { + gchar *normalized_string = g_utf8_normalize(text, -1, G_NORMALIZE_ALL); + gchar *case_normalized_string = g_utf8_casefold(normalized_string, -1); + + if (!strncasecmp(priv->filter_string, case_normalized_string, strlen(priv->filter_string))) + visible = TRUE; + + g_free(normalized_string); + g_free(case_normalized_string); + } + + return visible; +} + +static void +apply_filter_model(CsTreeView *self) +{ + g_debug("CS_TREEVIEW >>> apply filter model"); + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + + priv->filter_model = gtk_tree_model_filter_new(GTK_TREE_MODEL (priv->store), NULL); + + gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER (priv->filter_model), + visible_func, + self, + NULL); + gtk_tree_view_set_model(GTK_TREE_VIEW (self), priv->filter_model); +} + + +/* External functions */ + +GtkWidget * +cs_tree_view_new(gboolean with_filter) +{ + g_debug("CS_TREE_VIEW >>> create"); + CsTreeView *self = g_object_new(CS_TYPE_TREE_VIEW, NULL); + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + + priv->store = gtk_list_store_new(N_COLUMNS, + G_TYPE_STRING, + G_TYPE_STRING); + if (with_filter) + apply_filter_model(self); + else + gtk_tree_view_set_model(GTK_TREE_VIEW (self), + GTK_TREE_MODEL (priv->store)); + + return GTK_WIDGET (self); +} + +void +cs_tree_view_set_model(CsTreeView *self, GList *model) +{ + g_debug("CS_TREEVIEW >>> set model"); + g_return_if_fail(IS_CS_TREE_VIEW (self)); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + GtkTreeIter iter; + GList *l; + + if (priv->store) + gtk_list_store_clear(priv->store); + + for (l = model; l; l = l->next) { + Link *link = l->data; + + gtk_list_store_append(priv->store, &iter); + gtk_list_store_set(priv->store, &iter, + COL_TITLE, link->name, + COL_URI, link->uri, + -1); + } +} + +void +cs_tree_view_add_link(CsTreeView *self, Link *link) +{ + g_debug("CS_TREEVIEW >>> add link = %p", link); + g_return_if_fail(IS_CS_TREE_VIEW (self)); + + GtkTreeIter iter; + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + + gtk_list_store_append(priv->store, &iter); + gtk_list_store_set(priv->store, &iter, + COL_TITLE, link->name, + COL_URI, link->uri, + -1); +} + +void +cs_tree_view_remove_link(CsTreeView *self, Link *link) +{ + g_return_if_fail(IS_CS_TREE_VIEW (self)); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + + GtkTreeIter iter; + gchar *uri; + + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL (priv->store), &iter, "0"); + + do { + gtk_tree_model_get(GTK_TREE_MODEL (priv->store), &iter, COL_URI, &uri, -1); + + if (ncase_compare_utf8_string(link->uri, uri) == 0) { + gtk_list_store_remove(priv->store, &iter); + break; + } + } while (gtk_tree_model_iter_next(GTK_TREE_MODEL (priv->store), &iter)); +} + +Link * +cs_tree_view_get_selected_link(CsTreeView *self) +{ + g_return_val_if_fail(IS_CS_TREE_VIEW (self), NULL); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (self)); + + GtkTreeIter iter; + Link *link = NULL; + + if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { + gchar *title, *uri; + + gtk_tree_model_get(GTK_TREE_MODEL (priv->store), + &iter, + COL_TITLE, &title, + COL_URI, &uri, + -1); + + link = link_new(LINK_TYPE_PAGE, title, uri); + } + + return link; +} + +void +cs_tree_view_select_link(CsTreeView *self, Link *link) +{ + g_return_if_fail(IS_CS_TREE_VIEW (self)); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (self)); + + GtkTreeIter iter; + gchar *uri; + + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL (priv->store), &iter, "0"); + + do { + gtk_tree_model_get(GTK_TREE_MODEL (priv->store), &iter, COL_URI, &uri, -1); + + if (ncase_compare_utf8_string(link->uri, uri) == 0) { + gtk_tree_selection_select_iter(selection, &iter); + break; + } + } while (gtk_tree_model_iter_next(GTK_TREE_MODEL (priv->store), &iter)); +} + +void +cs_tree_view_set_filter_string(CsTreeView *self, const gchar *string) +{ + g_debug("CS_TREEVIEW >>> set filter string = %s", string); + g_return_if_fail(IS_CS_TREE_VIEW (self)); + + CsTreeViewPrivate *priv = CS_TREE_VIEW_GET_PRIVATE (self); + + if (!priv->filter_model) + return; + + if (priv->filter_string) { + g_free(priv->filter_string); + priv->filter_string = NULL; + } + + priv->filter_string = g_strdup(string); + gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER (priv->filter_model)); +} diff -Nru chmsee-1.0.7/src/components/treeview.h chmsee-1.3.0/src/components/treeview.h --- chmsee-1.0.7/src/components/treeview.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/components/treeview.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_TREE_VIEW_H__ +#define __CS_TREE_VIEW_H__ + +#include + +#include "models/link.h" + +G_BEGIN_DECLS + +#define CS_TYPE_TREE_VIEW (cs_tree_view_get_type()) +#define CS_TREE_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_TREE_VIEW, CsTreeView)) +#define CS_TREE_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CS_TYPE_TREE_VIEW, CsTreeViewClass)) +#define IS_CS_TREE_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_TREE_VIEW)) +#define IS_CS_TREE_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CS_TYPE_TREE_VIEW)) + +typedef struct _CsTreeView CsTreeView; +typedef struct _CsTreeViewClass CsTreeViewClass; + +struct _CsTreeView { + GtkTreeView treeview; +}; + +struct _CsTreeViewClass { + GtkTreeViewClass parent_class; + + /* Signals */ + void (*link_selected) (CsTreeView *self, Link *link); +}; + +GType cs_tree_view_get_type(void); +GtkWidget *cs_tree_view_new(gboolean); + +void cs_tree_view_set_model(CsTreeView *, GList *); +void cs_tree_view_set_filter_string(CsTreeView *, const gchar *); + +void cs_tree_view_add_link(CsTreeView *, Link *); +void cs_tree_view_remove_link(CsTreeView *, Link *); +void cs_tree_view_select_link(CsTreeView *, Link *); +Link *cs_tree_view_get_selected_link(CsTreeView *); + +G_END_DECLS + +#endif /* !__CS_TREE_VIEW_H__ */ diff -Nru chmsee-1.0.7/src/config.h.in chmsee-1.3.0/src/config.h.in --- chmsee-1.0.7/src/config.h.in 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/config.h.in 2011-01-16 13:48:42.000000000 +0000 @@ -1,17 +1,21 @@ -#define CHMSEE_BOOKMARK_FILE "${CHMSEE_BOOKMARK_FILE}" -#define CHMSEE_BOOKINFO_FILE "${CHMSEE_BOOKINFO_FILE}" -#define CHMSEE_NO_LINK "${CHMSEE_NO_LINK}" -#define CHMSEE_DATA_DIR_DEFAULT "${CHMSEE_DATA_DIR}" -#define GLADE_FILE "chmsee.glade" -#define PACKAGE_VERSION "${PACKAGE_VERSION}" -#define PACKAGE_STRING "chmsee ${PACKAGE_VERSION}" +#define MAXLINE 1024 +#define ENTRY_MAX_LENGTH 80 +#define DEFAULT_WIDTH 800 +#define DEFAULT_HEIGHT 600 + #define ENABLE_NLS -#define PACKAGE "chmsee" -#define GETTEXT_PACKAGE "chmsee" -#define PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale" -#cmakedefine XULRUNNER_VERSION "${XULRUNNER_VERSION}" -#cmakedefine XULRUNNER18 1 -#cmakedefine XULRUNNER19 1 -#cmakedefine XULRUNNER190 1 -#cmakedefine XULRUNNER191 1 -#cmakedefine GECKO_LIB_ROOT "${GECKO_LIB_ROOT}" +#define PACKAGE "@CMAKE_PROJECT_NAME@" +#define GETTEXT_PACKAGE "@CMAKE_PROJECT_NAME@" +#define PACKAGE_VERSION "@PACKAGE_VERSION@" + +#define PACKAGE_STRING "chmsee @PACKAGE_VERSION@" +#define PACKAGE_LOCALE_DIR "@CMAKE_INSTALL_PREFIX@/share/locale" + +#define CHMSEE_DATA_DIR "@CHMSEE_DATA_DIR@" +#define CHMSEE_CONFIG_FILE "@CHMSEE_CONFIG_FILE@" +#define CHMSEE_BOOKMARKS_FILE "@CHMSEE_BOOKMARKS_FILE@" +#define CHMSEE_BOOKINFO_FILE "@CHMSEE_BOOKINFO_FILE@" +#define CHMSEE_NO_LINK "@CHMSEE_NO_LINK@" +#define CHMSEE_BOOKSHELF_DEFAULT "@CHMSEE_BOOKSHELF_DEFAULT@" + +#cmakedefine XULRUNNER_VERSION "@XULRUNNER_VERSION@" diff -Nru chmsee-1.0.7/src/gecko_utils.cpp chmsee-1.3.0/src/gecko_utils.cpp --- chmsee-1.0.7/src/gecko_utils.cpp 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/gecko_utils.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,408 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/* - * Copyright (C) 2004 Imendio AB - * Copyright (C) 2004 Marco Pesenti Gritti - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#include "config.h" -#include "gecko_utils.h" -#include - -#ifdef XPCOM_GLUE -#include -#endif - -#include -#include - -#include -#include -#include -#include -#if XULRUNNER18 - #include - #include -#else - #include - #include -#endif -#include -#include - -#define MOZILLA_INTERNAL_API -#include -#undef MOZILLA_INTERNAL_API - -#include -#include -#include -#include -#include - -#include "utils/utils.h" - -#define LANG_TYPES_NUM 7 - -static const gchar *lang[] = { - "universal_charset_detector", - "zhcn_parallel_state_machine", - "zhtw_parallel_state_machine", - "jp_parallel_state_machine", - "ko_parallel_state_machine", - "ruprob", - "ukprob" -}; - -static nsresult -do_command(GtkMozEmbed *embed, const char *command) -{ - nsCOMPtr webBrowser; - nsCOMPtr cmdManager; - - gtk_moz_embed_get_nsIWebBrowser(embed, getter_AddRefs(webBrowser)); - - cmdManager = do_GetInterface(webBrowser); - - return cmdManager->DoCommand(command, nsnull, nsnull); -} - -static gboolean -util_split_font_string(const gchar *font_name, gchar **name, gint *size) -{ - PangoFontDescription *desc; - PangoFontMask mask; - gboolean retval = FALSE; - - if (font_name == NULL) { - return FALSE; - } - - mask = (PangoFontMask) (PANGO_FONT_MASK_FAMILY | PANGO_FONT_MASK_SIZE); - - desc = pango_font_description_from_string(font_name); - if (!desc) { - return FALSE; - } - - if ((pango_font_description_get_set_fields(desc) & mask) == mask) { - *size = PANGO_PIXELS(pango_font_description_get_size (desc)); - *name = g_strdup(pango_font_description_get_family (desc)); - retval = TRUE; - } - - pango_font_description_free(desc); - - return retval; -} - -/* -static gboolean -gecko_prefs_set_bool(const gchar *key, gboolean value) -{ - nsresult rv; - nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS (rv, FALSE); - - nsCOMPtr pref; - rv = prefService->GetBranch("", getter_AddRefs(pref)); - NS_ENSURE_SUCCESS (rv, FALSE); - - rv = pref->SetBoolPref(key, value); - - return NS_SUCCEEDED (rv) != PR_FALSE; -} -*/ - -static gboolean -gecko_prefs_set_string(const gchar *key, const gchar *value) -{ - nsresult rv; - nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS (rv, FALSE); - - nsCOMPtr pref; - rv = prefService->GetBranch("", getter_AddRefs(pref)); - NS_ENSURE_SUCCESS (rv, FALSE); - - rv = pref->SetCharPref(key, value); - - return NS_SUCCEEDED (rv) != PR_FALSE; -} - -static gboolean -gecko_prefs_set_int(const gchar *key, gint value) -{ - nsresult rv; - nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS (rv, FALSE); - - nsCOMPtr pref; - rv = prefService->GetBranch("", getter_AddRefs(pref)); - NS_ENSURE_SUCCESS (rv, FALSE); - - rv = pref->SetIntPref(key, value); - - return NS_SUCCEEDED (rv) != PR_FALSE; -} - -static nsresult -gecko_utils_init_prefs(void) -{ - nsresult rv; - - nsCOMPtr prefService(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv)); - NS_ENSURE_SUCCESS (rv, rv); - - nsCOMPtr file; - rv = NS_NewNativeLocalFile(nsEmbedCString(get_resource_path("default-prefs.js")), - PR_TRUE, getter_AddRefs(file)); - NS_ENSURE_SUCCESS (rv, rv); - - rv = prefService->ReadUserPrefs(file); - rv |= prefService->ReadUserPrefs(nsnull); - NS_ENSURE_SUCCESS (rv, rv); - - return rv; -} - -extern "C" void -gecko_utils_init(void) -{ - if (!g_thread_supported()) - g_thread_init(NULL); - - nsresult rv; - -#ifdef XPCOM_GLUE - NS_LogInit(); - -#if XULRUNNER191 - static const GREVersionRange greVersion = { - "1.9.1", PR_TRUE, - "1.9.2", PR_FALSE - }; -#else - static const GREVersionRange greVersion = { - "1.9a", PR_TRUE, - "1.9.1", PR_FALSE - }; -#endif - - char xpcomLocation[4096]; - rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096); - if (NS_FAILED (rv)) - { - g_warning ("Could not determine locale!\n"); - return; - } - - // Startup the XPCOM Glue that links us up with XPCOM. - rv = XPCOMGlueStartup(xpcomLocation); - if (NS_FAILED (rv)) - { - g_warning ("Could not determine locale!\n"); - return; - } - - rv = GTKEmbedGlueStartup(); - if (NS_FAILED (rv)) - { - g_warning ("Could not startup embed glue!\n"); - return; - } - - rv = GTKEmbedGlueStartupInternal(); - if (NS_FAILED (rv)) - { - g_warning ("Could not startup embed glue (internal)!\n"); - return; - } - - char *lastSlash = strrchr(xpcomLocation, '/'); - if (lastSlash) - *lastSlash = '\0'; - - gtk_moz_embed_set_path(xpcomLocation); -#else - gtk_moz_embed_set_comp_path(GECKO_LIB_ROOT); -#endif - - gchar *profile_dir = g_build_filename(g_get_home_dir(), - ".chmsee", - NULL); - - gtk_moz_embed_set_profile_path(profile_dir, "mozilla"); - g_free(profile_dir); - - gtk_moz_embed_push_startup(); - - gecko_utils_init_prefs(); -} - -extern "C" void -gecko_utils_shutdown(void) -{ - gtk_moz_embed_pop_startup(); - -#ifdef XPCOM_GLUE - NS_LogTerm(); -#endif -} - -extern "C" gint -gecko_utils_get_mouse_event_button(gpointer event) -{ - nsIDOMMouseEvent *aMouseEvent; - PRUint16 button; - - aMouseEvent = (nsIDOMMouseEvent *) event; - - aMouseEvent->GetButton(&button); - - return button + 1; -} - -extern "C" gint -gecko_utils_get_mouse_event_modifiers(gpointer event) -{ - nsIDOMMouseEvent *aMouseEvent; - PRBool ctrl, alt, shift, meta; - gint mask; - - aMouseEvent = (nsIDOMMouseEvent *) event; - - aMouseEvent->GetCtrlKey(&ctrl); - aMouseEvent->GetAltKey(&alt); - aMouseEvent->GetShiftKey(&shift); - aMouseEvent->GetMetaKey(&meta); - - mask = 0; - if (ctrl) { - mask |= GDK_CONTROL_MASK; - } - if (alt || meta) { - mask |= GDK_MOD1_MASK; - } - if (shift) { - mask |= GDK_SHIFT_MASK; - } - - return mask; -} - -extern "C" void -gecko_utils_set_font(gint type, const gchar *fontname) -{ - gchar *name; - gint size; - - name = NULL; - - if (!util_split_font_string(fontname, &name, &size)) { - g_free(name); - return; - } - - switch (type) { - case GECKO_PREF_FONT_VARIABLE: - gecko_prefs_set_string("font.name.variable.x-western", name); - gecko_prefs_set_int("font.size.variable.x-western", size); - break; - case GECKO_PREF_FONT_FIXED: - gecko_prefs_set_string("font.name.fixed.x-western", name); - gecko_prefs_set_int("font.size.fixed.x-western", size); - break; - } - - g_free(name); -} - -extern "C" void -gecko_utils_set_default_lang(gint type) -{ - if (type < LANG_TYPES_NUM ) - gecko_prefs_set_string("intl.charset.detector", lang[type]); -} - -extern "C" void -gecko_utils_select_all(GtkMozEmbed *embed) -{ - do_command(embed, "cmd_selectAll"); -} - -extern "C" void -gecko_utils_copy_selection(GtkMozEmbed *embed) -{ - do_command(embed, "cmd_copy"); -} - -extern "C" gfloat -gecko_utils_get_zoom(GtkMozEmbed *embed) -{ - nsCOMPtr webBrowser; - nsCOMPtr domWindow; - float zoom; - - gtk_moz_embed_get_nsIWebBrowser(GTK_MOZ_EMBED(embed), getter_AddRefs(webBrowser)); - webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); - - if (!domWindow) { - g_warning("could not get DOMWindow."); - return 1.0; - } - - domWindow->GetTextZoom(&zoom); - - return zoom; -} - -extern "C" void -gecko_utils_set_zoom(GtkMozEmbed *embed, gfloat zoom) -{ - nsCOMPtr webBrowser; - nsCOMPtr domWindow; - - gtk_moz_embed_get_nsIWebBrowser(GTK_MOZ_EMBED(embed), getter_AddRefs(webBrowser)); - webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); - - if (!domWindow) { - g_warning("Could not get DOMWindow."); - return; - } - - domWindow->SetTextZoom(zoom); -} diff -Nru chmsee-1.0.7/src/gecko_utils.h chmsee-1.3.0/src/gecko_utils.h --- chmsee-1.0.7/src/gecko_utils.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/gecko_utils.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/* - * Copyright (C) 2004 Imendio AB - * Copyright (C) 2004 Marco Pesenti Gritti - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#ifndef __GECKO_UTILS_H__ -#define __GECKO_UTILS_H__ - -#include - -G_BEGIN_DECLS - -enum { - GECKO_PREF_FONT_VARIABLE, - GECKO_PREF_FONT_FIXED -}; - -void gecko_utils_init(void); -void gecko_utils_shutdown(void); -gint gecko_utils_get_mouse_event_button(gpointer); -gint gecko_utils_get_mouse_event_modifiers(gpointer); -void gecko_utils_set_font(gint, const gchar *); -void gecko_utils_set_default_lang(gint); -void gecko_utils_select_all(GtkMozEmbed *); -void gecko_utils_copy_selection(GtkMozEmbed *); -void gecko_utils_increase_size(GtkMozEmbed *); -void gecko_utils_decrease_size(GtkMozEmbed *); -gfloat gecko_utils_get_zoom(GtkMozEmbed *); -void gecko_utils_set_zoom(GtkMozEmbed *, gfloat); - -G_END_DECLS - -#endif /* __GECKO_UTILS_H__ */ diff -Nru chmsee-1.0.7/src/html.c chmsee-1.3.0/src/html.c --- chmsee-1.0.7/src/html.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/html.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,477 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "html.h" - -#include - -#include "ihtml.h" -#include "marshal.h" -#include "utils/utils.h" -#include "gecko_utils.h" - -static void html_class_init(HtmlClass *); -static void html_init(Html *); - -static void html_title_cb(GtkMozEmbed *, Html *); -static void html_location_cb(GtkMozEmbed *, Html *); -static gboolean html_open_uri_cb(GtkMozEmbed *, const gchar *, Html *); -static gboolean html_mouse_click_cb(GtkMozEmbed *, gpointer, Html *); -static gboolean html_link_message_cb(GtkMozEmbed *, Html *); -static void html_child_add_cb(GtkMozEmbed *, GtkWidget *, Html *); -static void html_child_remove_cb(GtkMozEmbed *, GtkWidget *, Html *); -static void html_child_grab_focus_cb(GtkWidget *, Html *); - -/* Signals */ -enum { - TITLE_CHANGED, - LOCATION_CHANGED, - OPEN_URI, - CONTEXT_NORMAL, - CONTEXT_LINK, - OPEN_NEW_TAB, - LINK_MESSAGE, - LAST_SIGNAL -}; - - - -static gint signals[LAST_SIGNAL] = { 0 }; - -/* Has the value of the URL under the mouse pointer, otherwise NULL */ -static gchar *current_url = NULL; - -static void chmsee_ihtml_interface_init (ChmseeIhtmlInterface *iface); - -G_DEFINE_TYPE_WITH_CODE (Html, html, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (CHMSEE_TYPE_IHTML, - chmsee_ihtml_interface_init)); - -static void -html_class_init(HtmlClass *klass) -{ - signals[TITLE_CHANGED] = - g_signal_new ("title-changed", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_VOID__STRING, - G_TYPE_NONE, - 1, G_TYPE_STRING); - - signals[LOCATION_CHANGED] = - g_signal_new("location-changed", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_VOID__STRING, - G_TYPE_NONE, - 1, G_TYPE_STRING); - - signals[OPEN_URI] = - g_signal_new("open-uri", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_BOOLEAN__STRING, - G_TYPE_BOOLEAN, - 1, G_TYPE_STRING); - - signals[CONTEXT_NORMAL] = - g_signal_new("context-normal", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - signals[CONTEXT_LINK] = - g_signal_new("context-link", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_VOID__STRING, - G_TYPE_NONE, - 1, G_TYPE_STRING); - - signals[OPEN_NEW_TAB] = - g_signal_new("open-new-tab", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_VOID__STRING, - G_TYPE_NONE, - 1, G_TYPE_STRING); - - signals[LINK_MESSAGE] = - g_signal_new("link-message", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - marshal_VOID__STRING, - G_TYPE_NONE, - 1, G_TYPE_STRING); -} - -static void -html_init(Html *html) -{ - html->gecko = GTK_MOZ_EMBED(gtk_moz_embed_new()); - gtk_drag_dest_unset(GTK_WIDGET(html->gecko)); - - g_signal_connect(G_OBJECT (html->gecko), - "title", - G_CALLBACK (html_title_cb), - html); - g_signal_connect(G_OBJECT (html->gecko), - "location", - G_CALLBACK (html_location_cb), - html); - g_signal_connect(G_OBJECT (html->gecko), - "open-uri", - G_CALLBACK (html_open_uri_cb), - html); - g_signal_connect(G_OBJECT (html->gecko), - "dom_mouse_click", - G_CALLBACK (html_mouse_click_cb), - html); - g_signal_connect(G_OBJECT (html->gecko), - "link_message", - G_CALLBACK (html_link_message_cb), - html); - g_signal_connect(G_OBJECT (html->gecko), - "add", - G_CALLBACK (html_child_add_cb), - html); - g_signal_connect(G_OBJECT (html->gecko), - "remove", - G_CALLBACK (html_child_remove_cb), - html); -} - -/* callbacks */ - -static void -html_title_cb(GtkMozEmbed *embed, Html *html) -{ - char *new_title; - - new_title = gtk_moz_embed_get_title(embed); - g_signal_emit(html, signals[TITLE_CHANGED], 0, new_title); - g_free(new_title); -} - -static void -html_location_cb(GtkMozEmbed *embed, Html *html) -{ - char *location; - - location = gtk_moz_embed_get_location(embed); - g_signal_emit(html, signals[LOCATION_CHANGED], 0, location); - g_free(location); -} - -static gboolean -html_open_uri_cb(GtkMozEmbed *embed, const gchar *uri, Html *html) -{ - gboolean ret_val; - - ret_val = TRUE; - - g_signal_emit(html, signals[OPEN_URI], 0, uri, &ret_val); - - /* Reset current url */ - if (current_url != NULL) { - g_free(current_url); - current_url = NULL; - - g_signal_emit(html, signals[LINK_MESSAGE], 0, ""); - } - - return ret_val; -} - -static gboolean -html_mouse_click_cb(GtkMozEmbed *widget, gpointer dom_event, Html *html) -{ - gint button; - gint mask; - - button = gecko_utils_get_mouse_event_button(dom_event); - mask = gecko_utils_get_mouse_event_modifiers(dom_event); - - if (button == 2 || (button == 1 && mask & GDK_CONTROL_MASK)) { - if (current_url) { - g_signal_emit(html, signals[OPEN_NEW_TAB], 0, current_url); - - return TRUE; - } - } else if (button == 3) { - if (current_url) - g_signal_emit(html, signals[CONTEXT_LINK], 0, current_url); - else - g_signal_emit(html, signals[CONTEXT_NORMAL], 0); - - return TRUE; - } - - return FALSE; -} - -static gboolean -html_link_message_cb(GtkMozEmbed *widget, Html *html) -{ - g_free(current_url); - - current_url = gtk_moz_embed_get_link_message(widget); - g_signal_emit(html, signals[LINK_MESSAGE], 0, current_url); - - if (current_url[0] == '\0') { - g_free(current_url); - current_url = NULL; - } - - return FALSE; -} - -static void -html_child_add_cb(GtkMozEmbed *embed, GtkWidget *child, Html *html) -{ - g_signal_connect(G_OBJECT (child), - "grab-focus", - G_CALLBACK (html_child_grab_focus_cb), - html); -} - -static void -html_child_remove_cb(GtkMozEmbed *embed, GtkWidget *child, Html *html) -{ - g_signal_handlers_disconnect_by_func(child, html_child_grab_focus_cb, html); -} - -static void -html_child_grab_focus_cb(GtkWidget *widget, Html *html) -{ - GdkEvent *event; - - event = gtk_get_current_event(); - - if (event == NULL) - g_signal_stop_emission_by_name(widget, "grab-focus"); - else - gdk_event_free(event); -} - -/* external functions */ - -Html * -html_new(void) -{ - Html *html; - - html = g_object_new(TYPE_HTML, NULL); - - return html; -} - -void -html_clear(Html *html) -{ - static const char *data = ""; - - g_return_if_fail(IS_HTML (html)); - - gtk_moz_embed_render_data(html->gecko, data, strlen(data), "file:///", "text/html"); -} - -void -html_open_uri(Html *self, const gchar *str_uri) -{ - gchar *full_uri; - - g_return_if_fail(IS_HTML (self)); - g_return_if_fail(str_uri != NULL); - - if (str_uri[0] == '/') - full_uri = g_strdup_printf("file://%s", str_uri); - else - full_uri = g_strdup(str_uri); - - if(g_strcmp0(full_uri, html_get_location(self)) != 0) { - g_debug("Open uri %s", full_uri); - gtk_moz_embed_load_url(self->gecko, full_uri); - } - g_free(full_uri); -} - -GtkWidget * -html_get_widget(Html *html) -{ - g_return_val_if_fail(IS_HTML (html), NULL); - - return GTK_WIDGET (html->gecko); -} - -gboolean -html_can_go_forward(Html *html) -{ - g_return_val_if_fail(IS_HTML (html), FALSE); - - return gtk_moz_embed_can_go_forward(html->gecko); -} - -gboolean -html_can_go_back(Html *html) -{ - g_return_val_if_fail(IS_HTML (html), FALSE); - - return gtk_moz_embed_can_go_back(html->gecko); -} - -void -html_go_forward(Html *html) -{ - g_return_if_fail(IS_HTML (html)); - - gtk_moz_embed_go_forward(html->gecko); -} - -void -html_go_back(Html *html) -{ - g_return_if_fail(IS_HTML (html)); - - gtk_moz_embed_go_back(html->gecko); -} - -gchar * -html_get_title(Html *html) -{ - g_return_val_if_fail(IS_HTML (html), NULL); - - return gtk_moz_embed_get_title(html->gecko); -} - -gchar * -html_get_location(Html *html) -{ - g_return_val_if_fail(IS_HTML (html), NULL); - - return gtk_moz_embed_get_location(html->gecko); -} - -void -html_copy_selection(Html *html) -{ - g_return_if_fail(IS_HTML (html)); - - gecko_utils_copy_selection(html->gecko); -} - -void -html_select_all(Html *html) -{ - g_return_if_fail(IS_HTML (html)); - - gecko_utils_select_all(html->gecko); -} - -void -html_increase_size(Html *html) -{ - gfloat zoom; - - g_return_if_fail(IS_HTML (html)); - - zoom = gecko_utils_get_zoom(html->gecko); - zoom *= 1.2; - - gecko_utils_set_zoom(html->gecko, zoom); -} - -void -html_reset_size(Html *html) -{ - g_return_if_fail(IS_HTML (html)); - - gecko_utils_set_zoom(html->gecko, 1.0); -} - -void -html_decrease_size(Html *html) -{ - gfloat zoom; - - g_return_if_fail(IS_HTML (html)); - - zoom = gecko_utils_get_zoom(html->gecko); - zoom /= 1.2; - - gecko_utils_set_zoom(html->gecko, zoom); -} - -void html_shutdown(Html* html) { - gecko_utils_shutdown(); -} - -void html_init_system(void) { - gecko_utils_init(); -} - -void html_set_default_lang(gint lang) { - gecko_utils_set_default_lang(lang); -} - -void html_set_variable_font(Html* html, const gchar* font) { - gecko_utils_set_font(GECKO_PREF_FONT_VARIABLE, font); -} - -void html_set_fixed_font(Html* html, const gchar* font) { - gecko_utils_set_font(GECKO_PREF_FONT_FIXED, font); -} - - -void chmsee_ihtml_interface_init (ChmseeIhtmlInterface *iface) { - iface->get_title = html_get_title; - iface->get_location = html_get_location; - iface->can_go_back = html_can_go_back; - iface->can_go_forward = html_can_go_forward; - - iface->open_uri = html_open_uri; - iface->copy_selection = html_copy_selection; - iface->select_all = html_select_all; - iface->go_back = html_go_back; - iface->go_forward = html_go_forward; - iface->increase_size = html_increase_size; - iface->decrease_size = html_decrease_size; - iface->reset_size = html_reset_size; - iface->set_variable_font = html_set_variable_font; - iface->set_fixed_font = html_set_fixed_font; - iface->clear = html_clear; - iface->shutdown = html_shutdown; - iface->get_widget = html_get_widget; -} diff -Nru chmsee-1.0.7/src/html-factory.c chmsee-1.3.0/src/html-factory.c --- chmsee-1.0.7/src/html-factory.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/html-factory.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "html-factory.h" - -#include "html.h" - -ChmseeIhtml* chmsee_html_new() { - return CHMSEE_IHTML(html_new()); -} - -void chmsee_html_init_system() { - html_init_system(); -} - -void chmsee_html_set_default_lang(int lang) { - html_set_default_lang(lang); -} - - - diff -Nru chmsee-1.0.7/src/html-factory.h chmsee-1.3.0/src/html-factory.h --- chmsee-1.0.7/src/html-factory.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/html-factory.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __CHMSEE_HTML_FACTORY_H__ -#define __CHMSEE_HTML_FACTORY_H__ - -#include "ihtml.h" - -ChmseeIhtml* chmsee_html_new(); -void chmsee_html_init_system(); -void chmsee_html_set_default_lang(int lang); - -#endif diff -Nru chmsee-1.0.7/src/html.h chmsee-1.3.0/src/html.h --- chmsee-1.0.7/src/html.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/html.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __HTML_H__ -#define __HTML_H__ - -#include -#include -#include - -#define TYPE_HTML \ - (html_get_type()) -#define HTML(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_HTML, Html)) -#define HTML_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST((k), TYPE_HTML, HtmlClass)) -#define IS_HTML(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_HTML)) -#define IS_HTML_CLASS(k) \ - (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_HTML)) - -typedef struct _Html Html; -typedef struct _HtmlClass HtmlClass; - -struct _Html { - GObject parent; - GtkMozEmbed *gecko; -}; - -struct _HtmlClass { - GObjectClass parent_class; - - /* Signals */ - void (* title_changed) (Html *html, const gchar *title); - void (* location_changed) (Html *html, const gchar *location); - gboolean (* open_uri) (Html *html, const gchar *uri); - void (* context_normal) (Html *html); - void (* context_link) (Html *html, const gchar *link); - void (* open_new_tab) (Html *html, const gchar *uri); - void (* link_message) (Html *html, const gchar *link); -}; - -GType html_get_type(void); -Html *html_new(void); -void html_clear(Html *); -void html_open_uri(Html *, const gchar *); - -GtkWidget *html_get_widget(Html *); -gboolean html_can_go_forward(Html *); -gboolean html_can_go_back(Html *); -void html_go_forward(Html *); -void html_go_back(Html *); -gchar *html_get_title(Html *); -gchar *html_get_location(Html *); -void html_copy_selection(Html *); -void html_select_all(Html *); -void html_increase_size(Html *); -void html_reset_size(Html *); -void html_decrease_size(Html *); -void html_shutdown(Html*); -void html_set_variable_font(Html*, const gchar*); -void html_set_fixed_font(Html*, const gchar*); -void html_init_system(void); -void html_set_default_lang(gint); - -#endif /* !__HTML_H__ */ diff -Nru chmsee-1.0.7/src/ihtml.c chmsee-1.3.0/src/ihtml.c --- chmsee-1.0.7/src/ihtml.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ihtml.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "ihtml.h" - -static void -chmsee_ihtml_base_init (gpointer g_class) -{ - static gboolean is_initialized = FALSE; - - if (!is_initialized) - { - /* add properties and signals to the interface here */ - - is_initialized = TRUE; - } -} - -GType -chmsee_ihtml_get_type (void) -{ - static GType iface_type = 0; - if (iface_type == 0) - { - static const GTypeInfo info = { - sizeof (ChmseeIhtmlInterface), - chmsee_ihtml_base_init, /* base_init */ - NULL, /* base_finalize */ - }; - - iface_type = g_type_register_static (G_TYPE_INTERFACE, "ChmseeIhtml", - &info, 0); - } - - return iface_type; -} - -const gchar* chmsee_ihtml_get_title(ChmseeIhtml* self) { - g_return_val_if_fail (CHMSEE_IS_IHTML(self), NULL); - return CHMSEE_IHTML_GET_INTERFACE (self)->get_title(self); -} - -const gchar* chmsee_ihtml_get_location(ChmseeIhtml* self) { - g_return_val_if_fail (CHMSEE_IS_IHTML(self), NULL); - return CHMSEE_IHTML_GET_INTERFACE (self)->get_location(self); -} - -gboolean chmsee_ihtml_can_go_back(ChmseeIhtml* self) { - g_return_val_if_fail (CHMSEE_IS_IHTML(self), FALSE); - return CHMSEE_IHTML_GET_INTERFACE (self)->can_go_back(self); -} -gboolean chmsee_ihtml_can_go_forward(ChmseeIhtml* self) { - g_return_val_if_fail (CHMSEE_IS_IHTML(self), FALSE); - return CHMSEE_IHTML_GET_INTERFACE (self)->can_go_forward(self); -} - - -void chmsee_ihtml_open_uri(ChmseeIhtml* self, const gchar* uri) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - g_debug("enter chmsee_ihtml_open_uri with self=%p, uri=%s", self, uri); - CHMSEE_IHTML_GET_INTERFACE (self)->open_uri(self, uri); -} - -void chmsee_ihtml_copy_selection(ChmseeIhtml* self) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->copy_selection(self); -} -void chmsee_ihtml_select_all(ChmseeIhtml* self) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->select_all(self); -} -void chmsee_ihtml_go_back(ChmseeIhtml* self) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->go_back(self); -} - -void chmsee_ihtml_go_forward(ChmseeIhtml* self) { - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->go_forward(self); -} -void chmsee_ihtml_increase_size(ChmseeIhtml* self) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->increase_size(self); -} - -void chmsee_ihtml_reset_size(ChmseeIhtml* self) - { - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->reset_size(self); -} - -void chmsee_ihtml_decrease_size(ChmseeIhtml* self) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->decrease_size(self); -} - -void chmsee_ihtml_shutdown(ChmseeIhtml* self) -{ - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->shutdown(self); -} - -void chmsee_ihtml_set_variable_font(ChmseeIhtml* self, const gchar* font) { - - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->set_variable_font(self, font); -} - -void chmsee_ihtml_set_fixed_font(ChmseeIhtml* self, const gchar* font) { - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->set_fixed_font(self, font); - -} -void chmsee_ihtml_clear(ChmseeIhtml* self) - { - g_return_if_fail (CHMSEE_IS_IHTML(self)); - CHMSEE_IHTML_GET_INTERFACE (self)->clear(self); -} - -GtkWidget* chmsee_ihtml_get_widget(ChmseeIhtml* self) { - g_return_val_if_fail (CHMSEE_IS_IHTML(self), NULL); - return CHMSEE_IHTML_GET_INTERFACE (self)->get_widget(self); -} - - - diff -Nru chmsee-1.0.7/src/ihtml.h chmsee-1.3.0/src/ihtml.h --- chmsee-1.0.7/src/ihtml.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ihtml.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __CHMSEE_IHTML_H__ -#define __CHMSEE_IHTML_H__ - -#include -#include - -#define CHMSEE_TYPE_IHTML (chmsee_ihtml_get_type()) -#define CHMSEE_IHTML(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CHMSEE_TYPE_IHTML, ChmseeIhtml)) -#define CHMSEE_IS_IHTML(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHMSEE_TYPE_IHTML)) -#define CHMSEE_IHTML_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), CHMSEE_TYPE_IHTML, ChmseeIhtmlInterface)) - -typedef struct _ChmseeIhtml ChmseeIhtml; /* dummy */ -typedef struct _ChmseeIhtmlInterface ChmseeIhtmlInterface; - -struct _ChmseeIhtmlInterface -{ - GTypeInterface parent_iface; - - const gchar* (*get_title) (ChmseeIhtml* self); - const gchar* (*get_location) (ChmseeIhtml* self); - gboolean (*can_go_back) (ChmseeIhtml* self); - gboolean (*can_go_forward) (ChmseeIhtml* self); - - - void (*open_uri) (ChmseeIhtml* self, const gchar* uri); - void (*copy_selection) (ChmseeIhtml* self); - void (*select_all) (ChmseeIhtml* self); - void (*go_back) (ChmseeIhtml* self); - void (*go_forward) (ChmseeIhtml* self); - void (*increase_size) (ChmseeIhtml* self); - void (*decrease_size) (ChmseeIhtml* self); - void (*reset_size) (ChmseeIhtml* self); - void (*set_variable_font) (ChmseeIhtml* self, const gchar* font); - void (*set_fixed_font) (ChmseeIhtml* self, const gchar* font); - void (*clear) (ChmseeIhtml* self); - void (*shutdown) (ChmseeIhtml* self); - - GtkWidget* (*get_widget) (ChmseeIhtml* self); -}; - -GType chmsee_ihtml_get_type(void); - -const gchar* chmsee_ihtml_get_title(ChmseeIhtml* self); -const gchar* chmsee_ihtml_get_location(ChmseeIhtml* self); -gboolean chmsee_ihtml_can_go_back(ChmseeIhtml* self); -gboolean chmsee_ihtml_can_go_forward(ChmseeIhtml* self); - -void chmsee_ihtml_open_uri(ChmseeIhtml* self, const gchar* uri); -void chmsee_ihtml_copy_selection(ChmseeIhtml* self); -void chmsee_ihtml_select_all(ChmseeIhtml* self); -void chmsee_ihtml_go_back(ChmseeIhtml* self); -void chmsee_ihtml_go_forward(ChmseeIhtml* self); -void chmsee_ihtml_increase_size(ChmseeIhtml* self); -void chmsee_ihtml_reset_size(ChmseeIhtml* self); -void chmsee_ihtml_decrease_size(ChmseeIhtml* self); -void chmsee_ihtml_shutdown(ChmseeIhtml* self); -void chmsee_ihtml_set_variable_font(ChmseeIhtml* self, const gchar* font); -void chmsee_ihtml_set_fixed_font(ChmseeIhtml* self, const gchar* font); -void chmsee_ihtml_clear(ChmseeIhtml* self); -GtkWidget* chmsee_ihtml_get_widget(ChmseeIhtml* self); - -#endif diff -Nru chmsee-1.0.7/src/main.c chmsee-1.3.0/src/main.c --- chmsee-1.0.7/src/main.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/main.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/*************************************************************************** + * Copyright (C) 2003 by zhong * + * zhongz@163.com * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#include "config.h" + +#include +#include +#include +#include + +#include + +#include +#include + +#include "chmsee.h" +#include "utils.h" + +static int log_level = 2; /* only show WARNING, CRITICAL, ERROR */ + +static void +dummy_log_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data) +{} + +static void +init_log(int log_level) +{ + GLogLevelFlags log_levels = G_LOG_LEVEL_ERROR; + if (log_level < 1) log_levels |= G_LOG_LEVEL_CRITICAL; + if (log_level < 2) log_levels |= G_LOG_LEVEL_WARNING; + if (log_level < 3) log_levels |= G_LOG_LEVEL_MESSAGE; + if (log_level < 4) log_levels |= G_LOG_LEVEL_INFO; + if (log_level < 5) log_levels |= G_LOG_LEVEL_DEBUG; + + g_log_set_handler(NULL, log_levels, dummy_log_handler, NULL); +} + +static gboolean +callback_verbose(const gchar *option_name, + const gchar *value, + gpointer data, + GError **error) +{ + log_level++; + return TRUE; +} + +static gboolean +callback_quiet(const gchar *option_name, + const gchar *value, + gpointer data, + GError **error) +{ + log_level--; + return TRUE; +} + +CsConfig * +load_config() +{ + g_message("Main >>> load config"); + CsConfig *config = g_slice_new(CsConfig); + + /* ChmSee's HOME directory, based on $XDG_CONFIG_HOME, defaultly locate in ~/.config/chmsee */ + config->home = g_build_filename(g_get_user_config_dir(), PACKAGE, NULL); + if (!g_file_test(config->home, G_FILE_TEST_IS_DIR)) + mkdir(config->home, 0755); + + /* ChmSee's bookshelf directory, based on $XDG_CACHE_HOME, defaultly locate in ~/.cache/chmsee/bookshelf */ + config->bookshelf = g_build_filename(g_get_user_cache_dir(), + PACKAGE, + CHMSEE_BOOKSHELF_DEFAULT, NULL); + if (!g_file_test(config->bookshelf, G_FILE_TEST_IS_DIR)) + mkdir(config->bookshelf, 0755); + + config->last_file = NULL; + config->charset = NULL; + config->variable_font = NULL; + config->fixed_font = NULL; + config->pos_x = -100; + config->pos_y = -100; + config->width = 0; + config->height = 0; + config->hpaned_pos = 200; + config->fullscreen = FALSE; + config->startup_lastfile = FALSE; + + gchar *config_file = g_build_filename(config->home, CHMSEE_CONFIG_FILE, NULL); + g_debug("Main >>> chmsee config file path = %s", config_file); + + if (g_file_test(config_file, G_FILE_TEST_EXISTS)) { + GKeyFile *keyfile = g_key_file_new(); + gboolean rv = g_key_file_load_from_file(keyfile, config_file, G_KEY_FILE_NONE, NULL); + + if (!rv) + convert_old_config_file(config_file, "[ChmSee]\n"); + + rv = g_key_file_load_from_file(keyfile, config_file, G_KEY_FILE_NONE, NULL); + + if (rv) { + config->last_file = g_key_file_get_string(keyfile, "ChmSee", "LAST_FILE", NULL); + config->charset = g_key_file_get_string(keyfile, "ChmSee", "CHARSET", NULL); + config->variable_font = g_key_file_get_string(keyfile, "ChmSee", "VARIABLE_FONT", NULL); + config->fixed_font = g_key_file_get_string(keyfile, "ChmSee", "FIXED_FONT", NULL); + + config->pos_x = g_key_file_get_integer(keyfile, "ChmSee", "POS_X", NULL); + config->pos_y = g_key_file_get_integer(keyfile, "ChmSee", "POS_Y", NULL); + config->width = g_key_file_get_integer(keyfile, "ChmSee", "WIDTH", NULL); + config->height = g_key_file_get_integer(keyfile, "ChmSee", "HEIGHT", NULL); + config->hpaned_pos = g_key_file_get_integer(keyfile, "ChmSee", "HPANED_POSITION", NULL); + config->fullscreen = g_key_file_get_boolean(keyfile, "ChmSee", "FULLSCREEN", NULL); + config->startup_lastfile = g_key_file_get_boolean(keyfile, "ChmSee", "STARTUP_LASTFILE", NULL); + + if (config->hpaned_pos <= 0) + config->hpaned_pos = 200; + } + + g_key_file_free(keyfile); + } + g_free(config_file); + + /* global default value */ + if (config->charset == NULL) + config->charset = g_strdup("Auto"); + if (config->variable_font == NULL) + config->variable_font = g_strdup("Sans 12"); + if (config->fixed_font == NULL) + config->fixed_font = g_strdup("Monospace 12"); + + return config; +} + +void +save_config(CsConfig *config) +{ + gsize length = 0; + + g_message("Main >>> save config"); + gchar *config_file = g_build_filename(config->home, CHMSEE_CONFIG_FILE, NULL); + + GKeyFile *keyfile = g_key_file_new(); + + if (config->last_file != NULL) + g_key_file_set_string(keyfile, "ChmSee", "LAST_FILE", config->last_file); + + g_key_file_set_string(keyfile, "ChmSee", "CHARSET", config->charset); + g_key_file_set_string(keyfile, "ChmSee", "VARIABLE_FONT", config->variable_font); + g_key_file_set_string(keyfile, "ChmSee", "FIXED_FONT", config->fixed_font); + + g_key_file_set_integer(keyfile, "ChmSee", "POS_X", config->pos_x); + g_key_file_set_integer(keyfile, "ChmSee", "POS_Y", config->pos_y); + g_key_file_set_integer(keyfile, "ChmSee", "WIDTH", config->width); + g_key_file_set_integer(keyfile, "ChmSee", "HEIGHT", config->height); + g_key_file_set_integer(keyfile, "ChmSee", "HPANED_POSITION", config->hpaned_pos); + g_key_file_set_boolean(keyfile, "ChmSee", "FULLSCREEN", config->fullscreen); + g_key_file_set_boolean(keyfile, "ChmSee", "STARTUP_LASTFILE", config->startup_lastfile); + + gchar *contents = g_key_file_to_data(keyfile, &length, NULL); + g_file_set_contents(config_file, contents, length, NULL); + + g_key_file_free(keyfile); + g_free(contents); + g_free(config_file); + + g_free(config->home); + g_free(config->bookshelf); + g_free(config->last_file); + + g_free(config->charset); + g_free(config->variable_font); + g_free(config->fixed_font); + + g_slice_free(CsConfig, config); +} + +int +main(int argc, char *argv[]) +{ + const gchar *filename = NULL; + + GError *error = NULL; + gboolean option_version = FALSE; + + if (!g_thread_supported()) + g_thread_init(NULL); + + GOptionEntry options[] = { + {"version", 0, + 0, G_OPTION_ARG_NONE, &option_version, + _("Display ChmSee version"), + NULL + }, + {"verbose", 'v', + G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*)callback_verbose, + _("Be verbose, repeat 3 times to get all information"), + NULL + }, + {"quiet", 'q', + G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*)callback_quiet, + _("Be quiet, repeat 2 times to disable all information"), + NULL + }, + {NULL} + }; + + char params[] = + "[chmfile]\n" + "\n" + "GTK+ based CHM file viewer\n" + "Example: chmsee Handbook.chm::toc.html"; + + if (!gtk_init_with_args(&argc, &argv, params, options, GETTEXT_PACKAGE, &error)) { + g_printerr("%s\n", error->message); + return 1; + } + + if (option_version) { + g_print("%s\n", PACKAGE_STRING); + return 0; + } + + if (argc >= 2) + filename = argv[1]; // only open the first specified file + + init_log(log_level); + + /* i18n */ + bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + textdomain(GETTEXT_PACKAGE); + + CsConfig *config = load_config(); + + Chmsee *chmsee = chmsee_new(config); + + if (chmsee == NULL) { + g_warning("Creating chmsee main window failed!"); + return 1; + } + + if (filename != NULL) + chmsee_open_file(chmsee, filename); + else if (config->startup_lastfile && config->last_file) + chmsee_open_file(chmsee, config->last_file); + + gtk_main(); + + save_config(config); + + return 0; +} diff -Nru chmsee-1.0.7/src/main.cpp chmsee-1.3.0/src/main.cpp --- chmsee-1.0.7/src/main.cpp 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/main.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/*************************************************************************** - * Copyright (C) 2003 by zhong * - * zhongz@163.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#include "config.h" - -#include -#include -#include - -#if defined(__linux__) -#include -#include -#include -#endif - -#include "chmsee.h" -#include "startup.h" -#include "utils/utils.h" - -static void dummy_log_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer unused_data) -{} - -static void init_log(int log_level) { - if(log_level < 1) g_log_set_handler(NULL, G_LOG_LEVEL_CRITICAL, dummy_log_handler, NULL); - if(log_level < 2) g_log_set_handler(NULL, G_LOG_LEVEL_WARNING, dummy_log_handler, NULL); - if(log_level < 3) g_log_set_handler(NULL, G_LOG_LEVEL_MESSAGE, dummy_log_handler, NULL); - if(log_level < 4) g_log_set_handler(NULL, G_LOG_LEVEL_INFO, dummy_log_handler, NULL); - if(log_level < 5) g_log_set_handler(NULL, G_LOG_LEVEL_DEBUG, dummy_log_handler, NULL); -} - -static int log_level = 2; /* only show WARNING, CRITICAL, ERROR */ -static gboolean callback_verbose(const gchar *option_name, - const gchar *value, - gpointer data, - GError **error) { - log_level++; - return TRUE; -} - -static gboolean callback_quiet(const gchar *option_name, - const gchar *value, - gpointer data, - GError **error) { - log_level--; - return TRUE; -} - -#if defined(__linux__) -GCRY_THREAD_OPTION_PTHREAD_IMPL; -#endif - -int -main(int argc, char** argv) -{ - ChmSee *chmsee; - const gchar* filename = NULL; - const gchar* datadir = NULL; - const gchar* index = NULL; - GError* error = NULL; - gboolean option_version = FALSE; - -#if defined(__linux__) - if (!gcry_check_version(NULL)) { - fprintf(stderr, "failed to initialize gcrypt\n"); - exit(1); - } - gcry_control (GCRYCTL_SET_THREAD_CBS,&gcry_threads_pthread); - gcry_control (GCRYCTL_DISABLE_SECMEM, 0); -#endif - - if (!g_thread_supported()) - g_thread_init(NULL); - - - GOptionEntry options[] = { - {"index", 'i', - 0, G_OPTION_ARG_STRING, &index, - _("Specify index"), - _("INDEX") - }, - {"version", 0, - 0, G_OPTION_ARG_NONE, &option_version, - _("Display the version and exit"), - NULL - }, - {"verbose", 'v', - G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*)callback_verbose, - _("be verbose, repeat 3 times to get all info"), - NULL - }, - {"quiet", 'q', - G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (void*)callback_quiet, - _("be quiet, repeat 2 times to disable all info"), - NULL - }, - {"datadir", 0, - G_OPTION_FLAG_FILENAME, G_OPTION_ARG_FILENAME, &datadir, - "choose data dir, default is " CHMSEE_DATA_DIR_DEFAULT, - _("PATH") - }, - {NULL} - }; - if(!gtk_init_with_args(&argc, &argv, - "[chmfile]\n" - "\n" - "GTK+ based CHM file viewer\n" - "Example: chmsee FreeBSD_Handbook.chm" - , - options, - g_strdup(GETTEXT_PACKAGE), - &error)) - { - g_printerr("%s\n", error->message); - return 1; - } - if(option_version) { - g_print("%s\n", PACKAGE_STRING); - return 0; - } - - init_log(log_level); - if(datadir != NULL) { - set_data_dir(datadir); - } - - if(argc == 1) { - } else if(argc == 2) { - filename = argv[1]; - } else { - g_printerr(_("more than 1 argument\n")); - return 1; - } - - /* i18n */ - bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); - bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); - textdomain(GETTEXT_PACKAGE); - - /* Show splash screen */ - startup_popup_new(); - - /* Create main window */ - chmsee = chmsee_new(filename); - if(index != NULL) { - chmsee_jump_index_by_name(chmsee, index); - } - - gtk_widget_show(GTK_WIDGET (chmsee)); - - gtk_main(); - - return 0; -} diff -Nru chmsee-1.0.7/src/marshal.list chmsee-1.3.0/src/marshal.list --- chmsee-1.0.7/src/marshal.list 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/marshal.list 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -VOID:VOID -VOID:BOOLEAN -VOID:STRING -BOOLEAN:STRING diff -Nru chmsee-1.0.7/src/marshal_main.c chmsee-1.3.0/src/marshal_main.c --- chmsee-1.0.7/src/marshal_main.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/marshal_main.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -#include "marshal.h" -#include "marshal.c" diff -Nru chmsee-1.0.7/src/models/bookmarks.c chmsee-1.3.0/src/models/bookmarks.c --- chmsee-1.0.7/src/models/bookmarks.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/bookmarks.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "bookmarks.h" - -#include - -#include "utils/utils.h" -#include "models/link.h" - -Bookmarks * -bookmarks_load(const gchar *path) -{ - Bookmarks* links = NULL; - GList *pairs, *list; - - g_debug("bookmarks path = %s", path); - - pairs = parse_config_file("bookmarks", path); - - for (list = pairs; list; list = list->next) { - Link *link; - Item *item; - - item = list->data; - link = link_new(LINK_TYPE_PAGE, item->id, item->value); - - links = g_list_prepend(links, link); - } - - free_config_list(pairs); - - return links; -} - -static void -save_bookmark(Link *link, FILE *fd) -{ - save_option(fd, link->name, link->uri); -} - -void -bookmarks_save(Bookmarks* links, const gchar* path) -{ - FILE *fd; - - g_debug("save bookmarks path = %s", path); - - fd = fopen(path, "w"); - - if (!fd) { - g_print("Faild to open bookmarks file: %s", path); - return; - } - - g_list_foreach(links, (GFunc)save_bookmark, fd); - - fclose(fd); -} diff -Nru chmsee-1.0.7/src/models/bookmarksfile.c chmsee-1.3.0/src/models/bookmarksfile.c --- chmsee-1.0.7/src/models/bookmarksfile.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/models/bookmarksfile.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include + +#include "bookmarksfile.h" +#include "utils.h" +#include "models/link.h" + +static gchar *strip_string(gchar *); +static gchar *escape_parse(gchar *); +static gint parse_line(gchar *, gchar *, gchar *); +static void save_bookmark(Link *, FILE *); + +static gchar * +strip_string(gchar *str) +{ + gint i,j; + gint c1; + + if (str == NULL) + return NULL; + + /* count how many leading chars to be whitespace */ + for (i = 0; i < strlen(str); i++) { + if (str[i] != ' ' && str[i] != '\t' && str[i] != '\r') + break; + } + + /* count how many trailing chars to be whitespace */ + for (j = strlen(str)-1; j >= 0; j--) { + if (str[j] != ' ' && str[j] != '\t' && str[j] != '\n') + break; + } + + /* string contains only whitespace? */ + if (j < i) { + str[0] = '\0'; + + return str; + } + + /* now move the chars to the front */ + for (c1 = i; c1 <= j; c1++) + str[c1-i] = str[c1]; + + str[j+1-i] = '\0'; + + return str; +} + +static gchar * +escape_parse(gchar *str) +{ + gchar tmp[MAXLINE]; + gchar c; + gint i, j; + + if (str == NULL) + return NULL; + + j = 0; + for(i = 0; i < strlen(str); i++) { + c = str[i]; + if (c == '\\') { + i++; + switch (str[i]) { + case 'n': + c = '\n'; + break; + case 't': + c = '\t'; + break; + case 'b': + c = '\b'; + break; + default: + c = str[i]; + } + } + + tmp[j] = c; + j++; + } + + tmp[j] = '\0'; + strcpy(str, tmp); + + return(str); +} + +static gint +parse_line(gchar *iline, gchar *id, gchar *value) +{ + gchar *p,*p2; + gchar line[1024]; + gchar tmp[1024]; + + strcpy(line, iline); + strcpy(id, ""); + p = strtok(line, "="); + + if (p != NULL) { + strcpy(id, p); /* got id */ + strip_string(id); + } else + return 1; + + strcpy(tmp, ""); + p = strtok(NULL, ""); + + if (p != NULL) { + strcpy(tmp, p); /* string after = */ + strip_string(tmp); + } else + return 1; + + /* Now strip quotes from string */ + p = tmp; + p2 = *p == '\"' ? p+1 : p; + + if (p[strlen(p)-1] == '\"') + p[strlen(p)-1] = '\0'; + + strcpy(value, p2); + + /* Now reconvert escape-chars */ + escape_parse(value); + + /* All OK */ + return 0; +} + +static void +save_bookmark(Link *link, FILE *fd) +{ + fprintf(fd, "%s=%s\n", link->name, link->uri); + link_free(link); +} + +/* External functions */ + +GList * +cs_bookmarks_file_load(const gchar *path) +{ + g_debug("CS_BOOKMARKS_FILE >>> load bookmarks file = %s", path); + + GList *links = NULL; + FILE *fd; + + gchar line[MAXLINE]; + gchar id[MAXLINE]; + gchar value[MAXLINE]; + + if ((fd = fopen(path, "r")) == NULL) { + g_debug("CS_BOOKMARKS_FILE >>> Failed to open bookmarks file"); + return NULL; + } + + while (fgets(line, MAXLINE, fd)) { + /* Skip empty or hashed lines */ + strip_string(line); + + if (*line == '#' || *line == '\0') + continue; + + /* Parse lines */ + if (parse_line(line, id, value)) { + g_debug("CS_BOOKMARKS_FILE >>> Syntax error in %s bookmarks file. line: %s", path, line); + } + + g_debug("CS_BOOKMARKS_FILE >>> add item: name = %s, value = %s", id, value); + Link *link = link_new(LINK_TYPE_PAGE, g_strdup(id), g_strdup(value)); + + links = g_list_prepend(links, link); + } + + fclose(fd); + return links; +} + +void +cs_bookmarks_file_save(GList *links, const gchar *path) +{ + g_debug("CS_BOOKMARKS_FILE >>> save bookmarks file = %s", path); + + FILE *fd = fopen(path, "w"); + + if (fd == NULL) { + g_warning("CS_BOOKMARKS_FILE >>> Faild to save bookmarks file: %s", path); + return; + } + + g_list_foreach(links, (GFunc)save_bookmark, fd); + g_list_free(links); + + fclose(fd); +} diff -Nru chmsee-1.0.7/src/models/bookmarksfile.h chmsee-1.3.0/src/models/bookmarksfile.h --- chmsee-1.0.7/src/models/bookmarksfile.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/models/bookmarksfile.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_BOOKMARKS_FILE_H__ +#define __CS_BOOKMARKS_FILE_H__ + +#include + +G_BEGIN_DECLS + +GList *cs_bookmarks_file_load(const gchar *); +void cs_bookmarks_file_save(GList *, const gchar *); + +G_END_DECLS + +#endif /* !__CS_BOOKMARKS_FILE_H__ */ diff -Nru chmsee-1.0.7/src/models/bookmarks.h chmsee-1.3.0/src/models/bookmarks.h --- chmsee-1.0.7/src/models/bookmarks.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/bookmarks.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __CHMSEE_MODELS_BOOKMARKS_H__ -#define __CHMSEE_MODELS_BOOKMARKS_H__ - -#include - -typedef GList Bookmarks; - -/** - * load bookmarks from file. - * - * @param fname file path. - * - * @return Bookmarks* if success - * @return NULL if failed - */ -Bookmarks* bookmarks_load(const gchar* fname); - -/** - * save bookmarks to file - * - * @param bookmarks - * @param ofname output file name - */ -void bookmarks_save(Bookmarks* bookmarks, const gchar* ofname); - -/** - * free bookmarks - * - * @param bookmarks - */ -void bookmarks_free(Bookmarks* bookmarks); - -#endif diff -Nru chmsee-1.0.7/src/models/chmfile.c chmsee-1.3.0/src/models/chmfile.c --- chmsee-1.0.7/src/models/chmfile.c 2011-05-12 03:12:49.000000000 +0000 +++ chmsee-1.3.0/src/models/chmfile.c 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * Copyright (C) 2009 LI Daobing * * ChmSee is free software; you can redistribute it and/or modify @@ -19,771 +19,1089 @@ */ #include "config.h" -#include "chmfile.h" #include #include #include #include #include -#include -#include - -#if defined(__linux__) || defined(__GLIBC__) #include +#include #include -#else -#include -#endif - -#include #include -#include "utils/utils.h" -#include "models/hhc.h" -#include "models/ichmfile.h" -#include "models/chmindex.h" - -#define UINT16ARRAY(x) ((unsigned char)(x)[0] | ((u_int16_t)(x)[1] << 8)) -#define UINT32ARRAY(x) (UINT16ARRAY(x) | ((u_int32_t)(x)[2] << 16) \ - | ((u_int32_t)(x)[3] << 24)) -#define selfp self->priv - - -struct _ChmFilePriv { - ChmIndex* index; +#include "chmfile.h" +#include "utils.h" +#include "models/bookmarksfile.h" +#include "models/parser.h" +#include "models/link.h" + +typedef struct _CsChmfilePrivate CsChmfilePrivate; + +struct _CsChmfilePrivate { + GNode *toc_tree; + GList *toc_list; + GList *index_list; + GList *bookmarks_list; + + gchar *hhc; + gchar *hhk; + gchar *bookfolder; /* the folder CHM file extracted to */ + gchar *chm; /* opened CHM file name */ + gchar *page; /* :: specified page */ + + gchar *bookname; + gchar *homepage; + gchar *encoding; /* retrieved from chmfile */ + gchar *variable_font; + gchar *fixed_font; + gchar *charset; /* user specified on setup window */ }; struct extract_context { - const char *base_path; - const char *hhc_file; - const char *hhk_file; + const char *base_path; + const char *hhc_file; + const char *hhk_file; }; -static GObjectClass *parent_class = NULL; +#define CS_CHMFILE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CS_TYPE_CHMFILE, CsChmfilePrivate)) + +#define UINT16ARRAY(x) ((unsigned char)(x)[0] | ((u_int16_t)(x)[1] << 8)) +#define UINT32ARRAY(x) (UINT16ARRAY(x) | ((u_int32_t)(x)[2] << 16) \ + | ((u_int32_t)(x)[3] << 24)) -static void chmfile_class_init(ChmFileClass *); -static void chmfile_init(ChmFile *); -static void chmfile_dispose(GObject *); -static void chmfile_finalize(GObject *); -static void chmfile_file_info(ChmFile *); -static void chmfile_system_info(struct chmFile *, ChmFile *); -static void chmfile_windows_info(struct chmFile *, ChmFile *); -static void chmfile_set_encoding(ChmFile* self, const char* encoding); +static void cs_chmfile_class_init(CsChmfileClass *); +static void cs_chmfile_init(CsChmfile *); +static void cs_chmfile_finalize(GObject *); + +static void chmfile_file_info(CsChmfile *); +static void chmfile_system_info(struct chmFile *, CsChmfile *); +static void chmfile_windows_info(struct chmFile *, CsChmfile *); static int dir_exists(const char *); static int rmkdir(char *); static int _extract_callback(struct chmFile *, struct chmUnitInfo *, void *); -static gboolean extract_chm(const gchar *, ChmFile *); -static void load_fileinfo(ChmFile* self); -static void save_fileinfo(ChmFile* self); -static void extract_post_file_write(const gchar* fname); +static const char *get_encoding_by_lcid(guint32); -static void chmsee_ichmfile_interface_init (ChmseeIchmfileInterface* iface); +static gboolean extract_chm(const gchar *, const gchar *); +static void load_bookinfo(CsChmfile *); +static void save_bookinfo(CsChmfile *); +static void extract_post_file_write(const gchar *); -G_DEFINE_TYPE_WITH_CODE (ChmFile, chmfile, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (CHMSEE_TYPE_ICHMFILE, - chmsee_ichmfile_interface_init)); +static GList *convert_node_to_list(GNode *); +static gboolean tree_to_list_callback(GNode *, gpointer); +static void free_list_data(gpointer, gpointer); +static gchar *check_file_ncase(CsChmfile *, const gchar *); + +static void parse_filename(CsChmfile *, const gchar *); + +/* GObject functions */ + +G_DEFINE_TYPE (CsChmfile, cs_chmfile, G_TYPE_OBJECT); static void -chmfile_class_init(ChmFileClass *klass) +cs_chmfile_class_init(CsChmfileClass *klass) { - g_type_class_add_private(klass, sizeof(ChmFilePriv)); - - GObjectClass *object_class; + g_type_class_add_private(klass, sizeof(CsChmfilePrivate)); - parent_class = g_type_class_peek_parent(klass); - object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); - object_class->finalize = chmfile_finalize; - object_class->dispose = chmfile_dispose; + object_class->finalize = cs_chmfile_finalize; } static void -chmfile_init(ChmFile *self) +cs_chmfile_init(CsChmfile *self) { - self->filename = NULL; - self->home = NULL; - self->hhc = NULL; - self->hhk = NULL; - self->title = NULL; - self->encoding = g_strdup("UTF-8"); - self->variable_font = g_strdup("Sans 12"); - self->fixed_font = g_strdup("Monospace 12"); - self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TYPE_CHMFILE, ChmFilePriv); - selfp->index = NULL; + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + + priv->toc_tree = NULL; + priv->index_list = NULL; + priv->bookmarks_list = NULL; + + priv->hhc = NULL; + priv->hhk = NULL; + priv->bookfolder = NULL; + priv->chm = NULL; + priv->page = NULL; + + priv->bookname = NULL; + priv->homepage = NULL; + + priv->encoding = g_strdup("UTF-8"); + priv->variable_font = g_strdup(""); + priv->fixed_font = g_strdup(""); + priv->charset = g_strdup(""); } static void -chmfile_finalize(GObject *object) +cs_chmfile_finalize(GObject *object) { - ChmFile *self; + g_debug("CS_CHMFILE >>> finalize"); + + CsChmfile *self = CS_CHMFILE (object); + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); - self = CHMFILE (object); + save_bookinfo(self); - g_message("chmfile finalize"); + g_free(priv->hhc); + g_free(priv->hhk); + g_free(priv->bookfolder); + g_free(priv->chm); + g_free(priv->page); + + g_free(priv->bookname); + g_free(priv->homepage); + g_free(priv->encoding); + g_free(priv->variable_font); + g_free(priv->fixed_font); + g_free(priv->charset); + + if (priv->index_list) { + g_list_foreach(priv->index_list, (GFunc)free_list_data, NULL); + g_list_free(priv->index_list); - save_fileinfo(self); - g_free(self->dir); - g_free(self->encoding); - g_free(self->filename); - g_free(self->hhc); - g_free(self->hhk); - g_free(self->home); - g_free(self->title); - g_free(self->variable_font); - g_free(self->fixed_font); + priv->index_list = NULL; + } - if(self->link_tree) { - g_node_destroy(self->link_tree); - } + if (priv->toc_tree) { + g_node_destroy(priv->toc_tree); + priv->toc_tree = NULL; + } + priv->bookmarks_list = NULL; - G_OBJECT_CLASS (parent_class)->finalize (object); + g_debug("CS_CHMFILE >>> finalized"); + G_OBJECT_CLASS (cs_chmfile_parent_class)->finalize (object); } +/* Internal functions */ + static int dir_exists(const char *path) { - struct stat statbuf; + struct stat statbuf; - return stat(path, &statbuf) != -1 ? 1 : 0; + return stat(path, &statbuf) != -1 ? 1 : 0; } static int rmkdir(char *path) { - /* - * strip off trailing components unless we can stat the directory, or we - * have run out of components - */ - - char *i = rindex(path, '/'); - - if (path[0] == '\0' || dir_exists(path)) - return 0; - - if (i != NULL) { - *i = '\0'; - rmkdir(path); - *i = '/'; - mkdir(path, 0777); - } + char *i = rindex(path, '/'); + + if (path[0] == '\0' || dir_exists(path)) + return 0; + + if (i != NULL) { + *i = '\0'; + rmkdir(path); + *i = '/'; + mkdir(path, 0777); + } - return dir_exists(path) ? 0 : -1; + return dir_exists(path) ? 0 : -1; } /* - * callback function for enumerate API + * Callback function for enumerate API */ static int _extract_callback(struct chmFile *h, struct chmUnitInfo *ui, void *context) { - gchar* fname = NULL; - char buffer[32768]; - struct extract_context *ctx = (struct extract_context *)context; - char *i; - - if (ui->path[0] != '/') { - return CHM_ENUMERATOR_CONTINUE; - } - - g_debug("ui->path = %s", ui->path); - - fname = g_build_filename(ctx->base_path, ui->path+1, NULL); - - if (ui->length != 0) { - FILE *fout; - LONGINT64 len, remain = ui->length; - LONGUINT64 offset = 0; - - gchar *file_ext; - - file_ext = g_strrstr(g_path_get_basename(ui->path), "."); - g_debug("file_ext = %s", file_ext); - - if ((fout = fopen(fname, "wb")) == NULL) { - /* make sure that it isn't just a missing directory before we abort */ - char newbuf[32768]; - strcpy(newbuf, fname); - i = rindex(newbuf, '/'); - *i = '\0'; - rmkdir(newbuf); - - if ((fout = fopen(fname, "wb")) == NULL) { - g_message("CHM_ENUMERATOR_FAILURE fopen"); - return CHM_ENUMERATOR_FAILURE; - } - } - - while (remain != 0) { - len = chm_retrieve_object(h, ui, (unsigned char *)buffer, offset, 32768); - if (len > 0) { - if(fwrite(buffer, 1, (size_t)len, fout) != len) { - g_message("CHM_ENUMERATOR_FAILURE fwrite"); - return CHM_ENUMERATOR_FAILURE; - } - offset += len; - remain -= len; - } else { - break; - } - } - - fclose(fout); - extract_post_file_write(fname); - } else { - if (rmkdir(fname) == -1) { - g_message("CHM_ENUMERATOR_FAILURE rmkdir"); - return CHM_ENUMERATOR_FAILURE; - } - } - g_free(fname); - return CHM_ENUMERATOR_CONTINUE; + gchar *fname = NULL; + LONGUINT64 ui_path_len; + char buffer[32768]; + char *i; + + struct extract_context *ctx = (struct extract_context *)context; + + if (ui->path[0] != '/') { + return CHM_ENUMERATOR_CONTINUE; + } + + if (strstr(ui->path, "/../") != NULL) { + return CHM_ENUMERATOR_CONTINUE; + } + + if (snprintf(buffer, sizeof(buffer), "%s%s", ctx->base_path, ui->path) > 1024) { + return CHM_ENUMERATOR_FAILURE; + } + + fname = g_build_filename(ctx->base_path, ui->path+1, NULL); + + ui_path_len = strlen(ui->path)-1; + + /* Distinguish between files and dirs */ + if (ui->path[ui_path_len] != '/' ) { + FILE *fout; + LONGINT64 len, remain = ui->length; + LONGUINT64 offset = 0; + + if ((fout = fopen(fname, "wb")) == NULL) { + /* make sure that it isn't just a missing directory before we abort */ + char newbuf[32768]; + strcpy(newbuf, fname); + i = rindex(newbuf, '/'); + *i = '\0'; + rmkdir(newbuf); + + if ((fout = fopen(fname, "wb")) == NULL) { + g_debug("CS_CHMFILE: CHM_ENUMERATOR_FAILURE fopen"); + g_free(fname); + return CHM_ENUMERATOR_FAILURE; + } + } + + while (remain != 0) { + len = chm_retrieve_object(h, ui, (unsigned char *)buffer, offset, 32768); + if (len > 0) { + if (fwrite(buffer, 1, (size_t)len, fout) != len) { + g_debug("CS_CHMFILE: CHM_ENUMERATOR_FAILURE fwrite"); + g_free(fname); + return CHM_ENUMERATOR_FAILURE; + } + offset += len; + remain -= len; + } else { + break; + } + } + + fclose(fout); + extract_post_file_write(fname); + } else { + if (rmkdir(fname) == -1) { + g_debug("CS_CHMFILE >>> CHM_ENUMERATOR_FAILURE rmkdir"); + g_free(fname); + return CHM_ENUMERATOR_FAILURE; + } + } + g_free(fname); + + return CHM_ENUMERATOR_CONTINUE; } static gboolean -extract_chm(const gchar *filename, ChmFile *chmfile) +extract_chm(const gchar *filename, const gchar *base_path) { - struct chmFile *handle; - struct extract_context ec; + struct chmFile *handle; + struct extract_context ec; - handle = chm_open(filename); + handle = chm_open(filename); - if (handle == NULL) { - g_message(_("cannot open chmfile: %s"), filename); - return FALSE; - } + if (handle == NULL) { + g_warning(_("Cannot open chmfile: %s"), filename); + return FALSE; + } - ec.base_path = (const char *)chmfile->dir; + ec.base_path = base_path; - if (!chm_enumerate(handle, CHM_ENUMERATE_NORMAL, _extract_callback, (void *)&ec)) { - g_message(_("Extract chmfile failed: %s"), filename); - return FALSE; - } + if (!chm_enumerate(handle, + CHM_ENUMERATE_NORMAL | CHM_ENUMERATE_SPECIAL, + _extract_callback, + (void *)&ec)) { + g_warning(_("Extract chmfile failed: %s"), filename); + return FALSE; + } - chm_close(handle); + chm_close(handle); - return TRUE; + return TRUE; } -#if defined(__linux__) || defined(__GLIBC__) static char * MD5File(const char *filename, char *buf) { - unsigned char buffer[1024]; - unsigned char* digest; - static const char hex[]="0123456789abcdef"; - - gcry_md_hd_t hd; - int f, i; - - if(filename == NULL) - return NULL; + unsigned char buffer[1024]; + unsigned char* digest; + static const char hex[]="0123456789abcdef"; + + gcry_md_hd_t hd; + int f, i; + + if (filename == NULL) + return NULL; + + gcry_md_open(&hd, GCRY_MD_MD5, 0); + f = open(filename, O_RDONLY); + if (f < 0) { + g_warning(_("Open \"%s\" failed: %s"), filename, strerror(errno)); + return NULL; + } - gcry_md_open(&hd, GCRY_MD_MD5, 0); - f = open(filename, O_RDONLY); - if (f < 0) { - g_message(_("open \"%s\" failed: %s"), filename, strerror(errno)); - return NULL; - } + while ((i = read(f, buffer, sizeof(buffer))) > 0) + gcry_md_write(hd, buffer, i); - while ((i = read(f, buffer, sizeof(buffer))) > 0) - gcry_md_write(hd, buffer, i); + close(f); - close(f); + if (i < 0) + return NULL; - if (i < 0) - return NULL; + if (buf == NULL) + buf = malloc(33); + if (buf == NULL) + return NULL; - if (buf == NULL) - buf = malloc(33); - if (buf == NULL) - return (NULL); + digest = (unsigned char*)gcry_md_read(hd, 0); - digest = (unsigned char*)gcry_md_read(hd, 0); + for (i = 0; i < 16; i++) { + buf[i+i] = hex[(u_int32_t)digest[i] >> 4]; + buf[i+i+1] = hex[digest[i] & 0x0f]; + } - for (i = 0; i < 16; i++) { - buf[i+i] = hex[(u_int32_t)digest[i] >> 4]; - buf[i+i+1] = hex[digest[i] & 0x0f]; - } + buf[i+i] = '\0'; + return (buf); +} - buf[i+i] = '\0'; - return (buf); +static const char * +get_encoding_by_lcid(guint32 lcid) +{ + switch(lcid) { + case 0x0436: + case 0x042d: + case 0x0403: + case 0x0406: + case 0x0413: + case 0x0813: + case 0x0409: + case 0x0809: + case 0x0c09: + case 0x1009: + case 0x1409: + case 0x1809: + case 0x1c09: + case 0x2009: + case 0x2409: + case 0x2809: + case 0x2c09: + case 0x3009: + case 0x3409: + case 0x0438: + case 0x040b: + case 0x040c: + case 0x080c: + case 0x0c0c: + case 0x100c: + case 0x140c: + case 0x180c: + case 0x0407: + case 0x0807: + case 0x0c07: + case 0x1007: + case 0x1407: + case 0x040f: + case 0x0421: + case 0x0410: + case 0x0810: + case 0x043e: + case 0x0414: + case 0x0814: + case 0x0416: + case 0x0816: + case 0x040a: + case 0x080a: + case 0x0c0a: + case 0x100a: + case 0x140a: + case 0x180a: + case 0x1c0a: + case 0x200a: + case 0x240a: + case 0x280a: + case 0x2c0a: + case 0x300a: + case 0x340a: + case 0x380a: + case 0x3c0a: + case 0x400a: + case 0x440a: + case 0x480a: + case 0x4c0a: + case 0x500a: + case 0x0441: + case 0x041d: + case 0x081d: + return "ISO-8859-1"; + case 0x041c: + case 0x041a: + case 0x0405: + case 0x040e: + case 0x0418: + case 0x041b: + case 0x0424: + case 0x081a: + return "ISO-8859-2"; + case 0x0415: + return "WINDOWS-1250"; + case 0x0419: + return "WINDOWS-1251"; + case 0x0c01: + return "WINDOWS-1256"; + case 0x0401: + case 0x0801: + case 0x1001: + case 0x1401: + case 0x1801: + case 0x1c01: + case 0x2001: + case 0x2401: + case 0x2801: + case 0x2c01: + case 0x3001: + case 0x3401: + case 0x3801: + case 0x3c01: + case 0x4001: + case 0x0429: + case 0x0420: + return "ISO-8859-6"; + case 0x0408: + return "ISO-8859-7"; + case 0x040d: + return "ISO-8859-8"; + case 0x042c: + case 0x041f: + case 0x0443: + return "ISO-8859-9"; + case 0x041e: + return "ISO-8859-11"; + case 0x0425: + case 0x0426: + case 0x0427: + return "ISO-8859-13"; + case 0x0411: + return "cp932"; + case 0x0804: + case 0x1004: + return "cp936"; + case 0x0412: + return "cp949"; + case 0x0404: + case 0x0c04: + case 0x1404: + return "cp950"; + case 0x082c: + case 0x0423: + case 0x0402: + case 0x043f: + case 0x042f: + case 0x0c1a: + case 0x0444: + case 0x0422: + case 0x0843: + return "cp1251"; + default: + return ""; + } } -#endif static u_int32_t get_dword(const unsigned char *buf) { - u_int32_t result; + u_int32_t result; - result = buf[0] + (buf[1] << 8) + (buf[2] << 16) + (buf[3] << 24); + result = buf[0] + (buf[1] << 8) + (buf[2] << 16) + (buf[3] << 24); - if (result == 0xFFFFFFFF) - result = 0; + if (result == 0xFFFFFFFF) + result = 0; - return result; + return result; } static void -chmfile_file_info(ChmFile *chmfile) +chmfile_file_info(CsChmfile *self) { - struct chmFile *cfd; + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + + struct chmFile *cfd = chm_open(priv->chm); + + if (cfd == NULL) { + g_error(_("Can not open chm file %s."), priv->chm); + return; + } - cfd = chm_open(chmfile->filename); + chmfile_system_info(cfd, self); + chmfile_windows_info(cfd, self); - if (cfd == NULL) { - g_error(_("Can not open chm file %s."), chmfile->filename); - return; - } + if (priv->hhc != NULL) { + gchar *new_hhc = check_file_ncase(self, priv->hhc); - chmfile_system_info(cfd, chmfile); - chmfile_windows_info(cfd, chmfile); + if (new_hhc != NULL) { + g_free(priv->hhc); + priv->hhc = new_hhc; + } + } - /* Convert book title to UTF-8 */ - if (chmfile->title != NULL && chmfile->encoding != NULL) { - gchar *title_utf8; + if (priv->hhk != NULL) { + gchar *new_hhk = check_file_ncase(self, priv->hhk); - title_utf8 = g_convert(chmfile->title, -1, "UTF-8", - chmfile->encoding, - NULL, NULL, NULL); - g_free(chmfile->title); - chmfile->title = title_utf8; - } + if (new_hhk != NULL) { + g_free(priv->hhk); + priv->hhk = new_hhk; + } + } - /* Convert filename to UTF-8 */ - if (chmfile->hhc != NULL && chmfile->encoding != NULL) { - gchar *filename_utf8; + /* Convert encoding to UTF-8 */ + if (priv->encoding != NULL) { + if (priv->bookname) { + g_debug("CS_CHMFILE >>> priv->bookname = %s", priv->bookname); + gchar *bookname_utf8 = convert_string_to_utf8(priv->bookname, priv->encoding); + g_debug("CS_CHMFILE >>> bookname_utf8 = %s", bookname_utf8); + g_free(priv->bookname); + priv->bookname = bookname_utf8; + } + + if (priv->hhc) { + g_debug("CS_CHMFILE >>> priv->hhc = %s", priv->hhc); + gchar *hhc_utf8 = convert_filename_to_utf8(priv->hhc, priv->encoding); + g_free(priv->hhc); + priv->hhc = hhc_utf8; + } + + if (priv->hhk) { + g_debug("CS_CHMFILE >>> priv->hhk = %s", priv->hhk); + gchar *hhk_utf8 = convert_filename_to_utf8(priv->hhk, priv->encoding); + g_free(priv->hhk); + priv->hhk = hhk_utf8; + } + + if (priv->homepage) { + g_debug("CS_CHMFILE >>> priv->homepage = %s", priv->homepage); + gchar *homepage_utf8 = convert_filename_to_utf8(priv->homepage, priv->encoding); + g_free(priv->homepage); + priv->homepage = homepage_utf8; + } + } - filename_utf8 = convert_filename_to_utf8(chmfile->hhc, chmfile->encoding); - g_free(chmfile->hhc); - chmfile->hhc = filename_utf8; - } + if (priv->bookname == NULL) { + gchar *bookname = g_path_get_basename(priv->chm); + priv->bookname = g_strdup(bookname); + g_free(bookname); + } - if (chmfile->hhk != NULL && chmfile->encoding != NULL) { - gchar *filename_utf8; + chm_close(cfd); +} - filename_utf8 = convert_filename_to_utf8(chmfile->hhk, chmfile->encoding); - g_free(chmfile->hhk); - chmfile->hhk = filename_utf8; - } +static void +chmfile_windows_info(struct chmFile *cfd, CsChmfile *self) +{ + struct chmUnitInfo ui; + unsigned char buffer[4096]; + size_t size = 0; + u_int32_t entries, entry_size; + u_int32_t hhc, hhk, bookname, homepage; + + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + + if (chm_resolve_object(cfd, "/#WINDOWS", &ui) != CHM_RESOLVE_SUCCESS) + return; + + size = chm_retrieve_object(cfd, &ui, buffer, 0L, 8); + + if (size < 8) + return; + + entries = get_dword(buffer); + if (entries < 1) + return; + + entry_size = get_dword(buffer + 4); + size = chm_retrieve_object(cfd, &ui, buffer, 8L, entry_size); + if (size < entry_size) + return; + + hhc = get_dword(buffer + 0x60); + hhk = get_dword(buffer + 0x64); + homepage = get_dword(buffer + 0x68); + bookname = get_dword(buffer + 0x14); + + if (chm_resolve_object(cfd, "/#STRINGS", &ui) != CHM_RESOLVE_SUCCESS) + return; + + size = chm_retrieve_object(cfd, &ui, buffer, 0L, 4096); + + if (!size) + return; + + if (priv->hhc == NULL && hhc) + priv->hhc = g_strdup_printf("/%s", buffer + hhc); + if (priv->hhk == NULL && hhk) + priv->hhk = g_strdup_printf("/%s", buffer + hhk); + if (priv->homepage == NULL && homepage) + priv->homepage = g_strdup_printf("/%s", buffer + homepage); + if (g_strcmp0(priv->homepage, "/") == 0 && homepage) { + g_free(priv->homepage); + priv->homepage = g_strdup_printf("/%s", buffer + homepage); + } - chm_close(cfd); + if (priv->bookname == NULL && bookname) + priv->bookname = g_strdup((char *)buffer + bookname); } static void -chmfile_windows_info(struct chmFile *cfd, ChmFile *chmfile) +chmfile_system_info(struct chmFile *cfd, CsChmfile *self) { - struct chmUnitInfo ui; - unsigned char buffer[4096]; - size_t size = 0; - u_int32_t entries, entry_size; - u_int32_t hhc, hhk, title, home; + struct chmUnitInfo ui; + unsigned char buffer[4096]; - if (chm_resolve_object(cfd, "/#WINDOWS", &ui) != CHM_RESOLVE_SUCCESS) - return; + int index = 0; + unsigned char* cursor = NULL; + u_int16_t value = 0; + u_int32_t lcid = 0; + size_t size = 0; - size = chm_retrieve_object(cfd, &ui, buffer, 0L, 8); + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); - if (size < 8) - return; + if (chm_resolve_object(cfd, "/#SYSTEM", &ui) != CHM_RESOLVE_SUCCESS) + return; - entries = get_dword(buffer); - if (entries < 1) - return; + size = chm_retrieve_object(cfd, &ui, buffer, 4L, 4096); - entry_size = get_dword(buffer + 4); - size = chm_retrieve_object(cfd, &ui, buffer, 8L, entry_size); - if (size < entry_size) - return; + if (!size) + return; - hhc = get_dword(buffer + 0x60); - hhk = get_dword(buffer + 0x64); - home = get_dword(buffer + 0x68); - title = get_dword(buffer + 0x14); + buffer[size - 1] = 0; - if (chm_resolve_object(cfd, "/#STRINGS", &ui) != CHM_RESOLVE_SUCCESS) - return; + for(;;) { + // This condition won't hold if I process anything + // except NUL-terminated strings! + if (index > size - 1 - (long)sizeof(u_int16_t)) + break; - size = chm_retrieve_object(cfd, &ui, buffer, 0L, 4096); + cursor = buffer + index; + value = UINT16ARRAY(cursor); + g_debug("CS_CHMFILE >>> system value = %d", value); + switch(value) { + case 0: + index += 2; + cursor = buffer + index; - if (!size) - return; + priv->hhc = g_strdup_printf("/%s", buffer + index + 2); + g_debug("CS_CHMFILE >>> hhc %s", priv->hhc); - if (chmfile->hhc == NULL && hhc) - chmfile->hhc = g_strdup_printf("/%s", buffer + hhc); - if (chmfile->hhk == NULL && hhk) - chmfile->hhk = g_strdup_printf("/%s", buffer + hhk); - if (chmfile->home == NULL && home) - chmfile->home = g_strdup_printf("/%s", buffer + home); - if (chmfile->title == NULL && title) - chmfile->title = g_strdup((char *)buffer + title); -} + break; + case 1: + index += 2; + cursor = buffer + index; -static void -chmfile_system_info(struct chmFile *cfd, ChmFile *chmfile) -{ - struct chmUnitInfo ui; - unsigned char buffer[4096]; + priv->hhk = g_strdup_printf("/%s", buffer + index + 2); + g_debug("CS_CHMFILE >>> hhk %s", priv->hhk); - int index = 0; - unsigned char* cursor = NULL; - u_int16_t value = 0; - u_int32_t lcid = 0; - size_t size = 0; + break; + case 2: + index += 2; + cursor = buffer + index; - if (chm_resolve_object(cfd, "/#SYSTEM", &ui) != CHM_RESOLVE_SUCCESS) - return; + priv->homepage = g_strdup_printf("/%s", buffer + index + 2); + g_debug("CS_CHMFILE >>> SYSTEM homepage %s", priv->homepage); - size = chm_retrieve_object(cfd, &ui, buffer, 4L, 4096); + break; + case 3: + index += 2; + cursor = buffer + index; - if (!size) - return; + priv->bookname = g_strdup((char *)buffer + index + 2); + g_debug("CS_CHMFILE >>> SYSTEM bookname %s", priv->bookname); - buffer[size - 1] = 0; + break; + case 4: // LCID stuff + index += 2; + cursor = buffer + index; - for(;;) { - // This condition won't hold if I process anything - // except NUL-terminated strings! - if(index > size - 1 - (long)sizeof(u_int16_t)) - break; + lcid = UINT32ARRAY(buffer + index + 2); + g_debug("CS_CHMFILE >>> lcid %x", lcid); - cursor = buffer + index; - value = UINT16ARRAY(cursor); - g_debug("system value = %d", value); - switch(value) { - case 0: - index += 2; - cursor = buffer + index; + if (priv->encoding) + g_free(priv->encoding); - chmfile->hhc = g_strdup_printf("/%s", buffer + index + 2); - g_debug("hhc %s", chmfile->hhc); + priv->encoding = g_strdup(get_encoding_by_lcid(lcid)); + break; - break; - case 1: - index += 2; - cursor = buffer + index; + case 6: + index += 2; + cursor = buffer + index; - chmfile->hhk = g_strdup_printf("/%s", buffer + index + 2); - g_debug("hhk %s", chmfile->hhk); + if (!priv->hhc) { + char *hhc, *hhk; - break; - case 2: - index += 2; - cursor = buffer + index; + hhc = g_strdup_printf("/%s.hhc", buffer + index + 2); + hhk = g_strdup_printf("/%s.hhk", buffer + index + 2); - chmfile->home = g_strdup_printf("/%s", buffer + index + 2); - g_debug("home %s", chmfile->home); + if (chm_resolve_object(cfd, hhc, &ui) == CHM_RESOLVE_SUCCESS) + priv->hhc = hhc; - break; - case 3: - index += 2; - cursor = buffer + index; + if (chm_resolve_object(cfd, hhk, &ui) == CHM_RESOLVE_SUCCESS) + priv->hhk = hhk; + } - chmfile->title = g_strdup((char *)buffer + index + 2); - g_debug("title %s", chmfile->title); + break; + case 16: + index += 2; + cursor = buffer + index; - break; - case 4: // LCID stuff - index += 2; - cursor = buffer + index; + g_debug("CS_CHMFILE >>> font %s", buffer + index + 2); + break; - lcid = UINT32ARRAY(buffer + index + 2); - g_debug("lcid %x", lcid); - chmfile_set_encoding(chmfile, get_encoding_by_lcid(lcid)); - break; + default: + index += 2; + cursor = buffer + index; + } - case 6: - index += 2; - cursor = buffer + index; + value = UINT16ARRAY(cursor); + index += value + 2; + } +} - if(!chmfile->hhc) { - char *hhc, *hhk; +static GList * +convert_node_to_list(GNode *tree) +{ + GList root; + root.data = NULL; + g_node_traverse(tree, G_PRE_ORDER, G_TRAVERSE_ALL, -1, tree_to_list_callback, &root); + return (GList *)root.data; +} - hhc = g_strdup_printf("/%s.hhc", buffer + index + 2); - hhk = g_strdup_printf("/%s.hhk", buffer + index + 2); +static gboolean +tree_to_list_callback(GNode *node, gpointer data) +{ + GList *root = (GList *)data; - if (chm_resolve_object(cfd, hhc, &ui) == CHM_RESOLVE_SUCCESS) - chmfile->hhc = hhc; + if (node->parent) { + Link *link = (Link *)node->data; + if (g_ascii_strcasecmp(CHMSEE_NO_LINK, link->uri) && strlen(link->uri)) + root->data = g_list_append((GList *)root->data, node->data); + } - if (chm_resolve_object(cfd, hhk, &ui) == CHM_RESOLVE_SUCCESS) - chmfile->hhk = hhk; - } + return FALSE; +} - break; - case 16: - index += 2; - cursor = buffer + index; +static void +free_list_data(gpointer data, gpointer user_data) +{ + Link *link = (Link *)data; + link_free(link); +} - g_debug("font %s", buffer + index + 2); - break; +static void +load_bookinfo(CsChmfile *self) +{ + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); - default: - index += 2; - cursor = buffer + index; - } + gchar *bookinfo_file = g_build_filename(priv->bookfolder, CHMSEE_BOOKINFO_FILE, NULL); + g_debug("CS_CHMFILE >>> read bookinfo file = %s", bookinfo_file); + GKeyFile *keyfile = g_key_file_new(); + gboolean rv = g_key_file_load_from_file(keyfile, bookinfo_file, G_KEY_FILE_NONE, NULL); + + if (!rv) + convert_old_config_file(bookinfo_file, "[Bookinfo]\n"); + + rv = g_key_file_load_from_file(keyfile, bookinfo_file, G_KEY_FILE_NONE, NULL); + + if (rv) { + priv->hhc = g_key_file_get_string(keyfile, "Bookinfo", "hhc", NULL); + priv->hhk = g_key_file_get_string(keyfile, "Bookinfo", "hhk", NULL); + priv->homepage = g_key_file_get_string(keyfile, "Bookinfo", "homepage", NULL); + priv->bookname = g_key_file_get_string(keyfile, "Bookinfo", "bookname", NULL); + priv->encoding = g_key_file_get_string(keyfile, "Bookinfo", "encoding", NULL); + + gchar *vfont = g_key_file_get_string(keyfile, "Bookinfo", "variable_font", NULL); + if (vfont) { + g_free(priv->variable_font); + priv->variable_font = vfont; + } + + gchar *ffont = g_key_file_get_string(keyfile, "Bookinfo", "fixed_font", NULL); + if (ffont) { + g_free(priv->fixed_font); + priv->fixed_font = ffont; + } + + gchar *charset = g_key_file_get_string(keyfile, "Bookinfo", "charset", NULL); + if (charset) { + g_free(priv->charset); + priv->charset = charset; + } + } - value = UINT16ARRAY(cursor); - index += value + 2; - } + g_key_file_free(keyfile); + g_free(bookinfo_file); } -ChmFile * -chmfile_new(const gchar *filename) +static void +save_bookinfo(CsChmfile *self) { - ChmFile *self; - gchar *bookmark_file; - gchar *md5; + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); - /* Use chmfile MD5 as book folder name */ - md5 = MD5File(filename, NULL); - if(!md5) { - return NULL; - } + gchar *bookinfo_file = g_build_filename(priv->bookfolder, CHMSEE_BOOKINFO_FILE, NULL); - self = g_object_new(TYPE_CHMFILE, NULL); - self->filename = g_strdup(filename); + g_debug("CS_CHMFILE >>> save bookinfo file = %s", bookinfo_file); + GKeyFile *keyfile = g_key_file_new(); - self->dir = g_build_filename(g_getenv("HOME"), - ".chmsee", - "bookshelf", - md5, - NULL); - g_debug("book dir = %s", self->dir); + if (priv->hhc) + g_key_file_set_string(keyfile, "Bookinfo", "hhc", priv->hhc); + if (priv->hhk) + g_key_file_set_string(keyfile, "Bookinfo", "hhk", priv->hhk); + if (priv->homepage) + g_key_file_set_string(keyfile, "Bookinfo", "homepage", priv->homepage); + if (priv->bookname) + g_key_file_set_string(keyfile, "Bookinfo", "bookname", priv->bookname); + g_key_file_set_string(keyfile, "Bookinfo", "encoding", priv->encoding); + g_key_file_set_string(keyfile, "Bookinfo", "variable_font", priv->variable_font); + g_key_file_set_string(keyfile, "Bookinfo", "fixed_font", priv->fixed_font); + g_key_file_set_string(keyfile, "Bookinfo", "charset", priv->charset); + + gsize length = 0; + gchar *contents = g_key_file_to_data(keyfile, &length, NULL); + g_file_set_contents(bookinfo_file, contents, length, NULL); + + g_key_file_free(keyfile); + g_free(contents); + g_free(bookinfo_file); +} - /* If this chm file extracted before, load it's bookinfo */ - if (!g_file_test(self->dir, G_FILE_TEST_IS_DIR)) { - if (!extract_chm(filename, self)) { - g_debug("extract_chm failed: %s", filename); - return NULL; - } +static gchar * +check_file_ncase(CsChmfile *self, const gchar *file) +{ + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + g_debug("CS_CHMFILE >>> check ncase file = %s", file); - g_debug("chmfile->filename = %s", self->filename); + gchar *filename = g_build_filename(priv->bookfolder, file, NULL); + gchar *new_file = NULL; - chmfile_file_info(self); - save_fileinfo(self); - } else { - load_fileinfo(self); - } + if (!g_file_test(filename, G_FILE_TEST_EXISTS)) { + gchar *found = file_exist_ncase(filename); + if (found) { + gchar *basename = g_path_get_basename(found); + new_file = g_strdup(basename); + g_free(basename); + g_free(found); + } + } + g_free(filename); + return new_file; +} - g_debug("chmfile->hhc = %s", self->hhc); - g_debug("chmfile->hhk = %s", self->hhk); - g_debug("chmfile->home = %s", self->home); - g_debug("chmfile->title = %s", self->title); - g_debug("chmfile->endcoding = %s", self->encoding); +/* see http://code.google.com/p/chmsee/issues/detail?id=12 */ +static void +extract_post_file_write(const gchar *fname) +{ + gchar *basename = g_path_get_basename(fname); + gchar *pos = strchr(basename, ';'); + if (pos) { + gchar *dirname = g_path_get_dirname(fname); + *pos = '\0'; + gchar *newfname = g_build_filename(dirname, basename, NULL); + if (rename(fname, newfname) != 0) { + g_error("rename \"%s\" to \"%s\" failed: %s", fname, newfname, strerror(errno)); + } + g_free(dirname); + g_free(newfname); + } + g_free(basename); +} - /* Parse hhc and store result to tree view */ - if (self->hhc != NULL && g_ascii_strcasecmp(self->hhc, "(null)") != 0) { - gchar *hhc; +static void +parse_filename(CsChmfile *self, const gchar *filename) +{ + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + gchar *p = g_strrstr(filename, "::"); + if (p) { + priv->chm = g_strndup(filename, p - filename); + priv->page = g_strdup(p + 2); + } else { + priv->chm = g_strdup(filename); + } +} - hhc = g_strdup_printf("%s%s", self->dir, self->hhc); +/* External functions */ - if (g_file_test(hhc, G_FILE_TEST_EXISTS)) { - self->link_tree = hhc_load(hhc, self->encoding); - } else { - gchar *hhc_ncase; +CsChmfile * +cs_chmfile_new(const gchar *filename, const gchar *bookshelf) +{ + CsChmfile *self = g_object_new(CS_TYPE_CHMFILE, NULL); + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); - hhc_ncase = file_exist_ncase(hhc); - self->link_tree = hhc_load(hhc_ncase, self->encoding); - g_free(hhc_ncase); - } + parse_filename(self, filename); - g_free(hhc); - } else { - g_message(_("Can't found hhc file.")); - } + if (!g_str_has_suffix(priv->chm, ".CHM") && !g_str_has_suffix(priv->chm, ".chm")) + return NULL; - /* Load bookmarks */ - bookmark_file = g_build_filename(self->dir, CHMSEE_BOOKMARK_FILE, NULL); - self->bookmarks_list = bookmarks_load(bookmark_file); - g_free(bookmark_file); - g_free(md5); + /* Use chmfile's MD5 as the folder name */ + gchar *md5 = MD5File(priv->chm, NULL); + if (!md5) { + g_warning("CS_CHMFILE >>> Oops!! Cannot calculate chmfile's MD5!"); + return NULL; + } - return self; -} -void -load_fileinfo(ChmFile *book) -{ - GList *pairs, *list; - gchar *path; + priv->bookfolder = g_build_filename(bookshelf, md5, NULL); + g_debug("CS_CHMFILE >>> book folder = %s", priv->bookfolder); - path = g_strdup_printf("%s/%s", book->dir, CHMSEE_BOOKINFO_FILE); + /* If this chmfile already exists in the bookshelf, load it's bookinfo file */ + if (g_file_test(priv->bookfolder, G_FILE_TEST_IS_DIR)) { + load_bookinfo(self); + } else { + if (!extract_chm(filename, priv->bookfolder)) { + g_warning("CS_CHMFILE >>> extract_chm failed: %s", priv->chm); + return NULL; + } - g_debug("bookinfo path = %s", path); + chmfile_file_info(self); + save_bookinfo(self); + } - pairs = parse_config_file("bookinfo", path); + g_debug("CS_CHMFILE >>> priv->hhc = %s", priv->hhc); + g_debug("CS_CHMFILE >>> priv->hhk = %s", priv->hhk); + g_debug("CS_CHMFILE >>> priv->homepage = %s", priv->homepage); + g_debug("CS_CHMFILE >>> priv->bookname = %s", priv->bookname); + g_debug("CS_CHMFILE >>> priv->encoding = %s", priv->encoding); + + /* Parse hhc file */ + if (priv->hhc != NULL && g_ascii_strcasecmp(priv->hhc, "(null)") != 0) { + gchar *hhcfile = g_build_filename(priv->bookfolder, priv->hhc, NULL); + + priv->toc_tree = cs_parse_file(hhcfile, priv->encoding); + priv->toc_list = convert_node_to_list(priv->toc_tree); + g_free(hhcfile); + } - for (list = pairs; list; list = list->next) { - Item *item; + /* Parse hhk file */ + if (priv->hhk != NULL && priv->index_list == NULL) { + gchar *hhkfile = g_build_filename(priv->bookfolder, priv->hhk, NULL); - item = list->data; + GNode *tree = cs_parse_file(hhkfile, priv->encoding); + priv->index_list = convert_node_to_list(tree); - if (strstr(item->id, "hhc")) { - book->hhc = g_strdup(item->value); - continue; - } + g_node_destroy(tree); + g_free(hhkfile); + } - if (strstr(item->id, "hhk")) { - book->hhk = g_strdup(item->value); - continue; - } + /* Load bookmarks */ + gchar *bookmarks_file = g_build_filename(priv->bookfolder, CHMSEE_BOOKMARKS_FILE, NULL); + priv->bookmarks_list = cs_bookmarks_file_load(bookmarks_file); - if (strstr(item->id, "home")) { - book->home = g_strdup(item->value); - continue; - } + g_free(bookmarks_file); + g_free(md5); - if (strstr(item->id, "title")) { - book->title = g_strdup(item->value); - continue; - } + return self; +} - if (strstr(item->id, "encoding")) { - book->encoding = g_strdup(item->value); - continue; - } +GNode * +cs_chmfile_get_toc_tree(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->toc_tree; +} - if (strstr(item->id, "variable_font")) { - book->variable_font = g_strdup(item->value); - continue; - } +GList * +cs_chmfile_get_toc_list(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->toc_list; +} - if (strstr(item->id, "fixed_font")) { - book->fixed_font = g_strdup(item->value); - continue; - } - } +GList * +cs_chmfile_get_index_list(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->index_list; +} - free_config_list(pairs); - g_free(path); +GList * +cs_chmfile_get_bookmarks_list(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->bookmarks_list; } void -save_fileinfo(ChmFile *book) +cs_chmfile_update_bookmarks_list(CsChmfile *self, GList *links) { - FILE *fd; - gchar *path; + g_debug("CS_CHMFILE >>> update bookmarks bookmarks_list"); - path = g_build_filename(book->dir, CHMSEE_BOOKINFO_FILE, NULL); + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + priv->bookmarks_list = links; - g_debug("save bookinfo path = %s", path); + gchar *bookmarks_file = g_build_filename(priv->bookfolder, CHMSEE_BOOKMARKS_FILE, NULL); + cs_bookmarks_file_save(priv->bookmarks_list, bookmarks_file); - fd = fopen(path, "w"); - - if (!fd) { - g_print("Faild to open bookinfo file: %s", path); - } else { - save_option(fd, "hhc", book->hhc); - save_option(fd, "hhk", book->hhk); - save_option(fd, "home", book->home); - save_option(fd, "title", book->title); - save_option(fd, "encoding", book->encoding); - save_option(fd, "variable_font", book->variable_font); - save_option(fd, "fixed_font", book->fixed_font); - - fclose(fd); - } - g_free(path); + g_free(bookmarks_file); } -/* see http://code.google.com/p/chmsee/issues/detail?id=12 */ -void extract_post_file_write(const gchar* fname) { - gchar* basename = g_path_get_basename(fname); - gchar* pos = strchr(basename, ';'); - if(pos) { - gchar* dirname = g_path_get_dirname(fname); - *pos = '\0'; - gchar* newfname = g_build_filename(dirname, basename, NULL); - if(g_rename(fname, newfname) != 0) { - g_error("rename \"%s\" to \"%s\" failed: %s", fname, newfname, strerror(errno)); - } - g_free(dirname); - g_free(newfname); - } - g_free(basename); -} -static const gchar* chmfile_get_dir(ChmFile* self) { - return self->dir; +const gchar * +cs_chmfile_get_filename(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->chm; } -static const gchar* chmfile_get_home(ChmFile* self) { - return self->home; +const gchar * +cs_chmfile_get_bookfolder(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->bookfolder; } -static const gchar* chmfile_get_title(ChmFile* self) { - return self->title; +const gchar * +cs_chmfile_get_bookname(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->bookname; } -static const gchar* chmfile_get_fixed_font(ChmFile* self) { - return self->fixed_font; -} -static const gchar* chmfile_get_variable_font(ChmFile* self) { - return self->variable_font; -} +const gchar * +cs_chmfile_get_homepage(CsChmfile *self) +{ + g_return_val_if_fail(IS_CS_CHMFILE (self), NULL); -static const gchar* chmfile_get_filename(ChmseeIchmfile* self_) { - ChmFile* self = CHMFILE(self_); - return self->filename; + return CS_CHMFILE_GET_PRIVATE (self)->homepage; } -static Hhc* chmfile_get_link_tree(ChmFile* self) { - return self->link_tree; -} +const gchar * +cs_chmfile_get_page(CsChmfile *self) +{ + g_return_val_if_fail(IS_CS_CHMFILE (self), NULL); -static Bookmarks* chmfile_get_bookmarks_list(ChmFile* self){ - return self->bookmarks_list; + return CS_CHMFILE_GET_PRIVATE (self)->page; } -static void chmfile_set_fixed_font(ChmFile* self, const gchar* font) { - g_free(self->fixed_font); - self->fixed_font = g_strdup(font); +const gchar * +cs_chmfile_get_variable_font(CsChmfile *self) +{ + g_debug("CS_CHMFILE >>> get variable font"); + return CS_CHMFILE_GET_PRIVATE (self)->variable_font; } -static void chmfile_set_variable_font(ChmFile* self, const gchar* font) { - g_free(self->variable_font); - self->variable_font = g_strdup(font); +void +cs_chmfile_set_variable_font(CsChmfile *self, const gchar *font_name) +{ + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + + g_free(priv->variable_font); + priv->variable_font = g_strdup(font_name); } -static void chmsee_ichmfile_interface_init (ChmseeIchmfileInterface* iface) +const gchar * +cs_chmfile_get_fixed_font(CsChmfile *self) { - iface->get_dir = chmfile_get_dir; - iface->get_home = chmfile_get_home; - iface->get_title = chmfile_get_title; - iface->get_fixed_font = chmfile_get_fixed_font; - iface->get_variable_font = chmfile_get_variable_font; - iface->get_link_tree = chmfile_get_link_tree; - iface->get_bookmarks_list = chmfile_get_bookmarks_list; - iface->set_fixed_font = chmfile_set_fixed_font; - iface->set_variable_font = chmfile_set_variable_font; - iface->get_index = chmfile_get_index; - iface->get_filename = chmfile_get_filename; + g_debug("CS_CHMFILE >>> get fixed font"); + return CS_CHMFILE_GET_PRIVATE (self)->fixed_font; } -void chmfile_set_encoding(ChmFile* self, const char* encoding) { - if(self->encoding) { - g_free(self->encoding); - } - self->encoding = g_strdup(encoding); +void +cs_chmfile_set_fixed_font(CsChmfile *self, const gchar *font_name) +{ + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + + g_free(priv->fixed_font); + priv->fixed_font = g_strdup(font_name); } -void chmfile_dispose(GObject* object) { - ChmFile* self = CHMFILE(object); - if(selfp->index) { - g_object_unref(selfp->index); - selfp->index = NULL; - } +const gchar * +cs_chmfile_get_charset(CsChmfile *self) +{ + return CS_CHMFILE_GET_PRIVATE (self)->charset; } -ChmIndex* chmfile_get_index(ChmFile* self) { - if(selfp->index == NULL && self->hhk != NULL) { - gchar* path = g_strconcat(self->dir, self->hhk, NULL); - gchar* path2 = correct_filename(path); - selfp->index = chmindex_new(path2, self->encoding); - g_free(path); - g_free(path2); - } - return selfp->index; +void +cs_chmfile_set_charset(CsChmfile *self, const gchar *charset) +{ + CsChmfilePrivate *priv = CS_CHMFILE_GET_PRIVATE (self); + + g_free(priv->charset); + priv->charset = g_strdup(charset); } diff -Nru chmsee-1.0.7/src/models/chmfile-factory.c chmsee-1.3.0/src/models/chmfile-factory.c --- chmsee-1.0.7/src/models/chmfile-factory.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/chmfile-factory.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "chmfile-factory.h" - -#include "models/chmfile.h" - -ChmseeIchmfile* chmsee_chmfile_new(const gchar* fname) { - return CHMSEE_ICHMFILE(chmfile_new(fname)); -} - diff -Nru chmsee-1.0.7/src/models/chmfile-factory.h chmsee-1.3.0/src/models/chmfile-factory.h --- chmsee-1.0.7/src/models/chmfile-factory.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/chmfile-factory.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __CHMSEE_CHMFILE_FACTORY_H__ -#define __CHMSEE_CHMFILE_FACTORY_H__ - -#include "ichmfile.h" - -G_BEGIN_DECLS - -ChmseeIchmfile* chmsee_chmfile_new(const gchar* fname); - -G_END_DECLS - -#endif diff -Nru chmsee-1.0.7/src/models/chmfile.h chmsee-1.3.0/src/models/chmfile.h --- chmsee-1.0.7/src/models/chmfile.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/chmfile.h 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Ji YongGang + * copyright (C) 2010 Ji YongGang * Copyright (C) 2009 LI Daobing * * ChmSee is free software; you can redistribute it and/or modify @@ -18,63 +18,52 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __CHMFILE_H__ -#define __CHMFILE_H__ +#ifndef __CS_CHMFILE_H__ +#define __CS_CHMFILE_H__ #include #include -#include "models/bookmarks.h" -#include "models/hhc.h" -#include "models/chmindex.h" - -typedef struct _ChmFile ChmFile; -typedef struct _ChmFileClass ChmFileClass; -typedef struct _ChmFilePriv ChmFilePriv; - -#define TYPE_CHMFILE \ - (chmfile_get_type ()) -#define CHMFILE(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CHMFILE, ChmFile)) -#define CHMFILE_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CHMFILE, ChmFileClass)) -#define IS_CHMFILE(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CHMFILE)) -#define IS_CHMFILE_CLASS(k) \ - (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CHMFILE)) -#define CHMFILE_GET_CLASS(o) \ - (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CHMFILE, ChmFileClass)) +typedef struct _CsChmfile CsChmfile; +typedef struct _CsChmfileClass CsChmfileClass; -struct _ChmFile -{ - GObject parent; +#define CS_TYPE_CHMFILE (cs_chmfile_get_type ()) +#define CS_CHMFILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CS_TYPE_CHMFILE, CsChmfile)) +#define CS_CHMFILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CS_TYPE_CHMFILE, CsChmfileClass)) +#define IS_CS_CHMFILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CS_TYPE_CHMFILE)) +#define IS_CS_CHMFILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CS_TYPE_CHMFILE)) +#define CS_CHMFILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CS_TYPE_CHMFILE, CsChmfileClass)) - gchar *filename; - gchar *dir; - gchar *home; - gchar *hhc; - gchar *hhk; - gchar *title; - gchar *encoding; - gchar *variable_font; - gchar *fixed_font; - - Bookmarks *bookmarks_list; - Hhc *link_tree; - ChmFilePriv *priv; +struct _CsChmfile +{ + GObject object; }; -struct _ChmFileClass +struct _CsChmfileClass { - GObjectClass parent_class; + GObjectClass parent_class; }; -GType chmfile_get_type(void); -ChmFile *chmfile_new(const gchar *); +GType cs_chmfile_get_type(void); +CsChmfile *cs_chmfile_new(const gchar *, const gchar *); -/** - * @return NULL if no index or open index failed. - */ -ChmIndex* chmfile_get_index(ChmFile* self); +GNode *cs_chmfile_get_toc_tree(CsChmfile *); +GList *cs_chmfile_get_toc_list(CsChmfile *); +GList *cs_chmfile_get_bookmarks_list(CsChmfile *); +GList *cs_chmfile_get_index_list(CsChmfile *); +void cs_chmfile_update_bookmarks_list(CsChmfile *, GList *); + +const gchar *cs_chmfile_get_bookfolder(CsChmfile *); +const gchar *cs_chmfile_get_filename(CsChmfile *); +const gchar *cs_chmfile_get_bookname(CsChmfile *); +const gchar *cs_chmfile_get_homepage(CsChmfile *); +const gchar *cs_chmfile_get_page(CsChmfile *); + +const gchar *cs_chmfile_get_variable_font(CsChmfile *); +void cs_chmfile_set_variable_font(CsChmfile *, const gchar *); +const gchar *cs_chmfile_get_fixed_font(CsChmfile *); +void cs_chmfile_set_fixed_font(CsChmfile *, const gchar *); +const gchar *cs_chmfile_get_charset(CsChmfile *); +void cs_chmfile_set_charset(CsChmfile *, const gchar *); -#endif /* !__CHMFILE_H__ */ +#endif /* !__CS_CHMFILE_H__ */ diff -Nru chmsee-1.0.7/src/models/chmindex.c chmsee-1.3.0/src/models/chmindex.c --- chmsee-1.0.7/src/models/chmindex.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/chmindex.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -#include "config.h" -#include "chmindex.h" - -#include -#include - -#include "utils/utils.h" -#include "models/link.h" -#include "models/hhc.h" - -#define selfp (self->priv) - -struct _ChmIndexPriv { - GNode* data; /* GNode */ -}; - -G_DEFINE_TYPE(ChmIndex, chmindex, G_TYPE_OBJECT); - -static GObjectClass *parent_class = NULL; - -static void chmindex_finalize(GObject* object); - -static void -chmindex_class_init(ChmIndexClass *klass) -{ - g_type_class_add_private(klass, sizeof(ChmIndexPriv)); - parent_class = g_type_class_peek_parent(klass); - - G_OBJECT_CLASS(klass)->finalize = chmindex_finalize; -} - -static void -chmindex_init(ChmIndex* self) -{ - self->priv = G_TYPE_INSTANCE_GET_PRIVATE(self, TYPE_CHMINDEX, ChmIndexPriv); -} - -ChmIndex* chmindex_new(const char* filename, const char* encoding) { - GNode* node = hhc_load(filename, encoding); - if(g_node_first_child(node) == NULL) { - return NULL; - } - - ChmIndex* self = g_object_new(TYPE_CHMINDEX, NULL); - selfp->data = node; - return self; -} - -GNode* chmindex_get_data(ChmIndex* self) { - g_return_val_if_fail(IS_CHMINDEX(self), NULL); - return selfp->data; -} - -void chmindex_finalize(GObject* object) { - ChmIndex* self = CHMINDEX(object); - hhc_free(selfp->data); -} - diff -Nru chmsee-1.0.7/src/models/chmindex.h chmsee-1.3.0/src/models/chmindex.h --- chmsee-1.0.7/src/models/chmindex.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/chmindex.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -#ifndef CHMSEE_CHMINDEX_H -#define CHMSEE_CHMINDEX_H - -#include -#include - -typedef struct _ChmIndex ChmIndex; -typedef struct _ChmIndexClass ChmIndexClass; -typedef struct _ChmIndexPriv ChmIndexPriv; - -#define TYPE_CHMINDEX \ - (chmindex_get_type ()) -#define CHMINDEX(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_CHMINDEX, ChmIndex)) -#define CHMINDEX_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_CHMINDEX, ChmIndexClass)) -#define IS_CHMINDEX(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_CHMINDEX)) -#define IS_CHMINDEX_CLASS(k) \ - (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_CHMINDEX)) -#define CHMINDEX_GET_CLASS(o) \ - (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_CHMINDEX, ChmIndexClass)) - -struct _ChmIndex -{ - GObject parent; - ChmIndexPriv* priv; -}; - -struct _ChmIndexClass -{ - GObjectClass parent_class; -}; - -GType chmindex_get_type(void); -/** - * @return NULL if open or parse indexFname failed. - */ -ChmIndex *chmindex_new(const gchar* indexFname, const gchar* encoding); -/** @return GNode */ -GNode* chmindex_get_data(ChmIndex* self); - -#endif /* CHMINDEX_H_ */ diff -Nru chmsee-1.0.7/src/models/hhc.c chmsee-1.3.0/src/models/hhc.c --- chmsee-1.0.7/src/models/hhc.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/hhc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,208 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "hhc.h" - -#include -#include - -#include "models/link.h" -#include "utils/utils.h" - -static gint depth = -1; -static gint prev_depth = -1; -static gboolean tree_item = FALSE; -static gchar *title = NULL; -static gchar *local = NULL; -static GNode *parent = NULL; -static GNode *prev_node = NULL; - -static void startDocumentHH(void *); -static void endDocumentHH(void *); -static void startElementHH(void *, const xmlChar *, const xmlChar **); -static void endElementHH(void *, const xmlChar *); - -static xmlSAXHandler hhSAXHandlerStruct = { - NULL, /* internalSubset */ - NULL, /* isStandalone */ - NULL, /* hasInternalSubset */ - NULL, /* hasExternalSubset */ - NULL, /* resolveEntity */ - NULL, /* getEntity */ - NULL, /* entityDecl */ - NULL, /* notationDecl */ - NULL, /* attributeDecl */ - NULL, /* elementDecl */ - NULL, /* unparsedEntityDecl */ - NULL, /* setDocumentLocator */ - startDocumentHH, /* startDocument */ - endDocumentHH, /* endDocument */ - startElementHH, /* startElement */ - endElementHH, /* endElement */ - NULL, /* reference */ - NULL, /* characters */ - NULL, /* ignorableWhitespace */ - NULL, /* processingInstruction */ - NULL, /* comment */ - NULL, /* xmlParserWarning */ - NULL, /* xmlParserError */ - NULL, /* xmlParserError */ - NULL, /* getParameterEntity */ - NULL, /* cdataBlock */ - NULL, /* externalSubset */ - 1, /* initialized */ - NULL, /* private */ - NULL, /* startElementNsSAX2Func */ - NULL, /* endElementNsSAX2Func */ - NULL /* xmlStructuredErrorFunc */ -}; - -static xmlSAXHandlerPtr hhSAXHandler = &hhSAXHandlerStruct; - -static void -startDocumentHH(void *ctx) -{ - g_debug("SAX.startDocument()"); -} - -static void -endDocumentHH(void *ctx) -{ - g_debug("SAX.endDocument()"); -} - -static void -startElementHH(void *ctx, const xmlChar *name_, const xmlChar **atts_) -{ - const gchar* name = (const gchar*) name_; - const gchar** atts = (const gchar**) atts_; - - /* g_debug("SAX.startElement(%s)", name); */ - - if (g_ascii_strcasecmp("ul", name) == 0) { - depth++; - } else if (g_ascii_strcasecmp("object", name) == 0) { - const gchar* type = get_attr(atts, "type"); - if (type && g_ascii_strcasecmp("text/sitemap", type) == 0) { - tree_item = TRUE; - } - } else if (g_ascii_strcasecmp("param", name) == 0) { - const gchar *param_name = get_attr(atts, "name"); - const gchar *param_value = get_attr(atts, "value"); - - if(param_name == NULL - || param_value == NULL) { - return; - } - - if (tree_item) { - if (g_ascii_strcasecmp("Name", param_name) == 0) - title = g_strdup(param_value); - else if (g_ascii_strcasecmp("Local", param_name) == 0) - local = g_strdup(param_value); - } - } -} - -static void -endElementHH(void *ctx, const xmlChar *name_) -{ - const gchar* name = (const gchar*) name_; - - GNode *link_tree = (GNode *)ctx; - GNode *node; - Link *link; - - /* g_debug("SAX.endElement(%s)", name); */ - - if (g_ascii_strcasecmp("ul", name) == 0) { - depth--; - } else if (g_ascii_strcasecmp("object", name) == 0) { - if (!tree_item) - return; - - if (local == NULL) { - local = g_strdup(CHMSEE_NO_LINK); - } - - /* g_debug("prev_depth = %d", prev_depth); */ - /* g_debug("depth = %d", depth); */ - - /* g_debug("title = %s", title); */ - /* g_debug("local = %s", local); */ - - link = link_new(LINK_TYPE_PAGE, - title ? title : "default title", - local ? local : "default local"); - node = g_node_new(link); - - if (depth == 0) { - parent = link_tree; - } else { - if (depth > prev_depth) - parent = prev_node; - else - for (; depth < prev_depth; prev_depth--) - parent = parent->parent; - } - - g_node_append(parent, node); - prev_node = node; - - prev_depth = depth; - tree_item = FALSE; - - g_free(title); - g_free(local); - - title = local = NULL; - } -} - -Hhc * -hhc_load(const gchar *filename, const gchar *encoding) -{ - htmlDocPtr doc = NULL; - GNode *link_tree; - - link_tree = g_node_new(NULL); - - g_debug("parse encoding = %s", encoding); - g_debug("filename = %s", filename); - - doc = htmlSAXParseFile(filename, - encoding, - hhSAXHandler, - link_tree); - - if (doc != NULL) { - g_warning("htmlSAXParseFile returned non-NULL"); - xmlFreeDoc(doc); - } - - g_debug("Parsing hhc file finish."); - - return link_tree; -} - -void -hhc_free(Hhc* self) { - g_node_destroy(self); -} diff -Nru chmsee-1.0.7/src/models/hhc.h chmsee-1.3.0/src/models/hhc.h --- chmsee-1.0.7/src/models/hhc.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/hhc.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - - -#ifndef __CHMSEE_MODELS_HHC_H__ -#define __CHMSEE_MODELS_HHC_H__ - -#include - -typedef GNode Hhc; - -/** - * load Hhc from file - * - * @param filename - * @param encoding - * - * @return - */ -Hhc* hhc_load(const gchar* filename, const gchar* encoding); - -/** - * free Hhc - * - * @param self - */ -void hhc_free(Hhc* self); - -#endif /* !__PARSER_H__ */ diff -Nru chmsee-1.0.7/src/models/ichmfile.c chmsee-1.3.0/src/models/ichmfile.c --- chmsee-1.0.7/src/models/ichmfile.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/ichmfile.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "ichmfile.h" - -static void -chmsee_ichmfile_base_init (gpointer g_class) -{ - static gboolean is_initialized = FALSE; - - if (!is_initialized) - { - /* add properties and signals to the interface here */ - - is_initialized = TRUE; - } -} - -GType chmsee_ichmfile_get_type(void) -{ - static GType iface_type = 0; - if (iface_type == 0) - { - static const GTypeInfo info = { - sizeof (ChmseeIchmfileInterface), - chmsee_ichmfile_base_init, - NULL, /* base_finalize */ - }; - - iface_type = g_type_register_static (G_TYPE_INTERFACE, "ChmseeIchmfile", - &info, 0); - } - - return iface_type; -} - -const gchar* chmsee_ichmfile_get_dir(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_dir(self); -} - -const gchar* chmsee_ichmfile_get_home(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_home(self); -} - -const gchar* chmsee_ichmfile_get_title(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_title(self); -} - -const gchar* chmsee_ichmfile_get_variable_font(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_variable_font(self); -} - -const gchar* chmsee_ichmfile_get_fixed_font(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_fixed_font(self); -} - -const gchar* chmsee_ichmfile_get_filename(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_filename(self); -} - - -Hhc* chmsee_ichmfile_get_link_tree(ChmseeIchmfile* self) -{ - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_link_tree(self); -} - -Bookmarks* chmsee_ichmfile_get_bookmarks_list(ChmseeIchmfile* self) { - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_bookmarks_list(self); -} - -void chmsee_ichmfile_set_variable_font(ChmseeIchmfile* self, const gchar* font) -{ - g_return_if_fail(CHMSEE_IS_ICHMFILE(self)); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->set_variable_font(self, font); -} - -void chmsee_ichmfile_set_fixed_font(ChmseeIchmfile* self, const gchar* font) -{ - g_return_if_fail(CHMSEE_IS_ICHMFILE(self)); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->set_fixed_font(self, font); -} - -ChmIndex* chmsee_ichmfile_get_index(ChmseeIchmfile* self) { - g_return_val_if_fail(CHMSEE_IS_ICHMFILE(self), NULL); - return CHMSEE_ICHMFILE_GET_INTERFACE(self)->get_index(self); -} diff -Nru chmsee-1.0.7/src/models/ichmfile.h chmsee-1.3.0/src/models/ichmfile.h --- chmsee-1.0.7/src/models/ichmfile.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/ichmfile.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __ICHMFILE_H__ -#define __ICHMFILE_H__ - -#include - -#include "models/bookmarks.h" -#include "models/hhc.h" -#include "models/chmindex.h" - -#define CHMSEE_TYPE_ICHMFILE (chmsee_ichmfile_get_type()) -#define CHMSEE_ICHMFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CHMSEE_TYPE_ICHMFILE, ChmseeIchmfile)) -#define CHMSEE_IS_ICHMFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHMSEE_TYPE_ICHMFILE)) -#define CHMSEE_ICHMFILE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), CHMSEE_TYPE_ICHMFILE, ChmseeIchmfileInterface)) - -typedef struct _ChmseeIchmfile ChmseeIchmfile; -typedef struct _ChmseeIchmfileInterface ChmseeIchmfileInterface; - -struct _ChmseeIchmfileInterface -{ - GTypeInterface parent_iface; - - const gchar* (*get_dir) (ChmseeIchmfile* self); - const gchar* (*get_home) (ChmseeIchmfile* self); - const gchar* (*get_title) (ChmseeIchmfile* self); - const gchar* (*get_variable_font) (ChmseeIchmfile* self); - const gchar* (*get_fixed_font) (ChmseeIchmfile* self); - const gchar* (*get_filename) (ChmseeIchmfile* self); - Hhc* (*get_link_tree) (ChmseeIchmfile* self); - Bookmarks* (*get_bookmarks_list) (ChmseeIchmfile* self); - ChmIndex* (*get_index) (ChmseeIchmfile* self); - - void (*set_variable_font) (ChmseeIchmfile* self, const gchar* font); - void (*set_fixed_font) (ChmseeIchmfile* self, const gchar* font); -}; - -GType chmsee_ichmfile_get_type(void); -const gchar* chmsee_ichmfile_get_dir(ChmseeIchmfile* self); -const gchar* chmsee_ichmfile_get_home(ChmseeIchmfile* self); -Hhc* chmsee_ichmfile_get_link_tree(ChmseeIchmfile* self); -Bookmarks* chmsee_ichmfile_get_bookmarks_list(ChmseeIchmfile* self); -ChmIndex* chmsee_ichmfile_get_index(ChmseeIchmfile* self); -const gchar* chmsee_ichmfile_get_title(ChmseeIchmfile* self); -const gchar* chmsee_ichmfile_get_variable_font(ChmseeIchmfile* self); -const gchar* chmsee_ichmfile_get_fixed_font(ChmseeIchmfile* self); -const gchar* chmsee_ichmfile_get_filename(ChmseeIchmfile* self); -void chmsee_ichmfile_set_variable_font(ChmseeIchmfile* self, const gchar* font); -void chmsee_ichmfile_set_fixed_font(ChmseeIchmfile* self, const gchar* font); - -#endif diff -Nru chmsee-1.0.7/src/models/link.c chmsee-1.3.0/src/models/link.c --- chmsee-1.0.7/src/models/link.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/link.c 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * * ChmSee is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,11 +18,11 @@ */ #include "config.h" -#include "link.h" #include -#include "utils/utils.h" +#include "link.h" +#include "utils.h" Link * link_new(LinkType type, const gchar *name, const gchar *uri) @@ -32,23 +32,25 @@ g_return_val_if_fail(name != NULL, NULL); g_return_val_if_fail(uri != NULL, NULL); - link = g_new0(Link, 1); + link = g_slice_new(Link); link->type = type; link->name = g_strdup(name); link->uri = g_strdup(uri); - + return link; } -void +void link_free(Link *link) { - g_free(link->name); - g_free(link->uri); + if (link->name) + g_free(link->name); + if (link->uri) + g_free(link->uri); - g_free(link); + g_slice_free(Link, link); } Link * @@ -63,7 +65,7 @@ return ncase_compare_utf8_string(((Link *)a)->uri, ((Link *)b)->uri); } -void +void link_change_type(Link *link, LinkType type) { link->type = type; @@ -75,7 +77,7 @@ g_return_val_if_fail(link != NULL, NULL); link->ref_count++; - + return link; } @@ -83,10 +85,9 @@ link_unref(Link *link) { g_return_if_fail(link != NULL); - + link->ref_count--; if (link->ref_count == 0) link_free(link); } - diff -Nru chmsee-1.0.7/src/models/link.h chmsee-1.3.0/src/models/link.h --- chmsee-1.0.7/src/models/link.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/models/link.h 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * * ChmSee is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,12 +17,14 @@ * Boston, MA 02110-1301, USA. */ -#ifndef __LINK_H__ -#define __LINK_H__ +#ifndef __CS_LINK_H__ +#define __CS_LINK_H__ #include -typedef struct _Link Link; +G_BEGIN_DECLS + +typedef struct _Link Link; #define LINK(x) ((Link *) x) @@ -35,18 +37,19 @@ gchar *name; gchar *uri; LinkType type; - + guint ref_count; }; Link *link_new(LinkType, const gchar *, const gchar *); Link *link_copy(const Link *); -void link_free(Link *); +void link_free(Link *); -gint link_compare(gconstpointer, gconstpointer); -void link_change_type(Link *, LinkType); +gint link_compare(gconstpointer, gconstpointer); +void link_change_type(Link *, LinkType); Link* link_ref(Link *); -void link_unref(Link *); +void link_unref(Link *); -#endif /* __LINK_H__ */ +G_END_DECLS +#endif /* __CS_LINK_H__ */ diff -Nru chmsee-1.0.7/src/models/parser.c chmsee-1.3.0/src/models/parser.c --- chmsee-1.0.7/src/models/parser.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/models/parser.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,231 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include + +#include "parser.h" +#include "utils.h" +#include "models/link.h" + +static gint depth = -1; +static gint prev_depth = -1; +static gboolean tree_item = FALSE; +static gint item_count = 0; +static gchar *title[MAXLINE]; +static gchar *local[MAXLINE]; +static GNode *parent = NULL; +static GNode *prev_node = NULL; + +static const gchar *get_attr(const gchar **, const gchar *); +static void startDocumentHH(void *); +static void endDocumentHH(void *); +static void startElementHH(void *, const xmlChar *, const xmlChar **); +static void endElementHH(void *, const xmlChar *); + +static xmlSAXHandler hhSAXHandlerStruct = { + NULL, /* internalSubset */ + NULL, /* isStandalone */ + NULL, /* hasInternalSubset */ + NULL, /* hasExternalSubset */ + NULL, /* resolveEntity */ + NULL, /* getEntity */ + NULL, /* entityDecl */ + NULL, /* notationDecl */ + NULL, /* attributeDecl */ + NULL, /* elementDecl */ + NULL, /* unparsedEntityDecl */ + NULL, /* setDocumentLocator */ + startDocumentHH, /* startDocument */ + endDocumentHH, /* endDocument */ + startElementHH, /* startElement */ + endElementHH, /* endElement */ + NULL, /* reference */ + NULL, /* characters */ + NULL, /* ignorableWhitespace */ + NULL, /* processingInstruction */ + NULL, /* comment */ + NULL, /* xmlParserWarning */ + NULL, /* xmlParserError */ + NULL, /* xmlParserError */ + NULL, /* getParameterEntity */ + NULL, /* cdataBlock */ + NULL, /* externalSubset */ + 1, /* initialized */ + NULL, /* private */ + NULL, /* startElementNsSAX2Func */ + NULL, /* endElementNsSAX2Func */ + NULL /* xmlStructuredErrorFunc */ +}; + +static xmlSAXHandlerPtr hhSAXHandler = &hhSAXHandlerStruct; + +static const gchar * +get_attr(const gchar **attrs, const gchar *key) +{ + while (*attrs) { + if (g_ascii_strcasecmp(*attrs, key) == 0) { + return *(attrs+1); + } + attrs += 2; + } + return NULL; +} + +static void +startDocumentHH(void *ctx) +{ + g_debug("CS_PARSER >>> SAX.startDocument()"); +} + +static void +endDocumentHH(void *ctx) +{ + g_debug("CS_PARSER >>> SAX.endDocument()"); +} + +static void +startElementHH(void *ctx, const xmlChar *name_, const xmlChar **atts_) +{ + const gchar *name = (const gchar *)name_; + const gchar **atts = (const gchar **)atts_; + + /* g_debug("SAX.startElement(%s)", name); */ + + if (g_ascii_strcasecmp("ul", name) == 0) { + depth++; + } else if (g_ascii_strcasecmp("object", name) == 0) { + const gchar* type = get_attr(atts, "type"); + if (type && g_ascii_strcasecmp("text/sitemap", type) == 0) { + tree_item = TRUE; + } + } else if (g_ascii_strcasecmp("param", name) == 0) { + const gchar *param_name = get_attr(atts, "name"); + const gchar *param_value = get_attr(atts, "value"); + + if (param_name == NULL || param_value == NULL) { + return; + } + + if (tree_item) { + if (g_ascii_strcasecmp("Keyword", param_name) == 0) { + title[item_count] = g_strdup(param_value); + } else if (g_ascii_strcasecmp("Name", param_name) == 0) { + if (!title[item_count]) + title[item_count] = g_strdup(param_value); + } else if (g_ascii_strcasecmp("Local", param_name) == 0) { + local[item_count] = g_strdup(param_value); + } + + if (title[item_count] && local[item_count]) + item_count++; + } + } +} + +static void +endElementHH(void *ctx, const xmlChar *name_) +{ + const gchar *name = (const gchar *)name_; + + GNode *link_tree = (GNode *)ctx; + GNode *node; + Link *link; + + /* g_debug("SAX.endElement(%s)", name); */ + + if (g_ascii_strcasecmp("ul", name) == 0) { + depth--; + } else if (g_ascii_strcasecmp("object", name) == 0) { + if (!tree_item) + return; + + /* g_debug("prev_depth = %d", prev_depth); */ + /* g_debug("depth = %d", depth); */ + + if (depth == 0) { + parent = link_tree; + } else { + if (depth > prev_depth) + parent = prev_node ? prev_node : link_tree; + else + for (; depth < prev_depth; prev_depth--) + parent = parent->parent; + } + + if (item_count == 0 && title[0]) /* Manually increase no link item */ + item_count = 1; + + gint i = 0; + for (; i < item_count; i++) { + if (title[i] == NULL) + title[i] = g_strdup( _("No Title")); + if (local[i] == NULL) + local[i] = g_strdup(CHMSEE_NO_LINK); + + /* g_debug("title[%d] = %s", i, title[i]); */ + /* g_debug("local[%d] = %s", i, local[i]); */ + + link = link_new(LINK_TYPE_PAGE, title[i], local[i]); + node = g_node_new(link); + + g_node_append(parent, node); + prev_node = node; + + g_free(title[i]); + g_free(local[i]); + + title[i] = local[i] = NULL; + } + + prev_depth = depth; + tree_item = FALSE; + item_count = 0; + } +} + +GNode * +cs_parse_file(const gchar *filename, const gchar *encoding) +{ + htmlDocPtr doc = NULL; + GNode *tree = g_node_new(NULL); + + depth = -1; + prev_depth = -1; + tree_item = FALSE; + item_count = 0; + parent = NULL; + prev_node = NULL; + + doc = htmlSAXParseFile(filename, + encoding, + hhSAXHandler, + tree); + + if (doc != NULL) { + g_warning("CS_PARSER >>> htmlSAXParseFile returned non-NULL"); + xmlFreeDoc(doc); + } + + g_debug("CS_PARSER >>> Parsing file %s finished", filename); + + return tree; +} diff -Nru chmsee-1.0.7/src/models/parser.h chmsee-1.3.0/src/models/parser.h --- chmsee-1.0.7/src/models/parser.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/models/parser.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2010 Ji YongGang + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + + +#ifndef __CS_PARSER_H__ +#define __CS_PARSER_H__ + +#include + +GNode *cs_parse_file(const gchar *, const gchar *); + +#endif /* !__CS_PARSER_H__ */ diff -Nru chmsee-1.0.7/src/setup.c chmsee-1.3.0/src/setup.c --- chmsee-1.0.7/src/setup.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/setup.c 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * * ChmSee is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,156 +18,367 @@ */ /*************************************************************************** - * Copyright (C) 2003 by zhong * - * zhongz@163.com * - * * + * Copyright (C) 2003 by zhong * + * zhongz@163.com * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * ***************************************************************************/ #include "config.h" + +#include "string.h" #include "setup.h" +#include "utils.h" + +typedef struct { + GtkComboBox *combobox; + const gchar *charset; +} FindCharsetData; + +static void on_bookshelf_clear(GtkWidget *, Chmsee *); +static void on_window_close(GtkButton *, Chmsee *); + +static void variable_font_set_cb(GtkFontButton *, Chmsee *); +static void fixed_font_set_cb(GtkFontButton *, Chmsee *); +static void cmb_lang_changed_cb(GtkComboBox *, Chmsee *); + +static GtkTreeModel *create_lang_model(void); +static void cell_layout_data_func(GtkCellLayout *, GtkCellRenderer *, + GtkTreeModel *, GtkTreeIter *, gpointer); +static gboolean find_charset_func(GtkTreeModel *, GtkTreePath *, + GtkTreeIter *, FindCharsetData *); -#include +static void +on_bookshelf_clear(GtkWidget *widget, Chmsee *chmsee) +{ + const gchar *bookshelf = chmsee_get_bookshelf(chmsee); -#include "utils/utils.h" -#include "gecko_utils.h" + if (bookshelf && g_file_test(bookshelf, G_FILE_TEST_EXISTS)) { + chmsee_close_book(chmsee); -static void on_cache_clear(GtkWidget *, ChmSee *); -static void on_window_close(GtkButton *, ChmSee *); + gchar *dir = strdup(bookshelf); + char *argv[] = {"rm", "-rf", dir, NULL}; -typedef struct -{ - const gchar *cchar_number; - const gchar *cchar_codeset; -} ChmseeChar; + g_spawn_async(g_get_tmp_dir(), argv, NULL, + G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, + NULL); + g_free(dir); + } +} static void -on_cache_clear(GtkWidget *widget, ChmSee *chmsee) +on_window_close(GtkButton *button, Chmsee *chmsee) { - command_delete_tmpdir( - chmsee_get_cache_dir(chmsee)); + gtk_widget_destroy(gtk_widget_get_toplevel(GTK_WIDGET (button))); } static void -variable_font_set_cb(GtkFontButton *button, ChmSee *chmsee) +variable_font_set_cb(GtkFontButton *button, Chmsee *chmsee) { - gchar *font_name; + const gchar *font_name = gtk_font_button_get_font_name(button); - font_name = g_strdup(gtk_font_button_get_font_name(button)); - - g_debug("variable font set: %s", font_name); + g_debug("SETUP >>> variable font set: %s", font_name); + chmsee_set_variable_font(chmsee, font_name); +} - gecko_utils_set_font(GECKO_PREF_FONT_VARIABLE, font_name); +static void +fixed_font_set_cb(GtkFontButton *button, Chmsee *chmsee) +{ + const gchar *font_name = gtk_font_button_get_font_name(button); - chmsee_set_variable_font(chmsee, font_name); + g_debug("SETUP >>> fixed font set: %s", font_name); + chmsee_set_fixed_font(chmsee, font_name); } static void -fixed_font_set_cb(GtkFontButton *button, ChmSee *chmsee) +cmb_lang_changed_cb(GtkComboBox *combo_box, Chmsee *chmsee) { - gchar *font_name; - - font_name = g_strdup(gtk_font_button_get_font_name(button)); + GtkTreeIter iter; + gchar *charset; - g_debug("fixed font set: %s", font_name); + gtk_combo_box_get_active_iter(combo_box, &iter); - gecko_utils_set_font(GECKO_PREF_FONT_FIXED, font_name); + GtkTreeModel *model = gtk_combo_box_get_model(combo_box); - chmsee_set_fixed_font(chmsee, font_name); + gtk_tree_model_get(model, &iter, + 0, &charset, + -1); + + g_debug("SETUP >>> select charset: %s", charset); + if (charset && strlen(charset)) + chmsee_set_charset(chmsee, charset); + else + chmsee_set_charset(chmsee, "Auto"); } static void -cmb_lang_changed_cb(GtkWidget *widget, ChmSee *chmsee) +startup_lastfile_toggled_cb(GtkWidget *widget, Chmsee *chmsee) { - GtkComboBox *combobox; - gint index; + g_debug("SETUP >>> startup_lastfile toggled"); + gboolean state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget)); - combobox = GTK_COMBO_BOX (widget); - index = gtk_combo_box_get_active(combobox); + chmsee_set_startup_lastfile(chmsee, state); +} + +static GtkTreeModel * +create_lang_model(void) +{ + const gchar *region[] = { + _("Auto"), + _("West European"), + _("East European"), + _("East Asian"), + _("SE & SW Asian"), + _("Middle Eastern"), + _("Unicode") + }; + + const gchar *charset[][2] = { + {"ISO-8859-1", _("Western (ISO-8859-1)")}, // index = 0 + {"ISO-8859-15", _("Western (ISO-8859-15)")}, + {"IBM850", _("Western (IBM-850)")}, + {"x-mac-roman", _("Western (MacRoman)")}, + {"windows-1252", _("Western (Windows-1252)")}, + {"ISO-8859-14", _("Celtic (ISO-8859-14)")}, + {"ISO-8859-7", _("Greek (ISO-8859-7)")}, + {"x-mac-greek", _("Greek (MacGreek)")}, + {"windows-1253", _("Greek (Windows-1253)")}, + {"x-mac-icelandic", _("Icelandic (MacIcelandic)")}, + {"ISO-8859-10", _("Nordic (ISO-8859-10)")}, + {"ISO-8859-3", _("South European (ISO-8859-3)")}, + {"ISO-8859-4", _("Baltic (ISO-8859-4)")}, // index = 12 + {"ISO-8859-13", _("Baltic (ISO-8859-13)")}, + {"windows-1257", _("Baltic (Windows-1257)")}, + {"IBM852", _("Central European (IBM-852)")}, + {"ISO-8859-2", _("Central European (ISO-8859-2)")}, + {"x-mac-ce", _("Central European (MacCE)")}, + {"windows-1250", _("Central European (Windows-1250)")}, + {"x-mac-croatian", _("Croatian (MacCroatian)")}, + {"IBM855", _("Cyrillic (IBM-855)")}, + {"ISO-8859-5", _("Cyrillic (ISO-8895-5)")}, + {"ISO-IR-111", _("Cyrillic (ISO-IR-111)")}, + {"KOI8-R", _("Cyrillic (KOI8-R)")}, + {"x-mac-cyrillic", _("Cyrillic (MacCyrillic)")}, + {"windows-1251", _("Cyrillic (Windows-1251)")}, + {"IBM866", _("Cyrillic/Russian (CP-866)")}, + {"KOI8-U", _("Cyrillic/Ukrainian (KOI8-U)")}, + {"ISO-8859-16", _("Romanian (ISO-8859-16)")}, + {"x-mac-romanian", _("Romanian (MacRomanian)")}, + {"GB2312", _("Chinese Simplified (GB2312)")}, // index = 30 + {"x-gbk", _("Chinese Simplified (GBK)")}, + {"gb18030", _("Chinese Simplified (GB18030)")}, + {"HZ-GB-2312", _("Chinese Simplified (HZ)")}, + {"ISO-2022-CN", _("Chinese Simplified (ISO-2022-CN)")}, + {"Big5", _("Chinese Traditional (Big5)")}, + {"Big5-HKSCS", _("Chinese Traditional (Big5-HKSCS)")}, + {"x-euc-tw", _("Chinese Traditional (EUC-TW)")}, + {"EUC-JP", _("Japanese (EUC-JP)")}, + {"ISO-2022-JP", _("Japanese (ISO-2022-JP)")}, + {"Shift_JIS", _("Japanese (Shift_JIS)")}, + {"EUC-KR", _("Korean (EUC-KR)")}, + {"x-windows-949", _("Korean (UHC)")}, + {"x-johab", _("Korean (JOHAB)")}, + {"ISO-2022-KR", _("Korean (ISO-2022-KR)")}, + {"armscii-8", _("Armenian (ARMSCII-8)")}, // index = 45 + {"GEOSTD8", _("Georgian (GEOSTD8)")}, + {"TIS-620", _("Thai (TIS-620)")}, + {"ISO-8859-11", _("Thai (ISO-8859-11)")}, + {"windows-874", _("Thai (Windows-874)")}, + {"IBM874", _("Thai (IBM-874)")}, + {"IBM857", _("Turkish (IBM-857)")}, + {"ISO-8859-9", _("Turkish (ISO-8859-9)")}, + {"x-mac-turkish", _("Turkish (MacTurkish)")}, + {"windows-1254", _("Turkish (Windows-1254)")}, + {"x-viet-tcvn5712", _("Vietnamese (TCVN)")}, + {"VISCII", _("Vietnamese (VISCII)")}, + {"x-viet-vps", _("Vietnamese (VPS)")}, + {"windows-1258", _("Vietnamese (Windows-1258)")}, + {"x-mac-devanagari", _("Hindi (MacDevanagari)")}, + {"x-mac-gujarati", _("Gujarati (MacGujarati)")}, + {"x-mac-gurmukh", _("Gurmukhi (MacGurmukhi)")}, + {"ISO-8859-6", _("Arabic (ISO-8859-6)")}, // index = 62 + {"windows-1256", _("Arabic (Windows-1256)")}, + {"IBM864", _("Arabic (IBM-864)")}, + {"x-mac-arabic", _("Arabic (MacArabic)")}, + {"x-mac-farsi", _("Farsi (MacFarsi)")}, + {"ISO-8859-8-I", _("Hebrew (ISO-8859-8-I)")}, + {"windows-1255", _("Hebrew (Windows-1255)")}, + {"ISO-8859-8", _("Hebrew Visual (ISO-8859-8)")}, + {"IBM862", _("Hebrew (IBM-862)")}, + {"x-mac-hebrew", _("Hebrew (MacHebrew)")}, + {"UTF-8", _("Unicode (UTF-8)")}, // index = 72 + {"UTF-16LE", _("Unicode (UTF-16LE)")}, + {"UTF-16BE", _("Unicode (UTF-16BE)")}, + {"UTF-32", _("Unicode (UTF-32)")}, + {"UTF-32LE", _("Unicode (UTF-32LE)")}, + {"UTF-32BE", _("Unicode (UTF-32BE)")} // index = 77 + }; + + GtkTreeStore *store = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_STRING); + + GtkTreeIter r_iter, c_iter; + gint i, j, base, top; + base = top = 0; + + for (i = 0; i < 7; i++) { + gtk_tree_store_append(store, &r_iter, NULL); + gtk_tree_store_set(store, &r_iter, + 0, "", + 1, region[i], + -1); + + if (i == 1) { + base = 0; + top = 11; + } else if (i == 2) { + base = 12; + top = 29; + } else if (i == 3) { + base = 30; + top = 44; + } else if (i == 4) { + base = 45; + top = 61; + } else if (i == 5) { + base = 62; + top = 71; + } else if (i == 6) { + base = 72; + top = 77; + } + + for (j = base; i != 0 && j <= top; j++ ) { + gtk_tree_store_append(store, &c_iter, &r_iter); + gtk_tree_store_set(store, &c_iter, + 0, charset[j][0], + 1, charset[j][1], + -1); + } + } - if (index >= 0) { - g_debug("select lang: %d", index); - gecko_utils_set_default_lang(index); - chmsee_set_lang(chmsee, index); - } + return GTK_TREE_MODEL(store); } static void -on_window_close(GtkButton *button, ChmSee *chmsee) +cell_layout_data_func(GtkCellLayout *layout, GtkCellRenderer *renderer, + GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { - gtk_widget_destroy(gtk_widget_get_toplevel (GTK_WIDGET(button))); + gtk_cell_renderer_set_sensitive(renderer, !gtk_tree_model_iter_has_child(model, iter)); } -void -setup_window_new(ChmSee *chmsee) +static gboolean +find_charset_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, FindCharsetData *data) { - GladeXML *glade; + gchar *charset; + + gtk_tree_model_get(model, iter, 0, &charset, -1); - GtkWidget *setup_window; - GtkWidget *cache_entry; - GtkWidget *clear_button; - GtkWidget *variable_font_button; - GtkWidget *fixed_font_button; - GtkWidget *cmb_lang; - GtkWidget *close_button; - - /* create setup window */ - glade = glade_xml_new(get_resource_path(GLADE_FILE), "setup_window", NULL); - - setup_window = glade_xml_get_widget(glade, "setup_window"); - g_signal_connect_swapped((gpointer) setup_window, - "destroy", - G_CALLBACK (gtk_widget_destroy), - GTK_OBJECT (setup_window)); - - /* cache directory */ - cache_entry = glade_xml_get_widget(glade, "cache_dir_entry"); - gtk_entry_set_text(GTK_ENTRY(cache_entry), chmsee_get_cache_dir(chmsee)); - - clear_button = glade_xml_get_widget(glade, "setup_clear"); - g_signal_connect(G_OBJECT (clear_button), - "clicked", - G_CALLBACK (on_cache_clear), - chmsee); - - /* font setting */ - variable_font_button = glade_xml_get_widget(glade, "variable_fontbtn"); - g_signal_connect(G_OBJECT (variable_font_button), - "font-set", - G_CALLBACK (variable_font_set_cb), - chmsee); - - fixed_font_button = glade_xml_get_widget(glade, "fixed_fontbtn"); - g_signal_connect(G_OBJECT (fixed_font_button), - "font-set", - G_CALLBACK (fixed_font_set_cb), - chmsee); - - /* default lang */ - cmb_lang = glade_xml_get_widget(glade, "cmb_default_lang"); - g_signal_connect(G_OBJECT (cmb_lang), - "changed", - G_CALLBACK (cmb_lang_changed_cb), - chmsee); - gtk_combo_box_set_active(GTK_COMBO_BOX (cmb_lang), chmsee_get_lang(chmsee)); - - close_button = glade_xml_get_widget(glade, "setup_close"); - g_signal_connect(G_OBJECT (close_button), - "clicked", - G_CALLBACK (on_window_close), - chmsee); - - if (chmsee_has_book(chmsee)) { - gtk_font_button_set_font_name(GTK_FONT_BUTTON (variable_font_button), - chmsee_get_variable_font(chmsee)); - gtk_font_button_set_font_name(GTK_FONT_BUTTON (fixed_font_button), - chmsee_get_fixed_font(chmsee)); - gtk_widget_set_sensitive(variable_font_button, TRUE); - gtk_widget_set_sensitive(fixed_font_button, TRUE); - } + if (!g_strcmp0(data->charset, charset)) { + gtk_combo_box_set_active_iter(GTK_COMBO_BOX (data->combobox), iter); + g_debug("SETUP >>> cmb_lang set active, charset = %s", charset); + return TRUE; + } + + return FALSE; +} + +void +setup_window_new(Chmsee *chmsee) +{ + g_debug("SETUP >>> create setup window"); + /* create setup window */ + GtkBuilder *builder = gtk_builder_new(); + gtk_builder_add_from_file(builder, RESOURCE_FILE ("setup-window.ui"), NULL); + + GtkWidget *setup_window = BUILDER_WIDGET (builder, "setup_window"); + + g_signal_connect_swapped((gpointer) setup_window, + "destroy", + G_CALLBACK (gtk_widget_destroy), + GTK_OBJECT (setup_window)); + + /* bookshelf directory */ + GtkWidget *bookshelf_entry = BUILDER_WIDGET (builder, "bookshelf_entry"); + gtk_entry_set_text(GTK_ENTRY(bookshelf_entry), chmsee_get_bookshelf(chmsee)); + + GtkWidget *clear_button = BUILDER_WIDGET (builder, "setup_clear"); + g_signal_connect(G_OBJECT (clear_button), + "clicked", + G_CALLBACK (on_bookshelf_clear), + chmsee); + + /* font setting */ + GtkWidget *variable_font_button = BUILDER_WIDGET (builder, "variable_fontbtn"); + g_signal_connect(G_OBJECT (variable_font_button), + "font-set", + G_CALLBACK (variable_font_set_cb), + chmsee); + + GtkWidget *fixed_font_button = BUILDER_WIDGET (builder, "fixed_fontbtn"); + g_signal_connect(G_OBJECT (fixed_font_button), + "font-set", + G_CALLBACK (fixed_font_set_cb), + chmsee); + + /* default lang */ + GtkWidget *cmb_lang = BUILDER_WIDGET (builder, "cmb_default_lang"); + GtkTreeModel *cmb_model = create_lang_model(); + gtk_combo_box_set_model(GTK_COMBO_BOX (cmb_lang), cmb_model); + + GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cmb_lang), renderer, FALSE); + gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(cmb_lang), renderer, + "text", 1, + NULL); + gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(cmb_lang), renderer, + cell_layout_data_func, + NULL, NULL); + + gtk_font_button_set_font_name(GTK_FONT_BUTTON (variable_font_button), + chmsee_get_variable_font(chmsee)); + gtk_font_button_set_font_name(GTK_FONT_BUTTON (fixed_font_button), + chmsee_get_fixed_font(chmsee)); + + const gchar *charset = chmsee_get_charset(chmsee); + g_debug("SETUP >>> chmsee_get_charset = %s", charset); + if (charset && strlen(charset) && g_strcmp0(charset, "Auto")) { + FindCharsetData *data = g_new(FindCharsetData, sizeof(FindCharsetData)); + + data->combobox = GTK_COMBO_BOX (cmb_lang); + data->charset = charset; + + gtk_tree_model_foreach(GTK_TREE_MODEL (cmb_model), + (GtkTreeModelForeachFunc) find_charset_func, + data); + g_free(data); + } else { + gtk_combo_box_set_active(GTK_COMBO_BOX (cmb_lang), 0); + } + + g_signal_connect(G_OBJECT (cmb_lang), + "changed", + G_CALLBACK (cmb_lang_changed_cb), + chmsee); + + /* startup load lastfile */ + GtkWidget *startup_lastfile_chkbtn = BUILDER_WIDGET (builder, "startup_lastfile_chkbtn"); + g_signal_connect(G_OBJECT (startup_lastfile_chkbtn), + "toggled", + G_CALLBACK (startup_lastfile_toggled_cb), + chmsee); + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (startup_lastfile_chkbtn), + chmsee_get_startup_lastfile(chmsee)); + + GtkWidget *close_button = BUILDER_WIDGET (builder, "setup_close"); + g_signal_connect(G_OBJECT (close_button), + "clicked", + G_CALLBACK (on_window_close), + chmsee); - g_object_unref(glade); + g_object_unref(builder); } diff -Nru chmsee-1.0.7/src/setup.h chmsee-1.3.0/src/setup.h --- chmsee-1.0.7/src/setup.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/setup.h 2011-01-16 13:48:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006 Ji YongGang + * Copyright (C) 2010 Ji YongGang * * ChmSee is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,12 +27,15 @@ * (at your option) any later version. * ***************************************************************************/ -#ifndef __CHMSEE_SETUP_H__ -#define __CHMSEE_SETUP_H__ +#ifndef __CS_SETUP_H__ +#define __CS_SETUP_H__ #include "chmsee.h" -void setup_window_new(ChmSee *); +G_BEGIN_DECLS -#endif /* !__SETUP_H__ */ +void setup_window_new(Chmsee *); +G_END_DECLS + +#endif /* !__CS_SETUP_H__ */ diff -Nru chmsee-1.0.7/src/startup.c chmsee-1.3.0/src/startup.c --- chmsee-1.0.7/src/startup.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/startup.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/*************************************************************************** - * Copyright (C) 2003 by zhong * - * zhongz@163.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#include "config.h" -#include "startup.h" - -#include - -#include "utils/utils.h" - -static void -startup_popup_cb(gpointer data) -{ - gtk_widget_destroy(GTK_WIDGET (data)); -} - -void -startup_popup_new(void) -{ - GtkWidget *window; - GdkPixbuf *pixbuf; - GdkPixmap *pixmap; - gint w, h; - - /* following code stolen from StarDict */ - gtk_window_set_auto_startup_notification(FALSE); - - pixbuf = gdk_pixbuf_new_from_file(get_resource_path("chmsee-splash.png"), NULL); - - w = gdk_pixbuf_get_width(pixbuf); - h = gdk_pixbuf_get_height(pixbuf); - - window = gtk_window_new(GTK_WINDOW_POPUP); - - gtk_widget_set_app_paintable(window, TRUE); - gtk_window_set_title(GTK_WINDOW (window), "ChmSee"); - gtk_window_set_position(GTK_WINDOW (window), GTK_WIN_POS_CENTER); - gtk_widget_set_size_request(window, w, h); - gtk_widget_show(window); - - pixmap = gdk_pixmap_new(window->window, w, h, -1); - gdk_pixbuf_render_to_drawable(pixbuf, pixmap, - window->style->fg_gc[GTK_STATE_NORMAL], - 0, 0, 0, 0, w, - h, GDK_RGB_DITHER_NORMAL, 0, 0); - - gdk_window_set_back_pixmap(window->window, pixmap, FALSE); - gdk_window_clear(window->window); - g_object_unref(pixbuf); - g_object_unref(pixmap); - - while (gtk_events_pending()) - gtk_main_iteration(); - - gtk_init_add((GtkFunction)startup_popup_cb, (gpointer)window); - - gtk_window_set_auto_startup_notification(TRUE); -} diff -Nru chmsee-1.0.7/src/startup.h chmsee-1.3.0/src/startup.h --- chmsee-1.0.7/src/startup.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/startup.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/*************************************************************************** - * Copyright (C) 2003 by zhong * - * zhongz@163.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#ifndef __STARTUP_H__ -#define __STARTUP_H__ - -#include - -G_BEGIN_DECLS - -void startup_popup_new(void); - -G_END_DECLS - -#endif /* __STARTUP_H__ */ diff -Nru chmsee-1.0.7/src/ui_bookmarks.c chmsee-1.3.0/src/ui_bookmarks.c --- chmsee-1.0.7/src/ui_bookmarks.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ui_bookmarks.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,412 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ui_bookmarks.h" - -#include -#include - -#include "utils/utils.h" - -static void bookmarks_init(UiBookmarks *); -static void bookmarks_class_init(UiBookmarksClass *); -static void bookmarks_finalize(GObject *); - -static void row_activated_cb(GtkTreeView *, GtkTreePath *, - GtkTreeViewColumn *, UiBookmarks *); -static void selection_changed_cb(GtkTreeSelection *, UiBookmarks *); -static void entry_changed_cb(GtkEntry *, UiBookmarks *); -static void on_bookmark_add(GtkWidget *, UiBookmarks *); -static void on_bookmark_remove(GtkWidget *, UiBookmarks *); - -static void update_bookmarks_treeview(UiBookmarks *, gchar *); -static gint link_uri_compare(gconstpointer a, gconstpointer b); - -/* Signals */ -enum { - LINK_SELECTED, - LAST_SIGNAL -}; - -/* TreeView Model */ -enum { - COL_TITLE, - COL_URI, - N_COLUMNS -}; - -static GtkVBox *parent_class; -static gint signals[LAST_SIGNAL] = { 0 }; - -GType -ui_bookmarks_get_type(void) -{ - static GType type = 0; - - if (!type) { - static const GTypeInfo info = - { - sizeof(UiBookmarksClass), - NULL, - NULL, - (GClassInitFunc)bookmarks_class_init, - NULL, - NULL, - sizeof(UiBookmarks), - 0, - (GInstanceInitFunc)bookmarks_init, - }; - - type = g_type_register_static(GTK_TYPE_VBOX, - "Bookmarks", - &info, 0); - } - - return type; -} - -static void -bookmarks_class_init(UiBookmarksClass *klass) -{ - GObjectClass *object_class; - - object_class = (GObjectClass *)klass; - parent_class = g_type_class_peek_parent(klass); - - object_class->finalize = bookmarks_finalize; - - signals[LINK_SELECTED] = - g_signal_new("link_selected", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (UiBookmarksClass, link_selected), - NULL, - NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, - 1, - G_TYPE_POINTER); -} - -static void -bookmarks_init(UiBookmarks *bookmarks) -{ - bookmarks->current_uri = NULL; - bookmarks->links = NULL; - - bookmarks->list = gtk_tree_view_new(); - bookmarks->store = gtk_list_store_new(N_COLUMNS, - G_TYPE_STRING, - G_TYPE_STRING); - - gtk_tree_view_set_model(GTK_TREE_VIEW (bookmarks->list), - GTK_TREE_MODEL (bookmarks->store)); - - gtk_tree_view_set_enable_search(GTK_TREE_VIEW (bookmarks->list), FALSE); - - gtk_box_set_spacing(GTK_BOX (bookmarks), 2); -} - -static void -bookmarks_finalize(GObject *object) -{ - if (G_OBJECT_CLASS (parent_class)->finalize) - G_OBJECT_CLASS (parent_class)->finalize(object); -} - -/* callbacks */ - -static void -row_activated_cb(GtkTreeView *tree_view, GtkTreePath *path, - GtkTreeViewColumn *column, UiBookmarks *bookmarks) -{ - GtkTreeModel *model = GTK_TREE_MODEL (bookmarks->store); - GtkTreeIter iter; - gchar *title, *uri; - GList *find_link; - Link *link; - - gtk_tree_model_get_iter(model, &iter, path); - gtk_tree_model_get(model, - &iter, - COL_TITLE, &title, - COL_URI, &uri, - -1); - - find_link = g_list_find_custom(bookmarks->links, uri, link_uri_compare); - - if (find_link) { - link = LINK (find_link->data); - - g_debug("Emiting signal with link to: %s title=%s\n", link->uri, title); - - g_signal_emit(bookmarks, signals[LINK_SELECTED], 0, link); - } -} - -static void -selection_changed_cb(GtkTreeSelection *selection, UiBookmarks *bookmarks) -{ - g_message("bookmark selection_changed"); -} - -static void -entry_changed_cb(GtkEntry *entry, UiBookmarks *bookmarks) -{ - const gchar *name; - gint length; - - name = gtk_entry_get_text(entry); - length = strlen(name); - - if (length >= 2) - gtk_widget_set_sensitive(bookmarks->add_button, TRUE); - else - gtk_widget_set_sensitive(bookmarks->add_button, FALSE); -} - -static void -on_bookmark_add(GtkWidget *widget, UiBookmarks *bookmarks) -{ - gchar *name; - GList *find_link; - Link *link; - - g_message("on_bookmark_add"); - - name = g_strdup(gtk_entry_get_text(GTK_ENTRY (bookmarks->entry))); - - find_link = g_list_find_custom(bookmarks->links, bookmarks->current_uri, link_uri_compare); - - if (find_link == NULL) { /* new bookmark item */ - link = link_new(LINK_TYPE_PAGE, name, bookmarks->current_uri); - bookmarks->links = g_list_append(bookmarks->links, link); - } else { - link = LINK (find_link->data); - - /* Update bookmark item name */ - if (ncase_compare_utf8_string(link->name, name) != 0) { - g_free(link->name); - link->name = g_strdup(name); - } - } - - g_free(name); - update_bookmarks_treeview(bookmarks, link->uri); -} - -static void -on_bookmark_remove(GtkWidget *widget, UiBookmarks *bookmarks) -{ - GtkTreeSelection *selection; - GtkTreeIter iter; - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (bookmarks->list)); - - if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { - GList *list; - gchar *title, *uri; - - gtk_tree_model_get(GTK_TREE_MODEL (bookmarks->store), - &iter, - COL_TITLE, &title, - COL_URI, &uri, - -1); - - list = g_list_find_custom(bookmarks->links, uri, link_uri_compare); - - Link *link = (Link *)list->data; - bookmarks->links = g_list_remove(bookmarks->links, link); - link_free(link); - - update_bookmarks_treeview(bookmarks, NULL); - } -} - -/* internal functions */ - -static void -update_bookmarks_treeview(UiBookmarks *bookmarks, gchar *uri) -{ - GtkTreeSelection *selection; - GtkTreeIter iter; - GList *l; - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (bookmarks->list)); - gtk_list_store_clear(bookmarks->store); - - for (l = bookmarks->links; l; l = l->next) { - Link *link = l->data; - - gtk_list_store_append(bookmarks->store, &iter); - gtk_list_store_set(bookmarks->store, &iter, - COL_TITLE, link->name, - COL_URI, link->uri, - -1); - - if (uri != NULL && ncase_compare_utf8_string(uri, link->uri) == 0) - gtk_tree_selection_select_iter(selection, &iter); - } - - if (uri == NULL || strlen(uri) == 0) - gtk_tree_selection_select_path(selection, gtk_tree_path_new_first()); -} - -static gint -link_uri_compare(gconstpointer a, gconstpointer b) -{ - return ncase_compare_utf8_string(((Link *)a)->uri, (char *)b); -} - -/* external functions */ - -GtkWidget * -ui_bookmarks_new(GList *links) -{ - UiBookmarks *bookmarks; - - GtkTreeSelection *selection; - GtkWidget *list_sw; - GtkWidget *frame; - GtkWidget *hbox; - - GtkCellRenderer *cell; - - bookmarks = g_object_new(TYPE_UIBOOKMARKS, NULL); - - gtk_container_set_border_width(GTK_CONTAINER (bookmarks), 2); - - bookmarks->links = links; - - /* bookmarks list */ - frame = gtk_frame_new(NULL); - gtk_frame_set_shadow_type(GTK_FRAME (frame), GTK_SHADOW_IN); - - list_sw = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (list_sw), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - - gtk_container_add(GTK_CONTAINER (frame), list_sw); - - cell = gtk_cell_renderer_text_new(); - g_object_set(cell, - "ellipsize", PANGO_ELLIPSIZE_END, - NULL); - - gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW (bookmarks->list), - -1, - _("Bookmark"), cell, - "text", 0, - NULL); - - gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (bookmarks->list), FALSE); - gtk_tree_view_set_search_column(GTK_TREE_VIEW (bookmarks->list), FALSE); - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (bookmarks->list)); - - g_signal_connect(selection, - "changed", - G_CALLBACK (selection_changed_cb), - bookmarks); - - g_signal_connect(bookmarks->list, - "row_activated", - G_CALLBACK (row_activated_cb), - bookmarks); - - gtk_container_add(GTK_CONTAINER (list_sw), bookmarks->list); - - gtk_box_pack_start(GTK_BOX (bookmarks), frame, TRUE, TRUE, 0); - - /* bookmark title */ - bookmarks->entry = gtk_entry_new(); - - g_signal_connect(bookmarks->entry, - "changed", - G_CALLBACK (entry_changed_cb), - bookmarks); - - gtk_box_pack_start(GTK_BOX (bookmarks), bookmarks->entry, FALSE, FALSE, 2); - - /* bookmark add and remove buttons */ - hbox = gtk_hbox_new(FALSE, 0); - - bookmarks->add_button = gtk_button_new_from_stock(GTK_STOCK_ADD); - - g_signal_connect(G_OBJECT (bookmarks->add_button), - "clicked", - G_CALLBACK (on_bookmark_add), - bookmarks); - - bookmarks->remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); - g_signal_connect(G_OBJECT (bookmarks->remove_button), - "clicked", - G_CALLBACK (on_bookmark_remove), - bookmarks); - - gtk_box_pack_end(GTK_BOX (hbox), bookmarks->add_button, TRUE, TRUE, 0); - gtk_box_pack_end(GTK_BOX (hbox), bookmarks->remove_button, TRUE, TRUE, 0); - - gtk_box_pack_start(GTK_BOX (bookmarks), hbox, FALSE, FALSE, 2); - - update_bookmarks_treeview(bookmarks, NULL); - gtk_widget_show_all(GTK_WIDGET (bookmarks)); - - return GTK_WIDGET(bookmarks); -} - -void ui_bookmarks_set_model(UiBookmarks* self, GList* model) { - self->links = model; - update_bookmarks_treeview(self, NULL); -} - - -void -ui_bookmarks_set_current_link(UiBookmarks *bookmarks, const gchar *name, - const gchar *uri) -{ - g_return_if_fail(IS_UIBOOKMARKS (bookmarks)); - - g_debug("call bookmarks_set_current_link"); - - g_debug("set entry text: %s", name); - gtk_entry_set_text(GTK_ENTRY (bookmarks->entry), name); - - gtk_editable_set_position(GTK_EDITABLE (bookmarks->entry), -1); - gtk_editable_select_region(GTK_EDITABLE (bookmarks->entry), -1, -1); - - g_free(bookmarks->current_uri); - - bookmarks->current_uri = g_strdup(uri); -} - -void -bookmarks_grab_focus(UiBookmarks *bookmarks) -{ - g_return_if_fail(IS_UIBOOKMARKS (bookmarks)); - - gtk_widget_grab_focus(bookmarks->entry); -} - -GList * -ui_bookmarks_get_list(UiBookmarks *bookmarks) -{ - return bookmarks->links; -} diff -Nru chmsee-1.0.7/src/ui_bookmarks.h chmsee-1.3.0/src/ui_bookmarks.h --- chmsee-1.0.7/src/ui_bookmarks.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ui_bookmarks.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __UI_BOOKMARKS_H__ -#define __UI_BOOKMARKS_H__ - -#include -#include - -#include "models/link.h" - -#define TYPE_UIBOOKMARKS \ - (ui_bookmarks_get_type()) -#define UIBOOKMARKS(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_UIBOOKMARKS, UiBookmarks)) -#define UIBOOKMARKS_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_UIBOOKMARKS, UiBookmarksClass)) -#define IS_UIBOOKMARKS(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_UIBOOKMARKS)) -#define IS_SEARCH_CLASS(k) \ - (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_UIBOOKMARKS)) - -typedef struct _UiBookmarks UiBookmarks; -typedef struct _UiBookmarksClass UiBookmarksClass; - -struct _UiBookmarks { - GtkVBox parent; - - GtkWidget *list; - GtkListStore *store; - - GtkWidget *entry; - GtkWidget *add_button; - GtkWidget *remove_button; - - GList *links; - gchar *current_uri; -}; - -struct _UiBookmarksClass { - GtkVBoxClass parent_class; - - /* Signals */ - void (*link_selected) (UiBookmarks *bookmarks, Link *link); -}; - -GType ui_bookmarks_get_type(void); -GtkWidget *ui_bookmarks_new(GList* model); -void ui_bookmarks_set_model(UiBookmarks* self, GList* model); - -void ui_bookmarks_set_current_link(UiBookmarks *, const gchar *, const gchar *); -void ui_bookmarks_grab_focus(UiBookmarks *); -GList *ui_bookmarks_get_list(UiBookmarks *); - -#endif /* !__UI_BOOKMARKS_H__ */ diff -Nru chmsee-1.0.7/src/ui_chmfile.c chmsee-1.3.0/src/ui_chmfile.c --- chmsee-1.0.7/src/ui_chmfile.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ui_chmfile.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1173 +0,0 @@ -/* - * Copyright (C) 2006 Ji YongGang - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmseeUiChmfile; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/*************************************************************************** - * Copyright (C) 2003 by zhong * - * zhongz@163.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#include "config.h" -#include "ui_chmfile.h" - -#include -#include -#include -#include - -#include /* R_OK */ - -#include -#include -#include -#include - -#include "ihtml.h" -#include "html-factory.h" -#include "booktree.h" -#include "ui_bookmarks.h" -#include "ui_index.h" -#include "link.h" -#include "utils/utils.h" - -#include "models/chmfile-factory.h" - -enum { - CHMSEE_STATE_INIT, /* init state, no book is loaded */ - CHMSEE_STATE_LOADING, /* loading state, don't pop up an error window when open homepage failed */ - CHMSEE_STATE_NORMAL /* normal state, one book is loaded */ -}; - - -/* Signals */ -enum { - MODEL_CHANGED, - HTML_CHANGED, - LAST_SIGNAL -}; -static gint signals[LAST_SIGNAL] = { 0 }; - -enum { - PROP_0, - - PROP_SIDEPANE_VISIBLE, - PROP_LINK_MESSAGE -}; - -struct _ChmseeUiChmfilePrivate { - GtkWidget* control_notebook; - - GtkWidget* topic_page; - GtkWidget* ui_topic; - - GtkWidget* index_page; /* the index tab under control_notebook */ - GtkWidget* ui_index; /* the gtktreeview */ - - GtkWidget* bookmark_page; - - GtkWidget* html_notebook; - - GtkActionGroup* action_group; - GtkUIManager* ui_manager; - - - guint scid_default; - - gboolean has_toc; - gboolean has_index; - gint pos_x; - gint pos_y; - gint width; - gint height; - gint hpaned_position; - gint lang; - - ChmseeIchmfile *model; - - gchar *home; - gchar *cache_dir; - gchar *last_dir; - gchar* context_menu_link; - gint state; /* see enum CHMSEE_STATE_* */ - gchar* link_message; -}; - - - -#define selfp (self->priv) -#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHMSEE_TYPE_UI_CHMFILE, ChmseeUiChmfilePrivate)) - -static void chmsee_ui_chmfile_finalize(GObject *); -static void chmsee_ui_chmfile_dispose(GObject* self); -static void chmsee_ui_chmfile_set_property(GObject* self, - guint property_id, - const GValue* value, - GParamSpec* pspec); -static void chmsee_ui_chmfile_get_property(GObject* self, - guint property_id, - GValue* value, - GParamSpec* pspec); - -static void chmsee_set_context_menu_link(ChmseeUiChmfile* self, const gchar* link); - -static void chmsee_refresh_index(ChmseeUiChmfile* self); -static GtkWidget* chmsee_new_index_page(ChmseeUiChmfile* self); -static void on_ui_index_link_selected(ChmseeUiChmfile* self, Link* link); - -static void on_booktree_link_selected(GObject *, Link *, ChmseeUiChmfile *); -static void on_bookmarks_link_selected(GObject *, Link *, ChmseeUiChmfile *); -static void on_html_notebook_switch_page(GtkNotebook *, GtkNotebookPage *, guint , ChmseeUiChmfile *); -static void on_html_location_changed(ChmseeIhtml *, const gchar *, ChmseeUiChmfile *); -static gboolean on_html_open_uri(ChmseeIhtml *, const gchar *, ChmseeUiChmfile *); -static void on_html_title_changed(ChmseeIhtml *, const gchar *, ChmseeUiChmfile *); -static void on_html_context_normal(ChmseeIhtml *, ChmseeUiChmfile *); -static void on_html_context_link(ChmseeIhtml *, const gchar *, ChmseeUiChmfile *); -static void on_html_open_new_tab(ChmseeIhtml *, const gchar *, ChmseeUiChmfile *); -static void on_html_link_message(ChmseeIhtml *, const gchar *, ChmseeUiChmfile *); - -static void on_close_tab(GtkWidget *, ChmseeUiChmfile *); -static void on_copy(GtkWidget *, ChmseeUiChmfile *); -static void on_copy_page_location(GtkWidget*, ChmseeUiChmfile*); -static void on_select_all(GtkWidget *, ChmseeUiChmfile *); -static void on_back(GtkWidget *, ChmseeUiChmfile *); -static void on_forward(GtkWidget *, ChmseeUiChmfile *); -static void on_zoom_in(GtkWidget *, ChmseeUiChmfile *); -static void on_context_new_tab(GtkWidget *, ChmseeUiChmfile *); -static void on_context_copy_link(GtkWidget *, ChmseeUiChmfile *); - -static void chmsee_ui_chmfile_populate_window(ChmseeUiChmfile *); -static void chmsee_ui_chmfile_close_current_book(ChmseeUiChmfile *); -static void update_tab_title(ChmseeUiChmfile *, ChmseeIhtml *); -static void tab_set_title(ChmseeUiChmfile *, ChmseeIhtml *, const gchar *); -static void open_homepage(ChmseeUiChmfile *); - -static const GtkActionEntry entries[] = { - { "Copy", GTK_STOCK_COPY, "_Copy", "C", NULL, G_CALLBACK(on_copy)}, - { "Back", GTK_STOCK_GO_BACK, "_Back", "Left", NULL, G_CALLBACK(on_back)}, - { "Forward", GTK_STOCK_GO_FORWARD, "_Forward", "Right", NULL, G_CALLBACK(on_forward)}, - { "OpenLinkInNewTab", NULL, "Open Link in New _Tab", NULL, NULL, G_CALLBACK(on_context_new_tab)}, - { "CopyLinkLocation", NULL, "_Copy Link Location", NULL, NULL, G_CALLBACK(on_context_copy_link)}, - { "SelectAll", NULL, "Select _All", NULL, NULL, G_CALLBACK(on_select_all)}, - { "CopyPageLocation", NULL, "Copy Page _Location", NULL, NULL, G_CALLBACK(on_copy_page_location)}, - { "OnKeyboardControlEqual", NULL, NULL, "equal", NULL, G_CALLBACK(on_zoom_in)} -}; - -/* Radio items */ -static const GtkRadioActionEntry radio_entries[] = { -}; - -static const char *ui_description = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - "" - ""; - - -G_DEFINE_TYPE (ChmseeUiChmfile, chmsee_ui_chmfile, GTK_TYPE_HPANED); - -void -chmsee_ui_chmfile_class_init(ChmseeUiChmfileClass *klass) -{ - GParamSpec* pspec; - - g_type_class_add_private(klass, sizeof(ChmseeUiChmfilePrivate)); - G_OBJECT_CLASS(klass)->finalize = chmsee_ui_chmfile_finalize; - G_OBJECT_CLASS(klass)->dispose = chmsee_ui_chmfile_dispose; - G_OBJECT_CLASS(klass)->set_property = chmsee_ui_chmfile_set_property; - G_OBJECT_CLASS(klass)->get_property = chmsee_ui_chmfile_get_property; - - signals[MODEL_CHANGED] = - g_signal_new ("model_changed", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, - NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, - 1, - G_TYPE_POINTER); - - signals[HTML_CHANGED] = - g_signal_new("html_changed", - G_TYPE_FROM_CLASS(klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, - NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, - 1, - G_TYPE_POINTER); - - pspec = g_param_spec_boolean("sidepane-visible", NULL, NULL, TRUE, G_PARAM_READWRITE); - g_object_class_install_property(G_OBJECT_CLASS(klass), PROP_SIDEPANE_VISIBLE, pspec); - - pspec = g_param_spec_string("link-message", NULL, NULL, "", G_PARAM_READABLE); - g_object_class_install_property(G_OBJECT_CLASS(klass), PROP_LINK_MESSAGE, pspec); -} - -static void -chmsee_ui_chmfile_init(ChmseeUiChmfile* self) -{ - self->priv = GET_PRIVATE(self); - selfp->home = g_build_filename(g_get_home_dir(), ".chmsee", NULL); - - g_debug("chmsee home = %s", selfp->home); - - if (!g_file_test(selfp->home, G_FILE_TEST_IS_DIR)) - mkdir(selfp->home, 0777); - - selfp->cache_dir = g_build_filename(selfp->home, "bookshelf", NULL); - - if (!g_file_test(selfp->cache_dir, G_FILE_TEST_IS_DIR)) - mkdir(selfp->cache_dir, 0777); - - selfp->lang = 0; - selfp->last_dir = g_strdup(g_get_home_dir()); - selfp->context_menu_link = NULL; - - selfp->model = NULL; - selfp->pos_x = -100; - selfp->pos_y = -100; - selfp->width = 0; - selfp->height = 0; - selfp->hpaned_position = -1; - selfp->has_toc = FALSE; - selfp->has_index = FALSE; - selfp->state = CHMSEE_STATE_INIT; - selfp->link_message = NULL; - - - /* Init gecko */ - chmsee_html_init_system(); - chmsee_html_set_default_lang(selfp->lang); - - chmsee_ui_chmfile_populate_window(self); - -} - -static void -chmsee_ui_chmfile_finalize(GObject *object) -{ - ChmseeUiChmfile* self = CHMSEE_UI_CHMFILE(object); - - if(selfp->home) { - g_free(selfp->home); - selfp->home = NULL; - } - - if(selfp->cache_dir) { - g_free(selfp->cache_dir); - selfp->cache_dir = NULL; - } - - if(selfp->last_dir) { - g_free(selfp->last_dir); - selfp->last_dir = NULL; - } - - g_free(selfp->context_menu_link); - selfp->context_menu_link = NULL; - G_OBJECT_CLASS (chmsee_ui_chmfile_parent_class)->finalize (object); -} - -static void chmsee_ui_chmfile_dispose(GObject* gobject) -{ - ChmseeUiChmfile* self = CHMSEE_UI_CHMFILE(gobject); - - if(selfp->model) { - g_object_unref(selfp->model); - selfp->model = NULL; - } - - if(selfp->action_group) { - g_object_unref(selfp->action_group); - selfp->action_group = NULL; - } - - if(selfp->ui_manager) { - g_object_unref(selfp->ui_manager); - selfp->ui_manager = NULL; - } - - G_OBJECT_CLASS(chmsee_ui_chmfile_parent_class)->dispose(gobject); -} - -static void -on_booktree_link_selected(GObject *ignored, Link *link, ChmseeUiChmfile *self) -{ - ChmseeIhtml* html; - - g_debug("booktree link selected: %s", link->uri); - if (!g_ascii_strcasecmp(CHMSEE_NO_LINK, link->uri)) - return; - - html = chmsee_ui_chmfile_get_active_html(self); - - g_signal_handlers_block_by_func(html, on_html_open_uri, self); - - chmsee_ihtml_open_uri(html, g_build_filename( - chmsee_ichmfile_get_dir(selfp->model), link->uri, NULL)); - - g_signal_handlers_unblock_by_func(html, on_html_open_uri, self); -} - -static void -on_bookmarks_link_selected(GObject *ignored, Link *link, ChmseeUiChmfile *chmsee) -{ - chmsee_ihtml_open_uri(chmsee_ui_chmfile_get_active_html(chmsee), link->uri); -} - -static void -on_html_notebook_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, guint new_page_num, ChmseeUiChmfile *self) -{ - GtkWidget *new_page; - - new_page = gtk_notebook_get_nth_page(notebook, new_page_num); - - if (new_page) { - ChmseeIhtml* new_html; - const gchar* title; - const gchar* location; - - new_html = g_object_get_data(G_OBJECT (new_page), "html"); - - update_tab_title(self, new_html); - - title = chmsee_ihtml_get_title(new_html); - location = chmsee_ihtml_get_location(new_html); - - if (location != NULL && strlen(location)) { - if (title && title[0]) { - ui_bookmarks_set_current_link(UIBOOKMARKS (selfp->bookmark_page), title, location); - } else { - const gchar *book_title; - - book_title = booktree_get_selected_book_title(BOOKTREE (selfp->ui_topic)); - ui_bookmarks_set_current_link(UIBOOKMARKS (selfp->bookmark_page), book_title, location); - } - - /* Sync the book tree. */ - if (selfp->has_toc) - booktree_select_uri(BOOKTREE (selfp->ui_topic), location); - } - } else { - gtk_window_set_title(GTK_WINDOW (self), "ChmseeUiChmfile"); - } - g_signal_emit(self, signals[HTML_CHANGED], 0, chmsee_ui_chmfile_get_active_html(self)); -} - -static void -on_html_location_changed(ChmseeIhtml *html, const gchar *location, ChmseeUiChmfile* self) -{ - g_debug("%s:%d:html location changed cb: %s", __FILE__, __LINE__, location); - g_signal_emit(self, signals[HTML_CHANGED], 0, chmsee_ui_chmfile_get_active_html(self)); -} - -static gboolean -on_html_open_uri(ChmseeIhtml* html, const gchar *uri, ChmseeUiChmfile *self) -{ - g_debug("enter html_open_uri_cb with uri = %s", uri); - static const char* prefix = "file://"; - static int prefix_len = 7; - - if(g_str_has_prefix(uri, prefix)) { - /* FIXME: can't disable the DND function of GtkMozEmbed */ - if(g_str_has_suffix(uri, ".chm") - || g_str_has_suffix(uri, ".CHM")) { - /* TODO: should popup an event */ - /* chmsee_open_uri(self, uri); */ - } - - if(g_access(uri+prefix_len, R_OK) < 0) { - g_debug("%s:%d:html_open_uri_cb:%s does not exist", __FILE__, __LINE__, uri+prefix_len); - gchar* newfname = correct_filename(uri+prefix_len); - if(newfname) { - g_message(_("URI redirect: \"%s\" -> \"%s\""), uri, newfname); - chmsee_ihtml_open_uri(html, newfname); - g_free(newfname); - return TRUE; - } - - if(selfp->state == CHMSEE_STATE_LOADING) { - return TRUE; - } - } - } - - if ((html == chmsee_ui_chmfile_get_active_html(self)) && selfp->has_toc) - booktree_select_uri(BOOKTREE (selfp->ui_topic), uri); - - return FALSE; -} - -static void -on_html_title_changed(ChmseeIhtml *html, const gchar *title, ChmseeUiChmfile *self) -{ - const gchar *location; - - g_debug("html title changed cb %s", title); - - update_tab_title(self, chmsee_ui_chmfile_get_active_html(self)); - - location = chmsee_ihtml_get_location(html); - - if (location != NULL && strlen(location)) { - if (strlen(title)) - ui_bookmarks_set_current_link(UIBOOKMARKS (selfp->bookmark_page), title, location); - else { - const gchar *book_title; - - book_title = booktree_get_selected_book_title(BOOKTREE (selfp->ui_topic)); - ui_bookmarks_set_current_link(UIBOOKMARKS (selfp->bookmark_page), book_title, location); - } - } -} - -/* Popup html context menu */ -static void -on_html_context_normal(ChmseeIhtml *html, ChmseeUiChmfile *self) -{ - g_debug("html context-normal event"); - gtk_menu_popup(GTK_MENU(gtk_ui_manager_get_widget(selfp->ui_manager, "/HtmlContextNormal")), - NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); -} - -/* Popup html context menu when mouse over hyper link */ -static void -on_html_context_link(ChmseeIhtml *html, const gchar *link, ChmseeUiChmfile* self) -{ - g_debug("html context-link event: %s", link); - chmsee_set_context_menu_link(self, link); - gtk_action_set_sensitive(gtk_action_group_get_action(selfp->action_group, "OpenLinkInNewTab"), - g_str_has_prefix(selfp->context_menu_link, "file://")); - - gtk_menu_popup(GTK_MENU(gtk_ui_manager_get_widget(selfp->ui_manager, "/HtmlContextLink")), - NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); -} - -static void -on_html_open_new_tab(ChmseeIhtml *html, const gchar *location, ChmseeUiChmfile *chmsee) -{ - g_debug("html open new tab callback: %s", location); - - chmsee_ui_chmfile_new_tab(chmsee, location); -} - -static void -on_html_link_message(ChmseeIhtml *html, const gchar *url, ChmseeUiChmfile *self) -{ - g_free(selfp->link_message); - selfp->link_message = g_strdup(url); - g_object_notify(G_OBJECT(self), "link-message"); -} - -static void -on_close_tab(GtkWidget *widget, ChmseeUiChmfile *self) -{ - gint num_pages, number, i; - GtkWidget *tab_label, *page; - - number = -1; - num_pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp->html_notebook)); - - if (num_pages == 1) { - /* TODO: should open a new empty tab */ - return; - } - - for (i = 0; i < num_pages; i++) { - GList *children, *l; - - g_debug("page %d", i); - page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (selfp->html_notebook), i); - - tab_label = gtk_notebook_get_tab_label(GTK_NOTEBOOK (selfp->html_notebook), page); - g_message("tab_label"); - children = gtk_container_get_children(GTK_CONTAINER (tab_label)); - - for (l = children; l; l = l->next) { - if (widget == l->data) { - g_debug("found tab on page %d", i); - number = i; - break; - } - } - - if (number >= 0) { - gtk_notebook_remove_page(GTK_NOTEBOOK (selfp->html_notebook), number); - - break; - } - } -} - -static void -on_copy(GtkWidget *widget, ChmseeUiChmfile *self) -{ - g_message("On Copy"); - - g_return_if_fail(GTK_IS_NOTEBOOK (selfp->html_notebook)); - - chmsee_ihtml_copy_selection(chmsee_ui_chmfile_get_active_html(self)); -} - -static void -on_copy_page_location(GtkWidget* widget, ChmseeUiChmfile* chmsee) { - ChmseeIhtml* html = chmsee_ui_chmfile_get_active_html(chmsee); - const gchar* location = chmsee_ihtml_get_location(html); - if(!location) return; - - gtk_clipboard_set_text( - gtk_clipboard_get(GDK_SELECTION_PRIMARY), - location, - -1); - gtk_clipboard_set_text( - gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), - location, - -1); -} - -static void -on_select_all(GtkWidget *widget, ChmseeUiChmfile *self) -{ - ChmseeIhtml *html; - - g_message("On Select All"); - - g_return_if_fail(GTK_IS_NOTEBOOK (selfp->html_notebook)); - - html = chmsee_ui_chmfile_get_active_html(self); - chmsee_ihtml_select_all(html); -} - -static void -on_back(GtkWidget *widget, ChmseeUiChmfile *chmsee) -{ - chmsee_ihtml_go_back(chmsee_ui_chmfile_get_active_html(chmsee)); -} - -static void -on_forward(GtkWidget *widget, ChmseeUiChmfile *chmsee) -{ - chmsee_ihtml_go_forward(chmsee_ui_chmfile_get_active_html(chmsee)); -} - -static void -on_zoom_in(GtkWidget *widget, ChmseeUiChmfile *self) -{ - ChmseeIhtml* html = chmsee_ui_chmfile_get_active_html(self); - if(html != NULL) { - chmsee_ihtml_increase_size(html); - } -} - -void chmsee_ui_chmfile_close_current_tab(ChmseeUiChmfile* self) { - g_return_if_fail(GTK_IS_NOTEBOOK (selfp->html_notebook)); - - if (gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp->html_notebook)) == 1) { - /* TODO: should open a new tab */ - } - - gint page_num; - - page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK (selfp->html_notebook)); - - if (page_num >= 0) - gtk_notebook_remove_page(GTK_NOTEBOOK (selfp->html_notebook), page_num); -} - -static void -on_context_new_tab(GtkWidget *widget, ChmseeUiChmfile *self) -{ - g_debug("On context open new tab: %s", selfp->context_menu_link); - - if (selfp->context_menu_link != NULL) { - chmsee_ui_chmfile_new_tab(self, selfp->context_menu_link); - } -} - -static void -on_context_copy_link(GtkWidget *widget, ChmseeUiChmfile *self) -{ - g_debug("On context copy link: %s", selfp->context_menu_link); - - if (selfp->context_menu_link != NULL) { - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), - selfp->context_menu_link, -1); - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), - selfp->context_menu_link, -1); - } -} - - -static void -chmsee_ui_chmfile_populate_window(ChmseeUiChmfile *self) -{ - GtkWidget* control_vbox = gtk_vbox_new(FALSE, 0); - gtk_widget_show(control_vbox); - - GtkWidget* control_notebook = gtk_notebook_new(); - gtk_box_pack_start(GTK_BOX (control_vbox), - GTK_WIDGET (control_notebook), - TRUE, - TRUE, - 2); - gtk_widget_show(control_notebook); - - - GtkWidget* topic_page = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (topic_page), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW (topic_page), - GTK_SHADOW_IN); - gtk_container_set_border_width(GTK_CONTAINER (topic_page), 2); - - GtkWidget* booktree = GTK_WIDGET(g_object_ref_sink(booktree_new(NULL))); - gtk_container_add(GTK_CONTAINER (topic_page), booktree); - gtk_widget_show_all(topic_page); - gtk_notebook_append_page(GTK_NOTEBOOK (control_notebook), - topic_page, - gtk_label_new(_("Topics"))); - - g_signal_connect(G_OBJECT (booktree), - "link-selected", - G_CALLBACK (on_booktree_link_selected), - self); - - gtk_notebook_append_page(GTK_NOTEBOOK (control_notebook), - chmsee_new_index_page(self), - gtk_label_new(_("Index"))); - - selfp->bookmark_page = GTK_WIDGET (ui_bookmarks_new(NULL)); - - gtk_notebook_append_page(GTK_NOTEBOOK (control_notebook), - selfp->bookmark_page, - gtk_label_new (_("Bookmarks"))); - - g_signal_connect(G_OBJECT (selfp->bookmark_page), - "link-selected", - G_CALLBACK (on_bookmarks_link_selected), - self); - - gtk_paned_add1(GTK_PANED(self), control_vbox); - - /* HTML tabs notebook */ - GtkWidget* html_notebook = gtk_notebook_new(); - g_signal_connect(G_OBJECT (html_notebook), - "switch-page", - G_CALLBACK (on_html_notebook_switch_page), - self); - - gtk_widget_show(html_notebook); - gtk_paned_add2 (GTK_PANED (self), html_notebook); - gtk_widget_show_all(GTK_WIDGET(self)); - - g_signal_connect(G_OBJECT (html_notebook), - "switch-page", - G_CALLBACK (on_html_notebook_switch_page), - self); - - - selfp->control_notebook = control_notebook; - selfp->html_notebook = html_notebook; - selfp->ui_topic = booktree; - selfp->topic_page = topic_page; - - chmsee_ui_chmfile_new_tab(self, NULL); - - GtkActionGroup* action_group = gtk_action_group_new ("UiChmfileActions"); - selfp->action_group = action_group; - gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), self); - - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "Back"), FALSE); - gtk_action_set_sensitive(gtk_action_group_get_action(action_group, "Forward"), FALSE); - - GtkUIManager* ui_manager = gtk_ui_manager_new (); - selfp->ui_manager = ui_manager; - gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); - - GError* error = NULL; - if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) - { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - exit (EXIT_FAILURE); - } - -} - -void -chmsee_ui_chmfile_set_model2(ChmseeUiChmfile* self, ChmseeIchmfile *book) -{ - GNode *link_tree; - GList *bookmarks_list; - - g_debug("display book"); - selfp->state = CHMSEE_STATE_LOADING; - - /* Close currently opened book */ - if (selfp->model) { - chmsee_ui_chmfile_close_current_book(self); - } - - selfp->model = g_object_ref(book); - - /* TOC */ - if (chmsee_ichmfile_get_link_tree(selfp->model) != NULL) { - booktree_set_model(BOOKTREE(selfp->ui_topic), link_tree = chmsee_ichmfile_get_link_tree(selfp->model)); - gtk_widget_show(selfp->topic_page); - selfp->has_toc = TRUE; - } else { - gtk_widget_hide(selfp->topic_page); - selfp->has_toc = FALSE; - } - - /* Index */ - chmsee_refresh_index(self); - - /* Bookmarks */ - bookmarks_list = chmsee_ichmfile_get_bookmarks_list(selfp->model); - ui_bookmarks_set_model(UIBOOKMARKS(selfp->bookmark_page), bookmarks_list); - - - gtk_notebook_set_current_page(GTK_NOTEBOOK (selfp->control_notebook), - g_list_length(bookmarks_list) && selfp->has_toc ? 1 : 0); - - chmsee_ihtml_set_variable_font(chmsee_ui_chmfile_get_active_html(self), - chmsee_ichmfile_get_variable_font(selfp->model)); - chmsee_ihtml_set_fixed_font(chmsee_ui_chmfile_get_active_html(self), - chmsee_ichmfile_get_fixed_font(selfp->model)); - - if (chmsee_ichmfile_get_home(selfp->model)) { - open_homepage(self); - - } - selfp->state = CHMSEE_STATE_NORMAL; - - selfp->last_dir = g_strdup_printf("%s", g_path_get_dirname( - chmsee_ichmfile_get_filename(book))); -} - -void -chmsee_ui_chmfile_set_model(ChmseeUiChmfile* self, ChmseeIchmfile *book) -{ - chmsee_ui_chmfile_set_model2(self, book); - g_signal_emit(self, signals[MODEL_CHANGED], 0, book); -} - - - -static void -chmsee_ui_chmfile_close_current_book(ChmseeUiChmfile *self) -{ - gchar* bookmark_fname = g_build_filename(chmsee_ichmfile_get_dir(selfp->model), CHMSEE_BOOKMARK_FILE, NULL); - bookmarks_save(ui_bookmarks_get_list(UIBOOKMARKS (selfp->bookmark_page)), bookmark_fname); - g_free(bookmark_fname); - g_object_unref(selfp->model); - - selfp->model = NULL; - selfp->state = CHMSEE_STATE_INIT; -} - -static GtkWidget* -new_tab_content(ChmseeUiChmfile *chmsee, const gchar *str) -{ - GtkWidget *widget; - GtkWidget *label; - GtkWidget *close_button, *close_image; - - widget = gtk_hbox_new(FALSE, 3); - - label = gtk_label_new(str); - gtk_label_set_ellipsize(GTK_LABEL (label), PANGO_ELLIPSIZE_END); - gtk_label_set_single_line_mode(GTK_LABEL (label), TRUE); - gtk_misc_set_alignment(GTK_MISC (label), 0.0, 0.5); - gtk_misc_set_padding(GTK_MISC (label), 0, 0); - gtk_box_pack_start(GTK_BOX (widget), label, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT (widget), "label", label); - - close_button = gtk_button_new(); - gtk_button_set_relief(GTK_BUTTON(close_button), GTK_RELIEF_NONE); - close_image = gtk_image_new_from_stock(GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); - gtk_widget_show(close_image); - gtk_container_add(GTK_CONTAINER (close_button), close_image); - g_signal_connect(G_OBJECT (close_button), - "clicked", - G_CALLBACK (on_close_tab), - chmsee); - - gtk_box_pack_start(GTK_BOX (widget), close_button, FALSE, FALSE, 0); - - gtk_widget_show_all(widget); - - return widget; -} - -void -chmsee_ui_chmfile_new_tab(ChmseeUiChmfile *self, const gchar *location) -{ - ChmseeIhtml *html; - GtkWidget *frame; - GtkWidget *view; - GtkWidget *tab_content; - gint num; - - g_debug("new_tab : %s", location); - - /* Ignore external link */ - if (location != NULL && !g_str_has_prefix(location, "file://")) - return; - - html = chmsee_html_new(); - view = chmsee_ihtml_get_widget(html); - gtk_widget_show(view); - - frame = gtk_frame_new(NULL); - gtk_widget_show(frame); - - gtk_frame_set_shadow_type(GTK_FRAME (frame), GTK_SHADOW_IN); - gtk_container_set_border_width(GTK_CONTAINER (frame), 2); - gtk_container_add(GTK_CONTAINER (frame), view); - - g_object_set_data(G_OBJECT (frame), "html", html); - - /* Custom label widget, with a close button */ - tab_content = new_tab_content(self, _("No Title")); - - g_signal_connect(G_OBJECT (html), - "title-changed", - G_CALLBACK (on_html_title_changed), - self); - g_signal_connect(G_OBJECT (html), - "open-uri", - G_CALLBACK (on_html_open_uri), - self); - g_signal_connect(G_OBJECT (html), - "location-changed", - G_CALLBACK (on_html_location_changed), - self); - g_signal_connect(G_OBJECT (html), - "context-normal", - G_CALLBACK (on_html_context_normal), - self); - g_signal_connect(G_OBJECT (html), - "context-link", - G_CALLBACK (on_html_context_link), - self); - g_signal_connect(G_OBJECT (html), - "open-new-tab", - G_CALLBACK (on_html_open_new_tab), - self); - g_signal_connect(G_OBJECT (html), - "link-message", - G_CALLBACK (on_html_link_message), - self); - num = gtk_notebook_append_page(GTK_NOTEBOOK (selfp->html_notebook), - frame, tab_content); - - gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK (selfp->html_notebook), - frame, - TRUE, TRUE, - GTK_PACK_START); - - if (location != NULL) { - chmsee_ihtml_open_uri(html, location); - - if (selfp->has_toc) - booktree_select_uri(BOOKTREE (selfp->ui_topic), location); - } else { - /* chmsee_ihtml_clear(html); */ - } - - gtk_notebook_set_current_page(GTK_NOTEBOOK (selfp->html_notebook), num); - g_signal_emit(self, - signals[HTML_CHANGED], - 0, - chmsee_ui_chmfile_get_active_html(self)); -} - -static void -open_homepage(ChmseeUiChmfile *self) -{ - ChmseeIhtml *html; - - html = chmsee_ui_chmfile_get_active_html(self); - - /* g_signal_handlers_block_by_func(html, html_open_uri_cb, self); */ - - chmsee_ihtml_open_uri(html, g_build_filename(chmsee_ichmfile_get_dir(selfp->model), - chmsee_ichmfile_get_home(selfp->model), NULL)); - - /* g_signal_handlers_unblock_by_func(html, html_open_uri_cb, self); */ - - if (selfp->has_toc) { - booktree_select_uri(BOOKTREE (selfp->ui_topic), - chmsee_ichmfile_get_home(selfp->model)); - } -} - -ChmseeIhtml * -chmsee_ui_chmfile_get_active_html(ChmseeUiChmfile *self) -{ - GtkWidget *frame; - gint page_num; - - if(!selfp->html_notebook) { - return NULL; - } - page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK (selfp->html_notebook)); - - if (page_num == -1) - return NULL; - - frame = gtk_notebook_get_nth_page(GTK_NOTEBOOK (selfp->html_notebook), page_num); - - return g_object_get_data(G_OBJECT (frame), "html"); -} - -static void -update_tab_title(ChmseeUiChmfile *self, ChmseeIhtml *html) -{ - gchar* html_title; - const gchar* tab_title; - const gchar* book_title; - - html_title = g_strdup(chmsee_ihtml_get_title(html)); - - if (selfp->has_toc) - book_title = booktree_get_selected_book_title(BOOKTREE (selfp->ui_topic)); - else - book_title = ""; - - if (book_title && book_title[0] != '\0' && - html_title && html_title[0] != '\0' && - ncase_compare_utf8_string(book_title, html_title)) - tab_title = g_strdup_printf("%s : %s", book_title, html_title); - else if (book_title && book_title[0] != '\0') - tab_title = g_strdup(book_title); - else if (html_title && html_title[0] != '\0') - tab_title = g_strdup(html_title); - else - tab_title = g_strdup(""); - - tab_set_title(self, html, tab_title); - g_free(html_title); -} - -static void -tab_set_title(ChmseeUiChmfile *self, ChmseeIhtml *html, const gchar *title) -{ - GtkWidget *view; - GtkWidget *page; - GtkWidget *widget, *label; - gint num_pages, i; - - view = chmsee_ihtml_get_widget(html); - - if (title == NULL || title[0] == '\0') - title = _("No Title"); - - num_pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK (selfp->html_notebook)); - - for (i = 0; i < num_pages; i++) { - page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (selfp->html_notebook), i); - - if (gtk_bin_get_child(GTK_BIN (page)) == view) { - widget = gtk_notebook_get_tab_label(GTK_NOTEBOOK (selfp->html_notebook), page); - - label = g_object_get_data(G_OBJECT (widget), "label"); - - if (label != NULL) - gtk_label_set_text(GTK_LABEL (label), title); - - break; - } - } -} - -int chmsee_ui_chmfile_get_hpaned_position(ChmseeUiChmfile* self) { - return gtk_paned_get_position(GTK_PANED(self)); -} - -void chmsee_ui_chmfile_set_hpaned_position(ChmseeUiChmfile* self, int hpaned_position) { - selfp->hpaned_position = hpaned_position; - /* - g_object_set(G_OBJECT(get_widget(self, "hpaned1")), - "position", hpaned_position, - NULL - ); - */ -} - -const gchar* chmsee_ui_chmfile_get_cache_dir(ChmseeUiChmfile* self) { - return selfp->cache_dir; -} - -const gchar* chmsee_ui_chmfile_get_variable_font(ChmseeUiChmfile* self) { - g_return_val_if_fail(selfp->model, NULL); - return chmsee_ichmfile_get_variable_font(selfp->model); -} - -void chmsee_ui_chmfile_set_variable_font(ChmseeUiChmfile* self, const gchar* font_name) { - g_return_if_fail(selfp->model); - chmsee_ichmfile_set_variable_font(selfp->model, font_name); -} - -const gchar* chmsee_ui_chmfile_get_fixed_font(ChmseeUiChmfile* self) { - g_return_val_if_fail(selfp->model, NULL); - return chmsee_ichmfile_get_fixed_font(selfp->model); -} - -void chmsee_ui_chmfile_set_fixed_font(ChmseeUiChmfile* self, const gchar* font_name) { - g_return_if_fail(selfp->model); - chmsee_ichmfile_set_fixed_font(selfp->model, font_name); -} - -int chmsee_ui_chmfile_get_lang(ChmseeUiChmfile* self) { - return selfp->lang; -} -void chmsee_ui_chmfile_set_lang(ChmseeUiChmfile* self, int lang) { - selfp->lang = lang; -} - -gboolean chmsee_ui_chmfile_has_book(ChmseeUiChmfile* self) { - return selfp->model != NULL; -} - -void chmsee_refresh_index(ChmseeUiChmfile* self) { - ChmIndex* chmIndex = NULL; - if(selfp->model) { - chmIndex = chmsee_ichmfile_get_index(selfp->model); - } - chmsee_ui_index_set_model(CHMSEE_UI_INDEX(selfp->ui_index), chmIndex); - if(chmIndex != NULL) { - g_debug("chmIndex != NULL"); - gtk_widget_show(selfp->index_page); - } else { - g_debug("chmIndex == NULL"); - gtk_widget_hide(selfp->index_page); - } -} - -static GtkWidget* chmsee_new_index_page(ChmseeUiChmfile* self) { - GtkWidget* booktree_sw = gtk_scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (booktree_sw), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW (booktree_sw), - GTK_SHADOW_IN); - gtk_container_set_border_width(GTK_CONTAINER (booktree_sw), 2); - - GtkWidget* uiIndex = chmsee_ui_index_new(NULL); - gtk_container_add(GTK_CONTAINER (booktree_sw), uiIndex); - g_signal_connect_swapped(uiIndex, - "link-selected", - G_CALLBACK (on_ui_index_link_selected), - self); - - selfp->index_page = booktree_sw; - selfp->ui_index = uiIndex; - return GTK_WIDGET(booktree_sw); -} - -void on_ui_index_link_selected(ChmseeUiChmfile* self, Link* link) { - on_booktree_link_selected(NULL, link, self); -} - - -gboolean chmsee_ui_chmfile_jump_index_by_name(ChmseeUiChmfile* self, const gchar* name) { - g_return_val_if_fail(CHMSEE_IS_UI_CHMFILE(self), FALSE); - - gboolean res = chmsee_ui_index_select_link_by_name( - CHMSEE_UI_INDEX(self->priv->ui_index), - name); - - if(res) { - /* TODO: hard-code page num 1 */ - gtk_notebook_set_current_page(GTK_NOTEBOOK(self->priv->control_notebook), 1); - } - return res; -} - -static void chmsee_set_context_menu_link(ChmseeUiChmfile* self, const gchar* link) { - g_free(selfp->context_menu_link); - selfp->context_menu_link = g_strdup(link); -} - -GtkWidget* chmsee_ui_chmfile_new() { - return GTK_WIDGET(g_object_new(CHMSEE_TYPE_UI_CHMFILE, NULL)); -} - -void chmsee_ui_chmfile_set_property(GObject* object, - guint property_id, - const GValue* value, - GParamSpec* pspec) -{ - ChmseeUiChmfile* self = CHMSEE_UI_CHMFILE(object); - - switch(property_id) { - case PROP_SIDEPANE_VISIBLE: - if(g_value_get_boolean(value)) { - gtk_widget_show(gtk_paned_get_child1(GTK_PANED(self))); - } else { - gtk_widget_hide(gtk_paned_get_child1(GTK_PANED(self))); - } - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} -void chmsee_ui_chmfile_get_property(GObject* object, - guint property_id, - GValue* value, - GParamSpec* pspec) -{ - ChmseeUiChmfile* self = CHMSEE_UI_CHMFILE(object); - - switch(property_id) { - case PROP_SIDEPANE_VISIBLE: - g_value_set_boolean(value, GTK_WIDGET_VISIBLE(gtk_paned_get_child1(GTK_PANED(self)))); - break; - case PROP_LINK_MESSAGE: - g_value_set_string(value, selfp->link_message); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} diff -Nru chmsee-1.0.7/src/ui_chmfile.h chmsee-1.3.0/src/ui_chmfile.h --- chmsee-1.0.7/src/ui_chmfile.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ui_chmfile.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2006 Ji YongGang - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -/*************************************************************************** - * Copyright (C) 2003 by zhong * - * zhongz@163.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - ***************************************************************************/ - -#ifndef __CHMSEE_UI_CHMFILE_H__ -#define __CHMSEE_UI_CHMFILE_H__ - -#include -#include -#include - -#include "models/ichmfile.h" -#include "ihtml.h" - -G_BEGIN_DECLS - -typedef struct _ChmseeUiChmfile ChmseeUiChmfile; -typedef struct _ChmseeUiChmfilePrivate ChmseeUiChmfilePrivate; -typedef struct _ChmseeUiChmfileClass ChmseeUiChmfileClass; - -#define CHMSEE_TYPE_UI_CHMFILE \ - (chmsee_ui_chmfile_get_type ()) -#define CHMSEE_UI_CHMFILE(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), CHMSEE_TYPE_UI_CHMFILE, ChmseeUiChmfile)) -#define CHMSEE_IS_UI_CHMFILE(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), CHMSEE_TYPE_UI_CHMFILE)) - - -struct _ChmseeUiChmfile { - GtkHPaned parent; - ChmseeUiChmfilePrivate* priv; -}; - -struct _ChmseeUiChmfileClass { - GtkHPanedClass parent_class; -}; - -GType chmsee_ui_chmfile_get_type(void); -GtkWidget* chmsee_ui_chmfile_new(void); -void chmsee_ui_chmfile_set_model(ChmseeUiChmfile* self, ChmseeIchmfile* model); -ChmseeIhtml* chmsee_ui_chmfile_get_active_html(ChmseeUiChmfile* self); -gboolean chmsee_ui_chmfile_jump_index_by_name(ChmseeUiChmfile* self, const gchar* name); -void chmsee_ui_chmfile_new_tab(ChmseeUiChmfile *self, const gchar *location); -void chmsee_ui_chmfile_close_current_tab(ChmseeUiChmfile* self); - -G_END_DECLS - -#endif /* !__CHMSEE_UI_CHMFILE_H__ */ diff -Nru chmsee-1.0.7/src/ui_index.c chmsee-1.3.0/src/ui_index.c --- chmsee-1.0.7/src/ui_index.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ui_index.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "ui_index.h" -#include "config.h" - -#include "booktree.h" -#include "models/link.h" - -#define selfp (self->priv) - -/* Signals */ -enum { - LINK_SELECTED, - LAST_SIGNAL -}; - -static gint signals[LAST_SIGNAL] = { 0 }; - -struct _ChmseeUiIndexPrivate { - ChmIndex* chmIndex; -}; - -#define CHMSEE_UI_INDEX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHMSEE_TYPE_UI_INDEX, ChmseeUiIndexPrivate)) - -G_DEFINE_TYPE(ChmseeUiIndex, chmsee_ui_index, GTK_TYPE_VIEWPORT); - -static void chmsee_ui_index_dispose(GObject* object); -static void chmsee_ui_index_finalize(GObject* object); -static void chmsee_ui_index_on_link_selected(ChmseeUiIndex* self, Link* link); - -static void -chmsee_ui_index_class_init(ChmseeUiIndexClass* klass) { - g_type_class_add_private(klass, sizeof(ChmseeUiIndexPrivate)); - G_OBJECT_CLASS(klass)->dispose = chmsee_ui_index_dispose; - G_OBJECT_CLASS(klass)->finalize = chmsee_ui_index_finalize; - - signals[LINK_SELECTED] = - g_signal_new ("link_selected", - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (ChmseeUiIndexClass, link_selected), - NULL, - NULL, - g_cclosure_marshal_VOID__POINTER, - G_TYPE_NONE, - 1, - G_TYPE_POINTER); -} - -static void -chmsee_ui_index_init(ChmseeUiIndex* self) { - self->priv = CHMSEE_UI_INDEX_GET_PRIVATE(self); - selfp->chmIndex = NULL; - GtkWidget* widget = booktree_new(NULL); - gtk_container_add(GTK_CONTAINER(self), - widget); - g_signal_connect_swapped(widget, - "link_selected", - G_CALLBACK(chmsee_ui_index_on_link_selected), - self); -} - -GtkWidget* chmsee_ui_index_new(ChmIndex* chmIndex) { - ChmseeUiIndex* self = CHMSEE_UI_INDEX(g_object_new(CHMSEE_TYPE_UI_INDEX, NULL)); - chmsee_ui_index_set_model(self, chmIndex); - return GTK_WIDGET(self); -} - -static void chmsee_ui_index_dispose(GObject* object) { - ChmseeUiIndex* self = CHMSEE_UI_INDEX(object); - if(selfp->chmIndex) { - g_object_unref(selfp->chmIndex); - selfp->chmIndex = NULL; - } - G_OBJECT_CLASS(chmsee_ui_index_parent_class)->dispose(object); -} - -static void chmsee_ui_index_finalize(GObject* object) { - G_OBJECT_CLASS(chmsee_ui_index_parent_class)->finalize(object); -} - -void chmsee_ui_index_set_model(ChmseeUiIndex* self, ChmIndex* chmIndex) { - if(selfp->chmIndex) { - g_object_unref(selfp->chmIndex); - selfp->chmIndex = NULL; - } - - if(chmIndex != NULL) { - selfp->chmIndex = g_object_ref(chmIndex); - } - - chmsee_ui_index_refresh(self); -} - - -void chmsee_ui_index_refresh(ChmseeUiIndex* self) { - GNode* node = NULL; - - if(selfp->chmIndex != NULL) { - node = chmindex_get_data(selfp->chmIndex); - } - - booktree_set_model(BOOKTREE(gtk_bin_get_child(GTK_BIN(self))), - node); -} - -void chmsee_ui_index_on_link_selected(ChmseeUiIndex* self, Link* link) { - g_signal_emit(self, signals[LINK_SELECTED], 0, link); -} - -gboolean chmsee_ui_index_select_link_by_name(ChmseeUiIndex* self, const gchar* name) { - GtkWidget* child = gtk_bin_get_child(GTK_BIN(self)); - if(!IS_BOOKTREE(child)) { - return FALSE; - } - - return booktree_select_link_by_name(BOOKTREE(child), name); -} diff -Nru chmsee-1.0.7/src/ui_index.h chmsee-1.3.0/src/ui_index.h --- chmsee-1.0.7/src/ui_index.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/ui_index.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef _CHMSEE_UI_INDEX_H_ -#define _CHMSEE_UI_INDEX_H_ - -#include - -#include "models/chmindex.h" -#include "models/link.h" - -#define CHMSEE_TYPE_UI_INDEX (chmsee_ui_index_get_type()) -#define CHMSEE_UI_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CHMSEE_TYPE_UI_INDEX, ChmseeUiIndex)) -#define CHMSEE_IS_UI_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPR((obj), CHMSEE_TYPE_UI_INDEX)) - -typedef struct _ChmseeUiIndex ChmseeUiIndex; -typedef struct _ChmseeUiIndexClass ChmseeUiIndexClass; -typedef struct _ChmseeUiIndexPrivate ChmseeUiIndexPrivate; - -struct _ChmseeUiIndex { - GtkViewport parent_instance; - ChmseeUiIndexPrivate* priv; -}; - -struct _ChmseeUiIndexClass { - GtkViewportClass parent_class; - /* Signals */ - void (*link_selected) (ChmseeUiIndex* self, Link *link); -}; - -GType chmsee_ui_index_get_type(void); -GtkWidget* chmsee_ui_index_new(ChmIndex* chmIndex); -void chmsee_ui_index_set_model(ChmseeUiIndex* self, ChmIndex* chmIndex); -void chmsee_ui_index_refresh(ChmseeUiIndex* self); - -/** - * @return true if successful. else return false. - */ -gboolean chmsee_ui_index_select_link_by_name(ChmseeUiIndex* self, const gchar* name); - - -#endif /* UI_INDEX_H_ */ diff -Nru chmsee-1.0.7/src/utils/utils.c chmsee-1.3.0/src/utils/utils.c --- chmsee-1.0.7/src/utils/utils.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/utils/utils.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,627 +0,0 @@ -/* - * Copyright (C) 2006 Ji YongGang - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" -#include "utils.h" - -#include -#include -#include - -#include /* R_OK */ - -#include - -static gchar * -strip_string(gchar *str); -static gint -parse_config_line(gchar *iline, gchar *id, gchar *value); -static gchar * -escape_parse(gchar *str); - - -#define MAXLINE 1024 - -gchar * -convert_filename_to_utf8(const gchar *filename, const gchar *codeset) -{ - gchar * filename_utf8; - - if (g_utf8_validate(filename, -1, NULL)) { - filename_utf8 = g_strdup(filename); - } else { - g_debug("Convert filename to UTF8."); - filename_utf8 = g_filename_to_utf8(filename, -1, NULL, NULL, NULL); - - if (filename_utf8 == NULL) - filename_utf8 = g_convert(filename, -1, "UTF-8", - codeset, - NULL, NULL, NULL); - } - - return filename_utf8; -} - -gchar * -convert_string_to_utf8(const gchar *string, const gchar *codeset) -{ - gchar * string_utf8; - - if (g_utf8_validate(string, -1, NULL)) { - g_debug("string is utf8"); - string_utf8 = g_strdup(string); - } else { - g_debug("string is not utf8"); - string_utf8 = g_convert(string, -1, "UTF-8", - codeset, - NULL, NULL, NULL); - } - - return string_utf8; -} - -gint -ncase_compare_utf8_string(const gchar *str1, const gchar *str2) -{ - gint result; - gchar *ncase_str1, *ncase_str2; - gchar *normalized_str1, *normalized_str2; - - ncase_str1 = g_utf8_casefold(str1, -1); - ncase_str2 = g_utf8_casefold(str2, -1); - - normalized_str1 = g_utf8_normalize(ncase_str1, -1, G_NORMALIZE_DEFAULT); - normalized_str2 = g_utf8_normalize(ncase_str2, -1, G_NORMALIZE_DEFAULT); - - result = g_utf8_collate(normalized_str1, normalized_str2); - - g_free(ncase_str1); - g_free(ncase_str2); - g_free(normalized_str1); - g_free(normalized_str2); - - return result; -} - -gchar * -file_exist_ncase(const gchar *path) -{ - gchar *ch; - gchar *dirname; - gchar *filename; - gchar *found; - - GDir *dir; - - ch = g_strrstr(path, "/"); - dirname = g_strndup(path, ch - path); - filename = g_strdup(ch + 1); - - g_debug("dirname = %s", dirname); - g_debug("filename = %s", filename); - - dir = g_dir_open(dirname, 0, NULL); - - if (dir) { - const gchar *entry; - - while ((entry = g_dir_read_name(dir))) { - g_debug("entry = %s", entry); - if (!g_ascii_strcasecmp(filename, entry)) { - g_debug("found case insensitive file: %s", entry); - found = g_strdup_printf("%s/%s", dirname, entry); - g_dir_close(dir); - - return found; - } - } - } - - return NULL; -} - -char * -url_decode(const char *encoded) -{ - const char *at = encoded; - int length = 0; - char *rv; - char *out; - - while (*at != '\0') { - if (*at == '%') { - if (at[1] == '\0' || at[2] == '\0') { - g_warning ("malformed URL encoded string"); - return NULL; - } - at += 3; - length++; - } else { - at++; - length++; - } - } - - rv = g_new (char, length + 1); - out = rv; - at = encoded; - - while (*at != '\0') { - if (*at == '%') { - char hex[3]; - hex[0] = at[1]; - hex[1] = at[2]; - hex[2] = '\0'; - if (at[1] == '\0' || at[2] == '\0') - return NULL; - at += 3; - *out++ = (char) strtol (hex, NULL, 16); - } else { - *out++ = *at++; - length++; - } - } - - *out = '\0'; - return rv; -} - -void -command_delete_tmpdir(const gchar *s_path) -{ - char *argv[4]; - - g_return_if_fail(g_file_test(s_path, G_FILE_TEST_EXISTS)); - - argv[0] = "rm"; - argv[1] = "-rf"; - argv[2] = s_path; - argv[3] = NULL; - - g_spawn_async(g_get_tmp_dir(), argv, NULL, - G_SPAWN_SEARCH_PATH, - NULL, NULL, NULL, - NULL); -} - -gchar * -get_real_uri(const gchar *uri) -{ - gchar *real_uri; - gchar *p; - - p = g_strrstr(uri, "#"); - - if (p) - real_uri = g_strndup(uri, p - uri); - else - real_uri = g_strdup(uri); - - return real_uri; -} - -char* correct_filename(const gchar* fname) { - if(g_access(fname, R_OK) == 0) { - return g_strdup(fname); - } - - gchar* oldpath = g_path_get_dirname(fname); - gchar* newpath = correct_filename(oldpath); - - gchar* basename = g_path_get_basename(fname); - gchar* res = NULL; - - if(newpath) { - GDir* dir = g_dir_open(newpath, 0, NULL); - if(dir) { - while(1) { - const gchar* newfname = g_dir_read_name(dir); - if(!newfname) break; - if(g_ascii_strcasecmp(basename, newfname) == 0) { - res = g_strdup_printf("%s/%s", newpath, newfname); - break; - } - } - g_dir_close(dir); - } - } - free(basename); - free(newpath); - free(oldpath); - - return res; -} - -GList * -parse_config_file(const gchar *info, const gchar *file) -{ - FILE *fd; - GList *pairs = NULL; - gchar line[MAXLINE]; - gchar id[MAXLINE]; - gchar value[MAXLINE]; - - if ((fd = fopen(file, "r")) == NULL) { - g_debug("Failed to open ChmSee %s.\n", info); - return NULL; - } - - while (fgets(line, MAXLINE, fd)) { - /* Skip empty or hashed lines */ - strip_string(line); - - if (*line == '#' || *line == '\0') - continue; - - /* Parse lines */ - if (parse_config_line(line, id, value)) { - g_print("Syntax error in %s config file\n", info); - } - - Item *item = g_new(Item, 1); - item->id = g_strdup(id); - item->value = g_strdup(value); - - pairs = g_list_prepend(pairs, item); - } - - fclose(fd); - - return pairs; -} - -static gchar * -strip_string(gchar *str) -{ - gint i,j; - gint c1; - - if (str == NULL) - return NULL; - - /* count how many leading chars to be whitespace */ - for (i = 0; i < strlen(str); i++) { - if (str[i] != ' ' && str[i] != '\t' && str[i] != '\r') - break; - } - - /* count how many trailing chars to be whitespace */ - for (j = strlen(str)-1; j >= 0; j--) { - if (str[j] != ' ' && str[j] != '\t' && str[j] != '\n') - break; - } - - /* string contains only whitespace? */ - if (j < i) { - str[0] = '\0'; - - return str; - } - - /* now move the chars to the front */ - for (c1 = i; c1 <= j; c1++) - str[c1-i] = str[c1]; - - str[j+1-i] = '\0'; - - return str; -} -static gint -parse_config_line(gchar *iline, gchar *id, gchar *value) -{ - gchar *p,*p2; - gchar line[1024]; - gchar tmp[1024]; - - strcpy(line, iline); - strcpy(id, ""); - p = strtok(line, "="); - - if (p != NULL) { - strcpy(id, p); /* got id */ - strip_string(id); - } else - return 1; - - strcpy(tmp, ""); - p = strtok(NULL, ""); - - if (p != NULL) { - strcpy(tmp, p); /* string after = */ - strip_string(tmp); - } else - return 1; - - /* Now strip quotes from string */ - p = tmp; - if (*p == '\"') - p2 = p+1; - else - p2 = p; - - if (p[strlen(p)-1] == '\"') - p[strlen(p)-1] = '\0'; - - strcpy(value, p2); - - /* Now reconvert escape-chars */ - escape_parse(value); - - /* All OK */ - return 0; -} -/* Parse escape-chars in string -> e.g. translate \n to newline */ -static gchar * -escape_parse(gchar *str) -{ - gchar tmp[MAXLINE]; - gchar c; - gint i, j; - - if (str == NULL) - return NULL; - - j = 0; - - for(i = 0; i < strlen(str); i++) { - c = str[i]; - if (c == '\\') { - i++; - switch (str[i]) { - - case 'n': - c = '\n'; - break; - - case 't': - c = '\t'; - break; - - case 'b': - c = '\b'; - break; - - default: - c = str[i]; - } - } - - tmp[j] = c; - j++; - } - - tmp[j] = '\0'; - - strcpy(str, tmp); - - return(str); -} - -void free_config_list(GList *pairs) -{ - GList *list; - - for (list = pairs; list; list = list->next) { - Item *item = list->data; - - g_free(item->id); - g_free(item->value); - } - - g_list_free(pairs); -} - -void -save_option(FILE* ofile, const gchar *id, const gchar *value) -{ - fprintf(ofile, "%s=%s\n", id, value); -} - -const char * -get_encoding_by_lcid(guint32 lcid) -{ - switch(lcid) { - case 0x0436: - case 0x042d: - case 0x0403: - case 0x0406: - case 0x0413: - case 0x0813: - case 0x0409: - case 0x0809: - case 0x0c09: - case 0x1009: - case 0x1409: - case 0x1809: - case 0x1c09: - case 0x2009: - case 0x2409: - case 0x2809: - case 0x2c09: - case 0x3009: - case 0x3409: - case 0x0438: - case 0x040b: - case 0x040c: - case 0x080c: - case 0x0c0c: - case 0x100c: - case 0x140c: - case 0x180c: - case 0x0407: - case 0x0807: - case 0x0c07: - case 0x1007: - case 0x1407: - case 0x040f: - case 0x0421: - case 0x0410: - case 0x0810: - case 0x043e: - case 0x0414: - case 0x0814: - case 0x0416: - case 0x0816: - case 0x040a: - case 0x080a: - case 0x0c0a: - case 0x100a: - case 0x140a: - case 0x180a: - case 0x1c0a: - case 0x200a: - case 0x240a: - case 0x280a: - case 0x2c0a: - case 0x300a: - case 0x340a: - case 0x380a: - case 0x3c0a: - case 0x400a: - case 0x440a: - case 0x480a: - case 0x4c0a: - case 0x500a: - case 0x0441: - case 0x041d: - case 0x081d: - return "ISO-8859-1"; - break; - case 0x041c: - case 0x041a: - case 0x0405: - case 0x040e: - case 0x0418: - case 0x081a: - case 0x041b: - case 0x0424: - return "ISO-8859-2"; - break; - case 0x0c01: - return "WINDOWS-1256"; - case 0x0401: - case 0x0801: - case 0x1001: - case 0x1401: - case 0x1801: - case 0x1c01: - case 0x2001: - case 0x2401: - case 0x2801: - case 0x2c01: - case 0x3001: - case 0x3401: - case 0x3801: - case 0x3c01: - case 0x4001: - case 0x0429: - case 0x0420: - return "ISO-8859-6"; - break; - case 0x0408: - return "ISO-8859-7"; - break; - case 0x040d: - return "ISO-8859-8"; - break; - case 0x042c: - case 0x041f: - case 0x0443: - return "ISO-8859-9"; - break; - case 0x041e: - return "ISO-8859-11"; - break; - case 0x0425: - case 0x0426: - case 0x0427: - return "ISO-8859-13"; - break; - case 0x0411: - return "cp932"; - break; - case 0x0804: - case 0x1004: - return "cp936"; - break; - case 0x0412: - return "cp949"; - break; - case 0x0404: - case 0x0c04: - case 0x1404: - return "cp950"; - break; - case 0x082c: - case 0x0423: - case 0x0402: - case 0x043f: - case 0x042f: - case 0x0419: - case 0x0c1a: - case 0x0444: - case 0x0422: - case 0x0843: - return "cp1251"; - break; - default: - return ""; - break; - } -} - -static gchar* data_dir = NULL; - -static void init_data_dir() { - data_dir = g_strdup(CHMSEE_DATA_DIR_DEFAULT); -} - -const gchar* get_data_dir() { - if(data_dir == NULL) { - init_data_dir(); - } - return data_dir; -} - - -const gchar* get_resource_path(const gchar* resouce_name) { - gchar* filename = g_build_filename(get_data_dir(), resouce_name, NULL); - const gchar* res = g_intern_string(filename); - g_free(filename); - return res; -} - -void set_data_dir(const gchar* new_data_dir) { - if(data_dir != NULL) { - g_free(data_dir); - } - data_dir = g_strdup(new_data_dir); -} - -const gchar* get_attr(const gchar** attrs, const gchar* key) { - while(*attrs) { - if(g_ascii_strcasecmp(*attrs, key) == 0) { - return *(attrs+1); - } - attrs += 2; - } - return NULL; -} - diff -Nru chmsee-1.0.7/src/utils/utils.h chmsee-1.3.0/src/utils/utils.h --- chmsee-1.0.7/src/utils/utils.h 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/src/utils/utils.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2009 LI Daobing - * - * ChmSee is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - - * ChmSee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with ChmSee; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __CHMSEE_UTILS_UTILS_H__ -#define __CHMSEE_UTILS_UTILS_H__ - -#include -#include - -G_BEGIN_DECLS - -#ifdef ENABLE_NLS -# include -# undef _ -# define _(String) dgettext (PACKAGE, String) -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) -# define _(String) (String) -# define N_(String) (String) -#endif - -gchar *convert_filename_to_utf8(const gchar *, const gchar *); -gchar *convert_string_to_utf8(const gchar *, const gchar *); -gint ncase_compare_utf8_string(const gchar *, const gchar *); -gchar *file_exist_ncase(const gchar *); -char *url_decode(const char*); -void command_delete_tmpdir(const gchar *); -gchar *get_real_uri(const gchar *); - -/** - * return the correct filename - * - * @param fname the original filename - * - * @return NULL if failed. - * - * @return char* if new file name, The string returned is new and it's - * the caller's responsibility to free the string. - */ -char* correct_filename(const gchar* fname); - - -/** - * read config file. - * - * @param info config file title, only used in print error info. - * @param file config file name. - * - * @return a GList with Item in it. - */ -GList* parse_config_file(const gchar *info, const gchar *file); - -/** - * free the GList* generated by parse_config_file - * - * @param config the GList* generated by parse_config_file - */ -void free_config_list(GList *config); - -/** - * save a id, value pair in a FILE, readable by parse_config_file - * - * @param ofile output file - * @param id the id string (also known as "key") - * @param value the value string - */ -void save_option(FILE* ofile, const gchar *id, const gchar *value); - -typedef struct { - gchar *id; - gchar *value; -} Item; - -const gchar* get_encoding_by_lcid(guint32 lcid); - -const gchar* get_data_dir(); -#define CHMSEE_DATA_DIR get_data_dir() - -void set_data_dir(const gchar* datadir); - -const gchar* get_resource_path(const gchar* resouce_name); - -/** - * a helper function for SAX, get attr value by the key - */ -const gchar* get_attr(const gchar** attrs, const gchar* key); - -G_END_DECLS - -#endif diff -Nru chmsee-1.0.7/src/utils.c chmsee-1.3.0/src/utils.c --- chmsee-1.0.7/src/utils.c 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/utils.c 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,231 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include +#include + +#include "utils.h" + +gchar * +convert_filename_to_utf8(const gchar *filename, const gchar *codeset) +{ + gchar * filename_utf8; + + g_debug("UTILS >>> Convert filename to UTF8."); + + if (g_utf8_validate(filename, -1, NULL)) { + filename_utf8 = g_strdup(filename); + } else { + filename_utf8 = g_filename_to_utf8(filename, -1, NULL, NULL, NULL); + + if (filename_utf8 == NULL) + filename_utf8 = g_convert(filename, -1, "UTF-8", + codeset, + NULL, NULL, NULL); + } + + return filename_utf8; +} + +gchar * +convert_string_to_utf8(const gchar *string, const gchar *codeset) +{ + gchar * string_utf8; + + g_debug("UTILS >>> Convert string to UTF8."); + if (g_utf8_validate(string, -1, NULL)) { + g_debug("UTILS >>> string is utf8"); + string_utf8 = g_strdup(string); + } else { + g_debug("UTILS >>> string is not utf8"); + string_utf8 = g_convert(string, -1, "UTF-8", + codeset, + NULL, NULL, NULL); + } + + return string_utf8; +} + +gint +ncase_compare_utf8_string(const gchar *str1, const gchar *str2) +{ + gint result; + gchar *ncase_str1, *ncase_str2; + gchar *normalized_str1, *normalized_str2; + + ncase_str1 = g_utf8_casefold(str1, -1); + ncase_str2 = g_utf8_casefold(str2, -1); + + normalized_str1 = g_utf8_normalize(ncase_str1, -1, G_NORMALIZE_DEFAULT); + normalized_str2 = g_utf8_normalize(ncase_str2, -1, G_NORMALIZE_DEFAULT); + + result = g_utf8_collate(normalized_str1, normalized_str2); + + g_free(ncase_str1); + g_free(ncase_str2); + g_free(normalized_str1); + g_free(normalized_str2); + + return result; +} + +char * +uri_decode(const char *encoded) +{ + const char *at = encoded; + int length = 0; + char *rv; + char *out; + + while (*at != '\0') { + if (*at == '%') { + if (at[1] == '\0' || at[2] == '\0') { + g_warning ("malformed URL encoded string"); + return NULL; + } + at += 3; + length++; + } else { + at++; + length++; + } + } + + rv = g_new(char, length + 1); + out = rv; + at = encoded; + + while (*at != '\0') { + if (*at == '%') { + char hex[3]; + hex[0] = at[1]; + hex[1] = at[2]; + hex[2] = '\0'; + if (at[1] == '\0' || at[2] == '\0') + return NULL; + at += 3; + *out++ = (char) strtol(hex, NULL, 16); + } else { + *out++ = *at++; + length++; + } + } + + *out = '\0'; + return rv; +} + +/* Remove '#', ';' fragment in uri */ +gchar * +get_real_uri(const gchar *uri) +{ + gchar *real_uri; + gchar *p = NULL; + + p = g_strrstr(uri, "#"); + real_uri = p ? g_strndup(uri, p - uri) : g_strdup(uri); + + p = g_strrstr(real_uri, ";"); + + if (p != NULL) { + g_free(real_uri); + real_uri = g_strndup(real_uri, p - real_uri); + } + + return real_uri; +} + +void +convert_old_config_file(const gchar *path, const gchar *groupname) +{ + FILE *fd_old, *fd_new; + + gchar *dir = g_path_get_dirname(path); + gchar *new_conf = g_build_filename(dir, "config.new", NULL); + + if ((fd_old = fopen(path, "r")) && (fd_new = fopen(new_conf, "w"))) { + fputs(groupname, fd_new); + + gchar line[MAXLINE]; + while (fgets(line, MAXLINE, fd_old)) { + fputs(line, fd_new); + } + fclose(fd_old); + fclose(fd_new); + + rename(new_conf, path); + } + + g_free(dir); + g_free(new_conf); +} + +gchar * +file_exist_ncase(const gchar *path) +{ + if (g_file_test(path, G_FILE_TEST_EXISTS)) { + g_debug("UTILS >>> file_exist_ncase found path: %s", path); + return g_strdup(path); + } + + gchar *old_dir = g_path_get_dirname(path); + gchar *dirname = file_exist_ncase(old_dir); + if (dirname == NULL) { + g_free(old_dir); + return NULL; + } + + /* check new dirname with basename */ + gchar *filename = g_path_get_basename(path); + gchar *newfile = g_strdup_printf("%s/%s", dirname, filename); + if (g_file_test(newfile, G_FILE_TEST_EXISTS)) { + g_debug("UTILS >>> file_exist_ncase found newfile: %s", newfile); + g_free(old_dir); + g_free(dirname); + g_free(filename); + return newfile; + } + + gchar *found = NULL; + GDir *dir = g_dir_open(dirname, 0, NULL); + if (dir != NULL) { + const gchar *entry; + + while ((entry = g_dir_read_name(dir))) { + if (!g_ascii_strcasecmp(filename, entry)) { + g_debug("UTILS >>> found case insensitive file: %s", entry); + found = g_strdup_printf("%s/%s", dirname, entry); + g_dir_close(dir); + + break; + } + } + } + + g_free(old_dir); + g_free(dirname); + g_free(filename); + + g_debug("UTILS >>> return found file: %s", found); + return found; +} diff -Nru chmsee-1.0.7/src/utils.h chmsee-1.3.0/src/utils.h --- chmsee-1.0.7/src/utils.h 1970-01-01 00:00:00.000000000 +0000 +++ chmsee-1.3.0/src/utils.h 2011-01-16 13:48:42.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2010 Ji YongGang + * Copyright (C) 2009 LI Daobing + * + * ChmSee is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + + * ChmSee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with ChmSee; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __CS_UTILS_H__ +#define __CS_UTILS_H__ + +#include +#include + +G_BEGIN_DECLS + +#ifdef ENABLE_NLS +# include +# undef _ +# define _(String) dgettext (PACKAGE, String) +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif + +#define RESOURCE_FILE(file) (CHMSEE_DATA_DIR G_DIR_SEPARATOR_S file) +#define BUILDER_WIDGET(builder, widget) (GTK_WIDGET (gtk_builder_get_object(builder, widget))) + +gchar *convert_filename_to_utf8(const gchar *, const gchar *); +gchar *convert_string_to_utf8(const gchar *, const gchar *); +gchar *get_real_uri(const gchar *); +char *uri_decode(const char*); +gint ncase_compare_utf8_string(const gchar *, const gchar *); +void convert_old_config_file(const gchar *, const gchar *); +gchar *file_exist_ncase(const gchar *); + +G_END_DECLS + +#endif /* !__CS_UTILS_H__ */ diff -Nru chmsee-1.0.7/test/chmindex.hhk chmsee-1.3.0/test/chmindex.hhk --- chmsee-1.0.7/test/chmindex.hhk 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/test/chmindex.hhk 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - - - - -
    -
  • - - - -
  • - - - - -
- - diff -Nru chmsee-1.0.7/test/CMakeLists.txt chmsee-1.3.0/test/CMakeLists.txt --- chmsee-1.0.7/test/CMakeLists.txt 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/test/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -include_directories( - ${CHMSEE_INCLUDE_DIRS} - ${CMAKE_SOURCE_DIR}/src - ) -link_directories( - ${CHMSEE_LIBRARY_DIRS} - ) - -add_executable(test EXCLUDE_FROM_ALL - test.c) - -target_link_libraries(test - ${CHMSEE_LIBRARIES} - chmseelib - ) - \ No newline at end of file diff -Nru chmsee-1.0.7/test/test.c chmsee-1.3.0/test/test.c --- chmsee-1.0.7/test/test.c 2009-09-14 13:51:03.000000000 +0000 +++ chmsee-1.3.0/test/test.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#include -#include "utils/utils.h" -#include "models/link.h" -#include "models/chmindex.h" - -void test_issue_19() { - g_test_bug("19"); - g_assert_cmpstr("WINDOWS-1256", ==, get_encoding_by_lcid(0xc01)); -} - -void test_chmindex() { - ChmIndex* chmIndex = chmindex_new("test/chmindex.hhk", "UTF-8"); - GList* data = chmindex_get_data(chmIndex); - g_assert_cmpint(3, ==, g_list_length(data)); - g_assert_cmpstr("a", ==, ((Link*)data->data)->name); - g_assert_cmpstr("a1", ==, ((Link*)data->data)->uri); - - data = data->next; - g_assert_cmpstr("a", ==, ((Link*)data->data)->name); - g_assert_cmpstr("a2", ==, ((Link*)data->data)->uri); - - data = data->next; - g_assert_cmpstr("b", ==, ((Link*)data->data)->name); - g_assert_cmpstr("a1", ==, ((Link*)data->data)->uri); -} - - -int main(int argc, char* argv[]) { - gtk_init(&argc, &argv); - g_test_init(&argc, &argv, NULL); - g_test_bug_base("http://code.google.com/p/chmsee/issues/detail?id="); - g_test_add_func("/chmsee/19", test_issue_19); - g_test_add_func("/chmsee/chmindex", test_chmindex); - g_test_run(); - return 0; -}