Commit Graph

25757 Commits

Author SHA1 Message Date
Benjamin Otte
76e56c5038 win32: Stop using _gdk_display global in device code
Use gdk_device_get_display() instead.
2016-02-11 03:44:47 +01:00
Benjamin Otte
ccbfa64d67 win32embedwidget: Mark deprecated sections 2016-02-11 03:44:47 +01:00
Benjamin Otte
ccc7e3058c filechoosernativewin32: Silence gcc 2016-02-11 03:44:47 +01:00
Benjamin Otte
068f8a3da1 filechoosernativewin32: Add missing return type
Looks like a line accidentally was deleted there.
2016-02-11 03:44:47 +01:00
Benjamin Otte
117e303b44 filechoosernativewin32: Define MSC_VER at top of file
The headers we include might include windows headers which define _MSC_VER already.
2016-02-11 03:44:47 +01:00
Benjamin Otte
0ea9131ff7 printoperation-win32: Silence gcc 2016-02-11 03:44:47 +01:00
Benjamin Otte
573f51cb29 mountoperation: Silence gcc
Also, printf()ing a GPid should be forbidden.
2016-02-11 03:44:47 +01:00
Benjamin Otte
1d980192fa immodule: Stop gcc from complaining 2016-02-11 03:44:47 +01:00
Timm Bäder
becfd18b07 overlay: set css name 2016-02-10 14:03:56 +01:00
Timm Bäder
bdd182f38c frame: Set border gadget state after creating it 2016-02-10 14:03:39 +01:00
Timm Bäder
c44364f1d1 spinbutton: Free the gadget in finalize 2016-02-10 12:30:35 +01:00
Timm Bäder
8ea573b473 css node tree: Fix crash
This function would return "" whenever the state of the css node was
unset, causing a crash when selecting the css node tree from the
sidebar.
2016-02-10 12:28:32 +01:00
Matthias Clasen
a3a5cf1087 text view: Improve tag pointer tracking
A problem that has been observed in polari is that links in tags
are clickable all the way into the margin. This problem is caused
by gtk_text_view_get_iter_at_position ignoring the return value
of pango_layout_xy_to_index. Instead, pass it back as a boolean
return value. This is technically an API break, but we've allowed
ourselves to change return types from void to gboolean before.
2016-02-10 00:01:54 -05:00
Rui Matos
019dab7c38 gtkmagnifier: Avoid a crash if the inspected widget is finalized
If the inspected widget is finalized and we then try to disconnect
from its signals we'll crash.

https://bugzilla.gnome.org/show_bug.cgi?id=761775
2016-02-09 15:35:17 +01:00
Timm Bäder
1331b60029 A few more documentation fixes 2016-02-09 08:05:16 +01:00
Timm Bäder
c5369356e8 Various documentation fixes
Always have Since: annotations at the very bottom, use the correct
ClassName::signal-name/ClassName:property-name syntax, fix a few typos
in type names, wrong function names, non-existing type names, etc.
2016-02-08 22:56:52 +01:00
Rico Tzschichholz
76fedc1882 gtk: Fix some return-values annotations (transfer none/full) 2016-02-08 14:03:55 +01:00
Matthias Clasen
dc407dbc8f inspector: Avoid crash in magnifier
We can't use gtk_widget_draw on widgets that are not allocated.
2016-02-08 09:34:24 +01:00
Timm Bäder
486a0a467d image: _get_style_context never returns NULL 2016-02-07 19:16:26 +01:00
Timm Bäder
ded745a4b9 Make gtk_icon_helper_invalidate private 2016-02-07 19:16:26 +01:00
Timm Bäder
0bd6c48315 Add and use gtk_icon_helper_invalidate_for_change 2016-02-07 19:16:26 +01:00
Timm Bäder
0c80210685 iconhelper: Save whether the surface is symbolic 2016-02-07 19:16:26 +01:00
Timm Bäder
0ec4c76d8f stylepropertyimpl: Use GTK_CSS_AFFECTS_SYMBOLIC_ICON
Things like color affect symbolic icons, but not colored icons, while
other css properties like -gtk-icon-effect affect colored icons, but not
symbolic ones.
2016-02-07 19:16:26 +01:00
Timm Bäder
2d8db26cbf csstypes: Add GTK_CSS_AFFECTS_SYMBOLIC_ICON 2016-02-07 19:16:26 +01:00
Timm Bäder
d3a0dfe81a cssstylechange: Add helper function to print change
So I don't have to print both styles to the console, paste them both
into a file and then run diff on the 2 files anymore.
2016-02-07 19:16:26 +01:00
Timm Bäder
2902063f24 iconhelper: Un-duplicate some code 2016-02-07 19:16:26 +01:00
Timm Bäder
c360b5fb49 Remove more unnecessary redraws
The call to gtk_widget_set_state_flags immediately before these already
queues a redraw/allocate/resize in case they have to be queued.
2016-02-07 19:16:26 +01:00
Matthias Clasen
667069cff2 Adwaita: No rounded corners for fullscreen
If the theme has rounded corners for fullscreen, we don't tell the
window manager that we are now fully opaque, which then makes things
less efficient than they should be.

https://bugzilla.gnome.org//show_bug.cgi?id=761571
2016-02-07 18:00:29 +01:00
Matthias Clasen
af64a60466 box gadget: Fix allocation without baseline
When we don't get a baseline passed in, we want to basically
center the children inside the allocation. There was an attempt
in the code to do 'internal baseline alignment', but it had the
side effect of moving the contents to the top when we don't get
a baseline passed in. Remove it for now, this needs some more
infrastructure to do properly.

https://bugzilla.gnome.org/show_bug.cgi?id=761363
2016-02-07 15:08:56 +01:00
Matthias Clasen
c3c01d8cbc level bar: Document buildable syntax 2016-02-07 11:43:13 +01:00
Matthias Clasen
ccd8c76ff2 level bar: Fix offset behavior
We had some odd special-casing for the lowest and highest offset
that did not quite work. The new rule is simple: If the value
is between offset n-1 and n, it gets the style for offset n.

https://bugzilla.gnome.org/show_bug.cgi?id=761416
2016-02-06 16:43:45 +01:00
Matthias Clasen
1a71579b61 level bar: Improve documentation
The docs were not explaining at all what happens to existing
level offsets when the min- or max-value of a level bar are
changed.
2016-02-06 16:19:13 +01:00
Matthias Clasen
8776bb5324 level bar: Make the full offset official
We are adding 3 offsets, not just two. Add a define for the
third one, and mention it in the docs.
2016-02-06 16:11:17 +01:00
Benjamin Otte
d48d3b359c cssselector: Remove type references
We don't use types anymore.
2016-02-05 23:47:48 +01:00
Benjamin Otte
e8fca5bbbe cssmatcher: Remove type argument from name matcher
We no longer use types when matching names.
2016-02-05 23:43:05 +01:00
Benjamin Otte
fe6d4cbdf5 inspector: Drop type name from node list
It's not used anymore in the CSS, so people don't need to see it.
2016-02-05 19:31:47 +01:00
Benjamin Otte
0c12601208 cssimageradial: Only allow at "<position>" after other props
Don't allow syntax like
  at top left circle
but follow the spec about requiring the at <position> right before the
comma.

This is porbably because
  circle at 10px 10px
could be interpreted as
  circle 10px at 10px
with the now disallowed syntax, too.

Test included.
2016-02-05 19:31:47 +01:00
Benjamin Otte
982da040b2 cssimageradial: Only emit one error for wrong position
Test included.
2016-02-05 19:31:47 +01:00
Benjamin Otte
5444442974 css: Convert numbers with GTK's dpi
Don't hardcode 96 for dpi, but instead use the value of the -gtk-dpi
property (that mirrors the GdkScreen's dpi if it wasn't set explicitly).

This makes these values scale when the large font setting in
control-center is enabled.
2016-02-05 14:52:09 +01:00
Benjamin Otte
e35e6abbb2 css: Properly convert em, ex and rem to pixels
The previous code converted to pt.
2016-02-05 14:52:09 +01:00
Lapo Calamandrei
56b1b08bb8 Adwaita: darker background for popovers 2016-02-05 14:11:30 +01:00
Matthias Clasen
61307deaf7 levelbar: Make discrete levelbars behave as before
During the gadget conversion, the drawing of discrete levelbars
was unintentionally changed to draw a wide trough but narrow
blocks, which does not look great. So go back to the previous
way of drawing things.

https://bugzilla.gnome.org/show_bug.cgi?id=761428
2016-02-05 11:53:50 +01:00
Matthias Clasen
339023dee5 Fix indentation
gcc 6 complains about this.
2016-02-05 11:42:28 +01:00
Timm Bäder
680ec087ab switch: Don't queue draws after setting state flags 2016-02-04 20:00:21 +01:00
Benjamin Otte
0e7691c12e css: Add rem unit
Good luck, Lapo.
2016-02-04 19:37:44 +01:00
Benjamin Otte
f7ec9c98ef widget: Set a css name
Now selecting a widget by class name no longer works.

This is probably most relevant for users outside of GTK that want to
style their own widgets. Those widgets should now either add their own
style classes (if they want to adjust existing CSS) or use
gtk_widget_class_set_css_name() themselves (if they want to get rid of
all "upstream" styling).
2016-02-04 17:27:03 +01:00
Timm Bäder
35cd0be468 Range: Group all three gestures
And reset the grab_location in the ::released handler of the multipress
gesture.

Previously, when leaving fine-tune mode, the ::released handler of the
multipress gesture would call stop_scrolling, which calls
range_grab_remove and resets the grab_location. The ::drag-end handler
is executed after that, and only unsets priv->in_drag if the
grab_location is MOUSE_OUTSIDE, which it never was, since the ::released
handler already reset it. This lead to priv->in_drag being set even
though no dragging was in progress anymore, which e.g. made shift
pressed after leaving the fine-tune mode entering it again.

https://bugzilla.gnome.org/show_bug.cgi?id=761402
2016-02-04 17:08:30 +01:00
Руслан Ижбулатов
4a49d8d14f Don't do remote checks on NULL files
Calling _gtk_file_consider_as_remote() with a NULL argument
results in warnings being thrown.

Note that query->priv->location being NULL is a state that does
not seem to be invalid by itself.

This could happen if you do search-as-you-type in a filechooser,
which has a filter that does not match anything *and* the current
"place" selected is "Recent".

https://bugzilla.gnome.org/show_bug.cgi?id=761552
2016-02-04 15:57:35 +00:00
Matthias Clasen
3756d92367 Move private widget path functions away
We don't put private functions in public headers anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=761339
2016-02-04 15:19:51 +01:00
Benjamin Otte
8d515409c6 win32: Get rid of XP theme
XP is not supported anymore. And we can massively simplify the win32
theme if we don't have to support 2 versions.
2016-02-04 14:25:46 +01:00