Hi Danek,
Thanks for looking into the changes.
Agreed with your comments.
It is better to use gtk.gdk.screen_height() and gtk.gdk.screen_width() only in
cases where _NET_WORKAREA is not set. [ i.e When Windows manager is absent ].
Below is the pdiff of the changed fix:
diff -r 0358e521cc2d -r 63bd0a5647fd src/modules/gui/installupdate.py
--- a/src/modules/gui/installupdate.py Fri Sep 14 10:29:11 2012 +0530
+++ b/src/modules/gui/installupdate.py Wed Oct 03 16:22:45 2012 +0530
@@ -323,11 +323,17 @@
widget.connect(signal_name, callback)
def __setup_createplan_dlg_sizes(self):
- #Get effective screen space available (net of panels and docks)
- #instead of using gtk.gdk.screen_width() and
gtk.gdk.screen_height()
+ # If window manager is absent, _NET_WORKAREA property would
not be set,
+ # therefore use gtk.gdk.screen_width and gtk.gdk.screen_height
+ # to get the effective screen space available
root_win = gtk.gdk.get_default_root_window()
net_workarea_prop = gtk.gdk.atom_intern('_NET_WORKAREA')
- sw, sh = root_win.property_get(net_workarea_prop)[2][2:4]
+ if net_workarea_prop:
+ sw, sh =
root_win.property_get(net_workarea_prop)[2][2:4]
+ else:
+ sw = gtk.gdk.screen_width()
+ sh = gtk.gdk.screen_height()
+
sw -= 28 # Default width of Panel accounts for bottom or side
System Panel
sh -= 28
scale = gui_misc.get_scale(self.w_details_textview)
Thanks,
Thejaswini K.
Oracle
Thejaswini K
Revenue Product Engineering (RPE), Systems
Phone: +91 8066927709 | Mobile: +91 9663324594
ORACLE India | Off Langford Road | Bangalore | 560025
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
On 10/01/12 23:53, Danek Duvall wrote:
Thejaswini wrote:
https://cr.opensolaris.org/action/browse/pkg/saurabhv/7189357-rev-0/webrev/
Do gtk.gdk.screen_width() and gtk.gdk.screen_height() take the panels into
account now? If not, then you should probably check whether the
property_get() call returns None, and use the current scheme if it doesn't,
and the gdk functions if it does.
Thanks,
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss