Commit Graph

18934 Commits

Author SHA1 Message Date
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
Pavel Vasin
1f2ed31f28 css shadow: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=706493
2013-08-31 12:28:17 -04:00
Arnel A. Borja
0c19be899d printsettings: Add missing docs for output constants
GTK_PRINT_SETTINGS_OUTPUT_DIR and GTK_PRINT_SETTINGS_OUTPUT_BASENAME
doesn't have documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=706802
2013-08-31 12:27:50 -04:00
Matthias Clasen
445204acca Fix an age-old typo
GtkIconView was not properly propagating key release events,
since forever.

https://bugzilla.gnome.org/show_bug.cgi?id=706740
2013-08-31 12:27:31 -04:00
Matthias Clasen
3442933dd7 Revert "Deprecate and ignore gtk-entry-password-hint-timeout"
This reverts commit 4b5a389e88.

This change caused considerable concern about accidental
leaking of passwords, see e.g.

https://bugzilla.gnome.org/show_bug.cgi?id=706563
https://bugzilla.gnome.org/show_bug.cgi?id=706873
https://bugzilla.redhat.com/show_bug.cgi?id=994237

We may have to do something else for password entries, such
as the windows-style 'peekabo' icon.
2013-08-31 00:16:28 -04:00
Matthias Clasen
350569124d Don't mark a space as translatable
There is no point in translating a string that consists just
of a single space. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=706778
2013-08-30 23:45:08 -04:00
Mike Gorse
7e3db6fdd3 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-30 09:42:41 -05:00
Mike Gorse
d7e07a8470 Don't access memory after freeing it when destroying a tick callback
https://bugzilla.gnome.org/show_bug.cgi?id=704278
2013-08-30 09:42:41 -05:00
Stefano Facchini
d59c9429de Remove leftover from commit 889e63faed 2013-08-30 14:47:17 +02:00
Paolo Borelli
798c2b60ec [headerbar] Do not hardcode title and subtititle style
Let the css theme define them

https://bugzilla.gnome.org/show_bug.cgi?id=707051
2013-08-29 15:59:53 +02:00
Emmanuele Bassi
889e63faed headerbar: Remove hpadding and vpadding properties
We really want these to be set by the theme, not programmatically.

https://bugzilla.gnome.org/show_bug.cgi?id=706929
2013-08-29 14:39:38 +01:00
Stefan Sauer
d4679c0a13 frame: annotate the @label params with (allow-none) 2013-08-29 09:06:31 +02:00