Mailing List Archive

Theme Chooser and directory names with dots
Does the These Chooser support the dot (period) character in the
directory name where the theme is stored? On 0.25 it doesn't appear to
work. I tweaked the Mythbuntu theme and saved my modified version
under ~/.mythtv/themes/Mythbuntu-local-25.29. The theme is displayed
on the Theme Chooser screen, but when I select it, this is printed to
the log (with -v gui):

W MythUIHelper: No theme dir: '/usr/share/mythtv/themes/Mythbuntu-local-25'
E MythUIHelper: Could not find theme: Mythbuntu-local-25 - Switching to Terra

and MythTV falls back to the Terra theme. If I name the directory
either Mythbuntu-local or Mythbuntu-local-25-29, then it works fine.
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
On Sun, Oct 7, 2012 at 12:06 PM, Joey Morris <rjmorris@nc.rr.com> wrote:
> Does the These Chooser support the dot (period) character in the
> directory name where the theme is stored? On 0.25 it doesn't appear to
> work. I tweaked the Mythbuntu theme and saved my modified version
> under ~/.mythtv/themes/Mythbuntu-local-25.29. The theme is displayed
> on the Theme Chooser screen, but when I select it, this is printed to
> the log (with -v gui):
>
> W MythUIHelper: No theme dir: '/usr/share/mythtv/themes/Mythbuntu-local-25'
> E MythUIHelper: Could not find theme: Mythbuntu-local-25 - Switching to Terra
>
> and MythTV falls back to the Terra theme. If I name the directory
> either Mythbuntu-local or Mythbuntu-local-25-29, then it works fine.
> _______________________________________________
> mythtv-theming mailing list
> mythtv-theming@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-theming

I don't know if it doesn't see directories with dots or not, but out
of curiosity, what did you change in the theme? Anything I would be
interested in adding?

Thanks,

Thomas Mashos
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
Thomas Mashos <thomas@mashos.com> wrote on Sun, Oct 07, 2012 at 04:20:13PM -0700:
> On Sun, Oct 7, 2012 at 12:06 PM, Joey Morris <rjmorris@nc.rr.com> wrote:
> > Does the These Chooser support the dot (period) character in the
> > directory name where the theme is stored? On 0.25 it doesn't appear to
> > work. I tweaked the Mythbuntu theme and saved my modified version
> > under ~/.mythtv/themes/Mythbuntu-local-25.29. The theme is displayed
> > on the Theme Chooser screen, but when I select it, this is printed to
> > the log (with -v gui):
> >
> > W MythUIHelper: No theme dir: '/usr/share/mythtv/themes/Mythbuntu-local-25'
> > E MythUIHelper: Could not find theme: Mythbuntu-local-25 - Switching to Terra
> >
> > and MythTV falls back to the Terra theme. If I name the directory
> > either Mythbuntu-local or Mythbuntu-local-25-29, then it works fine.
>
> I don't know if it doesn't see directories with dots or not, but out
> of curiosity, what did you change in the theme? Anything I would be
> interested in adding?

The first thing I did was change the wrapstyle for all button lists
from "none" to "selection". Getting to the bottom of a list and not
being able to wrap back to the top is a pet peeve of mine, so I must
change any theme that does otherwise.

Most of my other changes are things that I wouldn't expect to have
general appeal. For example, in the details section of the highlighted
recording on the Watch Recordings screen, I replaced the start/end
date with the length in minutes. I disabled showcategorycolors in the
EPG. I changed the number of columns in MythVideo's List view from 3
to 1.

There was one bug: In video-ui.xml, the breadcrumbs textarea in the
tree window doesn't extend all the way across the screen. I changed
its width from 740 to 1220. I had made a few other similar edits in my
local 0.24 version (where it looked like the coordinates hadn't been
appropriately adjusted from what I'm assuming was the original 800x600
aspect ratio), but this one was the only one that was still present in
0.25.
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
Joey Morris <rjmorris@nc.rr.com> wrote on Sun, Oct 07, 2012 at 10:27:30PM -0400:
> There was one bug: In video-ui.xml, the breadcrumbs textarea in the
> tree window doesn't extend all the way across the screen. I changed
> its width from 740 to 1220. I had made a few other similar edits in my
> local 0.24 version (where it looked like the coordinates hadn't been
> appropriately adjusted from what I'm assuming was the original 800x600
> aspect ratio), but this one was the only one that was still present in
> 0.25.

I just created a bug report for this.
https://bugs.launchpad.net/mythbuntu/+bug/1063744
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
(I have been lately assisting Thomas Mashos with maintaining the
Mythbuntu theme.)

Joey Morris <rjmorris@nc.rr.com> says:
> The first thing I did was change the wrapstyle for all button lists
> from "none" to "selection".

Agreed. I was aware of this issue still existing in the list view in
MythVideo, but no doubt there are others that were missed. Fixed by
modifying the basebuttonlist primitive in base.xml, but it's possible
there are other obscure menus that still don't wrap because they don't
inherit from basebuttonlist or basebuttonlist2.

> Most of my other changes are things that I wouldn't expect to have
> general appeal. For example, in the details section of the
> highlighted recording on the Watch Recordings screen, I replaced the
> start/end date with the length in minutes.

I seriously considered making this change by addding %LENMINS% to the
existing %TIMEDATE% field. I ultimately decided to not do so because
there isn't enough room in the lower pane. The time display there can
get very long, especially in non-English languages or if you're like
me and use a particularly verbose longdate format. I could give
another 100 pixels to the field, but then particularly long channel
names to its left would run out of room (National Geographic Channel,
Turner Network Television, etc.)

%LENMINS% is used with %TIMEDATE% in the OSD where there is more room,
and (more to the point) the field is useful for DVDs for which
%TIMEDATE% is meaningless.

> There was one bug: In video-ui.xml, the breadcrumbs textarea in the
> tree window doesn't extend all the way across the screen. I changed
> its width from 740 to 1220.

Thank you for catching this. That it does not extend all the way
across is an artifact of the theme's previous maintainers; they chose
a visual identity for the theme that emphasized, among other things, a
title bar of that length and a secondary display (a clock or something
else) in the remaining space. While I've tried to maintain that visual
identity whenever practical, in this case--given the space
requirements of the breadcrumbs and since there is no secondary
display in this MythVideo view--it makes more sense to lengthen the
breadcrumbs. (It also makes sense to use <cutdown>left</cutdown>
because the end of the breadcrumb is more meaningful than the start.)

Both this fix and the menu-wrapping fix will be in the next set of
patches I send to Thomas.

--
Yeechang Lee <ylee@pobox.com> | San Francisco
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
Joey Morris <rjmorris@nc.rr.com> says:
> I tweaked the Mythbuntu theme and saved my modified version under
> ~/.mythtv/themes/Mythbuntu-local-25.29.

Aside from the Theme Chooser bug you discovered, you're better off not
putting a version number in the directory at all. Put your modified
local copy of the theme in Mythbuntu-local, then modify the theme name
and/or version numbers in themeinfo.xml so the info appears in Theme
Chooser.
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
Yeechang Lee <ylee@pobox.com> wrote on Mon, Oct 08, 2012 at 06:32:59AM -0700:
> Joey Morris <rjmorris@nc.rr.com> says:
> > I tweaked the Mythbuntu theme and saved my modified version under
> > ~/.mythtv/themes/Mythbuntu-local-25.29.
>
> Aside from the Theme Chooser bug you discovered, you're better off not
> putting a version number in the directory at all. Put your modified
> local copy of the theme in Mythbuntu-local, then modify the theme name
> and/or version numbers in themeinfo.xml so the info appears in Theme
> Chooser.

The reason I named it that way in the first place is that I wanted to
have two Mythbuntu-local versions: one based on 25.16 that I'd been
using and another based on 25.29 that I was porting my patches to. So
I named the directories Mythbuntu-local-25.16 and
Mythbuntu-local-25.29.
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
* On Sun Oct 07, 2012 at 03:06:50PM -0400, Joey Morris wrote:
> Does the These Chooser support the dot (period) character in the
> directory name where the theme is stored? On 0.25 it doesn't appear to
> work. I tweaked the Mythbuntu theme and saved my modified version

Do you compile from source? If so, can you try the following change?

Edit mythtv/libs/libmythui/themeinfo.h and search for
GetDirectoryName(). On that line, change m_theme.baseName() to
m_theme.fileName().

That looks like where we're stripping anything after the first dot.
The Theme Chooser calls ThemeInfo::GetDirectoryName() when saving the
Theme setting to the DB, so I think you'll find that the DB has the
wrong theme name if you run "select * from settings where value = 'Theme';"

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
Chris Pinkham <cpinkham@bc2va.org> wrote on Wed, Oct 10, 2012 at 07:24:29AM -0700:
> * On Sun Oct 07, 2012 at 03:06:50PM -0400, Joey Morris wrote:
> > Does the These Chooser support the dot (period) character in the
> > directory name where the theme is stored? On 0.25 it doesn't appear to
> > work. I tweaked the Mythbuntu theme and saved my modified version
>
> Do you compile from source? If so, can you try the following change?
>
> Edit mythtv/libs/libmythui/themeinfo.h and search for
> GetDirectoryName(). On that line, change m_theme.baseName() to
> m_theme.fileName().
>
> That looks like where we're stripping anything after the first dot.
> The Theme Chooser calls ThemeInfo::GetDirectoryName() when saving the
> Theme setting to the DB, so I think you'll find that the DB has the
> wrong theme name if you run "select * from settings where value = 'Theme';"

Thanks for looking into this, Chris. Unfortunately I don't compile
from source. Moving to source-based installs is on my short-term todo
list, though, and I will definitely test this fix when I reach that
point.

I can confirm that after choosing the theme stored in
Mythbuntu-local-25.29, the database has the wrong theme name, as you
suspected: "Mythbuntu-local-25". As another check, I quit mythfrontend
and then manually updated the database to set the theme to the correct
value. After restarting mythfrontend, it correctly picked up the
Mythbuntu-local-25.29 theme instead of falling back to Terra.
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Theme Chooser and directory names with dots [ In reply to ]
* On Wed Oct 10, 2012 at 06:58:10PM -0400, Joey Morris wrote:
> I can confirm that after choosing the theme stored in
> Mythbuntu-local-25.29, the database has the wrong theme name, as you
> suspected: "Mythbuntu-local-25". As another check, I quit mythfrontend
> and then manually updated the database to set the theme to the correct
> value. After restarting mythfrontend, it correctly picked up the
> Mythbuntu-local-25.29 theme instead of falling back to Terra.

OK, thanks. I'm sure that's the issue you ran into and the fix is
that baseName() -> fileName() change, so I went ahead and committed to
master and made a note to push to the fixes branch if no one complains
for a while. :)

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming