Commit Graph

34057 Commits

Author SHA1 Message Date
Ryan Lortie
1e93ed9630 gtkicontheme: check for GdkPixbuf first
We checked for G_IS_LOADABLE_ICON() before GDK_IS_PIXBUF().

Since we made GdkPixbuf implement GLoadableIcon, the special case for
pixbufs is never used, and the much much slower GLoadableIcon path is
taken instead.  Move the GdkPixbuf one to be first to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=705320
2013-08-02 15:05:06 +02:00
Michael Hutchinson
205c4288a4 Bug 705181: Fix annoying beeping introduced by Mac IME
NSTextInputClient should not chain unhandled commands to super

(cherry picked from commit 91bcca6f39)
2013-07-30 17:28:10 -07:00
Matthias Clasen
3c58485a7f X11: Fix the cut-off for too large windows
We can only handle 2^15-1 pixels, not 2^16-1.
Pointed out by Morten Welinder.

https://bugzilla.gnome.org/show_bug.cgi?id=698758
2013-07-29 20:53:55 -04:00
Ek Kato
8a98feef19 Bug 701332 - Patch for minor glitch in NSTextInput
(cherry picked from commit 43ed68aa33)
2013-07-27 14:28:23 -07:00
Takuro Ashie
4249d6e931 imquartz: Fallback to slave IM context if no NSEvent exists.
When an application translates a key event and drop its native event
before passing to imquartz, it can't recognize the NSEvent. On this
case imquartz doesn't emit any signals such as "commit" signal so
that the application doesn't insert any text. To avoid no response,
at least imquartz should fallback to slave GtkIMContextSimple.

https://bugzilla.gnome.org/show_bug.cgi?id=694273#c27
(cherry picked from commit c064e18894)
2013-07-27 14:28:12 -07:00
Owen W. Taylor
e061305d61 Disable frame sync for GtkPlug
Plug windows weren't redrawing properly because the embedded
window was expecting to get messages for each frame from the
compositor, but the compositor doesn't know about embedded
windows. Simply disable frame sync for GtkPlug's GdkWindow -
extending XEMBED to handle frame sync isn't interesting
at this point.

A new API gdk_x11_window_set_frame_sync_enabled() is added
to allow this to be done.

https://bugzilla.gnome.org/show_bug.cgi?id=701613
2013-07-22 18:38:27 -04:00
Jehan
81f06e1749 gtkdialog - more informative warning when ordering unexisting response_id
(cherry picked from commit 0e4d9b7793)
2013-07-21 21:46:01 +09:00
Carlos Garnacho
c65c217741 quartz: Fix call to missing symbol
This patch can be considered a leftover of commit 12ffae5,
replace the no longer existing function with the GDK function
meant to replace it.

This was noticeable on regular clipboard operations in quartz
Cherry-picked from 7ffcd85.
2013-07-02 11:38:07 -07:00
Emilio Pozuelo Monfort
bd3f7f0619 menushell: don't activate a menu entry when opening a big menu
If a menu is opened and it doesn't fit entirely below or above
the menu bar, gtk+ will place it on top. The button release will
then activate the popup item that happens to appear under the
cursor. Avoid this by ignoring release events if they originated
in the parent menu bar and the duration of the press was too short.

https://bugzilla.gnome.org/show_bug.cgi?id=703069
2013-06-27 20:20:24 +02:00
Federico Mena Quintero
22ca91ffae GtkFileChooserButton: Also emit 'file-set' when changing the selection through the combo box
https://bugzilla.gnome.org/show_bug.cgi?id=696498
2013-06-21 19:17:35 -05:00
Federico Mena Quintero
5aae1eadb7 GtkFileChooserEntry: don't inline-complete if the entry doesn't have the focus
When the file chooser changes directories, it tells the GtkFileChooserEntry to
change its base folder (i.e. the folder from which relative pathnames are resolved).
GtkFileChooserEntry then starts loading a GtkFileSystemModel asynchronously.
In the finished_loading_cb(), however, it would always ask the GtkEntryCompletion
to insert the completion prefix, since that finished_loading_cb() is what is also used
while the user is typing *in the entry*.

But when the entry doesn't have the focus (e.g. the user changed directories by double-clicking
on the file list in the file chooser), there's no reason to insert completions at all.

https://bugzilla.gnome.org/show_bug.cgi?id=672271
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-06-21 19:05:35 -05:00
Michael Natterer
f04fe99deb quartz: remove check for keymap changes from update_keymap()
The function is now only called when the keymap has actually
changed. bug #698183.
(cherry picked from commit e5e17cf361)
2013-06-20 17:29:26 +02:00
Michael Natterer
7b08ca94cc quartz: update the keymap only if the input method changed
and not on each keystroke, which for some IMs apparently caused a full
update on each keystroke, not just a check for changes. Patch from
Takuro Ashie, bug #698183.

(cherry picked from commit bbe3554fa9)
2013-06-20 17:10:06 +02:00
Alexander Larsson
4932d44b9e IconTheme: Move changed emission to an idle
By delaying the emission to an idle we avoid a lot of tricky
reentrancy issues. For instance, a normal gtk_icon_theme_choose_icon()
call could in very rare cases (when a user updated an icon theme) emit
a signal which could affect the icon currently being looked up.  This
kind of reentrancy is very hard to test against, especially when it is
so rare, so we're better of avoiding it.

There is no real value to get the change signal directly anyway. All
it can do is affect which icon is rendered the next frame, and we will
handle the queued emission before rendering. Not to mention that icon
theme change detection is polled anyway, so it is already delayed.

https://bugzilla.gnome.org/show_bug.cgi?id=694755
(cherry picked from commit 159cccfe7b)
2013-06-19 11:16:27 +02:00
Alexander Larsson
b4244b734e IconTheme: Clear caches when reloading theme
When we're reloading the theme in ensure_valid_themes (due to noticing
that a theme dir has changed) we need to also clear the icon cache
as it will not be valid for the new theme.

We already do this in do_theme_change(), but ensure_valid_themes()
was missing this.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
(cherry picked from commit 1ee36713fe)
2013-06-19 10:15:15 +02:00
Alexander Larsson
b489d20ac4 IconCache: Keep a ref on the GtkIconData
The icon data in GttkIconInfo->data is currently owned by the
IconThemeDir->icon_data hashtable. However, on e.g. a theme change
blow_themes() destroys the dirs and thus the data, meaning any
outstanding GtkIconInfo points to stale data.

We solve this by adding a refcount to GtkIconData and reffing it
from GtkIconInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
(cherry picked from commit 280d606cd4)
2013-06-19 10:15:13 +02:00
Michael Natterer
044e34b34f quartz: move dialogs to the same window level as utility windows
window_type_hint_to_level(): applied patch from Paul Davis which moves
dialogs to NSFloatingWindowLevel. This is not quite the perfect
solution, but it's a pragmatic fix that makes apps which have both
window types much more usable, and prevents dialog from disappearing
under an application's main window.
(cherry picked from commit 59d49e1566)
2013-06-06 15:49:55 +02:00
Marek Kasik
8dee19fca8 printing: Show correct status of a job
"job-state" is IPP_TAG_ENUM not IPP_TAG_INTEGER.
2013-06-06 11:10:49 +02:00
YunQiang Su
30782e26a9 fix a typo in zh_CN translation 2013-06-06 11:02:29 +08:00
Scott Moreau
f9dd457b25 wayland: Always attach buffer before committing
With recent changes in attach semantics, we always need to attach before
committing. Without this changes to the window contents to not get reflected
in the content of the surface.

Signed-off-by: Rob Bradford <rob@linux.intel.com>

Cherry picked to fix: https://bugzilla.gnome.org/show_bug.cgi?id=701341
2013-05-31 15:26:16 +01:00
Chun-wei Fan
29f453b975 Update Visual Studio 2010 Property Sheets
Remove quotes that aren't really needed
2013-05-31 13:10:39 +08:00
Benjamin Otte
18190f6dba window: Call size_allocate() to allocate a size
Don't call gtk_container_resize_children().

https://bugzilla.gnome.org/show_bug.cgi?id=700185
2013-05-30 20:05:05 +02:00
Rafael Ferreira
eadbb077a5 Updated Braziliana Portuguese translation for Gtk-UI 2013-05-30 05:01:10 -03:00
Xavier Claessens
074585b3e3 GtkMenuItem: Take padding into account to position submenu arrow
Since commit a69619edbc, it not
possible anymore for the style to add space between the border
and the arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=700779
2013-05-29 14:55:27 +02:00
Colin Walters
a3864ac49f modules/input: Only build quartz module if we're targeting quartz
Otherwise the build is broken on GNU/Linux and Win32.
2013-05-21 18:44:05 -07:00
Rafael Ferreira
e77f16e54c Updated Brazilian Portuguese translation 2013-05-21 02:28:45 -03:00
John Ralls
948767960f Bug 667759 - gtkdnd-quartz.c is missing annotations for introspection
Work around this by introspecting gtkclipboard.c and gtkdnd.c instead
of the quartz alternatives.

Note that this is temporary: The implementation of GdkSelection
will make the quartz alternatives unnecessary. See bug 571582.
2013-05-20 15:45:27 -07:00
John Ralls
5753f69b68 Bug 691921 - GTK+ built on Leopard references [NSMenu removellItems]
Test it with respondsToSelector, and if it isn't available delete the
items one at a time.
2013-05-20 15:20:29 -07:00
E. K. Kato
5680244e8f Bug 694273 - Patch to support NSTextInputClient in text widgets
Provides an input module for native OSX input methods.
Based on a patch by Hiroyuki Yamamoto
(http://www.sraoss.jp/sylpheed/sylpheed/macosx/gtk+-2.24.0-macosx-textinputclient_ja-test1.patch).
Adjustments for Gtk3 by Matthew Francis <gnomebugs@newsheffield.co.uk>
2013-05-20 11:04:05 -07:00
Bastien Nocera
eb899ebbf8 GtkSwitch: Don't handle events from extra mouse buttons
Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:51:07 +02:00
Bastien Nocera
2b91f5de30 GtkButton: Don't suppress unhandled mouse events
Mouse events that we do not handle should bubble up to the parent
widget, so they can be handled there, instead of disappearing inside
the button. Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:51:01 +02:00
Matthias Clasen
828f9eb1e7 Bump version 2013-05-13 08:02:13 -04:00
Matthias Clasen
231d6c209f 3.8.2 3.8.2 2013-05-13 06:24:44 -04:00
Kjartan Maraas
662e718631 Updated Norwegian bokmål translation 2013-05-13 11:16:22 +02:00
Kjartan Maraas
0fee20071c Updated Norwegian bokmål translation 2013-05-13 09:38:51 +02:00
Bastien Nocera
2f1d718e13 Fix accels added after the window was shown not working
GtkApplicationWindow would only update its list of captured accels
when realizing the window. This meant that keyboard shortcuts added
after the window was realised (for example, added by plugins) would
be non-functional.

Solve this by updating our accels every time the accel map changes,
not only when realizing the window.

https://bugzilla.gnome.org/show_bug.cgi?id=700079
2013-05-13 08:57:37 +02:00
Matthias Clasen
650da1e6b0 Improve sensitivity handling in filechooser context menu
Items that act on the selection should not be sensitive if the
selection is empty. This was already the case for the 'Copy file
location' item, but not for the 'Add bookmark' and 'Visit file'
items.
https://bugzilla.gnome.org/show_bug.cgi?id=699104
2013-05-12 23:10:15 -04:00
Carlos Garnacho
8ae3bae9a9 Find tooltip/dnd widget running through container children in inverse order
Usually, educated GtkContainers' forall() implementation returns children
in an order that's safe for the default draw() implementation in GtkContainer.
So for widgets with some stacking notions (eg. GtkOverlay),
_gtk_widget_find_at_coords() needs to recurse within containers in reverse
order so it finds the topmost widget.

As this function is used in both tooltips and DnD code, this improves behavior
of "floating" widgets wrt those two. This could for example be seen in the
"Transparent" GTK+ demo, where dropping text on the entry results on the text
going to the textview.

https://bugzilla.gnome.org/show_bug.cgi?id=699239
2013-05-12 22:55:09 -04:00
Sébastien Wilmet
8368b12b61 Doc: various small fixes
https://bugzilla.gnome.org/show_bug.cgi?id=700007
2013-05-12 22:54:45 -04:00
Sébastien Wilmet
fecd632e57 gtktextchild: replace hard-coded values by a macro
The macro already exists, so it's better to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=700007
2013-05-12 22:54:33 -04:00
Tristan Van Berkom
945e5bd859 GtkComboBoxText: Improved GtkBuildable documentation.
Also removed a bogus FIXME comment which might have been true
a long time ago. Clarification: the "domain" attribute specified
in the builder script overrides any domain previously set with
gtk_builder_set_translation_domain(), so the translation of items
here is perfectly correct and does not need to be fixed.
2013-05-12 22:54:21 -04:00
Yuri Myasoedov
16f3b2f5c8 Updated Russian translation 2013-05-12 12:45:51 +04:00
Matthias Clasen
c3852404e6 GtkWindow: default size is only for initial map
Bring back need_default_size. We need it to preserve this
documented behavior:

The default size of a window only affects the first time a window is
shown; if a window is hidden and re-shown, it will remember the size
it had prior to hiding, rather than using the default size.

With this patch, all of the window sizing tests in
gtk/tests/window pass again.
2013-05-11 18:45:27 -04:00
Matthias Clasen
6bf7af2a46 Add more window-size related tests 2013-05-10 13:53:31 -04:00
Matthias Clasen
0c1fd574b0 Remove gtk_widget_size_allocate from gtk_menu_popup_for_device
GtkMenu calls gtk_widget_size_allocate on its GtkWindow during
gtk_menu_popup_for_device if the menu has not been realised. This can cause the
allocation of the GtkWindow and the size of the GdkWindow to become out of sync
because a top level GtkWindow does not attempt to re-size the GdkWindow when
its allocation is set.
https://bugzilla.gnome.org/show_bug.cgi?id=695120
2013-05-09 13:03:42 -04:00
Ryan Lortie
6ff37b070b GtkCheckMenuItem: remove an unused boolean field
always_show_toggle was always set to TRUE in _init() and never changed
from anywhere else.  Remove it and remove the if() statements based on
it.

https://bugzilla.gnome.org/show_bug.cgi?id=699929
2013-05-09 13:03:34 -04:00
Matthias Clasen
5f9c83da83 Fix a typo
Pointed out in bug
https://bugzilla.gnome.org/show_bug.cgi?id=698051
2013-05-09 13:03:28 -04:00
Marek Kasik
7e86d69854 printing: Don't crash when printer-state-message not provided
Check whether "printer-state-message" was returned before its
usage.

https://bugzilla.gnome.org/show_bug.cgi?id=699750
2013-05-09 15:15:21 +02:00
Matthias Clasen
52decc32fe Add window sizing tests
These are copied from master
2013-05-08 10:22:15 -04:00
Matthias Clasen
bb8254877b Make key themes work again
This was inadvertedly broken in commit
44ba5d253f.
Thanks to Matthew Francis for tracking this down and providing
a fix in https://bugzilla.gnome.org/show_bug.cgi?id=699901
2013-05-08 10:22:15 -04:00