From 6de597812729383b7ebe02b1ebaee4bacca9c01b Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Tue, 7 Aug 2012 13:37:04 +0200 Subject: [PATCH 1/5] Resolve signed/unsigned comparison warning --- completion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completion.c b/completion.c index 92ed7de..3fd0611 100644 --- a/completion.c +++ b/completion.c @@ -32,7 +32,7 @@ compare_case_insensitive(const char* str1, const char* str2) static girara_list_t* list_files(zathura_t* zathura, const char* current_path, const char* current_file, - int current_file_length, bool is_dir, bool check_file_ext) + unsigned int current_file_length, bool is_dir, bool check_file_ext) { if (zathura == NULL || zathura->ui.session == NULL || current_path == NULL) { return NULL; From 66b5b6a2148069a7f54114d1875567251f9b8a8b Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Thu, 9 Aug 2012 14:33:22 +0200 Subject: [PATCH 2/5] Update French translation. 100% translated, thanks! --- po/fr.po | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/po/fr.po b/po/fr.po index ad5c37c..1c1752e 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,16 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-05 16:09+0200\n" -"PO-Revision-Date: 2012-07-02 12:58+0000\n" +"Report-Msgid-Bugs-To: http://bt.pwmt.org/\n" +"POT-Creation-Date: 2012-08-05 15:45+0200\n" +"PO-Revision-Date: 2012-08-07 22:54+0000\n" "Last-Translator: Stéphane Aulery \n" -"Language-Team: French (http://www.transifex.net/projects/p/zathura/language/" -"fr/)\n" -"Language: fr\n" +"Language-Team: French (http://www.transifex.com/projects/p/zathura/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" #: ../callbacks.c:204 @@ -160,7 +159,7 @@ msgstr "Nombre de page par rangée" #: ../config.c:113 msgid "Column of the first page" -msgstr "" +msgstr "Colonne de la première page" #: ../config.c:115 msgid "Scroll step" @@ -168,7 +167,7 @@ msgstr "Facteur de défilement" #: ../config.c:117 msgid "Horizontal scroll step" -msgstr "" +msgstr "Pas de défilement horizontal" #: ../config.c:119 msgid "Zoom minimum" @@ -208,7 +207,7 @@ msgstr "Recoloriser les pages" #: ../config.c:138 msgid "When recoloring keep original hue and adjust lightness only" -msgstr "" +msgstr "Lors du recalibrage des couleurs garder la teinte d'origine et ajuster seulement la luminosité" #: ../config.c:140 msgid "Wrap scrolling" @@ -220,11 +219,11 @@ msgstr "Augmenter le nombre de pages par rangée" #: ../config.c:144 msgid "Horizontally centered zoom" -msgstr "" +msgstr "Zoom centré horizontalement" #: ../config.c:146 msgid "Center result horizontally" -msgstr "" +msgstr "Centrer le résultat horizontalement" #: ../config.c:148 msgid "Transparency for highlighting" @@ -260,7 +259,7 @@ msgstr "Effacer les résultats de recherche en cas d'abandon" #: ../config.c:163 msgid "Use basename of the file in the window title" -msgstr "" +msgstr "Utiliser le nom de base dans le titre de la fenêtre" #. define default inputbar commands #: ../config.c:291 @@ -373,7 +372,7 @@ msgstr "Afficher les informations de version " #: ../main.c:59 msgid "Synctex editor (forwarded to the synctex command)" -msgstr "" +msgstr "Éditeur Synctex (transférer à la commande synctex)" #: ../page-widget.c:456 msgid "Loading..." From 3ec1c4f3d285bbf14fc498f6792b9949ed14d6d6 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Thu, 9 Aug 2012 14:47:18 +0200 Subject: [PATCH 3/5] Update translations of Comment. --- zathura.desktop | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zathura.desktop b/zathura.desktop index 57fe73e..64fd6f7 100644 --- a/zathura.desktop +++ b/zathura.desktop @@ -4,6 +4,13 @@ Type=Application Name=Zathura Comment=A minimalistic document viewer Comment[de]=Ein minimalistischer Dokumenten-Betrachter +Comment[fr]=Un visionneur de document minimaliste +Comment[ru]=Минималистичный просмотрщик документов +Comment[tr]=Minimalist bir belge görüntüleyicisi +Comment[es_CL]=Un visor de documentos minimalista +Comment[uk_UA]=Легкий переглядач документів +Comment[it]=Un visualizzatore di documenti minimalista +Comment[pl]=Minimalistyczna przeglądarka dokumentów Exec=zathura %f Terminal=false Categories=Office;Viewer; From f6c6b4a883c1566afb018bc224e499f9263c3c65 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Mon, 13 Aug 2012 18:17:20 +0200 Subject: [PATCH 4/5] En/Disable syntex support --- config.c | 2 ++ main.c | 5 +++++ page-widget.c | 5 ++++- zathura.c | 9 +++++++++ zathura.h | 8 ++++++++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/config.c b/config.c index 99443b3..6db7ffc 100644 --- a/config.c +++ b/config.c @@ -161,6 +161,8 @@ config_load_default(zathura_t* zathura) girara_setting_add(gsession, "abort-clear-search", &bool_value, BOOLEAN, false, _("Clear search results on abort"), NULL, NULL); bool_value = false; girara_setting_add(gsession, "window-title-basename", &bool_value, BOOLEAN, false, _("Use basename of the file in the window title"), NULL, NULL); + bool_value = false; + girara_setting_add(gsession, "synctex", &bool_value, BOOLEAN, false, _("Enable syntex support"), NULL, NULL); /* define default shortcuts */ girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_abort, 0, 0, NULL); diff --git a/main.c b/main.c index 3590e1f..86ea05b 100644 --- a/main.c +++ b/main.c @@ -40,6 +40,7 @@ main(int argc, char* argv[]) gchar* synctex_editor = NULL; bool forkback = false; bool print_version = false; + bool synctex = false; #if (GTK_MAJOR_VERSION == 3) Window embed = 0; @@ -56,6 +57,7 @@ main(int argc, char* argv[]) { "password", 'w', 0, G_OPTION_ARG_STRING, &password, _("Document password"), "password" }, { "debug", 'l', 0, G_OPTION_ARG_STRING, &loglevel, _("Log level (debug, info, warning, error)"), "level" }, { "version", 'v', 0, G_OPTION_ARG_NONE, &print_version, _("Print version information"), NULL }, + { "synctex", 's', 0, G_OPTION_ARG_NONE, &synctex, _("Enable synctex support"), NULL }, { "synctex-editor-command", 'x', 0, G_OPTION_ARG_STRING, &synctex_editor, _("Synctex editor (forwarded to the synctex command)"), "cmd" }, { NULL, '\0', 0, 0, NULL, NULL, NULL } }; @@ -108,6 +110,9 @@ main(int argc, char* argv[]) return -1; } + /* Enable/Disable synctex support */ + zathura_set_syntex(zathura, synctex); + /* Print version */ if (print_version == true) { char* string = zathura_get_version_string(zathura, false); diff --git a/page-widget.c b/page-widget.c index 9248220..bd1ff0b 100644 --- a/page-widget.c +++ b/page-widget.c @@ -613,7 +613,10 @@ cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* b } else { redraw_rect(ZATHURA_PAGE(widget), &priv->mouse.selection); - if (priv->zathura->synctex.enabled && button->state & GDK_CONTROL_MASK) { + bool synctex = false; + girara_setting_get(priv->zathura->ui.session, "synctex", &synctex); + + if (synctex == true && button->state & GDK_CONTROL_MASK) { /* synctex backwards sync */ double scale = zathura_document_get_scale(document); int x = button->x / scale, y = button->y / scale; diff --git a/zathura.c b/zathura.c index 1ab8318..191f4a8 100644 --- a/zathura.c +++ b/zathura.c @@ -374,6 +374,15 @@ zathura_set_synctex_editor_command(zathura_t* zathura, const char* command) } } +void +zathura_set_syntex(zathura_t* zathura, bool value) +{ + g_return_if_fail(zathura != NULL); + g_return_if_fail(zathura->ui.session != NULL); + + girara_setting_set(zathura->ui.session, "synctex", &value); +} + void zathura_set_argv(zathura_t* zathura, char** argv) { diff --git a/zathura.h b/zathura.h index fcb7ea5..9aa807c 100644 --- a/zathura.h +++ b/zathura.h @@ -191,6 +191,14 @@ void zathura_set_plugin_dir(zathura_t* zathura, const char* dir); */ void zathura_set_synctex_editor_command(zathura_t* zathura, const char* command); +/** + * En/Disable zathuras syntex support + * + * @param zathura The zathura session + * @param value The value + */ +void zathura_set_syntex(zathura_t* zathura, bool value); + /** * Sets the program parameters * From 8b9f57917e270797c5dc1ab5e4857604fc84c2f8 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Mon, 13 Aug 2012 18:17:58 +0200 Subject: [PATCH 5/5] Update manpage --- zathura.1.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zathura.1.rst b/zathura.1.rst index ea20009..2f8322f 100644 --- a/zathura.1.rst +++ b/zathura.1.rst @@ -44,6 +44,15 @@ OPTIONS --fork Fork into the background +-l [level], --debug [level] + Set log debug level (debug, info, warning, error) + +-s, --synctex + Enable syntex support + +-x [cmd], --syntec-editor-command [cmd] + Set the syntex editor command + MOUSE AND KEY BINDINGS ======================