<div class="gmail_quote">On Mon, Jun 18, 2012 at 2:38 PM, Cedric Bosdonnat <span dir="ltr"><<a href="mailto:cbosdonnat@suse.com" target="_blank">cbosdonnat@suse.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mon, 2012-06-18 at 14:20 -0430, Rafael Dominguez wrote:<br>
> Im trying to use a picture in my dialog for a button, i added the<br>
> image (check.png) to icon-themes/galaxy/sfx2/res folder but when i<br>
> compile, i get an error msg<br>
> The image(s) <check> could not be found.<br>
<br>
</div></div>Could you show a snippet of your code trying to load the image? It won't<br>
be easy to help you otherwise ;)<br>
<br>
--<br>
Cedric<br>
<br></blockquote><div><br>/*<br>
 * Copyright 2012 LibreOffice contributors.<br>
 *<br>
 * This Source Code Form is subject to the terms of the Mozilla Public<br>
 * License, v. 2.0. If a copy of the MPL was not distributed with this<br>
 * file, You can obtain one at <a href="http://mozilla.org/MPL/2.0/">http://mozilla.org/MPL/2.0/</a>.<br>
 */<br>
<br>
#include "doc.hrc"<br>
#include "templatedlg.hrc"<br>
#include "helpid.hrc"<br>
<br>
ModalDialog DLG_TEMPLATE_MANAGER<br>
{<br>
    HelpId = CMD_SID_TEMPLATE_MANAGER;<br>
    OutputSize = TRUE;<br>
    SVLook = TRUE;<br>
    Moveable = TRUE;<br>
    Closeable = TRUE;<br>
    Hide = TRUE;<br>
    Size = MAP_APPFONT ( 290 , 250 );<br>
    Text [en-US] = "Template Manager";<br>
<br>
    PushButton BTN_SELECT_ALL<br>
    {<br>
        Pos = MAP_APPFONT(10,5);<br>
        Size = MAP_APPFONT(50,14);<br>
        TabStop = TRUE;<br>
        DefButton = TRUE;<br>
        Text [en-US] = "All";<br>
    };<br>
<br>
    PushButton BTN_SELECT_DOCS<br>
    {<br>
        Pos = MAP_APPFONT(60,5);<br>
        Size = MAP_APPFONT(50,14);<br>
        TabStop = TRUE;<br>
        Text [en-US] = "Documents";<br>
    };<br>
<br>
    PushButton BTN_SELECT_PRESENTATIONS<br>
    {<br>
        Pos = MAP_APPFONT(110,5);<br>
        Size = MAP_APPFONT(50,14);<br>
        TabStop = TRUE;<br>
        Text [en-US] = "Presentations";<br>
    };<br>
<br>
    PushButton BTN_SELECT_SHEETS<br>
    {<br>
        Pos = MAP_APPFONT(160,5);<br>
        Size = MAP_APPFONT(50,14);<br>
        TabStop = TRUE;<br>
        Text [en-US] = "Spreedsheets";<br>
    };<br>
<br>
    PushButton BTN_SELECT_DRAWS<br>
    {<br>
        Pos = MAP_APPFONT(210,5);<br>
        Size = MAP_APPFONT(50,14);<br>
        TabStop = TRUE;<br>
        Text [en-US] = "Drawings";<br>
    };<br>
<br>
    ImageButton BTN_SELECTION_MODE<br>
    {<br>
        Pos = MAP_APPFONT(265,5);<br>
        Size = MAP_APPFONT(14,14);<br>
        TabStop = TRUE;<br>
<br>
        ButtonImage = Image<br>
        {<br>
            ImageBitmap = Bitmap { File = "selection.png" ; };<br>
        };<br>
    };<br>
<br>
    Control TEMPLATE_VIEW<br>
    {<br>
        Pos = MAP_APPFONT(5,30);<br>
        Size = MAP_APPFONT(280,220);<br>
        TabStop = TRUE;<br>
    };<br>
};<br>
<br>
Dialog code, loading resources<br>
<br>
SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)<br>
    : ModalDialog(parent, SfxResId(DLG_TEMPLATE_MANAGER)),<br>
      aButtonAll(this,SfxResId(BTN_SELECT_ALL)),<br>
      aButtonDocs(this,SfxResId(BTN_SELECT_DOCS)),<br>
      aButtonPresents(this,SfxResId(BTN_SELECT_PRESENTATIONS)),<br>
      aButtonSheets(this,SfxResId(BTN_SELECT_SHEETS)),<br>
      aButtonDraws(this,SfxResId(BTN_SELECT_DRAWS)),<br>
      maButtonSelMode(this,SfxResId(BTN_SELECTION_MODE)),<br>
      maView(new ThumbnailView(this,SfxResId(TEMPLATE_VIEW)))<br>
{<br>
    maButtonSelMode.SetStyle(maButtonSelMode.GetStyle() | WB_TOGGLE);<br>
<br>
    maView->SetStyle(WB_TABSTOP | WB_VSCROLL);<br>
    maView->SetColCount(MAX_COLUMN_COUNT);<br>
    maView->SetLineCount(MAX_LINE_COUNT);<br>
<br>
    aButtonAll.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewAllHdl));<br>
    aButtonDocs.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewDocsHdl));<br>
    maButtonSelMode.SetClickHdl(LINK(this,SfxTemplateManagerDlg,OnClickSelectionMode));<br>
<br>
    maView->Populate();<br>
    maView->Show();<br>
<br>
    FreeResource();<br>
}<br><br> when i compile the code i get this error<br><br>[ build RES ] sfxen-US<br>S=/home/ralph/Proyectos/libreoffice/core && O=$S/solver/<a href="http://unxlngi6.pro">unxlngi6.pro</a> && W=$S/workdir/<a href="http://unxlngi6.pro">unxlngi6.pro</a> &&  mkdir -p $W/ResTarget/ $O/bin $W/ResTarget/ && RESPONSEFILE=`mktemp -t gbuild.XXXXXX` && echo "-r -p -lgen-US -fs=$W/ResTarget/sfxen-US.res -lip=$S/icon-themes/galaxy/sfx2/sfx -lip=$S/icon-themes/galaxy/sfx2/imglst/en-US -lip=$S/icon-themes/galaxy/sfx2/imglst -lip=$S/icon-themes/galaxy/sfx2/res/en-US -lip=$S/icon-themes/galaxy/sfx2/res -lip=$S/icon-themes/galaxy/sfx2 -lip=$S/icon-themes/galaxy/res/en-US -lip=$S/icon-themes/galaxy/res -subMODULE=$S/icon-themes/galaxy/ -subGLOBALRES=$S/icon-themes/galaxy/res -oil=$W/ResTarget/ $W/SrsTarget/sfx/res.srs" > ${RESPONSEFILE} && LD_LIBRARY_PATH="$O/lib" SOLARBINDIR=$O/bin $O/bin/rsc @${RESPONSEFILE} && rm -f ${RESPONSEFILE}<br>
f268: Error: The image(s) <selection> could not be found.<br>Terminating compiler<br>make: *** [/home/ralph/Proyectos/libreoffice/core/workdir/<a href="http://unxlngi6.pro/ResTarget/sfxen-US.res">unxlngi6.pro/ResTarget/sfxen-US.res</a>] Error 1<br>
<br></div></div>