Hi, 
requesting code review for bug 543: Installer window too big for 640x480, can't 
see to install
http://defect.opensolaris.org/bz/show_bug.cgi?id=543

Webrev of changes is at:
http://cr.opensolaris.org/~niall/bug-543/

Overview

The approach to the fix is to place a scrolled window widget inside the 
contents area of the window with automatic scrolling enabled if the installer 
window gets too small to display the entire contents of the GUI at any time.
This also requires some behavioural changes to the way text label sizing is 
handled. Because the scroll bars will be used when the window gets too small, 
text labels should not try to adjust in response to this and should stay at a 
fixed width so that the scroll bars can do their thing. Many text labels have 
therefore been set to line wrap at an appropriate fixed width (70 chars) which 
is a suitable default value. This has allowed the code to be simplified also, 
so the "size-allocate" callbacks in the code can be removed.

Also, some other related cleanups have been applied. The window properties are 
no longer special as the window is a normal resizeable window. This allows a 
number of redundant functions to be removed from window-graphics.c. Also, as 
part of a cleanup
the background graphic setting function is also redundant, as is the inline 
pixbuf data for the S - curve graphic used in Dwarf Caiman. This has been 
removed from pixbufs.h


Breakdown of the changes to each file:

confirmation.glade
The confirmation screen had it's own scrolled window to scroll text if 
necessary. This is no longer necessary since it's parent container provides it 
now so it has been removed.

failure.glade
Set word wrapping property of text label and wrapping width to 70 characters.

finish-screen.c
Removed redundant size-allocate callbacks for the text label

installation-disk-screen.c
Removed redundant size-allocate callbacks for text labels plus a 
gtk_size_request
for a text label.

installation.glade
Set word wrapping property of text label and wrapping width to 70 characters.

installation-disk.glade
Fixed some alignment issue with the disk icons. (Moved from 4 to 6 pixels)
Set word wrapping property of text labels.
Made a descriptive label visible again (it was hidden for Indiana preview but 
needs to be
visible again now that partitioning is re-enabled): typeequalslabel

main.c
Removed calls to removed window_graphics_set_wm_properties() and 
window_graphics_set_bg_graphic() functions.
Set the background colour inside the scrolled window's viewport to white to 
match
branding spec.

pixbufs.h
Removed Sun S-curve inline pixbuf image since it is no longer used.

welcome-screen.c
Removed size-allocate callback functions for text label

window-graphics.c
Removed redundant functions: windo_graphics_create_bg_graphic(), 
window_graphics_set_bg_graphic(), window_graphics_set_wm_properties().
The default window behaviour works fine now.
Removed gtk_widget_set_size_request() in order to allow the window to be resize 
smaller than it's default size.

window-graphics.h
Removed redundant function prototypes

Thanks,
Niall.
--
This message posted from opensolaris.org

Reply via email to