Skip to content

Commit

Permalink
Merge branch 'master' into filemon_and_trees
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoblomj authored Nov 3, 2020
2 parents 449c96b + 9160eaa commit 95988c8
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 80 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ compile
libtool
*.desktop
.deps
.idea
builddir/

viewnior-*.tar.gz
*.sublime-project
Expand Down
62 changes: 32 additions & 30 deletions po/zh_TW.po
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Chinese (Traditional) translation for viewnior
# Copyright (c) 2016 Rosetta Contributors and Canonical Ltd 2016
# This file is distributed under the same license as the viewnior package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2016.
# Hsiu-Ming Chang <[email protected]>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: viewnior\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-02-07 22:04+0200\n"
"PO-Revision-Date: 2016-10-16 06:12+0000\n"
"PO-Revision-Date: 2018-11-12 22:37+0800\n"
"Last-Translator: Hsiu-Ming Chang <[email protected]>\n"
"Language-Team: Chinese (Traditional) <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Launchpad-Export-Date: 2018-03-04 17:52+0000\n"
"X-Generator: Launchpad (build 18566)\n"
"X-Generator: Poedit 2.2\n"
"Language: zh_TW\n"

#: ../data/viewnior.desktop.in.in.h:1
msgid "Viewnior"
Expand All @@ -32,15 +33,15 @@ msgstr "Viewnior 偏好設定"

#: ../data/vnr-preferences-dialog.ui.h:2
msgid "Open new image in: "
msgstr ""
msgstr "開啟新的圖片使用:"

#: ../data/vnr-preferences-dialog.ui.h:3
msgid "Desktop: "
msgstr "桌面: "

#: ../data/vnr-preferences-dialog.ui.h:4
msgid "Smooth images when zoomed"
msgstr ""
msgstr "縮放圖片時平滑處理"

#: ../data/vnr-preferences-dialog.ui.h:5
msgid "Confirm image deletion"
Expand All @@ -56,7 +57,7 @@ msgstr "一般"

#: ../data/vnr-preferences-dialog.ui.h:8
msgid "Show next image after (in seconds): "
msgstr ""
msgstr "在幾秒後顯示下一張圖片:"

#: ../data/vnr-preferences-dialog.ui.h:9
msgid "Always expand images to fit screen"
Expand Down Expand Up @@ -84,14 +85,17 @@ msgid ""
" Clicking on the left half of the window shows the\n"
" previous image and on the right side - the next.</small> "
msgstr ""
"<small> (!) 透過按兩下來瀏覽圖片:\n"
" 在視窗的左半邊按兩下來瀏覽上一張圖片,\n"
" 在視窗的右半邊按兩下來瀏覽下一張圖片。</small> "

#: ../data/vnr-preferences-dialog.ui.h:17
msgid "Behavior"
msgstr "行為"

#: ../data/vnr-preferences-dialog.ui.h:18
msgid "Reload image on save"
msgstr "儲存圖片後重新讀取"
msgstr "儲存圖片後重新載入"

#: ../data/vnr-preferences-dialog.ui.h:19
msgid "JPEG quality:"
Expand Down Expand Up @@ -132,11 +136,11 @@ msgstr "裁剪"
#: ../src/main.c:117 ../src/vnr-window.c:1620 ../src/vnr-window.c:1975
#: ../src/vnr-window.c:2414
msgid "The given locations contain no images."
msgstr "提供的位置並未包含圖片。"
msgstr "指定的位置並未包含圖片。"

#: ../src/uni-scroll-win.c:223
msgid "Open the navigator window"
msgstr ""
msgstr "開啟導覽器視窗"

#: ../src/vnr-file.c:223
#, c-format
Expand Down Expand Up @@ -165,7 +169,7 @@ msgstr "上次使用的模式"

#: ../src/vnr-prefs.c:292 ../src/vnr-prefs.c:304
msgid "Navigate images"
msgstr ""
msgstr "瀏覽圖片"

#: ../src/vnr-prefs.c:293
msgid "Zoom image"
Expand Down Expand Up @@ -197,11 +201,11 @@ msgstr "忽略變更"

#: ../src/vnr-properties-dialog.c:112
msgid "_Next"
msgstr "下一個(_N)"
msgstr "下一張(_N)"

#: ../src/vnr-properties-dialog.c:113
msgid "_Previous"
msgstr "上一個(_P)"
msgstr "上一張(_P)"

#: ../src/vnr-properties-dialog.c:128
msgid "Image Properties"
Expand Down Expand Up @@ -244,7 +248,7 @@ msgstr "使用「%s」開啟選擇的圖片"

#: ../src/vnr-window.c:467
msgid "Show next image after: "
msgstr ""
msgstr "多久之後顯示下一張圖片:"

#: ../src/vnr-window.c:485 ../src/vnr-window.c:902
msgid " second"
Expand All @@ -261,15 +265,15 @@ msgid ""
"Writing in this format is not supported."
msgstr ""
"無法儲存圖片的修改。\n"
"這個格式的寫入不被支援。"
"不支援這個格式的寫入。"

#: ../src/vnr-window.c:768 ../src/vnr-window.c:826 ../src/vnr-window.c:1713
msgid ""
"Save modifications?\n"
"This will overwrite the image and may reduce its quality!"
msgstr ""
"要儲存修改嗎?\n"
"這將會覆寫圖片並且可能降低它的品質!"
"這將會覆寫圖片並且可能降低品質!"

#: ../src/vnr-window.c:1271
msgid "Open Image"
Expand All @@ -289,9 +293,7 @@ msgstr "開啟資料夾"

#: ../src/vnr-window.c:1378
msgid "translator-credits"
msgstr ""
"Launchpad Contributions:\n"
" Hsiu-Ming Chang https://launchpad.net/~cges30901"
msgstr "Hsiu-Ming Chang <[email protected]>, 2018."

#: ../src/vnr-window.c:1558
msgid "If you delete an item, it will be permanently lost."
Expand Down Expand Up @@ -421,11 +423,11 @@ msgstr "顯示目前檔案的資訊"

#: ../src/vnr-window.c:1773
msgid "_Reload"
msgstr "重新讀取(_R)"
msgstr "重新載入(_R)"

#: ../src/vnr-window.c:1774
msgid "Reload the current file"
msgstr "重新讀取目前的檔案"
msgstr "重新載入目前的檔案"

#: ../src/vnr-window.c:1779 ../src/vnr-window.c:1791 ../src/vnr-window.c:1794
msgid "_Zoom In"
Expand All @@ -450,15 +452,15 @@ msgstr "正常大小(_N)"

#: ../src/vnr-window.c:1786
msgid "Show the image at its normal size"
msgstr "以圖片的原始尺寸顯示"
msgstr "以圖片的正常大小顯示"

#: ../src/vnr-window.c:1788
msgid "Best _Fit"
msgstr "最適大小(_F)"

#: ../src/vnr-window.c:1789
msgid "Fit the image to the window"
msgstr "圖片符合視窗尺寸"
msgstr "圖片符合視窗大小"

#: ../src/vnr-window.c:1803
msgid "Rotate _Clockwise"
Expand Down Expand Up @@ -538,35 +540,35 @@ msgstr "以投影片模式顯示"

#: ../src/vnr-window.c:1845
msgid "_Previous Image"
msgstr "上一個圖片(_P)"
msgstr "上一張圖片(_P)"

#: ../src/vnr-window.c:1846
msgid "Go to the previous image of the collection"
msgstr "移至圖片集的上一張圖片"
msgstr "前往圖片集的上一張圖片"

#: ../src/vnr-window.c:1848
msgid "_Next Image"
msgstr "下一個圖片(_N)"
msgstr "下一張圖片(_N)"

#: ../src/vnr-window.c:1849
msgid "Go to the next image of the collection"
msgstr "移至圖片集的下一張圖片"
msgstr "前往圖片集的下一張圖片"

#: ../src/vnr-window.c:1851
msgid "_First Image"
msgstr "第一個圖片(_F)"
msgstr "第一張圖片(_F)"

#: ../src/vnr-window.c:1852
msgid "Go to the first image of the collection"
msgstr "移至圖片集的第一張圖片"
msgstr "前往圖片集的第一張圖片"

#: ../src/vnr-window.c:1854
msgid "_Last Image"
msgstr "最後一個圖片(_L)"
msgstr "最後一張圖片(_L)"

#: ../src/vnr-window.c:1855
msgid "Go to the last image of the collection"
msgstr "移至圖片集的最後一張圖片"
msgstr "前往圖片集的最後一張圖片"

#: ../src/uni-exiv2.hpp:49
msgid "Camera make"
Expand Down
14 changes: 0 additions & 14 deletions src/uni-anim-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,17 +337,3 @@ uni_anim_view_set_is_playing (UniAnimView * aview, gboolean playing)
else if (playing && aview->anim)
uni_anim_view_updator (aview);
}

/**
* uni_anim_view_get_is_playing:
* @aview: A #UniImageView.
* @returns: %TRUE if an animation is playing, %FALSE otherwise.
*
* Returns whether the animation is playing or not. If there is no
* current animation, this method will always returns %FALSE.
**/
gboolean
uni_anim_view_get_is_playing (UniAnimView * aview)
{
return aview->timer_id && aview->anim;
}
3 changes: 1 addition & 2 deletions src/uni-anim-view.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Viewnior 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 3 of the License, or
* (at your option) any later version.
*
* Viewnior is distributed in the hope that it will be useful,
Expand Down Expand Up @@ -82,7 +83,5 @@ void uni_anim_view_set_static (UniAnimView * aview,
void uni_anim_view_set_is_playing (UniAnimView * aview,
gboolean playing);

gboolean uni_anim_view_get_is_playing (UniAnimView * aview);

G_END_DECLS
#endif /* __UNI_ANIM_VIEW_H__ */
2 changes: 1 addition & 1 deletion src/uni-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ uni_pixbuf_draw_cache_intersect_draw (UniPixbufDrawCache * cache,

/* If there is no intersection, we have to scale the whole area
from the source pixbuf. */
GdkRectangle inter;
GdkRectangle inter = {0, 0, 0, 0};
GdkRectangle around[4] = {
this,
{0, 0, 0, 0},
Expand Down
14 changes: 0 additions & 14 deletions src/uni-exiv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@

static Exiv2::Image::AutoPtr cached_image;

extern "C"
void
uni_exif_dictionary_map(void (*callback)(const char*, const char*, void*), void *user_data)
{
uint i;
for( i=0; i<sizeof(exifDataDictionary)/sizeof(exifDataDictionary[0]); i++ ) {
callback(exifDataDictionary[i].key, exifDataDictionary[i].label, user_data);
}

for( i=0; i<sizeof(iptcDataDictionary)/sizeof(iptcDataDictionary[0]); i++ ) {
callback(iptcDataDictionary[i].key, iptcDataDictionary[i].label, user_data);
}
}

extern "C"
void
uni_read_exiv2_map(const char *uri, void (*callback)(const char*, const char*, void*), void *user_data)
Expand Down
2 changes: 0 additions & 2 deletions src/uni-exiv2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ extern "C" {

#endif /* __cplusplus */

void uni_exif_dictionary_map (void (*callback)(const char*, const char*, void*),
void *user_data);
void uni_read_exiv2_map (const char *uri,
void (*callback)(const char*, const char*, void*),
void *user_data);
Expand Down
4 changes: 2 additions & 2 deletions src/uni-image-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ uni_image_view_repaint_area (UniImageView * view, GdkRectangle * paint_rect)
view->is_rendering = TRUE;

// Image area is the area on the widget occupied by the pixbuf.
GdkRectangle image_area;
GdkRectangle image_area = {0, 0, 0, 0};
Size alloc = uni_image_view_get_allocated_size (view);
uni_image_view_get_draw_rect (view, &image_area);
if (image_area.x > 0 ||
Expand All @@ -267,7 +267,7 @@ uni_image_view_repaint_area (UniImageView * view, GdkRectangle * paint_rect)
GtkWidget *widget = GTK_WIDGET (view);

// Paint area is the area on the widget that should be redrawn.
GdkRectangle paint_area;
GdkRectangle paint_area = {0, 0, 0, 0};
gboolean intersects = gdk_rectangle_intersect (&image_area,
paint_rect,
&paint_area);
Expand Down
2 changes: 1 addition & 1 deletion src/uni-nav.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ uni_nav_get_zoom2nav_factor (UniNav * nav)
static GdkRectangle
gtk_image_get_current_rectangle (UniNav * nav)
{
GdkRectangle rect;
GdkRectangle rect = {0, 0, 0, 0};
uni_image_view_get_viewport (nav->view, &rect);

/* Convert Zoom space to Nav space coordinates. */
Expand Down
1 change: 1 addition & 0 deletions src/vnr-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static void vnr_file_set_file_info(VnrFile *vnrfile,
vnrfile->path = g_strdup(path);
vnrfile->is_directory = is_directory;
vnr_file_set_display_name(vnrfile, display_name);

}

VnrFile* vnr_file_create_new(gchar *path,
Expand Down
4 changes: 3 additions & 1 deletion src/vnr-prefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,10 @@ vnr_prefs_save (VnrPrefs *prefs)

if(rcfile != NULL)
{
fputs(g_key_file_to_data (conf, NULL, NULL), rcfile);
gchar *data = g_key_file_to_data (conf, NULL, NULL);
fputs(data, rcfile);
fclose(rcfile);
g_free(data);
}
else
g_warning("Saving config file: Unable to open the configuration file for writing!\n");
Expand Down
3 changes: 1 addition & 2 deletions src/vnr-tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,11 @@ vnr_tools_parse_uri_string_list_to_file_list (const gchar *uri_list)
GSList* file_list = NULL;
gsize i = 0;
gchar **uris;
gchar* current_path;

uris = g_uri_list_extract_uris (uri_list);

while (uris[i] != NULL) {
current_path = g_file_get_path (g_file_new_for_uri(uris[i]));
gchar* current_path = g_file_get_path (g_file_new_for_uri(uris[i]));
if(current_path != NULL)
file_list = g_slist_append (file_list, current_path);
i++;
Expand Down
Loading

0 comments on commit 95988c8

Please sign in to comment.