diff --git a/ChangeLog b/ChangeLog index d34d2aff9..e3914cafc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-02-03 Mike Kestner + + * gtk/StatusIcon.custom : obsolete overload for backcompat on + GetGeometry, and custom PresentMenu method to invoke new glue. + * gtk/glue/statusicon.c : glue method to connect to gtk_menu_popup + without having to go across the native/managed boundary multiple + times using gtk_status_icon_position_menu wrapper. + [Fixes #79500] + 2007-02-02 Brad Taylor * gdk/Gdk.metadata: fix incorrect ref_count with Pixbuf's diff --git a/doc/en/Gtk/DetailsAcquiredArgs.xml b/doc/en/Gtk/DetailsAcquiredArgs.xml index 5ef3d7f9b..fd09994ea 100644 --- a/doc/en/Gtk/DetailsAcquiredArgs.xml +++ b/doc/en/Gtk/DetailsAcquiredArgs.xml @@ -26,7 +26,8 @@ Success indicator. - if the details were successfully acquired. + + if the details were successfully acquired. diff --git a/doc/en/Gtk/Notebook.xml b/doc/en/Gtk/Notebook.xml index b3ec19da3..68f8499a2 100644 --- a/doc/en/Gtk/Notebook.xml +++ b/doc/en/Gtk/Notebook.xml @@ -1235,8 +1235,8 @@ Don't forget to call the Show method on the widget or else the new page will not To be added. To be added. - To be added. - To be added. + Default handler for the event. + Override this method in a subclass to provide a default handler for the event. diff --git a/doc/en/Gtk/RecentFilterFunc.xml b/doc/en/Gtk/RecentFilterFunc.xml index 9e4c3af26..9ba6a5fa9 100644 --- a/doc/en/Gtk/RecentFilterFunc.xml +++ b/doc/en/Gtk/RecentFilterFunc.xml @@ -16,7 +16,8 @@ Filtering information. Recent Filter callback delegate. - if the file should be displayed. + + if the file should be displayed. Provides custom filtering. Added via . diff --git a/doc/en/Gtk/RecentSortFunc.xml b/doc/en/Gtk/RecentSortFunc.xml new file mode 100644 index 000000000..78f1feb12 --- /dev/null +++ b/doc/en/Gtk/RecentSortFunc.xml @@ -0,0 +1,25 @@ + + + + gtk-sharp + 2.10.0.0 + + + System.Delegate + + + + + + + System.Int32 + + + a to sort. + a to sort. + Recent chooser sorting delegate. + A positive integer if comes before , 0 if they are equal, or a negative value otherwise. + Attach a delegate of this type to for custom sorting. + + + diff --git a/doc/en/Gtk/StatusIcon.xml b/doc/en/Gtk/StatusIcon.xml new file mode 100644 index 000000000..49d675cf3 --- /dev/null +++ b/doc/en/Gtk/StatusIcon.xml @@ -0,0 +1,510 @@ + + + + gtk-sharp + 2.10.0.0 + + + GLib.Object + + + + + + Constructor + + + System.Obsolete + + + + + + + A native type value. + Obsolete constructor. + Do not use. + + + + + Constructor + + + + + A native instance pointer. + Public constructor. + For use by language bindings to wrap native instances. + + + + + Constructor + + + Public constructor. + + + + + + Constructor + + + + + Icon file name. + Public constructor. + Creates an instance using the specified icon file. + + + + + Constructor + + + + + An Icon pixbuf. + Public constructor. + Creates an instance using the specified icon pixbuf. + + + + + Event + + + GLib.Signal("activate") + + + + System.EventHandler + + + Activate event. + Raised when the user activates the status icon. This behavior is only provided on platforms that support it. + + + + + Event + + + GLib.Signal("size-changed") + + + + Gtk.SizeChangedHandler + + + SizeChanged event. + Raised when the icon size changes. + + + + + Event + + + GLib.Signal("popup-menu") + + + + Gtk.PopupMenuHandler + + + PopupMenu event. + Raised when the user brings up the context menu. + + + + + Method + + Gtk.StatusIcon + + + + + + To be added. + Creates a status icon with a named icon from the current theme. + A . + + + + + + Method + + Gtk.StatusIcon + + + + + + To be added. + Creates a status icon with a stock icon. + A . + + + + + + Method + + System.Void + + + + Default handler for the event. + Override this method in a subclass to provide a default handler for the event. + + + + + Method + + System.Boolean + + + + + + The new size. + Default handler for the event. + To be added. + Override this method in a subclass to provide a default handler for the event. + + + + + Method + + System.Void + + + + + + + Button pressed. + Time button was pressed. + Default handler for the event. + Override this method in a subclass to provide a default handler for the event. + + + + + Method + + System.Void + + + + + + + + + + A menu to position. + Returns the x coordinate. + Returns the y coordinate. + Returns if the menu must be pushed in to be completely visible. + Native handle of the StatusIcon for which the menu is being placed. + Menu Positioning Callback function. + Used with to position context menus. + + + + + Method + + System.Boolean + + + + + + + + Do not use. + Do not use. + Do not use. + Obsolete. Do not Use. + + if the operation succeeded. + This method was incorrectly bound and is provided for backward compatibility. Use the overload with out Screen and out Rectangle parameters instead. + + + + + Property + + + GLib.Property("storage-type") + + + + Gtk.ImageType + + + Image storage type. + A . + + + + + + Property + + + GLib.Property("size") + + + + System.Int32 + + + Pixel size available for Icon. + An integer pixel size. + + + + + + Property + + + GLib.Property("pixbuf") + + + + Gdk.Pixbuf + + + Display a Pixbuf Icon. + A containing the desired icon. + + + + + + Property + + + GLib.Property("visible") + + + + System.Boolean + + + Indicates if the Icon is visible. + To be added. + Doesn't guarantee the icon can be seen by the user. See . + + + + + Property + + + GLib.Property("stock") + + + + System.String + + + Display a stock Icon. + A value, or other string registered as a stock id. + + + + + + Property + + + GLib.Property("blinking") + + + + System.Boolean + + + Indicates if the Icon is Blinking. + If , the icon is blinking. + + + + + + Property + + + GLib.Property("file") + + + + System.String + + + Display an icon from a file. + A string containing the filename path. + + + + + + Property + + + GLib.Property("icon-name") + + + + System.String + + + Display an icon from the current icon theme. + An icon name from the current theme. + If the IconTheme is changed, the icon is updated to the icon of the same name in the new theme. + + + + + Property + + System.String + + + Display an icon from a file. + A string containing the filename path. + + + + + + Property + + System.Boolean + + + Indicates if the icon is embedded in a notification area. + + if embedded. + + + + + + Property + + System.String + + + Sets the Tooltip. + A tooltip string. + + + + + + Property + + System.String + + + Display an icon from the current icon theme. + An icon name from the current theme. + If the IconTheme is changed, the icon is updated to the icon of the same name in the new theme. + + + + + Property + + Gdk.Pixbuf + + + Display a Pixbuf Icon. + A containing the desired icon. + + + + + + Property + + System.String + + + Display a stock Icon. + A value, or other string registered as a stock id. + + + + + + Property + + GLib.GType + + + Native type value. + a . + + + + + + Method + + System.Boolean + + + + + + + + Returns the screen containing the status icon. + Returns the bounds of the status icon. + Returns the orientation of the status icon. + Get the Location and Orientation of the Icon. + + if the operation was successful. + This information can be used to place popups like notification bubbles. + + + + + Method + + System.Void + + + + + + + + The menu to present. + The button provided by . + The time provided by . + Positions and displays a menu. + This method provides an optimized alternative to calling directly, saving a some native/managed marshaling roundtrips. + + + + + Status Icon. + A platform independent system tray icon. + + + diff --git a/doc/en/Gtk/TrayIcon.xml b/doc/en/Gtk/TrayIcon.xml new file mode 100644 index 000000000..d7aaf6b9f --- /dev/null +++ b/doc/en/Gtk/TrayIcon.xml @@ -0,0 +1,85 @@ + + + + gtk-sharp + 2.10.0.0 + + + Gtk.Plug + + + + + + Constructor + + + System.Obsolete + + + + + + + Native type value. + Obsolete.. + Do not use. + + + + + Constructor + + + + + Native instance pointer. + Pseudo-Internal constructor. + For use by language bindings. + + + + + Constructor + + + Protected constructor. + Do not use this type. See instead. + + + + + Property + + + GLib.Property("orientation") + + + + Gtk.Orientation + + + Orientation of icon. + a . + + + + + + Property + + GLib.GType + + + Native GType value. + a . + For use by language bindings. + + + + + Private X11-only TrayIcon type. + Use instead for a platform independent status icon. + + + diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 2c3aa1655..66ebb89cf 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -460,6 +460,8 @@ 1 GtkWidget* 1 + out + out 1 1 out diff --git a/gtk/Makefile.am b/gtk/Makefile.am index a23069bc2..d02081066 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -88,6 +88,7 @@ customs = \ SelectionData.custom \ Settings.custom \ SpinButton.custom \ + StatusIcon.custom \ Stock.custom \ StockItem.custom \ Style.custom \ diff --git a/gtk/StatusIcon.custom b/gtk/StatusIcon.custom new file mode 100644 index 000000000..15ebeeb01 --- /dev/null +++ b/gtk/StatusIcon.custom @@ -0,0 +1,35 @@ +// StatusIcon.custom - customizations to Gtk.StatusIcon +// +// Authors: Mike Kestner +// +// Copyright (c) 2007 Novell, Inc. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of version 2 of the Lesser GNU General +// Public License as published by the Free Software Foundation. +// +// 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 +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + + [Obsolete ("Replaced by (out Screen, out Rectangle, out Orientation) overload")] + public bool GetGeometry (Gdk.Screen screen, Gdk.Rectangle area, out Orientation orientation) + { + Gdk.Screen junk; + return GetGeometry (out junk, out area, out orientation); + } + + [DllImport("libgtk-win32-2.0-0.dll")] + static extern void gtksharp_gtk_status_icon_present_menu (IntPtr raw, IntPtr menu, uint button, uint activate_time); + + public void PresentMenu (Menu menu, uint button, uint activate_time) + { + gtksharp_gtk_status_icon_present_menu (Handle, menu == null ? IntPtr.Zero : menu.Handle, button, activate_time); + } + diff --git a/gtk/glue/Makefile.am b/gtk/glue/Makefile.am index c6e63d165..8a03eb6a1 100644 --- a/gtk/glue/Makefile.am +++ b/gtk/glue/Makefile.am @@ -9,6 +9,7 @@ libgtksharpglue_2_la_SOURCES = \ nodestore.c \ object.c \ selectiondata.c \ + statusicon.c \ style.c \ targetlist.c \ vmglueheaders.h \ diff --git a/gtk/glue/statusicon.c b/gtk/glue/statusicon.c new file mode 100644 index 000000000..2176bab19 --- /dev/null +++ b/gtk/glue/statusicon.c @@ -0,0 +1,37 @@ +/* + * statusicon.c - Glue methods for GtkStatusIcon + * + * Authors: + * Mike Kestner +#include + +/* Forward declarations */ +void gtksharp_gtk_status_icon_present_menu (GtkStatusIcon *icon, GtkMenu* menu, guint button, guint32 activate_time); + +/* */ + +void +gtksharp_gtk_status_icon_present_menu (GtkStatusIcon *icon, GtkMenu* menu, guint button, guint32 activate_time) +{ + gtk_menu_popup (menu, NULL, NULL, gtk_status_icon_position_menu, icon, button, time); +} +