MyWeather.xml as dialog?
#1
Sorry, another one.

Is there any way of having MyWeather.xml pop up as a dialog rather than a completely new window? If not, and assuming this can't be changed, would it be possible to extend the Refresh and Location Change functions to beyond the Weather window?
Reply
#2
because the Window(Weather).Property(propertyname) properties are available everywhere, you can create a custom window dialog, but...

you would need two new builtins to change location and to force refresh. not sure how hard those would be to do.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
As you point out, only the refresh and location change functions are bound to the weather window.

The refresh could be hacked anyway I think, via the Control.SendClick() or whatever it is, though I'm not 100% sure whether that would be safe if the window isn't initialized. Play around and see if that will do the job for both.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
this seems to work for refresh, not sure if setting the area was necessary.
PHP Code:
Indexxbmc/Util.cpp
===================================================================
--- 
xbmc/Util.cpp (revision 18060)
+++ 
xbmc/Util.cpp (working copy)
@@ -
103,+103,@@
 
#include "FileSystem/File.h"
 #include "PlayList.h"
 #include "Crc32.h"
+#include "Weather.h"
 
 
using namespace std;
 
using namespace DIRECTORY;
@@ -
2353,+2354,@@
   { 
"SendClick",                  true,   "Send a click message from the given control to the given window" },
   { 
"LoadProfile",                true,   "Load the specified profile (note; if locks are active it won't work)" },
   { 
"SetProperty",                true,   "Sets a window property for the current window (key,value)" },
+  { 
"Weather.Refresh",            true,   "Forces a weather refresh" },
 
#ifdef HAS_LIRC
   
"LIRC.Stop",                  false,  "Removes XBMC as LIRC client" },
   { 
"LIRC.Start",                 false,  "Adds XBMC as LIRC client" },
@@ -
3392,+3394,11 @@
         
window->SetProperty(params[0],params[1]);
     }
   }
+  else if (
execute.Equals("weather.refresh"))
+  {
+    
//g_weatherManager.SetArea(m_iCurWeather);
+    g_weatherManager.Refresh();
+  }
 
#ifdef HAS_LIRC
   
else if (execute.Equals("lirc.stop"))
   { 
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
Was there any progress with this? Ideally, I'd be wanting to change the locations and refresh via a dialog spawned from the Home page. Should I add it to Trac otherwise?
Reply
#6
Add it to trac, yes - it will surely be lost otherwise Wink

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
MyWeather.xml as dialog?0