From 34dbe92edd95fbf7082c3e54f438c76355254fe5 Mon Sep 17 00:00:00 2001 From: auroux Date: Mon, 21 Sep 2009 07:07:44 +0000 Subject: [PATCH] custom color chooser; misc patches --- po/ca.po | 1843 +++++++++++++++++++++----------------------- po/fr.po | 498 ++++++------ src/TODO | 31 +- src/main.c | 13 +- src/xo-callbacks.c | 190 +++-- src/xo-callbacks.h | 13 +- src/xo-file.c | 90 ++- src/xo-file.h | 2 +- src/xo-interface.c | 40 +- src/xo-misc.c | 176 +++-- src/xo-misc.h | 7 +- src/xo-paint.c | 6 +- src/xo-paint.h | 2 +- src/xo-support.c | 2 +- src/xournal.h | 4 +- xournal.glade | 45 +- 16 files changed, 1521 insertions(+), 1441 deletions(-) diff --git a/po/ca.po b/po/ca.po index 4ce2e9d..7ac9764 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: xournal 0.4.2.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-09 21:51+0200\n" +"POT-Creation-Date: 2009-09-20 23:57-0700\n" "PO-Revision-Date: 2009-05-09 21:36+0200\n" "Last-Translator: David Planella \n" "Language-Team: Catalan\n" @@ -16,1261 +16,1180 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../xournal.xml.in.h:1 ../x-xoj.desktop.in.h:1 -msgid "Xournal note file" -msgstr "Fitxers de nota del Xournal" - -#: ../xournal.desktop.in.h:1 -msgid "Take handwritten notes" -msgstr "Preneu notes a mà" - -#: ../xournal.desktop.in.h:2 ../maemo/xournal.desktop.in.h:1 -#: ../src/xo-misc.c:1344 -msgid "Xournal" -msgstr "Xournal" - -#: ../maemo/xournal.service.in.h:1 -msgid "com.nokia.xournal" -msgstr "com.nokia.xournal" - -#: ../src/main.c:68 +#: src/main.c:65 #, c-format msgid "" "Invalid command line parameters.\n" "Usage: %s [filename.xoj]\n" msgstr "" -#: ../src/main.c:241 ../src/xo-callbacks.c:107 ../src/xo-callbacks.c:156 -#: ../src/xo-callbacks.c:3077 +#: src/main.c:282 src/xo-callbacks.c:104 src/xo-callbacks.c:153 +#: src/xo-callbacks.c:3065 #, c-format msgid "Error opening file '%s'" msgstr "S'ha produït un error en obrir el fitxer «%s»" -#. user aborted on save confirmation -#: ../src/xo-callbacks.c:56 ../src/xo-file.c:669 -msgid "Open PDF" -msgstr "Obre un fitxer PDF" +#: src/xo-interface.c:350 src/xo-interface.c:2953 src/xo-misc.c:1390 +msgid "Xournal" +msgstr "Xournal" -#: ../src/xo-callbacks.c:61 ../src/xo-callbacks.c:132 -#: ../src/xo-callbacks.c:230 ../src/xo-callbacks.c:413 -#: ../src/xo-callbacks.c:1489 ../src/xo-file.c:674 -msgid "All files" -msgstr "Tots els fitxers" +#: src/xo-interface.c:360 +msgid "_File" +msgstr "_Fitxer" -#: ../src/xo-callbacks.c:64 ../src/xo-callbacks.c:416 ../src/xo-file.c:677 -msgid "PDF files" -msgstr "Fitxers PDF" +#: src/xo-interface.c:371 +msgid "Annotate PD_F" +msgstr "Fes notes a un fitxer PD_F" -#: ../src/xo-callbacks.c:72 ../src/xo-callbacks.c:1512 -msgid "Attach file to the journal" -msgstr "Adjunta el fitxer al diari" +#: src/xo-interface.c:396 +msgid "Recent Doc_uments" +msgstr "Doc_uments recents" -#. user aborted on save confirmation -#: ../src/xo-callbacks.c:127 -msgid "Open Journal" -msgstr "Obre un diari" +#: src/xo-interface.c:403 +msgid "0" +msgstr "0" -#: ../src/xo-callbacks.c:135 ../src/xo-callbacks.c:233 -msgid "Xournal files" -msgstr "Fitxers del Xournal" +#: src/xo-interface.c:407 +msgid "1" +msgstr "1" -#: ../src/xo-callbacks.c:185 ../src/xo-callbacks.c:278 -#, c-format -msgid "Error saving file '%s'" -msgstr "S'ha produït un error en desar el fitxer «%s»" +#: src/xo-interface.c:411 +msgid "2" +msgstr "2" -#: ../src/xo-callbacks.c:205 -msgid "Save Journal" -msgstr "Desa el diari" +#: src/xo-interface.c:415 +msgid "3" +msgstr "3" -#: ../src/xo-callbacks.c:259 ../src/xo-callbacks.c:434 -#, c-format -msgid "Should the file %s be overwritten?" -msgstr "Voleu sobreescriure el fitxer %s?" +#: src/xo-interface.c:419 +msgid "4" +msgstr "4" -#: ../src/xo-callbacks.c:390 -msgid "Export to PDF" -msgstr "Exporta a PDF" +#: src/xo-interface.c:423 +msgid "5" +msgstr "5" -#: ../src/xo-callbacks.c:447 -#, c-format -msgid "Error creating file '%s'" -msgstr "S'ha produït un error en crear el fitxer «%s»" +#: src/xo-interface.c:427 +msgid "6" +msgstr "6" -#: ../src/xo-callbacks.c:1484 -msgid "Open Background" -msgstr "Obre un fons" +#: src/xo-interface.c:431 +msgid "7" +msgstr "7" -#: ../src/xo-callbacks.c:1497 -msgid "Bitmap files" -msgstr "Fitxers de mapa de bits" +#: src/xo-interface.c:440 +msgid "Print Options" +msgstr "Opcions d'impressió" -#: ../src/xo-callbacks.c:1505 -msgid "PS/PDF files (as bitmaps)" -msgstr "Fitxers PS/PDF (com a mapes de bits)" +#: src/xo-interface.c:455 +msgid "_Export to PDF" +msgstr "_Exporta a PDF" -#: ../src/xo-callbacks.c:1535 -#, c-format -msgid "Error opening background '%s'" -msgstr "S'ha produït un error en obrir el fons «%s»" +#: src/xo-interface.c:471 +msgid "_Edit" +msgstr "_Edita" -#: ../src/xo-callbacks.c:2087 -msgid "Select Font" -msgstr "Seleccioneu el tipus de lletra" +#: src/xo-interface.c:516 +msgid "_View" +msgstr "_Visualitza" -#: ../src/xo-callbacks.c:2448 -msgid "" -"Drawing is not allowed on the background layer.\n" -" Switching to Layer 1." -msgstr "" -"No es pot dibuixar a la capa de fons.\n" -" Es commutarà a la capa 1." +#: src/xo-interface.c:523 +msgid "_Continuous" +msgstr "_Continu" -#: ../src/xo-file.c:125 ../src/xo-file.c:159 -#, c-format -msgid "Could not write background '%s'. Continuing anyway." -msgstr "" +#: src/xo-interface.c:529 +msgid "_One Page" +msgstr "Pàgina ú_nica" -#: ../src/xo-file.c:256 -#, c-format -msgid "Invalid file contents" -msgstr "Els continguts del fitxer no són vàlids" +#: src/xo-interface.c:540 +msgid "Full Screen" +msgstr "Pantalla completa" -#: ../src/xo-file.c:406 -#, c-format -msgid "Could not open background '%s'. Setting background to white." -msgstr "" +#: src/xo-interface.c:552 +msgid "_Zoom" +msgstr "_Ampliació" -#: ../src/xo-file.c:664 -#, c-format -msgid "" -"Could not open background '%s'.\n" -"Select another file?" -msgstr "" +#: src/xo-interface.c:580 +msgid "Page _Width" +msgstr "Amplada de la _pàgina" -#: ../src/xo-file.c:777 -#, c-format -msgid "Could not open background '%s'." -msgstr "" +#: src/xo-interface.c:591 +msgid "_Set Zoom" +msgstr "_Defineix l'ampliació" -#: ../src/xo-file.c:1082 -#, c-format -msgid "Unable to start PDF loader %s." -msgstr "No s'ha pogut iniciar el carregador PDF %s." +#: src/xo-interface.c:600 +msgid "_First Page" +msgstr "Pàgina _inicial" -#: ../src/xo-file.c:1470 -msgid " the display resolution, in pixels per inch" -msgstr "" +#: src/xo-interface.c:611 +msgid "_Previous Page" +msgstr "Pàgina an_terior" -#: ../src/xo-file.c:1473 -msgid " the initial zoom level, in percent" -msgstr "" +#: src/xo-interface.c:622 +msgid "_Next Page" +msgstr "Pàgina _següent" -#: ../src/xo-file.c:1476 -msgid " maximize the window at startup (true/false)" -msgstr "" +#: src/xo-interface.c:633 +msgid "_Last Page" +msgstr "Pàgina _final" -#: ../src/xo-file.c:1479 -msgid " start in full screen mode (true/false)" -msgstr "" +#: src/xo-interface.c:649 +msgid "_Show Layer" +msgstr "_Mostra la capa" -#: ../src/xo-file.c:1482 -msgid " the window width in pixels (when not maximized)" -msgstr "" +#: src/xo-interface.c:657 +msgid "_Hide Layer" +msgstr "_Oculta la capa" -#: ../src/xo-file.c:1485 -msgid " the window height in pixels" -msgstr "" +#: src/xo-interface.c:665 +msgid "_Journal" +msgstr "_Diari" -#: ../src/xo-file.c:1488 -msgid " scrollbar step increment (in pixels)" -msgstr "" +#: src/xo-interface.c:672 +msgid "New Page _Before" +msgstr "Pàgina nova a_bans" -#: ../src/xo-file.c:1491 -msgid " the step increment in the zoom dialog box" -msgstr "" +#: src/xo-interface.c:676 +msgid "New Page _After" +msgstr "Pàgina nova _després" -#: ../src/xo-file.c:1494 -msgid " the multiplicative factor for zoom in/out" -msgstr "" +#: src/xo-interface.c:680 +msgid "New Page At _End" +msgstr "Pàgina nova al _final" -#: ../src/xo-file.c:1497 -msgid " document view (true = continuous, false = single page)" -msgstr "" +#: src/xo-interface.c:684 +msgid "_Delete Page" +msgstr "_Suprimeix la pàgina" -#: ../src/xo-file.c:1500 -msgid " use XInput extensions (true/false)" -msgstr "" +#: src/xo-interface.c:693 +msgid "_New Layer" +msgstr "_Capa nova" -#: ../src/xo-file.c:1503 -msgid " discard Core Pointer events in XInput mode (true/false)" -msgstr "" +#: src/xo-interface.c:697 +msgid "Delete La_yer" +msgstr "Suprimeix la ca_pa" -#: ../src/xo-file.c:1506 -msgid " always map eraser tip to eraser (true/false)" -msgstr "" +#: src/xo-interface.c:701 +msgid "_Flatten" +msgstr "A_plana" -#: ../src/xo-file.c:1509 -msgid " default path for open/save (leave blank for current directory)" -msgstr "" +#: src/xo-interface.c:710 +msgid "Paper Si_ze" +msgstr "Mida del _paper" -#: ../src/xo-file.c:1512 -msgid " use pressure sensitivity to control pen stroke width (true/false)" -msgstr "" +#: src/xo-interface.c:714 +msgid "Paper _Color" +msgstr "_Color del paper" -#: ../src/xo-file.c:1515 -msgid " minimum width multiplier" -msgstr "" +#: src/xo-interface.c:721 +msgid "_white paper" +msgstr "paper _blanc" -#: ../src/xo-file.c:1518 -msgid " maximum width multiplier" -msgstr "" +#: src/xo-interface.c:727 +msgid "_yellow paper" +msgstr "paper _groc" -#: ../src/xo-file.c:1521 -msgid "" -" interface components from top to bottom\n" -" valid values: drawarea menu main_toolbar pen_toolbar statusbar" -msgstr "" +#: src/xo-interface.c:733 +msgid "_pink paper" +msgstr "paper _rosa" -#: ../src/xo-file.c:1524 -msgid " interface components in fullscreen mode, from top to bottom" -msgstr "" +#: src/xo-interface.c:739 +msgid "_orange paper" +msgstr "paper _taronja" -#: ../src/xo-file.c:1527 -msgid " interface has left-handed scrollbar (true/false)" -msgstr "" +#: src/xo-interface.c:745 +msgid "_blue paper" +msgstr "paper _blau" -#: ../src/xo-file.c:1530 -msgid " hide some unwanted menu or toolbar items (true/false)" -msgstr "" +#: src/xo-interface.c:751 +msgid "_green paper" +msgstr "paper _verd" -#: ../src/xo-file.c:1533 -msgid "" -" interface items to hide (customize at your own risk!)\n" -" see source file xo-interface.c for a list of item names" -msgstr "" +#: src/xo-interface.c:757 src/xo-interface.c:1027 +msgid "other..." +msgstr "un altre..." -#: ../src/xo-file.c:1536 -msgid "" -" highlighter opacity (0 to 1, default 0.5)\n" -" warning: opacity level is not saved in xoj files!" +#: src/xo-interface.c:763 src/xo-interface.c:799 src/xo-interface.c:1031 +#: src/xo-interface.c:1276 src/xo-interface.c:1352 +msgid "NA" msgstr "" -#: ../src/xo-file.c:1539 -msgid " auto-save preferences on exit (true/false)" -msgstr "" +#: src/xo-interface.c:768 +msgid "Paper _Style" +msgstr "E_stil del paper" -#: ../src/xo-file.c:1543 -msgid " the default page width, in points (1/72 in)" -msgstr "" +#: src/xo-interface.c:775 +msgid "_plain" +msgstr "_llis" -#: ../src/xo-file.c:1546 -msgid " the default page height, in points (1/72 in)" -msgstr "" +#: src/xo-interface.c:781 +msgid "_lined" +msgstr "_pautat" -#: ../src/xo-file.c:1549 -msgid " the default paper color" -msgstr "" +#: src/xo-interface.c:787 +msgid "_ruled" +msgstr "_reglat" -#: ../src/xo-file.c:1552 -msgid " the default paper style (plain, lined, ruled, or graph)" -msgstr "" +#: src/xo-interface.c:793 +msgid "_graph" +msgstr "_quadriculat" -#: ../src/xo-file.c:1555 -msgid " apply paper style changes to all pages (true/false)" -msgstr "" +#: src/xo-interface.c:804 +msgid "Apply _To All Pages" +msgstr "Apli_ca a totes les pàgines" -#: ../src/xo-file.c:1558 -msgid " preferred unit (cm, in, px, pt)" -msgstr "" +#: src/xo-interface.c:813 +msgid "_Load Background" +msgstr "_Carrega un fons" -#: ../src/xo-file.c:1561 -msgid " include paper ruling when printing or exporting to PDF (true/false)" -msgstr "" +#: src/xo-interface.c:821 +msgid "Background Screens_hot" +msgstr "Ca_ptura de pantalla del fons" -#: ../src/xo-file.c:1564 -msgid " antialiased bitmap backgrounds (true/false)" -msgstr "" +#: src/xo-interface.c:830 +msgid "Default _Paper" +msgstr "Paper p_redeterminat" -#: ../src/xo-file.c:1567 -msgid " progressive scaling of bitmap backgrounds (true/false)" -msgstr "" +#: src/xo-interface.c:834 +msgid "Set As De_fault" +msgstr "Defineix com a _predeterminat" -#: ../src/xo-file.c:1570 -msgid "" -" bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)" -msgstr "" +#: src/xo-interface.c:838 +msgid "_Tools" +msgstr "Ei_nes" -#: ../src/xo-file.c:1573 -msgid "" -" bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)" -msgstr "" +#: src/xo-interface.c:845 src/xo-interface.c:1212 src/xo-interface.c:1288 +msgid "_Pen" +msgstr "_Llapis" -#: ../src/xo-file.c:1577 -msgid "" -" selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, " -"hand)" -msgstr "" +#: src/xo-interface.c:854 src/xo-interface.c:1218 src/xo-interface.c:1294 +msgid "_Eraser" +msgstr "_Esborrador" -#: ../src/xo-file.c:1580 -msgid " default pen color" -msgstr "" +#: src/xo-interface.c:863 src/xo-interface.c:1224 src/xo-interface.c:1300 +msgid "_Highlighter" +msgstr "_Marcador fluorescent" -#: ../src/xo-file.c:1583 -msgid " default pen thickness (fine = 1, medium = 2, thick = 3)" -msgstr "" +#: src/xo-interface.c:872 src/xo-interface.c:1230 src/xo-interface.c:1306 +msgid "_Text" +msgstr "_Text" -#: ../src/xo-file.c:1586 -msgid " default pen is in ruler mode (true/false)" -msgstr "" +#: src/xo-interface.c:886 +msgid "_Shape Recognizer" +msgstr "_Reconeixedor de formes" -#: ../src/xo-file.c:1589 -msgid " default pen is in shape recognizer mode (true/false)" -msgstr "" +#: src/xo-interface.c:893 +msgid "Ru_ler" +msgstr "Reg_le" -#: ../src/xo-file.c:1592 -msgid " default eraser thickness (fine = 1, medium = 2, thick = 3)" -msgstr "" +#: src/xo-interface.c:905 src/xo-interface.c:1236 src/xo-interface.c:1312 +msgid "Select Re_gion" +msgstr "Selecciona una re_gió" -#: ../src/xo-file.c:1595 -msgid " default eraser mode (standard = 0, whiteout = 1, strokes = 2)" -msgstr "" +#: src/xo-interface.c:914 src/xo-interface.c:1242 src/xo-interface.c:1318 +msgid "Select _Rectangle" +msgstr "Selecciona un _rectangle" -#: ../src/xo-file.c:1598 -msgid " default highlighter color" -msgstr "" +#: src/xo-interface.c:923 src/xo-interface.c:1248 src/xo-interface.c:1324 +msgid "_Vertical Space" +msgstr "Espai _vertical" -#: ../src/xo-file.c:1601 -msgid " default highlighter thickness (fine = 1, medium = 2, thick = 3)" -msgstr "" +#: src/xo-interface.c:932 src/xo-interface.c:1254 src/xo-interface.c:1330 +msgid "H_and Tool" +msgstr "_Eina de mà" -#: ../src/xo-file.c:1604 -msgid " default highlighter is in ruler mode (true/false)" -msgstr "" +#: src/xo-interface.c:945 +msgid "_Color" +msgstr "_Color" -#: ../src/xo-file.c:1607 -msgid " default highlighter is in shape recognizer mode (true/false)" -msgstr "" +#: src/xo-interface.c:956 +msgid "blac_k" +msgstr "_negre" -#: ../src/xo-file.c:1610 -msgid "" -" button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)" -msgstr "" +#: src/xo-interface.c:962 +msgid "_blue" +msgstr "_blau" -#: ../src/xo-file.c:1613 -msgid "" -" button 2 brush linked to primary brush (true/false) (overrides all other " -"settings)" -msgstr "" +#: src/xo-interface.c:968 +msgid "_red" +msgstr "_vermell" -#: ../src/xo-file.c:1616 -msgid " button 2 brush color (for pen or highlighter only)" -msgstr "" +#: src/xo-interface.c:974 +msgid "_green" +msgstr "v_erd" -#: ../src/xo-file.c:1620 -msgid " button 2 brush thickness (pen, eraser, or highlighter only)" -msgstr "" +#: src/xo-interface.c:980 +msgid "gr_ay" +msgstr "gri_s" -#: ../src/xo-file.c:1624 -msgid " button 2 ruler mode (true/false) (for pen or highlighter only)" -msgstr "" +#: src/xo-interface.c:991 +msgid "light bl_ue" +msgstr "blau _cel" -#: ../src/xo-file.c:1628 -msgid " button 2 shape recognizer mode (true/false) (pen or highlighter only)" -msgstr "" +#: src/xo-interface.c:997 +msgid "light gr_een" +msgstr "ve_rd clar" -#: ../src/xo-file.c:1632 -msgid " button 2 eraser mode (eraser only)" -msgstr "" +#: src/xo-interface.c:1003 +msgid "_magenta" +msgstr "_magenta" -#: ../src/xo-file.c:1635 -msgid "" -" button 3 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)" -msgstr "" +#: src/xo-interface.c:1009 +msgid "_orange" +msgstr "taron_ja" -#: ../src/xo-file.c:1638 -msgid "" -" button 3 brush linked to primary brush (true/false) (overrides all other " -"settings)" -msgstr "" +#: src/xo-interface.c:1015 +msgid "_yellow" +msgstr "gro_c" -#: ../src/xo-file.c:1641 -msgid " button 3 brush color (for pen or highlighter only)" -msgstr "" +#: src/xo-interface.c:1021 +msgid "_white" +msgstr "b_lanc" -#: ../src/xo-file.c:1645 -msgid " button 3 brush thickness (pen, eraser, or highlighter only)" -msgstr "" +#: src/xo-interface.c:1036 +msgid "Pen _Options" +msgstr "_Opcions del llapis" -#: ../src/xo-file.c:1649 -msgid " button 3 ruler mode (true/false) (for pen or highlighter only)" -msgstr "" +#: src/xo-interface.c:1043 +msgid "_very fine" +msgstr "mol_t prim" -#: ../src/xo-file.c:1653 -msgid " button 3 shape recognizer mode (true/false) (pen or highlighter only)" -msgstr "" +#: src/xo-interface.c:1049 src/xo-interface.c:1080 src/xo-interface.c:1128 +msgid "_fine" +msgstr "_prim" -#: ../src/xo-file.c:1657 -msgid " button 3 eraser mode (eraser only)" -msgstr "" +#: src/xo-interface.c:1055 src/xo-interface.c:1086 src/xo-interface.c:1134 +msgid "_medium" +msgstr "_mitjà" -#: ../src/xo-file.c:1661 -msgid " thickness of the various pens (in points, 1 pt = 1/72 in)" -msgstr "" +#: src/xo-interface.c:1061 src/xo-interface.c:1092 src/xo-interface.c:1140 +msgid "_thick" +msgstr "_gruixut" -#: ../src/xo-file.c:1667 -msgid " thickness of the various erasers (in points, 1 pt = 1/72 in)" -msgstr "" +#: src/xo-interface.c:1067 +msgid "ver_y thick" +msgstr "_molt gruixut" -#: ../src/xo-file.c:1672 -msgid " thickness of the various highlighters (in points, 1 pt = 1/72 in)" -msgstr "" +#: src/xo-interface.c:1073 +msgid "Eraser Optio_ns" +msgstr "Opcions de l'_esborrador" -#: ../src/xo-file.c:1677 -msgid " name of the default font" -msgstr "" +#: src/xo-interface.c:1103 +msgid "_standard" +msgstr "e_stàndard" -#: ../src/xo-file.c:1680 -msgid " default font size" -msgstr "" +#: src/xo-interface.c:1109 +msgid "_whiteout" +msgstr "nete_ja" -#: ../src/xo-file.c:1836 -msgid "" -" Xournal configuration file.\n" -" This file is generated automatically upon saving preferences.\n" -" Use caution when editing this file manually.\n" -msgstr "" +#: src/xo-interface.c:1115 +msgid "_delete strokes" +msgstr "su_primeix els traços" -#. TRANSLATORS: %d refers to the number of pages -#: ../src/xo-misc.c:1215 -#, c-format -msgid " of %d" -msgstr " de %d" +#: src/xo-interface.c:1121 +msgid "Highlighter Opt_ions" +msgstr "Opc_ions del marcador fluorescent" -#: ../src/xo-misc.c:1220 -msgid "Background" -msgstr "Fons" +#: src/xo-interface.c:1146 +msgid "Text _Font..." +msgstr "_Tipus de lletra del text..." -#: ../src/xo-misc.c:1228 -#, c-format -msgid "Layer %d" -msgstr "Capa %d" +#: src/xo-interface.c:1162 +msgid "_Default Pen" +msgstr "_Llapis predeterminat" -#: ../src/xo-misc.c:1350 -#, c-format -msgid "Xournal - %s" -msgstr "Xournal - %s" +#: src/xo-interface.c:1166 +msgid "Default Eraser" +msgstr "Esborrador predeterminat" -#: ../src/xo-misc.c:1583 -#, c-format -msgid "Save changes to '%s'?" -msgstr "Voleu desar els canvis al fitxer «%s»?" +#: src/xo-interface.c:1170 +msgid "Default Highlighter" +msgstr "Marcador fluorescent predeterminat" -#: ../src/xo-misc.c:1584 -msgid "Untitled" -msgstr "Sense títol" +#: src/xo-interface.c:1174 +msgid "Default Te_xt" +msgstr "Te_xt predeterminat" -#: ../src/xo-print.c:1577 -msgid "Preparing print job" -msgstr "S'està preparant la tasca d'impressió" +#: src/xo-interface.c:1178 +msgid "Set As Default" +msgstr "Defineix-lo com a predeterminat" -#: ../src/xo-print.c:1585 -#, c-format -msgid "Page %d" -msgstr "Pàgina %d" +#: src/xo-interface.c:1182 +msgid "_Options" +msgstr "_Opcions" -#: ../src/xo-print.c:1595 -msgid "Finalizing..." -msgstr "S'està finalitzant..." +#: src/xo-interface.c:1189 +msgid "Use _XInput" +msgstr "Utilitza l'_XInput" -#: ../src/xo-support.c:92 ../src/xo-support.c:116 -#, c-format -msgid "Couldn't find pixmap file: %s" -msgstr "No s'ha trobat el fitxer de mapa de píxels: %s" +#: src/xo-interface.c:1193 +msgid "Discard _Core Events" +msgstr "Descarta els esdeveniments _primaris" -#: ../src/xo-support.c:123 -#, c-format -msgid "Failed to load pixbuf file: %s: %s\n" -msgstr "No s'ha pogut carregar la memòria intermèdia de píxels: %s: %s\n" +#: src/xo-interface.c:1197 +msgid "_Eraser Tip" +msgstr "Utilitza la goma del _llapis" -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:361 -msgid "_File" -msgstr "_Fitxer" +#: src/xo-interface.c:1201 +msgid "_Pressure sensitivity" +msgstr "Sensibilitat de la _pressió" -#: ../src/xo-interface.c:372 -msgid "Annotate PD_F" -msgstr "Fes notes a un fitxer PD_F" +#: src/xo-interface.c:1205 +msgid "Button _2 Mapping" +msgstr "Mapatge del botó _2" -#: ../src/xo-interface.c:397 -msgid "Recent Doc_uments" -msgstr "Doc_uments recents" +#: src/xo-interface.c:1264 src/xo-interface.c:1340 +msgid "_Link to Primary Brush" +msgstr "_Vincula al pinzell primari" -#: ../src/xo-interface.c:404 -msgid "0" -msgstr "0" +#: src/xo-interface.c:1270 src/xo-interface.c:1346 +msgid "_Copy of Current Brush" +msgstr "_Copia el pinzell actual" -#: ../src/xo-interface.c:408 -msgid "1" -msgstr "1" +#: src/xo-interface.c:1281 +msgid "Button _3 Mapping" +msgstr "Mapatge del botó _3" -#: ../src/xo-interface.c:412 -msgid "2" -msgstr "2" +#: src/xo-interface.c:1357 +msgid "Buttons Switch Mappings" +msgstr "" -#: ../src/xo-interface.c:416 -msgid "3" -msgstr "3" +#: src/xo-interface.c:1366 +msgid "_Progressive Backgrounds" +msgstr "Fons _progressius" -#: ../src/xo-interface.c:420 -msgid "4" -msgstr "4" +#: src/xo-interface.c:1370 +msgid "Print Paper _Ruling" +msgstr "Imprimeix les _línies del paper" -#: ../src/xo-interface.c:424 -msgid "5" -msgstr "5" +#: src/xo-interface.c:1374 +msgid "Left-Handed Scrollbar" +msgstr "Barra de desplaçament per a esquerrans" -#: ../src/xo-interface.c:428 -msgid "6" -msgstr "6" +#: src/xo-interface.c:1378 +msgid "Shorten _Menus" +msgstr "Escurça els _menús" -#: ../src/xo-interface.c:432 -msgid "7" -msgstr "7" +#: src/xo-interface.c:1387 +msgid "A_uto-Save Preferences" +msgstr "Desa les preferències a_utomàticament" -#: ../src/xo-interface.c:441 -msgid "Print Options" -msgstr "Opcions d'impressió" +#: src/xo-interface.c:1391 +msgid "_Save Preferences" +msgstr "_Desa les preferències" -#: ../src/xo-interface.c:456 -msgid "_Export to PDF" -msgstr "_Exporta a PDF" +#: src/xo-interface.c:1395 +msgid "_Help" +msgstr "A_juda" -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:473 -msgid "_Edit" -msgstr "_Edita" +#: src/xo-interface.c:1406 +msgid "_About" +msgstr "_Quant a" -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:519 -msgid "_View" -msgstr "_Visualitza" +#: src/xo-interface.c:1419 +msgid "Save" +msgstr "Desa" -#: ../src/xo-interface.c:526 -msgid "_Continuous" -msgstr "_Continu" +#: src/xo-interface.c:1424 +msgid "New" +msgstr "Nova" -#: ../src/xo-interface.c:532 -msgid "_One Page" -msgstr "Pàgina ú_nica" +#: src/xo-interface.c:1429 +msgid "Open" +msgstr "Obre" -#: ../src/xo-interface.c:543 -msgid "Full Screen" -msgstr "Pantalla completa" +#: src/xo-interface.c:1442 +msgid "Cut" +msgstr "Retalla" -#: ../src/xo-interface.c:555 -msgid "_Zoom" -msgstr "_Ampliació" +#: src/xo-interface.c:1447 +msgid "Copy" +msgstr "Copia" -#: ../src/xo-interface.c:583 -msgid "Page _Width" -msgstr "Amplada de la _pàgina" - -#: ../src/xo-interface.c:594 -msgid "_Set Zoom" -msgstr "_Defineix l'ampliació" - -#: ../src/xo-interface.c:603 -msgid "_First Page" -msgstr "Pàgina _inicial" - -#: ../src/xo-interface.c:614 -msgid "_Previous Page" -msgstr "Pàgina an_terior" - -#: ../src/xo-interface.c:625 -msgid "_Next Page" -msgstr "Pàgina _següent" - -#: ../src/xo-interface.c:636 -msgid "_Last Page" -msgstr "Pàgina _final" - -#: ../src/xo-interface.c:652 -msgid "_Show Layer" -msgstr "_Mostra la capa" - -#: ../src/xo-interface.c:660 -msgid "_Hide Layer" -msgstr "_Oculta la capa" - -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:669 -msgid "_Journal" -msgstr "_Diari" - -#: ../src/xo-interface.c:676 -msgid "New Page _Before" -msgstr "Pàgina nova a_bans" - -#: ../src/xo-interface.c:680 -msgid "New Page _After" -msgstr "Pàgina nova _després" +#: src/xo-interface.c:1452 +msgid "Paste" +msgstr "Enganxa" -#: ../src/xo-interface.c:684 -msgid "New Page At _End" -msgstr "Pàgina nova al _final" +#: src/xo-interface.c:1465 +msgid "Undo" +msgstr "Desfés" -#: ../src/xo-interface.c:688 -msgid "_Delete Page" -msgstr "_Suprimeix la pàgina" +#: src/xo-interface.c:1470 +msgid "Redo" +msgstr "Refés" -#: ../src/xo-interface.c:697 -msgid "_New Layer" -msgstr "_Capa nova" +#: src/xo-interface.c:1483 +msgid "First Page" +msgstr "Primera pàgina" -#: ../src/xo-interface.c:701 -msgid "Delete La_yer" -msgstr "Suprimeix la ca_pa" +#: src/xo-interface.c:1488 +msgid "Previous Page" +msgstr "Pàgina anterior" -#: ../src/xo-interface.c:705 -msgid "_Flatten" -msgstr "A_plana" +#: src/xo-interface.c:1493 +msgid "Next Page" +msgstr "Pàgina següent" -#: ../src/xo-interface.c:714 -msgid "Paper Si_ze" -msgstr "Mida del _paper" +#: src/xo-interface.c:1498 +msgid "Last Page" +msgstr "Pàgina final" -#: ../src/xo-interface.c:718 -msgid "Paper _Color" -msgstr "_Color del paper" +#: src/xo-interface.c:1511 +msgid "Zoom Out" +msgstr "Redueix" -#: ../src/xo-interface.c:725 -msgid "_white paper" -msgstr "paper _blanc" +#: src/xo-interface.c:1516 src/xo-interface.c:3047 +msgid "Page Width" +msgstr "Amplada de la pàgina" -#: ../src/xo-interface.c:731 -msgid "_yellow paper" -msgstr "paper _groc" +#: src/xo-interface.c:1522 +msgid "Zoom In" +msgstr "Amplia" -#: ../src/xo-interface.c:737 -msgid "_pink paper" -msgstr "paper _rosa" +#: src/xo-interface.c:1527 +msgid "Normal Size" +msgstr "Mida normal" -#: ../src/xo-interface.c:743 -msgid "_orange paper" -msgstr "paper _taronja" +#: src/xo-interface.c:1532 src/xo-interface.c:3006 +msgid "Set Zoom" +msgstr "Definiu l'ampliació" -#: ../src/xo-interface.c:749 -msgid "_blue paper" -msgstr "paper _blau" +#: src/xo-interface.c:1541 +msgid "Toggle Fullscreen" +msgstr "Commuta la pantalla completa" -#: ../src/xo-interface.c:755 -msgid "_green paper" -msgstr "paper _verd" +#: src/xo-interface.c:1550 +#, fuzzy +msgid "Pencil" +msgstr "Llapis" -#: ../src/xo-interface.c:761 ../src/xo-interface.c:1032 -msgid "other..." -msgstr "un altre..." +#: src/xo-interface.c:1556 +msgid "Pen" +msgstr "Llapis" -#: ../src/xo-interface.c:772 -msgid "Paper _Style" -msgstr "E_stil del paper" +#: src/xo-interface.c:1561 src/xo-interface.c:1567 +msgid "Eraser" +msgstr "Esborrador" -#: ../src/xo-interface.c:779 -msgid "_plain" -msgstr "_llis" +#: src/xo-interface.c:1572 src/xo-interface.c:1578 +msgid "Highlighter" +msgstr "Marcador fluorescent" -#: ../src/xo-interface.c:785 -msgid "_lined" -msgstr "_pautat" +#: src/xo-interface.c:1583 src/xo-interface.c:1589 +msgid "Text" +msgstr "Text" -#: ../src/xo-interface.c:791 -msgid "_ruled" -msgstr "_reglat" +#: src/xo-interface.c:1594 src/xo-interface.c:1600 +msgid "Shape Recognizer" +msgstr "Reconeixedor de formes" -#: ../src/xo-interface.c:797 -msgid "_graph" -msgstr "_quadriculat" +#: src/xo-interface.c:1603 src/xo-interface.c:1609 +msgid "Ruler" +msgstr "Regle" -#: ../src/xo-interface.c:803 ../src/xo-interface.c:1038 -#: ../src/xo-interface.c:1287 ../src/xo-interface.c:1363 -msgid "NA" -msgstr "" +#: src/xo-interface.c:1620 src/xo-interface.c:1626 +msgid "Select Region" +msgstr "Selecciona una regió" -#: ../src/xo-interface.c:808 -msgid "Apply _To All Pages" -msgstr "Apli_ca a totes les pàgines" +#: src/xo-interface.c:1631 src/xo-interface.c:1637 +msgid "Select Rectangle" +msgstr "Selecciona un rectangle" -#: ../src/xo-interface.c:817 -msgid "_Load Background" -msgstr "_Carrega un fons" +#: src/xo-interface.c:1642 src/xo-interface.c:1648 +msgid "Vertical Space" +msgstr "Espai vertical" -#: ../src/xo-interface.c:825 -msgid "Background Screens_hot" -msgstr "Ca_ptura de pantalla del fons" +#: src/xo-interface.c:1653 +msgid "Hand Tool" +msgstr "Eina de mà" -#: ../src/xo-interface.c:834 -msgid "Default _Paper" -msgstr "Paper p_redeterminat" +#: src/xo-interface.c:1672 src/xo-interface.c:1676 +msgid "Default" +msgstr "Predeterminat" -#: ../src/xo-interface.c:838 -msgid "Set As De_fault" -msgstr "Defineix com a _predeterminat" +#: src/xo-interface.c:1680 src/xo-interface.c:1683 +msgid "Default Pen" +msgstr "Llapis predeterminat" -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:843 -msgid "_Tools" -msgstr "Ei_nes" +#: src/xo-interface.c:1694 src/xo-interface.c:1702 +msgid "Fine" +msgstr "Prim" -#: ../src/xo-interface.c:850 ../src/xo-interface.c:1223 -#: ../src/xo-interface.c:1299 -msgid "_Pen" -msgstr "_Llapis" +#: src/xo-interface.c:1707 src/xo-interface.c:1715 +msgid "Medium" +msgstr "Mitjà" -#: ../src/xo-interface.c:859 ../src/xo-interface.c:1229 -#: ../src/xo-interface.c:1305 -msgid "_Eraser" -msgstr "_Esborrador" +#: src/xo-interface.c:1720 src/xo-interface.c:1728 +msgid "Thick" +msgstr "Gruixut" -#: ../src/xo-interface.c:868 ../src/xo-interface.c:1235 -#: ../src/xo-interface.c:1311 -msgid "_Highlighter" -msgstr "_Marcador fluorescent" +#: src/xo-interface.c:1747 src/xo-interface.c:1754 +msgid "Black" +msgstr "Negre" -#: ../src/xo-interface.c:877 ../src/xo-interface.c:1241 -#: ../src/xo-interface.c:1317 -msgid "_Text" -msgstr "_Text" +#: src/xo-interface.c:1759 src/xo-interface.c:1766 +msgid "Blue" +msgstr "Blau" -#: ../src/xo-interface.c:891 -msgid "_Shape Recognizer" -msgstr "_Reconeixedor de formes" +#: src/xo-interface.c:1771 src/xo-interface.c:1778 +msgid "Red" +msgstr "Vermell" -#: ../src/xo-interface.c:898 -msgid "Ru_ler" -msgstr "Reg_le" +#: src/xo-interface.c:1783 src/xo-interface.c:1790 +msgid "Green" +msgstr "Verd" -#: ../src/xo-interface.c:910 ../src/xo-interface.c:1247 -#: ../src/xo-interface.c:1323 -msgid "Select Re_gion" -msgstr "Selecciona una re_gió" +#: src/xo-interface.c:1795 src/xo-interface.c:1802 +msgid "Gray" +msgstr "Gris" -#: ../src/xo-interface.c:919 ../src/xo-interface.c:1253 -#: ../src/xo-interface.c:1329 -msgid "Select _Rectangle" -msgstr "Selecciona un _rectangle" +#: src/xo-interface.c:1807 src/xo-interface.c:1814 +msgid "Light Blue" +msgstr "Blau cel" -#: ../src/xo-interface.c:928 ../src/xo-interface.c:1259 -#: ../src/xo-interface.c:1335 -msgid "_Vertical Space" -msgstr "Espai _vertical" +#: src/xo-interface.c:1819 src/xo-interface.c:1826 +msgid "Light Green" +msgstr "Verd clar" -#: ../src/xo-interface.c:937 ../src/xo-interface.c:1265 -#: ../src/xo-interface.c:1341 -msgid "H_and Tool" -msgstr "_Eina de mà" +#: src/xo-interface.c:1831 src/xo-interface.c:1838 +msgid "Magenta" +msgstr "Magenta" -#: ../src/xo-interface.c:950 -msgid "_Color" -msgstr "_Color" +#: src/xo-interface.c:1843 src/xo-interface.c:1850 +msgid "Orange" +msgstr "Taronja" -#: ../src/xo-interface.c:961 -msgid "blac_k" -msgstr "_negre" +#: src/xo-interface.c:1855 src/xo-interface.c:1862 +msgid "Yellow" +msgstr "Groc" -#: ../src/xo-interface.c:967 -msgid "_blue" -msgstr "_blau" +#: src/xo-interface.c:1867 src/xo-interface.c:1874 +msgid "White" +msgstr "Blanc" -#: ../src/xo-interface.c:973 -msgid "_red" -msgstr "_vermell" +#: src/xo-interface.c:1921 +msgid " Page " +msgstr " Pàgina " -#: ../src/xo-interface.c:979 -msgid "_green" -msgstr "v_erd" +#: src/xo-interface.c:1929 +msgid "Set page number" +msgstr "Defineix el número de pàgina" -#: ../src/xo-interface.c:985 -msgid "gr_ay" -msgstr "gri_s" +#: src/xo-interface.c:1933 +msgid " of n" +msgstr " de n" -#: ../src/xo-interface.c:996 -msgid "light bl_ue" -msgstr "blau _cel" +#: src/xo-interface.c:1941 +msgid " Layer: " +msgstr " Capa: " -#: ../src/xo-interface.c:1002 -msgid "light gr_een" -msgstr "ve_rd clar" +#: src/xo-interface.c:2828 +msgid "Set Paper Size" +msgstr "Estableix la mida del paper" -#: ../src/xo-interface.c:1008 -msgid "_magenta" -msgstr "_magenta" +#: src/xo-interface.c:2840 +msgid "Standard paper sizes:" +msgstr "Mides de paper estàndard:" -#: ../src/xo-interface.c:1014 -msgid "_orange" -msgstr "taron_ja" +#: src/xo-interface.c:2848 +msgid "A4" +msgstr "A4" -#: ../src/xo-interface.c:1020 -msgid "_yellow" -msgstr "gro_c" +#: src/xo-interface.c:2849 +msgid "A4 (landscape)" +msgstr "A4 (apaïsat)" -#: ../src/xo-interface.c:1026 -msgid "_white" -msgstr "b_lanc" +#: src/xo-interface.c:2850 +msgid "US Letter" +msgstr "Carta nord-americana" -#: ../src/xo-interface.c:1043 -msgid "Pen _Options" -msgstr "_Opcions del llapis" +#: src/xo-interface.c:2851 +msgid "US Letter (landscape)" +msgstr "Carta nord-americana (apaïsat)" -#: ../src/xo-interface.c:1050 -msgid "_very fine" -msgstr "mol_t prim" +#: src/xo-interface.c:2852 +msgid "Custom" +msgstr "Personalitzada" -#: ../src/xo-interface.c:1056 ../src/xo-interface.c:1087 -#: ../src/xo-interface.c:1135 -msgid "_fine" -msgstr "_prim" +#: src/xo-interface.c:2858 +#, fuzzy +msgid "Width:" +msgstr "Amplada de la pàgina" -#: ../src/xo-interface.c:1062 ../src/xo-interface.c:1093 -#: ../src/xo-interface.c:1141 -msgid "_medium" -msgstr "_mitjà" +#: src/xo-interface.c:2867 +#, fuzzy +msgid "Height:" +msgstr "Alçada de la pàgina" -#: ../src/xo-interface.c:1068 ../src/xo-interface.c:1099 -#: ../src/xo-interface.c:1147 -msgid "_thick" -msgstr "_gruixut" +#: src/xo-interface.c:2879 +msgid "cm" +msgstr "cm" -#: ../src/xo-interface.c:1074 -msgid "ver_y thick" -msgstr "_molt gruixut" +#: src/xo-interface.c:2880 +msgid "in" +msgstr "in" -#: ../src/xo-interface.c:1080 -msgid "Eraser Optio_ns" -msgstr "Opcions de l'_esborrador" +#: src/xo-interface.c:2881 +msgid "pixels" +msgstr "píxels" -#: ../src/xo-interface.c:1110 -msgid "_standard" -msgstr "e_stàndard" +#: src/xo-interface.c:2882 +msgid "points" +msgstr "punts" -#: ../src/xo-interface.c:1116 -msgid "_whiteout" -msgstr "nete_ja" +#: src/xo-interface.c:2942 +msgid "About Xournal" +msgstr "Quant al Xournal" -#: ../src/xo-interface.c:1122 -msgid "_delete strokes" -msgstr "su_primeix els traços" +#: src/xo-interface.c:2958 +msgid "" +"Written by Denis Auroux\n" +" http://xournal.sourceforge.net/ " +msgstr "" +"Creat per Denis Auroux\n" +" http://xournal.sourceforge.net/ " -#: ../src/xo-interface.c:1128 -msgid "Highlighter Opt_ions" -msgstr "Opc_ions del marcador fluorescent" +#: src/xo-interface.c:3022 +msgid "Zoom: " +msgstr "Ampliació: " -#: ../src/xo-interface.c:1153 -msgid "Text _Font..." -msgstr "_Tipus de lletra del text..." +#: src/xo-interface.c:3035 +msgid "%" +msgstr "" -#: ../src/xo-interface.c:1169 -msgid "_Default Pen" -msgstr "_Llapis predeterminat" +#: src/xo-interface.c:3040 +msgid "Normal size (100%)" +msgstr "Mida normal (100%)" -#: ../src/xo-interface.c:1173 -msgid "Default Eraser" -msgstr "Esborrador predeterminat" +#: src/xo-interface.c:3054 +msgid "Page Height" +msgstr "Alçada de la pàgina" -#: ../src/xo-interface.c:1177 -msgid "Default Highlighter" -msgstr "Marcador fluorescent predeterminat" +#. user aborted on save confirmation +#: src/xo-callbacks.c:53 src/xo-file.c:664 +msgid "Open PDF" +msgstr "Obre un fitxer PDF" -#: ../src/xo-interface.c:1181 -msgid "Default Te_xt" -msgstr "Te_xt predeterminat" +#: src/xo-callbacks.c:58 src/xo-callbacks.c:129 src/xo-callbacks.c:227 +#: src/xo-callbacks.c:380 src/xo-callbacks.c:1451 src/xo-file.c:669 +msgid "All files" +msgstr "Tots els fitxers" -#: ../src/xo-interface.c:1185 -msgid "Set As Default" -msgstr "Defineix-lo com a predeterminat" +#: src/xo-callbacks.c:61 src/xo-callbacks.c:383 src/xo-file.c:672 +msgid "PDF files" +msgstr "Fitxers PDF" -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:1190 -msgid "_Options" -msgstr "_Opcions" +#: src/xo-callbacks.c:69 src/xo-callbacks.c:1474 +msgid "Attach file to the journal" +msgstr "Adjunta el fitxer al diari" -#: ../src/xo-interface.c:1197 -msgid "Use _XInput" -msgstr "Utilitza l'_XInput" +#. user aborted on save confirmation +#: src/xo-callbacks.c:124 +msgid "Open Journal" +msgstr "Obre un diari" -#: ../src/xo-interface.c:1201 -msgid "Discard _Core Events" -msgstr "Descarta els esdeveniments _primaris" +#: src/xo-callbacks.c:132 src/xo-callbacks.c:230 +msgid "Xournal files" +msgstr "Fitxers del Xournal" -#. TRANSLATORS: If this option is turned on and the XInput extensions are -#. enabled, then the eraser tip of the tablet's stylus will automatically be -#. remapped to the eraser tool -#: ../src/xo-interface.c:1208 -msgid "_Eraser Tip" -msgstr "Utilitza la goma del _llapis" +#: src/xo-callbacks.c:182 src/xo-callbacks.c:275 +#, c-format +msgid "Error saving file '%s'" +msgstr "S'ha produït un error en desar el fitxer «%s»" -#: ../src/xo-interface.c:1212 -msgid "_Pressure sensitivity" -msgstr "Sensibilitat de la _pressió" +#: src/xo-callbacks.c:202 +msgid "Save Journal" +msgstr "Desa el diari" -#: ../src/xo-interface.c:1216 -msgid "Button _2 Mapping" -msgstr "Mapatge del botó _2" +#: src/xo-callbacks.c:256 src/xo-callbacks.c:401 +#, c-format +msgid "Should the file %s be overwritten?" +msgstr "Voleu sobreescriure el fitxer %s?" -#: ../src/xo-interface.c:1275 ../src/xo-interface.c:1351 -msgid "_Link to Primary Brush" -msgstr "_Vincula al pinzell primari" +#: src/xo-callbacks.c:357 +msgid "Export to PDF" +msgstr "Exporta a PDF" -#: ../src/xo-interface.c:1281 ../src/xo-interface.c:1357 -msgid "_Copy of Current Brush" -msgstr "_Copia el pinzell actual" +#: src/xo-callbacks.c:414 +#, c-format +msgid "Error creating file '%s'" +msgstr "S'ha produït un error en crear el fitxer «%s»" -#: ../src/xo-interface.c:1292 -msgid "Button _3 Mapping" -msgstr "Mapatge del botó _3" +#: src/xo-callbacks.c:1446 +msgid "Open Background" +msgstr "Obre un fons" -#: ../src/xo-interface.c:1373 -msgid "_Antialiased Bitmaps" -msgstr "Mapes de bits amb antialiàsin_g" +#: src/xo-callbacks.c:1459 +msgid "Bitmap files" +msgstr "Fitxers de mapa de bits" -#: ../src/xo-interface.c:1377 -msgid "_Progressive Backgrounds" -msgstr "Fons _progressius" +#: src/xo-callbacks.c:1467 +msgid "PS/PDF files (as bitmaps)" +msgstr "Fitxers PS/PDF (com a mapes de bits)" -#: ../src/xo-interface.c:1381 -msgid "Print Paper _Ruling" -msgstr "Imprimeix les _línies del paper" +#: src/xo-callbacks.c:1497 +#, c-format +msgid "Error opening background '%s'" +msgstr "S'ha produït un error en obrir el fons «%s»" -#: ../src/xo-interface.c:1385 -msgid "Left-Handed Scrollbar" -msgstr "Barra de desplaçament per a esquerrans" +#: src/xo-callbacks.c:2054 +msgid "Select Font" +msgstr "Seleccioneu el tipus de lletra" -#: ../src/xo-interface.c:1389 -msgid "Shorten _Menus" -msgstr "Escurça els _menús" +#: src/xo-callbacks.c:2429 +msgid "" +"Drawing is not allowed on the background layer.\n" +" Switching to Layer 1." +msgstr "" +"No es pot dibuixar a la capa de fons.\n" +" Es commutarà a la capa 1." -#: ../src/xo-interface.c:1398 -msgid "A_uto-Save Preferences" -msgstr "Desa les preferències a_utomàticament" +#: src/xo-support.c:90 src/xo-support.c:114 +#, c-format +msgid "Couldn't find pixmap file: %s" +msgstr "No s'ha trobat el fitxer de mapa de píxels: %s" -#: ../src/xo-interface.c:1402 -msgid "_Save Preferences" -msgstr "_Desa les preferències" +#: src/xo-file.c:122 src/xo-file.c:154 +#, c-format +msgid "Could not write background '%s'. Continuing anyway." +msgstr "" -#. TRANSLATORS: This is a top menu -#: ../src/xo-interface.c:1407 -msgid "_Help" -msgstr "A_juda" +#: src/xo-file.c:251 +#, c-format +msgid "Invalid file contents" +msgstr "Els continguts del fitxer no són vàlids" -#: ../src/xo-interface.c:1418 -msgid "_About" -msgstr "_Quant a" +#: src/xo-file.c:401 +#, c-format +msgid "Could not open background '%s'. Setting background to white." +msgstr "" -#: ../src/xo-interface.c:1431 -msgid "Save" -msgstr "Desa" +#: src/xo-file.c:659 +#, c-format +msgid "" +"Could not open background '%s'.\n" +"Select another file?" +msgstr "" -#: ../src/xo-interface.c:1436 -msgid "New" -msgstr "Nova" +#: src/xo-file.c:772 +#, c-format +msgid "Could not open background '%s'." +msgstr "" -#: ../src/xo-interface.c:1441 -msgid "Open" -msgstr "Obre" +#: src/xo-file.c:999 +msgid "Unable to render one or more PDF pages." +msgstr "" -#: ../src/xo-interface.c:1454 -msgid "Cut" -msgstr "Retalla" +#: src/xo-file.c:1392 +msgid " the display resolution, in pixels per inch" +msgstr "" -#: ../src/xo-interface.c:1459 -msgid "Copy" -msgstr "Copia" +#: src/xo-file.c:1395 +msgid " the initial zoom level, in percent" +msgstr "" -#: ../src/xo-interface.c:1464 -msgid "Paste" -msgstr "Enganxa" +#: src/xo-file.c:1398 +msgid " maximize the window at startup (true/false)" +msgstr "" -#: ../src/xo-interface.c:1477 -msgid "Undo" -msgstr "Desfés" +#: src/xo-file.c:1401 +msgid " start in full screen mode (true/false)" +msgstr "" -#: ../src/xo-interface.c:1482 -msgid "Redo" -msgstr "Refés" +#: src/xo-file.c:1404 +msgid " the window width in pixels (when not maximized)" +msgstr "" -#: ../src/xo-interface.c:1495 -msgid "First Page" -msgstr "Primera pàgina" +#: src/xo-file.c:1407 +msgid " the window height in pixels" +msgstr "" -#: ../src/xo-interface.c:1500 -msgid "Previous Page" -msgstr "Pàgina anterior" +#: src/xo-file.c:1410 +msgid " scrollbar step increment (in pixels)" +msgstr "" -#: ../src/xo-interface.c:1505 -msgid "Next Page" -msgstr "Pàgina següent" +#: src/xo-file.c:1413 +msgid " the step increment in the zoom dialog box" +msgstr "" -#: ../src/xo-interface.c:1510 -msgid "Last Page" -msgstr "Pàgina final" +#: src/xo-file.c:1416 +msgid " the multiplicative factor for zoom in/out" +msgstr "" -#: ../src/xo-interface.c:1523 -msgid "Zoom Out" -msgstr "Redueix" +#: src/xo-file.c:1419 +msgid " document view (true = continuous, false = single page)" +msgstr "" -#: ../src/xo-interface.c:1528 ../src/xo-interface.c:3046 -msgid "Page Width" -msgstr "Amplada de la pàgina" +#: src/xo-file.c:1422 +msgid " use XInput extensions (true/false)" +msgstr "" -#: ../src/xo-interface.c:1534 -msgid "Zoom In" -msgstr "Amplia" +#: src/xo-file.c:1425 +msgid " discard Core Pointer events in XInput mode (true/false)" +msgstr "" -#: ../src/xo-interface.c:1539 -msgid "Normal Size" -msgstr "Mida normal" +#: src/xo-file.c:1428 +msgid " always map eraser tip to eraser (true/false)" +msgstr "" -#: ../src/xo-interface.c:1544 ../src/xo-interface.c:3005 -msgid "Set Zoom" -msgstr "Definiu l'ampliació" +#: src/xo-file.c:1431 +msgid "" +" buttons 2 and 3 switch mappings instead of drawing (useful for some " +"tablets) (true/false)" +msgstr "" -#: ../src/xo-interface.c:1553 -msgid "Toggle Fullscreen" -msgstr "Commuta la pantalla completa" +#: src/xo-file.c:1434 +msgid " default path for open/save (leave blank for current directory)" +msgstr "" -#: ../src/xo-interface.c:1562 ../src/xo-interface.c:1568 -msgid "Pen" -msgstr "Llapis" +#: src/xo-file.c:1437 +msgid " use pressure sensitivity to control pen stroke width (true/false)" +msgstr "" -#: ../src/xo-interface.c:1573 ../src/xo-interface.c:1579 -msgid "Eraser" -msgstr "Esborrador" +#: src/xo-file.c:1440 +msgid " minimum width multiplier" +msgstr "" -#: ../src/xo-interface.c:1584 ../src/xo-interface.c:1590 -msgid "Highlighter" -msgstr "Marcador fluorescent" +#: src/xo-file.c:1443 +msgid " maximum width multiplier" +msgstr "" -#: ../src/xo-interface.c:1595 ../src/xo-interface.c:1601 -msgid "Text" -msgstr "Text" +#: src/xo-file.c:1446 +msgid "" +" interface components from top to bottom\n" +" valid values: drawarea menu main_toolbar pen_toolbar statusbar" +msgstr "" -#: ../src/xo-interface.c:1606 ../src/xo-interface.c:1612 -msgid "Shape Recognizer" -msgstr "Reconeixedor de formes" +#: src/xo-file.c:1449 +msgid " interface components in fullscreen mode, from top to bottom" +msgstr "" -#: ../src/xo-interface.c:1615 ../src/xo-interface.c:1621 -msgid "Ruler" -msgstr "Regle" +#: src/xo-file.c:1452 +msgid " interface has left-handed scrollbar (true/false)" +msgstr "" -#: ../src/xo-interface.c:1632 ../src/xo-interface.c:1638 -msgid "Select Region" -msgstr "Selecciona una regió" +#: src/xo-file.c:1455 +msgid " hide some unwanted menu or toolbar items (true/false)" +msgstr "" -#: ../src/xo-interface.c:1643 ../src/xo-interface.c:1649 -msgid "Select Rectangle" -msgstr "Selecciona un rectangle" +#: src/xo-file.c:1458 +msgid "" +" interface items to hide (customize at your own risk!)\n" +" see source file xo-interface.c for a list of item names" +msgstr "" -#: ../src/xo-interface.c:1654 ../src/xo-interface.c:1660 -msgid "Vertical Space" -msgstr "Espai vertical" +#: src/xo-file.c:1461 +msgid "" +" highlighter opacity (0 to 1, default 0.5)\n" +" warning: opacity level is not saved in xoj files!" +msgstr "" -#: ../src/xo-interface.c:1665 ../src/xo-interface.c:1671 -msgid "Hand Tool" -msgstr "Eina de mà" +#: src/xo-file.c:1464 +msgid " auto-save preferences on exit (true/false)" +msgstr "" -#: ../src/xo-interface.c:1685 ../src/xo-interface.c:1689 -msgid "Default" -msgstr "Predeterminat" +#: src/xo-file.c:1468 +msgid " the default page width, in points (1/72 in)" +msgstr "" -#: ../src/xo-interface.c:1693 ../src/xo-interface.c:1696 -msgid "Default Pen" -msgstr "Llapis predeterminat" +#: src/xo-file.c:1471 +msgid " the default page height, in points (1/72 in)" +msgstr "" -#: ../src/xo-interface.c:1707 ../src/xo-interface.c:1715 -msgid "Fine" -msgstr "Prim" +#: src/xo-file.c:1474 +msgid " the default paper color" +msgstr "" -#: ../src/xo-interface.c:1720 ../src/xo-interface.c:1728 -msgid "Medium" -msgstr "Mitjà" +#: src/xo-file.c:1479 +msgid " the default paper style (plain, lined, ruled, or graph)" +msgstr "" -#: ../src/xo-interface.c:1733 ../src/xo-interface.c:1741 -msgid "Thick" -msgstr "Gruixut" +#: src/xo-file.c:1482 +msgid " apply paper style changes to all pages (true/false)" +msgstr "" -#: ../src/xo-interface.c:1760 ../src/xo-interface.c:1767 -msgid "Black" -msgstr "Negre" +#: src/xo-file.c:1485 +msgid " preferred unit (cm, in, px, pt)" +msgstr "" -#: ../src/xo-interface.c:1772 ../src/xo-interface.c:1779 -msgid "Blue" -msgstr "Blau" +#: src/xo-file.c:1488 +msgid " include paper ruling when printing or exporting to PDF (true/false)" +msgstr "" -#: ../src/xo-interface.c:1784 ../src/xo-interface.c:1791 -msgid "Red" -msgstr "Vermell" +#: src/xo-file.c:1491 +msgid " just-in-time update of page backgrounds (true/false)" +msgstr "" -#: ../src/xo-interface.c:1796 ../src/xo-interface.c:1803 -msgid "Green" -msgstr "Verd" +#: src/xo-file.c:1494 +msgid "" +" bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)" +msgstr "" -#: ../src/xo-interface.c:1808 ../src/xo-interface.c:1815 -msgid "Gray" -msgstr "Gris" +#: src/xo-file.c:1497 +msgid "" +" bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)" +msgstr "" -#: ../src/xo-interface.c:1820 ../src/xo-interface.c:1827 -msgid "Light Blue" -msgstr "Blau cel" +#: src/xo-file.c:1501 +msgid "" +" selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, " +"hand)" +msgstr "" -#: ../src/xo-interface.c:1832 ../src/xo-interface.c:1839 -msgid "Light Green" -msgstr "Verd clar" +#: src/xo-file.c:1504 +msgid " default pen color" +msgstr "" -#: ../src/xo-interface.c:1844 ../src/xo-interface.c:1851 -msgid "Magenta" -msgstr "Magenta" +#: src/xo-file.c:1509 +msgid " default pen thickness (fine = 1, medium = 2, thick = 3)" +msgstr "" -#: ../src/xo-interface.c:1856 ../src/xo-interface.c:1863 -msgid "Orange" -msgstr "Taronja" +#: src/xo-file.c:1512 +msgid " default pen is in ruler mode (true/false)" +msgstr "" -#: ../src/xo-interface.c:1868 ../src/xo-interface.c:1875 -msgid "Yellow" -msgstr "Groc" +#: src/xo-file.c:1515 +msgid " default pen is in shape recognizer mode (true/false)" +msgstr "" -#: ../src/xo-interface.c:1880 ../src/xo-interface.c:1887 -msgid "White" -msgstr "Blanc" +#: src/xo-file.c:1518 +msgid " default eraser thickness (fine = 1, medium = 2, thick = 3)" +msgstr "" -#: ../src/xo-interface.c:1923 -msgid " Page " -msgstr " Pàgina " +#: src/xo-file.c:1521 +msgid " default eraser mode (standard = 0, whiteout = 1, strokes = 2)" +msgstr "" -#: ../src/xo-interface.c:1932 -msgid "Set page number" -msgstr "Defineix el número de pàgina" +#: src/xo-file.c:1524 +msgid " default highlighter color" +msgstr "" -#. TRANSLATORS: This text refers to 'Page m of n', where n is the total -#. number of pages -#: ../src/xo-interface.c:1938 -msgid " of n" -msgstr " de n" +#: src/xo-file.c:1529 +msgid " default highlighter thickness (fine = 1, medium = 2, thick = 3)" +msgstr "" -#: ../src/xo-interface.c:1946 -msgid " Layer: " -msgstr " Capa: " +#: src/xo-file.c:1532 +msgid " default highlighter is in ruler mode (true/false)" +msgstr "" -#: ../src/xo-interface.c:2827 -msgid "Set Paper Size" -msgstr "Estableix la mida del paper" +#: src/xo-file.c:1535 +msgid " default highlighter is in shape recognizer mode (true/false)" +msgstr "" -#: ../src/xo-interface.c:2839 -msgid "Standard paper sizes:" -msgstr "Mides de paper estàndard:" +#: src/xo-file.c:1538 +msgid "" +" button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)" +msgstr "" -#: ../src/xo-interface.c:2847 -msgid "A4" -msgstr "A4" +#: src/xo-file.c:1541 +msgid "" +" button 2 brush linked to primary brush (true/false) (overrides all other " +"settings)" +msgstr "" -#: ../src/xo-interface.c:2848 -msgid "A4 (landscape)" -msgstr "A4 (apaïsat)" +#: src/xo-file.c:1544 +msgid " button 2 brush color (for pen or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:2849 -msgid "US Letter" -msgstr "Carta nord-americana" +#: src/xo-file.c:1551 +msgid " button 2 brush thickness (pen, eraser, or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:2850 -msgid "US Letter (landscape)" -msgstr "Carta nord-americana (apaïsat)" +#: src/xo-file.c:1555 +msgid " button 2 ruler mode (true/false) (for pen or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:2851 -msgid "Custom" -msgstr "Personalitzada" +#: src/xo-file.c:1559 +msgid " button 2 shape recognizer mode (true/false) (pen or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:2878 -msgid "cm" -msgstr "cm" +#: src/xo-file.c:1563 +msgid " button 2 eraser mode (eraser only)" +msgstr "" -#: ../src/xo-interface.c:2879 -msgid "in" -msgstr "in" +#: src/xo-file.c:1566 +msgid "" +" button 3 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)" +msgstr "" -#: ../src/xo-interface.c:2880 -msgid "pixels" -msgstr "píxels" +#: src/xo-file.c:1569 +msgid "" +" button 3 brush linked to primary brush (true/false) (overrides all other " +"settings)" +msgstr "" -#: ../src/xo-interface.c:2881 -msgid "points" -msgstr "punts" +#: src/xo-file.c:1572 +msgid " button 3 brush color (for pen or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:2941 -msgid "About Xournal" -msgstr "Quant al Xournal" +#: src/xo-file.c:1579 +msgid " button 3 brush thickness (pen, eraser, or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:2957 -msgid "" -"Written by Denis Auroux\n" -" http://xournal.sourceforge.net/ " +#: src/xo-file.c:1583 +msgid " button 3 ruler mode (true/false) (for pen or highlighter only)" msgstr "" -"Creat per Denis Auroux\n" -" http://xournal.sourceforge.net/ " -#: ../src/xo-interface.c:3021 -msgid "Zoom: " -msgstr "Ampliació: " +#: src/xo-file.c:1587 +msgid " button 3 shape recognizer mode (true/false) (pen or highlighter only)" +msgstr "" -#: ../src/xo-interface.c:3039 -msgid "Normal size (100%)" -msgstr "Mida normal (100%)" +#: src/xo-file.c:1591 +msgid " button 3 eraser mode (eraser only)" +msgstr "" -#: ../src/xo-interface.c:3053 -msgid "Page Height" -msgstr "Alçada de la pàgina" +#: src/xo-file.c:1595 +msgid " thickness of the various pens (in points, 1 pt = 1/72 in)" +msgstr "" -#: ../src/xo-shapes.c:413 -#, c-format -msgid "arrow: alpha[%d] = %.1f degrees\n" +#: src/xo-file.c:1601 +msgid " thickness of the various erasers (in points, 1 pt = 1/72 in)" msgstr "" -#: ../src/xo-shapes.c:429 -#, c-format -msgid "linear tolerance: tip[%d] = %.2f\n" +#: src/xo-file.c:1606 +msgid " thickness of the various highlighters (in points, 1 pt = 1/72 in)" msgstr "" -#: ../src/xo-shapes.c:436 -#, c-format -msgid "sideways gap tolerance = %.2f\n" +#: src/xo-file.c:1611 +msgid " name of the default font" msgstr "" -#: ../src/xo-shapes.c:442 -#, c-format -msgid "main linear gap = %.2f\n" +#: src/xo-file.c:1614 +msgid " default font size" msgstr "" -#: ../src/xo-shapes.c:539 -#, c-format +#: src/xo-file.c:1792 msgid "" -"Mass=%.0f, Center=(%.1f,%.1f), I=(%.0f,%.0f, %.0f), Rad=%.2f, Det=%.4f \n" +" Xournal configuration file.\n" +" This file is generated automatically upon saving preferences.\n" +" Use caution when editing this file manually.\n" msgstr "" -#: ../src/xo-shapes.c:549 +#: src/xo-misc.c:1261 #, c-format -msgid "Polygon, %d edges: " -msgstr "" +msgid " of %d" +msgstr " de %d" -#: ../src/xo-shapes.c:551 +#: src/xo-misc.c:1266 +msgid "Background" +msgstr "Fons" + +#: src/xo-misc.c:1274 #, c-format -msgid "%d-%d (M=%.0f, det=%.4f) " -msgstr "" +msgid "Layer %d" +msgstr "Capa %d" -#: ../src/xo-shapes.c:564 +#: src/xo-misc.c:1396 #, c-format -msgid "Queue now has %d + %d edges\n" -msgstr "" +msgid "Xournal - %s" +msgstr "Xournal - %s" -#: ../src/xo-shapes.c:605 +#: src/xo-misc.c:1649 #, c-format -msgid "Circle score: %.2f\n" -msgstr "" +msgid "Save changes to '%s'?" +msgstr "Voleu desar els canvis al fitxer «%s»?" + +#: src/xo-misc.c:1650 +msgid "Untitled" +msgstr "Sense títol" + diff --git a/po/fr.po b/po/fr.po index 0034cf5..743976f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: xournal 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-30 17:00-0700\n" +"POT-Creation-Date: 2009-09-20 23:57-0700\n" "PO-Revision-Date: 2009-08-30 17:00-0700\n" "Last-Translator: Denis Auroux window vs canvas in 2.17) -- color chooser button (patch tracker?) -- option to have buttons *toggle* the tool rather than act as tool - (ie button 2 causes button 1 to map to tool 2) [Dylan Thurston] -** auto-hide patch from ~/prog/src/xournal-autohide/ ? - (check for cpu usage, add flag if need be; handle BOTH edges +- auto-hide patch from ~/prog/src/xournal-autohide/ ? + (check for cpu usage; handle BOTH edges and only (un)hide stuff at the correct edge!) ** if bg pdf not found in absolute path, look in path of xoj file before prompting user. @@ -67,7 +69,6 @@ DONE: use gtk-print instead of libgnomeprint ** UI update (Bob McElrath) -- eliminating status bar, compact layout, "compact interface" by default; themes, with line in config file to load pixmaps from pixmaps/$THEME/ (see Jan 9, 2009 emails) -** antialias BG pixmaps doesn't do anything anymore? ** autosave patch (Edward Yang) (fix: optional only, w/ menu + cfgfile entries; fix: should clean up autosave.xoj.bg* files too; config interval) - patch (ikim@physics.wisc.edu): multicolumn mode + LASSO SELECTION @@ -121,9 +122,7 @@ DONE: use gtk-print instead of libgnomeprint - smoothing of strokes (for users without tablets / with deficient drivers) - lasso tool -- load PDF pages only on demand (create empty pixmaps at first if can - parse PDF geometry ourselves, else try pdfinfo ??) - (and config option to limit total memory usage for PDF bitmaps) +- add config option to limit total memory usage for PDF bitmaps - ability to select entire page for copy-paste (as bitmap / reorder xournal) - copy/paste of an entire page (beware if PDF bg is not compatible!) - rewrite printing using GtkPrint + Cairo as GnomePrint replacement diff --git a/src/main.c b/src/main.c index 129716a..2a2dbda 100644 --- a/src/main.c +++ b/src/main.c @@ -89,9 +89,11 @@ void init_stuff (int argc, char *argv[]) for (i=0; i < NUM_STROKE_TOOLS; i++) { b = &(ui.brushes[j][i]); b->tool_type = i; - b->color_rgba = predef_colors_rgba[b->color_no]; - if (i == TOOL_HIGHLIGHTER) { - b->color_rgba &= ui.hiliter_alpha_mask; + if (b->color_no>=0) { + b->color_rgba = predef_colors_rgba[b->color_no]; + if (i == TOOL_HIGHLIGHTER) { + b->color_rgba &= ui.hiliter_alpha_mask; + } } b->thickness = predef_thickness[i][b->thickness_no]; } @@ -118,6 +120,7 @@ void init_stuff (int argc, char *argv[]) GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonFullscreen")), TRUE); gtk_window_fullscreen(GTK_WINDOW(winMain)); } + gtk_button_set_relief(GTK_BUTTON(GET_COMPONENT("buttonColorChooser")), GTK_RELIEF_NONE); allow_all_accels(); add_scroll_bindings(); @@ -190,8 +193,6 @@ void init_stuff (int argc, char *argv[]) ui.use_xinput = ui.allow_xinput && can_xinput; ui.need_emergency_disable_xinput = FALSE; - gtk_check_menu_item_set_active( - GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsAntialiasBG")), ui.antialias_bg); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsProgressiveBG")), ui.progressive_bg); gtk_check_menu_item_set_active( @@ -202,6 +203,8 @@ void init_stuff (int argc, char *argv[]) GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsShortenMenus")), ui.shorten_menus); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsAutoSavePrefs")), ui.auto_save_prefs); + gtk_check_menu_item_set_active( + GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsButtonSwitchMapping")), ui.button_switch_mapping); hide_unimplemented(); diff --git a/src/xo-callbacks.c b/src/xo-callbacks.c index 34a7c89..71771cd 100644 --- a/src/xo-callbacks.c +++ b/src/xo-callbacks.c @@ -1654,14 +1654,15 @@ on_toolsPen_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; - if (ui.toolno[0] == TOOL_PEN) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated + if (ui.toolno[ui.cur_mapping] == TOOL_PEN) return; + ui.cur_mapping = 0; // don't use switch_mapping() (refreshes buttons too soon) end_text(); reset_focus(); reset_selection(); - ui.toolno[0] = TOOL_PEN; - ui.cur_brush = &(ui.brushes[0][TOOL_PEN]); + ui.toolno[ui.cur_mapping] = TOOL_PEN; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_PEN]); ui.cur_brush->ruler = ui.default_brushes[TOOL_PEN].ruler; ui.cur_brush->recognizer = ui.default_brushes[TOOL_PEN].recognizer; update_mapping_linkings(TOOL_PEN); @@ -1684,14 +1685,15 @@ on_toolsEraser_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; - if (ui.toolno[0] == TOOL_ERASER) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated + if (ui.toolno[ui.cur_mapping] == TOOL_ERASER) return; + ui.cur_mapping = 0; // don't use switch_mapping() (refreshes buttons too soon) end_text(); reset_focus(); reset_selection(); - ui.toolno[0] = TOOL_ERASER; - ui.cur_brush = &(ui.brushes[0][TOOL_ERASER]); + ui.toolno[ui.cur_mapping] = TOOL_ERASER; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_ERASER]); update_mapping_linkings(TOOL_ERASER); update_tool_buttons(); update_tool_menu(); @@ -1712,14 +1714,15 @@ on_toolsHighlighter_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; // not user-generated - if (ui.toolno[0] == TOOL_HIGHLIGHTER) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated + if (ui.toolno[ui.cur_mapping] == TOOL_HIGHLIGHTER) return; + ui.cur_mapping = 0; // don't use switch_mapping() (refreshes buttons too soon) end_text(); reset_focus(); reset_selection(); - ui.toolno[0] = TOOL_HIGHLIGHTER; - ui.cur_brush = &(ui.brushes[0][TOOL_HIGHLIGHTER]); + ui.toolno[ui.cur_mapping] = TOOL_HIGHLIGHTER; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_HIGHLIGHTER]); ui.cur_brush->ruler = ui.default_brushes[TOOL_HIGHLIGHTER].ruler; ui.cur_brush->recognizer = ui.default_brushes[TOOL_HIGHLIGHTER].recognizer; update_mapping_linkings(TOOL_HIGHLIGHTER); @@ -1742,13 +1745,14 @@ on_toolsText_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; // not user-generated - if (ui.toolno[0] == TOOL_TEXT) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated + if (ui.toolno[ui.cur_mapping] == TOOL_TEXT) return; + ui.cur_mapping = 0; // don't use switch_mapping() (refreshes buttons too soon) reset_focus(); reset_selection(); - ui.toolno[0] = TOOL_TEXT; - ui.cur_brush = &(ui.brushes[0][TOOL_PEN]); + ui.toolno[ui.cur_mapping] = TOOL_TEXT; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_PEN]); update_mapping_linkings(-1); update_tool_buttons(); update_tool_menu(); @@ -1777,12 +1781,13 @@ on_toolsSelectRectangle_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; // not user-generated - if (ui.toolno[0] == TOOL_SELECTRECT) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated + if (ui.toolno[ui.cur_mapping] == TOOL_SELECTRECT) return; + ui.cur_mapping = 0; // don't use switch_mapping() (refreshes buttons too soon) end_text(); reset_focus(); - ui.toolno[0] = TOOL_SELECTRECT; + ui.toolno[ui.cur_mapping] = TOOL_SELECTRECT; update_mapping_linkings(-1); update_tool_buttons(); update_tool_menu(); @@ -1803,13 +1808,14 @@ on_toolsVerticalSpace_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; // not user-generated - if (ui.toolno[0] == TOOL_VERTSPACE) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated + if (ui.toolno[ui.cur_mapping] == TOOL_VERTSPACE) return; + ui.cur_mapping = 0; // don't use switch_mapping() (refreshes buttons too soon) end_text(); reset_focus(); reset_selection(); - ui.toolno[0] = TOOL_VERTSPACE; + ui.toolno[ui.cur_mapping] = TOOL_VERTSPACE; update_mapping_linkings(-1); update_tool_buttons(); update_tool_menu(); @@ -1822,7 +1828,7 @@ void on_colorBlack_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_BLACK); + process_color_activate(menuitem, COLOR_BLACK, predef_colors_rgba[COLOR_BLACK]); } @@ -1830,8 +1836,7 @@ void on_colorBlue_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_BLUE); - + process_color_activate(menuitem, COLOR_BLUE, predef_colors_rgba[COLOR_BLUE]); } @@ -1839,7 +1844,7 @@ void on_colorRed_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_RED); + process_color_activate(menuitem, COLOR_RED, predef_colors_rgba[COLOR_RED]); } @@ -1847,7 +1852,7 @@ void on_colorGreen_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_GREEN); + process_color_activate(menuitem, COLOR_GREEN, predef_colors_rgba[COLOR_GREEN]); } @@ -1855,7 +1860,7 @@ void on_colorGray_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_GRAY); + process_color_activate(menuitem, COLOR_GRAY, predef_colors_rgba[COLOR_GRAY]); } @@ -1863,7 +1868,7 @@ void on_colorLightBlue_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_LIGHTBLUE); + process_color_activate(menuitem, COLOR_LIGHTBLUE, predef_colors_rgba[COLOR_LIGHTBLUE]); } @@ -1871,7 +1876,7 @@ void on_colorLightGreen_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_LIGHTGREEN); + process_color_activate(menuitem, COLOR_LIGHTGREEN, predef_colors_rgba[COLOR_LIGHTGREEN]); } @@ -1879,7 +1884,7 @@ void on_colorMagenta_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_MAGENTA); + process_color_activate(menuitem, COLOR_MAGENTA, predef_colors_rgba[COLOR_MAGENTA]); } @@ -1887,7 +1892,7 @@ void on_colorOrange_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_ORANGE); + process_color_activate(menuitem, COLOR_ORANGE, predef_colors_rgba[COLOR_ORANGE]); } @@ -1895,7 +1900,7 @@ void on_colorYellow_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_YELLOW); + process_color_activate(menuitem, COLOR_YELLOW, predef_colors_rgba[COLOR_YELLOW]); } @@ -1903,7 +1908,7 @@ void on_colorWhite_activate (GtkMenuItem *menuitem, gpointer user_data) { - process_color_activate(menuitem, COLOR_WHITE); + process_color_activate(menuitem, COLOR_WHITE, predef_colors_rgba[COLOR_WHITE]); } @@ -1911,7 +1916,7 @@ void on_colorOther_activate (GtkMenuItem *menuitem, gpointer user_data) { - + gtk_button_clicked(GTK_BUTTON(GET_COMPONENT("buttonColorChooser"))); } @@ -2152,10 +2157,11 @@ on_toolsSetAsDefault_activate (GtkMenuItem *menuitem, { struct Item *it; - if (ui.cur_mapping!=0) return; - if (ui.toolno[0] < NUM_STROKE_TOOLS) - g_memmove(ui.default_brushes+ui.toolno[0], &(ui.brushes[0][ui.toolno[0]]), sizeof(struct Brush)); - if (ui.toolno[0] == TOOL_TEXT) { + if (ui.cur_mapping!=0 && !ui.button_switch_mapping) return; + if (ui.toolno[ui.cur_mapping] < NUM_STROKE_TOOLS) + g_memmove(ui.default_brushes+ui.toolno[ui.cur_mapping], + &(ui.brushes[ui.cur_mapping][ui.toolno[ui.cur_mapping]]), sizeof(struct Brush)); + if (ui.toolno[ui.cur_mapping] == TOOL_TEXT) { if (ui.cur_item_type == ITEM_TEXT) { g_free(ui.font_name); ui.font_name = g_strdup(ui.cur_item->font_name); @@ -2188,16 +2194,17 @@ on_toolsRuler_activate (GtkMenuItem *menuitem, else active = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON (menuitem)); - if (ui.cur_mapping != 0) return; - current = (ui.toolno[0] == TOOL_PEN || ui.toolno[0] == TOOL_HIGHLIGHTER) && ui.cur_brush->ruler; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; + current = (ui.toolno[ui.cur_mapping] == TOOL_PEN || ui.toolno[ui.cur_mapping] == TOOL_HIGHLIGHTER) && ui.cur_brush->ruler; if (active == current) return; - + + ui.cur_mapping = 0; end_text(); reset_focus(); - if (ui.toolno[0]!=TOOL_PEN && ui.toolno[0]!=TOOL_HIGHLIGHTER) { + if (ui.toolno[ui.cur_mapping]!=TOOL_PEN && ui.toolno[ui.cur_mapping]!=TOOL_HIGHLIGHTER) { reset_selection(); - ui.toolno[0] = TOOL_PEN; - ui.cur_brush = &(ui.brushes[0][TOOL_PEN]); + ui.toolno[ui.cur_mapping] = TOOL_PEN; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_PEN]); update_color_menu(); update_tool_buttons(); update_tool_menu(); @@ -2206,7 +2213,7 @@ on_toolsRuler_activate (GtkMenuItem *menuitem, ui.cur_brush->ruler = active; if (active) ui.cur_brush->recognizer = FALSE; - update_mapping_linkings(ui.toolno[0]); + update_mapping_linkings(ui.toolno[ui.cur_mapping]); update_ruler_indicator(); } @@ -2222,16 +2229,17 @@ on_toolsReco_activate (GtkMenuItem *menuitem, else active = gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON (menuitem)); - if (ui.cur_mapping != 0) return; - current = (ui.toolno[0] == TOOL_PEN || ui.toolno[0] == TOOL_HIGHLIGHTER) && ui.cur_brush->recognizer; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; + current = (ui.toolno[ui.cur_mapping] == TOOL_PEN || ui.toolno[ui.cur_mapping] == TOOL_HIGHLIGHTER) && ui.cur_brush->recognizer; if (active == current) return; + ui.cur_mapping = 0; end_text(); reset_focus(); - if (ui.toolno[0]!=TOOL_PEN && ui.toolno[0]!=TOOL_HIGHLIGHTER) { + if (ui.toolno[ui.cur_mapping]!=TOOL_PEN && ui.toolno[ui.cur_mapping]!=TOOL_HIGHLIGHTER) { reset_selection(); - ui.toolno[0] = TOOL_PEN; - ui.cur_brush = &(ui.brushes[0][TOOL_PEN]); + ui.toolno[ui.cur_mapping] = TOOL_PEN; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_PEN]); update_color_menu(); update_tool_buttons(); update_tool_menu(); @@ -2243,7 +2251,7 @@ on_toolsReco_activate (GtkMenuItem *menuitem, ui.cur_brush->ruler = FALSE; reset_recognizer(); } - update_mapping_linkings(ui.toolno[0]); + update_mapping_linkings(ui.toolno[ui.cur_mapping]); update_ruler_indicator(); } @@ -2313,8 +2321,8 @@ void on_buttonFine_clicked (GtkToolButton *toolbutton, gpointer user_data) { - if (ui.cur_mapping != 0) return; - process_thickness_activate((GtkMenuItem*)toolbutton, ui.toolno[0], THICKNESS_FINE); + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; + process_thickness_activate((GtkMenuItem*)toolbutton, ui.toolno[ui.cur_mapping], THICKNESS_FINE); } @@ -2322,8 +2330,8 @@ void on_buttonMedium_clicked (GtkToolButton *toolbutton, gpointer user_data) { - if (ui.cur_mapping != 0) return; - process_thickness_activate((GtkMenuItem*)toolbutton, ui.toolno[0], THICKNESS_MEDIUM); + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; + process_thickness_activate((GtkMenuItem*)toolbutton, ui.toolno[ui.cur_mapping], THICKNESS_MEDIUM); } @@ -2331,8 +2339,8 @@ void on_buttonThick_clicked (GtkToolButton *toolbutton, gpointer user_data) { - if (ui.cur_mapping != 0) return; - process_thickness_activate((GtkMenuItem*)toolbutton, ui.toolno[0], THICKNESS_THICK); + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; + process_thickness_activate((GtkMenuItem*)toolbutton, ui.toolno[ui.cur_mapping], THICKNESS_THICK); } @@ -2355,6 +2363,8 @@ on_canvas_button_press_event (GtkWidget *widget, if (event->button > 3) return FALSE; // no painting with the mouse wheel! if (event->type != GDK_BUTTON_PRESS) return FALSE; // double-clicks may have broken axes member (free'd) due to a bug in GDK + if ((event->state & (GDK_CONTROL_MASK|GDK_MOD1_MASK)) != 0) return FALSE; + // no control-clicking or alt-clicking if (!is_core) fix_xinput_coords((GdkEvent *)event); @@ -2366,10 +2376,7 @@ on_canvas_button_press_event (GtkWidget *widget, if (ui.cur_item_type == ITEM_TEXT) { if (!is_event_within_textview(event)) end_text(); -/* // bugfix for GTK+ 2.17, no longer needed as XInput is disabled during text edition - else fix_extended_events(ui.cur_item->widget, (GdkEvent *)event, - gtk_text_view_get_window(GTK_TEXT_VIEW(ui.cur_item->widget), GTK_TEXT_WINDOW_TEXT)); -*/ + else return FALSE; } if (ui.cur_item_type == ITEM_STROKE && ui.is_corestroke && !is_core && ui.cur_path.num_points == 1) { @@ -2379,10 +2386,19 @@ on_canvas_button_press_event (GtkWidget *widget, } if (ui.cur_item_type != ITEM_NONE) return FALSE; // we're already doing something + // if button_switch_mapping enabled, button 2 or 3 clicks only switch mapping + if (ui.button_switch_mapping && event->button > 1) { + if (is_core == ui.use_xinput) return FALSE; // duplicate event + if (ui.cur_mapping == event->button-1) switch_mapping(0); + else switch_mapping(event->button-1); + return FALSE; + } + ui.is_corestroke = is_core; if (ui.use_erasertip && event->device->source == GDK_SOURCE_ERASER) mapping = NUM_BUTTONS; + else if (ui.button_switch_mapping) mapping = ui.cur_mapping; else mapping = event->button-1; // check whether we're in a page @@ -2506,7 +2522,8 @@ on_canvas_button_release_event (GtkWidget *widget, ui.cur_item_type = ITEM_NONE; } - switch_mapping(0); + if (!ui.button_switch_mapping || ui.cur_mapping == NUM_BUTTONS) + switch_mapping(0); return FALSE; } @@ -2591,6 +2608,7 @@ on_canvas_motion_notify_event (GtkWidget *widget, or if there's a selection (then we might want to change the mouse cursor to indicate the possibility of resizing) */ if (ui.cur_item_type == ITEM_NONE && ui.selection==NULL) return FALSE; + if (ui.cur_item_type == ITEM_TEXT) return FALSE; is_core = (event->device == gdk_device_get_core_pointer()); if (!ui.use_xinput && !is_core) return FALSE; @@ -3005,21 +3023,6 @@ on_optionsButtonMappings_activate (GtkMenuItem *menuitem, } -void -on_optionsAntialiasBG_activate (GtkMenuItem *menuitem, - gpointer user_data) -{ - gboolean active; - - active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem)); - if (ui.antialias_bg == active) return; - end_text(); - reset_focus(); - ui.antialias_bg = active; - rescale_bg_pixmaps(); -} - - void on_optionsProgressiveBG_activate (GtkMenuItem *menuitem, gpointer user_data) @@ -3359,13 +3362,14 @@ on_toolsHand_activate (GtkMenuItem *menuitem, return; } - if (ui.cur_mapping != 0) return; - if (ui.toolno[0] == TOOL_HAND) return; + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; + if (ui.toolno[ui.cur_mapping] == TOOL_HAND) return; + ui.cur_mapping = 0; end_text(); reset_focus(); reset_selection(); - ui.toolno[0] = TOOL_HAND; + ui.toolno[ui.cur_mapping] = TOOL_HAND; update_mapping_linkings(-1); update_tool_buttons(); update_tool_menu(); @@ -3489,3 +3493,27 @@ on_optionsPressureSensitive_activate (GtkMenuItem *menuitem, update_mappings_menu(); } + +void +on_buttonColorChooser_set (GtkColorButton *colorbutton, + gpointer user_data) +{ + GdkColor gdkcolor; + guint16 alpha; + + gtk_color_button_get_color(colorbutton, &gdkcolor); + alpha = gtk_color_button_get_alpha(colorbutton); + process_color_activate((GtkMenuItem*)colorbutton, COLOR_OTHER, gdkcolor_to_rgba(gdkcolor, alpha)); +} + + +void +on_optionsButtonsSwitchMappings_activate(GtkMenuItem *menuitem, + gpointer user_data) +{ + end_text(); + reset_focus(); + switch_mapping(0); + ui.button_switch_mapping = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem)); +} + diff --git a/src/xo-callbacks.h b/src/xo-callbacks.h index ebe9b8b..c371ddd 100644 --- a/src/xo-callbacks.h +++ b/src/xo-callbacks.h @@ -476,15 +476,10 @@ void on_optionsButtonMappings_activate (GtkMenuItem *menuitem, gpointer user_data); -void -on_optionsAntialiasBG_activate (GtkMenuItem *menuitem, - gpointer user_data); - void on_optionsProgressiveBG_activate (GtkMenuItem *menuitem, gpointer user_data); - void on_mru_activate (GtkMenuItem *menuitem, gpointer user_data); @@ -629,3 +624,11 @@ on_toolsReco_activate (GtkMenuItem *menuitem, void on_optionsPressureSensitive_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_buttonColorChooser_set (GtkColorButton *colorbutton, + gpointer user_data); + +void +on_optionsButtonsSwitchMappings_activate(GtkMenuItem *menuitem, + gpointer user_data); diff --git a/src/xo-file.c b/src/xo-file.c index 163c204..4dd7396 100644 --- a/src/xo-file.c +++ b/src/xo-file.c @@ -342,7 +342,7 @@ void xoj_parser_start_element(GMarkupParseContext *context, } // there's also the case of hex (#rrggbbaa) colors if (tmpPage->bg->color_no == COLOR_OTHER && **attribute_values == '#') { - tmpPage->bg->color_rgba = strtol(*attribute_values + 1, &ptr, 16); + tmpPage->bg->color_rgba = strtoul(*attribute_values + 1, &ptr, 16); if (*ptr!=0) *error = xoj_invalid(); } has_attr |= 2; @@ -484,7 +484,7 @@ void xoj_parser_start_element(GMarkupParseContext *context, } // there's also the case of hex (#rrggbbaa) colors if (tmpItem->brush.color_no == COLOR_OTHER && **attribute_values == '#') { - tmpItem->brush.color_rgba = strtol(*attribute_values + 1, &ptr, 16); + tmpItem->brush.color_rgba = strtoul(*attribute_values + 1, &ptr, 16); if (*ptr!=0) *error = xoj_invalid(); } has_attr |= 2; @@ -563,7 +563,7 @@ void xoj_parser_start_element(GMarkupParseContext *context, } // there's also the case of hex (#rrggbbaa) colors if (tmpItem->brush.color_no == COLOR_OTHER && **attribute_values == '#') { - tmpItem->brush.color_rgba = strtol(*attribute_values + 1, &ptr, 16); + tmpItem->brush.color_rgba = strtoul(*attribute_values + 1, &ptr, 16); if (*ptr!=0) *error = xoj_invalid(); } has_attr |= 16; @@ -1102,6 +1102,11 @@ gboolean init_bgpdf(char *pdfname, gboolean create_pages, int file_domain) bgpdf.document = poppler_document_new_from_data(bgpdf.file_contents, bgpdf.file_length, NULL, NULL); if (bgpdf.document == NULL) shutdown_bgpdf(); + + if (pdfname[0]=='/' && ui.filename == NULL) { + if (ui.default_path!=NULL) g_free(ui.default_path); + ui.default_path = g_path_get_dirname(pdfname); + } if (!create_pages) return TRUE; // we're done @@ -1283,7 +1288,6 @@ void init_config_default(void) ui.scrollbar_step_increment = 30; ui.zoom_step_increment = 1; ui.zoom_step_factor = 1.5; - ui.antialias_bg = TRUE; ui.progressive_bg = TRUE; ui.print_ruling = TRUE; ui.default_unit = UNIT_CM; @@ -1293,6 +1297,7 @@ void init_config_default(void) ui.pressure_sensitivity = FALSE; ui.width_minimum_multiplier = 0.0; ui.width_maximum_multiplier = 1.25; + ui.button_switch_mapping = FALSE; // the default UI vertical order ui.vertical_order[0][0] = 1; @@ -1422,6 +1427,9 @@ void save_config_to_file(void) update_keyval("general", "use_erasertip", _(" always map eraser tip to eraser (true/false)"), g_strdup(ui.use_erasertip?"true":"false")); + update_keyval("general", "buttons_switch_mappings", + _(" buttons 2 and 3 switch mappings instead of drawing (useful for some tablets) (true/false)"), + g_strdup(ui.button_switch_mapping?"true":"false")); update_keyval("general", "default_path", _(" default path for open/save (leave blank for current directory)"), g_strdup((ui.default_path!=NULL)?ui.default_path:"")); @@ -1464,7 +1472,9 @@ void save_config_to_file(void) g_strdup_printf("%.2f", ui.default_page.height)); update_keyval("paper", "color", _(" the default paper color"), - g_strdup(bgcolor_names[ui.default_page.bg->color_no])); + (ui.default_page.bg->color_no>=0)? + g_strdup(bgcolor_names[ui.default_page.bg->color_no]): + g_strdup_printf("#%08x", ui.default_page.bg->color_rgba)); update_keyval("paper", "style", _(" the default paper style (plain, lined, ruled, or graph)"), g_strdup(bgstyle_names[ui.default_page.bg->ruling])); @@ -1477,9 +1487,6 @@ void save_config_to_file(void) update_keyval("paper", "print_ruling", _(" include paper ruling when printing or exporting to PDF (true/false)"), g_strdup(ui.print_ruling?"true":"false")); - update_keyval("paper", "antialias_bg", - _(" antialiased bitmap backgrounds (true/false)"), - g_strdup(ui.antialias_bg?"true":"false")); update_keyval("paper", "progressive_bg", _(" just-in-time update of page backgrounds (true/false)"), g_strdup(ui.progressive_bg?"true":"false")); @@ -1495,7 +1502,9 @@ void save_config_to_file(void) g_strdup(tool_names[ui.startuptool])); update_keyval("tools", "pen_color", _(" default pen color"), - g_strdup(color_names[ui.default_brushes[TOOL_PEN].color_no])); + (ui.default_brushes[TOOL_PEN].color_no>=0)? + g_strdup(color_names[ui.default_brushes[TOOL_PEN].color_no]): + g_strdup_printf("#%08x", ui.default_brushes[TOOL_PEN].color_rgba)); update_keyval("tools", "pen_thickness", _(" default pen thickness (fine = 1, medium = 2, thick = 3)"), g_strdup_printf("%d", ui.default_brushes[TOOL_PEN].thickness_no)); @@ -1513,7 +1522,9 @@ void save_config_to_file(void) g_strdup_printf("%d", ui.default_brushes[TOOL_ERASER].tool_options)); update_keyval("tools", "highlighter_color", _(" default highlighter color"), - g_strdup(color_names[ui.default_brushes[TOOL_HIGHLIGHTER].color_no])); + (ui.default_brushes[TOOL_HIGHLIGHTER].color_no>=0)? + g_strdup(color_names[ui.default_brushes[TOOL_HIGHLIGHTER].color_no]): + g_strdup_printf("#%08x", ui.default_brushes[TOOL_HIGHLIGHTER].color_rgba)); update_keyval("tools", "highlighter_thickness", _(" default highlighter thickness (fine = 1, medium = 2, thick = 3)"), g_strdup_printf("%d", ui.default_brushes[TOOL_HIGHLIGHTER].thickness_no)); @@ -1531,8 +1542,11 @@ void save_config_to_file(void) g_strdup((ui.linked_brush[1]==BRUSH_LINKED)?"true":"false")); update_keyval("tools", "btn2_color", _(" button 2 brush color (for pen or highlighter only)"), - g_strdup((ui.toolno[1]=0)? + g_strdup(color_names[ui.brushes[1][ui.toolno[1]].color_no]): + g_strdup_printf("#%08x", ui.brushes[1][ui.toolno[1]].color_rgba)): + g_strdup("white")); update_keyval("tools", "btn2_thickness", _(" button 2 brush thickness (pen, eraser, or highlighter only)"), g_strdup_printf("%d", (ui.toolno[1]=0)? + g_strdup(color_names[ui.brushes[2][ui.toolno[2]].color_no]): + g_strdup_printf("#%08x", ui.brushes[2][ui.toolno[2]].color_rgba)): + g_strdup("white")); update_keyval("tools", "btn3_thickness", _(" button 3 brush thickness (pen, eraser, or highlighter only)"), g_strdup_printf("%d", (ui.toolno[2]color_no), bgcolor_names, COLOR_MAX); - ui.default_page.bg->color_rgba = predef_bgcolors_rgba[ui.default_page.bg->color_no]; + parse_keyval_enum_color("paper", "color", + &(ui.default_page.bg->color_no), &(ui.default_page.bg->color_rgba), + bgcolor_names, predef_bgcolors_rgba, COLOR_MAX); parse_keyval_enum("paper", "style", &(ui.default_page.bg->ruling), bgstyle_names, 4); parse_keyval_boolean("paper", "apply_all", &ui.bg_apply_all_pages); parse_keyval_enum("paper", "default_unit", &ui.default_unit, unit_names, 4); - parse_keyval_boolean("paper", "antialias_bg", &ui.antialias_bg); parse_keyval_boolean("paper", "progressive_bg", &ui.progressive_bg); parse_keyval_boolean("paper", "print_ruling", &ui.print_ruling); parse_keyval_int("paper", "gs_bitmap_dpi", &GS_BITMAP_DPI, 1, 1200); @@ -1802,13 +1842,17 @@ void load_config_from_file(void) parse_keyval_enum("tools", "startup_tool", &ui.startuptool, tool_names, NUM_TOOLS); ui.toolno[0] = ui.startuptool; - parse_keyval_enum("tools", "pen_color", &(ui.brushes[0][TOOL_PEN].color_no), color_names, COLOR_MAX); + parse_keyval_enum_color("tools", "pen_color", + &(ui.brushes[0][TOOL_PEN].color_no), &(ui.brushes[0][TOOL_PEN].color_rgba), + color_names, predef_colors_rgba, COLOR_MAX); parse_keyval_int("tools", "pen_thickness", &(ui.brushes[0][TOOL_PEN].thickness_no), 0, 4); parse_keyval_boolean("tools", "pen_ruler", &(ui.brushes[0][TOOL_PEN].ruler)); parse_keyval_boolean("tools", "pen_recognizer", &(ui.brushes[0][TOOL_PEN].recognizer)); parse_keyval_int("tools", "eraser_thickness", &(ui.brushes[0][TOOL_ERASER].thickness_no), 1, 3); parse_keyval_int("tools", "eraser_mode", &(ui.brushes[0][TOOL_ERASER].tool_options), 0, 2); - parse_keyval_enum("tools", "highlighter_color", &(ui.brushes[0][TOOL_HIGHLIGHTER].color_no), color_names, COLOR_MAX); + parse_keyval_enum_color("tools", "highlighter_color", + &(ui.brushes[0][TOOL_HIGHLIGHTER].color_no), &(ui.brushes[0][TOOL_HIGHLIGHTER].color_rgba), + color_names, predef_colors_rgba, COLOR_MAX); parse_keyval_int("tools", "highlighter_thickness", &(ui.brushes[0][TOOL_HIGHLIGHTER].thickness_no), 0, 4); parse_keyval_boolean("tools", "highlighter_ruler", &(ui.brushes[0][TOOL_HIGHLIGHTER].ruler)); parse_keyval_boolean("tools", "highlighter_recognizer", &(ui.brushes[0][TOOL_HIGHLIGHTER].recognizer)); @@ -1827,7 +1871,9 @@ void load_config_from_file(void) if (ui.toolno[1]==TOOL_PEN || ui.toolno[1]==TOOL_HIGHLIGHTER) { parse_keyval_boolean("tools", "btn2_ruler", &(ui.brushes[1][ui.toolno[1]].ruler)); parse_keyval_boolean("tools", "btn2_recognizer", &(ui.brushes[1][ui.toolno[1]].recognizer)); - parse_keyval_enum("tools", "btn2_color", &(ui.brushes[1][ui.toolno[1]].color_no), color_names, COLOR_MAX); + parse_keyval_enum_color("tools", "btn2_color", + &(ui.brushes[1][ui.toolno[1]].color_no), &(ui.brushes[1][ui.toolno[1]].color_rgba), + color_names, predef_colors_rgba, COLOR_MAX); } if (ui.toolno[1]window, &wx, &wy); gnome_canvas_get_scroll_offsets(canvas, &sx, &sy); #ifdef ENABLE_XINPUT_BUGFIX @@ -382,6 +380,7 @@ void fix_xinput_coords(GdkEvent *event) *py = iy + sy; } else { + gdk_window_get_origin(GTK_WIDGET(canvas)->window, &wx, &wy); axis_width = device->axes[0].max - device->axes[0].min; if (axis_width>EPSILON) *px = (axes[0]/axis_width)*ui.screen_width + sx - wx; @@ -389,6 +388,23 @@ void fix_xinput_coords(GdkEvent *event) if (axis_width>EPSILON) *py = (axes[1]/axis_width)*ui.screen_height + sy - wy; } +#else + if (!finite(*px) || !finite(*py) || (*px==0. && *py==0.)) { + gdk_window_get_pointer(GTK_WIDGET(canvas)->window, &ix, &iy, NULL); + *px = ix + sx; + *py = iy + sy; + } + else { + *px += sx; + *py += sy; + /* with GTK+ 2.17, events come improperly translated, and the event's + GdkWindow isn't even the same for ButtonDown as for MotionNotify... */ + if (!gtk_check_version(2,17,0)) { // GTK+ 2.17 issues !! + gdk_window_get_position(GTK_WIDGET(canvas)->window, &wx, &wy); + *px -= wx; + *py -= wy; + } + } #endif } @@ -576,29 +592,13 @@ void update_canvas_bg(struct Page *pg) if (pg->bg->type == BG_PIXMAP) { - if (ui.antialias_bg) { - set_cursor_busy(TRUE); - w = (int)floor(pg->width*ui.zoom+0.5); - h = (int)floor(pg->height*ui.zoom+0.5); - if (w == gdk_pixbuf_get_width(pg->bg->pixbuf) && - h == gdk_pixbuf_get_height(pg->bg->pixbuf)) - scaled_pix = gdk_pixbuf_ref(pg->bg->pixbuf); - else - scaled_pix = gdk_pixbuf_scale_simple(pg->bg->pixbuf, w, h, GDK_INTERP_BILINEAR); - pg->bg->pixbuf_scale = ui.zoom; - set_cursor_busy(FALSE); - } - else { - scaled_pix = gdk_pixbuf_ref(pg->bg->pixbuf); - pg->bg->pixbuf_scale = 0; - } + pg->bg->pixbuf_scale = 0; pg->bg->canvas_item = gnome_canvas_item_new(pg->group, gnome_canvas_pixbuf_get_type(), - "pixbuf", scaled_pix, + "pixbuf", pg->bg->pixbuf, "width", pg->width, "height", pg->height, "width-set", TRUE, "height-set", TRUE, NULL); - gdk_pixbuf_unref(scaled_pix); lower_canvas_item_to(pg->group, pg->bg->canvas_item, NULL); } @@ -650,23 +650,10 @@ void rescale_bg_pixmaps(void) if (ui.progressive_bg && !is_visible(pg)) continue; if (pg->bg->type == BG_PIXMAP && pg->bg->canvas_item!=NULL) { // do the rescaling ourselves - if (ui.antialias_bg) { - if (pg->bg->pixbuf_scale == ui.zoom) continue; - set_cursor_busy(TRUE); - pix = gdk_pixbuf_scale_simple(pg->bg->pixbuf, - (int)floor(pg->width*ui.zoom+0.5), (int)floor(pg->height*ui.zoom+0.5), - GDK_INTERP_BILINEAR); - gnome_canvas_item_set(pg->bg->canvas_item, "pixbuf", pix, NULL); - gdk_pixbuf_unref(pix); - pg->bg->pixbuf_scale = ui.zoom; - set_cursor_busy(FALSE); - } else - { - g_object_get(G_OBJECT(pg->bg->canvas_item), "pixbuf", &pix, NULL); - if (pix!=pg->bg->pixbuf) - gnome_canvas_item_set(pg->bg->canvas_item, "pixbuf", pg->bg->pixbuf, NULL); - pg->bg->pixbuf_scale = 0; - } + g_object_get(G_OBJECT(pg->bg->canvas_item), "pixbuf", &pix, NULL); + if (pix!=pg->bg->pixbuf) + gnome_canvas_item_set(pg->bg->canvas_item, "pixbuf", pg->bg->pixbuf, NULL); + pg->bg->pixbuf_scale = 0; } if (pg->bg->type == BG_PDF) { // make pixmap scale to correct size if current one is wrong @@ -725,6 +712,16 @@ void rgb_to_gdkcolor(guint rgba, GdkColor *color) color->blue = ((rgba>>8)&0xff)*0x101; } +guint32 gdkcolor_to_rgba(GdkColor gdkcolor, guint16 alpha) +{ + guint32 rgba = ((gdkcolor.red & 0xff00) << 16) | + ((gdkcolor.green & 0xff00) << 8) | + ((gdkcolor.blue & 0xff00) ) | + ((alpha & 0xff00) >> 8); + + return rgba; +} + // some interface functions void update_thickness_buttons(void) @@ -754,6 +751,9 @@ void update_thickness_buttons(void) void update_color_buttons(void) { + GdkColor gdkcolor; + GtkColorButton *colorbutton; + if (ui.selection!=NULL || (ui.toolno[ui.cur_mapping] != TOOL_PEN && ui.toolno[ui.cur_mapping] != TOOL_HIGHLIGHTER && ui.toolno[ui.cur_mapping] != TOOL_TEXT)) { gtk_toggle_tool_button_set_active( @@ -808,6 +808,22 @@ void update_color_buttons(void) gtk_toggle_tool_button_set_active( GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonColorOther")), TRUE); } + + colorbutton = GTK_COLOR_BUTTON(GET_COMPONENT("buttonColorChooser")); + if ((ui.toolno[ui.cur_mapping] != TOOL_PEN && + ui.toolno[ui.cur_mapping] != TOOL_HIGHLIGHTER && + ui.toolno[ui.cur_mapping] != TOOL_TEXT)) + gdkcolor.red = gdkcolor.blue = gdkcolor.green = 0; + else rgb_to_gdkcolor(ui.cur_brush->color_rgba, &gdkcolor); + gtk_color_button_set_color(colorbutton, &gdkcolor); + if (ui.toolno[ui.cur_mapping] == TOOL_HIGHLIGHTER) { + gtk_color_button_set_alpha(colorbutton, + (ui.cur_brush->color_rgba&0xff)*0x101); + gtk_color_button_set_use_alpha(colorbutton, TRUE); + } else { + gtk_color_button_set_alpha(colorbutton, 0xffff); + gtk_color_button_set_use_alpha(colorbutton, FALSE); + } } void update_tool_buttons(void) @@ -973,7 +989,7 @@ void update_color_menu(void) break; default: gtk_check_menu_item_set_active( - GTK_CHECK_MENU_ITEM(GET_COMPONENT("colorOther")), TRUE); + GTK_CHECK_MENU_ITEM(GET_COMPONENT("colorNA")), TRUE); } } @@ -1380,6 +1396,11 @@ void update_file_name(char *filename) g_snprintf(tmp, 100, _("Xournal - %s"), p); gtk_window_set_title(GTK_WINDOW (winMain), tmp); new_mru_entry(filename); + + if (filename[0]=='/') { + if (ui.default_path!=NULL) g_free(ui.default_path); + ui.default_path = g_path_get_dirname(filename); + } } void update_undo_redo_enabled(void) @@ -1417,14 +1438,22 @@ void update_mapping_linkings(int toolno) } } -void set_cur_color(int color) +void set_cur_color(int color_no, guint color_rgba) { - ui.cur_brush->color_no = color; - if (ui.toolno[0] == TOOL_HIGHLIGHTER) - ui.cur_brush->color_rgba = predef_colors_rgba[color] & ui.hiliter_alpha_mask; + int which_mapping, tool; + + if (ui.toolno[ui.cur_mapping] == TOOL_HIGHLIGHTER) tool = TOOL_HIGHLIGHTER; + else tool = TOOL_PEN; + if (ui.cur_mapping>0 && ui.linked_brush[ui.cur_mapping]!=BRUSH_LINKED) + which_mapping = ui.cur_mapping; + else which_mapping = 0; + + ui.brushes[which_mapping][tool].color_no = color_no; + if (tool == TOOL_HIGHLIGHTER && (color_rgba & 0xff) == 0xff) + ui.brushes[which_mapping][tool].color_rgba = color_rgba & ui.hiliter_alpha_mask; else - ui.cur_brush->color_rgba = predef_colors_rgba[color]; - update_mapping_linkings(ui.toolno[0]); + ui.brushes[which_mapping][tool].color_rgba = color_rgba; + update_mapping_linkings(tool); } void recolor_temp_text(int color_no, guint color_rgba) @@ -1447,39 +1476,41 @@ void recolor_temp_text(int color_no, guint color_rgba) gtk_widget_grab_focus(ui.cur_item->widget); } -void process_color_activate(GtkMenuItem *menuitem, int color) +void process_color_activate(GtkMenuItem *menuitem, int color_no, guint color_rgba) { if (GTK_OBJECT_TYPE(menuitem) == GTK_TYPE_RADIO_MENU_ITEM) { if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem))) return; - } else { + } + else if (GTK_OBJECT_TYPE(menuitem) == GTK_TYPE_RADIO_TOOL_BUTTON) { if (!gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON (menuitem))) return; } - if (ui.cur_mapping != 0) return; // not user-generated + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated reset_focus(); if (ui.cur_item_type == ITEM_TEXT) - recolor_temp_text(color, predef_colors_rgba[color]); + recolor_temp_text(color_no, color_rgba); if (ui.selection != NULL) { - recolor_selection(color); + recolor_selection(color_no, color_rgba); update_color_buttons(); update_color_menu(); } - if (ui.toolno[0] != TOOL_PEN && ui.toolno[0] != TOOL_HIGHLIGHTER - && ui.toolno[0] != TOOL_TEXT) { + if (ui.toolno[ui.cur_mapping] != TOOL_PEN && ui.toolno[ui.cur_mapping] != TOOL_HIGHLIGHTER + && ui.toolno[ui.cur_mapping] != TOOL_TEXT) { if (ui.selection != NULL) return; + ui.cur_mapping = 0; end_text(); - ui.toolno[0] = TOOL_PEN; - ui.cur_brush = &(ui.brushes[0][TOOL_PEN]); + ui.toolno[ui.cur_mapping] = TOOL_PEN; + ui.cur_brush = &(ui.brushes[ui.cur_mapping][TOOL_PEN]); update_tool_buttons(); update_tool_menu(); } - set_cur_color(color); + set_cur_color(color_no, color_rgba); update_color_buttons(); update_color_menu(); update_cursor(); @@ -1487,6 +1518,8 @@ void process_color_activate(GtkMenuItem *menuitem, int color) void process_thickness_activate(GtkMenuItem *menuitem, int tool, int val) { + int which_mapping; + if (GTK_OBJECT_TYPE(menuitem) == GTK_TYPE_RADIO_MENU_ITEM) { if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem))) return; @@ -1495,7 +1528,7 @@ void process_thickness_activate(GtkMenuItem *menuitem, int tool, int val) return; } - if (ui.cur_mapping != 0) return; // not user-generated + if (ui.cur_mapping != 0 && !ui.button_switch_mapping) return; // not user-generated if (ui.selection != NULL && GTK_OBJECT_TYPE(menuitem) != GTK_TYPE_RADIO_MENU_ITEM) { reset_focus(); @@ -1508,11 +1541,14 @@ void process_thickness_activate(GtkMenuItem *menuitem, int tool, int val) return; } - if (ui.brushes[0][tool].thickness_no == val) return; + if (ui.cur_mapping>0 && ui.linked_brush[ui.cur_mapping]!=BRUSH_LINKED) + which_mapping = ui.cur_mapping; + else which_mapping = 0; + if (ui.brushes[which_mapping][tool].thickness_no == val) return; reset_focus(); end_text(); - ui.brushes[0][tool].thickness_no = val; - ui.brushes[0][tool].thickness = predef_thickness[tool][val]; + ui.brushes[which_mapping][tool].thickness_no = val; + ui.brushes[which_mapping][tool].thickness = predef_thickness[tool][val]; update_mapping_linkings(tool); update_thickness_buttons(); @@ -1761,7 +1797,8 @@ void resize_journal_items_by(GList *itemlist, double scaling_x, double scaling_y // Switch between button mappings /* NOTE ABOUT BUTTON MAPPINGS: ui.cur_mapping is 0 except while a canvas - click event is being processed ... */ + click event is being processed ... or if ui.button_switch_mapping is + enabled and mappings are switched! */ void switch_mapping(int m) { @@ -1780,8 +1817,9 @@ void switch_mapping(int m) void process_mapping_activate(GtkMenuItem *menuitem, int m, int tool) { if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem))) return; - if (ui.cur_mapping!=0) return; + if (ui.cur_mapping!=0 && !ui.button_switch_mapping) return; if (ui.toolno[m] == tool) return; + switch_mapping(0); end_text(); reset_focus(); @@ -1847,6 +1885,15 @@ gboolean can_accel(GtkWidget *widget, guint id, gpointer data) return GTK_WIDGET_SENSITIVE(widget); } +gboolean can_accel_except_text(GtkWidget *widget, guint id, gpointer data) +{ + if (ui.cur_item_type == ITEM_TEXT) { + g_signal_stop_emission_by_name(widget, "can-activate-accel"); + return FALSE; + } + return GTK_WIDGET_SENSITIVE(widget); +} + void allow_all_accels(void) { g_signal_connect((gpointer) GET_COMPONENT("fileNew"), @@ -1886,9 +1933,9 @@ void allow_all_accels(void) g_signal_connect((gpointer) GET_COMPONENT("viewFirstPage"), "can-activate-accel", G_CALLBACK(can_accel), NULL); g_signal_connect((gpointer) GET_COMPONENT("viewPreviousPage"), - "can-activate-accel", G_CALLBACK(can_accel), NULL); + "can-activate-accel", G_CALLBACK(can_accel_except_text), NULL); g_signal_connect((gpointer) GET_COMPONENT("viewNextPage"), - "can-activate-accel", G_CALLBACK(can_accel), NULL); + "can-activate-accel", G_CALLBACK(can_accel_except_text), NULL); g_signal_connect((gpointer) GET_COMPONENT("viewLastPage"), "can-activate-accel", G_CALLBACK(can_accel), NULL); g_signal_connect((gpointer) GET_COMPONENT("toolsPen"), @@ -1967,7 +2014,6 @@ void hide_unimplemented(void) gtk_widget_hide(GET_COMPONENT("buttonSelectRegion")); gtk_widget_hide(GET_COMPONENT("button2SelectRegion")); gtk_widget_hide(GET_COMPONENT("button3SelectRegion")); - gtk_widget_hide(GET_COMPONENT("colorOther")); gtk_widget_hide(GET_COMPONENT("helpIndex")); /* config file only works with glib 2.6 and beyond */ @@ -2060,7 +2106,7 @@ gboolean fix_extended_events (GtkWidget *widget, GdkEvent *event, } */ -// disable xinput when layer combo box is popped up, to avoid crash +// disable xinput when layer combo box is popped up, to avoid GTK+ 2.17 crash gboolean combobox_popup_disable_xinput (GtkWidget *widget, GdkEvent *event, gpointer user_data) @@ -2072,3 +2118,5 @@ gboolean combobox_popup_disable_xinput (GtkWidget *widget, GdkEvent *event, GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK, (ui.use_xinput && !is_shown)?GDK_EXTENSION_EVENTS_ALL:GDK_EXTENSION_EVENTS_NONE); } + + diff --git a/src/xo-misc.h b/src/xo-misc.h index fe490ec..3a6e029 100644 --- a/src/xo-misc.h +++ b/src/xo-misc.h @@ -34,6 +34,7 @@ gboolean have_intersect(struct BBox *a, struct BBox *b); void lower_canvas_item_to(GnomeCanvasGroup *g, GnomeCanvasItem *item, GnomeCanvasItem *after); void rgb_to_gdkcolor(guint rgba, GdkColor *color); +guint32 gdkcolor_to_rgba(GdkColor gdkcolor, guint16 alpha); // interface misc functions @@ -60,9 +61,9 @@ void update_font_button(void); void update_mapping_linkings(int toolno); void do_switch_page(int pg, gboolean rescroll, gboolean refresh_all); -void set_cur_color(int color); +void set_cur_color(int color_no, guint color_rgba); void recolor_temp_text(int color_no, guint color_rgba); -void process_color_activate(GtkMenuItem *menuitem, int color); +void process_color_activate(GtkMenuItem *menuitem, int color_no, guint color_rgba); void process_thickness_activate(GtkMenuItem *menuitem, int tool, int val); void process_papercolor_activate(GtkMenuItem *menuitem, int color); void process_paperstyle_activate(GtkMenuItem *menuitem, int style); @@ -101,6 +102,8 @@ gboolean filter_extended_events(GtkWidget *widget, GdkEvent *event, gpointer use // gboolean fix_extended_events(GtkWidget *widget, GdkEvent *event, gpointer user_data); gboolean combobox_popup_disable_xinput(GtkWidget *widget, GdkEvent *event, gpointer user_data); + + // defines for paper rulings #define RULING_MARGIN_COLOR 0xff0080ff diff --git a/src/xo-paint.c b/src/xo-paint.c index 32e7504..85e3536 100644 --- a/src/xo-paint.c +++ b/src/xo-paint.c @@ -1086,7 +1086,7 @@ void clipboard_paste(void) // modify the color or thickness of pen strokes in a selection -void recolor_selection(int color) +void recolor_selection(int color_no, guint color_rgba) { GList *itemlist; struct Item *item; @@ -1108,8 +1108,8 @@ void recolor_selection(int color) g_memmove(brush, &(item->brush), sizeof(struct Brush)); undo->auxlist = g_list_append(undo->auxlist, brush); // repaint the stroke - item->brush.color_no = color; - item->brush.color_rgba = predef_colors_rgba[color]; + item->brush.color_no = color_no; + item->brush.color_rgba = color_rgba; if (item->canvas_item!=NULL) { if (!item->brush.variable_width) gnome_canvas_item_set(item->canvas_item, diff --git a/src/xo-paint.h b/src/xo-paint.h index d69b881..cd7b2ea 100644 --- a/src/xo-paint.h +++ b/src/xo-paint.h @@ -25,7 +25,7 @@ void selection_delete(void); void selection_to_clip(void); void clipboard_paste(void); -void recolor_selection(int color); +void recolor_selection(int color_no, guint color_rgba); void rethicken_selection(int val); /* text functions */ diff --git a/src/xo-support.c b/src/xo-support.c index 5d2689f..f5aace6 100644 --- a/src/xo-support.c +++ b/src/xo-support.c @@ -118,7 +118,7 @@ create_pixbuf (const gchar *filename) pixbuf = gdk_pixbuf_new_from_file (pathname, &error); if (!pixbuf) { - fprintf (stderr, _("Failed to load pixbuf file: %s: %s\n"), + fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", pathname, error->message); g_error_free (error); } diff --git a/src/xournal.h b/src/xournal.h index 00ac0cc..6233fe7 100644 --- a/src/xournal.h +++ b/src/xournal.h @@ -220,6 +220,7 @@ typedef struct UIData { struct Brush default_brushes[NUM_STROKE_TOOLS]; // the default ones int linked_brush[NUM_BUTTONS+1]; // whether brushes are linked across buttons int cur_mapping; // the current button number for mappings + gboolean button_switch_mapping; // button clicks switch button 1 mappings gboolean use_erasertip; int which_mouse_button; // the mouse button drawing the current path struct Page default_page; // the model for the default page @@ -247,8 +248,7 @@ typedef struct UIData { gboolean in_update_page_stuff; // semaphore to avoid scrollbar retroaction struct Selection *selection; GdkCursor *cursor; - gboolean antialias_bg; // bilinear interpolation on bg pixmaps - gboolean progressive_bg; // rescale bg's one at a time + gboolean progressive_bg; // update PDF bg's one at a time char *mrufile, *configfile; // file names for MRU & config char *mru[MRU_SIZE]; // MRU data GtkWidget *mrumenu[MRU_SIZE]; diff --git a/xournal.glade b/xournal.glade index 0476060..c160040 100644 --- a/xournal.glade +++ b/xournal.glade @@ -1226,13 +1226,11 @@ - + True other... True - True - colorBlack - + @@ -1842,19 +1840,19 @@ - - + + True + Buttons Switch Mappings + True + False + - + True - _Antialiased Bitmaps - True - False - @@ -2976,6 +2974,31 @@ + + + True + True + True + False + + + + 2 + 34 + 32 + True + False + True + + + + + + False + False + + + True -- 2.39.2