Jonas Ådahl
a48eaa1954
entrycompletion: Realize popup after setting screen
...
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.
To avoid this issue, realize the popup after the screen has been
properly set up.
Fixes #83 in gtk4
2018-03-14 15:37:26 +08:00
Matthias Clasen
4c150d8eb5
The big versioning cleanup
...
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Emmanuele Bassi
c655759cef
Replace gdk_threads_add_timeout* with g_timeout_add()
...
The main GDK thread lock is not portable and deprecated.
The only reason why gdk_threads_add_timeout() and
gdk_threads_add_timeout_full() exist is to allow invoking a callback
with the GDK lock held, in case 3rd party libraries still use the
deprecated gdk_threads_enter()/gdk_threads_leave() API.
Since we're removing the GDK lock, and we're releasing a new major API,
such code cannot exist any more; this means we can use the GLib API for
installing timeout callbacks.
https://bugzilla.gnome.org/show_bug.cgi?id=793124
2018-02-03 12:06:58 +01:00
Matthias Clasen
063592f350
entry completion: Stop using key-press/release-event
...
We can use the existing ::event handler for this.
2018-01-24 12:04:27 +01:00
Timm Bäder
4d36a0bf35
entrycompletion: Realize toplevel before attempting a grab
...
Otherwise, gtk_widget_get_window returns NULL and we can't successfully
perform a grab via the later gdk_set_grab call. This fixes the entry
completion in the file chooser not working.
2018-01-19 22:39:23 +01:00
Matthias Clasen
fa0f637268
entry completion: Drop another ::button-press-event handler
...
This one will be replaced by a generic ::event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a94d2826ae
entry completion: Stop using ::button-press-event
...
Just use the existing ::row-activated signal on the treeviews.
2018-01-16 14:14:10 -05:00
Matthias Clasen
253ac15928
entry completion: Stop using ::focus-out-event
...
We can just use ::event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9ceafd7c38
entry completion: Drop initial selection avoidance
...
This is a minor thing, and it is hard to recreate
with event controllers, so drop it for now.
2018-01-16 14:14:10 -05:00
Benjamin Otte
07164e098a
window: Turn gtk_window_set_screen() into gtk_window_set_display()
...
And have a priv->display instead of a priv->screen.
Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Carlos Garnacho
75d8175715
entrycompletion: Update to using GdkEvent API
2017-09-19 18:39:02 +02:00
Matthias Clasen
98089778df
Add names to more sources
...
This makes debugging mainloop-related issues more pleasant.
2017-08-13 09:03:40 -04:00
Timm Bäder
3dc6d240b3
Fix a few allocation coordinates & sizes
2017-07-19 21:27:15 -04:00
Timm Bäder
c92b7d4224
box: Remove fill child property
...
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 20:30:37 +02:00
Timm Bäder
5729ea7744
box: Remove expand child property
...
GtkWidget already has hexpand/vexpand properties.
2017-04-25 20:30:37 +02:00
Timm Bäder
c7c9a0ee51
entrycompletion: Remove unnecessary NULL check
...
completion really shouldn't be NULL at this point, especially since it
gets dereferenced higher up in the function.
2017-03-18 07:13:13 +01:00
Timm Bäder
56a58655fe
Remove unnecessary gtk_widget_show calls
2017-01-22 14:38:21 +01:00
Timm Bäder
ea897c6df4
Remove gtk_widget_show_all
2017-01-20 21:37:04 +01:00
Timm Bäder
5e06701f53
treeview: Remove style properties
...
Replace them with the Adwaita default values
2016-11-12 08:09:58 +01:00
Timm Bäder
f45dadadd0
box: Remove 'padding' child property
2016-10-16 18:17:21 +02:00
Benjamin Otte
e1a03ead7a
Use NULL for generic marshallers in g_signal_new()
...
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Matthias Clasen
b5fb9ae3b7
gtk: Port to new monitor api
...
Use the GdkDisplay monitor api instead of the GdkScreen one.
2016-04-27 23:18:16 -04:00
Alberto Ruiz
496f0892fc
introspection: This patch fixes nullable return values fixes for the following symbols in gtk
...
gtk_accel_group_query
gtk_accel_group_from_accel_closure
gtk_accel_label_get_accel_widget
gtk_accessible_get_widget
gtk_actionable_get_action_name
gtk_app_chooser_get_app_info
gtk_app_chooser_button_get_heading
gtk_app_chooser_dialog_get_heading
gtk_application_get_window_by_id
gtk_assistant_get_nth_page
gtk_binding_set_find
gtk_builder_get_object
gtk_builder_lookup_callback_symbol
gtk_builder_get_application
gtk_button_get_image
gtk_cell_area_get_focus_from_sibling
gtk_cell_renderer_start_editing
gtk_cell_view_get_model
gtk_cell_view_get_displayed_row
gtk_clipboard_get_owner
gtk_container_get_focus_child
gtk_container_get_focus_vadjustment
gtk_container_get_focus_hadjustment
gtk_dialog_get_widget_for_response
gtk_drag_get_source_widget
gtk_drag_dest_get_target_list
gtk_drag_source_get_target_list
gtk_entry_completion_get_model
gtk_entry_completion_compute_prefix
gtk_expander_get_label_widget
gtk_file_chooser_get_filename
gtk_file_chooser_get_current_folder
gtk_file_chooser_get_uri
gtk_file_chooser_get_current_folder_uri
gtk_file_chooser_get_preview_widget
gtk_file_chooser_get_preview_file
gtk_file_chooser_get_preview_filename
gtk_file_chooser_get_preview_uri
gtk_file_chooser_get_extra_widget
gtk_file_chooser_get_filter
gtk_file_chooser_native_get_accept_label
gtk_file_chooser_native_get_cancel_label
gtk_file_filter_get_name
gtk_font_chooser_get_font_family
gtk_font_chooser_get_font_face
gtk_font_chooser_get_font
gtk_font_chooser_get_font_desc
gtk_font_chooser_get_font_map
gtk_frame_get_label
gtk_gesture_get_device
gtk_gesture_get_window
gtk_gl_area_get_error
gtk_header_bar_get_title
gtk_header_bar_get_subtitle
gtk_header_bar_get_custom_title
gtk_icon_info_get_filename
gtk_icon_view_get_path_at_pos
gtk_icon_view_get_model
gtk_image_get_pixbuf
gtk_image_get_animation
gtk_label_get_mnemonic_widget
gtk_label_get_attributes
gtk_check_version
gtk_menu_button_get_popup
gtk_menu_button_get_menu_model
gtk_menu_button_get_align_widget
gtk_menu_button_get_popover
gtk_menu_item_get_submenu
gtk_menu_item_get_accel_path
gtk_native_dialog_get_title
gtk_native_dialog_get_transient_for
gtk_notebook_get_nth_page
gtk_notebook_get_tab_label_text
gtk_notebook_get_menu_label
gtk_notebook_get_menu_label_text
gtk_notebook_get_group_name
gtk_notebook_get_action_widget
gtk_offscreen_window_get_surface
gtk_offscreen_window_get_pixbuf
gtk_paned_get_child1
gtk_paned_get_child2
gtk_places_sidebar_get_location
gtk_places_sidebar_get_nth_bookmark
gtk_plug_get_socket_window
gtk_popover_get_default_widget
gtk_progress_bar_get_text
gtk_recent_filter_get_name
gtk_recent_manager_lookup_item
gtk_settings_get_default
gtk_socket_get_plug_window
gtk_stack_sidebar_get_stack
gtk_stack_switcher_get_stack
gtk_style_context_get_section
gtk_style_context_get_parent
gtk_style_context_get_frame_clock
gtk_test_find_widget
gtk_text_buffer_get_mark
gtk_text_tag_table_lookup
gtk_text_view_get_tabs
gtk_text_view_toggle_cursor_visible
gtk_text_view_get_window
gtk_toolbar_get_nth_item
gtk_tool_button_get_label
gtk_tool_button_get_icon_name
gtk_tool_button_get_label_widget
gtk_tool_button_get_icon_widget
gtk_tool_palette_get_drop_item
gtk_tool_palette_get_drop_group
gtk_tree_model_filter_convert_child_path_to_path
gtk_tree_model_filter_convert_path_to_child_path
gtk_tree_model_sort_convert_child_path_to_path
gtk_tree_model_sort_convert_path_to_child_path
gtk_tree_view_get_column
gtk_tree_view_get_bin_window
gtk_tree_view_column_get_widget
gtk_tree_view_column_get_tree_view
gtk_widget_get_frame_clock
gtk_window_group_get_current_device_grab
GtkTextBufferSerializeFunc
2016-01-08 12:18:23 +00:00
Carlos Garnacho
fad174b967
GtkEntryCompletion: Use gdk_seat_grab()
...
https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:32:55 +01:00
Matthias Clasen
c73325c6b0
entry completion: Reduce the timeout
...
Pop up the completion window after 100ms. The previous timeout
of 300ms was making completions feel slow.
https://bugzilla.gnome.org/show_bug.cgi?id=758929
2015-12-05 14:12:27 -05:00
Matthias Clasen
0731c50262
entry completion: Only grab the device if we have one
...
When the entry completion is popped up from a timeout, we may
not have a device. In that case, don't call gdk_device_grab,
do avoid criticals.
2015-10-15 20:18:26 -04:00
Matthias Clasen
f4068288e7
entry completion: Convert to g_object_notify_by_pspec
...
This avoid pspec lookup overhead in g_object_notify.
2015-09-06 17:11:35 -04:00
Christian Dywan
18dddddbab
entry completion: Clarify index in documentation
...
https://bugzilla.gnome.org/show_bug.cgi?id=579466
2015-07-31 09:11:57 -04:00
Georges Basile Stavracas Neto
1f96f351e0
entrycompletion: no need to return boolean
...
The boolean _gtk_entry_completion_resize_popup's return
value is not used anywhere, and only adds more complexity
for the method.
https://bugzilla.gnome.org/show_bug.cgi?id=751913
2015-07-03 15:51:06 -03:00
Matthias Clasen
29a2a65756
Formatting fix
2015-04-05 22:07:59 -04:00
Carlos Garnacho
94ec6b4418
entrycompletion: Ensure transient_for is set before showing window
...
gtk_entry_set_completion() (and _gtk_entry_completion_connect underneath)
may happen when the entry has no toplevel yet. This window acts as the
"parent" for subsurface windows on wayland, and is indispensable to create
its backing wl_subsurface, so this resulted in non-visible popups there.
Fix this by ensuring transient_for is set before showing the popup.
https://bugzilla.gnome.org/show_bug.cgi?id=745463
2015-03-10 11:15:04 +01:00
Matt Watson
f50d1b2584
GtkEntryCompletion: fix sizing bug with multiple cells
...
When using a completion with some custom cells in the cell layout,
if would often size wrong when first presented on screen.
The entry completion is the only place in the entire gtk code base
that calls gtk_tree_view_column_cell_get_size outside of gtktreeview
itself. It calls into the function before the tree view has done some
important validation on its cell state, the net result of which is
only the first element in the gtkcellareabox the entry completion uses
well actually have its size respected.
We now call gtk_widget_get_preferred_size on the tree view before
calling into the individual cell size routines, to guarantee that the
tree view has run its validate_rows routine and cell state is valid.
https://bugzilla.gnome.org/show_bug.cgi?id=741130
2014-12-10 13:29:32 -08:00
Benjamin Otte
b547c0319a
entrycompletion: Remove outdated code
...
I tried asking but nobody knew why it is necessary to set the background
color of the first cell. It seems with CSS styling this is completely
unnecessary.
2014-10-03 06:18:05 +02:00
Matthias Clasen
bbc7cd2351
GtkEntryCompletion: Treat ::text-column specially
...
Using the setting for this property conflicts with the documentation
for gtk_entry_completion_set_text_column() which explicitly states
that setting the property directly behaves differently. Concretely,
this caused the file chooser entry completion popup to have two
columns (with identical content).
This partially reverts 331c28b369
.
2014-09-03 22:46:38 -04:00
Carlos Garnacho
d04d29f26c
entrycompletion: Mark popup window as subsurface on wayland
...
This will make the completion window use GDK_WINDOW_SUBSURFACE and be
shown relative to the parent window without involving compositor grabs.
https://bugzilla.gnome.org/show_bug.cgi?id=695504
2014-08-26 23:06:02 +02:00
Saurabh
931958f9f4
Adding 'no-matches' signal support to gtkentrycompletion
...
Add a new 'no-matches' signal and add a function pointer to gtkentrycompletionclass
and remove one from the padding at the end.
https://bugzilla.gnome.org/show_bug.cgi?id=726566
2014-06-28 00:41:09 -04:00
Jasper St. Pierre
9c37b3de74
gtk: Don't use GObjectClass.constructor
...
Use the newer constructed instead, which has a fast path in GObject.
2014-06-26 19:06:43 -04:00
Matthias Clasen
331c28b369
GtkEntryCompletion: Use G_PARAM_EXPLICIT_NOTIFY
...
Also, use the setter for text-column, internally.
2014-06-09 13:31:00 -04:00
Matthias Clasen
872fbfacd3
Split GtkWindowGroup into its own file
...
gtkwindow.c is too big and too messy. This is a small step
towards making it better.
2014-06-04 06:24:05 -04:00
Claudio Saavedra
578d43c2ba
gtkentrycompletion: fix a critical warning
...
There are early returns in this method before the completion timeout
is set later on, so set the source to 0 to avoid trying to remove it
later again.
https://bugzilla.gnome.org/show_bug.cgi?id=725824
2014-03-06 16:38:52 +02:00
Matthias Clasen
83dee19d93
Revert "GtkEntryCompletion: call setter for "text-column""
...
This reverts commit 9761a966d8
.
2014-03-03 06:03:20 -05:00
Matthias Clasen
04bed9f84a
Revert "gtk_entry_completion_set_text_column: reuse old renderer"
...
This reverts commit f6a0debdd9
.
2014-03-03 06:03:20 -05:00
Matthias Clasen
8315dff0b0
Revert "GtkEntryCompletion: call cell_area()->clear()"
...
This reverts commit 3c28297134
.
2014-03-03 06:03:19 -05:00
Matthias Clasen
c243ad8f49
Revert "gtk_entry_completion_get_cells: revert returning NULL"
...
This reverts commit a9a6fb045a
.
2014-03-03 06:03:19 -05:00
Matthias Clasen
ab69814b5d
Revert "GtkEntryCompletion: fix warning"
...
This reverts commit 2f0c610c35
.
2014-03-03 06:03:18 -05:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
e34bd4137d
docs: use apostrophes in *n't
2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3
docs: use proper apostrophe
...
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b
docs: Use markup for links
2014-02-07 09:42:12 -05:00
William Jon McCann
2a45418b67
docs: use proper quotes
2014-02-05 15:08:42 -05:00