Commit Graph

29644 Commits

Author SHA1 Message Date
Alexander Larsson
88d059ff09 win32: Default to gtk-win32 theme 2011-11-18 16:54:05 +01:00
Alexander Larsson
f59836a4d0 Build in default win32 css as gtk-win32 2011-11-18 16:54:04 +01:00
Alexander Larsson
a38c48be92 Build gtkwin32css.h from gtk-win32.css 2011-11-18 16:54:04 +01:00
Alexander Larsson
e9ac60830d win32-theme: Add gtk-win32.css 2011-11-18 16:53:55 +01:00
Michael Natterer
6bb495f6bd gdk: remove the GET_EFFECTIVE_KEYMAP() stuff from gdkkeys-x11.c
We don't support passing a NULL keymap any longer. Also pull some
precondition checks into the parent class.
2011-11-18 16:43:41 +01:00
Michael Natterer
90e73dd1c4 gdk_x11_keymap_get_modifier_mask(): always return a value 2011-11-18 15:26:09 +01:00
Michael Natterer
9c79f9f868 Turn the private #define for the group-shifting modifier into API
Add GDK_MODIFIER_INTENT_SHIFT_GROUP to enum GdkModifierIntent
and handle it in gdk_keymap_get_modifier_mask(). Add an X11
impl of the method and return keymap_x11->group_switch_mask.
Return 0 from the default impl because we don't know.
2011-11-18 15:14:31 +01:00
Michael Natterer
1c8481a6ea Bug 663856 - Make option-foo accelerators use the right symbol
If the keyboard group shifting modifier is *also* a normal
accelerator modifier, we need to special case it when calling
gdk_keymap_translate_keyboard_state(), so we get the right
key symbol for accelerators (for example we want Option-O,
not Option-Ø displayed in menu items). This patch should only
affect quartz where the Alt key both shifts the group and can
be used as accel modifier, and not X11 or Win32 where AltGr
is not used for accelerators.

- fix quartz' gdk_keymap_translate_keyboard_state() to return
  the right consumed_modifiers
- add _gtk_translate_keyboard_accel_state() which does the
  special casing
- use it everywhere instead of gdk_keymap_translate_keyboard_state()
2011-11-18 13:06:27 +01:00
Murray Cumming
43dd705308 Fix tiny docs typo. 2011-11-18 11:30:07 +01:00
Alexander Larsson
5f782d2449 win32-theme: Support mixing parts
We need this to do something about the non-existing inconsistent
radio button state in win32.
2011-11-18 11:06:32 +01:00
Alexander Larsson
3309639c1c Add support for win32 theme colors as symbolic colors 2011-11-18 10:16:38 +01:00
Alexander Larsson
ca829b484c Add pulse style class and use in progress bar and entry
This is used for indeterminate progress reporting.
2011-11-18 10:15:04 +01:00
Alexander Larsson
68c74e1427 Set top/bottom style classes on spinbutton buttons 2011-11-17 19:43:13 +01:00
Alexander Larsson
a038c589db Add top/left/bottom/right style classes to steppers
This is needed for e.g. win32 theming, but is also generally
useful.
2011-11-17 17:34:05 +01:00
Alexander Larsson
fdbf029df3 win32-theme: Support multiple parts being combined
This is needed for e.g. scrollbar sliders
2011-11-17 14:34:39 +01:00
Alexander Larsson
5e04549548 Render background image if set for checks and options
The default theme engine draws a fallback check/radio image, but
doesn't let you replace this. We now check if a background image
is set and if so render that instead of the default fallbacks.
2011-11-17 12:30:09 +01:00
Alexander Larsson
bc38cf1ff8 win32-theme: Support -gtk-win32-size CSS value 2011-11-17 12:30:08 +01:00
Alexander Larsson
abe6598a13 Add initial cut at win32 theme support for CSS
We now support -gtk-win32-theme-part(class,part,state) in background
and border-image CSS properties. This renders the corresponding
theme part using DrawThemeBackground() and acts as a base for a
CSS based windows theme.

Note that we build the parsing code even on non-win32 so that
all themese will parse the same on all arches. We draw pink instead
of the actual theme parts on non-win32 though.
2011-11-17 12:29:03 +01:00
Alexander Larsson
8b644b40b1 make _gtk_style_property_resolve copy the result to an output value
This is preparation for allowing it to return a newly created
value, rather than just copying one.
2011-11-17 12:27:23 +01:00
Alexander Larsson
2cf3ff956a Actually pass in a StylePropertyContext when getting images
This is in preparation for getting size-dependent results back
with the win32 themes.
2011-11-17 12:27:23 +01:00
Alexander Larsson
7104b4b575 Remove _gtk_style_properties_peek_property
We want to move to a world where getting style properties can
allocate a new value, depending on the style property context.
In this world we can't expose "peeking" a property, as we neet
to return a ref to the property that is newly created.

So, we move the peek code into get_property and use get_property
from get_valist.
2011-11-17 12:27:22 +01:00
Alexander Larsson
c09148ca09 Add GtkStylePropertyContext and use it in when getting style properties
At the toplevel we have _gtk_theming_engine_get, which lets us pass
in a property context with (atm) the size to get the property for.
Then there is a lot of plumbing to push this down into the lower
layers of the style property code until finally hitting
the property resolvers.

I need this because I will be adding a property resolver for win32
theme parts, and they render differently depending on the size
(i.e. they don't scale linearly). The idea is that the code
to get the background properties will pass in the final size
and we will resolve the theme part specification to that particular
size.

If the old non-context calls are used we just hardcode a size
of 100x100.
2011-11-17 12:27:22 +01:00
Alexander Larsson
e953465e33 Save a generic boxes source in GtkImageBorder
We used to special handle gradient, but we want to be able to store
other sources (that will eventually resolve to cairo patterns).
For instance, this is needed to handle win32 theme part sources.
2011-11-17 12:27:21 +01:00
Alexander Larsson
361fcabbde win32: make fixup_event correctly ref all GdkWindow members
This fixes some crashes related to owner changes and selections.
2011-11-17 12:25:56 +01:00
Alexander Larsson
6690e6dc58 ref, don't unref, requestor member when copying GdkEvents
This seems like a typo, we should obviously ref the member when
copying. Apparently nobody copied GDK_SELECTION_* events...
2011-11-17 11:59:27 +01:00
Michael Natterer
0308352417 notebook: don't leak the action widgets
The notebook owns them, so it must destroy them in destroy().
(cherry picked from commit 87ebfb19fd)
2011-11-17 01:07:37 +01:00
Benjamin Otte
73e54ab727 viewport: Get rid of deprecation warnings 2011-11-17 00:46:15 +01:00
Benjamin Otte
65ceff35f9 viewport: Don't use deprecated functions 2011-11-17 00:46:15 +01:00
Benjamin Otte
5bacd8e019 viewport: adjustments are never NULL
So there's no need to check for that in the getters.
2011-11-17 00:46:15 +01:00
Benjamin Otte
2939eae20f viewport: Initialize the adjustment in the init function 2011-11-17 00:46:15 +01:00
Benjamin Otte
0ef224766a viewport: Don't unset the adjustment on finalize
We unset it on destroy already. This makes it consistent with all other
scrollables.
2011-11-17 00:46:15 +01:00
Xan Lopez
2c065d716b treeview: fix the build 2011-11-16 22:41:57 +01:00
Cosimo Cecchi
9986b26c0b treeview: use gtk_tree_view_ensure_background() consistently
In gtk_tree_view_state_flags_changed() we were setting the background on
the bin_window without the necessary "view" style class, making the
treeview render with the wrong color in some circumstances (such as when
adding an empty treeview in a window, as spotted by Brian Smith).
2011-11-16 16:09:00 -05:00
Cosimo Cecchi
8d97d8ca3c treeview: factor out gtk_tree_view_ensure_background()
We'll use it shortly.
2011-11-16 15:59:47 -05:00
Kjell Ahlstedt
e8bb2e4545 Maintain map/unmap invariants in GtkRecentChooserDialog
We used to explicitly map and unmap the child GtkRecentChooserWidget when
mapping and unmapping the dialog, respectively. Now that GtkContainer actually
unmaps child widgets (instead of avoiding that), we can assume that the
child GtkRecentChooserWidget will be unmapped when we want it to be.

This fixes a warning from gtk_widget_verify_invariants(), as we were mapping
our child widget before calling our parent class' ::map() handler. Bug #659257.
2011-11-16 19:56:11 +01:00
Bastien Nocera
ab27fa9bba tests: Add tests for keypad keys parsing
See https://bugzilla.gnome.org/show_bug.cgi?id=606727
2011-11-16 18:49:54 +00:00
Bastien Nocera
de47b90fd1 gtk: Parse keypad numbers correctly
Try to find keycodes for keysyms at level-0 in the keymap, but don't
fail to parse if we can find those in level-1. This fixes the
parsing of numerical keys on the keypad, which require a shift level
through Num-Lock.

https://bugzilla.gnome.org/show_bug.cgi?id=606727
2011-11-16 18:47:39 +00:00
Bastien Nocera
ef5476f16a tests: Check "without keycode" code path too
And see whether the output of gtk_accelerator_parse()
matches that of gtk_accelerator_parse_with_keycode()
2011-11-16 18:05:41 +00:00
Bastien Nocera
c1bdbe610a Revert "tests: Disable accel test until fixed"
The test now works correctly.

This reverts commit ba397a3431.
2011-11-16 15:02:06 +00:00
Matthias Clasen
43705c7360 Update comment to new realities 2011-11-16 00:27:14 -05:00
Benjamin Otte
acbf37bae7 a11y: Merge function into only caller
Also cleann up comments that are misleading now.
2011-11-16 04:39:26 +01:00
Benjamin Otte
a4b88c47cd treeview: Call a11y functions for culmn changes directly
This way, the a11y code knows if a column was reordered, added or
removed and can do the right things instead of trying to guess and
getting it wrong.

Also, this patch finalizes the changes so that only visible columns
exist to the accessibility interface.
2011-11-16 04:39:25 +01:00
Benjamin Otte
5041286166 a11y: Unify column-by-index getting
We are only ever interested in visible columns. Invisible columns do not
exist for all a11y cares.
2011-11-16 04:39:25 +01:00
Benjamin Otte
857fa84796 tests: Add an invisible column to the tree test
This one should be invisible if everything works as it should.
2011-11-16 04:39:25 +01:00
Benjamin Otte
2e48bb2ccd tests: Add checks for row/column index to accessibility-dump 2011-11-16 04:39:25 +01:00
Benjamin Otte
74e8ac1208 tests: Don't dump stuff twice for tables
Captions and headers are printed as part of the children, so we can
avoid the duplication by just printing the name.
2011-11-16 04:39:25 +01:00
Benjamin Otte
bbf59c75d7 a11y: Use gtk_tree_view_get_n_columns()
In fact, invent our own function get_n_columns() which actually only
counts the visible functions, because that's the only ones we care
about.

The places where it's not used yet will be changed in the coming
patches.
2011-11-16 04:39:25 +01:00
Benjamin Otte
18181f5417 API: treeview: Add gtk_tree_view_get_n_columns() 2011-11-16 04:39:25 +01:00
Benjamin Otte
f7df354c5a a11y: Fix get_column_index() 2011-11-16 04:39:25 +01:00
Benjamin Otte
f7fed686fd a11y: remove argument from get_column_number()
The argument was always FALSE.
2011-11-16 04:39:25 +01:00