aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guilib/Key.h1
-rw-r--r--skin/Confluence/720p/DialogAddonInfo.xml1123
-rw-r--r--xbmc/Application.cpp3
-rw-r--r--xbmc/FileSystem/AddonsDirectory.cpp6
-rw-r--r--xbmc/GUIDialogAddonInfo.cpp176
-rw-r--r--xbmc/GUIDialogAddonInfo.h46
-rw-r--r--xbmc/GUIWindowAddonBrowser.cpp81
-rw-r--r--xbmc/Makefile.in1
8 files changed, 1371 insertions, 66 deletions
diff --git a/guilib/Key.h b/guilib/Key.h
index 7e989e0289..4ef60ff759 100644
--- a/guilib/Key.h
+++ b/guilib/Key.h
@@ -358,6 +358,7 @@
#define WINDOW_DIALOG_KARAOKE_SONGSELECT 10143
#define WINDOW_DIALOG_KARAOKE_SELECTOR 10144
#define WINDOW_DIALOG_SLIDER 10145
+#define WINDOW_DIALOG_ADDON_INFO 10146
#define WINDOW_MUSIC_PLAYLIST 10500
#define WINDOW_MUSIC_FILES 10501
diff --git a/skin/Confluence/720p/DialogAddonInfo.xml b/skin/Confluence/720p/DialogAddonInfo.xml
new file mode 100644
index 0000000000..47adb611ba
--- /dev/null
+++ b/skin/Confluence/720p/DialogAddonInfo.xml
@@ -0,0 +1,1123 @@
+<window id="146">
+ <defaultcontrol always="true">5</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control type="group">
+ <visible>!Window.IsVisible(FileBrowser)</visible>
+ <animation effect="slide" start="1100,0" end="0,0" time="400" tween="quadratic" easing="out">WindowOpen</animation>
+ <animation effect="slide" start="0,0" end="1100,0" time="400" tween="quadratic" easing="out">WindowClose</animation>
+ <control type="image">
+ <posx>180</posx>
+ <posy>0</posy>
+ <width>1100</width>
+ <height>720</height>
+ <texture border="15,0,0,0" flipx="true">MediaBladeSub.png</texture>
+ </control>
+ <control type="button">
+ <description>Close Window button</description>
+ <posx>230</posx>
+ <posy>0</posy>
+ <width>64</width>
+ <height>32</height>
+ <label>-</label>
+ <font>-</font>
+ <onclick>PreviousMenu</onclick>
+ <texturefocus>DialogCloseButton-focus.png</texturefocus>
+ <texturenofocus>DialogCloseButton.png</texturenofocus>
+ <onleft>9000</onleft>
+ <onright>9000</onright>
+ <onup>9000</onup>
+ <ondown>9000</ondown>
+ <visible>system.getbool(input.enablemouse)</visible>
+ </control>
+ <control type="group">
+ <animation effect="fade" delay="400" start="0" end="100" time="200">WindowOpen</animation>
+ <animation effect="fade" start="100" end="0" time="200">WindowClose</animation>
+ <control type="label">
+ <description>header label</description>
+ <posx>210</posx>
+ <posy>50</posy>
+ <width>1030</width>
+ <height>30</height>
+ <font>font35_title</font>
+ <label>$INFO[Listitem.Title]</label>
+ <align>center</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <shadowcolor>black</shadowcolor>
+ </control>
+ <control type="grouplist">
+ <description>Media Codec Flagging Images</description>
+ <posx>210</posx>
+ <posy>480</posy>
+ <width>600</width>
+ <align>left</align>
+ <itemgap>0</itemgap>
+ <orientation>horizontal</orientation>
+ <include>VisibleFadeEffect</include>
+ <visible>!Control.IsVisible(50) + [Container.Content(Movies) | Container.Content(Episodes) | Container.Content(MusicVideos)]</visible>
+ <include>VideoCodecFlaggingConditions</include>
+ <include>AudioCodecFlaggingConditions</include>
+ <include>AspectCodecFlaggingConditions</include>
+ </control>
+ <control type="group">
+ <visible>Control.HasFocus(12)</visible>
+ <posy>90</posy>
+ <posx>387</posx>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <description>Current Fanart image</description>
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>675</width>
+ <height>380</height>
+ <texture background="true">$INFO[ListItem.Property(Fanart_Image)]</texture>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <aspectratio>keep</aspectratio>
+ <visible>!IsEmpty(Listitem.Property(Fanart_Image))</visible>
+ </control>
+ <control type="group">
+ <visible>IsEmpty(Listitem.Property(Fanart_Image))</visible>
+ <control type="image">
+ <description>No Fanart Back</description>
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>675</width>
+ <height>380</height>
+ <texture>Fanart_Fallback_Small.jpg</texture>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <aspectratio>stretch</aspectratio>
+ <colordiffuse>99FFFFFF</colordiffuse>
+ </control>
+ <control type="label">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>675</width>
+ <height>380</height>
+ <font>font30_title</font>
+ <textcolor>white</textcolor>
+ <shadowcolor>black</shadowcolor>
+ <align>center</align>
+ <aligny>center</aligny>
+ <label>31311</label>
+ </control>
+ </control>
+ </control>
+ <control type="group">
+ <posy>90</posy>
+ <posx>387</posx>
+ <visible>Control.HasFocus(15)</visible>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <description>Border</description>
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>675</width>
+ <height>380</height>
+ <texture border="5">button-nofocus.png</texture>
+ </control>
+ <control type="image">
+ <description>background</description>
+ <posx>5</posx>
+ <posy>5</posy>
+ <width>665</width>
+ <height>370</height>
+ <texture>black-back.png</texture>
+ </control>
+ <control type="label">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>675</width>
+ <height>380</height>
+ <font>font30_title</font>
+ <textcolor>grey2</textcolor>
+ <shadowcolor>black</shadowcolor>
+ <align>center</align>
+ <aligny>center</aligny>
+ <label>31330</label>
+ <visible>!Player.HasVideo</visible>
+ </control>
+ <control type="videowindow">
+ <description>No Fanart Back</description>
+ <posx>5</posx>
+ <posy>5</posy>
+ <width>665</width>
+ <height>370</height>
+ <visible>Player.HasVideo</visible>
+ </control>
+ </control>
+ <control type="group">
+ <visible>[!container.content(tvshows) + !container.content(episodes) + !container.content(musicvideos)] + ![Control.HasFocus(12) | Control.HasFocus(15)]</visible>
+ <posy>90</posy>
+ <posx>210</posx>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>270</width>
+ <height>380</height>
+ <aspectratio>stretch</aspectratio>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <texture background="true">$INFO[ListItem.Icon]</texture>
+ </control>
+ <control type="image">
+ <posx>4</posx>
+ <posy>4</posy>
+ <width>200</width>
+ <height>230</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>GlassOverlay.png</texture>
+ <colordiffuse>AAFFFFFF</colordiffuse>
+ </control>
+ <control type="list" id="49">
+ <posx>290</posx>
+ <posy>20</posy>
+ <width>740</width>
+ <height>330</height>
+ <onleft>49</onleft>
+ <onright>49</onright>
+ <onup>9000</onup>
+ <ondown>61</ondown>
+ <pagecontrol>-</pagecontrol>
+ <scrolltime>200</scrolltime>
+ <itemlayout height="30">
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>565</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </itemlayout>
+ <focusedlayout height="30">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>740</width>
+ <height>30</height>
+ <visible>Control.HasFocus(49)</visible>
+ <texture>MenuItemFO.png</texture>
+ <include>VisibleFadeEffect</include>
+ </control>
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>565</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </focusedlayout>
+ <content>
+ <item>
+ <label>$LOCALIZE[20339]:</label>
+ <label2>$INFO[ListItem.Director]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Director)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20417]:</label>
+ <label2>$INFO[ListItem.Writer]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Writer)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[572]:</label>
+ <label2>$INFO[ListItem.Studio]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Studio)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[515]:</label>
+ <label2>$INFO[ListItem.Genre]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Genre)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[562]:</label>
+ <label2>$INFO[ListItem.Year]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Year)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[2050]:</label>
+ <label2>$INFO[ListItem.Duration]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Duration)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[563]:</label>
+ <label2>$INFO[ListItem.RatingAndVotes]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.RatingAndVotes)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[202]:</label>
+ <label2>$INFO[ListItem.TagLine]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.TagLine)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[203]:</label>
+ <label2>$INFO[ListItem.PlotOutline]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.PlotOutline)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20074]:</label>
+ <label2>$INFO[ListItem.mpaa]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.mpaa)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[15311]</label>
+ <label2>$INFO[ListItem.FilenameAndPath]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.FilenameAndPath)</visible>
+ </item>
+ </content>
+ </control>
+ <control type="image">
+ <posx>290</posx>
+ <posy>370</posy>
+ <width>740</width>
+ <height>4</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>separator.png</texture>
+ </control>
+ </control>
+ <control type="group">
+ <visible>[Container.Content(TVShows) + !Skin.HasSetting(TVShowsUsePosters)] + !Control.HasFocus(12)</visible>
+ <posy>90</posy>
+ <posx>210</posx>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <posx>177</posx>
+ <posy>10</posy>
+ <width>675</width>
+ <height>124</height>
+ <aspectratio>stretch</aspectratio>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <texture background="true">$INFO[ListItem.Icon]</texture>
+ </control>
+ <control type="image">
+ <posx>177</posx>
+ <posy>10</posy>
+ <width>400</width>
+ <height>100</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>GlassOverlay.png</texture>
+ <colordiffuse>AAFFFFFF</colordiffuse>
+ </control>
+ <control type="list" id="49">
+ <posx>95</posx>
+ <posy>160</posy>
+ <width>840</width>
+ <height>180</height>
+ <onleft>49</onleft>
+ <onright>49</onright>
+ <onup>9000</onup>
+ <ondown>61</ondown>
+ <pagecontrol>-</pagecontrol>
+ <scrolltime>200</scrolltime>
+ <itemlayout height="30">
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>665</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </itemlayout>
+ <focusedlayout height="30">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>840</width>
+ <height>30</height>
+ <visible>Control.HasFocus(49)</visible>
+ <texture>MenuItemFO.png</texture>
+ <include>VisibleFadeEffect</include>
+ </control>
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>665</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </focusedlayout>
+ <content>
+ <item>
+ <label>$LOCALIZE[20360]:</label>
+ <label2>$INFO[listitem.episode] [COLOR=grey] ($INFO[ListItem.Property(WatchedEpisodes),, $LOCALIZE[16102]] - $INFO[ListItem.Property(UnWatchedEpisodes), , $LOCALIZE[16101]])[/COLOR]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Episode)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20416]:</label>
+ <label2>$INFO[ListItem.Premiered]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Premiered)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[515]:</label>
+ <label2>$INFO[ListItem.Genre]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Genre)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[562]:</label>
+ <label2>$INFO[ListItem.Year]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Year)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[563]:</label>
+ <label2>$INFO[ListItem.Rating]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Rating)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[15311]</label>
+ <label2>$INFO[ListItem.FilenameAndPath]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.FilenameAndPath)</visible>
+ </item>
+ </content>
+ </control>
+ <control type="image">
+ <posx>0</posx>
+ <posy>370</posy>
+ <width>1030</width>
+ <height>4</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>separator.png</texture>
+ </control>
+ </control>
+ <control type="group">
+ <visible>[Container.Content(TVShows) + Skin.HasSetting(TVShowsUsePosters)] + !Control.HasFocus(12)</visible>
+ <posy>90</posy>
+ <posx>210</posx>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>270</width>
+ <height>380</height>
+ <aspectratio>stretch</aspectratio>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <texture background="true">$INFO[ListItem.Icon]</texture>
+ </control>
+ <control type="image">
+ <posx>4</posx>
+ <posy>4</posy>
+ <width>200</width>
+ <height>230</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>GlassOverlay.png</texture>
+ <colordiffuse>AAFFFFFF</colordiffuse>
+ </control>
+ <control type="list" id="49">
+ <posx>290</posx>
+ <posy>20</posy>
+ <width>740</width>
+ <height>330</height>
+ <onleft>49</onleft>
+ <onright>49</onright>
+ <onup>9000</onup>
+ <ondown>61</ondown>
+ <pagecontrol>-</pagecontrol>
+ <scrolltime>200</scrolltime>
+ <itemlayout height="30">
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>565</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </itemlayout>
+ <focusedlayout height="30">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>740</width>
+ <height>30</height>
+ <visible>Control.HasFocus(49)</visible>
+ <texture>MenuItemFO.png</texture>
+ <include>VisibleFadeEffect</include>
+ </control>
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>565</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </focusedlayout>
+ <content>
+ <item>
+ <label>$LOCALIZE[20360]:</label>
+ <label2>$INFO[listitem.episode] [COLOR=grey] ($INFO[ListItem.Property(WatchedEpisodes),, $LOCALIZE[16102]] - $INFO[ListItem.Property(UnWatchedEpisodes), , $LOCALIZE[16101]])[/COLOR]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Episode)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20416]:</label>
+ <label2>$INFO[ListItem.Premiered]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Premiered)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[515]:</label>
+ <label2>$INFO[ListItem.Genre]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Genre)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[562]:</label>
+ <label2>$INFO[ListItem.Year]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Year)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[563]:</label>
+ <label2>$INFO[ListItem.Rating]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Rating)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[15311]</label>
+ <label2>$INFO[ListItem.FilenameAndPath]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.FilenameAndPath)</visible>
+ </item>
+ </content>
+ </control>
+ <control type="image">
+ <posx>290</posx>
+ <posy>370</posy>
+ <width>740</width>
+ <height>4</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>separator.png</texture>
+ </control>
+ </control>
+ <control type="group">
+ <visible>container.content(episodes) + !Control.HasFocus(12)</visible>
+ <posy>90</posy>
+ <posx>210</posx>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>380</width>
+ <height>250</height>
+ <aspectratio aligny="bottom">keep</aspectratio>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <texture background="true">$INFO[ListItem.Icon]</texture>
+ </control>
+ <control type="image">
+ <posx>0</posx>
+ <posy>250</posy>
+ <width>380</width>
+ <height>250</height>
+ <aspectratio aligny="top">keep</aspectratio>
+ <bordertexture border="5" flipy="true" diffuse="diffuse_mirror2.png">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <texture background="true" flipy="true" diffuse="diffuse_mirror2.png">$INFO[ListItem.Icon]</texture>
+ </control>
+ <control type="list" id="49">
+ <posx>390</posx>
+ <posy>20</posy>
+ <width>640</width>
+ <height>330</height>
+ <onleft>49</onleft>
+ <onright>49</onright>
+ <onup>9000</onup>
+ <ondown>61</ondown>
+ <pagecontrol>-</pagecontrol>
+ <scrolltime>200</scrolltime>
+ <itemlayout height="30">
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>465</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </itemlayout>
+ <focusedlayout height="30">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>640</width>
+ <height>30</height>
+ <visible>Control.HasFocus(49)</visible>
+ <texture>MenuItemFO.png</texture>
+ <include>VisibleFadeEffect</include>
+ </control>
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>465</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </focusedlayout>
+ <content>
+ <item>
+ <label>$LOCALIZE[20364]:</label>
+ <label2>$INFO[ListItem.TVShowTitle]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.TVShowTitle)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20373]:</label>
+ <label2>$INFO[ListItem.Season]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Season)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20359]:</label>
+ <label2>$INFO[ListItem.Episode]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Episode)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20416]:</label>
+ <label2>$INFO[ListItem.Premiered]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Premiered)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[515]:</label>
+ <label2>$INFO[ListItem.Genre]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Genre)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20339]:</label>
+ <label2>$INFO[ListItem.Director]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Director)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20417]:</label>
+ <label2>$INFO[ListItem.Writer]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Writer)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[562]:</label>
+ <label2>$INFO[ListItem.Year]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Year)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[2050]:</label>
+ <label2>$INFO[ListItem.Duration]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Duration)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[563]:</label>
+ <label2>$INFO[ListItem.Rating]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Rating)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[15311]</label>
+ <label2>$INFO[ListItem.FilenameAndPath]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.FilenameAndPath)</visible>
+ </item>
+ </content>
+ </control>
+ <control type="image">
+ <posx>290</posx>
+ <posy>370</posy>
+ <width>740</width>
+ <height>4</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>separator.png</texture>
+ </control>
+ </control>
+ <control type="group">
+ <visible>container.content(musicvideos) + !Control.HasFocus(12)</visible>
+ <posy>90</posy>
+ <posx>210</posx>
+ <include>VisibleFadeEffect</include>
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>380</width>
+ <height>360</height>
+ <aspectratio>keep</aspectratio>
+ <bordertexture border="5">button-nofocus.png</bordertexture>
+ <bordersize>4</bordersize>
+ <texture background="true">$INFO[ListItem.Icon]</texture>
+ </control>
+ <control type="list" id="49">
+ <posx>390</posx>
+ <posy>20</posy>
+ <width>640</width>
+ <height>330</height>
+ <onleft>49</onleft>
+ <onright>49</onright>
+ <onup>9000</onup>
+ <ondown>61</ondown>
+ <pagecontrol>-</pagecontrol>
+ <scrolltime>200</scrolltime>
+ <itemlayout height="30">
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>465</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </itemlayout>
+ <focusedlayout height="30">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>640</width>
+ <height>30</height>
+ <visible>Control.HasFocus(49)</visible>
+ <texture>MenuItemFO.png</texture>
+ <include>VisibleFadeEffect</include>
+ </control>
+ <control type="label">
+ <posx>165</posx>
+ <posy>0</posy>
+ <width>160</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <align>right</align>
+ <aligny>center</aligny>
+ <textcolor>blue</textcolor>
+ <selectedcolor>selected</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ <control type="label">
+ <posx>175</posx>
+ <posy>0</posy>
+ <width>465</width>
+ <height>30</height>
+ <font>font13</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <textcolor>white</textcolor>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label2</info>
+ </control>
+ </focusedlayout>
+ <content>
+ <item>
+ <label>$LOCALIZE[557]:</label>
+ <label2>$INFO[ListItem.Artist]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Artist)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[558]:</label>
+ <label2>$INFO[ListItem.Album]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Album)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[515]:</label>
+ <label2>$INFO[ListItem.Genre]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Genre)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[572]:</label>
+ <label2>$INFO[ListItem.Studio]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Studio)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[20417]:</label>
+ <label2>$INFO[ListItem.Writer]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Writer)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[562]:</label>
+ <label2>$INFO[ListItem.Year]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Year)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[2050]:</label>
+ <label2>$INFO[ListItem.Duration]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.Duration)</visible>
+ </item>
+ <item>
+ <label>$LOCALIZE[15311]</label>
+ <label2>$INFO[ListItem.FilenameAndPath]</label2>
+ <onclick>-</onclick>
+ <visible>!IsEmpty(ListItem.FilenameAndPath)</visible>
+ </item>
+ </content>
+ </control>
+ <control type="image">
+ <posx>390</posx>
+ <posy>370</posy>
+ <width>640</width>
+ <height>4</height>
+ <aspectratio>stretch</aspectratio>
+ <texture>separator.png</texture>
+ </control>
+ </control>
+ <control type="label">
+ <posx>130r</posx>
+ <posy>480</posy>
+ <width>400</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <textcolor>grey2</textcolor>
+ <shadowcolor>black</shadowcolor>
+ <scroll>true</scroll>
+ <align>right</align>
+ <aligny>center</aligny>
+ <label>[COLOR=blue]$LOCALIZE[207][/COLOR]$INFO[Container(400).CurrentPage, ( $LOCALIZE[31024] ]$INFO[Container(400).NumPages,/, )]</label>
+ <visible>Control.IsVisible(400)</visible>
+ </control>
+ <control type="label">
+ <posx>130r</posx>
+ <posy>480</posy>
+ <width>400</width>
+ <height>30</height>
+ <font>font13_title</font>
+ <textcolor>grey2</textcolor>
+ <shadowcolor>black</shadowcolor>
+ <scroll>true</scroll>
+ <align>right</align>
+ <aligny>center</aligny>
+ <label>[COLOR=blue]$LOCALIZE[206][/COLOR]$INFO[Container(50).CurrentPage, ( $LOCALIZE[31024] ]$INFO[Container(50).NumPages,/, )]</label>
+ <visible>Control.IsVisible(50)</visible>
+ </control>
+ <control type="spincontrol" id="61">
+ <description>Next page button</description>
+ <posx>120r</posx>
+ <posy>485</posy>
+ <subtype>page</subtype>
+ <font>-</font>
+ <onleft>61</onleft>
+ <onright>61</onright>
+ <ondown>9000</ondown>
+ <onup>49</onup>
+ <textcolor>-</textcolor>
+ <showonepage>true</showonepage>
+ </control>
+ <control type="textbox" id="400">
+ <description>Description Value for Movies</description>
+ <posx>210</posx>
+ <posy>515</posy>
+ <width>1030</width>
+ <height>120</height>
+ <font>font12</font>
+ <align>justify</align>
+ <textcolor>white</textcolor>
+ <pagecontrol>61</pagecontrol>
+ <label>$INFO[ListItem.Plot]</label>
+ <autoscroll time="3000" delay="4000" repeat="5000">!Control.HasFocus(61) + Skin.HasSetting(AutoScroll)</autoscroll>
+ <visible>!Control.IsVisible(50)</visible>
+ </control>
+ <control type="image">
+ <description>Actor image</description>
+ <posx>210</posx>
+ <posy>480</posy>
+ <width>160</width>
+ <height>160</height>
+ <texture>$INFO[Container(50).Listitem.Icon]</texture>
+ <aspectratio>keep</aspectratio>
+ <visible>Control.IsVisible(50)</visible>
+ </control>
+ <control type="panel" id="50">
+ <posx>380</posx>
+ <posy>520</posy>
+ <width>860</width>
+ <height>120</height>
+ <onleft>9000</onleft>
+ <onright>61</onright>
+ <onup>61</onup>
+ <ondown>9000</ondown>
+ <viewtype label="">list</viewtype>
+ <pagecontrol>61</pagecontrol>
+ <scrolltime>200</scrolltime>
+ <orientation>vertical</orientation>
+ <itemlayout height="40" width="430">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>430</width>
+ <height>40</height>
+ <texture border="5">button-nofocus.png</texture>
+ </control>
+ <control type="label">
+ <posx>10</posx>
+ <posy>0</posy>
+ <width>410</width>
+ <height>40</height>
+ <font>font12</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ </itemlayout>
+ <focusedlayout height="40" width="430">
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>430</width>
+ <height>40</height>
+ <visible>!Control.HasFocus(50)</visible>
+ <texture border="5">button-nofocus.png</texture>
+ </control>
+ <control type="image">
+ <posx>0</posx>
+ <posy>0</posy>
+ <width>430</width>
+ <height>40</height>
+ <visible>Control.HasFocus(50)</visible>
+ <texture border="5">button-focus.png</texture>
+ </control>
+ <control type="label">
+ <posx>10</posx>
+ <posy>0</posy>
+ <width>410</width>
+ <height>40</height>
+ <font>font12</font>
+ <align>left</align>
+ <aligny>center</aligny>
+ <selectedcolor>white</selectedcolor>
+ <info>ListItem.Label</info>
+ </control>
+ </focusedlayout>
+ </control>
+ <control type="grouplist" id="9000">
+ <posx>210</posx>
+ <posy>660</posy>
+ <width>1030</width>
+ <height>40</height>
+ <itemgap>2</itemgap>
+ <align>center</align>
+ <orientation>horizontal</orientation>
+ <onleft>9000</onleft>
+ <onright>9000</onright>
+ <onup>50</onup>
+ <ondown>49</ondown>
+ <control type="button" id="5">
+ <description>Cast/Review</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>206</label>
+ </control>
+ <control type="togglebutton" id="6">
+ <description>Play/browse to Show</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>24022</label>
+ <alttexturefocus border="2">button-focus.png</alttexturefocus>
+ <alttexturenofocus border="2">button-nofocus.png</alttexturenofocus>
+ <altlabel>1024</altlabel>
+ <usealttexture>Container.Content(TVShows)</usealttexture>
+ </control>
+ <control type="button" id="7">
+ <description>Refresh</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>24021</label>
+ </control>
+ <control type="button" id="8">
+ <description>Get Thumb</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>24069</label>
+ </control>
+ <control type="button" id="9">
+ <description>Get Fanart</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>5</label>
+ </control>
+ <control type="button" id="11">
+ <description>Play Trailer</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>20410</label>
+ <visible>!IsEmpty(ListItem.Trailer) + !Skin.HasSetting(WindowedTrailer)</visible>
+ </control>
+ <control type="button" id="15">
+ <description>Play Trailer Windowed</description>
+ <include>ButtonInfoDialogsCommonValues</include>
+ <label>20410</label>
+ <onclick>PlayMedia($INFO[ListItem.Trailer],1)</onclick>
+ <visible>!IsEmpty(ListItem.Trailer) + Skin.HasSetting(WindowedTrailer)</visible>
+ </control>
+ </control>
+ </control>
+ </control>
+ <include>SideBladeRight</include>
+ <include>Clock</include>
+ </controls>
+</window>
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 2c9de7e504..1f05ea6700 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -212,6 +212,7 @@
#include "GUIDialogSmartPlaylistRule.h"
#include "GUIDialogPictureInfo.h"
#include "GUIDialogAddonSettings.h"
+#include "GUIDialogAddonInfo.h"
#ifdef HAS_LINUX_NETWORK
#include "GUIDialogAccessPoints.h"
#endif
@@ -1078,6 +1079,7 @@ bool CApplication::Initialize()
g_windowManager.Add(new CGUIDialogSmartPlaylistRule); // window id = 137
g_windowManager.Add(new CGUIDialogBusy); // window id = 138
g_windowManager.Add(new CGUIDialogPictureInfo); // window id = 139
+ g_windowManager.Add(new CGUIDialogAddonInfo);
g_windowManager.Add(new CGUIDialogAddonSettings); // window id = 140
#ifdef HAS_LINUX_NETWORK
g_windowManager.Add(new CGUIDialogAccessPoints); // window id = 141
@@ -3093,6 +3095,7 @@ bool CApplication::Cleanup()
g_windowManager.Delete(WINDOW_DIALOG_SMART_PLAYLIST_RULE);
g_windowManager.Delete(WINDOW_DIALOG_BUSY);
g_windowManager.Delete(WINDOW_DIALOG_PICTURE_INFO);
+ g_windowManager.Delete(WINDOW_DIALOG_ADDON_INFO);
g_windowManager.Delete(WINDOW_DIALOG_ADDON_SETTINGS);
g_windowManager.Delete(WINDOW_DIALOG_ACCESS_POINTS);
g_windowManager.Delete(WINDOW_DIALOG_SLIDER);
diff --git a/xbmc/FileSystem/AddonsDirectory.cpp b/xbmc/FileSystem/AddonsDirectory.cpp
index aa1beae1a1..50a164670d 100644
--- a/xbmc/FileSystem/AddonsDirectory.cpp
+++ b/xbmc/FileSystem/AddonsDirectory.cpp
@@ -125,7 +125,10 @@ bool CAddonsDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
AddonPtr addon2;
database.GetAddon(items[i]->GetProperty("Addon.ID"),addon2);
if (addon2 && addon2->Version() > AddonVersion(items[i]->GetProperty("Addon.Version")))
+ {
items[i]->SetProperty("Addon.Status",g_localizeStrings.Get(24068));
+ items[i]->SetProperty("Addon.UpdateAvail","true");
+ }
}
}
if (path.GetHostName().Equals("repos"))
@@ -161,7 +164,10 @@ void CAddonsDirectory::GenerateListing(CURL &path, VECADDONS& addons, CFileItemL
if (CAddonMgr::Get()->GetAddon(addon->ID(),addon2))
pItem->SetProperty("Addon.Status",g_localizeStrings.Get(305));
if (addon2 && addon2->Version() < addon->Version())
+ {
pItem->SetProperty("Addon.Status",g_localizeStrings.Get(24068));
+ pItem->SetProperty("Addon.UpdateAvail","true");
+ }
items.Add(pItem);
}
}
diff --git a/xbmc/GUIDialogAddonInfo.cpp b/xbmc/GUIDialogAddonInfo.cpp
new file mode 100644
index 0000000000..c89530bb34
--- /dev/null
+++ b/xbmc/GUIDialogAddonInfo.cpp
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2005-2008 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "GUIDialogAddonInfo.h"
+
+#include "addons/AddonManager.h"
+#include "AddonDatabase.h"
+#include "FileItem.h"
+#include "GUIDialogAddonSettings.h"
+#include "GUIWindowAddonBrowser.h"
+#include "GUIWindowManager.h"
+#include "URL.h"
+#include "utils/JobManager.h"
+#include "utils/FileOperationJob.h"
+
+#define CONTROL_BTN_INSTALL 6
+#define CONTROL_BTN_DISABLE 7
+#define CONTROL_BTN_UPDATE 8
+#define CONTROL_BTN_SETTINGS 9
+
+using namespace std;
+using namespace ADDON;
+
+CGUIDialogAddonInfo::CGUIDialogAddonInfo(void)
+ : CGUIDialog(WINDOW_DIALOG_ADDON_INFO, "DialogAddonInfo.xml")
+{
+}
+
+CGUIDialogAddonInfo::~CGUIDialogAddonInfo(void)
+{
+}
+
+bool CGUIDialogAddonInfo::OnMessage(CGUIMessage& message)
+{
+ switch ( message.GetMessage() )
+ {
+ case GUI_MSG_WINDOW_DEINIT:
+ {
+ }
+ break;
+
+ case GUI_MSG_WINDOW_INIT:
+ {
+ CGUIDialog::OnMessage(message);
+
+ CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_UPDATE,
+ m_item->GetProperty("Addon.UpdateAvail").Equals("true"));
+ CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_INSTALL,
+ m_item->GetProperty("Addon.Installed").Equals("false"));
+ CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_DISABLE,
+ m_item->GetProperty("Addon.Installed").Equals("true") &&
+ !m_item->GetProperty("Addon.Path").Mid(0,15).Equals("special://xbmc/"));
+ CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_SETTINGS,
+ m_item->GetProperty("Addon.Installed").Equals("true") &&
+ m_addon->HasSettings());
+
+ return true;
+ }
+ break;
+
+
+ case GUI_MSG_CLICKED:
+ {
+ int iControl = message.GetSenderId();
+ if (iControl == CONTROL_BTN_UPDATE || iControl == CONTROL_BTN_INSTALL)
+ {
+ OnInstall();
+ Close();
+ return true;
+ }
+ else if (iControl == CONTROL_BTN_DISABLE)
+ {
+ OnDisable();
+ Close();
+ return true;
+ }
+ else if (iControl == CONTROL_BTN_SETTINGS)
+ {
+ OnSettings();
+ return true;
+ }
+ }
+ break;
+default:
+ break;
+ }
+
+ return CGUIDialog::OnMessage(message);
+}
+
+void CGUIDialogAddonInfo::OnInstall()
+{
+ CGUIWindowAddonBrowser* window = (CGUIWindowAddonBrowser*)g_windowManager.GetWindow(WINDOW_ADDON_BROWSER);
+ pair<CFileOperationJob*,unsigned int> job = window->AddJob(m_addon->Path());
+ window->RegisterJob(m_addon->ID(),job.first,job.second);
+}
+
+void CGUIDialogAddonInfo::OnDisable()
+{
+ CGUIWindowAddonBrowser* window = (CGUIWindowAddonBrowser*)g_windowManager.GetWindow(WINDOW_ADDON_BROWSER);
+ CFileItemList list;
+ list.Add(CFileItemPtr(new CFileItem(m_addon->Path(),true)));
+ list[0]->Select(true);
+ CJobManager::GetInstance().AddJob(new CFileOperationJob(CFileOperationJob::ActionDelete,list,""),window);
+}
+
+void CGUIDialogAddonInfo::OnSettings()
+{
+ CGUIDialogAddonSettings::ShowAndGetInput(m_addon);
+}
+
+bool CGUIDialogAddonInfo::ShowForItem(CFileItemPtr& item)
+{
+ CGUIDialogAddonInfo* dialog = (CGUIDialogAddonInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_ADDON_INFO);
+ if (!dialog)
+ return false;
+ dialog->m_item = CFileItemPtr(new CFileItem(*item));
+ CURL url(item->m_strPath);
+ if (url.GetHostName().Equals("enabled"))
+ {
+ CAddonMgr::Get()->GetAddon(item->GetProperty("Addon.ID"),dialog->m_addon);
+ dialog->m_item->SetProperty("Addon.Installed","true");
+ }
+ else
+ {
+ if (CAddonMgr::Get()->GetAddon(item->GetProperty("Addon.ID"),
+ dialog->m_addon))
+ dialog->m_item->SetProperty("Addon.Installed","true");
+ else
+ dialog->m_item->SetProperty("Addon.Installed","false");
+ CAddonDatabase database;
+ database.Open();
+ database.GetAddon(item->GetProperty("Addon.ID"),dialog->m_addon);
+ }
+ if (TranslateType(item->GetProperty("Addon.Type")) == ADDON_REPOSITORY)
+ {
+ CAddonDatabase database;
+ database.Open();
+ VECADDONS addons;
+ database.GetRepository(dialog->m_addon->ID(),addons);
+ int tot=0;
+ for (int i = ADDON_UNKNOWN+1;i<ADDON_VIZ_LIBRARY;++i)
+ {
+ int num=0;
+ for (unsigned int j=0;j<addons.size();++j)
+ {
+ if (addons[j]->Type() == (TYPE)i)
+ ++num;
+ }
+ dialog->m_item->SetProperty(CStdString("Repo.")+TranslateType((TYPE)i),num);
+ tot += num;
+ }
+ dialog->m_item->SetProperty("Repo.Addons",tot);
+ }
+ dialog->DoModal();
+ return true;
+}
+
diff --git a/xbmc/GUIDialogAddonInfo.h b/xbmc/GUIDialogAddonInfo.h
new file mode 100644
index 0000000000..18bfc1308c
--- /dev/null
+++ b/xbmc/GUIDialogAddonInfo.h
@@ -0,0 +1,46 @@
+#pragma once
+
+/*
+ * Copyright (C) 2005-2008 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "GUIDialog.h"
+#include "addons/IAddon.h"
+
+class CGUIDialogAddonInfo :
+ public CGUIDialog
+{
+public:
+ CGUIDialogAddonInfo(void);
+ virtual ~CGUIDialogAddonInfo(void);
+ bool OnMessage(CGUIMessage& message);
+
+ virtual CFileItemPtr GetCurrentListItem(int offset = 0) { return m_item; }
+
+ void OnInstall();
+ void OnDisable();
+ void OnSettings();
+
+ static bool ShowForItem(CFileItemPtr& item);
+protected:
+ CFileItemPtr m_item;
+ ADDON::AddonPtr m_addon;
+};
+
diff --git a/xbmc/GUIWindowAddonBrowser.cpp b/xbmc/GUIWindowAddonBrowser.cpp
index 1704bbb1c9..f5bf9f7812 100644
--- a/xbmc/GUIWindowAddonBrowser.cpp
+++ b/xbmc/GUIWindowAddonBrowser.cpp
@@ -22,6 +22,7 @@
#include "GUIWindowAddonBrowser.h"
#include "addons/AddonManager.h"
#include "GUIDialogContextMenu.h"
+#include "GUIDialogAddonInfo.h"
#include "GUIDialogAddonSettings.h"
#include "GUIDialogKeyboard.h"
#include "GUIDialogYesNo.h"
@@ -134,6 +135,18 @@ bool CGUIWindowAddonBrowser::OnMessage(CGUIMessage& message)
g_settings.Save();
return true;
}
+ else if (m_viewControl.HasControl(iControl)) // list/thumb control
+ {
+ // get selected item
+ int iItem = m_viewControl.GetSelectedItem();
+ int iAction = message.GetParam1();
+
+ // iItem is checked for validity inside these routines
+ if (iAction == ACTION_SHOW_INFO)
+ {
+ return OnClick(iItem);
+ }
+ }
}
break;
default:
@@ -208,72 +221,8 @@ bool CGUIWindowAddonBrowser::OnClick(int iItem)
}
return true;
}
- AddonPtr addon;
- bool disable=false;
- bool install=false;
- CStdString path = item->GetProperty("Addon.Path");
- if (CAddonMgr::Get()->GetAddon(item->GetProperty("Addon.ID"),addon))
- {
- // update available
- if (item->GetProperty("Addon.Status").Equals(g_localizeStrings.Get(24068)))
- {
- AddonPtr addon;
- CAddonDatabase database;
- database.Open();
- if (database.GetAddon(item->GetProperty("Addon.ID"),addon))
- {
- bool cancel;
- if (CGUIDialogYesNo::ShowAndGetInput(g_localizeStrings.Get(24000),
- addon->Name(),
- g_localizeStrings.Get(24068),"",
- cancel,
- g_localizeStrings.Get(24069),
- g_localizeStrings.Get(24075)))
- {
- disable = true;
- }
- else
- {
- if (!cancel)
- install = true;
- }
- item->SetProperty("Addon.Path",addon->Path());
- }
- }
- else
- {
- if (!path.Left(22).Equals("special://home/addons/") || path.length() <= 22)
- return false; //TODO - print a message saying that addon is in wrong location and can't be deleted
-
- if (CGUIDialogYesNo::ShowAndGetInput(g_localizeStrings.Get(24000),
- addon->Name(),
- g_localizeStrings.Get(24060),""))
- {
- disable = true;
- }
- }
- }
- else
- {
- if (CGUIDialogYesNo::ShowAndGetInput(g_localizeStrings.Get(24000),
- item->GetProperty("Addon.Name"),
- g_localizeStrings.Get(24059),""))
- {
- install = true;
- }
- }
- if (install)
- {
- pair<CFileOperationJob*,unsigned int> job = AddJob(item->GetProperty("Addon.Path"));
- RegisterJob(item->GetProperty("Addon.ID"),job.first,job.second);
- }
- if (disable)
- {
- CFileItemList list;
- list.Add(CFileItemPtr(new CFileItem(path,true)));
- list[0]->Select(true);
- CJobManager::GetInstance().AddJob(new CFileOperationJob(CFileOperationJob::ActionDelete,list,""),this);
- }
+
+ CGUIDialogAddonInfo::ShowForItem(item);
return true;
}
diff --git a/xbmc/Makefile.in b/xbmc/Makefile.in
index fcc13c4bf4..2f102bef2c 100644
--- a/xbmc/Makefile.in
+++ b/xbmc/Makefile.in
@@ -118,6 +118,7 @@ SRCS=Application.cpp \
Song.cpp \
VideoDatabase.cpp \
ViewDatabase.cpp \
+ GUIDialogAddonInfo.cpp \
GUIDialogAddonSettings.cpp \
GUIDialogAudioSubtitleSettings.cpp \
GUIDialogBoxBase.cpp \