Commit Graph

39710 Commits

Author SHA1 Message Date
Ryan Lortie
7d81d0a3bb Add gtk_application_get_actions_for_accel()
This counterpart to gtk_application_get_accels_for_action() lets you
find out if a particular accelerator has one or more actions associated
with it. This might be useful from an accelerator editor or plugin
system to prevent the the installation of conflicting accelerators.

https://bugzilla.gnome.org/show_bug.cgi?id=721367
2014-08-03 20:27:51 +02:00
Matthias Clasen
9746419cce GtkTreeView: Avoid deprecation warnings 2014-08-03 20:12:48 +02:00
Pietro Gagliardi
f9d118ed8a gtk/Makefile.am: fix gtk-encode-symbolic-svg build for jhbuild
Currently, jhbuild-ing GTK+ on Ubuntu 14.04 LTS and gcc 4.8.2 errors out with
	/usr/bin/ld: encodesymbolic.o: undefined reference to symbol 'g_file_new_for_path'
	/opt/gnome/lib/libgio-2.0.so.0: error adding symbols: DSO missing from command line
when trying to build gtk-encode-symbolic-svg. This is because $(GTK_DEP_LIBS) isn't defined in $(gtk_encode_symbolic_svg_LDADD) in gtk/Makefile.am. This patch should fix that.

Thanks to b4n and gregier in irc.gimp.net/#gtk+ for help.

https://bugzilla.gnome.org/show_bug.cgi?id=734201
2014-08-03 20:12:47 +02:00
Carlos Garnacho
9d7f1caca7 textview: Avoid relocating adjustments on ::size-allocate while these are animating
An animation may be scheduled while the textview content changed in size, so the resize
queued would just unset the animation and set the adjusments with a current value,
defeating gtk_text_view_scroll_to_iter(). In this case, just avoid the adjustment change,
as there is a target value on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=733406
2014-08-03 20:12:47 +02:00
Piotr Drąg
2bf368c9e3 Updated POTFILES.in 2014-08-03 20:11:09 +02:00
Carlos Garnacho
5b8267028d window: Update popover positions on ::size-allocate
Popovers may get relocations optimized away if only x/y changed
in the GtkAllocation. So make sure the toplevel updates popover
positions on all situations.

https://bugzilla.gnome.org/show_bug.cgi?id=729140
2014-08-03 18:37:53 +02:00
Paolo Borelli
bd07845c31 Add missing include for setlocale 2014-08-03 11:54:36 +02:00
John Ralls
e3b8c4efeb Bug 729924 - Crash trying to print in OSX
We should only use the PageSize option from the ppd if it
actually exists.
2014-08-03 11:50:50 +02:00
Matthias Clasen
97237fc54c widget-factory: Add a linked combobox example
This came up in https://bugzilla.gnome.org/show_bug.cgi?id=733979
2014-08-03 11:07:25 +02:00
Paolo Borelli
a0c89af801 GtkSwitch: implement animation 2014-08-03 10:22:41 +02:00
Paolo Borelli
22bd23adf3 GtkSwitch: remove unused assignment 2014-08-03 10:22:41 +02:00
Matthias Clasen
b52214faeb Ensure an image-missing icon is available
It is bad if the image that is used as a fallback for missing
images goes missing itself, so include it as a resource. This
way, it will always be available.
2014-08-03 10:13:23 +02:00
Руслан Ижбулатов
7fd90804fb Embed manifest into gtk-update-icon-cache.exe
This way it doesn't need to be installed alongside it.

https://bugzilla.gnome.org/show_bug.cgi?id=705054
2014-08-03 06:48:54 +00:00
Emmanuele Bassi
0ed766ec86 treeview: Deprecated rules-hint
The rules-hint property has always been a fairly bad application API, as
it set some wrong expectations for the developers; deferring to the
theme makes it impossible to design application reliably, and if this is
a usability setting we should either impose this setting on every theme,
or simply drop it.

Our own default theme does not honour the zebra striping, which makes
this function even more questionable.

In practice, usability studies on zebra striping have demonstrated that
alternating colors on a list it improves readability just as much as
clear ruling between rows, or by visually differentiating the selected
row. Zebra striping improves readability (or, at least, it does not
hinder it) on static displays, like a table on paper or a document; on a
dynamic display, like an application's UI, there are different
strategies that yield similar, if not better, results.

https://bugzilla.gnome.org/show_bug.cgi?id=733312
2014-08-03 02:51:02 +02:00
Timm Bäder
fb7d710931 listboxrowaccessible: Avoid assertion failure
The next call to gtk_list_box_get_selection_mode just expected the
GtkListBoxRow's parent to be a GtkListBox and failed when the row was
added to something other than a GtkListBox.

https://bugzilla.gnome.org/show_bug.cgi?id=733782
2014-08-03 02:48:26 +02:00
Matthias Clasen
36b36822c3 Add a man page for gtk-encode-symbolic-svg 2014-08-03 02:45:16 +02:00
Alexander Larsson
1d68801ade icon-theme: Support recolorable .symbolic.png files
If an icon theme has a file called "foo-symbolic.symbolic.png" which
was converted from svg using gtk-encode-symbolic-svg we will read
it in an recolor, allowing symbolic icons without using librsvg.

https://bugzilla.gnome.org/show_bug.cgi?id=730450
2014-08-03 02:20:18 +02:00
Alexander Larsson
50ba3c72bb Add gtk-encode-symbolic-svg
This utility loads a symbolic svg at a specified size and
renders a png file in a special format that can be recolored
later.

https://bugzilla.gnome.org/show_bug.cgi?id=730450
2014-08-03 02:20:18 +02:00
Matthias Clasen
d7850e8be0 inspector: Add GtkTreeSelection to the object tree
It is not accessible, otherwise.
2014-08-03 01:28:23 +02:00
Carlos Garnacho
25721ae3e7 window: Only avoid queueing resizes if the popover position didn't change
If the same position is requested on a popover, it should at least ensure
the window is realized and raised, even if no resizes are queued on the
content. Otherwise other widgets being mapped might raise the windows over
the popover's if its original position is unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=734129
2014-08-03 01:12:12 +02:00
Jasper St. Pierre
9f2e0902f6 gtkcssshadowvalue: Don't double-apply the alpha to shadows
It turns out that when we were painting the shadows, we painted the them
with the base color once, which contained the alpha, and then blurred it
and used it as a mask for the fill, which has the fill again.

To fix this, always paint the base surface with full alpha. The existing
code applies the blur conditionally sometimes in weird ways, so the code
shuffling fix may not look correct, but be assured it is. If the blur
happens, the new cr we return has the *default* color applied, which is
fully opaque black, which works perfectly against the A8 surface.

The fallback spinner code needs some modification, since it is
intentionally using the alpha to paint the lobes which are "in the past".
Since we shouldn't be hitting this fallback path very often, we use a
temporary group and paint it with paint_with_alpha, even though it is
slow.
2014-08-02 18:58:19 -04:00
Matthias Clasen
1c34ad2668 Small comment fixups
One factual pointed out in the review in
https://bugzilla.gnome.org/show_bug.cgi?id=734053, plus some
formatting nit picks.
2014-08-03 00:42:48 +02:00
Jasper St. Pierre
f5d8f75c0f gtkcairoblur: Replace our exponential blur with the box blur from mutter
https://bugzilla.gnome.org/show_bug.cgi?id=734053
2014-08-03 00:35:55 +02:00
Matthias Clasen
1148c96dc4 Add the new debug option to the docs
All debug options are supposed to be listed in the "Running and
Debugging" section of the docs.
2014-08-03 00:24:11 +02:00
Ryan Lortie
edeb1a0161 GtkMenuTrackerItem: introduce action debugging
Add some action debugging output for GtkMenuTrackerItem as well...

https://bugzilla.gnome.org/show_bug.cgi?id=733965
2014-08-03 00:18:44 +02:00
Ryan Lortie
16e02850c1 GtkActionHelper: add some debugging output
Introduce a new debug category "actions" and write some messages from
GtkActionHelper about if we can find the actions or not.

We will probably soon want to add some similar messages to
GtkMenuTrackerItem.

https://bugzilla.gnome.org/show_bug.cgi?id=733965
2014-08-03 00:18:44 +02:00
Matthias Clasen
785c9f5e2c Remove a reference to a non-existing function 2014-08-02 22:26:05 +02:00
Руслан Ижбулатов
6dede1a0b7 W32: Don't crash when opacity is set for non-toplevel
X11 backend doesn't, and for good reason - main code body does not check
that the window it sets opacity for is, in fact, toplevel.
Just silently fail to do anything for non-toplevel windows.

https://bugzilla.gnome.org/show_bug.cgi?id=733769
2014-08-02 14:22:22 +00:00
Руслан Ижбулатов
bbe475fd97 Use g_clear_object() shorthand for unref-and-set-to-null
https://bugzilla.gnome.org/show_bug.cgi?id=733766
2014-08-02 14:18:05 +00:00
Руслан Ижбулатов
e1acb93415 W32: Don't unregister parent window of an embedded widget
This leads to an assertion failure, because parent window is never registered
in the first place, widget's own GdkWindow is. But that window is unregistered
in a generic fashion by GtkWidget code, so there's nothing for us to do here.

https://bugzilla.gnome.org/show_bug.cgi?id=733766
2014-08-02 14:18:05 +00:00
Руслан Ижбулатов
3fea9ff24c Remove generated gtk-win32.rc from EXTRA_DIST
https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-02 13:07:49 +00:00
Matthias Clasen
5e3d6ab06b icon-browser: Redo the icon categorization
Instead of slavishly following the naming spec, group the icons
into categories that are more likely to be useful for application
developers. Based on input from Allan Day and Jakup Steiner.
2014-08-02 14:00:02 +02:00
Matthias Clasen
ea1f9bff2d icon-browser: Show category descriptions as tooltips
No better place for them right now.
2014-08-02 13:59:57 +02:00
Matthias Clasen
29d756909d Set initial focus in some dialog tests
Use the new <initial-focus> element here to confirm that it is
parsed properly and works as expected.
2014-08-02 11:59:05 +02:00
Matthias Clasen
14eccae603 GtkWindow: Add a way to declare initial focus in ui files
With this commit, it is possible to use <initial-focus name="blah">
to declare the initial focus widget for a window.

This is related to
https://bugzilla.gnome.org/show_bug.cgi?id=734033
2014-08-02 11:58:13 +02:00
Matthias Clasen
52ab9a36fa Add a test for window focus handling
This is a small test that checks that gtk_window_set/get_focus
behave as expected, regardless of the window being shown or hidden.
2014-08-02 11:38:44 +02:00
Matthias Clasen
f15ebc2dd2 GtkWindow: Make set_focus work before show
So far, gtk_window_set_focus just did not work when called on
a hidden window. Change it to record the desired focus widget
for hidden windows, and apply it when the window gets shown.

This is similar to how we tread other window properties that
can't be set before the window is realized, like maximized
or fullscreen.

This is related to
https://bugzilla.gnome.org/show_bug.cgi?id=734033
2014-08-02 11:38:23 +02:00
Руслан Ижбулатов
e934ddd498 Ensure that print operation is alive until we're done
https://bugzilla.gnome.org/show_bug.cgi?id=733767
2014-08-01 04:44:46 +00:00
Khaled Hosny
1752ccaa19 Update Arabic translation 2014-08-01 03:01:12 +03:00
Sébastien Wilmet
6e4e7c22a0 textiter: don't call g_utf8_prev_char() on start of string
Changes also the "goto finally" with a break. A break is more common.

Another way is to use g_utf8_find_prev_char().

https://bugzilla.gnome.org/show_bug.cgi?id=638709
2014-07-31 18:00:49 +02:00
Piotr Drąg
5041d4507f Updated POTFILES.skip 2014-07-31 17:52:35 +02:00
Benjamin Otte
a3d1db608b label: Don't clip text shadows
The previous code for computing the clip rectangle forgot to respect
the text-shadow CSS property. This is usually not very visible because
text shadows usually don't extend the ink rectangle by very much.

See attached testcase for an example.
2014-07-31 17:50:24 +02:00
Руслан Ижбулатов
a235dd6a6c GDK W32: add environment variable to override system font scaling
Support environment variable GDK_WIN32_FONT_RESOLUTION that can be set to
a desired dpi (72, 96, 130, etc) to override system settings. Useful for
debugging, since changing system font scaling requires the user to log off
and log on again.

https://bugzilla.gnome.org/show_bug.cgi?id=734038
2014-07-31 14:27:14 +00:00
Руслан Ижбулатов
f38498ed84 GDK W32: support font scaling
Respect system font scaling (Control Panel -> Display -> Font Size) and
convey that information to GDK (which then passes it to Pango).

https://bugzilla.gnome.org/show_bug.cgi?id=734038
2014-07-31 14:01:56 +00:00
Benjamin Otte
d6e9997619 css: Fail animation shorthand parsing properly
When a number is not a nubmer, don't just crash, exit properly with an
error code.

See attached testcase for an example.
2014-07-31 10:03:19 +02:00
Benjamin Otte
5f5d3a9d82 css: Don't infloop when parsing broken borders
There was an infinite loop when parsing invalid text after having parsed
a color in the border shorthand. See attached testcase for an example.
2014-07-31 10:03:18 +02:00
Matthias Clasen
83c9fe109e GtkImage: Always close the loader
This was causing some tests to fail with a critical.
2014-07-31 00:12:30 +02:00
Matthias Clasen
bd7e7d1dd6 inspector: Make the action editor more useful
We were not finding the action owner for menuitems, we have to
try harder to walk all the way up to the window.
2014-07-30 23:46:13 +02:00
Matthias Clasen
a6b8800531 Add a test for popover accessible parents
This tests the fix in the previous commit.
2014-07-30 23:14:49 +02:00
Matthias Clasen
2b0ae4bad3 GtkPopover: Properly update a11y parent
When the relative-to widget changes, update the accessible parent
of the popovers accessible.

https://bugzilla.gnome.org/show_bug.cgi?id=733923
2014-07-30 23:14:41 +02:00