Re: Adding icons to the template manager
Hi Alex, Alexander Wilms píše v Čt 15. 11. 2012 v 23:27 +0100: I pushed the icons already and now tried to compile it with your changes. The earlier issues are gone, but now the compiler is complaining about missing icon files: [build RES] sfxen-US f268: Error: The image(s) actionview026 actionview010 actionview025 actionview028 actionaction012 actionaction013 actiontemplates015 actiontemplates016 actiontemplates019 actiontemplates017 actiontemplates020 actiontemplates018 could not be found. Terminating compiler make[2]: *** [/home/alexander/libo/workdir/unxlngx6.pro/ResTarget/sfxen-US.res] Fehler 1 What's a bit strange are the high indexes like 026 etc. Do you know whether there's some documentation on how one is supposed to name the files? I tried to find something via Google, but to no avail :/ That's expected - the indexes are not count according to their position in the imagelist, but instead according to the IdList. Check sfx2/source/doc/templatedlg.hrc for the values, eg. #define TBI_TEMPLATE_REPOSITORY 26 ie. TBI_TEMPLATE_REPOSITORY will be actionview026, etc. Sorry - I forgot about this detail in the previous mail. All the best, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Kendy, Hope that helps - and that this will get you further! It does, thanks a lot :) I pushed the icons already and now tried to compile it with your changes. The earlier issues are gone, but now the compiler is complaining about missing icon files: [build RES] sfxen-US f268: Error: The image(s) actionview026 actionview010 actionview025 actionview028 actionaction012 actionaction013 actiontemplates015 actiontemplates016 actiontemplates019 actiontemplates017 actiontemplates020 actiontemplates018 could not be found. Terminating compiler make[2]: *** [/home/alexander/libo/workdir/unxlngx6.pro/ResTarget/sfxen-US.res] Fehler 1 What's a bit strange are the high indexes like 026 etc. Do you know whether there's some documentation on how one is supposed to name the files? I tried to find something via Google, but to no avail :/ Thanks Alex -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQpWxKAAoJECO1/tAiWGrNq4cH/3ONYJ0c94DnRcFjPFlYQGxU 7q0QupwUn9pqdyLLDTiQAdkpKePUP7hcKP7ty+YZvugoCPMxK+aNaqEIwo3+SAgz txFZgCLZSFFMtHalGHHWmQuNhip0FVbnP1RdJEYhsx4HI41bQmU8UzzL943RmviO 7tdPSMV8+zQJl4qXJHzjFHlNjHGrNcply4Vaxr0dkyXrBYITbyHrWXs/LYDWdwCi qWZx+NxMHvL3n8cs57buBfnsrpkAs8KO6HT6PKEaXIJe2LUX0Ce7JWjLtxqlek4K JweBZMICaPNbDa/jJDjAlqWlQ2r4MIHe/OZ7D5XHUY5IFqDjjB5Bl0aY4nzhMMM= =66Gw -END PGP SIGNATURE- ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Kendy, Hope that helps - and that this will get you further! It does, thanks a lot :) I pushed the icons already and now tried to compile it with your changes. The earlier issues are gone, but now the compiler is complaining about missing icon files: [build RES] sfxen-US f268: Error: The image(s) actionview026 actionview010 actionview025 actionview028 actionaction012 actionaction013 actiontemplates015 actiontemplates016 actiontemplates019 actiontemplates017 actiontemplates020 actiontemplates018 could not be found. Terminating compiler make[2]: *** [/home/alexander/libo/workdir/unxlngx6.pro/ResTarget/sfxen-US.res] Fehler 1 What's a bit strange are the high indexes like 026 etc. Do you know whether there's some documentation on how one is supposed to name the files? I tried to find something via Google, but to no avail :/ Thanks Alex - -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQpWxKAAoJECO1/tAiWGrNq4cH/3ONYJ0c94DnRcFjPFlYQGxU 7q0QupwUn9pqdyLLDTiQAdkpKePUP7hcKP7ty+YZvugoCPMxK+aNaqEIwo3+SAgz txFZgCLZSFFMtHalGHHWmQuNhip0FVbnP1RdJEYhsx4HI41bQmU8UzzL943RmviO 7tdPSMV8+zQJl4qXJHzjFHlNjHGrNcply4Vaxr0dkyXrBYITbyHrWXs/LYDWdwCi qWZx+NxMHvL3n8cs57buBfnsrpkAs8KO6HT6PKEaXIJe2LUX0Ce7JWjLtxqlek4K JweBZMICaPNbDa/jJDjAlqWlQ2r4MIHe/OZ7D5XHUY5IFqDjjB5Bl0aY4nzhMMM= =66Gw - -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQpWx7AAoJECO1/tAiWGrNyF4IALF1MAVA+dtqa+uUIBi7sUct Io2ZThDi/iHjsQltk6E0IEOZCwWbF1SQ91TusdAP05iLReMdJmNyVhdeN+epqofM lLhSqzmXg56gK+V2Dz4VIWITlvY9KSc4zFOVj/BAzzz0KEfJrzcIh88P5xW5zTVq +LbaoA7HeshqIT29JHbCa13sLuK1EkB3QsMbtRFoebKVcVmJxrBHWIpw6i5vTbkd P1TfLVHMkZFQ5l4zFuZuPxk4t0hvwjC/TNmi1BONRATUls5oQ1iQd/ETBmgsamhA 4RfUMkoW0CLVOzpFZFDKtOcGoD+k3G9o0Fqgt4030asn9u0q5k1dNrLaQVtnRRs= =w3gM -END PGP SIGNATURE- ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Kendy, do I have to add such a section after each ToolBox? #define TEMPLATEDLG_IDLIST \ IdList =\ { \ TBI_PEN ; \ TBI_FIRST ; \ TBI_PREVIOUS ; \ TBI_NEXT ; \ TBI_LAST ; \ TBI_EMBEDDED ; \ TBI_TBI_TEMPLATE_SEARCH ; \ TBI_TBI_TEMPLATE_ACTION ; \ }; \ IdCount = { 8 ; }; #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x; Blue = 0xff00; } ImageList IL_NAVIGATR { Prefix = templatedialog; MaskColor = IMAGE_STDBTN_COLOR ; TEMPLATEDLG_IDLIST }; }; And where do I need to put the templatedialog##.png files? in icon-themes/tango_testing/sfx2/res? Thanks for your help Alex -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBAgAGBQJQoTkCAAoJECO1/tAiWGrNaRUIANDCKB30S1vYupKGB7dSbscG pFW2fdA/KDKy50jUBvsxX7U5kfuNEbL9xtSiuVdlCe2287H55nwIvGr5ny1LvCoV Y1qOCvZRwtxeP+4dNa01YAISw56jTTaHm+1CaOsr2/ZrAhQje+pRzQzWZZhLEwUl FAOTWOVh3NHLnRg7mZSOPc6yU54Q73AJrIHmTMP79opna5TCZ87PeSaG0qpSqpRh +0YjmDx5Z9pheHjDz2uirKcXUmyn3mvbxOf/8P94ZXBtIqUBOwNXX/iGPIhOzTye 0oILzJ2rGxDZ1oeUFkH/py89UAUtqO/cnPjMQsxYo8yxUi+WePgNLKp6517iDfQ= =ZBhW -END PGP SIGNATURE- ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
Hi Alex, Alexander Wilms píše v Út 13. 11. 2012 v 00:15 +0100: When compiling it I get the following error, but I don't know what's the difference to the syntax in navigatr.src: [...] Should it basically look like the code below? Basically yes, I believe that it must be just a small omission :-) Can you instead of the complete file send the diff? Something like git diff for-kendy.diff and send me the resulting for-kendy.diff file, so that I can try here exactly? For sure there is the small problem with several definitions of IMAGE_STDBTN_COLOR (it should be #define'd only once), but it does not seem to be the thing it complains about. Also, when looking at it, it is not really necessary to #define ACTIONVIEW_IDLIST, because there is just one place that uses that, so maybe better to write directly #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x; Blue = 0xff00; } ImageList IL_ACTIONVIEW { Prefix = actionview; MaskColor = IMAGE_STDBTN_COLOR ; IdList = { TBI_TEMPLATE_REPOSITORY ; TBI_TEMPLATE_IMPORT ; TBI_TEMPLATE_FOLDER_DEL ; TBI_TEMPLATE_SAVE ; }; IdCount = { 4 ; }; }; [but that was the same way in navigatr.src] The last thing I noticed is that you wrote '2' in IdCount, I suppose that should be '4'. But in general, your changes are the right way, I believe :-) - please catch me on the IRC, or send me the .diff. All the best, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
Hi Alex, Alexander Wilms píše v Po 12. 11. 2012 v 18:59 +0100: do I have to add such a section after each ToolBox? #define TEMPLATEDLG_IDLIST \ IdList =\ { \ TBI_PEN ; \ TBI_FIRST ; \ TBI_PREVIOUS ; \ TBI_NEXT ; \ TBI_LAST ; \ TBI_EMBEDDED ; \ TBI_TBI_TEMPLATE_SEARCH ; \ TBI_TBI_TEMPLATE_ACTION ; \ }; \ IdCount = { 8 ; }; #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x; Blue = 0xff00; } ImageList IL_NAVIGATR { Prefix = templatedialog; MaskColor = IMAGE_STDBTN_COLOR ; TEMPLATEDLG_IDLIST }; }; I covered it mostly in the other mail - the #define IMAGE_STDBTN_COLOR should be just once per .src (and hopefully not needed any more either; but let's try without that later), and the #define TEMPLATEDLG_IDLIST could be unwound in ImageList IL_NAVIGATR, which would read better I believe :-) And where do I need to put the templatedialog##.png files? in icon-themes/tango_testing/sfx2/res? I suppose icon-themes/galaxy/sfx2/imglst/templatedialog##.png is the right location (galaxy before it is the fallback theme for all). All the best, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
Hi Alex, Alexander Wilms píše v Po 12. 11. 2012 v 07:51 +0100: I want to add some icons to the toolbar in the new template manager (/sfx2/source/doc/templatedlg.src) I added lines like ButtonImage = Image { ImageBitmap = Bitmap { File = document_edit.png ; }; }; for each ToolBoxItem, but when trying to compile I get this error: ImageBitmap = Bitmap { File = document_edit.png ; }; ^ f643: /home/alexander/libo/workdir/unxlngx6.pro/SrsPartMergeTarget/sfx2/source/doc/templatedlg.src, line 282: Error in the object (Type: ToolBoxItem): The variable ButtonImage must not be used here. The ToolBoxItems cannot contain ButtonImages. If you want to add a icons to a 'ToolBoxItem', you need to do it like it is visible in eg. sd/source/ui/dlg/navigatr.src Ie. first create the ToolBoxItems, and then later, create an ImageList. The images there have to have names like something01.png, something02.png, etc. The something part is controlled by the Prefix in the ImageList, the number is given by the IdList. Hopefully this works for you, please let me know if not. All the best, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Adding icons to the template manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 When compiling it I get the following error, but I don't know what's the difference to the syntax in navigatr.src: [build srs] /home/alexander/libo/sfx2/source/doc/templatedlg.src Warning : Can't open /home/alexander/libo/workdir/unxlngx6.pro/CustomTarget/translations/translate/sdf/sfx2/source/doc/localize.sdf { ^ f4101: /home/alexander/libo/workdir/unxlngx6.pro/SrsPartMergeTarget/sfx2/source/doc/templatedlg.src, line 242: Warning in the object (Type: ImageList): Resources without name are ignored. { ^ f640: /home/alexander/libo/workdir/unxlngx6.pro/SrsPartMergeTarget/sfx2/source/doc/templatedlg.src, line 242: Error: syntax error f256: Error: !! 1 Error found!! Error starting rsc2 compiler make[2]: *** [/home/alexander/libo/workdir/unxlngx6.pro/SrsPartTarget/sfx2/source/doc/templatedlg.src] Fehler 1 Should it basically look like the code below? Kind Regards Alex /* * Copyright 2012 LibreOffice contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include doc.hrc #include templatedlg.hrc #include helpid.hrc String STR_ACTION_SORT_NAME { Text [ en-US ] = Sort by name; }; String STR_ACTION_REFRESH { Text [ en-US ] = Refresh; }; String STR_ACTION_DEFAULT { Text [ en-US ] = Reset Default Template ; /* leave ending space */ }; String STR_MOVE_NEW { Text [ en-US ] = New folder; }; String STR_INPUT_NEW { Text [ en-US ] = Enter folder name:; }; String STR_REPOSITORY_LOCAL { Text [ en-US ] = Local; }; String STR_REPOSITORY_NEW { Text [ en-US ] = New Repository; }; String STR_MSG_ERROR_LOCAL_MOVE { Text [ en-US ] = Error moving the following templates to $1.\n$2 ; }; String STR_MSG_ERROR_REMOTE_MOVE { Text [ en-US ] = Error moving the following templates from repository $1 to folder $2.\n$3 ; }; String STR_MSG_ERROR_EXPORT { Text [ en-US ] = Error exporting the following templates:\n$1; }; String STR_MSG_ERROR_IMPORT { Text [ en-US ] = Error importing the following templates to $1:\n$2; }; String STR_MSG_ERROR_DELETE_TEMPLATE { Text [ en-US ] = The following templates cannot be deleted:\n$1; }; String STR_MSG_ERROR_DELETE_FOLDER { Text [ en-US ] = The following folders cannot be deleted:\n$1; }; String STR_MSG_ERROR_REPOSITORY_NAME { Text [ en-US ] = Failed to create repository \$1\.\nA repository with this name may already exist.; }; String STR_MSG_ERROR_SELECT_FOLDER { Text [ en-US ] = Select the destination folder(s) to save the template.; }; String STR_INPUT_TEMPLATE_NEW { Text [ en-US ] = Enter template name:; }; String STR_QMSG_SEL_FOLDER_DELETE { Text [ en-US ] = Do you want to delete the selected folders?; }; String STR_QMSG_TEMPLATE_OVERWRITE { Text [ en-US ] = A template named $1 already exist in $2. Do you want to overwrite it?; }; ModelessDialog DLG_TEMPLATE_MANAGER { OutputSize = TRUE; SVLook = TRUE; Moveable = TRUE; Closeable = TRUE; Hide = TRUE; Size = MAP_APPFONT ( 290 , 250 ); Text [en-US] = Template Manager; PushButton BTN_SELECT_ALL { Pos = MAP_APPFONT(10,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; DefButton = TRUE; Text [en-US] = All; }; PushButton BTN_SELECT_DOCS { Pos = MAP_APPFONT(60,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Documents; }; PushButton BTN_SELECT_PRESENTATIONS { Pos = MAP_APPFONT(110,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Presentations; }; PushButton BTN_SELECT_SHEETS { Pos = MAP_APPFONT(160,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Spreedsheets; }; PushButton BTN_SELECT_DRAWS { Pos = MAP_APPFONT(210,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Drawings; }; ImageButton BTN_SELECTION_MODE { Pos = MAP_APPFONT(260,5); Size = MAP_APPFONT(20,14); TabStop = TRUE; ButtonImage = Image { ImageBitmap = Bitmap { File = select.png ; }; }; QuickHelpText [en-US] = Enables selecting items by just clicking in the thumbnail or title.; }; Control TEMPLATE_VIEW { Pos = MAP_APPFONT(5,30); Size = MAP_APPFONT(280,220); TabStop = TRUE; }; Image IMG_ACTION_SORT { ImageBitmap = Bitmap { File = sortascending.png; }; }; Image IMG_ACTION_REFRESH { ImageBitmap = Bitmap { File = reload.png; }; }; ToolBox TBX_ACTION_VIEW { SVLook = TRUE ; TabStop = TRUE ; Pos = MAP_APPFONT ( 4 , 22 ) ; ItemList = {
Adding icons to the template manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I want to add some icons to the toolbar in the new template manager (/sfx2/source/doc/templatedlg.src) I added lines like ButtonImage = Image { ImageBitmap = Bitmap { File = document_edit.png ; }; }; for each ToolBoxItem, but when trying to compile I get this error: ImageBitmap = Bitmap { File = document_edit.png ; }; ^ f643: /home/alexander/libo/workdir/unxlngx6.pro/SrsPartMergeTarget/sfx2/source/doc/templatedlg.src, line 282: Error in the object (Type: ToolBoxItem): The variable ButtonImage must not be used here. f256: Error: !! 1 Error found!! Error starting rsc2 compiler make[2]: *** [/home/alexander/libo/workdir/unxlngx6.pro/SrsPartTarget/sfx2/source/doc/templatedlg.src] Fehler 1 What am I doing wrong? Thanks Alex The new code: /* * Copyright 2012 LibreOffice contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include doc.hrc #include templatedlg.hrc #include helpid.hrc String STR_ACTION_SORT_NAME { Text [ en-US ] = Sort by name; }; String STR_ACTION_REFRESH { Text [ en-US ] = Refresh; }; String STR_ACTION_DEFAULT { Text [ en-US ] = Reset Default Template ; /* leave ending space */ }; String STR_MOVE_NEW { Text [ en-US ] = New folder; }; String STR_INPUT_NEW { Text [ en-US ] = Enter folder name:; }; String STR_REPOSITORY_LOCAL { Text [ en-US ] = Local; }; String STR_REPOSITORY_NEW { Text [ en-US ] = New Repository; }; String STR_MSG_ERROR_LOCAL_MOVE { Text [ en-US ] = Error moving the following templates to $1.\n$2 ; }; String STR_MSG_ERROR_REMOTE_MOVE { Text [ en-US ] = Error moving the following templates from repository $1 to folder $2.\n$3 ; }; String STR_MSG_ERROR_EXPORT { Text [ en-US ] = Error exporting the following templates:\n$1; }; String STR_MSG_ERROR_IMPORT { Text [ en-US ] = Error importing the following templates to $1:\n$2; }; String STR_MSG_ERROR_DELETE_TEMPLATE { Text [ en-US ] = The following templates cannot be deleted:\n$1; }; String STR_MSG_ERROR_DELETE_FOLDER { Text [ en-US ] = The following folders cannot be deleted:\n$1; }; String STR_MSG_ERROR_REPOSITORY_NAME { Text [ en-US ] = Failed to create repository \$1\.\nA repository with this name may already exist.; }; String STR_MSG_ERROR_SELECT_FOLDER { Text [ en-US ] = Select the destination folder(s) to save the template.; }; String STR_INPUT_TEMPLATE_NEW { Text [ en-US ] = Enter template name:; }; String STR_QMSG_SEL_FOLDER_DELETE { Text [ en-US ] = Do you want to delete the selected folders?; }; String STR_QMSG_TEMPLATE_OVERWRITE { Text [ en-US ] = A template named $1 already exist in $2. Do you want to overwrite it?; }; ModelessDialog DLG_TEMPLATE_MANAGER { OutputSize = TRUE; SVLook = TRUE; Moveable = TRUE; Closeable = TRUE; Hide = TRUE; Size = MAP_APPFONT ( 290 , 250 ); Text [en-US] = Template Manager; PushButton BTN_SELECT_ALL { Pos = MAP_APPFONT(10,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; DefButton = TRUE; Text [en-US] = All; }; PushButton BTN_SELECT_DOCS { Pos = MAP_APPFONT(60,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Documents; }; PushButton BTN_SELECT_PRESENTATIONS { Pos = MAP_APPFONT(110,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Presentations; }; PushButton BTN_SELECT_SHEETS { Pos = MAP_APPFONT(160,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Spreedsheets; }; PushButton BTN_SELECT_DRAWS { Pos = MAP_APPFONT(210,5); Size = MAP_APPFONT(50,14); TabStop = TRUE; Text [en-US] = Drawings; }; ImageButton BTN_SELECTION_MODE { Pos = MAP_APPFONT(260,5); Size = MAP_APPFONT(20,14); TabStop = TRUE; ButtonImage = Image { ImageBitmap = Bitmap { File = select.png ; }; }; QuickHelpText [en-US] = Enables selecting items by just clicking in the thumbnail or title.; }; Control TEMPLATE_VIEW { Pos = MAP_APPFONT(5,30); Size = MAP_APPFONT(280,220); TabStop = TRUE; }; Image IMG_ACTION_SORT { ImageBitmap = Bitmap { File = sortascending.png; }; }; Image IMG_ACTION_REFRESH { ImageBitmap = Bitmap { File = reload.png; }; }; ToolBox TBX_ACTION_VIEW { SVLook = TRUE ; TabStop = TRUE ; Pos = MAP_APPFONT ( 4 , 22 ) ; ItemList = { ToolBoxItem {