]> git.donarmstrong.com Git - xournal.git/commitdiff
custom color chooser; misc patches
authorauroux <auroux>
Mon, 21 Sep 2009 07:07:44 +0000 (07:07 +0000)
committerauroux <auroux>
Mon, 21 Sep 2009 07:07:44 +0000 (07:07 +0000)
16 files changed:
po/ca.po
po/fr.po
src/TODO
src/main.c
src/xo-callbacks.c
src/xo-callbacks.h
src/xo-file.c
src/xo-file.h
src/xo-interface.c
src/xo-misc.c
src/xo-misc.h
src/xo-paint.c
src/xo-paint.h
src/xo-support.c
src/xournal.h
xournal.glade

index 4ce2e9d07e13e049a6ae2a05eb100b5ff4e47b4a..7ac976487f7b38368d2ade61b5f5689f877fc29e 100644 (file)
--- 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 <david.planella@gmail.com>\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"
+
index 0034cf5b359139939b15d0ad9c36c8ce719f3d7e..743976f4e745ad25917e423fbd80c28fcd6eddab 100644 (file)
--- 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 <auroux@math.mit.edu\n"
 "Language-Team: French\n"
@@ -14,7 +14,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/main.c:80
+#: src/main.c:65
 #, c-format
 msgid ""
 "Invalid command line parameters.\n"
@@ -23,326 +23,326 @@ msgstr ""
 "Paramètres de ligne de commande incorrects.\n"
 "Usage: %s [fichier.xoj]\n"
 
-#: src/main.c:286 src/xo-callbacks.c:105 src/xo-callbacks.c:154
-#: src/xo-callbacks.c:3067
+#: 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 "Erreur lors de l'ouverture du fichier «%s»"
 
-#: src/xo-interface.c:348 src/xo-interface.c:2937 src/xo-misc.c:1373
+#: src/xo-interface.c:350 src/xo-interface.c:2953 src/xo-misc.c:1390
 msgid "Xournal"
 msgstr ""
 
-#: src/xo-interface.c:358
+#: src/xo-interface.c:360
 msgid "_File"
 msgstr "_Fichier"
 
-#: src/xo-interface.c:369
+#: src/xo-interface.c:371
 msgid "Annotate PD_F"
 msgstr "Annoter PD_F"
 
-#: src/xo-interface.c:394
+#: src/xo-interface.c:396
 msgid "Recent Doc_uments"
 msgstr "Doc_uments récents"
 
-#: src/xo-interface.c:401
+#: src/xo-interface.c:403
 msgid "0"
 msgstr ""
 
-#: src/xo-interface.c:405
+#: src/xo-interface.c:407
 msgid "1"
 msgstr ""
 
-#: src/xo-interface.c:409
+#: src/xo-interface.c:411
 msgid "2"
 msgstr ""
 
-#: src/xo-interface.c:413
+#: src/xo-interface.c:415
 msgid "3"
 msgstr ""
 
-#: src/xo-interface.c:417
+#: src/xo-interface.c:419
 msgid "4"
 msgstr ""
 
-#: src/xo-interface.c:421
+#: src/xo-interface.c:423
 msgid "5"
 msgstr ""
 
-#: src/xo-interface.c:425
+#: src/xo-interface.c:427
 msgid "6"
 msgstr ""
 
-#: src/xo-interface.c:429
+#: src/xo-interface.c:431
 msgid "7"
 msgstr ""
 
-#: src/xo-interface.c:438
+#: src/xo-interface.c:440
 msgid "Print Options"
 msgstr "Options d'impression"
 
-#: src/xo-interface.c:453
+#: src/xo-interface.c:455
 msgid "_Export to PDF"
 msgstr "E_xporter PDF"
 
-#: src/xo-interface.c:469
+#: src/xo-interface.c:471
 msgid "_Edit"
 msgstr "_Edition"
 
-#: src/xo-interface.c:514
+#: src/xo-interface.c:516
 msgid "_View"
 msgstr "_Affichage"
 
-#: src/xo-interface.c:521
+#: src/xo-interface.c:523
 msgid "_Continuous"
 msgstr "_Continu"
 
-#: src/xo-interface.c:527
+#: src/xo-interface.c:529
 msgid "_One Page"
 msgstr "_Une page"
 
-#: src/xo-interface.c:538
+#: src/xo-interface.c:540
 msgid "Full Screen"
 msgstr "Plein écran"
 
-#: src/xo-interface.c:550
+#: src/xo-interface.c:552
 msgid "_Zoom"
 msgstr ""
 
-#: src/xo-interface.c:578
+#: src/xo-interface.c:580
 msgid "Page _Width"
 msgstr "Largeur page"
 
-#: src/xo-interface.c:589
+#: src/xo-interface.c:591
 msgid "_Set Zoom"
 msgstr "Changer zoom"
 
-#: src/xo-interface.c:598
+#: src/xo-interface.c:600
 msgid "_First Page"
 msgstr "Première page"
 
-#: src/xo-interface.c:609
+#: src/xo-interface.c:611
 msgid "_Previous Page"
 msgstr "Page _précédente"
 
-#: src/xo-interface.c:620
+#: src/xo-interface.c:622
 msgid "_Next Page"
 msgstr "Page _suivante"
 
-#: src/xo-interface.c:631
+#: src/xo-interface.c:633
 msgid "_Last Page"
 msgstr "_Dernière page"
 
-#: src/xo-interface.c:647
+#: src/xo-interface.c:649
 msgid "_Show Layer"
 msgstr "Afficher calque"
 
-#: src/xo-interface.c:655
+#: src/xo-interface.c:657
 msgid "_Hide Layer"
 msgstr "Cacher calque"
 
-#: src/xo-interface.c:663
+#: src/xo-interface.c:665
 msgid "_Journal"
 msgstr ""
 
-#: src/xo-interface.c:670
+#: src/xo-interface.c:672
 msgid "New Page _Before"
 msgstr "Nouvelle page a_vant"
 
-#: src/xo-interface.c:674
+#: src/xo-interface.c:676
 msgid "New Page _After"
 msgstr "Nouvelle page _après"
 
-#: src/xo-interface.c:678
+#: src/xo-interface.c:680
 msgid "New Page At _End"
 msgstr "Nouvelle page à la _fin"
 
-#: src/xo-interface.c:682
+#: src/xo-interface.c:684
 msgid "_Delete Page"
 msgstr "Supprimer page"
 
-#: src/xo-interface.c:691
+#: src/xo-interface.c:693
 msgid "_New Layer"
 msgstr "Nouveau calque"
 
-#: src/xo-interface.c:695
+#: src/xo-interface.c:697
 msgid "Delete La_yer"
 msgstr "Supprimer calque"
 
-#: src/xo-interface.c:699
+#: src/xo-interface.c:701
 msgid "_Flatten"
 msgstr "_Aplatir"
 
-#: src/xo-interface.c:708
+#: src/xo-interface.c:710
 msgid "Paper Si_ze"
 msgstr "_Taille du papier"
 
-#: src/xo-interface.c:712
+#: src/xo-interface.c:714
 msgid "Paper _Color"
 msgstr "_Couleur du papier"
 
-#: src/xo-interface.c:719
+#: src/xo-interface.c:721
 msgid "_white paper"
 msgstr "papier _blanc"
 
-#: src/xo-interface.c:725
+#: src/xo-interface.c:727
 msgid "_yellow paper"
 msgstr "papier _jaune"
 
-#: src/xo-interface.c:731
+#: src/xo-interface.c:733
 msgid "_pink paper"
 msgstr "papier _rose"
 
-#: src/xo-interface.c:737
+#: src/xo-interface.c:739
 msgid "_orange paper"
 msgstr "papier _orange"
 
-#: src/xo-interface.c:743
+#: src/xo-interface.c:745
 msgid "_blue paper"
 msgstr "papier b_leu"
 
-#: src/xo-interface.c:749
+#: src/xo-interface.c:751
 msgid "_green paper"
 msgstr "papier _vert"
 
-#: src/xo-interface.c:755 src/xo-interface.c:1025
+#: src/xo-interface.c:757 src/xo-interface.c:1027
 msgid "other..."
 msgstr "autre..."
 
-#: src/xo-interface.c:761 src/xo-interface.c:797 src/xo-interface.c:1031
+#: 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-interface.c:766
+#: src/xo-interface.c:768
 msgid "Paper _Style"
 msgstr "_Style de papier "
 
-#: src/xo-interface.c:773
+#: src/xo-interface.c:775
 msgid "_plain"
 msgstr "_vierge"
 
-#: src/xo-interface.c:779
+#: src/xo-interface.c:781
 msgid "_lined"
 msgstr "_lignes"
 
-#: src/xo-interface.c:785
+#: src/xo-interface.c:787
 msgid "_ruled"
 msgstr "_marge"
 
-#: src/xo-interface.c:791
+#: src/xo-interface.c:793
 msgid "_graph"
 msgstr "_carreaux"
 
-#: src/xo-interface.c:802
+#: src/xo-interface.c:804
 msgid "Apply _To All Pages"
 msgstr "Appliquer à toutes les pages"
 
-#: src/xo-interface.c:811
+#: src/xo-interface.c:813
 msgid "_Load Background"
 msgstr "_Ouvrir fond de page"
 
-#: src/xo-interface.c:819
+#: src/xo-interface.c:821
 msgid "Background Screens_hot"
 msgstr "Ca_pture écran"
 
-#: src/xo-interface.c:828
+#: src/xo-interface.c:830
 msgid "Default _Paper"
 msgstr "Papier par défaut"
 
-#: src/xo-interface.c:832
+#: src/xo-interface.c:834
 msgid "Set As De_fault"
 msgstr "Définir papier par défaut"
 
-#: src/xo-interface.c:836
+#: src/xo-interface.c:838
 msgid "_Tools"
 msgstr "_Outils"
 
-#: src/xo-interface.c:843 src/xo-interface.c:1212 src/xo-interface.c:1288
+#: src/xo-interface.c:845 src/xo-interface.c:1212 src/xo-interface.c:1288
 msgid "_Pen"
 msgstr "St_ylo"
 
-#: src/xo-interface.c:852 src/xo-interface.c:1218 src/xo-interface.c:1294
+#: src/xo-interface.c:854 src/xo-interface.c:1218 src/xo-interface.c:1294
 msgid "_Eraser"
 msgstr "_Gomme"
 
-#: src/xo-interface.c:861 src/xo-interface.c:1224 src/xo-interface.c:1300
+#: src/xo-interface.c:863 src/xo-interface.c:1224 src/xo-interface.c:1300
 msgid "_Highlighter"
 msgstr "_Surligneur"
 
-#: src/xo-interface.c:870 src/xo-interface.c:1230 src/xo-interface.c:1306
+#: src/xo-interface.c:872 src/xo-interface.c:1230 src/xo-interface.c:1306
 msgid "_Text"
 msgstr "_Texte"
 
-#: src/xo-interface.c:884
+#: src/xo-interface.c:886
 msgid "_Shape Recognizer"
 msgstr "_Détection de formes"
 
-#: src/xo-interface.c:891
+#: src/xo-interface.c:893
 msgid "Ru_ler"
 msgstr "Règle"
 
-#: src/xo-interface.c:903 src/xo-interface.c:1236 src/xo-interface.c:1312
+#: src/xo-interface.c:905 src/xo-interface.c:1236 src/xo-interface.c:1312
 msgid "Select Re_gion"
 msgstr "Sé_lection région"
 
-#: src/xo-interface.c:912 src/xo-interface.c:1242 src/xo-interface.c:1318
+#: src/xo-interface.c:914 src/xo-interface.c:1242 src/xo-interface.c:1318
 msgid "Select _Rectangle"
 msgstr "Sélection _rectangle"
 
-#: src/xo-interface.c:921 src/xo-interface.c:1248 src/xo-interface.c:1324
+#: src/xo-interface.c:923 src/xo-interface.c:1248 src/xo-interface.c:1324
 msgid "_Vertical Space"
 msgstr "Espace _vertical"
 
-#: src/xo-interface.c:930 src/xo-interface.c:1254 src/xo-interface.c:1330
+#: src/xo-interface.c:932 src/xo-interface.c:1254 src/xo-interface.c:1330
 msgid "H_and Tool"
 msgstr "Outil main"
 
-#: src/xo-interface.c:943
+#: src/xo-interface.c:945
 msgid "_Color"
 msgstr "_Couleur"
 
-#: src/xo-interface.c:954
+#: src/xo-interface.c:956
 msgid "blac_k"
 msgstr "_noir"
 
-#: src/xo-interface.c:960
+#: src/xo-interface.c:962
 msgid "_blue"
 msgstr "_bleu"
 
-#: src/xo-interface.c:966
+#: src/xo-interface.c:968
 msgid "_red"
 msgstr "_rouge"
 
-#: src/xo-interface.c:972
+#: src/xo-interface.c:974
 msgid "_green"
 msgstr "_vert"
 
-#: src/xo-interface.c:978
+#: src/xo-interface.c:980
 msgid "gr_ay"
 msgstr "_gris"
 
-#: src/xo-interface.c:989
+#: src/xo-interface.c:991
 msgid "light bl_ue"
 msgstr "bleu _clair"
 
-#: src/xo-interface.c:995
+#: src/xo-interface.c:997
 msgid "light gr_een"
 msgstr "vert c_lair"
 
-#: src/xo-interface.c:1001
+#: src/xo-interface.c:1003
 msgid "_magenta"
 msgstr "_magenta"
 
-#: src/xo-interface.c:1007
+#: src/xo-interface.c:1009
 msgid "_orange"
 msgstr ""
 
-#: src/xo-interface.c:1013
+#: src/xo-interface.c:1015
 msgid "_yellow"
 msgstr "_jaune"
 
-#: src/xo-interface.c:1019
+#: src/xo-interface.c:1021
 msgid "_white"
 msgstr "_blanc"
 
@@ -450,9 +450,9 @@ msgstr "_Copie du pinceau actuel"
 msgid "Button _3 Mapping"
 msgstr "Bouton _3"
 
-#: src/xo-interface.c:1362
-msgid "_Antialiased Bitmaps"
-msgstr "Anticrénelage des bitmaps"
+#: src/xo-interface.c:1357
+msgid "Buttons Switch Mappings"
+msgstr "Boutons changent d'outil"
 
 #: src/xo-interface.c:1366
 msgid "_Progressive Backgrounds"
@@ -538,7 +538,7 @@ msgstr "Dernière page"
 msgid "Zoom Out"
 msgstr "Zoom arrière"
 
-#: src/xo-interface.c:1516 src/xo-interface.c:3031
+#: src/xo-interface.c:1516 src/xo-interface.c:3047
 msgid "Page Width"
 msgstr "Largeur page"
 
@@ -550,7 +550,7 @@ msgstr "Zoom avant"
 msgid "Normal Size"
 msgstr "Taille normale"
 
-#: src/xo-interface.c:1532 src/xo-interface.c:2990
+#: src/xo-interface.c:1532 src/xo-interface.c:3006
 msgid "Set Zoom"
 msgstr "Réglage zoom"
 
@@ -666,79 +666,79 @@ msgstr "Jaune"
 msgid "White"
 msgstr "Blanc"
 
-#: src/xo-interface.c:1910
+#: src/xo-interface.c:1921
 msgid "  Page  "
 msgstr ""
 
-#: src/xo-interface.c:1918
+#: src/xo-interface.c:1929
 msgid "Set page number"
 msgstr "Changer de page"
 
-#: src/xo-interface.c:1922
+#: src/xo-interface.c:1933
 msgid " of n"
 msgstr " de n"
 
-#: src/xo-interface.c:1930
+#: src/xo-interface.c:1941
 msgid "  Layer:  "
 msgstr "  Calque :  "
 
-#: src/xo-interface.c:2812
+#: src/xo-interface.c:2828
 msgid "Set Paper Size"
 msgstr "Taille du papier"
 
-#: src/xo-interface.c:2824
+#: src/xo-interface.c:2840
 msgid "Standard paper sizes:"
 msgstr "Tailles de papier standard:"
 
-#: src/xo-interface.c:2832
+#: src/xo-interface.c:2848
 msgid "A4"
 msgstr ""
 
-#: src/xo-interface.c:2833
+#: src/xo-interface.c:2849
 msgid "A4 (landscape)"
 msgstr "A4 (paysage)"
 
-#: src/xo-interface.c:2834
+#: src/xo-interface.c:2850
 msgid "US Letter"
 msgstr "Lettre (US)"
 
-#: src/xo-interface.c:2835
+#: src/xo-interface.c:2851
 msgid "US Letter (landscape)"
 msgstr "Lettre (US) (paysage)"
 
-#: src/xo-interface.c:2836
+#: src/xo-interface.c:2852
 msgid "Custom"
 msgstr "Personnalisé"
 
-#: src/xo-interface.c:2842
+#: src/xo-interface.c:2858
 msgid "Width:"
 msgstr "Largeur:"
 
-#: src/xo-interface.c:2851
+#: src/xo-interface.c:2867
 msgid "Height:"
 msgstr "Hauteur:"
 
-#: src/xo-interface.c:2863
+#: src/xo-interface.c:2879
 msgid "cm"
 msgstr ""
 
-#: src/xo-interface.c:2864
+#: src/xo-interface.c:2880
 msgid "in"
 msgstr ""
 
-#: src/xo-interface.c:2865
+#: src/xo-interface.c:2881
 msgid "pixels"
 msgstr ""
 
-#: src/xo-interface.c:2866
+#: src/xo-interface.c:2882
 msgid "points"
 msgstr ""
 
-#: src/xo-interface.c:2926
+#: src/xo-interface.c:2942
 msgid "About Xournal"
 msgstr "A propos de Xournal"
 
-#: src/xo-interface.c:2942
+#: src/xo-interface.c:2958
 msgid ""
 "Written by Denis Auroux\n"
 "       http://xournal.sourceforge.net/       "
@@ -746,107 +746,94 @@ msgstr ""
 "Ecrit par Denis Auroux\n"
 "       http://xournal.sourceforge.net/       "
 
-#: src/xo-interface.c:3006
+#: src/xo-interface.c:3022
 msgid "Zoom: "
 msgstr ""
 
-#: src/xo-interface.c:3019
+#: src/xo-interface.c:3035
 msgid "%"
 msgstr ""
 
-#: src/xo-interface.c:3024
+#: src/xo-interface.c:3040
 msgid "Normal size (100%)"
 msgstr "Taille normale (100%)"
 
-#: src/xo-interface.c:3038
+#: src/xo-interface.c:3054
 msgid "Page Height"
 msgstr "Hauteur page"
 
 #. user aborted on save confirmation
-#: src/xo-callbacks.c:54 src/xo-file.c:664
+#: src/xo-callbacks.c:53 src/xo-file.c:664
 msgid "Open PDF"
 msgstr "Ouvrir PDF"
 
-#: src/xo-callbacks.c:59 src/xo-callbacks.c:130 src/xo-callbacks.c:228
-#: src/xo-callbacks.c:411 src/xo-callbacks.c:1482 src/xo-file.c:669
+#: 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 "Tous"
 
-#: src/xo-callbacks.c:62 src/xo-callbacks.c:414 src/xo-file.c:672
+#: src/xo-callbacks.c:61 src/xo-callbacks.c:383 src/xo-file.c:672
 msgid "PDF files"
 msgstr "Fichiers PDF"
 
-#: src/xo-callbacks.c:70 src/xo-callbacks.c:1505
+#: src/xo-callbacks.c:69 src/xo-callbacks.c:1474
 msgid "Attach file to the journal"
 msgstr "Attacher le fichier au journal"
 
 #. user aborted on save confirmation
-#: src/xo-callbacks.c:125
+#: src/xo-callbacks.c:124
 msgid "Open Journal"
 msgstr "Ouvrir le journal"
 
-#: src/xo-callbacks.c:133 src/xo-callbacks.c:231
+#: src/xo-callbacks.c:132 src/xo-callbacks.c:230
 msgid "Xournal files"
 msgstr "Fichiers Xournal"
 
-#: src/xo-callbacks.c:183 src/xo-callbacks.c:276
+#: src/xo-callbacks.c:182 src/xo-callbacks.c:275
 #, c-format
 msgid "Error saving file '%s'"
 msgstr "Erreur lors de l'enregistrement du fichier «%s»"
 
-#: src/xo-callbacks.c:203
+#: src/xo-callbacks.c:202
 msgid "Save Journal"
 msgstr "Enregistrer le journal"
 
-#: src/xo-callbacks.c:257 src/xo-callbacks.c:432
+#: src/xo-callbacks.c:256 src/xo-callbacks.c:401
 #, c-format
 msgid "Should the file %s be overwritten?"
 msgstr "Ecraser le contenu du fichier %s ?"
 
-#. end
-#: src/xo-callbacks.c:329
-msgid "Print"
-msgstr "Imprimer"
-
-#: src/xo-callbacks.c:332
-msgid "Current page"
-msgstr "Page actuelle"
-
-#: src/xo-callbacks.c:332
-msgid "Pages"
-msgstr "Pages"
-
-#: src/xo-callbacks.c:388
+#: src/xo-callbacks.c:357
 msgid "Export to PDF"
 msgstr "Exporter PDF"
 
-#: src/xo-callbacks.c:445
+#: src/xo-callbacks.c:414
 #, c-format
 msgid "Error creating file '%s'"
 msgstr "Erreur de création du fichier «%s»"
 
-#: src/xo-callbacks.c:1477
+#: src/xo-callbacks.c:1446
 msgid "Open Background"
 msgstr "Ouvrir un fond de page"
 
-#: src/xo-callbacks.c:1490
+#: src/xo-callbacks.c:1459
 msgid "Bitmap files"
 msgstr "Fichiers bitmap"
 
-#: src/xo-callbacks.c:1498
+#: src/xo-callbacks.c:1467
 msgid "PS/PDF files (as bitmaps)"
 msgstr "Fichiers PS/PDF (comme bitmaps)"
 
-#: src/xo-callbacks.c:1528
+#: src/xo-callbacks.c:1497
 #, c-format
 msgid "Error opening background '%s'"
 msgstr "Erreur d'ouverture du fond «%s»"
 
-#: src/xo-callbacks.c:2080
+#: src/xo-callbacks.c:2054
 msgid "Select Font"
 msgstr "Choisir une police"
 
-#: src/xo-callbacks.c:2439
+#: src/xo-callbacks.c:2429
 msgid ""
 "Drawing is not allowed on the background layer.\n"
 " Switching to Layer 1."
@@ -859,11 +846,6 @@ msgstr ""
 msgid "Couldn't find pixmap file: %s"
 msgstr "Fichier pixmap non trouvé: %s"
 
-#: src/xo-support.c:121
-#, c-format
-msgid "Failed to load pixbuf file: %s: %s\n"
-msgstr "Erreur de chargement du fichier pixmap: %s: %s\n"
-
 #: src/xo-file.c:122 src/xo-file.c:154
 #, c-format
 msgid "Could not write background '%s'. Continuing anyway."
@@ -897,75 +879,88 @@ msgstr "Impossible d'ouvrir le fond «%s»."
 msgid "Unable to render one or more PDF pages."
 msgstr "Impossible d'afficher une ou plusieurs pages du fichier PDF."
 
-#: src/xo-file.c:1382
+#: src/xo-file.c:1392
 msgid " the display resolution, in pixels per inch"
 msgstr " la résolution d'affichage, en pixels par pouce"
 
-#: src/xo-file.c:1385
+#: src/xo-file.c:1395
 msgid " the initial zoom level, in percent"
 msgstr " le niveau de zoom initial, en %"
 
-#: src/xo-file.c:1388
+#: src/xo-file.c:1398
 msgid " maximize the window at startup (true/false)"
 msgstr " maximiser la fenêtre au démarrage (true/false)"
 
-#: src/xo-file.c:1391
+#: src/xo-file.c:1401
 msgid " start in full screen mode (true/false)"
 msgstr " démarrer en mode plein écran (true/false)"
 
-#: src/xo-file.c:1394
+#: src/xo-file.c:1404
 msgid " the window width in pixels (when not maximized)"
 msgstr " largeur de la fenêtre en pixels (si non maximisée)"
 
-#: src/xo-file.c:1397
+#: src/xo-file.c:1407
 msgid " the window height in pixels"
 msgstr " hauteur de la fenêtre en pixels"
 
-#: src/xo-file.c:1400
+#: src/xo-file.c:1410
 msgid " scrollbar step increment (in pixels)"
 msgstr " incrément de la barre de défilement (en pixels)"
 
-#: src/xo-file.c:1403
+#: src/xo-file.c:1413
 msgid " the step increment in the zoom dialog box"
 msgstr " incrément dans la boîte de dialogue zoom"
 
-#: src/xo-file.c:1406
+#: src/xo-file.c:1416
 msgid " the multiplicative factor for zoom in/out"
 msgstr " facteur multiplicatif du zoom avant/arrière"
 
-#: src/xo-file.c:1409
+#: src/xo-file.c:1419
 msgid " document view (true = continuous, false = single page)"
 msgstr " affichage du document (true = continu, false = une seule page)"
 
-#: src/xo-file.c:1412
+#: src/xo-file.c:1422
 msgid " use XInput extensions (true/false)"
 msgstr " utiliser les extensions XInput (true/false)"
 
-#: src/xo-file.c:1415
+#: src/xo-file.c:1425
 msgid " discard Core Pointer events in XInput mode (true/false)"
-msgstr " supprimer les évènements du pointeur principal en mode XInput (true/false)"
+msgstr ""
+" supprimer les évènements du pointeur principal en mode XInput (true/false)"
 
-#: src/xo-file.c:1418
+#: src/xo-file.c:1428
 msgid " always map eraser tip to eraser (true/false)"
-msgstr " toujours utiliser la pointe gomme comme gomme (true/false)"
+msgstr " toujours utiliser la pointe gomme comme outil gomme (true/false)"
 
-#: src/xo-file.c:1421
+#: src/xo-file.c:1431
+msgid ""
+" buttons 2 and 3 switch mappings instead of drawing (useful for some "
+"tablets) (true/false)"
+msgstr ""
+" les buttons 2 et 3 changent d'outil au lieu de dessiner "
+"(utile pour certaines tablettes) (true/false)"
+
+#: src/xo-file.c:1434
 msgid " default path for open/save (leave blank for current directory)"
-msgstr " dossier d'ouverture/enregistrement par défaut (laisser vierge pour dossier courant)"
+msgstr ""
+" dossier d'ouverture/enregistrement par défaut (laisser vierge pour dossier "
+"courant)"
 
-#: src/xo-file.c:1424
+#: src/xo-file.c:1437
 msgid " use pressure sensitivity to control pen stroke width (true/false)"
-msgstr " utiliser la sensibilité à la pression pour contrôler la largeur des traits de stylo (true/false)"
+msgstr ""
+" utiliser la sensibilité à la pression pour contrôler la largeur des traits "
+"de stylo (true/false)"
 
-#: src/xo-file.c:1427
+#: src/xo-file.c:1440
 msgid " minimum width multiplier"
 msgstr " multiplicateur de largeur minimum"
 
-#: src/xo-file.c:1430
+#: src/xo-file.c:1443
 msgid " maximum width multiplier"
 msgstr " multiplicateur de largeur maximum"
 
-#: src/xo-file.c:1433
+#: src/xo-file.c:1446
 msgid ""
 " interface components from top to bottom\n"
 " valid values: drawarea menu main_toolbar pen_toolbar statusbar"
@@ -973,19 +968,19 @@ msgstr ""
 " composants d'interface de haut en bas\n"
 " valeurs permises: drawarea menu main_toolbar pen_toolbar statusbar"
 
-#: src/xo-file.c:1436
+#: src/xo-file.c:1449
 msgid " interface components in fullscreen mode, from top to bottom"
 msgstr " composants d'interface en mode plein écran, de haut en bas"
 
-#: src/xo-file.c:1439
+#: src/xo-file.c:1452
 msgid " interface has left-handed scrollbar (true/false)"
 msgstr " barre de défilement à gauche (true/false)"
 
-#: src/xo-file.c:1442
+#: src/xo-file.c:1455
 msgid " hide some unwanted menu or toolbar items (true/false)"
 msgstr " cacher certains éléments d'interface (true/false)"
 
-#: src/xo-file.c:1445
+#: 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"
@@ -993,7 +988,7 @@ msgstr ""
 " éléments d'interface à cacher (personnaliser avec précaution!)\n"
 " voir le fichier source xo-interface.c pour une liste de noms d'éléments"
 
-#: src/xo-file.c:1448
+#: src/xo-file.c:1461
 msgid ""
 " highlighter opacity (0 to 1, default 0.5)\n"
 " warning: opacity level is not saved in xoj files!"
@@ -1001,238 +996,233 @@ msgstr ""
 " opacité du surligneur (entre 0 et 1, défaut 0.5)\n"
 " attention: le niveau d'opacité n'est pas enregistré dans les fichiers xoj !"
 
-#: src/xo-file.c:1451
+#: src/xo-file.c:1464
 msgid " auto-save preferences on exit (true/false)"
 msgstr " sauvegarde automatique des préférences en fin de session (true/false)"
 
-#: src/xo-file.c:1455
+#: src/xo-file.c:1468
 msgid " the default page width, in points (1/72 in)"
 msgstr " largeur de page par défaut, en points (1/72 pouce)"
 
-#: src/xo-file.c:1458
+#: src/xo-file.c:1471
 msgid " the default page height, in points (1/72 in)"
 msgstr " hauteur de page par défaut, en points"
 
-#: src/xo-file.c:1461
+#: src/xo-file.c:1474
 msgid " the default paper color"
 msgstr " couleur de papier par défaut"
 
-#: src/xo-file.c:1464
+#: src/xo-file.c:1479
 msgid " the default paper style (plain, lined, ruled, or graph)"
 msgstr " style de papier par défaut (plain, lined, ruled, ou graph)"
 
-#: src/xo-file.c:1467
+#: src/xo-file.c:1482
 msgid " apply paper style changes to all pages (true/false)"
-msgstr " appliquer les changements de style de papier à toutes les pages (true/false)"
+msgstr ""
+" appliquer les changements de style de papier à toutes les pages (true/false)"
 
-#: src/xo-file.c:1470
+#: src/xo-file.c:1485
 msgid " preferred unit (cm, in, px, pt)"
 msgstr " unité préférée (cm, in, px, pt)"
 
-#: src/xo-file.c:1473
+#: src/xo-file.c:1488
 msgid " include paper ruling when printing or exporting to PDF (true/false)"
-msgstr " inclure les lignes du papier lors de l'impression ou exportation vers PDF (true/false)"
-
-#: src/xo-file.c:1476
-msgid " antialiased bitmap backgrounds (true/false)"
-msgstr " anticrénelage des fonds bitmap (true/false)"
+msgstr ""
+" inclure les lignes du papier lors de l'impression ou exportation vers PDF "
+"(true/false)"
 
-#: src/xo-file.c:1479
+#: src/xo-file.c:1491
 msgid " just-in-time update of page backgrounds (true/false)"
 msgstr " mise à jour en temps réel des fonds de page (true/false)"
 
-#: src/xo-file.c:1482
+#: src/xo-file.c:1494
 msgid ""
 " bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)"
-msgstr ""
-" résolution bitmap des fonds PS/PDF produits via ghostscript (dpi)"
+msgstr " résolution bitmap des fonds PS/PDF produits via ghostscript (dpi)"
 
-#: src/xo-file.c:1485
+#: src/xo-file.c:1497
 msgid ""
 " bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)"
 msgstr ""
 " résolution bitmap des fonds PDF lors de l'impression via libgnomeprint (dpi)"
 
-#: src/xo-file.c:1489
+#: src/xo-file.c:1501
 msgid ""
 " selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, "
 "hand)"
 msgstr ""
-" outil sélectionné au démarrage (pen, eraser, highlighter, selectrect, vertspace, hand)"  
+" outil sélectionné au démarrage (pen, eraser, highlighter, selectrect, "
+"vertspace, hand)"
 
-#: src/xo-file.c:1492
+#: src/xo-file.c:1504
 msgid " default pen color"
 msgstr " couleur du stylo par défaut"
 
-#: src/xo-file.c:1495
+#: src/xo-file.c:1509
 msgid " default pen thickness (fine = 1, medium = 2, thick = 3)"
 msgstr " épaisseur du stylo par défaut (fin = 1, moyen = 2, épais = 3)"
 
-#: src/xo-file.c:1498
+#: src/xo-file.c:1512
 msgid " default pen is in ruler mode (true/false)"
 msgstr " stylo par défaut est en mode règle (true/false)"
 
-#: src/xo-file.c:1501
+#: src/xo-file.c:1515
 msgid " default pen is in shape recognizer mode (true/false)"
 msgstr " stylo par défaut est en mode détection de formes (true/false)"
 
-#: src/xo-file.c:1504
+#: src/xo-file.c:1518
 msgid " default eraser thickness (fine = 1, medium = 2, thick = 3)"
 msgstr " épaisseur de la gomme par défaut (fin = 1, moyen = 2, épais = 3)"
 
-#: src/xo-file.c:1507
+#: src/xo-file.c:1521
 msgid " default eraser mode (standard = 0, whiteout = 1, strokes = 2)"
-msgstr " mode de la gomme par défaut (standard = 0, blanc = 1, traits entiers = 2)"
+msgstr ""
+" mode de la gomme par défaut (standard = 0, blanc = 1, traits entiers = 2)"
 
-#: src/xo-file.c:1510
+#: src/xo-file.c:1524
 msgid " default highlighter color"
 msgstr " couleur du surligneur par défaut"
 
-#: src/xo-file.c:1513
+#: src/xo-file.c:1529
 msgid " default highlighter thickness (fine = 1, medium = 2, thick = 3)"
 msgstr " épaisseur du surligneur par défaut (fin = 1, moyen = 2, épais = 3)"
 
-#: src/xo-file.c:1516
+#: src/xo-file.c:1532
 msgid " default highlighter is in ruler mode (true/false)"
 msgstr " surligneur par défaut est en mode règle (true/false)"
 
-#: src/xo-file.c:1519
+#: src/xo-file.c:1535
 msgid " default highlighter is in shape recognizer mode (true/false)"
 msgstr " surligneur par défaut est en mode détection de formes (true/false)"
 
-#: src/xo-file.c:1522
+#: src/xo-file.c:1538
 msgid ""
 " button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)"
-msgstr " outil bouton 2 (pen, eraser, highlighter, text, selectrect, vertspace, hand)"
+msgstr ""
+" outil bouton 2 (pen, eraser, highlighter, text, selectrect, vertspace, hand)"
 
-#: src/xo-file.c:1525
+#: src/xo-file.c:1541
 msgid ""
 " button 2 brush linked to primary brush (true/false) (overrides all other "
 "settings)"
-msgstr " outil bouton 2 lié à l'outil principal (true/false) (remplace tous "
-"les autres réglages)"
+msgstr ""
+" outil bouton 2 lié à l'outil principal (true/false) (remplace tous les "
+"autres réglages)"
 
-#: src/xo-file.c:1528
+#: src/xo-file.c:1544
 msgid " button 2 brush color (for pen or highlighter only)"
 msgstr " couleur de brosse bouton 2 (stylo ou surligneur seulement)"
 
-#: src/xo-file.c:1532
+#: src/xo-file.c:1551
 msgid " button 2 brush thickness (pen, eraser, or highlighter only)"
 msgstr " épaisseur de brosse bouton 2 (stylo, gomme, surligneur seulement)"
 
-#: src/xo-file.c:1536
+#: src/xo-file.c:1555
 msgid " button 2 ruler mode (true/false) (for pen or highlighter only)"
 msgstr " bouton 2 en mode règle (true/false) (stylo ou surligneur seulement)"
 
-#: src/xo-file.c:1540
+#: src/xo-file.c:1559
 msgid " button 2 shape recognizer mode (true/false) (pen or highlighter only)"
-msgstr " bouton 2 en mode détection de formes (true/false) (stylo ou surligneur seulement)"
+msgstr ""
+" bouton 2 en mode détection de formes (true/false) (stylo ou surligneur "
+"seulement)"
 
-#: src/xo-file.c:1544
+#: src/xo-file.c:1563
 msgid " button 2 eraser mode (eraser only)"
 msgstr " options de la gomme bouton 2 (gomme seulement)"
 
-#: src/xo-file.c:1547
+#: src/xo-file.c:1566
 msgid ""
 " button 3 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)"
 msgstr ""
 " outil bouton 3 (pen, eraser, highlighter, text, selectrect, vertspace, hand)"
 
-#: src/xo-file.c:1550
+#: src/xo-file.c:1569
 msgid ""
 " button 3 brush linked to primary brush (true/false) (overrides all other "
 "settings)"
 msgstr ""
-" outil bouton 3 lié à l'outil principal (true/false) (remplace tous "
-"les autres réglages)"
+" outil bouton 3 lié à l'outil principal (true/false) (remplace tous les "
+"autres réglages)"
 
-#: src/xo-file.c:1553
+#: src/xo-file.c:1572
 msgid " button 3 brush color (for pen or highlighter only)"
 msgstr " couleur de brosse bouton 3 (stylo ou surligneur seulement)"
 
-#: src/xo-file.c:1557
+#: src/xo-file.c:1579
 msgid " button 3 brush thickness (pen, eraser, or highlighter only)"
 msgstr " épaisseur de brosse bouton 3 (stylo, gomme, surligneur seulement)"
 
-#: src/xo-file.c:1561
+#: src/xo-file.c:1583
 msgid " button 3 ruler mode (true/false) (for pen or highlighter only)"
 msgstr " bouton 3 en mode règle (true/false) (stylo ou surligneur seulement)"
 
-#: src/xo-file.c:1565
+#: src/xo-file.c:1587
 msgid " button 3 shape recognizer mode (true/false) (pen or highlighter only)"
-msgstr " bouton 3 en mode détection de formes (true/false) (stylo ou surligneur seulement)"
+msgstr ""
+" bouton 3 en mode détection de formes (true/false) (stylo ou surligneur "
+"seulement)"
 
-#: src/xo-file.c:1569
+#: src/xo-file.c:1591
 msgid " button 3 eraser mode (eraser only)"
 msgstr " options de la gomme bouton 3 (gomme seulement)"
 
-#: src/xo-file.c:1573
+#: src/xo-file.c:1595
 msgid " thickness of the various pens (in points, 1 pt = 1/72 in)"
 msgstr " épaisseurs des divers stylos (en points, 1 pt = 1/72 pouce)"
 
-#: src/xo-file.c:1579
+#: src/xo-file.c:1601
 msgid " thickness of the various erasers (in points, 1 pt = 1/72 in)"
 msgstr " épaisseurs des diverses gommes (en points, 1 pt = 1/72 pouce)"
 
-#: src/xo-file.c:1584
+#: src/xo-file.c:1606
 msgid " thickness of the various highlighters (in points, 1 pt = 1/72 in)"
 msgstr " épaisseurs des divers surligneurs (en points, 1 pt = 1/72 pouce)"
 
-#: src/xo-file.c:1589
+#: src/xo-file.c:1611
 msgid " name of the default font"
 msgstr " nom de la police par défaut"
 
-#: src/xo-file.c:1592
+#: src/xo-file.c:1614
 msgid " default font size"
 msgstr " taille de la police par défaut"
 
-#: src/xo-file.c:1748
+#: src/xo-file.c:1792
 msgid ""
 " Xournal configuration file.\n"
 " This file is generated automatically upon saving preferences.\n"
 " Use caution when editing this file manually.\n"
 msgstr ""
 " Fichier de configuration de Xournal.\n"
-" Ce fichier est généré automatiquement lors de l'enregistrement des préférences.\n"
-" La plus grande prudence est recommandée lors de l'édition manuelle de ce fichier.\n"
+" Ce fichier est généré automatiquement lors de l'enregistrement des "
+"préférences.\n"
+" La plus grande prudence est recommandée lors de l'édition manuelle de ce "
+"fichier.\n"
 
-#: src/xo-misc.c:1244
+#: src/xo-misc.c:1261
 #, c-format
 msgid " of %d"
 msgstr " de %d"
 
-#: src/xo-misc.c:1249
+#: src/xo-misc.c:1266
 msgid "Background"
 msgstr "Fond"
 
-#: src/xo-misc.c:1257
+#: src/xo-misc.c:1274
 #, c-format
 msgid "Layer %d"
 msgstr "Calque %d"
 
-#: src/xo-misc.c:1379
+#: src/xo-misc.c:1396
 #, c-format
 msgid "Xournal - %s"
 msgstr ""
 
-#: src/xo-misc.c:1612
+#: src/xo-misc.c:1649
 #, c-format
 msgid "Save changes to '%s'?"
 msgstr "Enregistrer les modifications de '%s' ?"
 
-#: src/xo-misc.c:1613
+#: src/xo-misc.c:1650
 msgid "Untitled"
 msgstr "Sans titre"
-
-#: src/xo-print.c:1493 src/xo-print.c:1592
-#, c-format
-msgid "Page %d"
-msgstr ""
-
-#: src/xo-print.c:1584
-msgid "Preparing print job"
-msgstr "Préparation du travail d'impression"
-
-#: src/xo-print.c:1602
-msgid "Finalizing..."
-msgstr "Finalisation..."
index 4468be7ea378efd3519e0fb73443409077b5d080..3c5ec8b1f5b7c8dccaaebc80336eb3cb0b80aff3 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -39,24 +39,26 @@ DONE: Esc leaves text box if editing; and leaves fullscreen mode
 DONE: package our own copy of the ttsubset library (to remove a dependency
       on libgnomeprint), and create TT subfonts in memory
 DONE: use gtk-print instead of libgnomeprint
+DONE: remove deprecated "antialias bg" option
+DONE: fix fix_xinput_coords so it works ok without ENABLE_XINPUT_BUGFIX ?
+DONE: disable ctrl-left/right accelerators during text edition
+DONE: custom color chooser button (after a patch contributed by Alex Ray)
+DONE: remember last used directory (after a patch contributed by Lu Zhihe)
+DONE: discard Alt-click and Control-click events
 
-** update: include ttsubset/(Makefile.am, *.c, *.h, README) in cvs
-           also revised configure.in, src/Makefile.am
-           remove src/sft.h
+(go through Patches tracker and take the good stuff... now at 2009-05-09)
 
+** 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]
+
+- paper color chooser (see tracker 2083103)
 - prerelease: update help file (remove references to pdftoppm/libgnomeprint
   & update to poppler/gtkprint)
-- remove "antialias bg" flag, useless... see McElrath
+- document config options into manual file?
 - PDF bg memory usage throttling / delete oldest pdf backgrounds
 - replace ttsubset by something more modern? (eg. from cairo ?)
-- fix fix_xinput_coords so it works ok without ENABLE_XINPUT_BUGFIX ?
-   (with both old and new GTK+)
-  (need to shift by (sx,sy), + shift between canvas->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
index 129716ad971de4dafed350c37d83cdf6e83ae775..2a2dbda4e701a7f89364f99d5fe41c31f042fc07 100644 (file)
@@ -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();
 
index 34a7c89b86cf5306b1c79764a2a92b60e680f23f..71771cd2f0199e6c1aa3a415c1bf6d24466f6e98 100644 (file)
@@ -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));
+}
+
index ebe9b8bf834b4b274c42bc48fb2d597a325e433b..c371ddd88143af14d712ac2474967054b31659f3 100644 (file)
@@ -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);
index 163c2041abb9ef4ed2fc8de93a8ccbc2627a6212..4dd7396b59490db800e1c7a95e5416be61a1c0fc 100644 (file)
@@ -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]<NUM_STROKE_TOOLS)?
-               color_names[ui.brushes[1][ui.toolno[1]].color_no]:"white"));
+    (ui.toolno[1]<NUM_STROKE_TOOLS)?
+      ((ui.brushes[1][ui.toolno[1]].color_no>=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]<NUM_STROKE_TOOLS)?
@@ -1556,8 +1570,11 @@ void save_config_to_file(void)
     g_strdup((ui.linked_brush[2]==BRUSH_LINKED)?"true":"false"));
   update_keyval("tools", "btn3_color",
     _(" button 3 brush color (for pen or highlighter only)"),
-    g_strdup((ui.toolno[2]<NUM_STROKE_TOOLS)?
-               color_names[ui.brushes[2][ui.toolno[2]].color_no]:"white"));
+    (ui.toolno[2]<NUM_STROKE_TOOLS)?
+      ((ui.brushes[2][ui.toolno[2]].color_no>=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]<NUM_STROKE_TOOLS)?
@@ -1674,6 +1691,28 @@ gboolean parse_keyval_enum(const gchar *group, const gchar *key, int *val, const
   return FALSE;
 }
 
+gboolean parse_keyval_enum_color(const gchar *group, const gchar *key, int *val, guint *val_rgba, 
+                                 const char **names, const guint *predef_rgba, int n)
+{
+  gchar *ret;
+  int i;
+  
+  ret = g_key_file_get_value(ui.config_data, group, key, NULL);
+  if (ret==NULL) return FALSE;
+  for (i=0; i<n; i++) {
+    if (!names[i][0]) continue; // "" is for invalid values
+    if (!g_ascii_strcasecmp(ret, names[i]))
+      { *val = i; *val_rgba = predef_rgba[i]; g_free(ret); return TRUE; }
+  }
+  if (ret[0]=='#') {
+    *val = COLOR_OTHER;
+    *val_rgba = strtoul(ret+1, NULL, 16);
+    g_free(ret);
+    return TRUE;
+  }
+  return FALSE;
+}
+
 gboolean parse_keyval_boolean(const gchar *group, const gchar *key, gboolean *val)
 {
   gchar *ret;
@@ -1773,6 +1812,7 @@ void load_config_from_file(void)
   parse_keyval_boolean("general", "use_xinput", &ui.allow_xinput);
   parse_keyval_boolean("general", "discard_corepointer", &ui.discard_corepointer);
   parse_keyval_boolean("general", "use_erasertip", &ui.use_erasertip);
+  parse_keyval_boolean("general", "buttons_switch_mappings", &ui.button_switch_mapping);
   parse_keyval_string("general", "default_path", &ui.default_path);
   parse_keyval_boolean("general", "pressure_sensitivity", &ui.pressure_sensitivity);
   parse_keyval_float("general", "width_minimum_multiplier", &ui.width_minimum_multiplier, 0., 10.);
@@ -1789,12 +1829,12 @@ void load_config_from_file(void)
   
   parse_keyval_float("paper", "width", &ui.default_page.width, 1., 5000.);
   parse_keyval_float("paper", "height", &ui.default_page.height, 1., 5000.);
-  parse_keyval_enum("paper", "color", &(ui.default_page.bg->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]<NUM_STROKE_TOOLS)
       parse_keyval_int("tools", "btn2_thickness", &(ui.brushes[1][ui.toolno[1]].thickness_no), 0, 4);
@@ -1838,7 +1884,9 @@ void load_config_from_file(void)
     if (ui.toolno[2]==TOOL_PEN || ui.toolno[2]==TOOL_HIGHLIGHTER) {
       parse_keyval_boolean("tools", "btn3_ruler", &(ui.brushes[2][ui.toolno[2]].ruler));
       parse_keyval_boolean("tools", "btn3_recognizer", &(ui.brushes[2][ui.toolno[2]].recognizer));
-      parse_keyval_enum("tools", "btn3_color", &(ui.brushes[2][ui.toolno[2]].color_no), color_names, COLOR_MAX);
+      parse_keyval_enum_color("tools", "btn3_color", 
+         &(ui.brushes[2][ui.toolno[2]].color_no), &(ui.brushes[2][ui.toolno[2]].color_rgba), 
+         color_names, predef_colors_rgba, COLOR_MAX);
     }
     if (ui.toolno[2]<NUM_STROKE_TOOLS)
       parse_keyval_int("tools", "btn3_thickness", &(ui.brushes[2][ui.toolno[2]].thickness_no), 0, 4);
index 54bcdebca64f2127d6d18066da0adcf4c8dc21ef..6b35597a997481fdde1cf4bcadcf2e24a179537b 100644 (file)
@@ -1,5 +1,5 @@
 #define DEFAULT_SHORTEN_MENUS \
-  "optionsAntialiasBG optionsProgressiveBG optionsLeftHanded"
+  "optionsProgressiveBG optionsLeftHanded optionsButtonSwitchMapping"
 
 #define GS_CMDLINE \
   "gs -sDEVICE=bmp16m -r%f -q -sOutputFile=- " \
index 31ceb885605fa745ebfc0dcd468c962e4ab5f97c..df236d8bb8e63325ad3eecc370cee6d17395c899 100644 (file)
@@ -241,8 +241,8 @@ create_winMain (void)
   GtkWidget *button3LinkBrush;
   GtkWidget *button3CopyBrush;
   GtkWidget *button3NABrush;
+  GtkWidget *optionsButtonSwitchMapping;
   GtkWidget *separator18;
-  GtkWidget *optionsAntialiasBG;
   GtkWidget *optionsProgressiveBG;
   GtkWidget *optionsPrintRuling;
   GtkWidget *optionsLeftHanded;
@@ -323,6 +323,8 @@ create_winMain (void)
   GtkWidget *buttonYellow;
   GtkWidget *buttonWhite;
   GtkWidget *buttonColorOther;
+  GtkWidget *toolitem22;
+  GtkWidget *buttonColorChooser;
   GtkWidget *toolitem21;
   GtkWidget *vseparator10;
   GtkWidget *toolitem20;
@@ -1022,11 +1024,9 @@ create_winMain (void)
   gtk_container_add (GTK_CONTAINER (toolsColor_menu), colorWhite);
   gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (colorWhite), TRUE);
 
-  colorOther = gtk_radio_menu_item_new_with_mnemonic (colorBlack_group, _("other..."));
-  colorBlack_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (colorOther));
+  colorOther = gtk_menu_item_new_with_mnemonic (_("other..."));
   gtk_widget_show (colorOther);
   gtk_container_add (GTK_CONTAINER (toolsColor_menu), colorOther);
-  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (colorOther), TRUE);
 
   colorNA = gtk_radio_menu_item_new_with_mnemonic (colorBlack_group, _("NA"));
   colorBlack_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (colorNA));
@@ -1354,15 +1354,15 @@ create_winMain (void)
   gtk_container_add (GTK_CONTAINER (button3_mapping_menu), button3NABrush);
   gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (button3NABrush), TRUE);
 
+  optionsButtonSwitchMapping = gtk_check_menu_item_new_with_mnemonic (_("Buttons Switch Mappings"));
+  gtk_widget_show (optionsButtonSwitchMapping);
+  gtk_container_add (GTK_CONTAINER (menuOptions_menu), optionsButtonSwitchMapping);
+
   separator18 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator18);
   gtk_container_add (GTK_CONTAINER (menuOptions_menu), separator18);
   gtk_widget_set_sensitive (separator18, FALSE);
 
-  optionsAntialiasBG = gtk_check_menu_item_new_with_mnemonic (_("_Antialiased Bitmaps"));
-  gtk_widget_show (optionsAntialiasBG);
-  gtk_container_add (GTK_CONTAINER (menuOptions_menu), optionsAntialiasBG);
-
   optionsProgressiveBG = gtk_check_menu_item_new_with_mnemonic (_("_Progressive Backgrounds"));
   gtk_widget_show (optionsProgressiveBG);
   gtk_container_add (GTK_CONTAINER (menuOptions_menu), optionsProgressiveBG);
@@ -1881,6 +1881,17 @@ create_winMain (void)
   gtk_radio_tool_button_set_group (GTK_RADIO_TOOL_BUTTON (buttonColorOther), buttonBlack_group);
   buttonBlack_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (buttonColorOther));
 
+  toolitem22 = (GtkWidget*) gtk_tool_item_new ();
+  gtk_widget_show (toolitem22);
+  gtk_container_add (GTK_CONTAINER (toolbarPen), toolitem22);
+
+  buttonColorChooser = gtk_color_button_new ();
+  gtk_widget_show (buttonColorChooser);
+  gtk_container_add (GTK_CONTAINER (toolitem22), buttonColorChooser);
+  gtk_widget_set_size_request (buttonColorChooser, 34, 32);
+  gtk_container_set_border_width (GTK_CONTAINER (buttonColorChooser), 2);
+  GTK_WIDGET_UNSET_FLAGS (buttonColorChooser, GTK_CAN_FOCUS);
+
   toolitem21 = (GtkWidget*) gtk_tool_item_new ();
   gtk_widget_show (toolitem21);
   gtk_container_add (GTK_CONTAINER (toolbarPen), toolitem21);
@@ -2189,7 +2200,7 @@ create_winMain (void)
   g_signal_connect ((gpointer) colorWhite, "toggled",
                     G_CALLBACK (on_colorWhite_activate),
                     NULL);
-  g_signal_connect ((gpointer) colorOther, "toggled",
+  g_signal_connect ((gpointer) colorOther, "activate",
                     G_CALLBACK (on_colorOther_activate),
                     NULL);
   g_signal_connect ((gpointer) penthicknessVeryFine, "toggled",
@@ -2324,8 +2335,8 @@ create_winMain (void)
   g_signal_connect ((gpointer) button3CopyBrush, "activate",
                     G_CALLBACK (on_button3CopyBrush_activate),
                     NULL);
-  g_signal_connect ((gpointer) optionsAntialiasBG, "activate",
-                    G_CALLBACK (on_optionsAntialiasBG_activate),
+  g_signal_connect ((gpointer) optionsButtonSwitchMapping, "toggled",
+                    G_CALLBACK (on_optionsButtonsSwitchMappings_activate),
                     NULL);
   g_signal_connect ((gpointer) optionsProgressiveBG, "activate",
                     G_CALLBACK (on_optionsProgressiveBG_activate),
@@ -2483,6 +2494,9 @@ create_winMain (void)
   g_signal_connect ((gpointer) buttonWhite, "toggled",
                     G_CALLBACK (on_colorWhite_activate),
                     NULL);
+  g_signal_connect ((gpointer) buttonColorChooser, "color_set",
+                    G_CALLBACK (on_buttonColorChooser_set),
+                    NULL);
   g_signal_connect ((gpointer) fontButton, "font_set",
                     G_CALLBACK (on_fontButton_font_set),
                     NULL);
@@ -2693,8 +2707,8 @@ create_winMain (void)
   GLADE_HOOKUP_OBJECT (winMain, button3LinkBrush, "button3LinkBrush");
   GLADE_HOOKUP_OBJECT (winMain, button3CopyBrush, "button3CopyBrush");
   GLADE_HOOKUP_OBJECT (winMain, button3NABrush, "button3NABrush");
+  GLADE_HOOKUP_OBJECT (winMain, optionsButtonSwitchMapping, "optionsButtonSwitchMapping");
   GLADE_HOOKUP_OBJECT (winMain, separator18, "separator18");
-  GLADE_HOOKUP_OBJECT (winMain, optionsAntialiasBG, "optionsAntialiasBG");
   GLADE_HOOKUP_OBJECT (winMain, optionsProgressiveBG, "optionsProgressiveBG");
   GLADE_HOOKUP_OBJECT (winMain, optionsPrintRuling, "optionsPrintRuling");
   GLADE_HOOKUP_OBJECT (winMain, optionsLeftHanded, "optionsLeftHanded");
@@ -2770,6 +2784,8 @@ create_winMain (void)
   GLADE_HOOKUP_OBJECT (winMain, buttonYellow, "buttonYellow");
   GLADE_HOOKUP_OBJECT (winMain, buttonWhite, "buttonWhite");
   GLADE_HOOKUP_OBJECT (winMain, buttonColorOther, "buttonColorOther");
+  GLADE_HOOKUP_OBJECT (winMain, toolitem22, "toolitem22");
+  GLADE_HOOKUP_OBJECT (winMain, buttonColorChooser, "buttonColorChooser");
   GLADE_HOOKUP_OBJECT (winMain, toolitem21, "toolitem21");
   GLADE_HOOKUP_OBJECT (winMain, vseparator10, "vseparator10");
   GLADE_HOOKUP_OBJECT (winMain, toolitem20, "toolitem20");
index 5733f5b1ae018e46e39725426913491b0c294200..b7448459e2ca69a26ed76e1ea6e5fe22f12d424f 100644 (file)
@@ -370,8 +370,6 @@ void fix_xinput_coords(GdkEvent *event)
   }
   else return; // nothing we know how to do
 
-  // use canvas window, not event window (else get GTK+ 2.11 bugs!)            
-  gdk_window_get_origin(GTK_WIDGET(canvas)->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);
 }
+
+
index fe490ec63f1988b5438e81540eaf693e2bd7fd0c..3a6e029dd98f4fcca83d05a92264f06502a5e342 100644 (file)
@@ -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
index 32e7504ea136707e130185b05b12d012292bcc78..85e3536a488430b7c81833475f7431cdd5c1eea9 100644 (file)
@@ -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, 
index d69b88100d48d82ae934c8b25b694406a16b80ec..cd7b2ea37f7708c21103c531a516821695d2e7d2 100644 (file)
@@ -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 */
index 5d2689ff3dd8eb4373d8b728f61d42766f12e80e..f5aace629be5200c83a71ab48f948ced1c15281f 100644 (file)
@@ -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);
     }
index 00ac0ccd23885dba225370d580bb7473b321e2a9..6233fe74482c605c59de78d0f431d5b113674958 100644 (file)
@@ -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];
index 04760607f81d2e99279cfbb25548e15c6831a43f..c160040fdb4e75a7a53a2893a62a15fda9c57f8c 100644 (file)
                          </child>
 
                          <child>
-                           <widget class="GtkRadioMenuItem" id="colorOther">
+                           <widget class="GtkMenuItem" id="colorOther">
                              <property name="visible">True</property>
                              <property name="label" translatable="yes">other...</property>
                              <property name="use_underline">True</property>
-                             <property name="active">True</property>
-                             <property name="group">colorBlack</property>
-                             <signal name="toggled" handler="on_colorOther_activate" last_modification_time="Thu, 01 Dec 2005 21:56:57 GMT"/>
+                             <signal name="activate" handler="on_colorOther_activate" last_modification_time="Thu, 01 Dec 2005 21:56:57 GMT"/>
                            </widget>
                          </child>
 
                    </widget>
                  </child>
 
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator18">
+                  <child>
+                   <widget class="GtkCheckMenuItem" id="optionsButtonSwitchMapping">
                      <property name="visible">True</property>
+                     <property name="label" translatable="yes">Buttons Switch Mappings</property>
+                     <property name="use_underline">True</property>
+                     <property name="active">False</property>
+                     <signal name="toggled" handler="on_optionsButtonsSwitchMappings_activate" last_modification_time="Sun, 20 Sep 2009 22:54:39 GMT"/>
                    </widget>
                  </child>
 
                  <child>
-                   <widget class="GtkCheckMenuItem" id="optionsAntialiasBG">
+                   <widget class="GtkSeparatorMenuItem" id="separator18">
                      <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Antialiased Bitmaps</property>
-                     <property name="use_underline">True</property>
-                     <property name="active">False</property>
-                     <signal name="activate" handler="on_optionsAntialiasBG_activate" last_modification_time="Thu, 26 Jan 2006 03:42:27 GMT"/>
                    </widget>
                  </child>
 
            </packing>
          </child>
 
+         <child>
+           <widget class="GtkToolItem" id="toolitem22">
+             <property name="visible">True</property>
+             <property name="visible_horizontal">True</property>
+             <property name="visible_vertical">True</property>
+             <property name="is_important">False</property>
+
+             <child>
+               <widget class="GtkColorButton" id="buttonColorChooser">
+                 <property name="border_width">2</property>
+                 <property name="width_request">34</property>
+                 <property name="height_request">32</property>
+                 <property name="visible">True</property>
+                 <property name="use_alpha">False</property>
+                 <property name="focus_on_click">True</property>
+                 <signal name="color_set" handler="on_buttonColorChooser_set" last_modification_time="Wed, 16 Sep 2009 23:45:14 GMT"/>
+               </widget>
+             </child>
+           </widget>
+           <packing>
+             <property name="expand">False</property>
+             <property name="homogeneous">False</property>
+           </packing>
+         </child>
+
          <child>
            <widget class="GtkToolItem" id="toolitem21">
              <property name="visible">True</property>