Commit Graph

29841 Commits

Author SHA1 Message Date
Benjamin Otte
1961be9ee9 iconview: Simplify adjustment monitoring for accessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
4652d4c399 a11y: Remove widget_destroyed call
GtkAccessible does all of that for us now.
2011-12-19 16:17:13 +01:00
Benjamin Otte
80a0413d40 a11y: Use widget_unset vfunc in treeview 2011-12-19 16:17:13 +01:00
Benjamin Otte
dbc1581376 accessible: Ensure we unset the widget when finalizing 2011-12-19 16:17:13 +01:00
Benjamin Otte
03a63def24 widget: Unref accessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
7b5b678e2e a11y: Fix crash in notebook
When the accessible was disposed before the notebook it referenced, the
weak ref could still trigger. This works around it.
2011-12-19 16:17:13 +01:00
Benjamin Otte
e042462674 widget: Unset self from accessible 2011-12-19 16:17:13 +01:00
Benjamin Otte
23b5f9c066 widget: Unset widget on accessibles 2011-12-19 16:17:13 +01:00
Benjamin Otte
075cc5dd36 accesible: Manage the DEFUNCT state
A GtkAccessible with a NULL widget is defunct, there's no way around it.
2011-12-19 16:17:12 +01:00
Benjamin Otte
1305815bde iconview: Split out iconview accessible 2011-12-19 16:17:12 +01:00
Benjamin Otte
eb27c61878 accessible: Use set_widget() in destroy notify
We don't want to bypass the unset_widget call.
2011-12-19 16:17:12 +01:00
Benjamin Otte
bac73e48db API: accessible: Add widget_set and widget_unset vfuncs
I expect them to be used a lot, so this approach seems better than
requiring signals that connect to "notify::widget". Also, we can't use
regular functions (like dispose or constructed), becaiuse those assume
that (un)setting of the widget only happens once and with the current
design (a puble set_widget() function) we can't really guarantee that.

Also, I split them into two separate functions as one function is part
of construction and the other part of destruction of the object. And it
doesn't sound like a good idea to have that both be part of one
function.
2011-12-19 16:17:12 +01:00
Benjamin Otte
50431be274 accessible: At an important note to the docs
I wanted to use weak refs to ensure this instead, but it's a performance
problem when used in the treeview and each and every cell adds a weak
ref to the treeview.
2011-12-19 16:17:12 +01:00
Benjamin Otte
5789fd983b accessible: Check the widgeyt actually changed when setting 2011-12-19 16:17:12 +01:00
Benjamin Otte
1998a63917 accessible: Make widget a property 2011-12-19 16:17:12 +01:00
Benjamin Otte
eed9cc94e1 treeview: Only set focus column in setter function
Single point of entry. It's actually going to become more complicated
with a11y now.
2011-12-19 16:17:12 +01:00
Benjamin Otte
e4f6a7124b a11y: Simplify code
Use peek_cell() instead of a custom find_cell() function that duplicates
loads of functionality.
2011-12-19 16:17:12 +01:00
Matthias Clasen
19c5b5c9d6 Tell gtk-doc about G_GNUC_WARN_UNUSED_RESULT 2011-12-19 07:32:32 -05:00
Matthias Clasen
5913e88feb Reduce gtk-doc warnings 2011-12-19 07:32:15 -05:00
Matthias Clasen
910e50994c Fix parameter name mismatch 2011-12-18 16:04:51 -05:00
Matthias Clasen
020c1846b7 Use the workarea when placing popups
This uses the new workarea API to avoid placing popups underneath
panels, docks, etc.
2011-12-18 14:29:16 -05:00
Matthias Clasen
c6df2828b7 Add gdk_screen_get_monitor_workarea
The function returns the part of a monitors area that should be
used for positioning popups, menus, etc. The only non-trivial
implementation atm is in the X backend, all the other backends
just return the full monitor area. The X implementation is
currently suboptimal, since it requires roundtrips to collect
the necessary information. It should be changed to monitor
the properties for changes, when XFixes allows to monitor
individual properties.
https://bugzilla.gnome.org/show_bug.cgi?id=641999
2011-12-18 14:29:16 -05:00
Daniel Mustieles
74cff292d5 Updated Spanish translation 2011-12-18 20:11:34 +01:00
Carlos Garnacho
358ecad501 gdk,xi2: Make more resilient about not yet known devices
Dealing with disabled devices may turn into hierarchy/device
changed events on device IDs with no backing GdkDevice yet,
so protect against that. The device attachment will be handled
correctly when the device is enabled later.
2011-12-18 18:57:57 +01:00
Ignacio Casal Quinteiro
69fba5d3ed textlayout: cleanup
Use g_clear_object, move unrefs to dispose and reorganize code
2011-12-18 18:46:36 +01:00
Paolo Borelli
397cbbef32 Use gtk_text_layout_get_iter_at_line
We already have a gtk_text_layout_get_iter_at_line wrapper that takes
care of getting the btree from the layout, we may as well use it.
2011-12-18 17:44:23 +01:00
Paolo Borelli
7f301cf822 Remove useless get_iter_at_line calls.
No need to call _gtk_text_btree_get_iter_at_line right before calling
totally_invisible_line, since it is the first thing it does itself.
2011-12-18 17:35:08 +01:00
Baurzhan Muftakhidinov
bbf96b9ea7 [l10n] Updated Kazakh translation 2011-12-17 21:11:15 +01:00
Piotr Drąg
9b02b6c7c0 Updated POTFILES.in 2011-12-17 19:50:27 +01:00
Rui Matos
4a113394da tests: Add a test for latest commit
https://bugzilla.gnome.org/show_bug.cgi?id=666392
2011-12-17 11:59:08 +00:00
Rui Matos
9d6da33ff5 widget: Flip the sensitive flag even if the state doesn't change
Even if we can't change our sensitivity because the parent is insensitive we
should still flip the sensitive flag. Otherwise, with and insensitive parent,

child.set_sensitive(True)
...
parent.set_sensitive(True)

would result in child still being insensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=666392
2011-12-17 11:48:01 +00:00
Benjamin Otte
b9fad15ee6 filechooserentry: Catch tab key earlier
Instead of in the key_press handler, use a signal handler. The signal
handler runs before the default handler, and before other signal
handlers. In particular it runs before the signal handler installed via
gtk_entry_set_completion() which pops down the entry completion, and we
don't want that to happen.

The code does not change the code of the handler in any significant way,
it just refacotrs it to not call the parent anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=663573
2011-12-16 20:09:14 +01:00
Benjamin Otte
640754e98b filechooserentry: Do inline completion only when opening files
When saving files, using <tab> is required. We don't want the UI
randomly changing filenames from below us.

https://bugzilla.gnome.org/show_bug.cgi?id=663573
2011-12-16 20:09:14 +01:00
Benjamin Otte
351dd206bc filechooserentry: Remove unused enum 2011-12-16 20:09:14 +01:00
Benjamin Otte
4fb6961c6a filechooserentry: Allow NULL as base folder again
This was removed previously, but is necessary to support the case where
no base folder is in use, which should cause an error. This can be
experienced in save mode in the recent files list.

https://bugzilla.gnome.org/show_bug.cgi?id=663573
2011-12-16 20:09:14 +01:00
Benjamin Otte
523a45d927 filechooserentry: Don't show files when selecting directory
We don't want to complete on files when they're not supposed to be
selectable.
2011-12-16 20:09:14 +01:00
Benjamin Otte
57766f1948 filechooserentry: Remove beep function
There's only 2 places left where we potentially beep. We can call
gtk_widget_error_bell() directly there.
2011-12-16 20:09:14 +01:00
Benjamin Otte
0d10583695 filechooserentry: Simplify load completion
Most importantly, consistently trigger a beep when we abort a pending
completion.
2011-12-16 20:09:14 +01:00
Benjamin Otte
c4a331f934 filechooserentry: Use a GtkFileFilter for filtering
That way, we can use the regular filtering features of the
filesystemmodel instead of having our own filtering function that
duplicates much of the matching code.

This also removes the broken-on-windows feature where files strting with
a dot were not autocompleted.
2011-12-16 20:09:14 +01:00
Benjamin Otte
98fb16e307 filesystemmodel: Add a toggle for whether directories are filtered 2011-12-16 20:09:14 +01:00
Benjamin Otte
b47b6d307e filechooserentry: Remove the file column
It is not needed anymore.
2011-12-16 20:09:14 +01:00
Benjamin Otte
5607cd9170 filechooserentry: Simplify code
Use all the clever functions we invented in recent refactorings to
compute the file and dir part and the current folder.

This also fixes the bug where "./" was not taken as the current
directory but interpreted as a file named "./".
2011-12-16 20:09:13 +01:00
Benjamin Otte
d27d73f885 filechooserentry: Refactor function
Name the function set_completion_folder() and make it accept NULL, so it
behaves like a regular setter function.
2011-12-16 20:09:13 +01:00
Benjamin Otte
ea8f5f15c1 filechooserentry: Set minimum key length to 0
We want the empty chooser to show possible completions, too.
2011-12-16 20:09:13 +01:00
Benjamin Otte
af9e385616 filechooserentry: Simplify refresh_current_folder_and_file_part()
The function can get the text it's refreshing from itself, as there is
only one possible value. And it doesn't need to return a value anymore.
2011-12-16 20:09:13 +01:00
Benjamin Otte
357ae09b54 filechooserentry: Get rid of unused member variable
in_change isn't set anymore.
2011-12-16 20:09:13 +01:00
Benjamin Otte
6ab681c094 filechooserentry: Remove _gtk_file_chooser_entry_set_file_part()
gtk_entry_set_text() is fine.
2011-12-16 20:09:13 +01:00
Benjamin Otte
c9b220275a filechooserentry: Use completion for completion
Reduce the amount of code even more by using the entry completion to
query the prefix.
2011-12-16 20:09:13 +01:00
Benjamin Otte
d3fd759f77 filechooserentry: Add gtk_file_chooser_entry_get_completion_text()
This returns the text that should be completed on. As this is somewhat
tricky to compute (and in fact one place did it wrong), let's make it a
function.
2011-12-16 20:09:13 +01:00
Benjamin Otte
f6f2a78d3e filechooserentry: Don't update the folder when completing
The folder is always up to date, there's no need to update it. (If the
folder is not up to date, that is a bug and needs to be fixed
elsewhere.)
2011-12-16 20:09:13 +01:00