Commit Graph

10216 Commits

Author SHA1 Message Date
Michael Natterer
e3e055f855 quartz: make setting_same_owner member of GtkClipboardOwner @public
to fix the build, thanks to parafin for the patch.
2012-12-17 22:20:40 +01:00
Michael Natterer
31ae1a0b5b gtk: fix scrolling in modal dialogs when event_widget is insensitive
When checking for modal grabs in gtk_main_do_event(), forward
GDK_SCROLL events to event_widget, even if it is insensitive.
2012-12-14 14:30:31 +01:00
Michael Natterer
4a8df7a33c quartz: fix crash in the recent clipboard "fix", and really fix it
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.
2012-12-07 12:28:05 +01:00
Michael Natterer
f2b74db5dc Bug 626499 - GtkClipboard unnotified on change of OS X pasteboard owner
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].
2012-12-04 14:31:13 +01:00
Federico Mena Quintero
6056f1855b Merge branch 'bgo658280-filechooser-recently-used-2-24' into gtk-2-24 2012-12-03 14:24:43 -06:00
Federico Mena Quintero
f52befa7e7 Revert "Add items to the shortcuts bar's popup menu to configure the startup mode"
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.
2012-12-03 14:23:17 -06:00
Michael Natterer
1eb0d98d73 gtk: convert keyvals to unicode before committing to the imcontext 2012-11-30 15:06:48 +01:00
Michael Natterer
c0102b3089 gtk: add more OSX special casing for the deadacute and deaddoubleacute keys
So " plus foo prduces foo-with-diaereses and ' plus c produces
c-with-cedilla.
2012-11-30 14:43:32 +01:00
Federico Mena Quintero
7860500bc6 Add items to the shortcuts bar's popup menu to configure the startup mode
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-26 20:36:44 -06:00
Federico Mena Quintero
a591a15382 Switch to Recent Files or $CWD at startup
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-26 18:42:18 -06:00
Federico Mena Quintero
ebb2977a54 New settings key for the startup mode
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-26 18:13:05 -06:00
Federico Mena Quintero
925147af70 New way to show $CWD in the shortcuts
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 14:01:55 -06:00
Timothy Arceri
0239ee50be Remove bookmark duplicate of shortcut
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
2012-11-13 12:56:28 -06:00
Michael Natterer
376fc4d712 gtk: clean up properly in GtkFileChooserEntry's dispose() to fix crashes
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.
2012-11-05 20:15:17 +01:00
Cosimo Cecchi
de89546e30 Use bookmarks file from gtk-3.0 XDG config dir if present
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>
2012-10-29 09:52:26 -04:00
Matthias Clasen
c8aa94f7a8 immulticontext: Always check if the global context id changed
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
2012-09-09 20:06:38 -04:00
Kristian Rietveld
b4ddf24234 Implement gtk-primary-button-warps-slider GtkSetting
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.
2012-09-07 16:46:08 +02:00
Cosimo Cecchi
15999ec5f3 range: make condition consistent with GTK3
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
2012-09-06 12:03:17 -04:00
Emmanuele Bassi
1070c5849e recent-manager: Coalesce multiple changes
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
2012-09-03 13:23:56 -04:00
Cosimo Cecchi
cc7abf6a1c range: add a primary-button-warps-slider style property
Setting this to TRUE (it's FALSE by default) enables the behavior we
have in GTK3 for scrollbars.

https://bugzilla.gnome.org/show_bug.cgi?id=683279
2012-09-03 11:56:58 -04:00
Cosimo Cecchi
af26ec6a73 tooltip: add tooltip-radius and tooltip-alpha style properties
This allows themes to change the tooltip opacity and radius. Based on a
downstream Fedora patch by Matthias Clasen.

https://bugzilla.gnome.org/show_bug.cgi?id=683070
2012-08-30 21:41:40 -04:00
Michael Natterer
ebe50bbecb gtk: ref the action around gtk_action_emit_activate()
for the same reason we already ref the action's group in the function.
2012-08-03 23:24:39 +02:00
Matthias Clasen
0b59fbfb9d Allow fallback for input method modules
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.
2012-06-05 17:03:42 -04:00
Michael Natterer
b32a9eb691 GtkTreeView: make tree expanding/collapsing more robust
gtk_grab_remove() *after* we did the expanding/collapsing, otherwise
grab_notify() might kick in and mess with our state. Fixes bug #675835.
2012-05-31 11:02:09 +02:00
Christian Kellner
43c9a702c7 quartz: Don't use compound text for selections
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.
2012-05-14 21:33:08 +02:00
Kristian Rietveld
eb831590cd Implement _gtk_clipboard_store_all()
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.
2012-05-14 20:55:26 +02:00
Michael Natterer
71164e57b9 quartz: add a special case to GtkIMContextSimply for entering '"'
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.
2012-05-10 10:57:16 +02:00
Federico Mena Quintero
2b624f6f8f bgo#675421 - Set the wm_role on GtkFileChooserDialog
The window's role is 'GtkFileChooserDialog', so that window managers can match it
for positioning.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-05-07 15:43:20 -05:00
Federico Mena Quintero
85c9b5c76a bgo#674556 - Save the file chooser's settings when the toplevel gets unmapped
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>
2012-04-23 10:45:50 -05:00
Kristian Rietveld
698aba575c quartz: properly handle the given hotspot position 2012-04-22 17:15:06 +02:00
Kristian Rietveld
f91c525fe2 quartz: fix coordinates for synthesized event
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.
2012-04-22 17:11:38 +02:00
Carlos Garcia Campos
9a0e81380b printing: Make sure destroy function is always called by gtk_enumerate_printers
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
2012-03-15 14:49:00 +01:00
Javier Jardón
339786f078 build: require glib 2.28
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
2012-03-14 19:28:55 +00:00
Federico Mena Quintero
2bedcd8863 Use g_format_size() instead of g_format_size_for_display()
We do this like in commit 4ead7b69ea, so that apps which use the gtk2 file chooser
will show the same file sizes as gtk3 apps.
2012-03-05 17:21:55 -06:00
Benjamin Otte
4b1e2b08a7 iconview: Fix autoscroll
... when the iconview is not the only child in it's parent GdkWindow.
2012-03-03 21:12:19 +01:00
Matthias Clasen
8da54b8118 GtkTrayIcon: chain up in dispose
Pointed out in bug 643131 and bug 640308.
2012-02-15 15:16:30 +00:00
Kalev Lember
bbe8ba8aff win32: Don't crash when installed in a top-level directory
Avoid NULL-pointer dereference when package installation directory
doesn't contain any slashes.

Reported by Paweł Forysiuk.
2012-02-09 18:00:08 +02:00
John Ralls
14488e69c4 Remove stock_icons/*/text-x-generic.png from GENERATED_ICONS
It's not generated, and having it included removes it during
maintainer-clean so you have to retrieve it from the repo to build.
2012-02-07 16:03:28 -08:00
Benjamin Otte
b96f423343 modules: Fix memleak
Modules would leak if they were specified twice in the same command,
so ie this would leak:
  GTK_MODULES=gail,gail
2012-01-24 17:46:22 +01:00
Benjamin Otte
ab6007f052 modules: break when finding the right module
This way, we don't use the wrong module. In particular we don't screw up
refcounts that lead to crashes later on.
2012-01-24 17:46:14 +01:00
Stefan Sauer
308d195014 scale: Fix marks for inverted scales
This is a backport of the fix from gtk-3.
2012-01-20 21:57:21 +01:00
Stefan Sauer
9adc078e25 scale: remove the match argument from find_next_pos()
Using the 'pos' argument is enough.
2012-01-20 21:57:21 +01:00
Matthias Clasen
165d2c0ca2 Implement the editing-canceled property in GtkCellEditableEventBox
https://bugzilla.gnome.org/show_bug.cgi?id=639455
(cherry picked from commit 8f6a8441a2)
2012-01-20 11:47:50 +01:00
Carlos Garcia Campos
5123cfe5e6 printing: gtk_print_settings_load_key_file() ignores group_name 2012-01-11 15:46:15 +01:00
Stefan Sauer
03fae9086f scale: backport orientation fix for vertical scales 2012-01-09 18:39:13 +01:00
Stefan Sauer
92412d23b7 gtkscale: fix bogus compare func
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.
2012-01-09 18:16:53 +01:00
Ryan Lortie
986072b361 introspection: Fix srcdir != builddir builds
https://bugzilla.gnome.org/show_bug.cgi?id=667458
2012-01-09 17:08:12 +01:00
Benjamin Berg
1e731a3400 Improve PICKONE_* handling in GtkPrinterOptionWidget (bug #543520)
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.
2012-01-06 00:18:38 +01:00
Matthias Clasen
fcd01e9718 Use the right icon-name for missing images
Patch by Erik van Pienbroek, bug 629878.
2012-01-05 14:30:48 -05:00
Federico Mena Quintero
400e53c568 bgo#662814 - Don't print a g_warning() when GtkRecentManager can't find a file
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>
2011-12-13 11:07:42 -06:00