Commit Graph

21375 Commits

Author SHA1 Message Date
Alexander Larsson
f1921f8c2f win32: Fix build
gdkwindown-win32.c included windows.h directly rather than via gdkwin32.h
which broke the build for me at least. Instead rely on it being included in
gdkwin32.h and things work right.
2013-04-10 09:37:59 +02:00
Carlos Garnacho
d7e3f6f9f8 quartz: Fix call to missing symbol
This patch can be considered a leftover of commit a269c2f8d2 ,
replace the no longer existing function with the GDK function
meant to replace it.

This was noticeable on regular clipboard operations in quartz
2013-04-09 12:33:13 +02:00
Christophe Fergeau
3acacc0384 Sanitize memory handling in cups_request_printer_list_cb
gtk+ was trying to display already freed strings, leaking memory,
...I noticed this because I was getting weird blinking characters
as the status of my cups printers, and valgrind confirmed something
was wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=683072
2013-04-08 11:15:50 +02:00
Balázs Úr
8f3a3403ff Updated Hungarian translation 2013-04-04 21:58:15 +02:00
Michael Natterer
0909d7cee6 Revert "gdk: merge all 3.x changes to gdk_keysym_to_unicode_tab[] in gdkkeyuni.c"
This reverts commit 67438e0e49.

There must be some other change in 3.x that goes along with these
table changes, they completely break e.g. GtkEntry.
2013-03-30 08:42:58 +01:00
Michael Natterer
67438e0e49 gdk: merge all 3.x changes to gdk_keysym_to_unicode_tab[] in gdkkeyuni.c 2013-03-28 14:33:59 +01:00
Kristian Rietveld
a269c2f8d2 quartz: move atom/pasteboard type conversions functions to GDK 2013-03-28 13:00:33 +01:00
Kristian Rietveld
e6cf7a8d81 quartz: define GDK_NATIVE_WINDOW_POINTER 2013-03-28 12:06:41 +01:00
Balázs Úr
9582638a6b Updated Hungarian translation 2013-03-20 22:20:43 +01:00
Chun-wei Fan
7674fc9683 Visual Studio builds: Fix the Debug configs
The debug builds must link to the Debug version of the CRT, otherwise
trouble will arise due to the mixing of different CRTs
2013-03-18 17:27:21 +08:00
Chun-wei Fan
011bb7ccdc VS2008 Projects: Drop gdk-pixbuf Projects
The GDK-Pixbuf Visual Studio 2008 project files have long been moved and
maintain in the gdk-pixbuf project, soon after that was made independent
from the GTK+ project, so these files should no longer exist in the GTK+
git repo, especially as they are no longer distributed for a long time.
2013-03-18 17:27:20 +08:00
Federico Mena Quintero
e11b1943c7 filechooserbutton: Duh, remove all the timeouts after tests
Otherwise tests may start failing if they start after an old timeout triggers.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:30 -06:00
Federico Mena Quintero
1dee58ba87 filechooserbutton: Add a description string to assertions about emitted signals
On failed tests, this lets us more easily see see which assertion failed.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:26 -06:00
Federico Mena Quintero
ca7fe8417a filechooserbutton: Give proper names to the SELECT_FOLDER tests with cancelled dialog
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:22 -06:00
Federico Mena Quintero
852c2f06f0 filechooserbutton: Don't duplicate tests for GTK_RESPONSE_DELETE_EVENT
Instead, re-run tests made for GTK_RESPONSE_CANCEL with the delete-event response.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:18 -06:00
Federico Mena Quintero
aaa922bedb filechooserbutton: Do not propagate state from the dialog unless it is active
Change of plans to match the tests from the previous commit.

The state of the underlying dialog is never reflected by GtkFileChooserButton's API,
as the dialog is a transient thing.  The file chooser button only updates its state from the dialog,
and reflects the dialog's state, when the dialog has been confirmed and dismissed by the user.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:15 -06:00
Federico Mena Quintero
aa958f089d filechooserbutton: whitespace fixes 2013-03-12 18:29:11 -06:00
Federico Mena Quintero
29ed8d781e filechooserbutton: For the open-dialog-cancel-* tests, add a real nomenclature and test all the combinations
We used to have numeric names, which are a pain to maintain when new tests are added.
Now we have a real nomenclature (see the comment at the beginning of the open-dialog-cancel-* tests),
which lets us see easily if we have tested all the combinations.

Also, added all the combinations that were missing and removed redundant tests.
Not all the tests pass currently.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:06 -06:00
Federico Mena Quintero
9cfec7d3db filechooserbutton: Update the button's state only on programmatic changes to the filechooser's state
The idea is that the button will only update its state of the selection and current folder
when changes to those are done either by the calling program (with the filechooser's API)
or when the user actually confirms and dismisses the underlying GtkFileChooserDialog.

If the user makes changes to the dialog but has not dismissed it yet, those changes
will not be reflected in the button (as one would expect).

This commit also makes sure the current-folder-changed and selection-changed signals
are emitted at the right times.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:29:02 -06:00
Federico Mena Quintero
f9f76a3a0f filechooserbutton: Emit 'selection-changed' when changing the selection programmatically
We only emitted that signal when the selection changed through the underlying GtkFileChooserDialog.

To do this when the dialog is not active and the selection is changed by the calling program
(instead of by the user), we need to wait until the GtkFileChooserButton's UI has been updated
via an async callback from GIO.  So, we keep track of whether an entry point into the
button's API caused a programmatic change in the selection.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:28:59 -06:00
Federico Mena Quintero
2b6db9fb31 filechooserbutton: For tests, wait for signals instead of just sleeping
This should let tests complete faster.  Also, this will let us test
that the correct signals are actually being emitted.

The tests now fail, as the signals are not being emitted when they
should.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:28:55 -06:00
Federico Mena Quintero
bc604fe9f0 filechooserbutton: whitespace fixes 2013-03-12 18:28:50 -06:00
Federico Mena Quintero
d09b75b9ed filechooserbutton: During unselect_all(), update the widgets in all situations
Not just if we thought we had a selection.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:28:41 -06:00
Federico Mena Quintero
2368a31984 filechooserbutton: Add tests for unselect_all()
These all pass except one.
2013-03-12 18:28:37 -06:00
Federico Mena Quintero
15f9422adf filechooserbutton: HACK: Set a reasonable size for the dialog in the tests' second iteration
Something is causing the GtkFileChooserDialog to be resized really small on the second time it is run
during each test for GtkFileChooserButton.  So as a temporary hack we set it to 500x500 pixels on
the second run, so the size allocation code doesn't bomb on us.
2013-03-12 18:28:29 -06:00
Federico Mena Quintero
a37a8158bb gtkfilechooserbutton: In tests, allow the possibility of doing unselect_all 2013-03-12 18:28:23 -06:00
Federico Mena Quintero
82a5a0240c filechooserbutton: When the combo box changes, set the *file*, not the current folder
The currently-selected file *is* the selection even in SELECT_FOLDER mode.  Do not confuse this
with the current folder.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 18:28:13 -06:00
Aleksander Morgado
b994bcd4f2 combobox: popdown the combobox when on 'grab-broken-event'
And also explicitly remove pointer/keyboard grabs from the display.

Whenever the grab is reported lost, we should popdown the combobox, so that the
GDK_WINDOW_TEMP window is hidden and removed from the toplevel, as done with
the menu for example.

Leaving the GDK_WINDOW_TEMP window open when re-activating the application
triggers several issues in the win32 backend, due to restacking windows of the
non-toplevel group into the toplevel group:

https://bugzilla.gnome.org/show_bug.cgi?id=695200
2013-03-12 12:42:21 +01:00
Federico Mena Quintero
979e8bd9ec filechooserbutton: Update the combo box even after the dialog is cancelled
We assumed that we didn't have to update the combo box if the dialog got cancelled,
as it should simply retain its previous contents.  But this assumption doesn't work
as the dialog is brought up with the 'Other...' item - we don't want the
combo box to keep showing 'Other...' if the dialog is cancelled.

The test from the previous commit now passes.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 12:58:02 -06:00
Federico Mena Quintero
e16591780d filechooserbutton: New test for opening the Other item in the combo box and then canceling the dialog
There is this bug:

1. Start with a file chooser button in SELECT_FOLDER mode, and select a folder from the combo box.

2. Click on the button's combo box, select 'Other...'

3. You get the file chooser dialog. Cancel the dialog.

4. The file chooser button's combo box still shows 'Other...' instead of
   showing the selection from (1).

This is a test to ensure that the original selection is restored.
The test fails right now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 12:57:58 -06:00
Federico Mena Quintero
dc5c12b437 filechooserbutton: Sync the tests a bit with the master branch
The tests fail right now in gtk-2-24 because accessibility is not available out of the box.
2013-03-08 11:13:12 -06:00
Federico Mena Quintero
6dc11c26a8 filechooserbutton: Don't show the (None) item when the combo box is popped up
This is surprisingly tricky, since the (None) item *has* to be a visible item while
the combo box is *not* popped up, so that it can show its contents.  But the item
has to be *not* visible when the combo box is popped up.

Also, update the whole button's selection, not just the underlying dialog's, when
the combo box changes its selection - based on a patch by Paul Davis in
https://bugzilla.gnome.org/show_bug.cgi?id=691040#c20

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 10:56:49 -06:00
Federico Mena Quintero
b714446fd8 filechooserbutton: In SELECT_FOLDER, when the selection is empty, show (None) in the combo box
We do this by adding a new row type, ROW_TYPE_EMPTY_SELECTION.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 10:54:43 -06:00
Federico Mena Quintero
a72b31bac1 filechooserbutton: Update the button/combo at construction time
This way the internal labels will show the correct selection even if nothing
has been selected programmatically.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 10:54:39 -06:00
Federico Mena Quintero
6fb7087758 filechooserbutton: Update the button/combo whenever the selection is changed programmatically
We didn't change it when the file chooser button's dialog was inactive, and so
the actual file chooser button would not visually reflect the current selection.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 10:54:32 -06:00
Federico Mena Quintero
c4b47464a2 filechooserbutton: Test that the expected filename is shown
We do some gymnastics to pull the string out of the GtkButton or the GtkComboBox that is
being used in GtkFileChooserButton to show the current selection when the dialog
is inactive - namely, we look for the subwidget with the correct ATK role, and pull its
accessible name.

Currently the test fails; this is https://bugzilla.gnome.org/show_bug.cgi?id=691040#c18

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 10:54:08 -06:00
Aleksander Morgado
b2a65ebfb6 spinbutton: don't override initial text in non-numeric-only spin buttons
https://bugzilla.gnome.org/show_bug.cgi?id=695312
2013-03-08 11:23:58 +01:00
Federico Mena Quintero
461c1a547e Remove some unused variables 2013-03-06 12:42:24 -06:00
Federico Mena Quintero
3c993547a4 filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
In the case of checking for local_only, g_file_is_native() is not useful, since it
will return FALSE for something in a FUSE mount.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-06 12:25:43 -06:00
Federico Mena Quintero
7a93355977 filechooser: Also convert get_uris() to returning native paths
It was only being done in gtk_file_chooser_get_uri().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-06 12:08:03 -06:00
Federico Mena Quintero
f907d16329 filechooser: Rename _gtk_file_is_path_not_local() to _gtk_file_has_native_path()
Negatives in names of boolean functions are confusing.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-06 12:07:12 -06:00
Timothy Arceri
5d32c05578 filechooser: Show FUSE mounted locations in shortcuts
Since FUSE locations can be handled safely by applications show these mounted locations regardless of whether gtk_file_chooser_set_local_only()
is set to TRUE

https://bugzilla.gnome.org/show_bug.cgi?id=586367
2013-03-06 12:05:37 -06:00
Alan McGovern
776fc82bd5 quartz: Null check title before setting it
This avoids a crash in objective-c.

https://bugzilla.gnome.org/show_bug.cgi?id=695278
2013-03-06 12:40:23 +01:00
Cosimo Cecchi
3087e8b74e Revert "entry: never use GTK_STATE_ACTIVE to paint the background"
This reverts commit 87115e00a8.

https://bugzilla.gnome.org/show_bug.cgi?id=695003
2013-03-05 17:50:01 -05:00
Matthias Clasen
eb89bf1729 Bump version 2013-03-04 11:10:33 -05:00
Matthias Clasen
ed543bdccf 2.24.17 2013-03-04 08:50:35 -05:00
Changwoo Ryu
b01f90b8d1 immodule: Fix context ID lookup on module with multiple contexts
https://bugzilla.gnome.org/show_bug.cgi?id=690247
2013-03-04 13:07:10 +09:00
Aleksander Morgado
461c3835aa win32: fix possible memleak if GlobalAlloc() fails
Also remove the unused 'buf' variable.

https://bugzilla.gnome.org/show_bug.cgi?id=694742
2013-02-26 15:14:35 +01:00
Federico Mena Quintero
8eb2278f6a filechooserbutton: Don't ever use gtk_file_chooser_get_files()
The file chooser button only supports single-selection modes, so
switch the code to a simpler gtk_file_chooser_get_file() to avoid
dealing with GSLists of a single file.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-21 18:44:38 -06:00
Руслан Ижбулатов
d9f87ff098 Make sure icon cache has /-separated subdirs only (v2 - use g_build_path)
https://bugzilla.gnome.org/show_bug.cgi?id=692955
(cherry picked from commit 8e80fd1ab9)

Conflicts:
	gtk/updateiconcache.c
2013-02-21 19:44:47 +01:00