Carlos Garnacho
7d2b51f147
GtkThemingEngine: Cairo-ify extension rendering from GtkStyle.
2010-12-04 15:37:21 +01:00
Carlos Garnacho
4772b67563
GtkThemingEngine: Make render_background use drawing primitives.
2010-12-04 15:37:21 +01:00
Carlos Garnacho
1b556aa4d1
GtkThemingEngine: Unify code to render lines.
2010-12-04 15:37:21 +01:00
Carlos Garnacho
75b059a3f2
GtkThemingEngine: Add cairo-ified rendering primitives.
...
Functions to add paths for lines, rectangle sides, and the gap side in notebooks
have been added.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
5cdb3f0e90
GtkThemingEngine: Cairo-ify handle rendering from GtkStyle.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
9261c2a9d7
GtkThemingEngine: Take option rendering from GtkStyle.
2010-12-04 15:37:20 +01:00
Carlos Garnacho
4e45e9099e
GtkThemingEngine: Take checkbox rendering from GtkStyle.
2010-12-04 15:37:19 +01:00
Carlos Garnacho
27f5257d49
GtkStyleContext: Don crash on empty class sets.
2010-12-04 15:37:19 +01:00
Carlos Garnacho
038bcdcdb6
GtkThemingEngine: Use GdkPangoRenderer when painting layouts.
2010-12-04 15:37:19 +01:00
Carlos Garnacho
475f0fc266
GtkStyleContext: Add gtk_style_context_save/restore().
...
This API will be used to have savepoints when adding and removing
style classes information.
2010-12-04 15:37:18 +01:00
Carlos Garnacho
4a465d279d
GtkThemingEngine: Add gtk_theming_engine_get_screen().
2010-12-04 15:37:18 +01:00
Carlos Garnacho
5db7197c27
GtkWidget: Set screen info in GtkStyleContext.
2010-12-04 15:37:18 +01:00
Carlos Garnacho
758c3e18cc
GtkStyleContext: Add gtk_style_context_[gs]et_screen()
2010-12-04 15:37:17 +01:00
Carlos Garnacho
41650933fd
GtkStyleContext: Add priv pointer to object struct.
2010-12-04 15:37:17 +01:00
Carlos Garnacho
10f6c04f33
GtkStyleSet: Add priv pointer to object struct.
2010-12-04 15:37:17 +01:00
Carlos Garnacho
875237187c
GtkCssProvider: Add priv pointer to object struct.
2010-12-04 15:37:17 +01:00
Carlos Garnacho
51a8f642da
Fix include.
2010-12-04 15:37:16 +01:00
Carlos Garnacho
a256171d34
GtkStyleContext: Add gtk_style_context_lookup_icon_set().
2010-12-04 15:37:16 +01:00
Carlos Garnacho
318e0f28ee
GtkStyleProvider: Add gtk_style_provider_get_icon_factory().
...
With this, style providers have a way to override default icon theme.
2010-12-04 15:37:16 +01:00
Carlos Garnacho
be5d4adf6b
GtkCssProvider: Allow symbolic colors when parsing style rules.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
1de8f75517
GtkCssProvider: Parse color mappings.
...
These are of the form:
@color-a: #fff;
@color-b: mix (@color-a, #000 , 0.5)
@color-c: shade (@color-b, 0.7)
In the stylesheet, arbitrary nesting of these commands is handled.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
4ed96df96a
GtkStyleSet: Optionally take GtkSymbolicColors.
...
gtk_style_set_set_property() now takes both GdkColor and GtkSymbolicColor
GValues, All accessors still return GdkColors, so any symbolic color will
be resolved and replaced in the styleset at that time.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
b8fb2d1a36
GtkSymbolicColor: Add method to resolve to a GdkColor.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
e2b8efcbec
GtkStyleSet: Add API to map symbolic colors.
2010-12-04 15:37:15 +01:00
Carlos Garnacho
7094213df9
Add GtkSymbolicColor.
...
This is a small boxed struct used to store symbolic colors so they
can be resolved at a later point.
2010-12-04 15:37:14 +01:00
Carlos Garnacho
d748ea983d
GtkWidgetPath: Add to gtkalias.
2010-12-04 15:37:14 +01:00
Carlos Garnacho
b50c88d170
GtkCssProvider: Plug memory leak.
2010-12-04 15:37:14 +01:00
Carlos Garnacho
2cd4ff4215
GtkCssProvider: Fix compile warning.
2010-12-04 15:37:14 +01:00
Carlos Garnacho
1d4687675f
GtkCssProvider: set scanner->input_name.
2010-12-04 15:37:13 +01:00
Carlos Garnacho
6c91ba1cc2
GtkWidget: Do not reset GtkStyleContext per get_style_context().
2010-12-04 15:37:13 +01:00
Carlos Garnacho
22bae20ce8
GtkWidget: Hook up widget style property querying to style context.
2010-12-04 15:37:13 +01:00
Carlos Garnacho
03370c6e0c
GtkStyleContext: Add methods to get style property values.
2010-12-04 15:37:13 +01:00
Carlos Garnacho
bf12227435
GtkCssProvider: Implement GtkStyleProvider->get_style_property
...
Style properties in the resource files are something like:
-GtkComboBox-appears-as-string
-GtkEntry-icon-prelight
Following the usual naming spec for extensions to CSS.
2010-12-04 15:37:13 +01:00
Carlos Garnacho
37335fbb6f
GtkWidgetPath: Add methods to check topmost widget type.
2010-12-04 15:37:12 +01:00
Carlos Garnacho
6990a01299
GtkStyleProvider: Add method to get widget style properties.
2010-12-04 15:37:12 +01:00
Carlos Garnacho
eaddc9f254
GtkCssProvider: refactor out selector matching.
2010-12-04 15:37:12 +01:00
Carlos Garnacho
eec75f1f59
GtkCssProvider: Ensure each scope has its parser config.
2010-12-04 15:37:12 +01:00
Carlos Garnacho
ff05cc4849
GtkCssProvider: Parse boolean values.
2010-12-04 15:37:12 +01:00
Carlos Garnacho
aa5ec97cac
GtkCssProvider: Make additions to parse_value() less error prone.
2010-12-04 15:37:11 +01:00
Carlos Garnacho
814957021f
Fix compile warning.
2010-12-04 15:37:11 +01:00
Carlos Garnacho
66d1cb8054
GtkStyleSet: Register GtkThemingEngine type.
...
This has been also hooked up to the CSS provider, which parses the "engine"
value to load the corresponding module.
2010-12-04 15:37:11 +01:00
Carlos Garnacho
327a9fc66a
GtkWidget: Generate GtkWidgetPath on set_parent.
...
There's no need to wait for realize() to have the right widget style.
2010-12-04 15:37:11 +01:00
Carlos Garnacho
6906138e45
GtkStyleSet: Remove default value for registered properties.
...
This should be handled at a higher level, a single default value for all
states isn't that useful...
2010-12-04 15:37:10 +01:00
Carlos Garnacho
80e01becbe
Fix compilation.
2010-12-04 15:37:10 +01:00
Carlos Garnacho
a323310c19
GtkNotebook: Set GtkChildClassFlags for tabs.
2010-12-04 15:37:10 +01:00
Carlos Garnacho
e899fdd973
GtkCssProvider: Set default value if no state pseudo-class is specified.
2010-12-04 15:37:10 +01:00
Carlos Garnacho
66accc4184
GtkStyleSet: Add gtk_style_set_set_default().
...
This will set the default value to a given property for all possible states,
such default value will only be used if the queried state doesn't have a
value itself.
2010-12-04 15:37:10 +01:00
Carlos Garnacho
bd9bd1310b
GtkStyleContext: Fix compiler warning.
2010-12-04 15:37:09 +01:00
Carlos Garnacho
17908880b5
GtkStyle: Use new render methods underneath.
...
This commit should probably be squashed in the future, when GtkStyleContext
is on par with it, and GtkStyle is just a shallow object on top of
GtkStyleContext and calling it in the default implementation methods, so
all gtk_paint_* and gtk_draw_* would work.
2010-12-04 15:37:09 +01:00
Carlos Garnacho
f5adc2a1c3
Add region details in gtk_widget_get_path().
2010-12-04 15:37:09 +01:00
Carlos Garnacho
cf27f6f1cf
GtkStyleContext: fix typos in code.
...
The wrong list was being modified in gtk_style_context_set_child_class(),
and gtk_style_context_has_child_class() was checking for *flags != 0, not
flags != NULL.
2010-12-04 15:37:09 +01:00
Carlos Garnacho
104caa74f0
GtkStyleContext: Add gtk_style_context_list_child_classes().
2010-12-04 15:37:09 +01:00
Carlos Garnacho
67c4f8d02e
GtkCssProvider: Compare GtkWidgetPath regions with css.
2010-12-04 15:37:08 +01:00
Carlos Garnacho
977a972358
GtkCssProvider: fix parsing of consecutive pseudo-classes.
...
Now either of foo{}, foo:first-child{}, foo:nth-child(even):insensitive or
foo:active{} will be correctly parsed.
2010-12-04 15:37:08 +01:00
Carlos Garnacho
0be4659c5d
GtkCssProvider: move to next selector element on match or child combinator.
2010-12-04 15:37:08 +01:00
Carlos Garnacho
bc0af3208d
GtkCssProvider: free selector path on parse_rule().
2010-12-04 15:37:08 +01:00
Carlos Garnacho
07171d5f68
GtkCssProvider: Add named regions to selector path.
2010-12-04 15:37:08 +01:00
Carlos Garnacho
707d5ae99c
GtkCssProvider: Parse named regions.
2010-12-04 15:37:07 +01:00
Carlos Garnacho
11c874619b
GtkWidgetPath: Add API for named regions.
2010-12-04 15:37:07 +01:00
Carlos Garnacho
71949e05c4
Refurbish GtkWidgetPath API.
...
The foreach() function is now gone, there's now API to get
GTypes and names from the position in the path.
2010-12-04 15:37:07 +01:00
Carlos Garnacho
f60e3f3a8a
Move GtkChildClassFlags to gtkenums.h.
2010-12-04 15:37:06 +01:00
Carlos Garnacho
8c03503d16
GtkCssProvider: Add support for child/descendant combinators.
...
Now, selectors like:
GtkWindow > GtkButton {}
GtkNotebook > GtkLabel {}
will represent a direct parent/child relation between both elements, while
GtkWindow GtkButton {}
GtkNotebook GtkLabel {}
will allow intermediate children between these.
2010-12-04 15:37:06 +01:00
Carlos Garnacho
d691e79cbf
GtkCssProvider: Fix typo freeing SelectorElements.
2010-12-04 15:37:05 +01:00
Carlos Garnacho
abbeb89b7c
GtkCssProvider: Allow empty selector.
...
universal selector is implied, so things like this work:
:active {}
:insensitive{}
2010-12-04 15:37:05 +01:00
Carlos Garnacho
4c8353bcbf
GtkCssProvider: Allow '*' selectors.
...
These would match a single widget of any type.
2010-12-04 15:37:04 +01:00
Carlos Garnacho
468f216b1c
GtkCssProvider: Add state parsing.
...
Now state is now defined as a pseudoclass in the CSS format, selectors like:
GtkWidget:active { }
GtkButton:insensitive { }
GtkCalendar:prelight { } (also :hover is accepted)
...
define the style for the given state.
2010-12-04 15:37:03 +01:00
Carlos Garnacho
7dada9949d
GtkWidget: Create GtkCssProvider for user modifications.
...
~/.gtk-X.0.css is checked, and added as a style resource if available.
2010-12-04 15:37:03 +01:00
Carlos Garnacho
82f485afd9
GtkStyleProvider: Add defines for most common priorities.
2010-12-04 15:37:02 +01:00
Carlos Garnacho
bccad0c65c
Added GtkCssProvider.
...
GtkCssProvider is a GtkStyleProvider implementation which is able to read
CSS-like input to style widgets.
At the moment, only the basic parser features are available.
2010-12-04 15:37:02 +01:00
Carlos Garnacho
7c5c4d86ae
Add GtkWidgetPath parameter to gtk_style_provider_get_style().
2010-12-04 15:37:02 +01:00
Carlos Garnacho
9971f386b0
GtkStyleSet: Add method to lookup property default settings.
2010-12-04 15:37:01 +01:00
Carlos Garnacho
7647deb417
GtkStyleSet: Make property registration take const GValues.
2010-12-04 15:37:01 +01:00
Carlos Garnacho
fdcda4b356
GtkStyleContext: allow late set_path() calls.
...
Now the properties will only be regenerated whenever there's a GtkWidgetPath
to query about.
2010-12-04 15:37:00 +01:00
Carlos Garnacho
bdadcb568c
GtkStyleContext: Fix compiler warning.
2010-12-04 15:37:00 +01:00
Carlos Garnacho
f984c39e93
GtkStyleContext: Fix typo.
2010-12-04 15:37:00 +01:00
Carlos Garnacho
f8c74ae54b
GtkStyleContext: Add gtk_render_handle().
2010-12-04 15:36:59 +01:00
Carlos Garnacho
9e5d9ff28d
GtkThemingEngine: Add vmethod to render a handle area.
2010-12-04 15:36:59 +01:00
Carlos Garnacho
160821042c
GtkStyleContext: Add gtk_render_extension().
2010-12-04 15:36:59 +01:00
Carlos Garnacho
aa1d492fe9
GtkThemingEngine: Add vmethod to render an extension.
2010-12-04 15:36:58 +01:00
Carlos Garnacho
88492a50d6
GtkStyleContext: Add gtk_render_frame_gap().
2010-12-04 15:36:58 +01:00
Carlos Garnacho
af1edc3d88
GtkThemingEngine: Add vmethod to render frames with a gap.
2010-12-04 15:36:58 +01:00
Carlos Garnacho
6a1b54f8bf
GtkStyleContext: Add gtk_render_slider().
2010-12-04 15:36:57 +01:00
Carlos Garnacho
2ebdf80adc
GtkThemingEngine: Add vmethod to render sliders.
2010-12-04 15:36:57 +01:00
Carlos Garnacho
86727adc4d
GtkStyleContext: Add gtk_render_line().
2010-12-04 15:36:57 +01:00
Carlos Garnacho
b8f6617d99
GtkThemingEngine: Add vmethod to render lines.
2010-12-04 15:36:56 +01:00
Carlos Garnacho
f80fbbd829
GtkStyleContext: Add gtk_render_layout().
2010-12-04 15:36:56 +01:00
Carlos Garnacho
92994a0129
GtkThemingEngine: Add vmethod to render layouts.
2010-12-04 15:36:56 +01:00
Carlos Garnacho
0486f5bbc0
GtkStyleContext: Add gtk_render_focus().
2010-12-04 15:36:56 +01:00
Carlos Garnacho
8439537e2f
GtkThemingEngine: Add vmethod to render focus indicator.
2010-12-04 15:36:55 +01:00
Carlos Garnacho
9c3b079c1c
GtkStyleContext: Add gtk_render_expander().
2010-12-04 15:36:55 +01:00
Carlos Garnacho
19fdaabf4c
GtkThemingEngine: Add vmethod to render expanders.
2010-12-04 15:36:55 +01:00
Carlos Garnacho
b4c8eba480
GtkStyleContext: Add gtk_render_frame().
2010-12-04 15:36:55 +01:00
Carlos Garnacho
48990bc71c
GtkThemingEngine: Add vmethod to render frames.
2010-12-04 15:36:54 +01:00
Carlos Garnacho
25488633ec
GtkStyleContext: Add gtk_render_background().
2010-12-04 15:36:54 +01:00
Carlos Garnacho
13812de971
GtkThemingEngine: Add vmethod to render backgrounds.
2010-12-04 15:36:54 +01:00
Carlos Garnacho
01a8e06842
GtkStyleContext: Add gtk_render_arrow().
2010-12-04 15:36:54 +01:00
Carlos Garnacho
b7ca7d19ee
GtkThemingEngine: Add vmethod to render arrows.
2010-12-04 15:36:54 +01:00
Carlos Garnacho
1c15b140a9
GtkStyleContext: Add gtk_render_option().
2010-12-04 15:36:53 +01:00
Carlos Garnacho
263f6de0e5
GtkThemingEngine: Add vmethod to render radio buttons.
2010-12-04 15:36:53 +01:00
Carlos Garnacho
401625b8b3
GtkStyleContext: Add gtk_render_check().
2010-12-04 15:36:53 +01:00
Carlos Garnacho
acf4306bcd
GtkThemingEngine: Add vmethod to render checkboxes.
2010-12-04 15:36:53 +01:00
Carlos Garnacho
bf7a9914dd
GtkThemingEngine: Add accessors to style classes.
2010-12-04 15:36:53 +01:00
Carlos Garnacho
fe4a6cea73
GtkWidget: Add widget path to style context.
2010-12-04 15:36:53 +01:00
Carlos Garnacho
1d2aa61407
GtkStyleContext: Add child style classes.
...
Child style classes are like style classes, but with additional positional
information. This would be usually set by the parent container.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
9a76d1a332
GtkStyleContext: Add style classes.
...
Style classes are the replacement of detail strings.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
bd3b97d82b
GtkStyleContext: Relate to a GtkThemingEngine.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
0171c76871
GtkThemingEngine: Add module loading capabilities.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
57be029b15
Add GtkThemingEngine.
...
GtkThemingEngine will be the theming engines base class, with default
implementations for all paint functions, and readonly access to the
related GtkStyleContext data.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
b7e6ae3983
GtkStyleContext: Add gtk_style_context_[gs]et_path()
...
This relates a GtkStyleContext with a widget path, so
all style querying would happen based on it.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
9794b6adf9
GtkWidget: Add gtk_widget_get_path().
...
This function composes and returns a GtkWidgetPath representing
the passed widget.
2010-12-04 15:36:52 +01:00
Carlos Garnacho
61360dfddf
Add GtkWidgetPath.
...
GtkWidgetPath represents a widget path. It will mainly used by theming
engines to know detail about the widget hierarchy without actually
accessing the widget.
2010-12-04 15:36:51 +01:00
Carlos Garnacho
835cc7049c
GtkStyleContext: Add getters and setter for state.
2010-12-04 15:36:51 +01:00
Carlos Garnacho
3f93c714ae
GtkWidget: Add gtk_widget_get_style_context().
...
There will be one GtkStyleContext per widget, at the moment its
lifetime is tied to the widget's, but it could be narrowed down
to GTK_WIDGET_REALIZED.
2010-12-04 15:36:51 +01:00
Carlos Garnacho
2e96770e0b
Add GtkStateFlags.
...
It basically represents GtkStateType as a flag set.
2010-12-04 15:36:50 +01:00
Carlos Garnacho
8a7e035ac7
GtkStateType: Add inconsistent and focused state.
2010-12-04 15:36:50 +01:00
Carlos Garnacho
b82355c76e
GtkStyleContext: Fix typo.
2010-12-04 15:36:50 +01:00
Carlos Garnacho
28b7782d78
GtkStyleSet: Add method to register border property.
2010-12-04 15:36:50 +01:00
Carlos Garnacho
16484f8459
GtkStyleSet: Add method to register font properties.
2010-12-04 15:36:49 +01:00
Carlos Garnacho
1a3d964615
GtkStyleContext: Add methods to query composed style.
2010-12-04 15:36:49 +01:00
Carlos Garnacho
2da033b18c
GtkStyleSet: Return default value if value is not set.
2010-12-04 15:36:49 +01:00
Carlos Garnacho
9fdcbd7a84
GtkStyleSet: Add valist and varargs getters/setters.
2010-12-04 15:36:48 +01:00
Carlos Garnacho
2bf7483e74
GtkStyleSet: Use property GQuark as store keys.
2010-12-04 15:36:48 +01:00
Carlos Garnacho
4c60de4783
GtkStyleSet: Add style property registration funcs.
...
Also some properties have been added as a default set.
2010-12-04 15:36:48 +01:00
Carlos Garnacho
2b425d89c8
Add GtkStyleContext.
...
GtkStyleContext will conglomerate the information of several
GtkStyleProviders for widgets and theme engines to query it.
2010-12-04 15:36:48 +01:00
Carlos Garnacho
530ae15f96
gtkstyleset.h: Add declaration for gtk_style_set_merge().
2010-12-04 15:36:48 +01:00
Carlos Garnacho
f969470ad8
GtkStyleSet: Implement GtkStyleProvider.
...
As simple as it can get.
2010-12-04 15:36:47 +01:00
Carlos Garnacho
019fa73308
Add GtkStyleProvider, an interface to provide style details.
...
The get_style() function isn't final yet, further parameters
should be added to query details based on the widget hierarchy,
name, etc.
2010-12-04 15:36:47 +01:00
Carlos Garnacho
f601abd25f
Add GtkStyleSet, a store of style properties.
...
At the moment there's only basic API for adding,
removing and clearing a property. There's also
API to merge 2 GtkStyleSets.
2010-12-04 15:36:47 +01:00
Carlos Garnacho
06288b5ae8
Add GTK_STATE_LAST to mark the end of GtkState enum.
2010-12-04 15:36:47 +01:00
Michael Natterer
e4cbe47a11
gtk: properly indent calls to gdk_threads_add_timeout()
2010-12-02 23:01:12 +01:00
Benjamin Otte
0b6c184eaa
label: Clarify docs for gtk_label_get_layout()
2010-12-02 20:21:05 +01:00
Benjamin Otte
b3e8504111
x11: Don't include gdkprivate.h in gdkx.h
...
It's private, mkay?
And include it directly where we need it anyway.
2010-12-02 20:21:05 +01:00
Benjamin Otte
a6b407cf4a
gtk: Fix typos in comment
2010-12-02 20:21:05 +01:00
Benjamin Otte
f5be938840
gtk: Don't include private GDK headers
...
Use the function that exists for this purpose instead.
2010-12-02 20:21:05 +01:00
Benjamin Otte
3494f87a10
API: Remove GdkNoExposeEvent
...
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00
Benjamin Otte
804c2c8350
cellrenderer: Fix docs to say cairo_t instead of GdkDrawable
2010-12-02 20:21:04 +01:00
Benjamin Otte
771fa78257
textbuffer: Remove check for GdkDrawable
...
This should only have been used for stipple patterns, and those are gone
now.
2010-12-02 20:21:02 +01:00
Benjamin Otte
a7e6d6c4b4
gtk: Avoid GdkDrawable usage, including needless casts
2010-12-02 20:21:02 +01:00
Benjamin Otte
e724054d19
API: Remove GDK_WINDOW_XWINDOW() macro
...
Use GDK_WINDOW_XID() instead.
THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
Bastien Nocera
66122b369e
gtk: Centre the text under the icon in GtkIconView
...
No point in setting the alignment to centre if we don't center it
within the cell itself.
2010-12-02 15:04:32 +00:00
Matthias Clasen
dd678ac323
Avoid a warning when finalizing toolbars
...
Recent changes cause disposing menus to emit ::deactivate. So better
disconnect the deactivate handler first.
2010-12-01 23:32:35 -05:00
Cosimo Cecchi
6587652433
app-chooser-button: don't insert empty rows in the combobox
2010-12-01 20:18:12 +01:00
Cosimo Cecchi
b17f033857
app-chooser-button: add a note in the docs
2010-12-01 17:04:22 +01:00
Cosimo Cecchi
6e6379c633
app-chooser: add docs and symbols coverage for new API
2010-12-01 17:04:22 +01:00
Cosimo Cecchi
510d65ba08
app-chooser-button: add gtk_app_chooser_button_set_active_custom_item()
...
This allows to pre-select a custom item.
2010-12-01 17:04:22 +01:00
Cosimo Cecchi
9ffd1f7adb
app-chooser-button: make sure to always get a valid iter
...
Even in case there are no installed applications for our content type.
2010-12-01 17:03:51 +01:00
Bastien Nocera
959fc60c47
gtk: Allow hiding the trough/slider in GtkScale
...
When setting a GtkRange's upper and lower values to the same
value, the slider will not be drawn any more.
https://bugzilla.gnome.org/show_bug.cgi?id=549720
2010-12-01 15:39:50 +00:00
Emmanuele Bassi
b9859de917
switch: Fix the attribution line
...
Thomas Wood pointed out that the original MxGtkLightSwitch widget upon
which I based the behaviour of GtkSwitch was not written by him; the
original authors are:
Joshua Lock
Robert Staudinger
Jussi Kukkonen
My apologies to all of them.
2010-11-30 21:54:48 +00:00
Cosimo Cecchi
117e88646f
Merge branch 'open-with-dialog'
2010-11-30 17:31:59 +01:00
Cosimo Cecchi
4fe23cae78
app-chooser: other misc doc fixes
2010-11-30 17:27:53 +01:00
Cosimo Cecchi
960516bf33
app-chooser: add more symbols & docs
2010-11-30 16:30:33 +01:00
Cosimo Cecchi
cb916f2746
Merge branch 'master' into open-with-dialog
...
Conflicts:
docs/reference/gtk/gtk3-sections.txt
gtk/gtk.symbols
2010-11-30 16:27:28 +01:00
Guillaume Desmottes
8076dbfb5c
gtkspinner: don't setup the timeout twice ( #636129 )
2010-11-30 15:59:49 +01:00
Cosimo Cecchi
5f942b1232
app-chooser-button: remove leftover typedef
2010-11-30 15:04:50 +01:00
Cosimo Cecchi
50e967d17b
build: order new files alphabetically
2010-11-30 15:04:00 +01:00
Cosimo Cecchi
d8ef15c592
app-chooser: update docs
2010-11-30 15:03:33 +01:00
Ryan Lortie
922324553b
Bug 619148 - "active ID" properties (GtkComboBox)
...
Based on a patch by Matthias, add an "active-id" property for
GtkComboBox and add some convenience API for GtkComboBoxText.
Also, add a test case to gtk-demo.
2010-11-30 00:29:16 -05:00
Emmanuele Bassi
781d4faf4c
a11y: Use ATK macros and clean up/2 - GtkSpinner
...
ATK provides macros to the same effect as G_DEFINE_TYPE; using these
macros has the advantage of removing tons of duplicated code and
reducing the maintainership burden.
The widgets with inline accessibility implementation should switch to
these macros, and clean up the code.
https://bugzilla.gnome.org/show_bug.cgi?id=636060
2010-11-30 02:06:57 +00:00
Emmanuele Bassi
e7966a2c0c
a11y: Use ATK macros and clean up/1 - GtkAssistant
...
ATK provides macros to the same effect as G_DEFINE_TYPE; using these
macros has the advantage of removing tons of duplicated code and
reducing the maintainership burden.
The widgets with inline accessibility implementation should switch to
these macros, and clean up the code.
https://bugzilla.gnome.org/show_bug.cgi?id=636060
2010-11-30 02:06:56 +00:00
Matthias Clasen
2fffce2c23
Forgotten changes
2010-11-29 16:47:45 -05:00
Javier Jardón
f07480eb44
GtkSwitch: Add missing "Since: 3.0" tags
2010-11-29 22:00:49 +01:00
Matthias Clasen
9c1e61e9aa
Revert c00b85bf3f
...
This needs more work, currently we do dupe targets when copying
target entries in various places, and consequently free them
later. To do this correctly, the strings need to be interned
or something like that.
2010-11-29 13:00:04 -05:00
Matthias Clasen
670dfdb7cc
Re-add some conditionals to symbols files
...
We need to keep the ifdefs for platform abi differences.
2010-11-29 12:47:44 -05:00
Cosimo Cecchi
51cb082022
app-chooser-online: rework of the online module
...
- the _get_default() method is now async
- the PackageKit module will return NULL in case PackageKit is not
available in the session bus
- the dummy module doesn't exist anymore
- the dialog won't display the online button in case there's no module
available
2010-11-29 18:10:06 +01:00
Matthias Clasen
6b5221380e
remove some duplicate symbols
2010-11-29 12:04:38 -05:00
Matthias Clasen
2451e6f690
Small doc fixup
2010-11-29 11:25:10 -05:00
Cosimo Cecchi
134e74177e
app-chooser-button: tabs to spaces
2010-11-29 16:10:58 +01:00
Cosimo Cecchi
232a5c7b3b
app-chooser-button: change the API approach for custom items
...
Introduce a 'custom-item-activated' on the widget, which behaves
similairly to GtkEntryCompletion::action-activated, i.e. is emitted when
a custom item is chosen from the dropdown list.
Clients can use the name provided when adding the item as a detail for
the signal, to get notified when that specific item is activated, or use
the signal without details to get notifications for all custom items.
2010-11-29 16:04:59 +01:00
Emmanuele Bassi
1f71d641e8
switch: Use ATK macros to reduce the amount of code
...
And the insanity.
Reviewed-by: Christian Persch <chpe@gnome.org>
2010-11-29 14:06:02 +00:00
Emmanuele Bassi
9ad31a5a21
switch: Use the right value for comparison
2010-11-29 13:23:28 +00:00
Emmanuele Bassi
ae95cdf8fc
switch: Add accessibility implementation
...
Modelled on GailToggleButton.
https://bugzilla.gnome.org/show_bug.cgi?id=634987
2010-11-29 12:52:10 +00:00
Emmanuele Bassi
0cd0e4091f
Add GtkSwitch, a "light-switch" like widget
...
The GtkSwitch widget is a simple UI control that has two states: on and
off. Toggling between the states is possible by clicking the widget or
by dragging the handle.
https://bugzilla.gnome.org/show_bug.cgi?id=634987
2010-11-29 12:52:10 +00:00
Cosimo Cecchi
8ae7993397
app-chooser-button: include gtk-docs for show-dialog-item
2010-11-29 12:25:52 +01:00
Cosimo Cecchi
06f501fa07
app-chooser-button: rename GtkAppChooserComboBox -> GtkAppChooserButton
2010-11-29 12:19:18 +01:00
Emmanuele Bassi
1779ae79a1
rgba: Invert the arguments and improve bindability
...
Since parse() is a method of the Gdk.RGBA class, the GdkRGBA pointer
should be the first argument, and the string the second one, to allow a
more natural binding.
https://bugzilla.gnome.org/show_bug.cgi?id=635879
2010-11-28 19:01:51 +00:00
Matthias Clasen
289ad41bd1
Fix recursion in the GtkIconView accessible initialization
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=634474
2010-11-27 20:56:09 -05:00
Cosimo Cecchi
67e842be87
app-chooser-combobox: add a method to trigger the GtkAppChooserDialog
...
It's an optional special item in the combobox, turned off by default.
2010-11-25 17:30:01 +01:00
Tristan Van Berkom
eb5a500495
Changing GtkBox:fill child property default back to TRUE.
...
Since Havoc's patches introducing the GtkWidget halign/valign
properties, fill should always be TRUE. If the widget should
not fill its allocated space then it should set the halign or
valign properties for that purpose.
This also consequently fixes bug 634592.
2010-11-25 14:37:02 +09:00
Tristan Van Berkom
6716e7c3f1
Fixed GtkMenuShell to deactivate itself at dispose time
...
Since GdkDevice stuff, it seems that destroying an active
menu doesnt get rid of all the device grabery, this fixes
bug 635693.
2010-11-25 14:08:55 +09:00
Matthias Clasen
a498d9a9ba
Coding style fixups
...
This commit adjusts the app chooser code to GTK+ coding style:
- line up prototypes
- remove some excess {}
- remove tabs and trailing whitespace
- add docs
2010-11-24 18:32:05 -05:00
Matthias Clasen
47308db2ba
Fix reference counting for icons
2010-11-24 16:09:55 -05:00
Michael Natterer
c00b85bf3f
Bug 565665 - GtkTargetEntry member target should be const char *
2010-11-24 21:01:45 +01:00
Cosimo Cecchi
183d75b812
app-chooser-combobox: make refresh properly work with custom items
...
The refresh implementation leaves the custom items in place, and just
refreshes the recommended applications.
2010-11-24 19:08:17 +01:00
Cosimo Cecchi
2a95707b4c
app-chooser-combobox: add an initial implementation
...
GtkAppChooserCombobox is an implementation of GtkAppChooser inside a
combobox that shows recommended applications for a given content type.
2010-11-24 18:45:42 +01:00
Cosimo Cecchi
627f9b70a7
app-chooser-dialog: add a 'Forget Association' context menu item
2010-11-24 17:12:08 +01:00
Cosimo Cecchi
6b900cf276
app-chooser-widget: add a 'populate-popup' signal for context menus
...
This way applications can append items to the menu, which will
automatically show when there's more than one item in it.
2010-11-24 17:12:04 +01:00
Benjamin Otte
e0fb7a86e5
gtk: Remove GtkRuler
...
It is really bad code, mostly unused and no one stepped up to fix it.
Note that Gtk developers do not object to a ruler widget in priciple,
just to the current implementation. If someone wants to propose a sane
version, please don't hesitate.
https://bugzilla.gnome.org/show_bug.cgi?id=613942
2010-11-24 16:56:10 +01:00
Benjamin Otte
c5e25b1532
gtk: Remove unused variables from build scripts
...
ALL_FILES and INCLUDE_VARIABLES are unused
2010-11-24 16:40:40 +01:00
Benjamin Otte
0c0b1c3a46
gtk: Uncruftify gtk.symbols
2010-11-24 16:39:32 +01:00
Cosimo Cecchi
067b4ccb33
Revert "open-with-dialog: remove automatic setting of support-for-type"
...
This reverts commit 4cfe121296
.
Conflicts:
gtk/gtkappchooserdialog.c
2010-11-24 15:49:47 +01:00
Tor Lillqvist
4e59750ac0
No fsync on Windows
2010-11-24 14:36:29 +02:00
Michael Natterer
fb5dd9f72f
Move all GdkDevice members to private and add one missing accessor
2010-11-23 20:25:13 +01:00
Cosimo Cecchi
abf3b4af07
open-with-widget: make sure to escape the string we use for markup
2010-11-23 18:15:28 +01:00
Cosimo Cecchi
d0c35d63e0
Revert "open-with-widget: don't check if the app supports URIs/files"
...
This reverts commit b432242078
.
2010-11-23 18:10:01 +01:00
Cosimo Cecchi
05bb715c51
app-chooser: rename GtkOpenWith to GtkAppChooser
2010-11-23 17:50:15 +01:00
Cosimo Cecchi
6f0a605891
open-with-dialog: don't show the 'Show More...' button in all mode
2010-11-23 16:53:23 +01:00
Cosimo Cecchi
b432242078
open-with-widget: don't check if the app supports URIs/files
...
Because some apps are broken wrt. this property.
2010-11-23 16:53:23 +01:00
Cosimo Cecchi
e861180a03
open-with-widget: add a show-default property
2010-11-23 16:53:23 +01:00
Cosimo Cecchi
0833894c38
open-with-widget: remove context menu
...
The widget should not modify itself the application list in any way.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
cb934ad868
open-with-widget: remove radio mode
...
It's not useful for now.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
9d550fe42a
open-with-pk: don't show an error if no apps are found
...
gnome-packagekit already shows a message dialog for us.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
04eb875e86
open-with-diaolog: set the default text according to the dialog mode
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
1be137ae9f
open-with-widget: let the default fallback text be customizable
...
We'll set it from the dialog.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
2cb1b7e891
open-with: move the "Show more applications" button in the dialog
...
It doesn't really belong in the widget now that we have the new states.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
4cfe121296
open-with-dialog: remove automatic setting of support-for-type
...
We don't want to hardcode any kind of policy in these widgets/dialogs from
now on.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
3b6941f087
open-with: add a public _refresh() method
...
This can be useful now that we're splitting some items from the widget.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi
f12ff4b676
open-with-widget: move to a property-based state
...
We can enable on-demand one of the three sections (recommended,
fallback, other apps) or use the special ALL property to display everything
uncategorized.
These properties are also easily bindable from outside.
2010-11-23 16:53:17 +01:00
Cosimo Cecchi
09b8d37b8a
open-with-dialog: use misc_set_alignment instead of widget_set_halign
2010-11-23 16:51:41 +01:00
Cosimo Cecchi
e7194c31a7
open-with-pk: don't set error if the user cancelled the installation
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
9df2c0910d
open-with-dialog: integrate the online capability
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
d4e1dd9734
open-with: add a PackageKit module for online lookup of applications
...
It's implemented with a GIOExtensionPoint, which has two
implementations:
- a dummy one, which just errors out
- a PackageKit one, which looks up for the specified content type using
the PK DBus API and GDBus.
The PK module is optional, and can be compiled out at configure time.
TODO: a Win32 implementation of the module.
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
86a8f99806
open-with-widget: don't forget to set the search column
...
Otherwise find-as-you-type won't work at all.
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
4becd25bf5
open-with-widget: don't sort by name recommended apps
2010-11-23 16:51:40 +01:00
William Jon McCann
9bbbfe3aa8
Using italics here actually introduces more visual clutter than anything
2010-11-23 16:51:40 +01:00
William Jon McCann
370ecf0ee8
Use Related instead of the somewhat jargonny fallback
2010-11-23 16:51:40 +01:00
William Jon McCann
3c7e6cd49c
Use other instead of more
...
More doesn't make sense when there are no apps in the list and
they aren't just more apps they are apps in another category.
2010-11-23 16:51:40 +01:00
William Jon McCann
8ea4faf0d3
The colon is a bit unneccessary and looks a bit ugly
2010-11-23 16:51:40 +01:00
William Jon McCann
1226070b93
Improve wording of no apps text
2010-11-23 16:51:40 +01:00
William Jon McCann
d09550b2d2
Simplify title and heading
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
8b16f73f88
open-with-widget: don't set border in the widget box
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
9a1cd83933
open-with-widget: add support for fallback applications
...
Needs some new API in GIO, which is not yet merged.
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
a443eb8602
open-with-dialog: remove old declarations
2010-11-23 16:51:40 +01:00
Cosimo Cecchi
1bb2a1b9ec
open-with: remove obsolete code
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
9150f6b13a
open-with-widget: simplify code a bit
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
a6a56d4194
open-with-widget: add a "Show more applications" button
...
So that we don't always show them all unconditionally in HEADINGS mode.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
7d8e7e5f1d
open-with-widget: make the list more pretty
...
Use bigger icons, with bold names and italic descriptions next to them.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
9ffe52c049
open-with-dialog: don't ever show_all()
...
As there might be some elements in the widget that we don't want to
always show.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
254cc6aca6
open-with-widget: add a context menu for recommended entries
...
We can put "Forget association" there, which removes the application
from the recommended list.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
2f5073fbb3
open-with-dialog: remove the mode from the dialog, we won't use it anymore
...
According to the new design, the dialog should automatically do the
right thing wrt. app association and default handling.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
cf25ec8fa7
open-with: first attempt to split the dialog into a widget + interface
...
Like GtkFileChooser does; GtkOpenWith is a generic interface, which is
now implemented by both GtkOpenWithDialog and GtkOpenWithWidget (and in
the future also by GtkOpenWithComboBox).
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
a4283d7bab
open-with: turn the show_all_applications boolean into an enum
...
We have three modes of showing applications now:
- RECOMMENDED mode: shows only the recommended applications
- ALL mode: shows all applications, uncategorized
- HEADINGS: shows headings for recommended and other applications
(default).
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
77b5fcfa93
open-with: add docs and integrate with the build GTK+ conventions
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
8c8f7f83ba
open-with: add gtk_open_with_dialog_get_mode()
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
df8ccfb800
open-with: change the API to make it symmetric for GFile or content-type
...
It's much more convenient this way.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
accb766db2
open-with: add misc utility API to the dialog
...
- _set/get_show_other_applications() is a way to only display
recommended applications in the dialog
- _set/get_show_set_as_default_button() is a way to control the
"Remember this application" checkbox
We also get rid of he "application-selected" signal, in favour of a
_get_selected_application() API inspired by GtkFileChooser.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi
a8cf63cc84
open-with: add xpadding to the treeview renderers
...
We use a GtkCellRenderer hack for this.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi
ee9a7a3baf
open-with: cope with NULL GAppInfo
...
It's not that the GAppInfo can actually be NULL, but we use the store to
save headings too, which have no GAppInfo in their rows.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi
1d67b4ac26
open-with: don't override the class signal handler, as it's RUN_LAST
...
And explain why in a comment; basically we want our handler to always
run before client code.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi
c8ea415873
open-with: don't use gtk_misc_* functions
...
They're so passe'!
2010-11-23 16:51:38 +01:00
Cosimo Cecchi
3d044a7c3e
open-with: add a "show-other-applications" property
...
This is useful for use-cases where showing a list of all the installed
applications can be confusing. We can control that with a property now.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi
be18ca45f0
open-with: initial implementation of GtkOpenWithDialog
2010-11-23 16:51:38 +01:00
Colin Walters
6c6b493926
iconcache: Ensure we don't lose data on power loss
...
fsync() should ensure our data hits disk; since corrupt icon
caches break all apps, we need to ensure it's valid.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=635307
2010-11-22 20:49:59 +01:00
John (J5) Palmieri
f2a187f27a
[gi] add array annotations for DnD related methods
2010-11-19 15:06:40 -05:00
Michael Natterer
bc0e6b2b21
gtk: remove GtkWidget::size-request
...
Fixes Bug 633324 - Stop invoking size-request completely
2010-11-19 19:38:48 +01:00
Martin Pitt
3431f7a2d7
GtkRadioButtons: Mark group arguments as "allow-none"
...
In the current introspection data, the various gtk_radio_button_new_*
constructors take an existing group or widget. These all allow passing a NULL
widget or group list, so that it becomes easy to build a radio button list in a
loop (pass in None the first time, and the previously created button in all
other iterations).
Add the missing "allow-none" tag to the introspection data, so that this will
also eventually work for GIR users. NB that it does not actually work for some
constructors yet (like new_with_label_from_widget()) due to
https://bugzilla.gnome.org/show_bug.cgi?id=561264 .
https://bugzilla.gnome.org/show_bug.cgi?id=635253
2010-11-19 16:29:43 +01:00
Michael Natterer
c2fd7e8350
gtk: draw the frame around the spinbutton's buttons conditionally
...
(depending on GtkEntry::has-frame)
2010-11-19 14:55:47 +01:00
Javier Jardón
4e3db2e3a8
gtkcombobox: Use accessor functions to access GtkTreeViewColumn
2010-11-19 08:38:12 +01:00
Javier Jardón
224ce2cf6c
gtktreeview: Use accessor functions to access GtkTreeViewColumn
2010-11-19 08:38:12 +01:00
Javier Jardón
c4be956473
gtkentry: move public members to private structure
2010-11-19 08:38:12 +01:00
Javier Jardón
8c941d2b4e
Add _gtk_entry_get_im_context() internal accessor
...
It's needed by gtktreeview
2010-11-19 06:15:27 +01:00