Commit Graph

17881 Commits

Author SHA1 Message Date
Carlos Garnacho
6767541ead entry: Use GtkSelectionWindow for touch text selection
This enables touch devices to manipulate the text selection
2013-03-05 16:47:59 -05:00
Carlos Garnacho
7260e0570c Add GtkSelectionWindow
This is a helper object to provide context-dependent content
edition apt for touch devices.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
51be6b88db Add GtkBubbleWindow
This popup window widget can be used for touch friendly context
menus that point to a concrete area.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
a97178af65 texthandle: Set a bigger input shape, covering the line height
Now, even if the handles being rendered are small, the handle touch
input shape will be as wide as the visible part of the rendered asset, and
high enough to cover both the handle and the height of the line where
the selection bound is.

Also, make handles have the same virtual distance to the line top/bottom
when a drag starts, so the handle doesn't jump to another line after a
too short threshold.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
17d3775555 Ensure the insertion handle stays on fake events (eg from IM)
Don't set handles mode to none if the event has send_event set.
For consistency with GtkEntry, also make GtkTextView keep the
handle mode on buffer changes.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
d97861bd8b texthandles: Keep state internally to avoid X overhead
Handles now do sync X calls less often. As visibility state
is kept, it now can move+resize+show handles at once instead
of in separated steps.
2013-03-05 16:47:58 -05:00
Benjamin Otte
dc331ccb17 entrycompletion: Don't reconnect signals all the time
We block signal handlers areound GtkEntry signal emission and if those
signals get used to call functions on the completion that cause a
reconnection of the signals, then the reconnected signals will not be
blocked anymore (so they might get emitted?) and unblocking the old
signal id will later cause warnings.

Fixes spurious warnings in gtk/tests/filechooser tests.
2013-03-05 13:09:10 +01:00
Benjamin Otte
173317e9ce a11y: Emit active-descendants-changed when focus changes
This fixes the a11y/tree-relationships testcase.

The emission was lost in refactoring in commit
76670734f4
2013-03-05 11:56:56 +01:00
Alban Browaeys
aa08f4d8f5 bin: initialize out variables to zero for get_preferred_ functions.
Fixes case of child not visible then minimum_width/heigth natural_width
/heigth not initialized. Thus caller gets a random value.

https://bugzilla.gnome.org/show_bug.cgi?id=695131
2013-03-04 20:04:05 -05:00
Aleksander Morgado
d98b4fd0b4 clipboard: remove dead code
When setting contents of the clipboard and ownership or user data changes, we
end up calling clipboard_unset() to fully cleanup the previous clipboard state.
This call will itself call clear_func() for the previous user_data, and always
reset both 'get_func' and 'clear_func' to NULL.

So it's actually not possible to have 'get_func' being non-NULL once we have
called clipboard_unset(), so just remove that condition check and the code
inside.

https://bugzilla.gnome.org/show_bug.cgi?id=694924
2013-03-04 19:37:38 -05:00
Michael Hofmann
670e532a6b GtkColorChooserWidget: deselect swatch before removing palettes
When adding custom palettes, set the current swatch to NULL if the
palette it is on is going to be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=693995
2013-03-04 18:32:00 -05:00
Will Thompson
c6fbdb67f3 gtkenums: correct various documentation typos 2013-03-04 22:49:43 +00:00
Will Thompson
507bf6e5cf docs: correct various spelling and grammar errors
I noticed a few cases of "wether", and while fixing them noticed a few
"its" which should be "it's". It all went downhill from there.
2013-03-04 22:48:22 +00:00
Giovanni Campagna
9d81b69e06 GtkIconTheme: fix regression from 0db32f0632
icon_info_dup() is now called also for GtkIconInfos that already have
a pixbuf, so we must make sure that we correctly carry that from
the original icon_info to the copy.
2013-03-04 21:34:23 +01:00
Cosimo Cecchi
944fa635ae appchooserdialog: remove redundant checks
This is checked by GIO for us now.
Also, it's generally just a bad idea spawning error dialogs from inside
a library on top of other dialogs: lesson learned.

https://bugzilla.gnome.org/show_bug.cgi?id=675333
2013-03-04 14:41:21 -05:00
Giovanni Campagna
0db32f0632 GtkIconTheme: fix failed assertion when asynchrnously loading emblemed icons
If you tried to lookup an icon that was not emblemed, and then looked up
an emblemed icon with the same base, we would override the iconinfo adding
the emblems inline. Later, when the icon finished rendering, inside
gtk_icon_info_load_icon_finish, we would copy the result from the duplicate
(which did not include the emblem infos), but the icon would still fail the
assertion, because emblems infos are present but emblem_applied is false
(they were not requested in the first place!).
Solve this by avoiding the overwrite on a cached iconinfo, and instead duplicate
the iconinfo before adding the emblems. It is expected that another layer
of caching (such as StTextureCache in gnome-shell) will take care of avoiding
multiple rendering of the same icon+emblem combination.

https://bugzilla.gnome.org/show_bug.cgi?id=694968
2013-03-04 16:28:00 +01:00
William Jon McCann
cb27c4b08c Place the search icon in the primary slot of the entry
Instead of using the secondary slot for both clear and search. This
Makes it possible to use the search icon for actions regardless of
whether text has been entered, makes it possible to use the primary
icon to indicate search status, allows us to indicate the purpose
of the entry even if text has been already entered.

https://bugzilla.gnome.org/show_bug.cgi?id=694990
2013-03-03 11:16:09 -05:00
Matthias Clasen
b1fad0f478 Fix make check 2013-03-01 19:27:10 -05:00
Cosimo Cecchi
50065b7ba0 treeview: center expander allocated space
This patch centers the expander in the extra space allocated by the
horizontal-separator style property.

https://bugzilla.gnome.org/show_bug.cgi?id=650424
2013-03-01 13:55:05 -05:00
Cosimo Cecchi
d0895d6c0f treeview: properly calculate the treeview expander size
It should be expander-size + horizontal-separator / 2. Rework code
calculating the render position of the arrow to account for the larger
size.

https://bugzilla.gnome.org/show_bug.cgi?id=650424
2013-03-01 13:55:05 -05:00
Cosimo Cecchi
32bd10bf74 treeview: remove extra padding handling
We'll replace this with a proper calculation.

https://bugzilla.gnome.org/show_bug.cgi?id=650424
2013-03-01 13:55:05 -05:00
Alexander Larsson
c4539df2f2 Re-fix opacity group handling
The last change fixed the windowed widget case but broke
opacity group handling for windowed child widgets. This fixes
up the code by making sure we norender_children in when there
is an opacity group.

This also cleans up the comments about how this works to something
that is hopefully more understandable.
2013-03-01 14:56:30 +01:00
Alexander Larsson
b5ee44b419 TextView: Properly render background
We always need to render the background, as the window
background is not always set (i.e. during gtk_widget_draw()) or
when its partially visible.

https://bugzilla.gnome.org/show_bug.cgi?id=694925
2013-03-01 12:50:20 +01:00
Matthias Clasen
02e9152738 Fix DND with frame sync
Mutter magically ignores override-redirect windows with geometry
-100-100+1+1, and this breaks the frame synchronization between
gtk+ and mutter. For now, we avoid the issue by simply giving
the window a different geometry.
https://bugzilla.gnome.org/show_bug.cgi?id=694217
2013-02-28 07:48:06 -05:00
Matthias Clasen
4bb90a7443 Remove GTK_SELECTION_MODE_EXTENDED from the docs
It does not exist anymore as an enum value.
2013-02-28 07:48:06 -05:00
Cosimo Cecchi
d434a9103c range: don't draw origin when the slider is invisible
When the range of the GtkRange is zero (i.e. the upper and lower bounds
of the adjustment have the same value), don't use an origin to draw the
trough, as the slider will also be hidden, and the juncture between the
two sections of the trough will be visible.
2013-02-27 17:20:59 -05:00
Alexander Larsson
bbfc8f9a9b Fix opacity group hack
We can't norender the main window for a windowed widget as we then
never get any expose events.
2013-02-27 12:59:19 +01:00
Benjamin Otte
ce0675f1fb a11y: Emit text-changed signals when the text-buffer changes 2013-02-26 16:17:33 +01:00
Benjamin Otte
16e902d20a API: Export gtk_cell_renderer_class_set_accessible_type()
This function is necessary to implement cell renderer accessibility
support.
2013-02-25 21:42:31 +01:00
Matthias Clasen
b234025410 Some more documentation fixes
Make frame-clock-related symbols show up in the gtk docs.
2013-02-25 11:30:00 +01:00
Cosimo Cecchi
61344219d4 Revert "box: Don't special-case RTL hbox child positions anymore"
This reverts commit 6f86e57c4f.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:24 -05:00
Cosimo Cecchi
a07f767ed4 Revert "toolbar: Don't special-case RTL toolbar child positions anymore"
This reverts commit 821a675013.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:23 -05:00
Cosimo Cecchi
894f84c623 Revert "combobox: Don't special-case RTL child positions anymore"
This reverts commit cf712c462d.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:23 -05:00
Federico Mena Quintero
1708ae3f1a 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:52:39 -06:00
Federico Mena Quintero
a41b73fbc7 GtkWidget::draw() - Document how to get the dirty region
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-21 18:48:13 -06:00
Руслан Ижбулатов
8e80fd1ab9 Make sure icon cache has /-separated subdirs only (v2 - use g_build_path)
https://bugzilla.gnome.org/show_bug.cgi?id=692955
2013-02-21 19:42:46 +01:00
Chun-wei Fan
d861779b69 Redo Completion of Visual Studio projects for gtka11y
Update the Visual Studio projects for gtka11y and the completion of the
projects that go along with it.  This have been distcheck'ed on my Ubuntu
12.04 system.
2013-02-21 15:48:04 +08:00
Federico Mena Quintero
77154f295f filechooserbutton: In tests, sleep after opening the dialog
This may ensure that the dialog is actually done initializing.  We need to kill this
sleeping business and really use signals, sigh...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:13:07 -06:00
Federico Mena Quintero
158d74d257 filechooserbutton: Don't emit file-set signal when the change is not the result of a user action
We only emit that signal when the user confirms the button's internal GtkFileChooserDialog,
or when he drags-and-drops stuff into the button.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:13:03 -06:00
Federico Mena Quintero
cefcafc508 filechooserbutton: In the tests, run through the dialog more than one time
This ensures that data maintained by the button while the dialog opens/closes remains consistent.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:12:52 -06:00
Federico Mena Quintero
ac5cc19836 filechooserbutton: Add tests for cancelling the dialog via closing it (delete-event), instead of by simulating the Cancel button (response cancel)
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:13 -06:00
Federico Mena Quintero
2deb41fe63 filechooser: When stopping/clearing BROWSE model, really ensure that we end up in LOAD_EMPTY state
Previously we could end up in a situation where browse_list_model==NULL, and yet load_state==LOAD_FINISHED.
This is not a valid state.  So, when we get rid of the list model, really ensure that we end up
in LOAD_EMPTY so nothing assumes that there is a valid list model around.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:08 -06:00
Federico Mena Quintero
039cc929ad filechooser: Tighten up some assertions when actually selecting files in the treeview
The model must be fully loaded, and it must be inserted in the treeview.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:02 -06:00
Tristan Van Berkom
0f67bd7cfe GtkUIManager Buildable implementation: Fixing leaked reference count
Committing this on behalf of Milan Crha, bug: 694162
2013-02-20 18:17:14 +09:00
Benjamin Otte
76670734f4 a11y: Only emit expandable/expanded for expander column
We don't want to emit state changes for all the cells in a row, just for
the cell in the expander column. It's the only one that reports EXPANDED
or EXPANDABLE states, after all.

Also, contains refactoring of the affected functions for all the special
cases.

https://bugzilla.gnome.org/show_bug.cgi?id=694059
2013-02-20 02:44:33 +01:00
Benjamin Otte
7b4c49a95f a11y: Fix copy-paste error in state flag notification
We weren't checking the removed flag but the added flag for removal
emissions, so what would happen for every state change notification was:
- on state-added, both an "added" and a "removed" event were emitted
- on state-removed, nothing

https://bugzilla.gnome.org/show_bug.cgi?id=694059
2013-02-19 23:25:12 +01:00
Benjamin Otte
3166588033 tests: #ifdef out unused functions
... that are only used in that ifdef.
2013-02-19 14:44:49 +01:00
Rob Bradford
fe5146d8f2 window: Fix compiler warning when not building for X11
The callback function gtk_window_on_theme_variant_changed is only used on the
X11 backend (where GtkSettings is used for the settings information.)

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=674207
2013-02-19 13:11:30 +00:00
Cosimo Cecchi
7d4976b46e docs: add some missing gtk-doc blocks and Since tags for new API 2013-02-18 20:10:01 -05:00
Cosimo Cecchi
4c130ac904 tests: workarounds to keep treeview scrolling tests running
We can't safely examine allocations synchronously using
gtk_main_iteration(), as there might be not enough time for a new paint
clock tick to have expired and the allocation set on the widget.
Work this around adding g_usleep() calls before processing pending
mainloop events.
2013-02-18 19:39:12 -05:00