Commit Graph

18945 Commits

Author SHA1 Message Date
Matthias Clasen
dbbb9c8f8f Plug a memory leak in the css parser
color_value_parse was leaking a GtkCssSymbolicValue.
Reported in

https://bugzilla.gnome.org/show_bug.cgi?id=702034
2013-09-16 23:30:57 -04:00
Philip Chimento
c298c7acce Don't activate GtkExpander if mouse dragged away
Previously, when you clicked and held the button down on a
GtkExpander's label or disclosure triangle, then moved the mouse
away and released the button, the expander would still activate.
This brings the behavior in line with the more generally expected
behavior, as exhibited by GtkButton for example.

https://bugzilla.gnome.org/show_bug.cgi?id=706345
2013-09-16 22:43:02 -04:00
Matthias Clasen
f503d4debd Clarify GtkH/VBox documentation
Make it clearer that GtkBox still has uses.

https://bugzilla.gnome.org/show_bug.cgi?id=706269
2013-09-16 22:38:49 -04:00
Matthias Clasen
58e9e9d316 Improve gtk_widget_insert_action_group docs
Mention that group can be NULL. Related to

https://bugzilla.gnome.org/show_bug.cgi?id=708150
2013-09-16 21:13:00 -04:00
Matthias Clasen
eab0b3a59c Improve headerbar docs slightly
Explain how to achieve the same title lable style when using
a custom title.
2013-09-16 20:24:48 -04:00
Matthias Clasen
54773ba45b Allow theme to set close button position in headerbars
This allows GTK+ applications with headerbars to fit in
better in platforms that have window controls on the left.

To use this, set -GtkWindow-decoration-button-layout: 'close:'
in the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=706708
2013-09-16 16:13:07 -04:00
Matthias Clasen
aa1435b741 Include CSD titlebar in focus chain
At least for header bars, there's often application controls
in this area, which should be included in the focus chain.
We make it so that the initial focus avoids the titlebar,
but tabbing around will eventually get there.

https://bugzilla.gnome.org/show_bug.cgi?id=708067
2013-09-16 14:38:38 -04:00
Matthias Clasen
d632474b74 Don't pass NULL to gdk_window_set_title
That is not allowed. This is fallout from a recent change
that makes GtkWindow listen for title changes in its
headerbar.
2013-09-16 13:07:18 -04:00
Benjamin Otte
45d896a6b5 Revert "a11y: Remove AtkSelection implementation from combobox"
This reverts commit 7cecc8e524.

It is impossible to use the selection object of the menu while it is
collapsed (collapsed menus deselect everything for a start), so even
though the original patch was correct, the followup issues are too big
to solve this quickly to a release.

https://bugzilla.gnome.org/show_bug.cgi?id=707786
2013-09-16 15:41:15 +02:00
Murray Cumming
98ca9a865f GtkWidget: Improve drag-leave and drag-data-received docs.
* gtk/gtkwidget.c: drag-leave signal: Document that it is called before
      drag-drop.
      drag-data-received signal: Document that it is up to the application
      to know why the data was requested (e.g. drag motion or drop).
    * demos/gtk-demo/toolpalette.c: interactive_canvas_drag_drop():
      Do not transform the drop_item created in the drag-motion handler.
      Instead caused drag-data-received to be called, remembering why,
      and create a new item there.
      interactive_canvas_drag_leave(): Remove the idle-handler hack,
      now that we do not need to keep the drag-motion drop_item alive until
      the drop.

I noticed that this patch was sitting in bug #605611 from 2009
though it had been approved. I do not remember much about why I
created it.
2013-09-16 14:06:14 +02:00
Kalev Lember
5f62785d41 listbox: Jump over insensitive rows with keynav
https://bugzilla.gnome.org/show_bug.cgi?id=708128
2013-09-16 11:43:26 +02:00
Alexander Larsson
247c4cecfc Don't ever return BASELINE from gtk_widget_get_halign
This is the same behaviour as gtk_widget_get_valign, except
we have no gtk_wiget_get_halign_with_baseline, as baselines make
no sense for halign.

Without this some widgets (like e.g. GtkOverlay) crash if you accidentally
set a BASELINE halign.
2013-09-16 12:33:56 +02:00
Sébastien Wilmet
310179176c Improve doc of gtk_text_buffer_paste_clipboard()
It didn't explain the behavior when there is a non-empty buffer
selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-09-16 09:48:24 +02:00
Sébastien Wilmet
8e916815bb textbuffer: fix selection replacement when pasting
It is more logical to first delete the selection and then pasting the
text. When the selection and the text contain tags, the new behavior is
more natural.

A segfault in paste_from_buffer() is also avoided. The segfault occurs when
the text to paste is deleted because it is the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-09-16 09:48:24 +02:00
Sébastien Wilmet
a78fc4a9c5 Doc: small fixes in GtkTextView
Move GtkWrapMode from GtkTextTag to the GtkTextView section. The wrap
mode property is in the text view.

Links to the "mark-set" and "mark-deleted" signals.

Add a precision about gtk_text_buffer_get_iter_at_line().

Fix typo in gtk_text_tag_set_priority().

https://bugzilla.gnome.org/show_bug.cgi?id=708076
2013-09-14 21:45:00 +02:00
Alejandro Piñeiro
5045e1a91b GtkWindow: keep sync the title with own titlebar
Before this change, both titles were synced only if
gtk_window_set_title was called. Now both are synced
also calling gtk_header_bar_set_title
2013-09-13 18:08:58 +02:00
Alejandro Piñeiro
94d52f99f8 a11y: Set proper role for GtkHeaderBar
https://bugzilla.gnome.org/show_bug.cgi?id=707981
2013-09-13 11:02:11 +02:00
Alejandro Piñeiro
c6943fcbcf a11y: set ATK_ROLE_LIST_ITEM to GtkListBoxRow
https://bugzilla.gnome.org/show_bug.cgi?id=707915
2013-09-13 11:01:44 +02:00
Alejandro Piñeiro
ef41c2a60f a11y: Remove default description from GtkSwitch
https://bugzilla.gnome.org/show_bug.cgi?id=707926
2013-09-12 11:52:51 +02:00
Alejandro Piñeiro
a86c665398 a11y: not using default name for switch
A proper name or label is required. In the same way, if the
widget is labelled, ATs uses to expose both the label and the
name, making the final output not really user-friendly.

https://bugzilla.gnome.org/show_bug.cgi?id=707872
2013-09-10 22:46:35 -04:00
Matthias Clasen
096f2db4b0 Make logos in GtkAboutDialog bigger
When available, choose a size of up to 128 in GtkAboutDialog.
A 48x48 icon just looks too small in there.
2013-09-10 22:45:06 -04:00
Phil Clayton
59c4fb9d6a Add missing introspection annotations
https://bugzilla.gnome.org/show_bug.cgi?id=707519
2013-09-10 17:20:15 -04:00
Alexander Larsson
90383300d2 listbox: Set activate_signal on listboxrow class
keyboard navigation didn't support activation since we moved
the keynav to the child row widgets. We fix this by adding a
activate signal handler for the row and setting
widget_class->activate_signal to it.

https://bugzilla.gnome.org/show_bug.cgi?id=707778
2013-09-10 16:20:56 +02:00
Benjamin Otte
6d344b2c6b Revert "pango: Handle case where pango_layout_get_text() returns NULL"
This reverts commit 70ac2b24c3.

It turns out the correct fix is to make pango_layout_get_text() not
return NULL. This has been done, so we can drop this patch.

I won't bump the Pango dependency in configure.ac for this as I don't
consider the crash critical enough.
2013-09-09 17:19:28 +02:00
Benjamin Otte
70ac2b24c3 pango: Handle case where pango_layout_get_text() returns NULL
Fixes crashers with accessibility

https://bugzilla.gnome.org/show_bug.cgi?id=707659
2013-09-09 16:53:13 +02:00
Alexander Larsson
92edb76500 Pixel cache: Add no-pixel-cache debug flag
This is useful for benchmarking comparisons, and to verify if bugs
happend with or without the pixel cache.
2013-09-09 11:07:50 +02:00
Christian Hergert
9a45712ad6 textview: use pixelcache rendered area to inform invalidation region.
Use the pixelcache rendered area to inform what part of the cache should
be invalidated upon changes to the underlying textlayout.

By rendering the background to the pixelcache, we can avoid the need to
use RGBA content.

Also, we're using the pixel cache on the text windows bin_window (see
gtk_text_view_get_window) so we need to register the invalidation handler
on that, otherwise the region passed to the invalidate handler will get
clipped to the visible region.

https://bugzilla.gnome.org/show_bug.cgi?id=707244
2013-09-09 10:47:30 +02:00
Christian Hergert
7fabc94d3c pixelcache: add getter for extra width and height. 2013-09-06 15:57:22 -07:00
Christian Hergert
0eb8479256 textview: only set invalidate handler for text window. 2013-09-06 15:57:22 -07:00
Matthias Clasen
fc7d26860a Fix config dir <> data dir confusion
We added code to look for settings.ini in system config dirs,
and then proceeded to move it to /usr/share/gtk-3.0 :-(. So,
look in that location as well.
2013-09-06 09:43:16 -04:00
Benjamin Otte
e6e99c4f9f css: Change currentColor handling
We now pass NULL when the current color should be the default value of
the "color" property and we haven't looked up any value yet. This way we
don't need to look it up all the time and more importantly we can
resolve the default color, which is required because it's a
GtkCssColorValue and not a GtkCssRgbaValue.

Fixes assertions triggering at Polari startup.
2013-09-06 03:04:09 +02:00
Benjamin Otte
04b7c8e24e cssimage: Remove unused variables 2013-09-06 03:04:09 +02:00
Alexander Larsson
854f5818f8 Sync with changes in the cairo device-scale handling
The version of device scale that landed in upstream cairo
master already inherits the device scale in cairo_create_similar,
so no need to do that in gtk anymore.
2013-09-05 19:30:23 +02:00
Benjamin Otte
fa3b803de9 cellrendererpixbuf: Don't eat states
Even when not following states, blacklist the states we don't follow
instead of whitelisting the ones we do. This way, we don't accidentally
eat new ones like the text direction flags.

Fixes a bug where text direction wasn't available when rendering stock
items.

https://bugzilla.gnome.org/show_bug.cgi?id=702423
2013-09-05 18:48:47 +02:00
Benjamin Otte
502d7644fe cellrendererpixbuf: Follow state even when insensitive 2013-09-05 18:48:47 +02:00
Benjamin Otte
c417bf6d73 cellrendererpixbuf: Always follow state
... not just in PRELIT | SELECTED.
2013-09-05 18:48:46 +02:00
Matthias Clasen
930f580857 Trivial formatting fixes 2013-09-04 20:59:56 -04:00
Jiro Matsuzawa
e2036a3986 Fix a typo in an error message
https://bugzilla.gnome.org/show_bug.cgi?id=707488
2013-09-04 19:40:59 -04:00
Alexander Larsson
5ed8db986f GtkListBox: ref_sink new object in set_header and set_adjustment
These are taking ownership of the object in the hierarchy, so should
sink any floating refs to make it easy to use in C code.
2013-09-04 21:01:50 +02:00
Jasper St. Pierre
d6559251fb gtkwidget: Fix issues with baseline alignment comparison 2013-09-03 17:59:19 -04:00
Giovanni Campagna
ed9f55d521 wayland: restore support for the application menu
If the compositor supports the gtk-shell interface, use it to
export the application ID, dbus name and paths that can be used
for the application menu.

https://bugzilla.gnome.org/show_bug.cgi?id=707129
2013-09-03 17:03:43 +02:00
Paolo Borelli
fa3a0963ee textview: Use guint since we specify ": 1" 2013-09-01 12:16:27 +02:00
Mike Gorse
3f2aacca52 a11y: Check whether a widget is mapped before querying its parent
Call gtk_widget_get_mapped() in a couple of places before looking at the
widget's parent, since it might be set to a widget that has been
finalized, causing an invalid read.
2013-08-31 16:42:07 -05:00
Cosimo Cecchi
89214cad5b pathbar: fix positioning of the down slider button
So that it's always linked with the rest of the pathbar.

https://bugzilla.gnome.org/show_bug.cgi?id=706722
2013-08-31 17:25:49 -04:00
Cosimo Cecchi
c9cc58de49 pathbar: remove unused spacing private member
It's always zero.

https://bugzilla.gnome.org/show_bug.cgi?id=706722
2013-08-31 17:25:49 -04:00
Matthias Clasen
68b34b1bba GtkPathBar: Don't make current dir bold
This is closer to the nautilus path bar.

https://bugzilla.gnome.org/show_bug.cgi?id=706451
2013-08-31 17:25:49 -04:00
Matthias Clasen
5c90b46722 Revert "a11y: Check whether a widget is mapped before querying its parent"
This reverts commit 7e3db6fdd3.

It broke the testsuite.
2013-08-31 16:27:38 -04:00
Jasper St. Pierre
de1f5b8bb3 gtkwindow: Don't set an opaque region if the window is app-paintable
This means the background is effectively unused. This fixes bad drawing
errors with cc-rr-labeller and potentially also notify-osd.
2013-08-31 15:53:10 -04:00
Aleksander Morgado
90de3c4fc0 win32: use the input locale to decide the default input method
GTK+ tries to automatically assign the best input module based on the
'system locale'. In the specific case of the IME input method, it will
be the default for the whole GTK+ application if the system locale is
either Japanese (ja), Korean (ko) or Chinese (zh). Other defaults are
equally applicable, e.g. if system locale is Catalan (ca), the special
'Cedilla' input module is chosen.

System locale can be changed (e.g. Win7) through the following sequence
(reboot required):
  Control Panel
    Region and Language
      Administrative
        Language for non-Unicode Programs
          Change system locale...

The problem with this behaviour is that changing the 'default input
language' (e.g. from English to Japanese+IME) doesn't affect the GTK+
application. Therefore, I can have an English system locale (where GTK+
will choose Simple IM by default) but then have Japanese+IME as input
language.

Default input language can be changed (e.g. Win7) through the following
sequence (no reboot required):
  System locale can be changed (e.g. Win7) through:
    Control Panel
      Region and Language
        Keyboards and Languages
          Keyboards and other input languages
            Change keyboards...

Default input language can also be changed using the language bar directly.

So, instead of using the system-wide default locale to decide which input
method to use as default, better use the input language specified by the
user, which may be the same as the system-wide default locale, or different.
Following the previous example, with an English system locale and a
Japanese+IME input language, the default input method will now be IME
instead of Simple, which is closer to what's expected by the user.

This change only affects the application during startup; i.e. if the user
changes the input language while the application is running, we wouldn't be
changing the default input method to use. We could do this processing the
WM_INPUTLANGCHANGE messages, though.

https://bugzilla.gnome.org/show_bug.cgi?id=700428
2013-08-31 14:28:10 -04:00
Pavel Vasin
2df6174038 GtkClipboardWayland: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=706493
2013-08-31 12:28:19 -04:00