News Plugin (Rss, Atom) (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #11
    I already modified the skins heavily (not committed/pushed, wip) - maybe you can copy to the Reflexion subfolder and modify there so we don't collide ;)
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Ok in this case I will wait until you finished your changes, otherwise we do changes twice. Good work, I really like it!!!
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    For testing purposes I changed the language (region) within MP2 to English (USA).
    It would be nice to have localized date and the time for the news items.
    View attachment 112730 View attachment 112731
    offbyone, when formatting a date to correct culture, you must use the ILocalization service, like done in the WorldWeatherOnline grabber:
    Code:
          CultureInfo currentCulture = ServiceRegistration.Get<ILocalization>().CurrentCulture;
            DateTimeFormatInfo dateFormat = currentCulture.DateTimeFormat;
              // Attention: CurrentThread.Culture / UICulture are NOT set to ILocalization.Culture, so ILocalization.Culture
              // has to be used explicitly here for formatting date correctly.
              string fomattedDate = date.ToString(dateFormat.ShortDatePattern, dateFormat);
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #14
    I could write another Converter to do so, but I think we should incorporate that code into the:
    MediaPortal.UI.SkinEngine.MpfElements.Converters.DateFormatConverter implementation - as it is in the core and will be used by all skinners.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    strange, it already takes the culture as argument: "CultureInfo culture"

    So it should work already. Maybe @Albert can check this?

    edit:
    The converter is used by BindingDependency, line 125:
    protected bool Convert(object val, Type targetType, out object result)
    {
    if (_valueConverter != null)
    return _valueConverter.Convert(val, targetType, _converterParameter, CultureInfo.InvariantCulture, out result);
    return TypeConverter.Convert(val, targetType, out result);
    }

    Is this right, or should the localization culture be used here?
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #16
    I debugged it, the culture parameter always gets passed: CultureInfo.InvariantCulture.
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #17
    Latest Changes Pushed, attached binaries in first post updated.

    Reflexion skin now has a menu item image and the skin should look fine in default and Reflexion skin. I moved some numbers as ResourceWrappers.
    @morpheus_xx feel free to improve the xamls ;)
     

    Spragleknas

    Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    @offbyone: It said somethings like ""This file came from another computer and might be blocked to help protect this computer" - so I cleared it.

    Entered MP2.
    - Hit news >> Blank screen'
    - Went "home" - hit news again >> Everything works as expected. (Although Reflexion skin meeses it up a bit, like chef said).



     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I think both things are resolved already in last build: Reflexion style is good, while updating there is now a message.

    @offbyone, @Albert: I tried to fix the DateConverter issue, that it does not care about the current selected UI culture. Please check this branch, it's based on NewsPlugin branch and contains my fix.
    https://github.com/MediaPortal/MediaPortal-2/tree/BUG_DateConverter_Culture
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I've tweaked the styles a bit and hope this is ok for you.

    I added some screenshots in the first post that show Reflexion skin with a new background around each content section. This new border is used in any screen now, the change is done in dev branch already. (Screenshots show a merge build between NewsPlugin + dev)
     

    Users who are viewing this thread

    Top Bottom