LinHES Forums
http://forum.linhes.org/

Changing sequence of Mythweather screens
http://forum.linhes.org/viewtopic.php?f=6&t=4561
Page 1 of 1

Author:  Russ [ Fri May 13, 2005 2:54 pm ]
Post subject:  Changing sequence of Mythweather screens

Does anyone know of a simple way to change the Mythweather screen sequence? I'd like to change it to 1) current conditions, 2) today's forecast, 3) extended forecast, 4) weather map (i.e. swapping the order of the middle two screens).

TIA,
Russ

Author:  tjc [ Fri May 13, 2005 5:08 pm ]
Post subject: 

No easy way. You have to change the MythWeather code and recompile to make those kinds of changes.

Oh, and I agree that the order is screwy, I even filed a bug report over on the MythTv bugzilla to that effect...

Author:  Russ [ Sun May 15, 2005 8:32 am ]
Post subject: 

tjc wrote:
Oh, and I agree that the order is screwy, I even filed a bug report over on the MythTv bugzilla to that effect...


...which was disposed as "RESOLVED WONTFIX" :? I'll have a look at the Mythweather code & see if I can't make a patch.

Author:  tjc [ Sun May 15, 2005 11:22 am ]
Post subject: 

If you're feeling really ambitious you could always make the order configurable... ;-)

Author:  Russ [ Sun May 15, 2005 11:53 am ]
Post subject: 

tjc wrote:
If you're feeling really ambitious you could always make the order configurable... ;-)


I can do that - once I figure out how to change the order correctly. :)

Author:  Russ [ Sun May 15, 2005 1:30 pm ]
Post subject: 

Okay, one can easily change the Mythweather screen order by editing /usr/share/mythtv/themes/default/weather-ui.xml.

The <context> tag determines the screen order. So to swap the order of the second (extended forecast) and third (today's forecast) screens, simply change every instance of <context>2</context> to <context>3</context> and vice versa.

Or better yet, use this patch file that will do the work for you:

Code:
124c124
<         <context>2</context>
---
>         <context>3</context>
129c129
<         <context>2</context>
---
>         <context>3</context>
134c134
<         <context>3</context>
---
>         <context>2</context>
139c139
<         <context>3</context>
---
>         <context>2</context>
263c263
<         <context>2</context>
---
>         <context>3</context>
269c269
<         <context>2</context>
---
>         <context>3</context>
275c275
<         <context>2</context>
---
>         <context>3</context>
280c280
<         <context>2</context>
---
>         <context>3</context>
285c285
<         <context>2</context>
---
>         <context>3</context>
291c291
<         <context>2</context>
---
>         <context>3</context>
297c297
<         <context>2</context>
---
>         <context>3</context>
303c303
<         <context>2</context>
---
>         <context>3</context>
309c309
<         <context>2</context>
---
>         <context>3</context>
315c315
<         <context>2</context>
---
>         <context>3</context>
320c320
<         <context>2</context>
---
>         <context>3</context>
325c325
<         <context>2</context>
---
>         <context>3</context>
331c331
<         <context>2</context>
---
>         <context>3</context>
337c337
<         <context>2</context>
---
>         <context>3</context>
343c343
<         <context>2</context>
---
>         <context>3</context>
349c349
<         <context>2</context>
---
>         <context>3</context>
355c355
<         <context>2</context>
---
>         <context>3</context>
360c360
<         <context>2</context>
---
>         <context>3</context>
365c365
<         <context>2</context>
---
>         <context>3</context>
371c371
<         <context>2</context>
---
>         <context>3</context>
377c377
<         <context>2</context>
---
>         <context>3</context>
383c383
<         <context>2</context>
---
>         <context>3</context>
389c389
<         <context>2</context>
---
>         <context>3</context>
395c395
<         <context>2</context>
---
>         <context>3</context>
402c402
<         <context>3</context>
---
>         <context>2</context>
408c408
<         <context>3</context>
---
>         <context>2</context>
414c414
<         <context>3</context>
---
>         <context>2</context>
419c419
<         <context>3</context>
---
>         <context>2</context>
426c426
<         <context>3</context>
---
>         <context>2</context>


Cheers,
Russ

Author:  dvanbrunt [ Sat Jun 04, 2005 11:30 pm ]
Post subject: 

Ok, I give... how does one use that patch?

I used "pico" on /usr/share/mythtv/themes/default/weather-ui.xml and didn't see anything that looked like that sequence. A lot of content with "context" clauses, but not sure if I can just go manually change all the 2's to 3's, or whatever.

is there a script to do this?

Author:  Russ [ Sun Jun 05, 2005 6:52 am ]
Post subject: 

dvanbrunt wrote:
Ok, I give... how does one use that patch?

I used "pico" on /usr/share/mythtv/themes/default/weather-ui.xml and didn't see anything that looked like that sequence. A lot of content with "context" clauses, but not sure if I can just go manually change all the 2's to 3's, or whatever.

is there a script to do this?


Copy the patch shown above into a file named, for example, weather.patch, then cd to /usr/share/mythtv/themes/default, then:

# patch weather-ui.xl weather.patch

For more info on patching:

# man patch

Author:  tjc [ Sun Jun 05, 2005 2:19 pm ]
Post subject: 

BTW - It's better to use "diff -c" when publishing something intended to be used with "patch" since it makes the results more reliable.

Author:  dvanbrunt [ Sun Jun 05, 2005 4:08 pm ]
Post subject: 

tjc wrote:
BTW - It's better to use "diff -c" when publishing something intended to be used with "patch" since it makes the results more reliable.


So, then how does one apply a patch this way?

His insruction to copy into a file and then run patch seemed straightforward enough. Is "diff -c" a patch option? or a separate utility?

Thx!

Author:  Luthair [ Sun Jun 05, 2005 4:17 pm ]
Post subject: 

tjc was talking to Russ

Author:  tjc [ Sun Jun 05, 2005 6:48 pm ]
Post subject: 

Yes, I was. He used diff with no options to generate the patch. That works OK if you have EXACTLY the same file as he started with. If he'd used "diff -c" then the patch utility has more clues which can allow it to work even if there have been non-conflicting changes to the file and will let it better detect when there have been conflicting changes.

Author:  Russ [ Mon Jun 06, 2005 6:48 am ]
Post subject: 

Duly noted! Thanks for the tip.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/