allow returning partial information
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2006-06-02 Matthias Clasen <mclasen@redhat.com>
|
2006-06-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstatusicon.c (gtk_status_icon_get_geometry): Allow
|
||||||
|
to return partial information. (#343625, Christian Persch)
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_key_release_event): Chain up
|
* gtk/gtkwindow.c (gtk_window_key_release_event): Chain up
|
||||||
to key_release, not to key_press. (#343677, Tommi Komulainen)
|
to key_release, not to key_press. (#343677, Tommi Komulainen)
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
2006-06-02 Matthias Clasen <mclasen@redhat.com>
|
2006-06-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkstatusicon.c (gtk_status_icon_get_geometry): Allow
|
||||||
|
to return partial information. (#343625, Christian Persch)
|
||||||
|
|
||||||
* gtk/gtkwindow.c (gtk_window_key_release_event): Chain up
|
* gtk/gtkwindow.c (gtk_window_key_release_event): Chain up
|
||||||
to key_release, not to key_press. (#343677, Tommi Komulainen)
|
to key_release, not to key_press. (#343677, Tommi Komulainen)
|
||||||
|
|
||||||
|
|||||||
@ -1634,12 +1634,14 @@ gtk_status_icon_position_menu (GtkMenu *menu,
|
|||||||
/**
|
/**
|
||||||
* gtk_status_icon_get_geometry:
|
* gtk_status_icon_get_geometry:
|
||||||
* @status_icon: a #GtkStatusIcon
|
* @status_icon: a #GtkStatusIcon
|
||||||
* @screen: return location for the screen
|
* @screen: return location for the screen, or %NULL if the
|
||||||
* @area: return location for the area occupied by the status icon
|
* information is not needed
|
||||||
|
* @area: return location for the area occupied by the status
|
||||||
|
* icon, or %NULL
|
||||||
* @orientation: return location for the orientation of the panel
|
* @orientation: return location for the orientation of the panel
|
||||||
* in which the status icon is embedded. A panel at the top or
|
* in which the status icon is embedded, or %NULL. A panel
|
||||||
* bottom of the screen is horizontal, a panel at the left or
|
* at the top or bottom of the screen is horizontal, a panel
|
||||||
* right is vertical.
|
* at the left or right is vertical.
|
||||||
*
|
*
|
||||||
* Obtains information about the location of the status icon
|
* Obtains information about the location of the status icon
|
||||||
* on screen. This information can be used to e.g. position
|
* on screen. This information can be used to e.g. position
|
||||||
@ -1666,17 +1668,24 @@ gtk_status_icon_get_geometry (GtkStatusIcon *status_icon,
|
|||||||
GtkStatusIconPrivate *priv;
|
GtkStatusIconPrivate *priv;
|
||||||
gint x, y;
|
gint x, y;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_STATUS_ICON (status_icon));
|
g_return_val_if_fail (GTK_IS_STATUS_ICON (status_icon), FALSE);
|
||||||
|
|
||||||
priv = status_icon->priv;
|
priv = status_icon->priv;
|
||||||
widget = priv->tray_icon;
|
widget = priv->tray_icon;
|
||||||
|
|
||||||
|
if (screen)
|
||||||
*screen = gtk_widget_get_screen (widget);
|
*screen = gtk_widget_get_screen (widget);
|
||||||
|
|
||||||
|
if (area)
|
||||||
|
{
|
||||||
gdk_window_get_origin (widget->window, &x, &y);
|
gdk_window_get_origin (widget->window, &x, &y);
|
||||||
area->x = x;
|
area->x = x;
|
||||||
area->y = y;
|
area->y = y;
|
||||||
area->width = widget->allocation.width;
|
area->width = widget->allocation.width;
|
||||||
area->height = widget->allocation.height;
|
area->height = widget->allocation.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orientation)
|
||||||
*orientation = _gtk_tray_icon_get_orientation (GTK_TRAY_ICON (widget));
|
*orientation = _gtk_tray_icon_get_orientation (GTK_TRAY_ICON (widget));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user