Matthias Clasen
7e02ad648c
toolbar: Stop using legacy event signals
...
We can reuse the button gesture here.
2017-12-12 22:55:48 -05:00
Matthias Clasen
ffd6baec42
gtk: Intern css names
...
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Benjamin Otte
594aae71e5
toolbar: Remove gdk_flush() calls
...
It's not 2003 anymore.
2017-11-17 08:07:27 +01:00
Matthias Clasen
dbfaa99107
image: Remove icon-size argument from icon setters
...
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
a7754a14b5
toolbar: Remove icon sizes
2017-11-15 14:22:16 -05:00
Benjamin Otte
44614394e6
widget: Turn screen-changed signal into display-changed
2017-10-31 00:43:11 +01:00
Matthias Clasen
fb8589671d
Drop unused includes of gtkrender.h
...
We don't use the gtk_render apis internally anymore.
Drop these includes so it is clear where the remaining
uses are.
2017-10-25 21:46:46 -04:00
Benjamin Otte
43c212ac28
build: Enable -Wswitch-enum and -Wswitch-default
...
This patch makes that work using 1 of 2 options:
1. Add all missing enums to the switch statement
or
2. Cast the switch argument to a uint to avoid having to do that (mostly
for GdkEventType).
I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.
The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Daniel Boles
48055f99e7
Toolbar: Clarify set_show_arrow() a bit more
2017-09-03 11:04:59 +01:00
Daniel Boles
1b38944203
Toolbar: Clarify how the arrow overflow menu works
...
The fact it affects the preferred size, and only works with ToolItems
that return a menu proxy item, was unclear unless deduced from other
sources, and this led to users thinking it was broken, for example:
https://stackoverflow.com/q/44644642/2757035
https://bugzilla.gnome.org/show_bug.cgi?id=787158
https://bugzilla.gnome.org/show_bug.cgi?id=787195
2017-09-03 10:59:34 +01:00
Timm Bäder
5f859a1f24
widget: Remove gtk_widget_get_content_allocation
...
Replace it where we still need something similar, e.g. in
gtk_widget_translate_coordinates
2017-08-14 12:22:39 +02:00
Timm Bäder
36ab70ddf5
widget: Add baseline and out_clip parameters to size-allocate
...
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.
This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
8a7843eaf2
toolbar: Remove gadget
2017-07-19 21:27:11 -04:00
Timm Bäder
c9d421eff3
toolbar: Remove css box rendering
2017-07-19 21:27:11 -04:00
Carlos Garnacho
b7e6bb2241
gtktoolbar: Remove input window
...
This is not necessary to receive events anymore.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
a72404dd5a
gtk: Mass delete all GtkWidget event mask API
...
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.
Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Timm Bäder
f053a63d74
container: Remove include_internals parameter from forall
...
with include_internals=TRUE, this is the same as the (still private)
gtk_widget_forall, or just using the children/sibling accessors in a
loop.
2017-04-25 20:30:37 +02:00
Timm Bäder
43cdeee3c4
widget: Save pointer to focus child
...
Do the same thing GtkContainer does.
2017-03-31 09:50:39 +02: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
13b001b77c
widget: Remove show_all vfunc
2017-01-20 21:33:38 +01:00
Timm Bäder
47d4ad71fb
Remove gtk_container_snapshot_child
...
Replace it with the already existing gtk_widget_snapshot_child.
2017-01-07 17:19:30 +01:00
Benjamin Otte
0dbdf0c428
gadget: Remove gtk_css_gadget_draw()
...
And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.
All gadgets are snapshot now.
2016-12-20 18:01:12 +01:00
Piotr Drąg
a2da4ddceb
Use Unicode in translatable strings
...
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772371
2016-12-19 15:08:10 -05:00
Benjamin Otte
1733a3de0e
toolbar: Implement snapshot()
2016-12-19 05:36:06 +01:00
Timm Bäder
be9adea58e
toolbar: Replace button-press-event handler with gesture
2016-12-07 18:06:32 +01:00
Benjamin Otte
da207c9fdd
snapshot: Add a snapshot function to GtkCssCustomGadget
2016-11-15 17:48:45 +01:00
Benjamin Otte
32a5729d18
gtk: Chain up in realize()
...
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Timm Bäder
9992a616ef
widget: Use ::measure vfunc to measure size
...
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Timm Bäder
4bf1e4ebe6
toolbar: Remove max-child-expand child property
2016-10-18 00:29:20 +02:00
Timm Bäder
4f9bcaf3c6
toolbar: Remove button-relief style property
...
And in turn also public API to set the button relief on the toolbar as
well as the vfunc from GtkToolShell.
2016-10-18 00:29:16 +02:00
Benjamin Otte
5e8c719e34
toolbar: Use gdk_window_new_input()
2016-10-18 00:22:35 +02:00
Benjamin Otte
4df6ddad54
API: container: Remove gtk_container_set_border_width()
2016-10-16 18:18:58 +02:00
Timm Bäder
999d45b4e8
Remove various unused style properties
2016-10-16 18:17:21 +02:00
William Hua
8701e34f74
port to new gtk_menu_popup_at_* () functions
...
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
Timm Bäder
63be0deb0f
toolbar: Limit item position to number of contained elements
...
Greater values don't make much sense.
https://bugzilla.gnome.org/show_bug.cgi?id=682080
2016-05-12 18:27:08 +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
Cosimo Cecchi
eff8865ab1
separatortoolitem: don't use custom sizing/rendering
...
Instead, just rely on the CSS gadget; we can stop using wide-separators,
separator-height and separator-width, and at the same time deprecate the
space-size style property of GtkToolbar.
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
ea25985b67
toolbar: deprecate GtkToolbarSpaceStyle and space-style style property
...
This is completely unused already.
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
48596090af
toolbar: port to use a gadget
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
d64304997f
toolbar: use gtk_container_handle_border_width()
2016-01-03 00:41:32 -08:00
Cosimo Cecchi
10c222649e
toolbar: trivial code cleanup
2016-01-03 00:41:32 -08:00
Matthias Clasen
43f822e70f
Annotate deprecated style properties
...
Use G_PARAM_DEPRECATED with deprecated style properties.
This will make it easier to identify and remove such stale
properties from css, since it will now trigger warnings.
2015-11-16 15:13:33 -05:00
Matthias Clasen
bcc6df00e5
Cosmetic: Avoid explicit state variables
...
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Florian Müllner
e364ae3ea8
Use gtk_widget_set_focus_on_click() instead of deprecated setters
...
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Matthias Clasen
7ee7019ca7
toolbar: Use an element name instead of a style class
...
The element name is ... toolbar.
2015-10-31 20:30:56 -04:00
Benjamin Otte
8e87988179
toolbar: Switch from get_path_for_child() to css node managing
2015-07-16 06:15:13 +02:00
Benjamin Otte
d3c147a62d
stylecontext: Split render functions out into gtkrender.[ch]
2014-10-03 06:18:05 +02:00
Benjamin Otte
b5a8b7ef3b
widget: Make _gtk_set_simple_clip() take an optional content clip
2014-08-21 00:54:07 +02:00