Saturday, August 16, 2008

Windows Live Writer

I finally got it set up. A big Fuck(*) You Very Much goes out to whomever wrote the automatic configuration part. Use the damn default web browser to go get your pages, not Internet Explorer! Why would you hard code it to use Explorer? My explorer is configured to only work when I am connected to the VPN and hen only for internal addresses! I had to go change the proxy configuration (after I worked out why it wouldn't work)... Now I just wonder if other parts of Live Writer do this and get upset every time I reboot and reset the proxy configuration? Stupid.

Anyway, looks nice enough.

Where do the drafts go? ... Only local looks like for Blogger, the publish draft is greyed out.

Apparently, by installing a little code snippet (... painless) one can post neat looking code samples:

   1: <controls:PathDuplicator>
   2:     <controls:PathDuplicator.ItemStyle>
   3:         <Style TargetType="controls:Item">
   4:             <Setter Property="Template">
   5:                 <Setter.Value>
   6:                     <ControlTemplate TargetType="controls:Item">
   7:                         <Grid x:Name="RootElement" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" RenderTransformOrigin="0.8,0.8">
   8:                             <Path Margin="18,9.36900043487549,37.2080001831055,27.5090007781982" Data="M50,14 C42.942787,12.875842 37.481071,3.0378544 31,16 C29.399416,19.201166 27,22.378658 27,26 C27,31.253759 25.183334,31 34,31 C35.521332,26.436005 38.284637,24.241812 43,21 C49.555965,16.492775 47.970417,15.455626 55,26 C63.315838,38.473759 64.010223,47.474442 57,65 C55.737644,68.155891 49.410244,76.01281 43,68 C37.249264,60.811581 38.936535,57.9706 36,50 C34.534855,46.023182 28.36919,45.217796 23,51 C17.748837,56.655098 20.123365,57.791729 18,65" Fill="#00FFFFFF" Stretch="Fill" Stroke="#FF000000"  RenderTransformOrigin="0.8,0.8"/>
   9:                         </Grid>
  10:                     </ControlTemplate>
  11:                 </Setter.Value>
  12:             </Setter>
  13:         </Style>
  14:     </controls:PathDuplicator.ItemStyle>
  15: </controls:PathDuplicator>

Hrm. How does one modify the styleses? I guess if I go put them in the configuration of the blog that is easy enough. Would be nice to see the actual styles in the plugin though. Nevermind! Also, the view HTML thingy in the plugin does not show the correct html if you select not to embed the styles, it still shows only the html with the styles embedded. Also also, why not define the styles inline as actual styles rather than setting the style property of each element... just saying.

After stylish modification:

   1: public override void OnApplyTemplate() {
   2:     base.OnApplyTemplate();
   3:  
   4:     RootElement = (Panel)GetTemplateChild("RootElement");
   5:  
   6:     // Just make some transformation adjustments
   7:     for(int i = 0; i < 10; i++) {
   8:         Item item = new Item();
   9:  
  10:         #region Silly Stuff
  11:         item.Style = ItemStyle;
  12:         item.Angle = 10 * i;
  13:         #endregion
  14:  
  15:         RootElement.Children.Add(item);
  16:     }
  17: }

Well, wow. Now if only I could get Studio to do alternate line colouring... Can you do that? :) I guess I would also like to see the plugin support more of the Studio display items. But it looks pretty close to how it looks with my settings.

I guess I just need to find out when it uses each of the styles... and go create the styles for each type of code snippet...

Joy!

(*) Fuck is not in the dictionary... well now it fucking(**) is!

(**) So is that :)

[Edit] Not joy! Unjoy! What is with the 3 line spacing in the code samples?! Grumble... In fact, what is with the massive amounts of extra space all over the place. Grr.

[Edit] Fixed spacing. WLW editing still a bit dodgy, but it is easily fixable in the source edit view. Can't way that I could recommend it to anyone that does not know html – i.e. 90% of people who want to blog and would love a real WYSIMYG editor... Mind you those kind of people probably would not really care about how their markup looks - which incidentally makes it all the more vital to help them produce good markup.

2 comments:

  1. Ah yes the random spaces... Heh. Luckily its only hit me a couple of times (or it would be "bye bye Live Writer"), but damn, had to resort to cleaning up the html by hand, unpleasant. Umm, you can't post drafts to your blog? I can...

    ReplyDelete
  2. Seems like posting a draft from Live Writer just posts the local draft... Spaces suck! I can't really see why they are there either... too many other things to do!

    ReplyDelete