Commit Graph

47342 Commits

Author SHA1 Message Date
Sébastien Wilmet
bce4a0abde app: extract GtkApplicationAccels private class
This has several benefits:
- Less code in GtkApplication. The accels handling is something
  self-contained, and GtkApplication now delegates the work.
- For the accels functions, there is now a distinction between static
  functions and functions in the gtkapplicationaccelsprivate.h header,
  which makes the code easier to understand, because we have a good
  overview just by reading the header.
- The struct _GtkApplicationPrivate is now easier to find instead of
  being in the middle of the file.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:39:18 +02:00
Sébastien Wilmet
e0c34fd028 app: write higher-level gtk_application_accels static functions
These will become the functions present in the
gtkapplicationaccelsprivate.h header.

The gtk_application_accels functions deal with detailed_action_name's
instead of action_and_target's. action_and_target is an implementation
detail of Accels.

The added function prototype is temporary, it'll be removed in a later
commit.

https://bugzilla.gnome.org/show_bug.cgi?id=764879
2016-04-22 12:38:56 +02:00
Paolo Borelli
c574ef0954 textiter: add unit test for forward_to_line_end
Surprisingly we had no unit test for this method
2016-04-22 08:54:25 +02:00
Matthias Clasen
73c91c285e Fix formatting
The previous change was not quite using the right coding style.
2016-04-21 23:24:13 -04:00
Timm Bäder
0815b21ad4 listbox: Make sure page down/up move at least one row
When the current cursor_row is taller than the page_size we get from the
GtkAdjustment, the previous code would not actually cause any scrolling,
so make sure we just take the row after or before the cursor_row in that
case.

https://bugzilla.gnome.org/show_bug.cgi?id=765261
2016-04-21 23:11:38 -04:00
Matthias Clasen
7a7e3fc0e3 Ad d new API to the docs 2016-04-21 22:55:57 -04:00
Frediano Ziglio
cf14fea5a8 Save scancode inside GdkEventPrivate
Windows save in hardware_keycode an information which is not so low
level and some application require the hardware scancode.
As Windows provides this information save it in GdkEventPrivate
and provide a function to get this information.
For no Windows system the function return the hardware_keycode instead.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=765259
2016-04-21 22:35:47 -04:00
Benjamin Otte
c081ca2d4c cssshadowsvalue: Avoid allocating new value if not needed 2016-04-21 23:01:31 +02:00
Benjamin Otte
f93eca5604 cssbordervalue: Avoid allocating new value if not needed 2016-04-21 23:01:31 +02:00
Benjamin Otte
2fc0d6a91a cssbgsizevalue: Avoid allocating new value if not needed 2016-04-21 23:01:31 +02:00
Matthias Clasen
6d953cb08e Add a dnd test using a window as icon
This case is causing problems in firefox. Lets at least make
sure that it doesn't crash in GTK+.
2016-04-21 14:23:00 -04:00
Lapo Calamandrei
3ed8ac034d Adwaita: backdrop active button color tweaks 2016-04-21 17:01:45 +02:00
Lapo Calamandrei
d857ba3faf Adwaita: cosmetics 2016-04-21 16:51:24 +02:00
Lapo Calamandrei
874d4ede67 Adwaita: solid bg for disabled pushed button 2016-04-21 16:43:35 +02:00
Lapo Calamandrei
517f33b1a6 Adwaita: spinbutton fixes
reset background-color on backdrop disable buttons and entry node.
2016-04-21 16:25:05 +02:00
Jonathan Matthew
22cd8e9d4f gtkmenusectionbox: remove submenus when the parent item is removed
https://bugzilla.gnome.org/show_bug.cgi?id=749405
2016-04-20 17:28:19 -04:00
Matthias Clasen
d6ac55102e widget: Don't show widget resizes in the inspector
Avoiding this sort of visual debugging in the inspector
is the main reason we have per-display debug flags now.
2016-04-19 23:32:26 -04:00
Matthias Clasen
d58885c9b9 css gadget: Fix baseline debug
We were not using the baseline that we're computing.
2016-04-19 23:26:57 -04:00
Matthias Clasen
37b70a9733 Use qdata for debug flags
This avoids some overhead.
2016-04-19 23:26:57 -04:00
Matthias Clasen
c01befe5cc css gadget: Don't get display flags twice
This got more expensive now that we store them per-display,
so don't get them twice in the same function.
2016-04-19 23:26:57 -04:00
Christian Hergert
3df2e0b26a debug: remove open-coded debug checks in gtktextsegment
These runtime checks were being performed whether or not we were in a
debug build. Using GTK_DEBUG_CHECK() will compile out of production
builds, as it will result in something like:

  if (G_UNLIKELY(0))

which the optimizer can prune.

https://bugzilla.gnome.org/show_bug.cgi?id=765284
2016-04-19 19:56:17 -07:00
Matthias Clasen
f3e6d930a8 text tag: Add a va marshaller to ::event 2016-04-19 21:10:31 -04:00
Matthias Clasen
c7bac91494 text buffer: Add va marshallers for signals 2016-04-19 21:10:31 -04:00
Matthias Clasen
3c3aa478f9 menushell: Add a va marshaller for ::insert 2016-04-19 21:10:31 -04:00
Lapo Calamandrei
1b22039649 Adwaita: use an image for backdrop button background
which doesn't make the sliders flash during background transition.
2016-04-19 23:00:54 +02:00
Lapo Calamandrei
5fc18c7167 Adwaita: link button style fix
ensure the label color doesn't get overridden, fixes link button
label being gray in backdrop.
2016-04-19 22:58:33 +02:00
Lapo Calamandrei
c16c9e7c3f Adwaita: scale with marks style fix
reset background-color on the slider.
2016-04-19 22:58:33 +02:00
Lapo Calamandrei
5199b66682 Adwaita: fix switch styling
ensure the last button has rounded corners and adapt to button
mixin changes.
2016-04-19 22:58:33 +02:00
Lapo Calamandrei
24c3906d5f Adwaita: fix insensitive switch styling
misplaced backdrop disabled selector was overriding the disabled
one.
2016-04-19 22:58:33 +02:00
Matthias Clasen
51d58108f9 Add some va marshallers to frequent signals
This makes us take the fast path in signal emission.
2016-04-19 16:12:33 -04:00
Lapo Calamandrei
b596fcada7 Adwaita: stop using images for solid backgrounds...
...unless it's needed.
2016-04-19 21:59:37 +02:00
Matthias Clasen
5efb574055 magnifier: Only connect to ::draw when needed
This making us take the slow path in ::draw handling, so we
want to avoid it if we can.

https://bugzilla.gnome.org/show_bug.cgi?id=765238
2016-04-19 15:29:04 -04:00
Lapo Calamandrei
7397fe0eab Adwaita: add shadows back...
...correctly inizializing a sass var.
2016-04-19 21:25:27 +02:00
Rui Matos
deaf664ed2 wayland: Leave existing mods on map_virtual_modifiers
map_virtual_modifiers() is supposed to add the necessary virtual mods
but otherwise leave the mods that are passed in.

https://bugzilla.gnome.org/show_bug.cgi?id=765270
2016-04-19 21:14:20 +02:00
Matthias Clasen
b8a86e6ca4 wayland: Some more debug spew
Print the modifiers and their mapping out as well. This
information is contained in the keymap, but this is a bit
easier to digest.
2016-04-19 12:43:03 -04:00
Matthias Clasen
e7d84898ee wayland: Add debug output for keymaps
Use GDK_DEBUG=input to see your keymap sent over and over again.
Efficiency!
2016-04-19 12:23:51 -04:00
Timm Bäder
36fead28e0 gtkcssimagebuiltin: Save/restore around cairo_clip
This was previously causing trouble in checkbuttons where the check node
didn't have an icon shadow set, e.g. in Raleigh.
2016-04-19 15:31:26 +02:00
Matthias Clasen
d1b07bc386 Add a comment to explain numbers here
This explains the change in the previous commit.
2016-04-19 07:34:44 -04:00
Piotr Drąg
3fe08b3b28 cups: Fix duplicate string
https://bugzilla.gnome.org/show_bug.cgi?id=765122
2016-04-19 07:25:17 -04:00
Chun-wei Fan
9a87b6be2b MSVC builds: Update how introspection builds are done
This first adds a common autotools module that can be included by
the Makefile.am's to generate the file lists and the g-ir-scanner/
g-ir-compiler command lines to build the introspection files.

The autotools files for gdk/ and gtk/ are then updated to generate
the full file lists needed to build the introspection files, with
the full command lines for g-ir-scanner and g-ir-compiler as NMake
Makefile modules that can be used to build the introspection files
for Visual Studio builds.

https://bugzilla.gnome.org/show_bug.cgi?id=765195
2016-04-19 14:50:25 +08:00
Lapo Calamandrei
f0c2d3a7a8 Adwaita: better shadow stacking mixin 2016-04-19 01:19:07 +02:00
Christian Hergert
b584b3d12a frame-clock: avoid g_signal_emit_by_name()
These were showing up higher in Sysprof profiles.

The simple fix is to avoid the emit_by_name() and let the interface emit
the signals directly. No function preconditions are provided since these
are internal API.
2016-04-18 15:33:53 -07:00
Lapo Calamandrei
bdb451ad86 Adwaita: fix infobar text color in backdrop windows
see https://bugzilla.gnome.org/show_bug.cgi?id=765213
2016-04-19 00:15:54 +02:00
Matthias Clasen
99c2423043 font button: Convert from pango to css properly
This utility function should probably find a home somewhere else.
For now, this makes the deprecation warning go away.
2016-04-18 15:05:24 -04:00
Benjamin Otte
519af3f91d cssimage: Warn if gradients only have 1 color stop
GTK <= 3.20 allowed that but the CSS spec and borwsers do not.
We might want to just remove that feature, but for now, we just warn.
2016-04-18 20:52:35 +02:00
Benjamin Otte
fd373162b5 theme: linear-gradient() needs 2 color-stops
So make sure our _solid() function gives it two.
2016-04-18 20:52:35 +02:00
Benjamin Otte
f51b15808a theme: Split out _solid() function
The function creates a solid color image. Currently this is done with
linear-gradient().
2016-04-18 20:52:34 +02:00
Benjamin Otte
de76139fea win32 theme: Fix functions to not have spaces
CSS doesn't allow that (although GTK's CSS parser did so far not
complain).
2016-04-18 20:52:34 +02:00
Matthias Clasen
5ab6ff6b5e Expand css style font tests
Test more of the syntax of the font: shorthand.
2016-04-18 14:38:53 -04:00
Matthias Clasen
2603011ea0 Fix a typo
We don't want to parse a weight twice, but a weight and a stretch.
2016-04-18 14:38:12 -04:00