emuikernel / wittytwitter

Automatically exported from code.google.com/p/wittytwitter
1 stars 0 forks source link

toast notification #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
display notification in lower right similarly to IM clients.

- options to make this configurable.

Integrate with [http://www.fullphat.net/ Snarl] idea by
[http://twitter.com/ksmarshall kevin marhsall].

Original issue reported on code.google.com by alan...@gmail.com on 2 Nov 2007 at 1:01

GoogleCodeExporter commented 8 years ago

Original comment by alan...@gmail.com on 2 Nov 2007 at 1:01

GoogleCodeExporter commented 8 years ago

Original comment by scottck...@gmail.com on 29 Nov 2007 at 6:18

GoogleCodeExporter commented 8 years ago
Hey, here's a small patch for Snarl integration.  Drawback to adding it is that 
I had
to set it to compile allowing "unsafe" code for fixed length arrays that Snarl 
is
expecting.  If somebody has stronger Win32-fu than I do, they might know a way 
to get
around that, but that was the only way I could get Snarl to display the messages
correctly.  (Spent all weekend wrestling with it :/ )  Also, another downside 
is that
we're dependent on an outside application for these notifications.  All that 
said, I
think these notifications add significant value to the app.  Let me know what 
you think!

Original comment by bmsulli...@gmail.com on 26 Mar 2008 at 1:48

Attachments:

GoogleCodeExporter commented 8 years ago
I applied the patch to local machine which is running Vista. I'm not seeing the
Snarls. Running in debug mode, SendMessage method does get called but no toast
notification appear.

Original comment by alan...@gmail.com on 26 Mar 2008 at 6:13

GoogleCodeExporter commented 8 years ago
hmmm would users need to download and install Snarl to get the notifications to 
appear?

Original comment by alan...@gmail.com on 26 Mar 2008 at 6:20

GoogleCodeExporter commented 8 years ago
Hmmm, interesting.  Can you confirm for me what version of Snarl you have 
installed?
 I think I'm using the pre-V37 compatible call format, but I could be mistaken.

Original comment by bmsulli...@gmail.com on 26 Mar 2008 at 6:22

GoogleCodeExporter commented 8 years ago
ah that's it, I need to install Snarl. I was hoping that it's encapsulated 
somehow so
taht a separate program install is not necessary.

We might need to do something with WPF due to the Unsafe code and the third 
party
issue. This seems interesting:
http://channel8.msdn.com/Forums/StudentUnion/1281-CodeSnippet-WCFWPF-Making-Snar
lNET/

btw bmsullivan, I added you as a project member. :-)

Original comment by alan...@gmail.com on 26 Mar 2008 at 6:32

GoogleCodeExporter commented 8 years ago
Thanks for the membership add! :-D 

I was actually about to send you that very link!  Do you think the licensing is
permissive enough for us to use that in Witty?

Original comment by bmsulli...@gmail.com on 26 Mar 2008 at 6:35

GoogleCodeExporter commented 8 years ago
I installed whatever version was linked off the Snarl homepage (I think it said 
1.6?)
at home after applying the patch, rebuild, and the notifications worked. I'm a 
little
concerned about the "unsafe" marker. 

Growl allows you to embed the framework with an installer. I didn't see that 
option
for Snarl. Or the ability to include the DLL in a deployment.

Original comment by scottck...@gmail.com on 26 Mar 2008 at 6:44

GoogleCodeExporter commented 8 years ago
There are no plans to commercialize Witty, so the CC license seems appropriate. 

Original comment by alan...@gmail.com on 26 Mar 2008 at 6:54

GoogleCodeExporter commented 8 years ago
@scottckoon I feel the same way about the "unsafe" code.  I think the idea 
behind
using the raw Win32 messages was to make integration available to any 
environment
able to talk to the Windows API.  I didn't see any way of integrating it 
directly
into the application, either.  

Hopefully we can use all or part of the code that Alan linked to above from the
channel 8 posting.  Even if we can't, I know I'd feel a lot better about 
running all
managed code (ours or someone else's) and not relying on an external 
application.  

I assumed you guys wanted to use Snarl since the original issue post listed it, 
so I
just ran with it.  I'd be happy to work on either adding the channel 8 code or
whipping up my own version of it.  

What do you guys think about the license?

Original comment by bmsulli...@gmail.com on 26 Mar 2008 at 6:58

GoogleCodeExporter commented 8 years ago
Alrighty!  I'll take a look at integrating the channel 8 code as soon as I get 
the
chance.

Original comment by bmsulli...@gmail.com on 26 Mar 2008 at 7:00

GoogleCodeExporter commented 8 years ago
Here's bmsullivan's patch updated to not need to use unsafe blocks.  No reason 
not to
include it now ;)

Original comment by michael....@gmail.com on 27 Mar 2008 at 5:58

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks Michael. great that you built on Brian's patch. 

I liked your idea below:
"@a7an I'm sure it can be included somehow, but even then if Snarl is available 
use
it, if not fall back on built in pop ups."

So we display it in snarl if the user has it and roll with custom WPF 
notification
when they don't. What do you guys think?

Original comment by alan...@gmail.com on 27 Mar 2008 at 6:09

GoogleCodeExporter commented 8 years ago
Now that we've included it as it's no longer "unsafe" there are a few more 
things to
be done:

Have Witty check for Snarl so it doesn't try to call to it if it doesn't exist.
Register Witty with Snarl on startup and unregister on shutdown
Register alerts (ie new tweet, new dm, new reply) with Snarl so user can 
enable/disable
Configuration panel?  I'm not sure if WPF has "window handles" per se, at some 
point
I'm sure it gets one... this will have to be looked into.

I don't mind looking into this if bmsullivan wants to concentrate on the 
fallback
toaster support.

Original comment by michael....@gmail.com on 27 Mar 2008 at 6:31

GoogleCodeExporter commented 8 years ago
@michael Awesome!  I'll have to remember that "MarshalAs" attribute.  As far as 
I'm
concerned, feel free to continue down that path.  I'm working on integrating 
the WPF
popups, so I can slide those in in the case that the user doesn't have Snarl 
installed.

Original comment by bmsulli...@gmail.com on 27 Mar 2008 at 6:49

GoogleCodeExporter commented 8 years ago
Attached is a patch consisting if what I have so far.  It's fairly useful 
actually. 
You can configure the maximum number of individual notfications (from 1 to 25), 
if
you recieve more then that number of tweets then you get a roll up notification.

 I still want to figure out why ShowMessageEx isn't working (so we can separate
Tweets, Replies, DMs for instance)  

And I need to figure out either how to bring up the Notification config (oh 
yeah I
added that) or Witty itself when the notification is clicked.  Also need to add 
a
preference for notification duration.  FWIW I think both Snarl and a built in 
toaster
will probably share the same configurations (like the Maximum Individual
Notifications that I already added and a future notification duration setting). 

Would there be any issue with distributing some png icons that could sit in 
either
the same directory as Witty or a subdirectory?  

Original comment by michael....@gmail.com on 28 Mar 2008 at 2:43

Attachments:

GoogleCodeExporter commented 8 years ago
Excellent. patch applied

I'll clean up the UI once you guys are done. less merging later.

Original comment by alan...@gmail.com on 28 Mar 2008 at 7:10

GoogleCodeExporter commented 8 years ago
Okay, here's a patch with toasts built in.  The only thing I'm a little 
concerned
about is that the fade-out animation seems to be pretty CPU intensive.  There's 
a
noticeable slowdown on my 2.0GHz Core 2 Duo machine.  If someone else knows a 
better
way to do that effect, it would be a welcome improvement.  If you guys see any 
other
problems with this stuff, let me know and I can fix it.  This is fun stuff!

Original comment by bmsulli...@gmail.com on 29 Mar 2008 at 1:23

Attachments:

GoogleCodeExporter commented 8 years ago
Geez, I'm such a 'tard.  Forgot to add the new Popup files in TortoiseSVN.  
Here's
the *real* patch.

Original comment by bmsulli...@gmail.com on 29 Mar 2008 at 2:06

Attachments:

GoogleCodeExporter commented 8 years ago
I'm working on merging our two patches together now.

Original comment by michael....@gmail.com on 29 Mar 2008 at 1:44

GoogleCodeExporter commented 8 years ago
Living together in perfect harmony...

Works well bmsullivan!

Original comment by michael....@gmail.com on 29 Mar 2008 at 2:13

Attachments:

GoogleCodeExporter commented 8 years ago
Ironically.. I too am a "tard" as it were, my patch doesn't include the cs 
file, ah
well.  I did check in the changes correctly though, so now we have both in SVN.

Original comment by michael....@gmail.com on 29 Mar 2008 at 2:23

GoogleCodeExporter commented 8 years ago
The reason I brought up the icons before was that the Witty "logo" seems like it
would be PERFECT for a skinned pop up notification... Snarl 2.0 (which is in 
beta) is
skinnable....

Original comment by michael....@gmail.com on 29 Mar 2008 at 4:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Made some changes to use screen names instead of names as popup headers.  This 
will
make sure replies and DMs from popup context menus will use the right thing.  
Also,
made the WPF popups Topmost so they'll show up in front of other windows.  Since
Snarl does this already, I figured it would be okay.

Original comment by bmsulli...@gmail.com on 29 Mar 2008 at 9:59

GoogleCodeExporter commented 8 years ago
So do we want to call this one done?  Or do we want to wait until 
michael.letterle
can do the messages back to Witty from Snarl popups?  Regardless, if there's 
anything
you guys would like to change about the way I did the WPF ones, don't be afraid 
to
say so.  I'd be happy to rework them if need be.

Original comment by bmsulli...@gmail.com on 30 Mar 2008 at 5:22

GoogleCodeExporter commented 8 years ago
you guys rock.

Original comment by alan...@gmail.com on 30 Mar 2008 at 9:34

GoogleCodeExporter commented 8 years ago
Okay, so I know I just asked if we wanted to close this one, but I just couldn't
resist playing around with a little bit of eye candy.  I basically made the 
popups
look just like the login control, animation and everything.  I think it looks 
pretty
smooth, but let me know what you guys think. 

Original comment by bmsulli...@gmail.com on 30 Mar 2008 at 11:47

Attachments:

GoogleCodeExporter commented 8 years ago
Nice!  I plan on looking into Snarl 2.0 and seeing about themeing the snarl 
popups, I
think if we used the blue Witty logo as a popup that might work too, it'd be 
kind of
obvious that the popups were from Witty and it would "brand" it a bit..

Regardless, I like the fade animation, very slick!

Original comment by michael....@gmail.com on 31 Mar 2008 at 12:23

GoogleCodeExporter commented 8 years ago
Went ahead and checked in the cosmetic improvements.

Original comment by bmsulli...@gmail.com on 31 Mar 2008 at 2:01

GoogleCodeExporter commented 8 years ago
Hmm, anyone having any problems with the WPF popups and dual monitors?

Original comment by michael....@gmail.com on 31 Mar 2008 at 12:54

GoogleCodeExporter commented 8 years ago
Hadn't tested that, though I see how it could be a problem based on how the 
window
location is determined.  I'll have to wait until I can get home to test out that
scenario.

Original comment by bmsulli...@gmail.com on 31 Mar 2008 at 1:03

GoogleCodeExporter commented 8 years ago
i'm on dual monitors at work. with the wpf toasts, the notifications appear on 
second
monitor (which I prefer). with Snarl it appears on the first.

Original comment by alan...@gmail.com on 1 Apr 2008 at 6:22

GoogleCodeExporter commented 8 years ago
Do you have your 2nd monitor on the left or right of the 1st monitor?

Original comment by michael....@gmail.com on 1 Apr 2008 at 6:24

GoogleCodeExporter commented 8 years ago
2nd monitor is on right. 

Original comment by alan...@gmail.com on 1 Apr 2008 at 6:53

GoogleCodeExporter commented 8 years ago
need option to disable notifications totally.
- some people might not like it.
- some users might want to disable during meetings, presentations, etc.

Original comment by alan...@gmail.com on 4 Apr 2008 at 11:55

GoogleCodeExporter commented 8 years ago
These are some usability enhancement ideas I've had now that it's been a week 
or so
of usage:

1) configurable option for how long before fading out the toasts
2) close button to close toasts right away
3) "tell me again" feature to redisplay toasts
4) when clicking on a toast, show Witty and select the tweet. ScrollIntoView()
5) make toasts customize-able to current skins.

Original comment by alan...@gmail.com on 4 Apr 2008 at 11:59

GoogleCodeExporter commented 8 years ago
I'll go ahead and get started on those changes, Alan.  You haven't started on 
any of
them yet, have you Michael?  Wouldn't want to duplicate work that's already 
been done.

Original comment by bmsulli...@gmail.com on 5 Apr 2008 at 8:27

GoogleCodeExporter commented 8 years ago
Okay, committed changes to take care of Comment 37 and 1) of 38.  In order to 
do the
duration thing, I had to add the entire animation imperatively.  From what I 
could
tell, the keyframe elements were not x:Name referenceable in the code-behind, 
so I
couldn't just change the KeyTime on the second and third frames based on the 
user
setting.  If someone else knows how to do it with mostly XAML, I'd prefer that, 
so
feel free to change it.

Original comment by bmsulli...@gmail.com on 6 Apr 2008 at 4:11

GoogleCodeExporter commented 8 years ago
Added close button

Original comment by bmsulli...@gmail.com on 7 Apr 2008 at 2:15

GoogleCodeExporter commented 8 years ago
Added call to ScrollIntoView for toast clicks.

Original comment by bmsulli...@gmail.com on 13 Apr 2008 at 8:24

GoogleCodeExporter commented 8 years ago
I noticed that it shows up in the lower right corner, even if you have your 
taskbar
set to the "top" of the screen (kind of like on a mac) - other apps I have 
used, the
alerts come out of the taskbar if it is on top or on bottom of the screen

Original comment by steven.n...@gmail.com on 15 Apr 2008 at 2:16

GoogleCodeExporter commented 8 years ago
attached Screen Shot per jonGalloway. 

- Toasts show up in farthest right most corner even on dual monitor. 
- screen shot shows location of Toasts in relation to the monitor settings (i 
put 
the cutout right where they show up)

Original comment by ang3lf...@gmail.com on 6 May 2008 at 10:08

Attachments:

GoogleCodeExporter commented 8 years ago
Committed changes to make toasts show up at the bottom right of the primary 
monitor.

Original comment by bmsulli...@gmail.com on 30 May 2008 at 2:36

GoogleCodeExporter commented 8 years ago
Wow - i just wanted to add a feature request for Witty to support Snarl 
notifications
but when I started it I was surprised by a Snarl notification telling me that 
Witty
has been registered. This is great and you are now my favorite Twitter client on
Windows. :)

If you have any questions or would like to expand the integration with Snarl I 
would
be happy to help (see http://tlhan-ghun.de).

Will add Witty to the Snarl homepage as soon as I get back to my CMS. Thx again 
:)

Original comment by PidginSn...@gmail.com on 18 Nov 2008 at 3:43

GoogleCodeExporter commented 8 years ago
I like your code - I needed just a few minutes to include the newest version of 
the
Snarl interface into Witty - are you interested in an actual patch?

Original comment by PidginSn...@gmail.com on 18 Nov 2008 at 6:27

GoogleCodeExporter commented 8 years ago
I'd be interested for sure. :)

Original comment by michael....@gmail.com on 18 Nov 2008 at 6:38

GoogleCodeExporter commented 8 years ago
Sounds great - I just played a little bit with the code and here is what I 
already have:
- Witty registers and unregisters with Snarl
- Witty registers an own alert class called "New tweet" (which can be used by 
the
Snarl user to e.g choose a different style for those alerts)
- Witty shows new tweets with Snarl incl.:
 o avatar image if available (want to add a default if not - give me some time ;))
 o it uses the registered alert class
 o it uses the timeout setting from the options dialog

Original comment by PidginSn...@gmail.com on 19 Nov 2008 at 10:52

GoogleCodeExporter commented 8 years ago
Here is what I did until now:
Removed the old SnarlInterface-file in the misc folder
Created a new folder "Snarl" under misc and copied the interface there (see 
attachment)
Changed the source of MainWindow.xaml.cs (see patch)

What I would need would be an image (256px png) as default image (would say the 
Witty
logo) in the installation and the knowledge within the sourcecode of it's full 
path
on the harddisc. This one could be used for registering with Snarl as well as 
default
if we can't get an avatar for that user.

You can get me at GTalk with PidginSnarl@googlemail.com or at AIM with SvenWal

Original comment by PidginSn...@gmail.com on 19 Nov 2008 at 11:26

Attachments: