[hafqa] [hafqa] [Bug 1156] New: GTK TextView *glacial* in combination with ScrolledWindow and HPaned
From: bugzilla-daemon at maemo.org bugzilla-daemon at maemo.orgDate: Wed Mar 21 01:50:18 EET 2007
- Previous message: [hafqa] [Bug 1141] matchbox should support new window type hints for menus
- Next message: [hafqa] [Bug 1158] New: Inconsistent menu close on maemo-modified gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
https://maemo.org/bugzilla/show_bug.cgi?id=1156 Summary: GTK TextView *glacial* in combination with ScrolledWindow and HPaned Product: haf Version: unspecified Platform: ARM OS/Version: All Status: NEW Severity: normal Priority: P2 Component: hildon-libs AssignedTo: michael.kostrzewa at nokia.com ReportedBy: sean at cs.gmu.edu QAContact: hafqa at maemo.org I was asked by pymaemo to post here as this appears to be a GTK bug on the N800 and not a pygtk bug. Initial Comment: # Dump this into the python 2.5 interpreter on the N800 and watch the fun. # Also try resizing the bar and watch it ooze into position. # What is going on here? Someone please tell me what I'm # doing wrong. It's not like this is a lot of text or anything. # The choice of text below is just cut-and-paste nonsense, # put something else there if you like. import pygtk import gtk import hildon text = """A horizontal or vertical sliding widget which permits the user to choose from a set of numerical or other values. You can specify the precision of the number being displayed (note that, unlike gtk.Scale, this does not affect the user's settable choices). You can add a label in one of three ways: first, you may provide a Label directly, which Slider will update for you. Second, you can override the didChangeValue method to update a Label (or other widget) as you like when the slider is modified; you can call provideFormat to give you a formatted String given the current value. Third, you can tell the Slider to provide a topLabel which floats with the widget (this is equivalent to gtk.POS_TOP). This only really makes sense for horizontal sliders. Last, you can specify if the slider is enabled or not. The widget has three basic modes: first, it can slide smoothly among floating-point values from a minimum to a maximum; second, it can move by increments between a minimum and a maximum (known as 'ticks'); third, it can slide from choice to choice in a provided list. For the first case, set minValue and maxValue to your desired values (defaults are 0 and 1). For the second choice, set minValue and maxValue to your desired values, and set the number of ticks. For example, if you wish to go from 0 to 10, inclusive, by increments of 2, that's 6 ticks. For the third choice, minimum and maximum values are set for you (to 0 and length(list)-1). The elements in the list are displayed to the user, and you determine programmatically which one is chosen by the index of the item. You may also override the provideFormat(...) method, if you feel so inclined, to further customize display of information -- perhaps to create a logarithmic scale. PERSISTENCE: Slider takes a unique name, which it uses to store its numerical position in the application's persistence database. HOOKS: didChangeValue(self, value): The user has just changed the slider's value. provideFormat(self, value): The slider needs a textual representation of the provided value. Return a String. There is a default version of this method which handles most cases, so you needn't override this unless you feel so inclined. GTK IMPLEMENTATION: Slider is implemented with either an gtk.HScale or a gtk.VScale.""" # Okay, here we go... tv = gtk.TextView() tv.set_wrap_mode(gtk.WRAP_WORD) tv.get_buffer().set_text(text) sc = gtk.ScrolledWindow() sc.add_with_viewport(tv) sc.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sc.get_vadjustment().set_value(0) sl = gtk.HPaned() sl.add1(sc) sl.add2(gtk.TextView()) w = hildon.Window() w.add(sl) w.show_all() gtk.main() -- Configure bugmail: https://maemo.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
- Previous message: [hafqa] [Bug 1141] matchbox should support new window type hints for menus
- Next message: [hafqa] [Bug 1158] New: Inconsistent menu close on maemo-modified gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]