mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 07:06:00 +01:00
Merge branch 'develop' of pwmt.org:zathura into develop
This commit is contained in:
commit
8908e1cb06
9 changed files with 57 additions and 15 deletions
|
@ -32,7 +32,7 @@ compare_case_insensitive(const char* str1, const char* str2)
|
||||||
|
|
||||||
static girara_list_t*
|
static girara_list_t*
|
||||||
list_files(zathura_t* zathura, const char* current_path, const char* current_file,
|
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) {
|
if (zathura == NULL || zathura->ui.session == NULL || current_path == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
2
config.c
2
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);
|
girara_setting_add(gsession, "abort-clear-search", &bool_value, BOOLEAN, false, _("Clear search results on abort"), NULL, NULL);
|
||||||
bool_value = false;
|
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);
|
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 */
|
/* define default shortcuts */
|
||||||
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_abort, 0, 0, NULL);
|
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_abort, 0, 0, NULL);
|
||||||
|
|
5
main.c
5
main.c
|
@ -40,6 +40,7 @@ main(int argc, char* argv[])
|
||||||
gchar* synctex_editor = NULL;
|
gchar* synctex_editor = NULL;
|
||||||
bool forkback = false;
|
bool forkback = false;
|
||||||
bool print_version = false;
|
bool print_version = false;
|
||||||
|
bool synctex = false;
|
||||||
|
|
||||||
#if (GTK_MAJOR_VERSION == 3)
|
#if (GTK_MAJOR_VERSION == 3)
|
||||||
Window embed = 0;
|
Window embed = 0;
|
||||||
|
@ -56,6 +57,7 @@ main(int argc, char* argv[])
|
||||||
{ "password", 'w', 0, G_OPTION_ARG_STRING, &password, _("Document password"), "password" },
|
{ "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" },
|
{ "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 },
|
{ "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" },
|
{ "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 }
|
{ NULL, '\0', 0, 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
@ -108,6 +110,9 @@ main(int argc, char* argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Enable/Disable synctex support */
|
||||||
|
zathura_set_syntex(zathura, synctex);
|
||||||
|
|
||||||
/* Print version */
|
/* Print version */
|
||||||
if (print_version == true) {
|
if (print_version == true) {
|
||||||
char* string = zathura_get_version_string(zathura, false);
|
char* string = zathura_get_version_string(zathura, false);
|
||||||
|
|
|
@ -613,7 +613,10 @@ cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* b
|
||||||
} else {
|
} else {
|
||||||
redraw_rect(ZATHURA_PAGE(widget), &priv->mouse.selection);
|
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 */
|
/* synctex backwards sync */
|
||||||
double scale = zathura_document_get_scale(document);
|
double scale = zathura_document_get_scale(document);
|
||||||
int x = button->x / scale, y = button->y / scale;
|
int x = button->x / scale, y = button->y / scale;
|
||||||
|
|
25
po/fr.po
25
po/fr.po
|
@ -7,16 +7,15 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: zathura\n"
|
"Project-Id-Version: zathura\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: http://bt.pwmt.org/\n"
|
||||||
"POT-Creation-Date: 2012-08-05 16:09+0200\n"
|
"POT-Creation-Date: 2012-08-05 15:45+0200\n"
|
||||||
"PO-Revision-Date: 2012-07-02 12:58+0000\n"
|
"PO-Revision-Date: 2012-08-07 22:54+0000\n"
|
||||||
"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
|
"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
|
||||||
"Language-Team: French (http://www.transifex.net/projects/p/zathura/language/"
|
"Language-Team: French (http://www.transifex.com/projects/p/zathura/language/fr/)\n"
|
||||||
"fr/)\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: fr\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1)\n"
|
||||||
|
|
||||||
#: ../callbacks.c:204
|
#: ../callbacks.c:204
|
||||||
|
@ -160,7 +159,7 @@ msgstr "Nombre de page par rangée"
|
||||||
|
|
||||||
#: ../config.c:113
|
#: ../config.c:113
|
||||||
msgid "Column of the first page"
|
msgid "Column of the first page"
|
||||||
msgstr ""
|
msgstr "Colonne de la première page"
|
||||||
|
|
||||||
#: ../config.c:115
|
#: ../config.c:115
|
||||||
msgid "Scroll step"
|
msgid "Scroll step"
|
||||||
|
@ -168,7 +167,7 @@ msgstr "Facteur de défilement"
|
||||||
|
|
||||||
#: ../config.c:117
|
#: ../config.c:117
|
||||||
msgid "Horizontal scroll step"
|
msgid "Horizontal scroll step"
|
||||||
msgstr ""
|
msgstr "Pas de défilement horizontal"
|
||||||
|
|
||||||
#: ../config.c:119
|
#: ../config.c:119
|
||||||
msgid "Zoom minimum"
|
msgid "Zoom minimum"
|
||||||
|
@ -208,7 +207,7 @@ msgstr "Recoloriser les pages"
|
||||||
|
|
||||||
#: ../config.c:138
|
#: ../config.c:138
|
||||||
msgid "When recoloring keep original hue and adjust lightness only"
|
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
|
#: ../config.c:140
|
||||||
msgid "Wrap scrolling"
|
msgid "Wrap scrolling"
|
||||||
|
@ -220,11 +219,11 @@ msgstr "Augmenter le nombre de pages par rangée"
|
||||||
|
|
||||||
#: ../config.c:144
|
#: ../config.c:144
|
||||||
msgid "Horizontally centered zoom"
|
msgid "Horizontally centered zoom"
|
||||||
msgstr ""
|
msgstr "Zoom centré horizontalement"
|
||||||
|
|
||||||
#: ../config.c:146
|
#: ../config.c:146
|
||||||
msgid "Center result horizontally"
|
msgid "Center result horizontally"
|
||||||
msgstr ""
|
msgstr "Centrer le résultat horizontalement"
|
||||||
|
|
||||||
#: ../config.c:148
|
#: ../config.c:148
|
||||||
msgid "Transparency for highlighting"
|
msgid "Transparency for highlighting"
|
||||||
|
@ -260,7 +259,7 @@ msgstr "Effacer les résultats de recherche en cas d'abandon"
|
||||||
|
|
||||||
#: ../config.c:163
|
#: ../config.c:163
|
||||||
msgid "Use basename of the file in the window title"
|
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
|
#. define default inputbar commands
|
||||||
#: ../config.c:291
|
#: ../config.c:291
|
||||||
|
@ -373,7 +372,7 @@ msgstr "Afficher les informations de version "
|
||||||
|
|
||||||
#: ../main.c:59
|
#: ../main.c:59
|
||||||
msgid "Synctex editor (forwarded to the synctex command)"
|
msgid "Synctex editor (forwarded to the synctex command)"
|
||||||
msgstr ""
|
msgstr "Éditeur Synctex (transférer à la commande synctex)"
|
||||||
|
|
||||||
#: ../page-widget.c:456
|
#: ../page-widget.c:456
|
||||||
msgid "Loading..."
|
msgid "Loading..."
|
||||||
|
|
|
@ -44,6 +44,15 @@ OPTIONS
|
||||||
--fork
|
--fork
|
||||||
Fork into the background
|
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
|
MOUSE AND KEY BINDINGS
|
||||||
======================
|
======================
|
||||||
|
|
||||||
|
|
|
@ -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
|
void
|
||||||
zathura_set_argv(zathura_t* zathura, char** argv)
|
zathura_set_argv(zathura_t* zathura, char** argv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,13 @@ Type=Application
|
||||||
Name=Zathura
|
Name=Zathura
|
||||||
Comment=A minimalistic document viewer
|
Comment=A minimalistic document viewer
|
||||||
Comment[de]=Ein minimalistischer Dokumenten-Betrachter
|
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
|
Exec=zathura %f
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Office;Viewer;
|
Categories=Office;Viewer;
|
||||||
|
|
|
@ -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);
|
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
|
* Sets the program parameters
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue