Commit Graph

366 Commits

Author SHA1 Message Date
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
Benjamin Otte
7a05016d93 container: Split out a function
Computing the clip for all children is something I want to do in other
places.
2015-12-15 08:41:16 -05:00
Matthias Clasen
a661ce4d06 shortcuts: Complete the container implementations
Various problems with the container implementations in
GtkShortcutsWindow, Section and Group were showing up
in glade.
2015-11-22 22:41:48 -05:00
Matthias Clasen
68d77b1823 Expand the container_remove hack
Make it possible to use gtk_container_remove on GtkShortcutsWindow.
glade needs this.
2015-11-20 15:31:00 -05:00
Carlos Soriano
81cb57b260 gtkcontainer: clarify requirements for implementations
Spent quite a few time investigating why the widgets were
not shown in my GtkContainer implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=758087
2015-11-16 17:18:00 +01:00
Matthias Clasen
32f27a4cd0 container: Slightly reword some docs
Clarify gtk_container_remove documentation regarding reference
holding. Suggested in

https://bugzilla.gnome.org/show_bug.cgi?id=757607
2015-11-09 07:40:44 -05:00
Colomban Wendling
eef5f27fb4 gtkcontainer: Guard internal use of deprecated public API 2015-11-01 02:42:36 +01:00
Benjamin Otte
cd20ae8fe1 container: Don't keep our own variable trying to track need for resize
Insteaad, introduce gtk_widget_needs_allocate() and use that.
2015-10-28 19:44:29 +01:00
Benjamin Otte
bef44ab294 window: Don't queue resizes when inhibiting resizes
Since the frame clock, the inhibit happens on the GDK level, so this
code is no longer necessary.
2015-10-28 19:44:29 +01:00
Benjamin Otte
6866d1c06e widget: Make gtk_widget_queue_allocate() not resize
This commit toggles the big switch. We now don't run size_allocate()
from the toplevel up anymore in cases where we don't need to.

Things might be broken in subtle ways as a result of this commit. We'll
have to find them and fix them.
2015-10-28 19:44:28 +01:00
Benjamin Otte
690e015ed1 sizegroup: Move container function into its only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte
798a288405 container: Use correct allocation for calling size_allocate() 2015-10-28 19:44:27 +01:00
Benjamin Otte
ab2d236d3d sizegroup: Remove GtkQueueResizeFlags
They were only used with geometry widgets.
2015-10-28 19:44:27 +01:00
Benjamin Otte
e422ccefe1 container: Don't randomly call gtk_widget_set_allocation()
gtk_widget_size_allocate() does that already.
2015-10-28 19:44:27 +01:00
Matthias Clasen
b84797a2c6 Don't use g_list_next in gtkcontainer.c
We generally access ->next directory.
2015-10-20 06:14:57 -04:00
Matthias Clasen
a768798f2b container: Avoid duplicate calls to should_propagate
We were calling gtk_container_should_propagate_draw
twice for each child. We can avoid this by splitting
out an gtk_container_propagate_draw_internal function.
2015-09-29 09:43:43 -04:00
Matthias Clasen
eaddbb2dca Trivial: Move a cairo_save call
Move the cairo_save call to where it is needed.
2015-09-29 09:43:42 -04:00
Matthias Clasen
ac198a3ce6 Add a few more inlined getters 2015-09-28 06:29:50 -04:00
Matthias Clasen
3c54fbd3ac Use stupid quotes instead of dumb quotes
Following a similar change in GLib a while ago.

'bla' may by stupid, but it looks less dumb than `bla'.
2015-09-23 07:01:16 -04:00
Matthias Clasen
1d46dfb0a7 container: Use qdata for focus chain 2015-09-23 07:01:16 -04:00
Matthias Clasen
c7c1f9ff61 widget: Add a few more inlined getters 2015-09-23 07:01:16 -04:00
Benjamin Otte
51a1bc21af Revert "Avoid type checking overhead for resize-mode"
This reverts commit 3eacfa88f2.

Apart from the patch not being correct, we don't want to expose private
structures in header files if we can avoid it.
And this type-checking overhead is not an optimization that is even
measurable.

https://bugzilla.gnome.org/show_bug.cgi?id=754932
2015-09-12 21:27:24 +02:00
Matthias Clasen
3eacfa88f2 Avoid type checking overhead for resize-mode 2015-09-12 12:50:38 -04:00
Garrett Regier
44460cd720 container: Don't add classes twice
_gtk_widget_create_path() already adds the style classes.
2015-09-11 17:56:44 +02:00
Timm Bäder
3900700479 GtkContainer: Fix paramter name in doc comment 2015-09-10 11:34:44 +02:00
Matthias Clasen
6f2fcce494 Use a getter for widget direction 2015-09-09 06:32:46 -04:00
Matthias Clasen
93f8f12e39 Add some more child property API
Add gtk_container_install_child_properties and
gtk_container_child_notify_by_pspec to mirror te corresponding
GObject APIs.
2015-09-08 08:07:32 -04:00
Matthias Clasen
0f92a43e10 Move GtkWidgetPrivate to gtkwidgetprivate.h
This lets us use inlined getters for members in there,
avoiding the type checks in the public getters.
2015-09-07 02:40:22 -04:00
Matthias Clasen
29b9d48a1f container: Convert to g_object_notify_by_pspec
This avoids pspec lookup overhead in g_object_notify.
2015-09-06 17:13:45 -04:00
Benjamin Otte
3d2ead0fce headerbar: Get rid of get_path_for_child()
Instead, reorder CSS nodes.
2015-07-16 06:15:13 +02:00
Emmanuele Bassi
c5a250ce37 container: Update the add() warning
Now that gtk_widget_reparent() has been deprecated, we should not
suggest it.
2015-07-04 19:34:23 +01:00
Matthias Clasen
83245abfea GtkContainer: Use _gtk_builder_lookup_object 2015-04-27 23:09:24 -04:00
Matthias Clasen
aeddf55655 GtkContainer: Use the new helpers
Instead of issuing g_warning, fill the provided GError.
This lets us test this error handling, and is the right
thing to do. Use the new GtkBuilder helpers and
g_markup_collect_attributes to do so.
2015-04-27 01:15:22 -04:00
Benjamin Otte
4b2cdb37fb cssnode: Remove timestamp from gtk_css_node_validate()
GtkCssNode knows its own timestamp.
2015-03-18 15:23:32 +01:00
Benjamin Otte
5833858abf cssnode: Make parent style change part of GtkCssNode 2015-03-18 15:23:32 +01:00
Benjamin Otte
75b633ae08 cssnode: Only pass a boolean for parent changes
Nobody cares what changed in the parent, so don't track it.
2015-03-18 15:23:31 +01:00
Benjamin Otte
d3471508a0 cssnode: Use the frame clock's time
... nstead of the monotonic time when validating a cssnode.
2015-03-18 15:23:31 +01:00
Benjamin Otte
b92fe2fa85 widget: Add gtk_widget_get_css_node()
and replace gtk_style_context_get_root() with it.
2015-03-18 15:23:31 +01:00
Benjamin Otte
28043f0a92 cssnode: Refactor invalidation propagation
We want to be sure to gtk_css_node_invalidate() all potential changes.
2015-03-18 15:23:30 +01:00
Benjamin Otte
4cc2af2db1 stylecontext: Move validation into GtkCssNode 2015-03-18 15:23:29 +01:00
Matthias Clasen
5dd6ad0057 Typo fix 2014-12-10 21:08:08 -05:00
Matthias Clasen
ecfcb3e2cc Make gtk_container_remove work on popover menus
Extend the hack we have in place for composite containers to
GtkPopoverMenu.
2014-11-16 02:30:19 -05:00
Matthias Clasen
1f81c83fd8 Add GtkPopoverMenu
GtkPopoverMenu is a GtkPopover subclass that has a menu-like stack
built-in.
2014-10-29 06:49:58 -04:00
Matthias Clasen
aa3020a39e GtkContainer: Support focus chain in GtkBuilder
This adds support for a <focus-chain> element which can be
used to specify a custom focus order for the children of
a container.

https://bugzilla.gnome.org/show_bug.cgi?id=582799
2014-09-29 23:59:21 -04:00
Sébastien Wilmet
c104c64436 Better mark GtkAlignment as deprecated
- Move the class to the Deprecated section.
- Warning at the bottom of the class description.
- A missing property was not marked as deprecated.
- Update doc of gtk_container_set_border_width() to not mention
  GtkAlignment.

https://bugzilla.gnome.org/show_bug.cgi?id=736622
2014-09-17 15:02:50 +02:00
Matthias Clasen
327b097725 Trivial: Use g_clear_object more
It no longer has atomic overhead, so we can use it everywhere.
2014-08-09 10:16:27 +02:00
Matthias Clasen
ac2329b842 Mark GtkContainer::resize-mode as deprecated
The setter was deprecated a while ago, do the same for the property.
2014-06-09 13:39:38 -04:00
Matthias Clasen
d6cae074a6 GtkContainer: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:54 -04:00
Evan Nemerson
54ec42f035 gtk: port many nullability annotation fixes from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-30 13:24:20 -07:00
Matthias Clasen
7bf3d9d0ab Fix doc syntax
End-of-comment tags don't take an @ - thats only for parameters.
2014-05-19 06:58:18 -04:00