Closed Bug 174927 Opened 22 years ago Closed 22 years ago

nsNativeThemeGTK cleanup

Categories

(SeaMonkey :: Themes, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: bryner, Assigned: bryner)

Details

Attachments

(1 file, 6 obsolete files)

There's currently a poor division of code between nsNativeThemeGTK.cpp and
gtkdrawing.c  What I'd like to do is have gtkdrawing be self-contained and
reusable outside of Mozilla.  nsNativeThemeGTK should use the gtkdrawing API and
not have any code to deal with the prototype native widgets. This means that:

- the various GtkWidgets that are used in gtkdrawing.c and nsNativeThemeGTK
should be made private to gtkdrawing.c.

- api's should be added to gtkdrawing.h as needed to make the widgets private to
gtkdrawing.c.

In addition, I cleaned up the interface by changing GdkWindow parameters to
GdkDrawable (since they're in fact pixmaps most of the time), eliminating
GtkStyle parameters from the the painting functions (since this can all be
handled internally), and fully documented the interface.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Attached patch cleanup patch (obsolete) — Splinter Review
Attached patch patch #2 (obsolete) — Splinter Review
removed an extra printf
Attachment #103152 - Attachment is obsolete: true
Comment on attachment 103153 [details] [diff] [review]
patch #2

not ready for review yet, found a couple of problems.
Attachment #103153 - Flags: needs-work+
Attached patch new cleanup patch (obsolete) — Splinter Review
changes from the last patch:

- replaced all of the individual widget drawing functions in gtkdrawing.h with
one function that takes a widget type constant.
- did the same for the widget border functions
- got rid of javadoc-style comments since javadoc doesn't understand C API's
- fixed the focus state with dropdown textfields
- removed some more unused cruft
Attachment #103153 - Attachment is obsolete: true
oops, must not have compiled that last one before attaching it (missing a ||).
Attachment #103496 - Attachment is obsolete: true
Attached patch fix border problem (obsolete) — Splinter Review
Fixed a problem with widget borders in the last patch
Attachment #103505 - Attachment is obsolete: true
Is this patch ready to be tested ? I'd like to make this a basis for doing some
similar theme stuff for OOo. How difficult is it to seperate this from the
Mozilla tree and build independently ?
Once this lands, gtkdrawing.c should be able to be compiled completely
independently from Mozilla.
Attached patch new patch against the trunk (obsolete) — Splinter Review
no functional changes, just merged up to the current trunk version of
nsNativeThemeGTK.cpp
Attachment #103543 - Attachment is obsolete: true
Could we use gtk_paint_slider instead of gtk_paint_box while painting the thumb?

gtk_paint_slider is used for the GtkVScale and GtkHScale widgets, not for the
scrollbar thumb.
yes. I found the slight difference in gtkrange.c of gtk1.2 and gtk2.0

My another question is if we could use some post binding way to reduce the
switch-case check. 
Attachment #104128 - Attachment is obsolete: true
Attachment #107685 - Flags: superreview?(jaggernaut)
Attachment #107685 - Flags: review?(blizzard)
Comment on attachment 107685 [details] [diff] [review]
merge theme engine blacklisting

r=blizzard
Attachment #107685 - Flags: review?(blizzard) → review+
Comment on attachment 107685 [details] [diff] [review]
merge theme engine blacklisting

rs=jag (as said on irc)
Attachment #107685 - Flags: superreview?(jaggernaut) → superreview+
finally checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: