[gnome-panel] na: warn if trying to set tray properties before realizing
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] na: warn if trying to set tray properties before realizing
- Date: Tue, 1 Feb 2011 22:46:24 +0000 (UTC)
commit 63aefb2f33ba1815607c0cc015b449c9e054074f
Author: Dan Winship <danw gnome org>
Date: Tue Feb 1 13:04:50 2011 -0500
na: warn if trying to set tray properties before realizing
Previously, na_tray_manager_set_orientation_property() and
na_tray_manager_set_visual_property() would silently no-op if you
called them before realizing the tray. Make them g_return_if_fail()
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=614711
applets/notification_area/na-tray-manager.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/applets/notification_area/na-tray-manager.c b/applets/notification_area/na-tray-manager.c
index a822eb7..79e6cf9 100644
--- a/applets/notification_area/na-tray-manager.c
+++ b/applets/notification_area/na-tray-manager.c
@@ -564,11 +564,9 @@ na_tray_manager_set_orientation_property (NaTrayManager *manager)
Atom orientation_atom;
gulong data[1];
- if (!manager->invisible)
- return;
+ g_return_if_fail (manager->invisible != NULL);
window = gtk_widget_get_window (manager->invisible);
- if (!window)
- return;
+ g_return_if_fail (window != NULL);
display = gtk_widget_get_display (manager->invisible);
orientation_atom = gdk_x11_get_xatom_by_name_for_display (display,
@@ -597,11 +595,9 @@ na_tray_manager_set_visual_property (NaTrayManager *manager)
Atom visual_atom;
gulong data[1];
- if (!manager->invisible)
- return;
+ g_return_if_fail (manager->invisible != NULL);
window = gtk_widget_get_window (manager->invisible);
- if (!window)
- return;
+ g_return_if_fail (window != NULL);
/* The visual property is a hint to the tray icons as to what visual they
* should use for their windows. If the X server has RGBA colormaps, then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]