We must not release the GtkClipboardOwner in pasteboardChangedOwner
becaue we don't own a reference to ourselves (NSPasteboard does).
Instead, release the owner right after setting it, transferring
ownership to NSPasteboard
Also, fix repeated setting of the same owner by keeping the
owner around in GtkCLipboard, and re-use it if "user_data"
doesn't change. To avoid clipboard_unset()ting our own contents
in the process, add an ugly "setting_same_owner" boolean to
GtkClipboardOwner, set it during re-setting the same owner,
and avoid calling clipboard_unset() from pasteboardChangedOwner
if it's TRUE.
pasteboardChangedOwner is not called as reliably as we'd want to get it,
so keep track of [pasteboard changeCount] and drop clipboard ownership
when a change happened. Also better unset the clipboard content redundantly
in a few places rather than missing one, and reorder the code in
gtk_clipboard_set_contents() so that the new aggressive unsetting
won't unset the clipboard under our feet when we call
[pasteboard declareTypes].
Per the gtk-devel meeting on 2012/11/29, we'll not have a UI in the file chooser dialog
to select between those modes. Instead, we'll show that key in gtweaktool.
This reverts commit 7860500bc6.
Application code can set shortcut folders that are already bookmarks.
This code causes the bookmarks to be refreshed after the shortcut is
added removing any possible bookmark duplicates
https://bugzilla.gnome.org/show_bug.cgi?id=577806
Don't just unref the completion_store, call discard_completion_store()
instead which also unsets it as the GtkEntryCompletion's model. Fixes
bug 681845 and probably some others, because the situation in this bug
is completely common.
Will read from old location if new location isn't found, and will always
write back to the original location the file was read from.
Adapted from commit ceb3fecd11 on the
master branch, based on a patch from
William Jon McCann <jmccann@redhat.com>
This makes sure that if the gtk-im-module setting changes we update
our internal state immediately on the next event whichever it is.
In particular this fixes the case of the gtk-im-module setting
changing while the user is typing and the slave context remaining
the same, effectively ignoring the setting change.
Backport of a0f155e839.
https://bugzilla.gnome.org/show_bug.cgi?id=675365
It replaces the recently added GtkRange:primary-button-warps-slider
style property. Implement the setting in the quartz backend,
it proxies the "click in the scroll bar to" property from the
OS X PrefPane.
cc7abf6a1c introduced the
primary-button-warps-slider style property, but with a different
condition check than the GTK3 counterpart.
It turns out we really need to check for the mouse click location here,
or we'll warp the slider to pointer also in case we clicked on the
slider itself.
https://bugzilla.gnome.org/show_bug.cgi?id=683512
Since the ::changed implementation of GtkRecentManager implies a
synchronous write operation, when we receive multiple requests to emit a
::changed signal we might end up blocking.
This change coalesces multiple ::changed emission requests using the
following sequence:
• the first request will install a timeout in 250 ms, which will
emit the ::changed signal
• each further request while the timeout has not been emitted
will increase a counter
‣ if the counter reaches 250 before the timeout has been
emitted, then the RecentManager will remove the timeout
source and force a signal emission and reset the counter
This sequence should guarantee that frequent ::changed emission requests
are coalesced, and also guarantee that we don't let them dangle for too
long.
https://bugzilla.gnome.org/show_bug.cgi?id=616997
Accept a :-separated list of module names in GTK_IM_MODULE and
the corresponding setting, to deal a bit better with broken
situations.
https://bugzilla.gnome.org/show_bug.cgi?id=603559
Patch by Akira Tagoh, backported from GTK+ 3. The backport
is required because GTK+ 2 and 3 are listening to the same env
vars and settings for immodules.
Explicitly return FALSE in selection_set_compound_text() to
indicate that we don't want to support compound text selections;
this will eliminate the "not implemented" warning for quartz.
This pushes the clipboard contents to the OS X clipboard when the
application is quit. Without doing this, clipboard data set by a GTK+
application cannot be accessed after the clipboard has been quit.
Currently, we implement this the easy way because the clipboard
support is fully implemented in GTK+. In the future this might change.
Turn dead_doubleacute plus space into '"' and not into a double
acute because that's the way to enter double quotes on the
US-International keyboard layout.
The window's role is 'GtkFileChooserDialog', so that window managers can match it
for positioning.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
In GTK+ 2, child widgets don't get unmapped, and yet, that is when we were trying to
save the settings of GtkFileChooserDefault. Now we connect to the toplevel's
unmap signal and do the right thing there.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Of course, we must pass coordinates in the NSWindow coordinate system
when creating an NSEvent. This fixes drag icon positioning and makes
the icon slide back to the correct position when the drag is
canceled.
When GtkPrinterFunc always returns FALSE, for example when looking for
a non existent printer, if print list is done for all backends or print
backend status is UNAVAILABLE, gtk_enumerate_printers() finishes with an
empty backend list and destroy function is never called. We need to
check the backend list again after calling list_printers_init for all
backends and finish the enumeration if it's empty.
https://bugzilla.gnome.org/show_bug.cgi?id=672125
As dieterv said, gtk 2.24 win32 binaries have been frozen on
glib 2.28.x, and we dont have resources rigth now to ensure pygobject
static bindings still function correctly with newer glib versions
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
This patch modifies GtkPrinterOptionWidget to support loading them
again. It also allows the user to enter values from the dropdown list
to select the item.
Also, *do* add the file to the recently-used list, even if the file does not
exist yet. This is used from the Save dialog, so even shitty apps which don't
add the file to GtkRecentManager, will get the file added from the Save dialog.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>