Opened 7 years ago

Last modified 11 months ago

#10434 accepted Patch - Feature

Standardize the name of the text area use to display the window's title

Reported by: Xavier Hervy <xavier.hervy@…> Owned by: stuartm
Priority: minor Milestone: 29.2
Component: MythTV - General Version: Master Head
Severity: medium Keywords: theme mythui
Cc: Ticket locked: no

Description

This is an attempt to standardize the name of the textarea used to display the title in a window. It does not mean that all the window will look the same, the freedom is left to the themer.

I implemented 2 new methods in MythScreenType?:

  • SetWindowTitle?: set the title of the window. the title will be display in a textarea named "windowtitle" if defined in the window widget in XML.
  • SetAlternateTitleTextAreaName?: specify the name of the textarea to be used if "windowtitle" have not be found. (The name is really bad). This method only allow a smooth conversion of the themes. It is not meant to be left in the code forever, it does just prevent breaking existing themes and will display a warning if the theme is not using the windowtitle.

This patch also include a example of use for the Programs Search.

The only purpose of the patch is to ease the creation of new theme. A consistant window's title could be created as follow:

<group name="basewindowtitle">
    <imagetype name="basetopbar">
        <position>0,0</position>
        <filename>backgrounds/topbar.png</filename>
    </imagetype>
    <textarea name="windowtitle">
        <area>20,4,650,36</area>
        <font>baselarge</font>
        <value></value>
    </textarea>
</group>

<window name="TitleDefinedInXML">
    <group name="titlebar" from="basewindowtitle" >
        <textarea name="windowtitle">
            <value>Title defined in XML</value>
        </textarea>
    </group>
</window>

<window name="TitleDefinedByProgram">
    <group name="titlebar" from="basewindowtitle" />
</window>

Attachments (1)

titlewindow.diff (5.4 KB) - added by Xavier Hervy <xavier.hervy@…> 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by Xavier Hervy <xavier.hervy@…>

Attachment: titlewindow.diff added

comment:1 Changed 7 years ago by Xavier Hervy <xavier.hervy@…>

I forgot to mention that if the principle of this patch was approved, I would happily convert every single Dialogs.

comment:2 Changed 6 years ago by beirdo

Owner: set to stuartm
Status: newassigned

comment:3 Changed 5 years ago by stuartm

Milestone: unknown0.28
Status: assignedaccepted

comment:4 Changed 3 years ago by paulh

Milestone: 0.280.29

Bumping to 0.29

comment:5 Changed 3 years ago by Stuart Auchterlonie

Milestone: 0.2929.0

Milestone renamed

comment:6 Changed 13 months ago by Stuart Auchterlonie

Milestone: 29.029.1

comment:7 Changed 11 months ago by Stuart Auchterlonie

Milestone: 29.10.28.2

Moving remaining open tickets to 0.28.2 milestone

comment:8 Changed 11 months ago by Stuart Auchterlonie

Milestone: 0.28.229.2

Moving remaining open tickets to 29.2 milestone

Note: See TracTickets for help on using tickets.