summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
Commit message (Collapse)AuthorAgeFilesLines
* Escape GtkBuilder XML tag in comment with backticksunce2023-01-151-3/+3
| | | | | | | | Escape XML tags in gi-docgen oriented comment e.g. from <child> to `<child>`, so that they don't become HTML tag on the final webpage. This fix includes everything from commit ff46ea64 and #5312. Fixes #5312
* Various spelling mistakes across a few domains that show up in documentation.Cam Cook2022-12-081-2/+2
|
* gtk: Stop using gtk_widget_show/hideMatthias Clasen2022-11-281-13/+9
| | | | | | | gtk_widget_set_visible and gtk_window_present are better alternatives, and calling gtk_widget_show on newly created widgets is no longer necessary anyway.
* Fix spelling errorsMatthias Clasen2022-11-171-5/+5
| | | | These were pointed out by codespell.
* stylecontext: Deprecate most apisMatthias Clasen2022-10-121-1/+0
| | | | | | | The notable exception here are the global provider apis, which are needed in some form and don't have a replacement yet. Move them to gtkstyleprovider.[hc], so we can wholly deprecated gtkstylecontext.[hc].
* Drop gtkintl.hMatthias Clasen2022-09-241-1/+1
| | | | | Include gtkprivate.h for I_() and glib-i18n.h for gettext macros.
* Merge branch 'gtknotebook-arrow-press' into 'main'Matthias Clasen2022-08-281-0/+1
|\ | | | | | | | | gtknotebook: Claim event sequence after pressing notebook arrow buttons See merge request GNOME/gtk!4990
| * gtknotebook: Claim event sequence after pressing notebook arrow buttonsMat2022-08-281-0/+1
| | | | | | | | | | | | | | When notebook tabs are reorderable, pressing the notebook arrow buttons to change the active tab results in tabs reordering unexpectedly. Claim the event sequence after pressing an arrow button to avoid conflicts with the motion/drag gesture used for reordering.
* | gtknotebook: update arrow button state when reordering tabsMat2022-08-291-0/+1
|/ | | | | | When reordering notebook tabs, updating the sensitivity state of the arrow buttons is necessary if the tab is moved to the beginning or end of the tab list.
* notebook: Use canonical signal namesMatthias Clasen2022-08-271-6/+6
| | | | No excuse for not doing that.
* Remove all nicks and blurbs from param specsSophie Herold2022-05-111-54/+18
| | | | | | | | Those property features don't seem to be in use anywhere. They are redundant since the docs cover the same information and more. They also created unnecessary translation work. Closes #4904
* Avoid copying static debug stringsMatthias Clasen2021-07-281-4/+4
| | | | | | The g_source_set_name calls were showing up as a major source of strdups in our profiles. Avoid that by using new GLib api when available.
* droptarget: Rename :drop to :current-dropMatthias Clasen2021-06-151-2/+2
| | | | | | | | | | | Rename the GtkDropTraget:drop property to :current-drop, to avoid naming collision with the signal of the same name. We leave the old property and getter in place, deprecated and marked as non-introspectable. Fixes: #4028
* invalid cast from 'GtkButton' to 'GtkBox'Caolán McNamara2021-06-011-2/+2
| | | | | | on adding a page to a GtkNotebook (soffice): Gtk-CRITICAL **: gtk_box_remove: assertion 'GTK_IS_BOX (box)' failed
* gtk: Clean up docs syntaxMatthias Clasen2021-05-221-10/+10
| | | | Replace leftover gtk-doc syntax (#Type) with backquotes.
* docs: Reduce redundancyMatthias Clasen2021-05-201-2/+2
| | | | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate. This adds a few missing nullable annotations too.
* introspection: Stop using allow-noneMatthias Clasen2021-05-201-12/+12
| | | | | allow-none has been deprecated for a long time already. Instead use optional and nullable everywhere.
* Documentation fixesMatthias Clasen2021-05-201-39/+39
| | | | | Mostly fixing up indentation of continuation lines, and other small cleanups.
* a11y: Realize notebook tabs when switchingMatthias Clasen2021-04-201-0/+3
| | | | | We're not moving focus here, so we can't rely on that to conjure the a11y objects into existence.
* notebook: Don't leak the pages propertyMatthias Clasen2021-03-271-1/+1
| | | | We were misuing a transfer-full getter here.
* notebook: Convert docsMatthias Clasen2021-03-111-175/+286
|
* dragsource: Use double coordinates for checking drag thresholdAlexander Mikhaylenko2021-01-291-7/+10
| | | | | | | | | | | | | | | | | | If multiple nested widgets have drag sources on them, both using bubble phase, we need to reliably pick the inner one. Both of them will try to start dragging, and we need to make sure there are no situations where the outer widget starts drag earlier and cancels the inner one. Currently, this can easily happen via integer rounding: start and current coordinates passed into gtk_drag_check_threshold() are initially doubles (other than in GtkNotebook and GtkIconView), and are casted to ints. Then those rounded values are used to calculate deltas to compare to the drag threshold, losing quite a lot of precision along the way, and often resulting in the outer widget getting larger deltas. To avoid it, just don't round it. Introduce a variant of the function that operates on doubles: gtk_drag_check_threshold_double() and use it instead of the original everywhere.
* Reduce use of GtkStyleContextMatthias Clasen2021-01-281-1/+0
| | | | | | Remove some unnecessary uses of GtkStyleContext where we can directly go to the GtkCssStyle, and and drop unnnecessary includes.
* a11y: Use the tab widget to label the notebook stack pageEmmanuele Bassi2020-11-161-0/+3
|
* a11y: Add more accessibility labels to GtkNotebookEmmanuele Bassi2020-11-121-2/+17
| | | | | | | | Label the various components: - the tab list - the tab widget - the arrow widgets
* docs: Add "Accessibility" section to various widgetsEmmanuele Bassi2020-11-121-13/+16
| | | | | There are a few widgets that gained an accessible role, which means adding an "Accessibility" section in their description.
* a11y: Use GROUP role for GtkNotebookEmmanuele Bassi2020-11-111-0/+1
| | | | A notebook is a grouping of a tab list, tabs, and tab pages.
* a11y: Parse reference lists using varargsEmmanuele Bassi2020-11-101-1/+1
| | | | | | | | | | Using GList is a bit lame, and makes the API more complicated to use than necessary in the common case. The only real use case for a GList is gtk_widget_add_mnemonic_label(), and for that we can use the GValue-based API instead. Fixes: #3343
* notebook: Remove unnecessary codeBenjamin Otte2020-10-201-19/+6
| | | | | | | gtk_widget_insert_after() reorders CSS nodes properly. Also fix page reordering code to actually reorder the widget instead of just the CSS nodes.
* Document accessible roles for stacks and notebooksMatthias Clasen2020-10-141-0/+6
| | | | This was forgotten when I implemented the Tabs pattern.
* notebook: Set accessible roles and propertiesMatthias Clasen2020-10-141-8/+34
| | | | | | | Set up the necessary roles, relations and properties for the tab patterns. This parallels what we have done for GtkStackSwitcher, and implements the Tabs pattern as described in the ARIA authoring guidelines.
* Drop style class definesMatthias Clasen2020-08-141-10/+7
| | | | | | We document the supported style classes by name, not by macro name, and these macros don't really add any value. Drop them for GTK 4.
* docs: Clean up many dangling linksMatthias Clasen2020-08-041-10/+6
| | | | | In many cases, these were references to no longer existing api, so some rewording was necessary.
* Remove ATKEmmanuele Bassi2020-07-261-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To build a better world sometimes means having to tear the old one down. -- Alexander Pierce, "Captain America: The Winter Soldier" ATK served us well for nearly 20 years, but the world has changed, and GTK has changed with it. Now ATK is mostly a hindrance towards improving the accessibility stack: - it maps to a very specific implementation, AT-SPI, which is Linux and Unix specific - it requires implementing the same functionality in three different layers of the stack: AT-SPI, ATK, and GTK - only GTK uses it; every other Linux and Unix toolkit and application talks to AT-SPI directly, including assistive technologies Sadly, we cannot incrementally port GTK to a new accessibility stack; since ATK insulates us entirely from the underlying implementation, we cannot replace it piecemeal. Instead, we're going to remove everything and then incrementally build on a clean slate: - add an "accessible" interface, implemented by GTK objects directly, which describe the accessible role and state changes for every UI element - add an "assistive technology context" to proxy a native accessibility API, and assign it to every widget - implement the AT context depending on the platform For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
* Replace "gdouble" with "double"Benjamin Otte2020-07-251-4/+4
|
* Replace "gchar" with "char"Benjamin Otte2020-07-251-9/+9
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-126/+126
|
* gtknotebook: Move away from grab_notifyCarlos Garnacho2020-06-241-19/+13
| | | | Connect to ::cancel on the relevant gesture instead.
* Revert "notebook: Don't capture clicks"Matthias Clasen2020-06-191-0/+1
| | | | | | This reverts commit 37eb0496b60f3612f15fd9d0fb43a3e3f2ecc144. This change broke notebook scroll arrows.
* notebook: Don't capture clicksMatthias Clasen2020-06-151-1/+0
| | | | | | | Using the bubble works just fine here, and keeps buttons in notebook tabs working without side-effects. Fixes: #2841
* a11y: Simplify GtkNotebookAccessibleEmmanuele Bassi2020-06-051-3/+7
| | | | | | Let the GtkNotebook explicitly update the accessible object that the current page has changed, instead of overriding GtkWidgetAccessible.notify_gtk.
* Replace most remaining uses of container apiMatthias Clasen2020-05-111-15/+16
| | | | These are all on GtkBox or enumerating children.
* notebook: Derive from GtkWidgetMatthias Clasen2020-05-111-58/+8
|
* Stop using container api on GtkNotebookMatthias Clasen2020-05-111-6/+4
|
* Don't use container api on GtkStackMatthias Clasen2020-05-111-2/+2
|
* Replace gtk_widget_destroy everywhereMatthias Clasen2020-05-111-3/+3
| | | | | Replace all remaining uses of gtk_widget_destroy by gtk_container_remove or g_object_unref.
* widget: Add a :focusable propertyMatthias Clasen2020-05-101-0/+2
| | | | | | | | | | Add back a property that determines whether an individual widget will accept focus or not. :can-focus prevents the focus from ever entering the entire widget hierarchy below a widget, and :focusable just determines if grabbing the focus to the widget itself will succeed. See #2686
* notebook: Use dispose instead of destroyMatthias Clasen2020-05-051-13/+3
| | | | The destroy vfunc is going away.
* Use gtk_button_set_child throughoutMatthias Clasen2020-05-041-3/+2
| | | | | Replace all uses of gtk_container_add on buttons by gtk_button_set_child.
* Use gtk_popover_set_child throughoutMatthias Clasen2020-05-041-2/+4
| | | | | Replace all uses of gtk_container_add on popovers by gtk_popover_set_child.