Commit Graph

16468 Commits

Author SHA1 Message Date
Carlos Garnacho
367cc4fc0f entry: Handle ::grab-notify
Store the device, and unset private fields whenever the device
is shadowed by another GTK+ grab, so popping up menus while
selecting (i.e. press-and-hold) doesn't leave the entry in a
confused state.
2012-02-23 16:45:06 -05:00
Alexander Larsson
334668a183 Raleigh: Fix entry selection colors 2012-02-23 15:16:57 +01:00
Alexander Larsson
a3b7cff708 Fix some details in Raleigh look
* Restores the old padding
* Prelight on spin buttons
* Don't have a generic prelight background selector, as that got
  picked up by things like images that should have a transparent bg.
2012-02-23 14:51:19 +01:00
Javier Jardón
80674d9dc0 docs: GtkApplication "quit" signal is gone now 2012-02-23 11:58:18 +00:00
Rob Bradford
a2792b983c window: Fix typo in documentation for gtk_window_get_position 2012-02-23 11:45:49 +00:00
Chun-wei Fan
72482c335d Bug 670499-gtkthemingengine.c: Include fallback-c89.c
This is due to the use of round and nearbyint() function, which are C99 functions...
2012-02-23 12:23:59 +08:00
Cosimo Cecchi
03fdaca187 color-swatch: set/unset prelight state flag on enter/leave events
Allows themes to set a different style on prelight.
2012-02-21 18:17:26 +01:00
Cosimo Cecchi
925c800e5d entry: fix progressbar area size for interior-focus = FALSE
No need to subtract focus line width again, since the progressbar is
rendered starting at (0, 0).
This also fixes the entry-progressbar-coloring reftest.
2012-02-21 12:14:50 +01:00
Sebastian Keller
ab2e9d9c93 Bug 650693 - Drawing errors in column headers when adding new columns
Reset style on visible headers, not on invisible ones
2012-02-21 11:46:47 +01:00
Matthias Clasen
140e884868 Symbol exporting fixes 2012-02-21 01:50:19 +01:00
Ryan Lortie
ef2df583f2 GtkApplication: simplify session quit handling
Instead of firing a 'quit' signal and expecting the application to do
something that will cause it to quit, just call the new
g_application_quit() API for ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:23:01 +01:00
Ryan Lortie
659c7130f0 GtkApplication: remove end session API
This seems a bit "too powerful" and unlikely to be used by most
applications.  Remove it from now, until someone comes up with a strong
desire for it.

https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:23:01 +01:00
Michael Natterer
914053a2a3 gtk_window_set_attached_to: ref(), not ref_sink() the attach_widget
The attached popup doesn't take ownership of its "parent" widget, so
ref_sink() was wrong, and caused widgets to be leaked.
2012-02-21 01:06:43 +01:00
Cosimo Cecchi
e76bdb1b98 color-chooser-widget: set a name on the "Add color" button
So we can easily catch it from the theme.
2012-02-20 13:53:10 +01:00
Cosimo Cecchi
9160a68c7f color-swatch: make this a no-window widget
Instead of having an input/output GdkWindow, make the widget no-window,
and use a separate input-only window for events, and paint on the parent
window directly.
2012-02-20 13:49:04 +01:00
Alexander Larsson
8e4b17738e Fix padding handling in GtkViewport 2012-02-20 12:12:05 +01:00
Cosimo Cecchi
e6a8beba9d GtkHSV: remove an unused function 2012-02-20 11:44:51 +01:00
Cosimo Cecchi
5f9c8f653d entry: trim the progress bar area if the text area is resized
When a subclass of GtkEntry (e.g. GtkSpinButton) resizes the available
text area (by overriding the get_text_area_size vfunc), we need to
ensure we don't draw a possible progressbar over the part that got
removed from the text area.
This fixes drawing a progressbar in GtkSpinButton and in its subclasses,
such as GimpSpinScale, and makes Mitch happy too!
2012-02-20 11:44:51 +01:00
David King
9a732c40fc docs: Clarify position of gtk_list_store_insert_with_values()
https://bugzilla.gnome.org/show_bug.cgi?id=612283
2012-02-20 10:25:26 +00:00
Diego Escalante Urrelo
c84d58ce1b gtkuimanager: clarify @pos of insert_action_group
Mention that it is possible for it to be negative, or larger than the
current number of action groups.

https://bugzilla.gnome.org/show_bug.cgi?id=669947
2012-02-20 10:12:00 +00:00
Jiří Klimeš
0a9901b1d2 docs: fix typos in functions' descriptions
gtk_tree_view_set_hover_expand()
gtk_tree_view_column_set_clickable()

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2012-02-20 09:25:29 +00:00
Cosimo Cecchi
7e78d75e7a entry: don't force zero Y coordinate for insertion cursor
Subclasses of GtkEntry could set a larger height request, so we need to
apply the same calculations to the insertion cursors than we do on the
PangoLayout to render it centered under all circumstances.
2012-02-18 19:39:29 +01:00
Cosimo Cecchi
8dd4a0adf1 color-swatch: don't render our active badge if background-image is set
If the color active swatch has been set a background image from the
theme, use it as an asset, and do not draw our custom thing.
2012-02-18 09:55:45 +01:00
Cosimo Cecchi
dcec8dfdde color-swatch: render a background if the swatch doesn't have a color
We still want to call into the background rendering code, to draw the
default background.
2012-02-18 09:55:45 +01:00
Cosimo Cecchi
8e85702dca color-swatch: derive directly from GtkWidget
Instead of GtkDrawingArea, since that calls in realize
gtk_style_context_set_background(). We don't want that to happen, given
that we do all the painting ourselves in _draw().
2012-02-18 09:55:45 +01:00
Cosimo Cecchi
039eb8dc04 color-editor: mark the GtkColorSwatch as not selectable 2012-02-17 17:03:15 +01:00
Cosimo Cecchi
5f0c4fc20f color-swatch: add a "selectable" property to GtkColorSwatch
We don't want e.g. the swatch in GtkColorEditor to get the select badge
when it's clicked, so make this a property (on by default).
2012-02-17 17:03:15 +01:00
Claudio Saavedra
cfe65a0d6c GtkNotebook: and another fix
https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-02-16 12:33:26 +02:00
Claudio Saavedra
ccf7867c35 GtkNotebook: fix one child-notify emission
Forgot to increase the counter in the for loop, doing it now.

https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-02-16 12:28:46 +02:00
Javier Jardón
392fdff8e5 docs: GtkWidget's "state-flags-changed" is a signal not a property 2012-02-15 13:43:58 +00:00
Murray Cumming
a0b4ab109d Documentation: Correct references to properties.
These should use :, not ::, though signals would use ::.
See
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_syntax.html.en
and
http://developer.gnome.org/gtk-doc-manual/unstable/documenting_symbols.html.en
2012-02-15 11:43:33 +01:00
Rico Tzschichholz
87d979f498 Remove obsolete reference to gtk.css.raleigh 2012-02-15 08:03:05 +01:00
Matthias Clasen
e1a625aa78 GtkColorSwatch: Add accessible actions 2012-02-14 21:16:52 -05:00
Claudio Saavedra
347328adb0 GtkNotebook: emit child-notify::position on drag 'n drop reorder
https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-02-15 01:05:12 +02:00
Claudio Saavedra
cb775a6a6d GtkNotebook: emit child-notify::position on page add/removal
For each page added/removed, notify all the other children changing
position.

https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-02-15 01:05:12 +02:00
Cosimo Cecchi
bef12c003c color-scale: remove Adwaita GtkColorScale trough hack
Instead of special-casing Adwaita, apply the half-width logic for themes
that have a scale slider with vertical proportions.
Also, simplify the rendering code a bit by factoring out the trough
sizing logic.
2012-02-14 16:37:05 -05:00
Cosimo Cecchi
19da38b811 colorchooser: factor out a private method to get the checkboard pattern
And use it in the color widgets.
2012-02-14 16:37:04 -05:00
Matthias Clasen
453aecd346 Improve a11y names for colors
Only read alpha if it is != 1, and read percentages also for
'unnamed' palette colors.
2012-02-14 16:37:04 -05:00
Matthias Clasen
2d57c5c374 Update TODO 2012-02-14 16:37:04 -05:00
Matthias Clasen
18ea4825cf Mark color names as translatable 2012-02-14 16:37:04 -05:00
Matthias Clasen
1f698e4f62 GtkColorScale: fix an RTL issue
When using a horizontal scale in RTL, we need to flip the
background image to go along with the flipped scale.
2012-02-14 16:37:04 -05:00
Cosimo Cecchi
5e77e1c117 colorsel: include gtkcolorutils.h
Fix the build
2012-02-14 16:37:02 -05:00
Cosimo Cecchi
6dbb4d6384 color-widget: don't use a GtkAlignment to center the color editor
We can just use a GtkBox, and set hexpand=TRUE/halign=CENTER to allocate
the editor in the middle of the box.
2012-02-14 16:37:01 -05:00
Cosimo Cecchi
988cbb6300 color-editor: don't use a GtkAlignment to layout popups
Set a margin on the contents and use a box instead.
2012-02-14 16:37:01 -05:00
Cosimo Cecchi
1cbaca6c60 color-editor: don't use an alignment to give the popup extra space 2012-02-14 16:37:01 -05:00
Cosimo Cecchi
2abe72283e color-editor: also set a row spacing in the popup tooltip 2012-02-14 16:37:01 -05:00
Cosimo Cecchi
126e941466 color-button: simplify internal children
Instead of going GtkAlignment->GtkFrame->GtkAlignment, just pack a
GtkDrawingArea inside the button, and use halign/margin properties to
get the desired layout.
2012-02-14 16:37:01 -05:00
Cosimo Cecchi
51c6e8329d color-swatch: cleanup unused property enum value 2012-02-14 16:37:01 -05:00
Matthias Clasen
91b4781ae9 Revert an accidental commit 2012-02-14 16:37:00 -05:00
Matthias Clasen
92618eb8e2 GtkColorSwatch: Use widget state instead of a custom 'selected' 2012-02-14 16:37:00 -05:00
Matthias Clasen
9cc827fcd1 A11y improvements 2012-02-14 16:37:00 -05:00
Matthias Clasen
40974b1463 GtkColorSwatch: Drop an unnecessary field 2012-02-14 16:37:00 -05:00
Matthias Clasen
dc1929a9de Avoid a 10th custom color 2012-02-14 16:37:00 -05:00
Matthias Clasen
1f05f94885 GtkColorChooserDialog: propagate notification for ::show-editor 2012-02-14 16:36:59 -05:00
Matthias Clasen
05e2124f24 GtkColorChooserWidget: emit notification for ::show-editor 2012-02-14 16:36:59 -05:00
Matthias Clasen
1fd311803a Document gtk_color_chooser_add_palette 2012-02-14 16:36:59 -05:00
Matthias Clasen
7f44feab19 Fix use_alpha initialization and propagation
We must set use_alpha to TRUE initially, and when passing it
down to the swatches, we must iterate over the custom box, too.
2012-02-14 16:36:59 -05:00
Matthias Clasen
3a7ed2e7bd Remove unused variables 2012-02-14 16:36:59 -05:00
Matthias Clasen
bad24bc119 Consistently private headers
Add a 'private' suffix to all newly introduced private
headers.
2012-02-14 16:36:58 -05:00
Matthias Clasen
5aaeaa7b81 Fix the build
A G_BEGIN_DECLS went missing here.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
bcc4186388 color-swatch: remove gtk_color_swatch_set_corner_radii()
It's unused now.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
74a53b542b color-widget: use a GtkBox for the custom section
Since we only allow a single row there, it's better to just use a
GtkBox, and use :first-child, :last-child and :only-child to style
swatches in there.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
9da3d8b7b9 color-widget: add LEFT/RIGHT/TOP/BOTTOM style classes to the swatches
As we add them to the grid, for setting theming properties.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
73944c6e81 color-editor: don't call gtk_color_swatch_set_corner_radii()
It's going away.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
a9c2a586b1 color-swatch: don't hardcode list-add-symbolic as swatch icon
We have that as a property, we should use it.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
83de34882b color-swatch: allow styling the "active badge"
Instead of calling gtk_render_check() there, just render a symbolic
icon, falling back to a built-in one if the icon is not available.
Also, add a style class for the active badge on the swatch:
"color-active-badge".
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
1ccedc5fa4 color-swatch: use GtkThemingBackground to draw the background
This allows e.g. for the corner radii to be styled directly from the
theme.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
33e54e45be color-swatch: add a color-light/color-dark style class for intensity
Themes might want to set different colors on the badge if the displayed
color is light or dark. Use a style class for this when we set a color
on the swatch.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
46187037a3 themingbackground: make it based on GtkStyleContext
Instead of GtkThemingEngine. This will allow for the object to be also
used from inside e.g. a _draw() method.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
ae132c0a1a roundedbox: add _apply_border_radius() variations for engine/context
And make the base function just use the raw corner radii struct.
2012-02-14 16:36:56 -05:00
Cosimo Cecchi
4c61f1f663 themingengine: add a private _gtk_theming_engine_get_context()
We'll need this later.
2012-02-14 16:36:56 -05:00
Cosimo Cecchi
4e37d56d51 themingengine: move _gtk_theming_engine_set_context to private header
Where it belongs.
2012-02-14 16:36:56 -05:00
Matthias Clasen
8f201d62d9 Add API to set palettes
I'm not really convinced by this; the API is a little complicated.
May need more thought.
2012-02-14 16:36:56 -05:00
Matthias Clasen
d7cff0797e Misc cleanups 2012-02-14 16:36:56 -05:00
Matthias Clasen
cb128cc6e9 Deprecate old color selection widgets
GtkColorSelectionDialog, GtkColorSelection and GtkHSV have
been superseded by the GtkColorChooser* family of widgets.
2012-02-14 16:36:55 -05:00
Matthias Clasen
23a5f7a22c Add docs 2012-02-14 16:36:55 -05:00
Matthias Clasen
03a2b338ee Small documentation tweaks in font choosers 2012-02-14 16:36:55 -05:00
Matthias Clasen
c5cfb6e02b Rework the API a bit
Rename get/set_color to get/set_rgba and show_alpha to use_alpha,
to match existing GtkColorButton API and let GtkColorButton implement
GtkColorChooser.
2012-02-14 16:36:55 -05:00
Matthias Clasen
1f68d7d827 Simplify GtkColorScale private api a bit 2012-02-14 16:36:55 -05:00
Matthias Clasen
6ed16b5b41 Fix up exported symbols
Only GtkColorChooser* is public for now.
2012-02-14 16:36:54 -05:00
Matthias Clasen
43ffb8521d Add a small comments 2012-02-14 16:36:54 -05:00
Matthias Clasen
1f7cc92219 Dismiss popups on show
This ensures that the editor always comes up without popups,
even when it is reused.
2012-02-14 16:36:54 -05:00
Matthias Clasen
3f92e24cb7 Add more todos 2012-02-14 16:36:54 -05:00
Matthias Clasen
cc127c64a9 Add some accessible labels 2012-02-14 16:36:54 -05:00
Matthias Clasen
327e36e360 Mark strings for translation 2012-02-14 16:36:53 -05:00
Matthias Clasen
f2aaffaf07 Finishing touches
Implement popups in the editor, fix window sizing, fix RTL flipping.
GtkColorPlane is now using adjustments, and GtkColorEditor is using
adjustments as its model as well.
2012-02-14 16:36:53 -05:00
Matthias Clasen
cd300835d7 Allow context menus on scale sliders
This will be used for a popup in the color chooser.
2012-02-14 16:36:53 -05:00
Matthias Clasen
e56adaebea Only activate on double-click 2012-02-14 16:36:53 -05:00
Matthias Clasen
dbbe4c12fa Remove an erraneous g_free call 2012-02-14 16:36:53 -05:00
Matthias Clasen
296cd814e5 Add an Adwaita hack
When the theme is Adwaita, let the thumb extend out over the
colored trough.
2012-02-14 16:36:53 -05:00
Matthias Clasen
5bd4c234fb Draw no trough for color scales 2012-02-14 16:36:52 -05:00
Matthias Clasen
4226551fff Move color scales into separate widget 2012-02-14 16:36:52 -05:00
Matthias Clasen
bdb8931bda Fix a few problems with custom color replacement
We were allowing one too many custom colors in, and when one
of them was dropped, we did not update the shape of the penultimate
one.
2012-02-14 16:36:52 -05:00
Matthias Clasen
3a35895a00 Make color chooser always come up with palette 2012-02-14 16:36:52 -05:00
Matthias Clasen
d3b30bff0c Show new color chooser from color button 2012-02-14 16:36:52 -05:00
Matthias Clasen
2a8d3f78e9 Use a swatch in the editor
For now, we simply make it insensitive to turn off unwanted
interactivity.
2012-02-14 16:36:51 -05:00
Matthias Clasen
ff1f5de62f Don't waste memory 2012-02-14 16:36:51 -05:00
Matthias Clasen
1720e8ebf3 Preliminary color sliders 2012-02-14 16:36:51 -05:00
Matthias Clasen
8178578359 Make alpha optional 2012-02-14 16:36:51 -05:00
Matthias Clasen
8d1565df94 Show alpha in the palette as well 2012-02-14 16:36:51 -05:00