debian/0000755000000000000000000000000012222262677007176 5ustar debian/source/0000755000000000000000000000000012221353232010461 5ustar debian/source/format0000644000000000000000000000001411467543170011704 0ustar 3.0 (quilt) debian/source/include-binaries0000644000000000000000000000010012163554517013626 0ustar debian/local/16x16/rgbpaint.png debian/local/32x32/rgbpaint.png debian/rgbpaint.menu0000644000000000000000000000032012163557555011673 0ustar ?package(rgbpaint):needs="X11"\ section="Applications/Graphics"\ title="rgbPaint"\ longtitle="Simple painting program for pixel art."\ icon="/usr/share/pixmaps/rgbpaint.xpm"\ command="/usr/bin/rgbpaint" debian/local/0000755000000000000000000000000012221353232010253 5ustar debian/local/man/0000755000000000000000000000000012221353232011026 5ustar debian/local/rgbpaint-xhtml.xsl0000644000000000000000000000200112055751463013751 0ustar 1 UTF-8 1 debian/local/xhtml/ debian/local/32x32/0000755000000000000000000000000012221353232011034 5ustar debian/local/32x32/rgbpaint.png0000644000000000000000000000115412150027240013347 0ustar ‰PNG  IHDR D€ŠÆgAMA± üasRGBźÎé cHRMz&€„ú€èu0ê`:˜pœșQ<cPLTE““ŐŐ?O:ÿÿƒhÒŚzŸĆ™¶„`€^ÏÓŻn“nlŽœn„ʀżÿ€€ÿ€“ÿU^^ÿOSÙPPț$.|ČH„D ڏgțj+ęGäÿ…Èÿÿÿ2șažtRNS@æŰfbKGD łk=€ pHYsHHFÉk>êIDAT8Ë­’ínƒ0 E!œŻmPÆ …ÂûżćLrȘ:蚶óˑnì(EńKÊW}UÉB­äĘ4ZŒ 2ÚJŽŒńB9ÂQ7,èÆ o‰șVJ•e:˜óȘđ ÄÚ9w(-€kCä\蒐kžÆ„¶ ČpécDbŒś6ĘPtŸBŹ{o‡cî+!†‡—Đă„Lg›ÜőÆ@že`LŒ0ŃÌ@˜3KlÏóu_éÎ@žìÂș-ČÀŠő^녁°ä!+ëǍ°eÖsÍjʁ°fž?L„őgAœî«©űgŸ©Š—JËÜ%tEXtdate:create2013-05-25T11:20:54+02:00ĘœQ*%tEXtdate:modify2013-05-25T05:23:12+02:00ęûâ”IENDźB`‚debian/local/README.translators0000644000000000000000000000066111502753351013520 0ustar 2010-12-17 It is my hope that any translator interested in adapting this manual for rgbPaint will see the task not only as a matter of translating text strings more or less verbatim, but rather to examine the software in action and to put those observation to paper. The master copy in English would then serve as a pattern on how to organise the knowledge. I suggest ``adaption'' as the key word here. Mats Erik Andersson debian/local/rgbpaint.xsl0000644000000000000000000000201311501162672012613 0ustar debian/local/man/ 1 0 1 0 debian/local/16x16/0000755000000000000000000000000012221353232011040 5ustar debian/local/16x16/rgbpaint.png0000644000000000000000000000124412150027240013353 0ustar ‰PNG  IHDR(-SgAMA± üasRGBźÎé cHRMz&€„ú€èu0ê`:˜pœșQ<ÏPLTE““iqĄ«PhLmšÍn„ʇ™J†ź±?O:v‡Ț~U€€ÿ27—;NZi›FĄ…RŽ"ÿs@/”b(…Žb““ÏÏÀʄi|Zžż˜„ș‰†„yôőčÆBąŹ;€©ÿÿÿŐŐŽŽŠž€ŸÈŸ€€ÿŠŠ€¶„nƒȚTd»WWÿuu€f‚XuS]F_i4L~c'j72É»’țY"ÈvŽ# ćY:ÿÉJ_}]ŠWÖ”Jł¶° ÿÿÿl‚ÓtRNS@ż@ż@żżcoîbKGDDùޘÁ pHYsHHFÉk>œIDATÓeéÁ0FŻ-ö}‹­¶(­PKPÁûż“Ż˜Î”óïœč™ùBô!B?tąau{á`ôń@Œ±áhœd,•ö=#ÀĜ΄°ŹlŽ(o„čmKčX€°rœőŠèż)m•BŰ)”/û^1ź‹ptA•èt–Òó.šáą~œipŚ ńÒäĄĆA0Ąšț0ŸÿęòœeŠèĆĐÈ%tEXtdate:create2013-06-29T14:51:59+02:00cÈš%%tEXtdate:modify2013-06-29T14:51:59+02:00•™IENDźB`‚debian/local/xhtml/0000755000000000000000000000000012221353232011407 5ustar debian/local/rgbpaint.xml0000644000000000000000000013726411502763302012624 0ustar Mats Erik"> Andersson"> Justin B"> Rye"> debian@gisladisker.se"> December 17th, 2010"> &prog;"> Debian"> ]> Mark Tyler's painting program Manual for &package;.
&epost;
&fnamn; &enamn; &aar; &namn; &datum-en;
&handbook; 1 &software; &version; &prog; A simple pixel-based painting program. &prog; options image-file file ... Description &software; is a very basic painting program created by forking mtPaint at version 3.09, and then simplifying the user interface. It relies on a small but modifiable palette for pixel-based image editing. Images can be saved in ICO, JPEG and PNG formats; files in other image formats can be loaded, but not saved in the original format. Options The program accepts the following options: Print usage information. dir Use dir as the default directory for loading and saving image files. Grab a screen shot during launch. Any file names remaining on the command line will be loaded as stamps. dir Load program icons in SVG format from the directory dir. size Set size in pixels that stamp thumbnails should be scaled to (up or down depending on original size). The default is 40 pixels on a side; permitted values are in the range 32–256. limit Set the maximum size of the undo buffer to limit MB. The default is 32 MB; permitted values are in the range 1–500. Print version information. Appearance When launched, &prog; will use most of its available window area to present a view of a large Canvas. At the top there will be a , and a will be at the left edge. It is also possible for a rather narrow containing iconised images to be inset at the bottom edge. The Tasks panel This panel is used for selecting actions, each of which is also accessible via a keyboard shortcut. The available actions can be classified into the following groups: New image Load image file Save image file Save image file as Paint Flood fill Make selection Cut Copy Paste Paste text Undo Redo Transform colour Pan window Scaling The first group deals with creating new blank images and reading from or writing to image files. Each action conducts its own safety check in order not to lose unsaved data. It is worth remembering that a fresh canvas is white, and that it is surrounded by greyish borders if the canvas is smaller than the available window area. A simple dialogue is also launched for selecting the size of any new, blank image. The second group picks the main mode that &prog; should enter. When it is in Paint mode, the cursor will become a pencil symbol, while Fill mode displays as a bucket being emptied. Selection mode is more complicated, using more than one icon - see . The third group covers actions that operate on a selected portion of the canvas: Cutting out a shape from the canvas, making a Copy in memory of the content within the marked area, Pasting the copy back from memory onto the canvas, or opening a dialogue window for Text, which will deploy a new selection area just large enough to hold the snippet of text specified using the dialogue window. The final group lists miscellaneous actions: Undo an editing step, Redo an undone step, Transform the overall colour settings, Pan the window across the canvas (a miniature window is shown with a pane whose movements are controlled by the arrow keys), or finally, set the Scaling of the canvas. Some of the icons have the property of becoming dimmed if the action is not accessible at a particular moment, indicating that &prog; is in an inapproriate mode, that no editing steps can be undone/redone, or that no in-memory content exists. Making and using selections The Selection main mode is intended for grabbing and manipulating portions of the full canvas. It can itself be thought of as being divided into three further states: Resting is indicated by a cross-hairs icon and happens when no corner marker has been set. Marking shows one out of four corner icons. They all indicate how the next point selected will be used to lay down a rectangle together with the previously set corner. To get a feeling for this, it is best to experiment a little by moving the pointer around. A corner is set by left clicking, and two set corners show up as a rectangle outlined by dashed lines. A right click will cancel all corners, and will return to the resting state. Moving means that the pointer is hovering above a selected area, and that this area may be moved around. The icon consists of two crossed double-ended arrows, but can look similar to a diamond shape with four small, internal squares. The selected area can be moved around using the keyboard shortcuts (see ), or by holding the left mouse button down and moving the pointer around. The Brushes/Colours panel Here the user chooses a brush and colour for painting, or colour only for flood filling. The upper part of the panel holds the ten different brushes, six solid and four thin ones. The solid brushes can give a square or a round outline in any of three thicknesses. Out of the four available thin brushes, the smallest is so thin as to paint one pixel at a time, making possible very accurate brush work. The other three are of larger sizes, but they all colour pixels in a random fashion within their outline, so they act somewhat like staining a surface. In the lower part of the panel there are twenty buttons displaying a palette of available colours. Clicking on any of these chooses the corresponding colour for painting, until it is replaced. An elongated button, between the upper and the lower areas, will always display the active colour, and has a further useful function. Clicking the left mouse button on it will summon a colour editor. This allows the user to blend a new colour, which will, once accepted, replace the colour that was previously active. The Stamps panel This extra panel, at the bottom of the program window, comes to life only if &prog; was launched using the command line switch , followed by the names of existing image files. The displayed size of any thumbnail image is determined by the switch , or set to 40 pixels in both width and height. If the user left-clicks on a thumbnail image, a copy of the image will appear in the middle of the canvas, with the size of the original image, not that of the thumbnail. The copy is in fact only a marked area (see ), and can be moved around at will with the left mouse button, until a final right click will deposit a copy on the canvas. The marked area is still sitting on top, so it may again be moved around to make additional imprints. Copying, cutting, and pasting &software; handles cut-and-paste a little differently from most similar applications. To make it easier to avoid mistakes, here is a description of how to manipulate chunks of the canvas. When a rectangular portion of the canvas has been selected, it is possible to perform the action Copy. It will take the content of the marked area and save it in-memory for later access. When doing a Cut, the marked area is emptied of its content, so it will appear as a black rectangle, but the removed portion will be remembered as in-memory content which remains available for pasting back. Observe that copying and cutting can only be performed in Selection mode, since a selected area must exist for either action to be sensible. On the other hand, the act of Pasting is possible in Paint mode as well as in Fill mode. When the pasting action is triggered (by icon or by key stroke) the in-memory content is dropped onto the window and it will lie centred on the canvas. It will not yet be painted on the canvas, as it is only casting a shadow to display its contents, but it is ready to move into position before being imprinted on the canvas. The movement itself was described in Keyboard shortcuts Some handy keyboard shortcuts are available. The keys 19 change image scaling in pre-determined steps. The keys + and - give a fine-grained scaling up or down. Any Arrow key moves the mouse pointer in small steps across the canvas; steps which can be made larger by pressing ShiftArrow . When instead using CtrlArrow , the whole canvas will shift in the implied direction. Actions 19 Change scaling to fixed levels. +, - Scale up, scale down. Ins Summon the Transform colour dialogue. End Summon the Pan Window dialogue. f Select Flood fill mode. p Select Paint mode. q Quit the program. s Activate Make Selection mode. t Summon the Text paste dialogue. Ctrl C Make an in-memory Copy of the marked area. Ctrl N Prepare a New image, including a sizing dialogue. Ctrl O Open a file dialogue for fetching an image. Ctrl P Paste the in-memory copy onto a marked area of the canvas. Ctrl S Save the image in a file, using the old name. Ctrl Shift S Save the image in a file, choosing a new name. Ctrl X Cut the selected portion out of the canvas (keeping an in-memory copy). Ctrl Y Redo the most recently undone action. Ctrl Z Undo the most recently completed action. Movement Arrow Move pointer slightly. Shift Arrow Move pointer in larger steps. Ctrl Arrow Move canvas rather than pointer. Home Go to the top of the canvas. Ctrl Home Go to the far left of the canvas. PgUp, PgDn Move the canvas up or down, one page at a time. Ctrl PgUp , Ctrl PgDn Move the canvas left or right, one page at a time. Customised task icons There is a built-in facility for customising the appearance of the task icons as they appear in the . This is mostly an issue for the administrators of kiosk systems or similar, not for the casual user. It can also make sense to use this in the command string registered for &prog; within the &debian; menu subsystem, on machines where menu access is the only way users are expected to launch the program. See next section for the details. Files At launch time, &prog; will record the current working directory as the default location for fetching and storing image files. This is the directory suggested every time a file dialogue is brought into action. Using the command line option , it is possible to set another location. A reasonable choice is " ~" for accessing the home directory of the user. The command line switch allows a directory to be specified where &prog; should look for particular vector image files in SVG format. Their names must all be of the form "stock-XXX.svg", where the XXX is one of the following key words: new, open, save, saveas, cut, copy, paste, undo, redo, text, paint, fill, select, sun, or zoom. Each will provide an icon for the corresponding function in the top panel. A missing icon will be replaced by a default choice, but there is no guarantee that the fallback icon will be unique, or be relevant for the intended purpose. Homepage See also mtpaint 1 , &software;'s more featureful relative. Program Authors Mark Tyler, Dmitry Groshev Manual Authors The original manual page stub was taken as starting point for a complete rewrite as Docbook source, and was substantially extended by &namn; and &namn2;. The new format was chosen in order to simplify translations, and was originally intended for use by the &debian; project, but the text may be used by others. Permission is granted to copy, distribute and/or modify this document under the same terms as &software; itself.
&epost;
&fnamn; &enamn; &aar; &namn; 15 december 2010
&handbook; 1 &software; 0.8.7 &prog; Enkelt ritprogram för bildpunktsgrafik. &prog; tillval bildfil fil ... Beskrivning &Software; Ă€r ett mycket enkelt ritprogram som skapades ur Mtpaint genom förenkling av version 3.09. Bildpunktsgrafik kan skapas och omarbetas med en liten men utbytbar fĂ€rgpalett. Bilder sparas i formaten ICO, JPEG och PNG. Ytterligare bildformat kan lĂ€sas in, men inte sparas i ursprunglig form. ProgramvĂ€xlar Programmet godtager dessa styrflaggor: Visar upplysning om programanrop. katalog LĂ„ter katalog vara den föreslagna filkatalog dĂ€r dialogen lĂ€gger eller hĂ€mtar bildfiler. Gör en ögonblicksbild av skĂ€rmen som första bild. Alla filnamn efter denna flagga tolkas till att inlĂ€sas som miniatyrer. kat HĂ€mtar insticksbilder, lagrade som vektorgrafik, frĂ„n katalogen kat. storlek SĂ€tter största bredd -- lika med höjd -- för miniatyrbilder. TillĂ„tet vĂ€rde pĂ„ storlek Ă€r frĂ„n 32 till 256 bildpunkter. Förvald storlek Ă€r 40. storlek Nyttjar storlek MB arbetsminne till att kunna Ă„ngra arbetssteg. TillĂ„tet omfĂ„ng gĂ„r frĂ„n 1 MB till 500 MB och skönsvĂ€rdet Ă€r satt till 32 MB. Skriver ut namn och versionsnummer. Utseende Vid programbörjan kommer &prog; att visa upp en mĂ„larduk som upptar stordelen av den tilldelade ytan. Upptill ligger en medan det till vĂ€nster stĂ„r en . I vissa fall kommer ett smalt att finnas infĂ€llt nedtill, dĂ€r miniatyrbilder ligger. Arbetspanelen I denna panel ligger alla arbetssteg samlade. De kan Ă€ven nĂ„s med hjĂ€lp av tangentbordet. Med fördel samlas dessa i grupper efter sitt syfte: Ny bild HĂ€mta bildfil Spara bildfil Spara bildfil i nytt namn MĂ„la Fyll i en yta Markera ett utsnitt Klipp ut Kopiera Klistra in LĂ€gg till text Ångra Upprepa FĂ€rgbrytning Flytta fönstret över duken Bildskala Första gruppen syftar till att skapa, spara och att hĂ€mta bilder. Var och en av dessa har viss sĂ€kerhet inbyggd, allt för att man inte skall förlora nĂ„got arbete av misstag. LĂ€gg mĂ€rke till att en ny duk Ă€r vit, men att den omges av grĂ„aktiga rĂ€nder om bildstorleken Ă€r mindre Ă€n den tilldelade fönsterytan. Ett enkelt dialogfönster framtrĂ€der nĂ€r en ny bild skall skapas. DĂ€r kan storlek vĂ€ljas. I den andra upprĂ€kningen finns de lĂ€gen som styr hur &prog; förvĂ€ntas arbeta. ArbetslĂ€get MĂ„la gör att en pekaren pĂ„ skĂ€rmen Ă„terges som en liten pensel, medan lĂ€get Fyll i en yta ter sig som en burk som spiller ut fĂ€rg. LĂ€get Markera ett utsnitt nyttjar mer Ă€n en pekarbild och Ă€r sammansatt, sĂ„ det lĂ€get förklaras mer i Den tredje gruppen omfattar arbetet med sĂ„dana utvalda omrĂ„den: att Klippa ut ett omrĂ„de ur duken, att göra en Kopia i arbetsminne av det markerade omrĂ„det, att Klistra in en sĂ„dan kopia pĂ„ mĂ„larduken, eller att öppna ett dialogfönster med LĂ€gg till text för kunna mata in text och att sedan skapa ett urvalsomrĂ„de av passande storlek. Till sist kommer nĂ„gra blandade arbetssteg: att Ångra senaste Ă€ndring, att Upprepa det senast Ă„ngrade, att med andra ord utföra Ă€ndringen trots allt. FĂ€rgbrytning tillĂ„ter Ă€ndring av alla instĂ€llningar som styr fĂ€rgĂ„tergivningen. Att Flytta fönstret över duken lĂ„ter ett miniatyrfönster dyka upp dĂ€r flyttningen styrs med piltangenterna. Slutligen finns en utfallslista Bildskala som avgör förstoringsgraden. Somliga insticksbilder för arbetssteg har egenskapen att göras grumliga om motsvarande steg inte kan tillĂ€mpas. Detta kan innebĂ€ra att arbetslĂ€get inte tillĂ„ter utförandet eller att ingen Ă€ndring finns att Ă„ngra eller upprepa. Utöver dessa kan utklipp saknas i arbetsminnet. Urval och markeringar ArbetslĂ€get Markera ett utsnitt har till syfte att fĂ„nga in och att handskas med delar av hela duken. Det underlĂ€ttar att tĂ€nka pĂ„ detta lĂ€ge som i sin tur indelat i tre underordnade lĂ€gen: VĂ€ntande Detta rĂ„der nĂ€r pekaren Ă€r ett hĂ„rkors pĂ„ duken och det innebĂ€r att ingen hörnmarkering har gjorts. Utstakande DĂ„ visas pekaren som en liten pil riktad in i ett hörn. Detta kan göras mot fyra olika hĂ„ll och visar det sĂ€tt som nĂ€sta markering kommer att samordnas med den redan satta. Det torde vara bĂ€st att experimentera litet för att lĂ€ra in hur pekarens lĂ€ge inverkar. En hörnmarkering görs med ett vĂ€nsterklick och tvĂ„ sĂ„dana hörn samarbetar till att avgrĂ€nsa en rektangel. Denna trĂ€der fram i form av en rand med streckade linjer. Ett högerklick avlĂ€gsnar redan satta markeringar och gĂ„r sedan tillbaka till vĂ€ntande arbetslĂ€ge. Flyttande Detta innebĂ€r att pekaren ligger inom ett utstakat omrĂ„de och att detta nu kan flyttas över duken. Pekarbilden Ă€r egentligen tvĂ„ korslagda dubbelpilar, men kan ibland likna en ruter med fyra inre kvadrater. Det utstakade omrĂ„det kan dels flyttas med hjĂ€lp av tangentbordet (se efter i ) eller genom att trycka pĂ„ vĂ€nster musknapp och att samtidigt flytta pĂ„ pekaren. Panel för fĂ€rger och penslar I denna panel kan anvĂ€ndaren vĂ€lja pensel och fĂ€rg för mĂ„lningslĂ€get, liksom fĂ€rg för ifyllnadslĂ€get. I övre delen ligger tio penslar av olika bredd och slag, sex fyllda och fyra glesa. En fylld pensel kan ha ett runt eller ett fyrkantigt avtryck, var och en i tre olika bredder. Den smalaste penseln mĂ„lar en bildpunkt i taget, sĂ„ den tillĂ„ter noggrann penselföring. De tre större bland de glesa penslarna har egenheten att fĂ€rga bildpunkterna inom sitt avtryck med slump. De verkar nĂ€stan betsa snarare Ă€n mĂ„la. Bland de fyra glesa penslarna Ă€r den mista sĂ„ klen att den bara mĂ„lar en bildpunkt i taget. Den tillĂ„ter dĂ€rför mycket noggrann panselföring. De tre andra Ă€r grövre, men de avsĂ€tter bildpunkter litet ojĂ€mnt, sĂ„ deras verkan Ă€r litet som att sĂ€tta en fĂ€rgton i penselspĂ„ret. --> I panelens nedre del finns tjugu fĂ€rgfĂ€lt som tillsammans utgör den tillgĂ€ngliga fĂ€rgpaletten. Ett klick pĂ„ ett sĂ„dant fĂ€lt vĂ€ljer motsvarande fĂ€rg Ă€nda till dess att ett nytt val görs. En tydligt avlĂ„ng knapp mellan panelens övre och nedre delar Ă„tergiver den för tillfĂ€llet utvalda fĂ€rgen, men den fyller ytterligare en nyttig uppgift. Ett vĂ€nsterklick pĂ„ fĂ€rgfĂ€ltet kommer att framkalla ett dialogfönster, dĂ€r man kan bryta (dvs. blanda) en helt ny fĂ€rg. Godtager man resultatet genom att klicka pĂ„ rĂ€tt knapp, dĂ„ kommer den nya fĂ€rgen att ersĂ€tta den gamla i fĂ€rgpaletten och detta pĂ„ samma plats. MiniatyrförrĂ„det Detta förrĂ„d av smĂ„bilder, i programfönstrets nederkant, kommer till synes först nĂ€r &prog; anropades tillsammans med programvĂ€xeln och bara om minst ett namn pĂ„ en tillgĂ€nglig bildfil tillfogades. Storleken pĂ„ de infĂ€llda miniatyrerna bestĂ€ms genom programvĂ€xeln , men sĂ€tts till 40 bildpunkter pĂ„ bredden och höjden om styrflaggan skulle ha utelĂ€mnats. NĂ€r anvĂ€ndaren markerar pĂ„ en miniatyr med vĂ€nster musknapp, dĂ„ kommer motsvarande fullstora bild att lĂ€ggas in i dukens mitt. Miniatyrens egen storlek har ingen inverkan. Egentligen tillfogas bara en markerad kopia av bilden (se vidare i ). Denna kan i sin tur knuffas runt pĂ„ duken med hjĂ€lp av vĂ€nster musknapp för att slutligen, med ett högerklick, fĂ€stas pĂ„ duken. Även efter detta hĂ€nger den rörliga kopian kvar, sĂ„ den kan flyttas till andra lĂ€gen för att Ă„stadkomma ytterligare avtryck! Klistra, klippa och kopiera SĂ€ttet att klippa och sedan att klistra stĂ€mmer inte helt med det gĂ€ngse sĂ€ttet i andra program. För att lĂ€ttare undvika misstag skall en genomgĂ„ng göras av sĂ€ttet att manipulera utsnitt i mĂ„larduken. NĂ€r ett rektangulĂ€rt stycke av duken har markerats dĂ„ Ă€r det möjligt att utföra steget Kopia. Detta lĂ€gger innehĂ„llet inom rutan i arbetsminnet för senare Ă„tkomst. ÅtgĂ€rden Klippa ut avlĂ€gsnar innehĂ„llet inom det markerade omrĂ„det frĂ„n duken, men sparar samtidigt detta i arbetsminnet för senare Ă„tkomst. Efter Ă„tgĂ€rden Ă„terstĂ„r en svart ruta pĂ„ duken dĂ€r innehĂ„llet har tagits bort. MĂ€rk vĂ€l, att kopiering och utklippning endast kan Ă„stadkommas i arbetslĂ€get Markera ett utsnitt, eftersom det annars inte Ă€r meningsfyllt att hantera markerade omrĂ„den. ÅtgĂ€rden Klistra in Ă€r Ă„ andra sidan möjlig i endera av arbetslĂ€gena MĂ„la och Fyll i en yta. NĂ€r denna önskan att klistra in nĂ„got utlöses, frĂ„n tangentbord eller med pekare, dĂ„ hĂ€mtas den i arbetsminnet sparade kopian och den lĂ€gges i fönstret mitt pĂ„ duken. Den har Ă€nnu inte fĂ€sts pĂ„ duken utan den kastar Ă€n sĂ„ lĂ€nge liksom en skugga pĂ„ mĂ„larduken. Kopian invĂ€ntar bara att flyttas i rĂ€tt lĂ€ge innan anvĂ€ndaren med vilje gör ett avtryck pĂ„ duken. Denna rörelse och infĂ€rgning omtalas i Tangentbordet Det finns med tangentbordets hjĂ€lp nĂ„gra genvĂ€gar till hands. Dessa Ă€r tjĂ€nliga frĂ„n tid till annan. Siffertangenterna stĂ€ller bildens skala enligt förvalda steg, medan tecknen + och - ger en glidande, fingraderad förĂ€ndring. Pil-tangenterna flyttar pekaren i smĂ„ steg utmed duken. Stegen kan göras större genom samtidig nedtryckning av skift-tagenten: Skiftpil . Varianten Ctrlpil kommer i stĂ€llet att flytta duken och lĂ„ta pekaren hĂ€nga kvar i sitt lĂ€ge. ÅtgĂ€rder 1 .. 9 Ändra bildskalan i fasta vĂ€rden. +, - Fingradig bildskalning in eller ut. Ins Öppna dialogfönstret för FĂ€rgbrytning. End Öppna styrningen för att Flytta fönstret över duken. f GĂ„ in i lĂ€get Fyll i en yta. p GĂ„ in i MĂ„lningslĂ€ge. q Avsluta programmet. s GĂ„ in i UrvalslĂ€ge. t Öppna dialogfönstret för LĂ€gg till text. Ctrl C Gör en Kopia i arbetsminnet. Ctrl N Skapa en Ny bild. En dialog öppnas för att vĂ€lja dukens storlek. Ctrl O Öppna dialogen HĂ€mta bildfil. Ctrl P Klistra in en skuggbild frĂ„n arbetsminnet. Ctrl S Spara bildfil under det gamla namnet. Ctrl Shift S Spara bildfil i nytt namn. Ctrl X Klipp ut det markerade omrĂ„det ut ur duken. En kopia sparas i arbetsminnet, Ctrl Y Upprepa senast Ă„ngrade Ă„tgĂ€rd. Ctrl Z Ångra senast fullföljda Ă„tgĂ€rd. Förflyttningar pil Flytta pekaren med minsta steglĂ€ngd. Shift pil Flytta pekaren med större steg. Ctrl pil Flytta duken, men hĂ„ll pekaren orörlig. Home GĂ„ till dukens överkant. Ctrl Home GĂ„ till dukens vĂ€nsterkant. PageUp, PageDown Flytta duken sidvis upp eller ned. Ctrl PageUp , Ctrl PageDn Flytta duken sidvis till vĂ€nster eller till höger. SkrĂ€ddarsydda insticksbilder Det finns en förberedd möjlighet att skrĂ€ddarsy utseendet pĂ„ de smĂ„bilder som Ă„tergiver arbetsstegen, de i . Detta berör snarast systemadministratören av kiosksystem och liknande, inte den vanlige anvĂ€ndaren. Det kan ocksĂ„ vara meningsfullt att nyttja detta för det anrop som registreras för &prog; i &debian;s menysystem. Detta pĂ„ maskiner dĂ€r de valmenyer Ă€r det förvĂ€ntade sĂ€ttet att sĂ€tta igĂ„ng olika program. NĂ€sta avsnitt gĂ„r igenom detaljerna. Filer Omedelbart vid start kommer &prog; att lĂ€gga vid anropet gĂ€llande filkatalog pĂ„ minnet. Den Ă€r förvald katalog för att hĂ€mta och lagra bildfiler. Den föreslĂ„s i varje dialog rörande filer. ProgramvĂ€xeln gör det möjligt att föreskriva en lĂ€mpligare filkatalog. Ett rimligt val vore " ~" som pekar pĂ„ anvĂ€ndarens hemkatalog. ProgramvĂ€xeln gör det möjligt att peka ut en filkatalog dĂ€r &prog; kan hĂ€mta fĂ€rdiggjorda insticksbilder skapade ur vektorgrafik. Namnet pĂ„ dessa mĂ„ste vara av slaget "stock-XXX.svg" och filen mĂ„ste innehĂ„lla en beskrivning pĂ„ SVG-format. I namnet skall XXX Ă„terfinnas i upprĂ€kningen: new, open, save, saveas, cut, copy, paste, undo, redo, text, paint, fill, select, sun och zoom. Var och en motsvarar en funktion i arbetspanelen. En saknad förlaga kommer att ersĂ€ttas med förvalda bilder, men ingen garanti finns att ersĂ€ttaren Ă€r entydig eller ens att den pĂ„ rĂ€tt sĂ€tt Ă„tergiver det avsedda syftet. Hemsida Se Ă€ven mtpaint 1 , den mer omfattande föregĂ„ngaren till &Software;. Programmets upphovsmĂ€n Mark Tyler, Dmitry Groshev Handbokens författare Den ursprungliga handbokssidan nyttjades som förlaga till en i grunden ny dokumentation i Docbook-format. Texten utvidgades lĂ„ngt utöver originalet av &namn; och &namn2;. Det nya formatet valdes för att underlĂ€tta översĂ€ttning av handboken och riktade sig i första hand mot &debian;-projektet, men texten fĂ„r nyttjas av andra. Detta dokument mĂ„ mĂ„ngfaldigas, utgivas och Ă€ndras endast i överensstĂ€mmelse med de villkor som vidlĂ„der den ursprungliga mjukvaran &Software;.
debian/control0000644000000000000000000000266012163551520010575 0ustar Source: rgbpaint Section: graphics Priority: optional Maintainer: Mats Erik Andersson Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), gettext, pkg-config, xsltproc, docbook-xsl, libx11-dev, libglib2.0-dev, libgtk2.0-dev, libpango1.0-dev Standards-Version: 3.9.4 Homepage: http://mtpaint.sourceforge.net/rgbpaint.html Vcs-Svn: svn://anonscm.debian.org/collab-maint/deb-maint/rgbpaint/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/collab-maint/deb-maint/rgbpaint/trunk/ Package: rgbpaint Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: simple pixel-based painting program This package provides the simplified painting program rgbPaint, a spin-off from mtPaint by the same authors. Light on dependencies, it can edit and save images in ICO, JPEG, or PNG format only, though it can also read GIF, PCX, SVG, TGA, and TIFF formats. . The user interface is intentionally kept simple, without drop-down menus. Ten brushes are provided, and a palette of twenty colors, each of which can be replaced from a color blender. The available actions are painting, filling, and area selection. The program can also start by taking a screen snapshot to use as the initial image. . Originally aimed at the OLPC initiative, rgbPaint works well with the Sugar desktop environment - especially with a graphics tablet; even young children can quickly master it to produce true brushwork! debian/rgbpaint.install0000644000000000000000000000026512163554736012403 0ustar debian/local/16x16/rgbpaint.png usr/share/icons/hicolor/16x16/apps debian/local/32x32/rgbpaint.png usr/share/icons/hicolor/32x32/apps debian/rgbpaint.desktop usr/share/applications debian/rgbpaint.manpages0000644000000000000000000000002311471254525012512 0ustar debian/local/man/* debian/watch0000644000000000000000000000010511467543170010223 0ustar version=3 http://sf.net/mtpaint/rgbpaint-([.0-9]+)\.tar\.bz2 debian debian/copyright0000644000000000000000000000225612150011766011125 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: rgbPaint Upstream-Contact: Dmitry Groshev Source: http://sourceforge.net/projects/mtpaint/files/rgbpaint/ Files: * Copyright: 2004-2007, Mark Tyler Dmitry Groshev License: GPL-2 Files: po/*.po Copyright: 2005, Myrk Tyler 2005-2006, Pavel Ruzicka 2006, Oliver Frommel 2006, Simek 2006, Tutku Dalmaz 2006, Wei-Lun Chao License: GPL-2 Files: debian/* Copyright: 2010, Mats Erik Andersson License: GPL-2 License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2' debian/changelog0000644000000000000000000000421512221352702011036 0ustar rgbpaint (0.8.7-5) unstable; urgency=low * debian/rules: Add the target override_dh_auto_clean. + Recent debhelper does early cleaning. (Closes: #724101) * Portability fix to allow building with clang. + debian/patches/12-build_portability.diff: New file. -- Mats Erik Andersson Fri, 27 Sep 2013 21:00:05 +0200 rgbpaint (0.8.7-4) unstable; urgency=low * debian/control: Standards 3.9.4, nochanges needed. + Update Vcs-Svn and Vcs-Browser fields. * debian/copyright: Use a versioned format specification. * FTBFS with clang, missing linkage. Patch created by Daniel T Chen . (Closes: #713718) + debian/patches/10-fix_lib_underlinkage.diff: New file. * Implement hardening: + debian/rules: Use the technique of 'buildflags.mk'. + debian/compat: Set to 9. + debian/control: Build-Depends increases to debhelper (>= 9), and adds new dependency on dpkg-dev (>= 1.16.1~). + debian/patches/11-hardening_errors.diff: New file. * debian/local/16x16/rgbpaint.png, debian/local/32x32/rgbpaint.png: New icon files, converted from our patched "rgbpaint.xpm". + debian/rgbpaint.install: Add two entries. + debian/source/include-binaries: New file. * debian/local/rgbpaint-xhtml.xsl: Small misprint. * debian/rgbpaint.menu: Add "longtitle" and "icon". * [lintian] debian/rgbpaint.desktop: Update. -- Mats Erik Andersson Sat, 29 Jun 2013 16:00:30 +0200 rgbpaint (0.8.7-3) unstable; urgency=low * Make program icon have transparent background. + debian/patches/09-make_background_transparent.diff: New file. -- Mats Erik Andersson Fri, 01 Apr 2011 10:40:48 +0200 rgbpaint (0.8.7-2) unstable; urgency=low * FTBFS caused by new toolchain: + debian/rules: Tweak "_conf.txt" to have LDFLAGS include "-lX11". + Closes: #617276 -- Mats Erik Andersson Mon, 07 Mar 2011 23:00:16 +0100 rgbpaint (0.8.7-1) unstable; urgency=low * Initial release. (Closes: #602419) -- Mats Erik Andersson Wed, 12 Jan 2011 10:06:36 +0100 debian/compat0000644000000000000000000000000212150014605010356 0ustar 9 debian/rgbpaint.docs0000644000000000000000000000003311471465264011654 0ustar README debian/local/xhtml/ debian/patches/0000755000000000000000000000000012221353232010610 5ustar debian/patches/11-hardening_errors.diff0000644000000000000000000000554112150113601015214 0ustar Description: FTBFS with hardened builds The enforcement of hardened builds uncovers a small number of errors: . Possibly tainted format strings. . Build system disregards CPPFLAGS during compilation. Author: Mats Erik Andersson Forwarded: no Last-Update: 2013-05-25 --- rgbpaint-0.8.7.debian/src/viewer.c 2007-02-04 23:43:07.000000000 +0100 +++ rgbpaint-0.8.7/src/viewer.c 2013-05-25 04:31:19.000000000 +0200 @@ -374,7 +374,7 @@ static char font_name[256], font_text[25 void initialize_text() { snprintf(font_name, 250, "Sans 16" ); - snprintf(font_text, 250, _("Enter Text Here") ); + snprintf(font_text, 250, "%s", _("Enter Text Here") ); } gint render_text( GtkWidget *widget ) @@ -489,9 +489,9 @@ static gint delete_text( GtkWidget *widg static gint paste_text_ok( GtkWidget *widget, GdkEvent *event, gpointer data ) { - snprintf(font_name, 250, gtk_font_selection_get_font_name( + snprintf(font_name, 250, "%s", gtk_font_selection_get_font_name( GTK_FONT_SELECTION(text_font_window) )); - snprintf(font_text, 250, (char *) gtk_font_selection_get_preview_text( + snprintf(font_text, 250, "%s", (char *) gtk_font_selection_get_preview_text( GTK_FONT_SELECTION(text_font_window) )); render_text( widget ); --- rgbpaint-0.8.7.debian/configure 2013-05-25 04:25:24.000000000 +0200 +++ rgbpaint-0.8.7/configure 2013-05-25 05:13:08.000000000 +0200 @@ -78,7 +78,7 @@ do "--locale="* ) MT_LANG_DEST="`echo "$A" | sed -e "s/--locale=//"`" MT_PO_DEST=$MT_LANG_DEST;; "--mandir="* ) MT_MAN_DEST="`echo "$A" | sed -e "s/--mandir=//"`";; - "cflags" ) CFLAG=${CFLAGS}; LDFLAG=${LDFLAGS};; + "cflags" ) CFLAG=${CFLAGS}; LDFLAG=${LDFLAGS} CPPFLAG=${CPPFLAGS};; "--cpu="* ) MARCH='-march='"`echo "$A" | sed -e "s/--cpu=//"`";; "386" ) MARCH='-march=i386';; "486" ) MARCH='-march=i486';; @@ -192,14 +192,16 @@ else if [ "$CFLAG" ] then echo "LDFLAG = $LDFLAG $L_EX $GTK_LIB" >> $GTK_FILE - echo "CFLAG = $CFLAG $GTK_INCLUDE" >> $GTK_FILE + echo "CPPFLAG = $CPPFLAG $GTK_INCLUDE" >> $GTK_FILE + echo "CFLAG = $CFLAG" >> $GTK_FILE else echo "LDFLAG = $L_EX $GTK_LIB" >> $GTK_FILE + echo "CPPFLAG = $CPPFLAG $GTK_INCLUDE" >> $GTK_FILE if [ "$OPTS" = "YES" ] then - echo "CFLAG = -O2 $MARCH $GTK_INCLUDE" >> $GTK_FILE + echo "CFLAG = -O2 $MARCH" >> $GTK_FILE else - echo "CFLAG = $MARCH $GTK_INCLUDE" >> $GTK_FILE + echo "CFLAG = $MARCH" >> $GTK_FILE fi fi --- rgbpaint-0.8.7.debian/src/Makefile 2013-05-25 04:25:24.000000000 +0200 +++ rgbpaint-0.8.7/src/Makefile 2013-05-25 05:15:05.000000000 +0200 @@ -1,5 +1,6 @@ include ../_conf.txt +CPPFLAGS = $(CPPFLAG) CFLAGS = $(CFLAG) LDFLAGS = $(LDFLAG) $(GLIB_LIB) -lm @@ -11,7 +12,7 @@ $(BIN): $(OBJS) $(CC) $(OBJS) -o $(BIN) $(LDFLAGS) .c.o: - $(CC) $(CFLAGS) -c -o $*.o $*.c + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $*.o $*.c clean: rm -f *.o $(BIN)* debian/patches/02-build_system_and_bashisms.diff0000644000000000000000000001041411471020532017077 0ustar Description: Tidy configure script and install a program icon. Insert an explicit shebang in the configure script. . Remove some immediate bashisms in test conditionals. Thus the script works with Dash. . Output a variable PREFIX into the configurator `_conf.txt'. This makes it possible to install a program icon, existent in the source archive, into `$PREFIX/share/pixmaps/'. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-11-13 diff -Naur rgbpaint-0.8.7.debian/configure rgbpaint-0.8.7/configure --- rgbpaint-0.8.7.debian/configure 2010-11-09 15:51:09.000000000 +0100 +++ rgbpaint-0.8.7/configure 2010-11-13 15:56:15.000000000 +0100 @@ -1,3 +1,5 @@ +#!/bin/sh +# # Mini configure script # 1-10-2004 @@ -9,6 +11,7 @@ MT_VERSION="rgbPaint $MT_V" MT_LANG=NO MT_MAN=NO +MT_PREFIX=/usr/local MT_LANG_DEST=/usr/share/locale MT_PO_DEST=$MT_LANG_DEST MT_MAN_DEST=/usr/local/man/man1 @@ -27,7 +30,7 @@ DEBUG=NO HELP=1 -if [ "$OSTYPE" == "msys" ] +if [ "$OSTYPE" = "msys" ] then OS="MinGW/MSYS" else @@ -75,7 +78,7 @@ "--locale="* ) MT_LANG_DEST="`echo "$A" | sed -e "s/--locale=//"`" MT_PO_DEST=$MT_LANG_DEST;; "--mandir="* ) MT_MAN_DEST="`echo "$A" | sed -e "s/--mandir=//"`";; - "cflags" ) CFLAG=${CFLAGS};; + "cflags" ) CFLAG=${CFLAGS}; LDFLAG=${LDFLAGS};; "--cpu="* ) MARCH='-march='"`echo "$A" | sed -e "s/--cpu=//"`";; "386" ) MARCH='-march=i386';; "486" ) MARCH='-march=i486';; @@ -105,7 +108,7 @@ done -if [ "$HELP" == 0 ] +if [ "$HELP" = 0 ] then echo "Usage: ./configure [OPTION] ... " echo @@ -143,7 +146,7 @@ echo "MT_VERSION=$MT_VERSION" >> $GTK_FILE echo "MT_DATE=$MT_DATE" >> $GTK_FILE - if [ "$OS" == "GNU/Linux" ] + if [ "$OS" = "GNU/Linux" ] then BIN_INSTALL=$LIN_BIN_INSTALL GTK_INCLUDE=`pkg-config gtk+-2.0 --cflags` @@ -159,17 +162,17 @@ L_EX=$AS_NEEDED I_EX= - if [ "$DEBUG" == NO ] + if [ "$DEBUG" = NO ] then GTK_LIB="$GTK_LIB -s" fi - if [ "$MT_LANG" == YES ] + if [ "$MT_LANG" = YES ] then I_EX="$I_EX -DU_NLS -DMT_LANG_DEST=\"\\\"$MT_PO_DEST\"\\\"" MAKE_DIRS="$MAKE_DIRS po" - if [ "$OS" == "MinGW/MSYS" ] + if [ "$OS" = "MinGW/MSYS" ] then L_EX="$L_EX -lintl" echo "MT_LANG_DEST=\"$BIN_INSTALL/$MT_LANG_DEST\"" >> $GTK_FILE @@ -177,7 +180,7 @@ echo "MT_LANG_DEST=$MT_LANG_DEST" >> $GTK_FILE fi fi - if [ "$MT_MAN" == YES ] + if [ "$MT_MAN" = YES ] then MAKE_DIRS="$MAKE_DIRS doc" echo "MT_MAN_DEST=$MT_MAN_DEST" >> $GTK_FILE @@ -185,13 +188,14 @@ I_EX="$I_EX -DVERSION=\"\\\"$MT_VERSION\"\\\"" GTK_INCLUDE="$GTK_INCLUDE $I_EX" - echo "LDFLAG = $L_EX $GTK_LIB" >> $GTK_FILE if [ "$CFLAG" ] then + echo "LDFLAG = $LDFLAG $L_EX $GTK_LIB" >> $GTK_FILE echo "CFLAG = $CFLAG $GTK_INCLUDE" >> $GTK_FILE else - if [ "$OPTS" == "YES" ] + echo "LDFLAG = $L_EX $GTK_LIB" >> $GTK_FILE + if [ "$OPTS" = "YES" ] then echo "CFLAG = -O2 $MARCH $GTK_INCLUDE" >> $GTK_FILE else @@ -201,16 +205,16 @@ echo "subdirs = $MAKE_DIRS" >> $GTK_FILE echo "BIN_INSTALL=$BIN_INSTALL" >> $GTK_FILE + echo "PREFIX=$MT_PREFIX" >> $GTK_FILE - - if [ "$MT_POD" == "YES" ] + if [ "$MT_POD" = "YES" ] then cd doc make pod cd .. fi - if [ "$OSTYPE" == "msys" ] + if [ "$OSTYPE" = "msys" ] then rm ____3742.tmp fi @@ -225,6 +229,7 @@ echo if [ "$CFLAG" ] then + echo "LDFLAGS $LDFLAG" echo "CFLAGS $CFLAG" else if [ "$MARCH" ] @@ -241,7 +246,7 @@ echo echo "Internationalized $MT_LANG" echo -if [ "$MT_LANG" == YES ] +if [ "$MT_LANG" = YES ] then echo "Locale install $MT_LANG_DEST" echo @@ -250,7 +255,7 @@ fi echo "Install man page $MT_MAN" echo -if [ "$MT_MAN" == YES ] +if [ "$MT_MAN" = YES ] then echo "Man page install $MT_MAN_DEST" echo diff -Naur rgbpaint-0.8.7.debian/src/Makefile rgbpaint-0.8.7/src/Makefile --- rgbpaint-0.8.7.debian/src/Makefile 2010-11-09 15:51:09.000000000 +0100 +++ rgbpaint-0.8.7/src/Makefile 2010-11-09 19:57:42.000000000 +0100 @@ -19,6 +19,9 @@ install: mkdir -p $(DESTDIR)$(BIN_INSTALL) cp $(BIN) $(DESTDIR)$(BIN_INSTALL) + mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps + cp graphics/icon.xpm $(DESTDIR)$(PREFIX)/share/pixmaps/$(BIN).xpm uninstall: rm $(DESTDIR)$(BIN_INSTALL)/$(BIN) + rm $(DESTDIR)$(PREFIX)/share/pixmaps/$(BIN).xpm debian/patches/09-make_background_transparent.diff0000644000000000000000000000100111545157336017434 0ustar Description: Program icon with transparent background. The originally black background is made transparent. Author: Bernhard R. Link Forwarded: not-needed Last-Update: 2011-03-31 --- rgbpaint-0.8.7.orig/src/graphics/icon.xpm 2007-01-18 12:19:08.000000000 +0100 +++ rgbpaint-0.8.7/src/graphics/icon.xpm 2011-03-31 21:01:52.000000000 +0200 @@ -2,7 +2,7 @@ static char *icon_xpm[] = { "32 32 32 1", "A c #FF0000", -"B c #000000", +"B c None", "C c #C80000", "D c #E40000", "E c #850000", debian/patches/07-option_handling.diff0000644000000000000000000000723011502174270015050 0ustar Description: Inferior option handling leads to segfaults. The sequential testing of command line options is easily provoked into producing segmentation faults. Leaving an option whithout the expected argument is sufficient. . Argument sanitation and short circuits in the loop constitute a satisfactory cure. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-12-09 diff -Naurp rgbpaint-0.8.7.orig/src/main.c rgbpaint-0.8.7/src/main.c --- rgbpaint-0.8.7.orig/src/main.c +++ rgbpaint-0.8.7/src/main.c @@ -171,61 +171,101 @@ int main( int argc, char *argv[] ) { if ( strcmp(argv[i], "-svg") == 0 ) // Set SVG directory { - file_arg_start+=2; - files_passed-=2; + file_arg_start+=1; + files_passed-=1; i++; - svg_dir = argv[i]; + if ((i < argc) && argv[i] && *argv[i]) { + /* An argument does indeed exist. */ + ++file_arg_start; + --files_passed; + svg_dir = argv[i]; + } + continue; } if ( strcmp(argv[i], "-thumb") == 0 ) // Set thumbnail size { - file_arg_start+=2; - files_passed-=2; + file_arg_start+=1; + files_passed-=1; i++; - sscanf( argv[i], "%i", &thumb_size ); - if ( thumb_size<32 || thumb_size>256 ) - thumb_size = 40; // Ensure sanity + if ((i < argc) && argv[i] && *argv[i]) { + /* An argument does indeed exist. */ + ++file_arg_start; + --files_passed; + sscanf( argv[i], "%i", &thumb_size ); + if ( thumb_size<32 || thumb_size>256 ) + thumb_size = 40; // Ensure sanity + } + continue; } if ( strcmp(argv[i], "-stamps") == 0 ) // Files are stamps { file_arg_start++; files_passed--; stamp_start = i+1; + continue; } if ( strcmp(argv[i], "-d") == 0 ) // Set the default directory { - file_arg_start += 2; - files_passed -= 2; + file_arg_start += 1; + files_passed -= 1; i++; - fs_set_dir(argv[i]); + if ((i < argc) && argv[i] && *argv[i]) { + /* An argument does indeed exist. */ + ++file_arg_start; + --files_passed; + fs_set_dir(argv[i]); + } + continue; } if ( strcmp(argv[i], "-s") == 0 ) // Screenshot { file_arg_start++; files_passed--; get_screenshot = TRUE; + continue; } if ( strcmp(argv[i], "-u") == 0 ) // Undo memory limit { - file_arg_start+=2; - files_passed-=2; + file_arg_start+=1; + files_passed-=1; i++; - sscanf( argv[i], "%i", &mem_undo_limit ); - if ( mem_undo_limit<1 || mem_undo_limit>500 ) - mem_undo_limit = 32; // Ensure sanity + if ((i < argc) && argv[i] && *argv[i]) { + /* An argument does indeed exist. */ + ++file_arg_start; + --files_passed; + sscanf( argv[i], "%i", &mem_undo_limit ); + if ( mem_undo_limit<1 || mem_undo_limit>500 ) + mem_undo_limit = 32; // Ensure sanity + } + continue; } #ifndef WIN32 if ( strcmp(argv[i], "-browserWindow") == 0 ) { - file_arg_start+=2; - files_passed-=2; + file_arg_start+=1; + files_passed-=1; i++; - sscanf( argv[i], "%i", &olpc_widget ); + if ((i < argc) && argv[i] && *argv[i]) { + /* An argument does indeed exist. */ + ++file_arg_start; + --files_passed; + sscanf( argv[i], "%i", &olpc_widget ); + } + continue; } if ( strcmp(argv[i], "sugarPipe") == 0 ) { - file_arg_start+=2; - files_passed-=2; + file_arg_start+=1; + files_passed-=1; i++; + if (!( (i < argc) && argv[i] && *argv[i] )) { + /* Invalid argument. Cancel. */ + continue; + } + + ++file_arg_start; + --files_passed; + fh = open(argv[i], O_RDWR); // Open socket file to grab messages from Sugar debian/patches/01-install_paths.diff0000644000000000000000000000557411471020514014540 0ustar Description: Implement standard installation path modifiers. The upstream source has a build system that polutes file paths with quotation marks. This is inappropriate for UNIX systems, and it interferes with the next alteration. . Introduce a standard prefix DESTDIR for installation paths. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-11-09 diff -Naur rgbpaint-0.8.7.orig/configure rgbpaint-0.8.7/configure --- rgbpaint-0.8.7.orig/configure +++ rgbpaint-0.8.7/configure @@ -174,13 +174,13 @@ L_EX="$L_EX -lintl" echo "MT_LANG_DEST=\"$BIN_INSTALL/$MT_LANG_DEST\"" >> $GTK_FILE else - echo "MT_LANG_DEST=\"$MT_LANG_DEST\"" >> $GTK_FILE + echo "MT_LANG_DEST=$MT_LANG_DEST" >> $GTK_FILE fi fi if [ "$MT_MAN" == YES ] then MAKE_DIRS="$MAKE_DIRS doc" - echo "MT_MAN_DEST=\"$MT_MAN_DEST\"" >> $GTK_FILE + echo "MT_MAN_DEST=$MT_MAN_DEST" >> $GTK_FILE fi I_EX="$I_EX -DVERSION=\"\\\"$MT_VERSION\"\\\"" @@ -200,7 +200,7 @@ fi echo "subdirs = $MAKE_DIRS" >> $GTK_FILE - echo "BIN_INSTALL=\"$BIN_INSTALL\"" >> $GTK_FILE + echo "BIN_INSTALL=$BIN_INSTALL" >> $GTK_FILE if [ "$MT_POD" == "YES" ] diff -Naur rgbpaint-0.8.7.orig/doc/Makefile rgbpaint-0.8.7/doc/Makefile --- rgbpaint-0.8.7.orig/doc/Makefile +++ rgbpaint-0.8.7/doc/Makefile @@ -10,11 +10,11 @@ pod2man "--release=$(MT_VERSION)" "--date=$(MT_DATE)" "--center=Mark Tyler's Painting Program" rgbpaint.pod > _rgbpaint.1 install: - mkdir -p $(MT_MAN_DEST) - cp $(MAN_PAGE).gz $(MT_MAN_DEST) + mkdir -p $(DESTDIR)$(MT_MAN_DEST) + cp $(MAN_PAGE).gz $(DESTDIR)$(MT_MAN_DEST) uninstall: - rm $(MT_MAN_DEST)/$(MAN_PAGE).gz + rm $(DESTDIR)$(MT_MAN_DEST)/$(MAN_PAGE).gz clean: rm *.gz diff -Naur rgbpaint-0.8.7.orig/po/Makefile rgbpaint-0.8.7/po/Makefile --- rgbpaint-0.8.7.orig/po/Makefile +++ rgbpaint-0.8.7/po/Makefile @@ -6,11 +6,11 @@ for iii in $(langs); do echo -n "$$iii = "; msgfmt -v -o $$iii.mo $$iii.po; done install: - for iii in $(langs); do mkdir -p $(MT_LANG_DEST)/$$iii/LC_MESSAGES/; done - for iii in $(langs); do cp $$iii.mo $(MT_LANG_DEST)/$$iii/LC_MESSAGES/rgbpaint.mo; done + for iii in $(langs); do mkdir -p $(DESTDIR)$(MT_LANG_DEST)/$$iii/LC_MESSAGES/; done + for iii in $(langs); do cp $$iii.mo $(DESTDIR)$(MT_LANG_DEST)/$$iii/LC_MESSAGES/rgbpaint.mo; done uninstall: - for iii in $(langs); do rm $(MT_LANG_DEST)/$$iii/LC_MESSAGES/rgbpaint.mo; done + for iii in $(langs); do rm $(DESTDIR)$(MT_LANG_DEST)/$$iii/LC_MESSAGES/rgbpaint.mo; done clean: rm *.mo diff -Naur rgbpaint-0.8.7.orig/src/Makefile rgbpaint-0.8.7/src/Makefile --- rgbpaint-0.8.7.orig/src/Makefile +++ rgbpaint-0.8.7/src/Makefile @@ -17,8 +17,8 @@ rm -f *.o $(BIN)* install: - mkdir -p $(BIN_INSTALL) - cp $(BIN) $(BIN_INSTALL) + mkdir -p $(DESTDIR)$(BIN_INSTALL) + cp $(BIN) $(DESTDIR)$(BIN_INSTALL) uninstall: - rm $(BIN_INSTALL)/$(BIN) + rm $(DESTDIR)$(BIN_INSTALL)/$(BIN) debian/patches/04-manpage.diff0000644000000000000000000000213211467543170013306 0ustar Description: Lintian warnings regarding hyphenation in manual page. Author: Mats Erik Andersson Forwarded: not-needed Last-Update: 2010-11-09 --- rgbpaint-0.8.7.debian/doc/_rgbpaint.1 +++ rgbpaint-0.8.7/doc/_rgbpaint.1 @@ -143,12 +143,12 @@ rgbPaint can accept the following options: .PP .Vb 6 -\& --help Output usage information -\& --version Output version information -\& -s Grab a screenshot -\& -u Set the undo limit in megabytes 1-500, default=32 -\& -stamps <...> All remaining files passed are loaded as stamps -\& -thumb Set the maximum width/height of the stamp thumbnails 32-256, default=40 +\& \-\-help Output usage information +\& \-\-version Output version information +\& \-s Grab a screenshot +\& \-u Set the undo limit in megabytes 1-500, default=32 +\& \-stamps <...> All remaining files passed are loaded as stamps +\& \-thumb Set the maximum width/height of the stamp thumbnails 32-256, default=40 .Ve .SH "HOMEPAGE" .IX Header "HOMEPAGE" debian/patches/03-swedish_po_file.diff0000644000000000000000000001136211471020551015031 0ustar Description: Contruct a missing translation for Swedish. The upstream has a limited supply of translations for the Gettext subsystem. The lack of Swedish is particularly felt! Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-11-09 diff -Naur rgbpaint-0.8.7.debian/po/Makefile rgbpaint-0.8.7/po/Makefile --- rgbpaint-0.8.7.debian/po/Makefile +++ rgbpaint-0.8.7/po/Makefile @@ -1,6 +1,6 @@ include ../_conf.txt -langs = es cs fr pt pt_BR de_DE pl tr zh_TW +langs = es cs fr pt pt_BR de_DE pl tr zh_TW sv all: for iii in $(langs); do echo -n "$$iii = "; msgfmt -v -o $$iii.mo $$iii.po; done diff -Naur rgbpaint-0.8.7.debian/po/sv.po rgbpaint-0.8.7/po/sv.po --- rgbpaint-0.8.7.debian/po/sv.po +++ rgbpaint-0.8.7/po/sv.po @@ -0,0 +1,182 @@ +# Mark Tyler's painting program +# Copyright (C) 2007 +# This file is distributed under the same license as the rgbpaint package. +# Mark Tyler , 2007. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: rgbpaint-0.8.7\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-04-30 12:22+0100\n" +"PO-Revision-Date: 2010-10-29 18:34+0100\n" +"Last-Translator: Mats Erik Andersson \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/canvas.c:184 src/canvas.c:369 src/canvas.c:373 src/mainwindow.c:186 +#: src/otherwindow.c:409 src/viewer.c:439 +msgid "Error" +msgstr "Fel" + +#: src/canvas.c:184 src/viewer.c:439 +msgid "Not enough memory to create clipboard" +msgstr "OtillrĂ€ckligt med minne för en urklippsyta" + +#: src/canvas.c:368 +#, c-format +msgid "File is too big, must be <= to width=%i height=%i : %s" +msgstr "Bildfilen Ă€r för stor. Största mĂ„tt Ă€r bredd %i, höjd %i: %s" + +#: src/canvas.c:373 +msgid "Unable to load file" +msgstr "Misslyckades att hĂ€mta bildfil" + +#: src/canvas.c:417 +#, c-format +msgid "File: %s already exists. Do you want to overwrite it?" +msgstr "Filen %s finns redan. Vill Du ersĂ€tta den?" + +#: src/canvas.c:418 +msgid "File Found" +msgstr "Filen hittades" + +#: src/canvas.c:465 +msgid "File Format" +msgstr "Filformat" + +#: src/canvas.c:470 +msgid "JPEG Save Quality (100=High)" +msgstr "JPEG-kvalitet i mĂ„let (100 Ă€r högst)" + +#: src/canvas.c:688 src/toolbar.c:289 +msgid "Load Image File" +msgstr "HĂ€mta bildfil" + +#: src/canvas.c:692 src/toolbar.c:290 +msgid "Save Image File" +msgstr "Spara bildfil" + +#: src/canvas.c:709 src/mainwindow.c:155 src/otherwindow.c:68 +msgid "Untitled" +msgstr "Namnlös" + +#: src/mainwindow.c:185 +#, c-format +msgid "Unable to save file: %s" +msgstr "Kunde ej spara bildfilen: %s" + +#: src/mainwindow.c:609 +msgid "" +"This image contains changes that have not been saved. Do you want to save " +"these changes?" +msgstr "" +"Denna bild innehĂ„ller Ă€ndringar som ej har sparats. " +"Vill Du spara dessa Ă€ndringar?" + +#: src/mainwindow.c:613 +msgid "Warning" +msgstr "Varning!" + +#: src/mainwindow.c:1804 +msgid "(Modified)" +msgstr "(Ändrad)" + +#: src/otherwindow.c:131 src/toolbar.c:288 +msgid "New Image" +msgstr "Ny bild" + +#: src/otherwindow.c:148 +msgid "Width" +msgstr "Bredd" + +#: src/otherwindow.c:149 +msgid "Height" +msgstr "Höjd" + +#: src/otherwindow.c:328 +msgid "Brightness" +msgstr "Ljusstyrka" + +#: src/otherwindow.c:328 +msgid "Contrast" +msgstr "Kontrast" + +#: src/otherwindow.c:328 +msgid "Saturation" +msgstr "FĂ€rgmĂ€ttnad" + +#: src/otherwindow.c:328 +msgid "Posterize" +msgstr "Lyster" + +#: src/otherwindow.c:329 +msgid "Gamma" +msgstr "Gammagrad" + +#: src/otherwindow.c:329 +msgid "Hue" +msgstr "Ton" + +#: src/otherwindow.c:344 src/toolbar.c:301 +msgid "Transform Colour" +msgstr "FĂ€rgbrytning" + +#: src/otherwindow.c:409 +msgid "The operating system cannot allocate the memory for this operation." +msgstr "Datorn kan inte tilldela minne nog för denna Ă„tgĂ€rd." + +#: src/otherwindow.c:689 +msgid "Colour Editor" +msgstr "FĂ€rgblandare" + +#: src/toolbar.c:291 +msgid "Save Image File As" +msgstr "Spara bildfilen i nytt namn" + +#: src/toolbar.c:292 +msgid "Cut" +msgstr "Klipp ur" + +#: src/toolbar.c:293 +msgid "Copy" +msgstr "Kopiera" + +#: src/toolbar.c:294 +msgid "Paste" +msgstr "Klistra in" + +#: src/toolbar.c:295 +msgid "Undo" +msgstr "Ångra" + +#: src/toolbar.c:296 +msgid "Redo" +msgstr "Upprepa" + +#: src/toolbar.c:297 src/viewer.c:511 +msgid "Paste Text" +msgstr "LĂ€gg till text" + +#: src/toolbar.c:298 +msgid "Paint" +msgstr "MĂ„la" + +#: src/toolbar.c:299 +msgid "Flood Fill" +msgstr "Fyll i en yta" + +#: src/toolbar.c:300 +msgid "Make Selection" +msgstr "Markera ett utsnitt" + +#: src/toolbar.c:302 +msgid "Pan Window" +msgstr "Flytta fönstret över duken" + +#: src/viewer.c:377 +#, c-format +msgid "Enter Text Here" +msgstr "Skriv in text hĂ€r" debian/patches/08-fallback_icons_and_size.diff0000644000000000000000000000530611502174321016502 0ustar Description: Prefer fallback icons when possible. When the program was given the option `-svg' for importing task icons, icons missing in the imported set could be replaced by the non-expressive pencil icon, forgetting the actual purpose of the particular image. Only those cases where the default setting was using the stock GTK icons were ever touched by this behaviour. . Now the GTK stock icon is recovered, should no new icon be imported for a particular action, and there be no icon tailored by rgbPaint to replace it. . In addition, any imported icon is scaled to a size that exactly agrees with the default icons, thus preserving appearances Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-12-09 diff -Naurp rgbpaint-0.8.7.orig/src/toolbar.c rgbpaint-0.8.7/src/toolbar.c --- rgbpaint-0.8.7.orig/src/toolbar.c +++ rgbpaint-0.8.7/src/toolbar.c @@ -183,7 +183,11 @@ static void fill_toolbar(GtkToolbar *bar GtkSignalFunc lclick, long int lbase, int rbase, GdkColor *c) { char txt[256]; - int i, icon_size = gdk_screen_width() / 22; + //int i, icon_size = gdk_screen_width() / 22; + // + /* Debian: Adjust the size of imported icons to be the + * same as for the icons delivered with rgbPaint. */ + int i, icon_size = 20; GtkWidget *iconw, *radio[32]; GdkPixmap *icon, *mask; GtkAccelGroup *ag = gtk_accel_group_new(); @@ -192,6 +196,7 @@ static void fill_toolbar(GtkToolbar *bar i=0; for (; items->xpm; items++) { + iconw = NULL; i++; if ( !svg_dir && items->stock ) { @@ -215,8 +220,10 @@ static void fill_toolbar(GtkToolbar *bar { iconw = NULL; } - else + else if (!items->stock) { + /* No imported icon, and no stock image. + * Use the icon delivered with rgbPaint. */ icon = gdk_pixmap_create_from_xpm_d(main_window->window, &mask, NULL, items->xpm); iconw = gtk_pixmap_new(icon, mask); @@ -224,6 +231,9 @@ static void fill_toolbar(GtkToolbar *bar gdk_pixmap_unref(mask); } + if (pbuf || iconw) { + /* A successfully imported vector image, + * or one of the icons particular for rgbPaint. */ items->widget = gtk_toolbar_append_element(bar, items->radio < 0 ? GTK_TOOLBAR_CHILD_BUTTON : items->radio ? GTK_TOOLBAR_CHILD_RADIOBUTTON : @@ -231,6 +241,13 @@ static void fill_toolbar(GtkToolbar *bar items->radio > 0 ? radio[items->radio] : NULL, "None", _(items->tooltip), "Private", iconw, lclick, (gpointer)(items->ID + lbase)); + } else { + /* Fall back to the GTK stock image. */ + items->widget = gtk_toolbar_insert_stock( bar, items->stock, + _(items->tooltip), "Private", lclick, + (gpointer)(items->ID + lbase), -1); + } + if ( pbuf ) { debian/patches/10-fix_lib_underlinkage.diff0000644000000000000000000000111712163564160016035 0ustar Description: Missing linkage, FTBFS with clang. A missing linker directive to use libm leads to build failure with llvm/clang. Author: Daniel T Chen Bug-Debian: http://bugs.debian.org/713718 Forwarded: no Last-Update: 2013-04-18 diff -pruN 0.8.7-3/src/Makefile 0.8.7-3ubuntu1/src/Makefile --- 0.8.7-3/src/Makefile 2013-04-18 07:07:20.000000000 +0000 +++ 0.8.7-3ubuntu1/src/Makefile 2013-04-18 07:07:20.000000000 +0000 @@ -1,7 +1,7 @@ include ../_conf.txt CFLAGS = $(CFLAG) -LDFLAGS = $(LDFLAG) $(GLIB_LIB) +LDFLAGS = $(LDFLAG) $(GLIB_LIB) -lm BIN = rgbpaint debian/patches/05-compiler_warnings.diff0000644000000000000000000000740211471020576015421 0ustar Description: Resolve compiler warnings. In `png.c' a buffer size is incorrectly set. . Signedness discrepancies are covered in `memory.h', `memory.c', and `toolbar.c'. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-11-13 diff -Naurp rgbpaint-0.8.7.debian/src/png.c rgbpaint-0.8.7/src/png.c --- rgbpaint-0.8.7.debian/src/png.c +++ rgbpaint-0.8.7/src/png.c @@ -157,7 +157,7 @@ int save_image(char *file_name, ls_setti default: case FT_PNG: res = save_pbuf(file_name, settings, "png", "compression", "9"); break; - case FT_JPEG: snprintf(txt, 30, "%i", settings->jpeg_quality); + case FT_JPEG: snprintf(txt, sizeof(txt), "%i", settings->jpeg_quality); res = save_pbuf(file_name, settings, "jpeg", "quality", txt); break; case FT_ICO: res = save_pbuf(file_name, settings, "ico", NULL, NULL); diff -Naurp rgbpaint-0.8.7.debian/src/memory.c rgbpaint-0.8.7/src/memory.c --- rgbpaint-0.8.7.debian/src/memory.c +++ rgbpaint-0.8.7/src/memory.c @@ -543,9 +543,9 @@ } -char *grab_memory( int size, char byte ) // Malloc memory, reset all bytes +unsigned char *grab_memory( int size, char byte ) // Malloc memory, reset all bytes { - char *chunk; + unsigned char *chunk; chunk = malloc( size ); @@ -1015,7 +1015,7 @@ int mem_image_resize(int nw, int nh, int ox, int oy, int mode) { chanlist old_img; - char *src, *dest; + unsigned char *src, *dest; int i, j, k, cc, bpp, oxo = 0, oyo = 0, nxo = 0, nyo = 0, ow, oh, res; int oww = mem_width, ohh = mem_height, mirr = 0, tw = mem_width; diff -Naurp rgbpaint-0.8.7.debian/src/memory.h rgbpaint-0.8.7/src/memory.h --- rgbpaint-0.8.7.debian/src/memory.h +++ rgbpaint-0.8.7/src/memory.h @@ -155,7 +155,7 @@ int mt_round( float n ); // Round a float to nearest whole number -char *grab_memory( int size, char byte ); // Malloc memory, reset all bytes +unsigned char *grab_memory( int size, char byte ); // Malloc memory, reset all bytes void mem_clear(); // Remove old image if any // Allocate space for new image, removing old if needed int mem_new( int width, int height, int bpp, int cmask ); diff -Naurp rgbpaint-0.8.7.debian/src/toolbar.c rgbpaint-0.8.7/src/toolbar.c --- rgbpaint-0.8.7.debian/src/toolbar.c +++ rgbpaint-0.8.7/src/toolbar.c @@ -333,7 +333,7 @@ void toolbar_init(GtkWidget *vbox_main) GtkWidget *toolbar_main, /**toolbar_tools,*/ *hbox; GdkColor cfg = { -1, -1, -1, -1 }, cbg = { 0, 0, 0, 0 }; - static char *xbm_list[3] = { xbm_paint_bits, xbm_select_bits, xbm_flood_bits }, + static guchar *xbm_list[3] = { xbm_paint_bits, xbm_select_bits, xbm_flood_bits }, *xbm_mask_list[3] = { xbm_paint_mask_bits, xbm_select_mask_bits, xbm_flood_mask_bits }; static unsigned char cursor_tip[3][3] = { {1, 19}, {10, 10}, {2, 18} }; @@ -362,8 +362,8 @@ void toolbar_init(GtkWidget *vbox_main) for (i=0; i<3; i++) { - icon = gdk_bitmap_create_from_data (NULL, xbm_list[i], 20, 20); - mask = gdk_bitmap_create_from_data (NULL, xbm_mask_list[i], 20, 20); + icon = gdk_bitmap_create_from_data (NULL, (gchar *) xbm_list[i], 20, 20); + mask = gdk_bitmap_create_from_data (NULL, (gchar *) xbm_mask_list[i], 20, 20); m_cursor[i] = gdk_cursor_new_from_pixmap(icon, mask, &cfg, &cbg, cursor_tip[i][0], cursor_tip[i][1]); @@ -371,8 +371,8 @@ void toolbar_init(GtkWidget *vbox_main) gdk_pixmap_unref( icon ); gdk_pixmap_unref( mask ); } - icon = gdk_bitmap_create_from_data (NULL, xbm_move_bits, 20, 20); - mask = gdk_bitmap_create_from_data (NULL, xbm_move_mask_bits, 20, 20); + icon = gdk_bitmap_create_from_data (NULL, (gchar *) xbm_move_bits, 20, 20); + mask = gdk_bitmap_create_from_data (NULL, (gchar *) xbm_move_mask_bits, 20, 20); move_cursor = gdk_cursor_new_from_pixmap (icon, mask, &cfg, &cbg, 10, 10); gdk_pixmap_unref( icon ); gdk_pixmap_unref( mask ); debian/patches/series0000644000000000000000000000050112221263712012024 0ustar 01-install_paths.diff 02-build_system_and_bashisms.diff 03-swedish_po_file.diff 04-manpage.diff 05-compiler_warnings.diff 06-castings_for_amd64.diff 07-option_handling.diff 08-fallback_icons_and_size.diff 09-make_background_transparent.diff 10-fix_lib_underlinkage.diff 11-hardening_errors.diff 12-build_portability.diff debian/patches/12-build_portability.diff0000644000000000000000000000172112221352654015413 0ustar Description: Build failures. Ignore a missing '_conf.txt' while cleaning. . Do not assume Gcc to be the active compiler. Check $CC and use 'cc' as default. This will hopefully manage also 'clang'. Author: Mats Erik Andersson Bug-Debian: http://bugs.debian.org/724101 Forwarded: not-needed Last-Update: 2013-09-27 diff -Naurp rgbpaint-0.8.7.debian/configure rgbpaint-0.8.7/configure --- rgbpaint-0.8.7.debian/configure 2013-09-27 12:50:08.000000000 +0200 +++ rgbpaint-0.8.7/configure 2013-09-27 13:01:42.000000000 +0200 @@ -45,7 +45,7 @@ do echo make clean echo - rm _conf.txt + rm -f $GTK_FILE rm -rf slack rm -f *.tgz exit;; @@ -142,7 +142,7 @@ then echo "Default settings: GNU/Linux system, O2 optimizations, English only version" else - echo CC = gcc -Wall > $GTK_FILE + echo CC = ${CC:-cc} -Wall -Wextra > $GTK_FILE echo "MT_VERSION=$MT_VERSION" >> $GTK_FILE echo "MT_DATE=$MT_DATE" >> $GTK_FILE debian/patches/06-castings_for_amd64.diff0000644000000000000000000001476311502174253015361 0ustar Description: Type castings for 64 bit systems. A handful source files are using pointers to convey integer data. These need to be cast into `long int' in order to pass silently also for systems based on 64 bit architectures. Author: Mats Erik Andersson Forwarded: yes Last-Update: 2010-11-21 diff -Naurp rgbpaint-0.8.7.orig/src/canvas.c rgbpaint-0.8.7/src/canvas.c --- rgbpaint-0.8.7.orig/src/canvas.c +++ rgbpaint-0.8.7/src/canvas.c @@ -426,9 +426,10 @@ static void change_image_format(GtkMenuI { static int flags[] = {FF_COMPR, 0}; GList *chain = GTK_BOX(box)->children->next->next; - int i, ftype; + int i; + long int ftype; - ftype = (int)gtk_object_get_user_data(GTK_OBJECT(menuitem)); + ftype = (long int)gtk_object_get_user_data(GTK_OBJECT(menuitem)); /* Hide/show name/value widget pairs */ for (i = 0; flags[i]; i++) { @@ -449,7 +450,8 @@ static void change_image_format(GtkMenuI static void image_widgets(GtkWidget *box, char *name, int mode) { GtkWidget *opt, *menu, *item, *label, *spin; - int i, j, k, mask = FF_IDX; + long int i; + int j, k, mask = FF_IDX; char *ext = strrchr(name, '.'); ext = ext ? ext + 1 : ""; @@ -497,7 +499,7 @@ static void image_widgets(GtkWidget *box GTK_MENU_SHELL(menu)->children, j)), "activate", (gpointer)box); } -static GtkWidget *ls_settings_box(char *name, int mode) +static GtkWidget *ls_settings_box(char *name, long int mode) { GtkWidget *box; @@ -517,7 +519,7 @@ static GtkWidget *ls_settings_box(char * return (box); } -static int selected_file_type(GtkWidget *box) +static long int selected_file_type(GtkWidget *box) { GtkWidget *opt; @@ -525,12 +527,12 @@ static int selected_file_type(GtkWidget opt = gtk_option_menu_get_menu(GTK_OPTION_MENU(opt)); if (!opt) return (FT_NONE); opt = gtk_menu_get_active(GTK_MENU(opt)); - return ((int)gtk_object_get_user_data(GTK_OBJECT(opt))); + return ((long int)gtk_object_get_user_data(GTK_OBJECT(opt))); } void init_ls_settings(ls_settings *settings, GtkWidget *box) { - int xmode; + long int xmode; /* Set defaults */ memset(settings, 0, sizeof(ls_settings)); @@ -540,7 +542,7 @@ void init_ls_settings(ls_settings *setti /* Read in settings */ if (box) { - xmode = (int)gtk_object_get_user_data(GTK_OBJECT(box)); + xmode = (long int)gtk_object_get_user_data(GTK_OBJECT(box)); settings->mode = xmode; switch (xmode) diff -Naurp rgbpaint-0.8.7.orig/src/mainwindow.c rgbpaint-0.8.7/src/mainwindow.c --- rgbpaint-0.8.7.orig/src/mainwindow.c +++ rgbpaint-0.8.7/src/mainwindow.c @@ -1583,7 +1583,8 @@ void set_cursor_type(GdkCursorType type) void toolbar_icon_event2(GtkWidget *widget, gpointer data) { - gint i = tool_type, j = (gint) data; + gint i = tool_type; + glong j = (glong) data; gboolean except=FALSE; switch (j) diff -Naurp rgbpaint-0.8.7.orig/src/mygtk.c rgbpaint-0.8.7/src/mygtk.c --- rgbpaint-0.8.7.orig/src/mygtk.c +++ rgbpaint-0.8.7/src/mygtk.c @@ -87,7 +87,7 @@ gint alert_result = 0; gint alert_reply( GtkWidget *widget, gpointer data ) { - if ( alert_result == 0 ) alert_result = (gint) data; + if ( alert_result == 0 ) alert_result = (glong) data; if ( alert_result == 10 ) gtk_widget_destroy( widget ); return FALSE; @@ -97,7 +97,7 @@ int alert_box_stock( char *title, char * { GtkWidget *alert, *buttons[3], *label; char *butxt[3] = {text1, text2, text3}; - gint i; + glong i; GtkAccelGroup* ag = gtk_accel_group_new(); alert = gtk_dialog_new(); diff -Naurp rgbpaint-0.8.7.orig/src/otherwindow.c rgbpaint-0.8.7/src/otherwindow.c --- rgbpaint-0.8.7.orig/src/otherwindow.c +++ rgbpaint-0.8.7/src/otherwindow.c @@ -240,10 +240,10 @@ static void brcosa_spinslide_moved(GtkAd { char txt[32]; - brcosa_values[(int)user_data] = ADJ2INT(adj); + brcosa_values[(long int)user_data] = ADJ2INT(adj); brcosa_buttons_sensitive(); snprintf( txt, 30, "%i", ADJ2INT(adj) ); - gtk_label_set_text( GTK_LABEL(brcosa_number_labels[(int)user_data]), txt ); + gtk_label_set_text( GTK_LABEL(brcosa_number_labels[(long int)user_data]), txt ); click_brcosa_preview( NULL, NULL, NULL ); } @@ -327,7 +327,7 @@ void pressed_brcosa( GtkMenuItem *menu_i char txt[32], *tab_txt[] = { _("Brightness"), _("Contrast"), _("Saturation"), _("Posterize"), _("Gamma"), _("Hue") }; - int i; + long int i; GtkAccelGroup* ag = gtk_accel_group_new(); diff -Naurp rgbpaint-0.8.7.orig/src/toolbar.c rgbpaint-0.8.7/src/toolbar.c --- rgbpaint-0.8.7.orig/src/toolbar.c +++ rgbpaint-0.8.7/src/toolbar.c @@ -180,7 +180,7 @@ void toolbar_select_paint_tool() static void fill_toolbar(GtkToolbar *bar, toolbar_item *items, - GtkSignalFunc lclick, int lbase, int rbase, GdkColor *c) + GtkSignalFunc lclick, long int lbase, int rbase, GdkColor *c) { char txt[256]; int i, icon_size = gdk_screen_width() / 22; @@ -391,7 +391,8 @@ static GtkWidget *palette_buttons[TOTAL_ static gint toolbar_click_brush(GtkWidget *w, GdkEvent *event, gpointer user) { - int i, item = (int) user, brush_list[TOTAL_BRUSH_BUTTONS][3] = { + long int item = (long int) user; + int i, brush_list[TOTAL_BRUSH_BUTTONS][3] = { {TOOL_CIRCLE, 25, 0}, {TOOL_CIRCLE, 15, 0}, {TOOL_CIRCLE, 5, 0}, @@ -426,7 +427,7 @@ static gint toolbar_click_brush(GtkWidge static gint toolbar_click_colours(GtkWidget *w, GdkEvent *event, gpointer user) { - int item = (int) user; + long int item = (long int) user; if ( item<0 || item>=TOTAL_PALETTE_BUTTONS ) item=0; @@ -471,7 +472,8 @@ void toolbar_palette_init(GtkWidget *box xpm_brush05_xpm, xpm_brush06_xpm, xpm_brush07_xpm, xpm_brush08_xpm, xpm_brush09_xpm, xpm_brush10_xpm }; - int i, j, k; + int i, j; + long int k; GtkWidget *vbox, *table, *button, *pixmapw, *hbox; GdkPixmap *pixmap, *mask; // GdkColor c; @@ -595,7 +597,8 @@ static gint expose_stamp( GtkWidget *wid { // Use this expose event to load and put an image onto the button - only done once GdkPixbuf *pbuf; GtkWidget *image; - int id = (int) user, px, py, pw, ph; + long int id = (long int) user; + int px, py, pw, ph; stamp_item *sitem = NULL; px = event->area.x; // Only repaint if we need to @@ -624,7 +627,7 @@ static gint expose_stamp( GtkWidget *wid static gint pressed_stamp(GtkWidget *w, gpointer user) { - int id = (int) user; + long int id = (long int) user; stamp_item *sitem = NULL; //printf("Stamp pressed = %i\n", id); @@ -644,7 +647,8 @@ static gint pressed_stamp(GtkWidget *w, int toolbar_stamp_init(GtkWidget *box) { GtkWidget *button; - int i, done = 0, w, h; + long int i; + int done = 0, w, h; stamp_item *nstamp; GdkPixbufFormat *file_info; debian/clean0000644000000000000000000000006211472044537010200 0ustar _conf.txt debian/local/man/* debian/local/xhtml/* debian/README.Debian0000644000000000000000000000244511513171235011233 0ustar rgbpaint (0.8.7-1) The original manual page is really lacking in content, even containing less information than the usage output from the programme itself does. Therefore I decided to rewrite the manual page, from the bottom and up. Having chosen Docbook as preferred source format, it will be possible to collect adaptions of the text also in other languages for the benefit of all inexperienced users, or even school children. It is my hope that the master copy manual page in English, will not be used to produce almost blue print translations, but instead each adaption should reflect the general content and do it in an enthusiastic way, thus capturing the interest of also the young users. In the best of worlds, a well localized text could even awake and foster among these new users, an interest in preserving the UNIX culture that is expressed in the old fashioned format a manual page still represents. Naturally, the same Docbook source will be used to produce also XHTML documentation for this useful piece of software, suitable for education as well as for art work in general. Please consider finding collaborators in contributing an adaption of the manual page also for your native language. -- Mats Erik Andersson, expressed on Friday, 19th Nov 2010 debian/rules0000755000000000000000000000171512221266736010261 0ustar #!/usr/bin/make -f DPKG_EXPORT_BUILD_FLAGS = 1 include /usr/share/dpkg/buildflags.mk %: dh $@ PATTERN = fontconfig|atk-1.0|rt|gio-2.0|cairo|gmodule-2.0|gthread-2.0|pangocairo-1.0|freetype|pangoft2-1.0 override_dh_auto_configure: ./configure cflags debug slow intl --prefix=/usr --mandir=/usr/share/man/man1 # Newer toolchains need explicit linking to "libX11". Tweek this. # The inclusion of "-lfontconfig" is already superfluous. Replace it. sed -r -i 's,-lfontconfig,-lX11,' _conf.txt # Remove primary linking libraries, known to be superfluous. sed -r -i "s,-l($(PATTERN)) ,,g" _conf.txt # Compile the external manpages. # Use `--nonet' and `--novalid' to prevent problems. xsltproc --nonet --novalid debian/local/rgbpaint.xsl debian/local/rgbpaint.xml xsltproc --nonet --novalid debian/local/rgbpaint-xhtml.xsl debian/local/rgbpaint.xml override_dh_installchangelogs: dh_installchangelogs NEWS override_dh_auto_clean: touch _conf.txt dh_auto_clean debian/rgbpaint.doc-base0000644000000000000000000000066611471464444012414 0ustar Document: rgbpaint Title: A simple pixel-based painting program Author: M E Andersson Abstract: The painting program rgbPaint is a simplified tool to create and to edit pixel graphics, including screen snapshots, icons, and even photographs. It can read multiple formats, but saves only to ICO, JPEG, and PNG. Section: Graphics Format: HTML Index: /usr/share/doc/rgbpaint/xhtml/index.html Files: /usr/share/doc/rgbpaint/xhtml/*.html debian/rgbpaint.desktop0000644000000000000000000000057512163556147012410 0ustar [Desktop Entry] Version=1.0 Name=rgbPaint painting program Name[sv]=Rgbpaint, ett ritprogram GenericName=Painting program Comment=Simple painting program for pixel art Comment[sv]=Enkelt ritprogram för bildpunktsgrafik Type=Application Terminal=false TryExec=rgbpaint Exec=rgbpaint Icon=rgbpaint Categories=Graphics;2DGraphics;RasterGraphics; Keywords=graphic;drawing;pixel;jpeg;