Adding icons to the template manager
Alexander Wilms
alexander.wilms at zoho.com
Sun Nov 11 22:51:38 PST 2012
-----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
{
Identifier = TBI_TEMPLATE_REPOSITORY;
Text [ en-US ] = "Repository";
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_IMPORT ;
Hide = TRUE;
Text [ en-US ] = "Import" ;
ItemImage = Image
{
ImageBitmap = Bitmap { File =
"document_import.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_FOLDER_DEL;
Hide = TRUE;
Text [ en-US ] = "Delete";
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_SAVE;
Hide = TRUE;
Text [ en-US ] = "Save";
};
};
};
ToolBox TBX_ACTION_ACTION
{
SVLook = TRUE ;
TabStop = TRUE ;
Pos = MAP_APPFONT ( 4 , 22 ) ;
ItemList =
{
ToolBoxItem
{
Identifier = TBI_TEMPLATE_SEARCH;
Text [en-US] = "Search";
ItemImage = Image
{
ImageBitmap = Bitmap { File = "edit_find.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_ACTION;
Text [en-US] = "Action Menu";
ItemImage = Image
{
ImageBitmap = Bitmap { File = "exec_action.png" ; };
};
};
};
};
ToolBox TBX_ACTION_TEMPLATES
{
SVLook = TRUE ;
TabStop = TRUE ;
Pos = MAP_APPFONT ( 4 , 22 ) ;
Hide = TRUE;
ItemList =
{
ToolBoxItem
{
Identifier = TBI_TEMPLATE_EDIT;
Text [ en-US ] = "Edit";
ButtonImage = Image
{
ImageBitmap = Bitmap { File = "document_edit.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_PROPERTIES;
Text [ en-US ] = "Properties";
ButtonImage = Image
{
ImageBitmap = Bitmap { File =
"document_properties.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_DEFAULT;
Text [ en-US ] = "Set as default";
ButtonImage = Image
{
ImageBitmap = Bitmap { File =
"document_set_as_default.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_MOVE;
Text [ en-US ] = "Move to folder" ;
ButtonImage = Image
{
ImageBitmap = Bitmap { File = "move_to_folder.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_EXPORT;
Text [ en-US ] = "Export";
ButtonImage = Image
{
ImageBitmap = Bitmap { File = "document_export.png" ; };
};
};
ToolBoxItem
{
Identifier = TBI_TEMPLATE_DELETE;
Text [ en-US ] = "Delete";
ButtonImage = Image
{
ImageBitmap = Bitmap { File = "edit_delete.png" ; };
};
};
};
};
};
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQEcBAEBAgAGBQJQoJx6AAoJECO1/tAiWGrNvusH/iD/uj//wWArbvGF8GN0KSsM
wbD8GvVQzv+FRuvtERFoaVoYMCUIwzTg2y9UT/qEAEHKC7YnKmu7RGUfu/FyT4cu
h0WbUjdR1nQA1EFxH678WEWHZlVY4/zAy+kMW1pfoN14FyJaGH1kD7iZdvFoFnWJ
XjujkYhfzqjeUa7TgCzPrgODmr1wVLuLTg5vHOmKwm44op+VPDvIDJsCYhyxAXGY
mAS9TXWcyhPP2rJjWZ/zBq29Af+QWsS+wmJrTUEPG5lvkfAjKc0jc/K2W/jqiIMg
RN4zIX768MIsMxlVNdZTbLpQlbnkYgw6HcFNBRAqtFN1ecUfpNrqakBN7RDITLo=
=+WJT
-----END PGP SIGNATURE-----
More information about the LibreOffice
mailing list