Two UI questions

Shachar Shemesh shachar at shemesh.biz
Wed Jan 3 17:34:37 UTC 2024


Hello everyone.


I'm new to the list (and LO development). Please be patient with me.


Background:

I'm trying to add a button to a dialog. The button should carry the same 
image as the "Bold" button that appears on the main screen. To get to 
the dialog in question:

Calc/Format/Page Style.../Edit...


Right now, the button I'm trying to add is in the "Custom header" line.


The dialog is defined by the file 
sc/uiconfig/scalc/ui/headerfootercontent.ui


Question 1:

If I simply open the file with glade version 3.40.0, save and close, I 
get a fairly big diff. The headers suggest the file was last edited 
using glade version 3.36.0, and just this upgrade renames pretty much 
all attributes that have an underscore in them to a hyphen:

<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="sc">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkImage" id="imageBTN_DATE">
     <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="icon_name">sc/res/date.png</property>
+    <property name="can-focus">False</property>
+    <property name="icon-name">sc/res/date.png</property>
   </object>
   <object class="GtkImage" id="imageBTN_FILE">

Is this to be expected? Should I do anything to try and prevent this 
from happening?


Question 2:

I tried adding the new button using the patch attached. When I compile 
and run, the new button appears in the GUI where I expect it to, but no 
image appears inside it. Is there anything else I should have done to 
make the image appear?


As far as I can tell, bold.png exists in all the places that text.png 
exists, and I'm referencing it exactly the same way.


Thank you,

Shachar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: newbutton.patch
Type: text/x-patch
Size: 2117 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20240103/679e91e2/attachment.bin>


More information about the LibreOffice mailing list