RE: Notification Widget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't have answers to your problems but have you tried GtkInfoBar? link-->http://library.gnome.org/devel/gtk/stable/GtkInfoBar.html
I think it is widget similar to the one you're trying to make.

> Date: Sun, 14 Mar 2010 14:31:03 -0400
> From: noel.ambrose@xxxxxxxxx
> To: gtk-list@xxxxxxxxx
> Subject: Notification Widget
>
> Hello,
>
> I'm trying to put together a user notification widget. Similar to the
> speech bubble seen on some Gnome distros that pops out of the gnome panel.
>
> I cannot user GtkMenu because it automatically hides away when the user
> clicks on anything in the TOPLEVEL_WINDOW. I would like the speech
> bubble/notification to only go away if the user clicks it away or a
> timeout has occurred.
>
> Therefore I went about creating my own notification widget based on
> GtkWindow using type GTK_WINDOW_POPUP. But the problem with this is that
> even after calling _unstick, the window shows up on every desktop. This
> forced me to use GTK_WINDOW_TOPLEVEL for the notification widget. With
> this, I am able to switch off the window decorator just fine, and
> generally all my "notification widget" logic seems to work except:
>
> 1. The notification window widget shows up as a separate application in
> the gnome panel. How do I stop the window appearing as a separate
> application to the window manager?
>
> 2. If I add a gtk_box into the window and then later gtk_widget_destroy
> an item from the box, the notification window does not automatically
> resize. Calling either gtk_widget_queue_resize or
> gtk_widget_reset_shapes on the notification window has no effect. How do
> I get the notification window to resize once I've removed something from it?
>
> 3. If the user moves the main application's TOPLEVEL window, the
> notification window does not move with it. I have set
> gtk_window_set_transient_for() . How do I get the notification's
> TOPLEVEL window to move with the main application's TOPLEVEL window?
>
>
> 4. I don't know how to position the notification window properly. I'd
> like the notification window to fit into the bottom left corner of the
> main application's TOPLEVEL window.
>
> ------Main Window ------
> | |
> | |
> | |
> | |
> |--NotifyWin--- |
> | | |
> | | |
> ------------------------
>
> Hopefully my ascii art came through right. At the moment, I'm asking the
> main window for its geometry and then doing the following calculations.
>
> Notify_X = Main_X;
> Notify_Y = Main_Y + Main_Height - Notify_reqHeight;
>
> The problem seems to be that Notify window's requested height can only
> be captured after the gtk_window_show. This means I'll be moving the
> window to its position while its visible to the user. I don't want to do
> this. Is there a way of getting the notify window to just align itself
> to that corner automagically? Window gravity perhaps?
>
>
> thanks,
>
>
> Vik.
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list


Hotmail: Δωρεάν, αξιόπιστη και αποτελεσματική υπηρεσία email. Αποκτήστε το τώρα.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux