summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
Commit message (Collapse)AuthorAgeFilesLines
* selection: Remove the info uintBenjamin Otte2017-11-161-8/+3
| | | | | | | | | Instead of allowing people to pass a uint user-data, insist on them comparing mime types. The user data was a uint instead of a pointer anyway, so uniqueness could not be guaranteed and it caused more issues than it was worth. And that's ignoring the fact that it basically wasn't used.
* dnd: Make GtkDragDest and GtkDragSource use GtkTargetListBenjamin Otte2017-11-151-1/+4
| | | | | This gets rid of GtkTargetEntry in the API and consistently uses GtkTargetList.
* notebook: Fix setting show-tabsTimm Bäder2017-11-031-2/+2
| | | | | show-tabs=FALS means the notebook is not supposed to show tabs, regardless of whether it has a current page or not.
* notebook: Remove useless call to gtk_widget_reset_styleTimm Bäder2017-11-031-1/+0
|
* Drop GdkScreen from GdkDevice apisMatthias Clasen2017-10-311-4/+2
| | | | | Returning the screen does not add anything here and GdkScreen is going away.
* notebook: Don't steal right-clicks from contentMatthias Clasen2017-10-071-1/+15
| | | | We only want to pop up the context menu in the tab strip.
* build: Enable -Wswitch-enum and -Wswitch-defaultBenjamin Otte2017-10-061-14/+68
| | | | | | | | | | | | | | | | | | | 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.
* notebook: Update to using GdkEvent APICarlos Garnacho2017-09-191-6/+10
|
* gtknotebook: Simplify some if-conditionsPhilip Withnall2017-09-121-4/+2
| | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=787303
* widget: Remove gtk_widget_get_border_allocationTimm Bäder2017-08-141-1/+1
|
* widget: Remove gtk_widget_get_margin_allocationTimm Bäder2017-08-141-1/+1
| | | | | It's not needed anymore with get_outer_allocation (which will be replaced by something more appropriately named).
* Notebook: Remove null check after dereferenceDaniel Boles2017-08-011-2/+1
| | | | | | | | | This function clearly assumes the parameter children cannot be NULL, and the call sites seem to perform enough checks to confirm this. CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking children suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
* notebook: Set tabs child visible before allocating a sizeTimm Bäder2017-07-221-4/+4
| | | | | Otherwise we might skip them here, then set child-visible to TRUE and then later snapshot them even though they have no valid size.
* widget: Add baseline and out_clip parameters to size-allocateTimm Bäder2017-07-191-28/+25
| | | | | | | | | | | 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.
* notebook: Allocate unmapped tabsTimm Bäder2017-07-191-4/+5
|
* notebook: Fix css node orderingTimm Bäder2017-07-191-8/+11
| | | | Aaand all the unit tests pass again.
* iconview: Remove bin_windowTimm Bäder2017-07-191-3/+8
|
* notebook: Remove style propertiesTimm Bäder2017-07-191-68/+4
| | | | | Hardcode the default values until someone comes up with a proposal for a better way.
* Remove GtkBuiltinIconTimm Bäder2017-07-191-1/+0
| | | | Now unused.
* notebook: Replace all gadgets with widgetsTimm Bäder2017-07-191-669/+276
|
* notebook: Replace tab gadget with GtkGizmoTimm Bäder2017-07-191-110/+96
|
* notebook: Replace tabs gadget with GtkGizmoTimm Bäder2017-07-191-63/+38
|
* notebook: Replace arrow gadgets with GtkIconsTimm Bäder2017-07-191-105/+103
|
* Slightly rework clip handlingTimm Bäder2017-07-191-3/+1
| | | | | | | | | | | always initialize clips to the (content) allocation, don't walk up the widget hierarchy in gtk_widget_set_clip, implement gtk_widget_size_allocate in GtkSeparator. This way we don't end up using uninitialized clip values. The entire clip handling is up for major rework since we can't and don't want to force every single widget to call _set_clip in size-allocate implementations.
* notebook: Fix crash when dragging a tabTimm Bäder2017-07-191-0/+3
| | | | gtk_gesture_get_last_event can return NULL, so guard against that.
* Add nullable return annotation to gtk_notebook_get_tab_labelIñaki García Etxebarria2017-07-181-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781935
* gtknotebook: Drop drag_windowCarlos Garnacho2017-05-251-112/+29
| | | | | It is not necessary anymore to implement tab DnD, since we just render it on top.
* gtknotebook: Remove event window on top of tabsCarlos Garnacho2017-05-251-70/+10
| | | | No longer needed.
* gtk: Mass delete all GtkWidget event mask APICarlos Garnacho2017-05-251-7/+1
| | | | | | | | | | 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.
* gtknotebook: Fix coordinate translation to happen on widget-relative coordinatesCarlos Garnacho2017-05-251-40/+8
| | | | | This makes notebooks happy again after changing event coordinates to always come in the widget coordinate system.
* container: Remove include_internals parameter from forallTimm Bäder2017-04-251-18/+0
| | | | | | 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.
* widget: Save pointer to focus childTimm Bäder2017-03-311-5/+2
| | | | Do the same thing GtkContainer does.
* notebook: Remove dead assignmentTimm Bäder2017-03-191-1/+0
|
* notebook: Use gtk_widget_measureTimm Bäder2017-02-181-8/+5
|
* notebook: redraw arrows after closing a tabMichael Catanzaro2017-02-041-0/+2
| | | | | | | Thanks to Daniel Boles for helping with a crash in an earlier version of this patch. https://bugzilla.gnome.org/show_bug.cgi?id=777547
* Revert "notebook: redraw arrows after closing a tab"Michael Catanzaro2017-01-271-2/+0
| | | | This reverts commit 218beb2ef49d407b547047693605328c10d4877d.
* notebook: redraw arrows after closing a tabMichael Catanzaro2017-01-241-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=777547
* Remove gtk_container_snapshot_childTimm Bäder2017-01-071-6/+6
| | | | Replace it with the already existing gtk_widget_snapshot_child.
* API: Export gtk_container_snapshot_child()Benjamin Otte2016-12-201-1/+0
| | | | | It's equivalent to gtk_container_propagate_draw() and then one is public, too.
* gadget: Remove gtk_css_gadget_draw()Benjamin Otte2016-12-201-3/+0
| | | | | | | And with it, remove the draw func from custom gadgets, that has been NULL everywhere. All gadgets are snapshot now.
* Use Unicode in translatable stringsPiotr Drąg2016-12-191-4/+4
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772371
* notebook: Implement snapshotBenjamin Otte2016-12-191-47/+46
|
* notebook: Don't leak arrow gadgetsMatthias Clasen2016-11-231-0/+4
| | | | | This was pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774743
* API: Remove gtk_cairo_should_draw_window()Benjamin Otte2016-11-231-4/+2
| | | | The answer is: Yes.
* snapshot: Add a snapshot function to GtkCssCustomGadgetBenjamin Otte2016-11-151-0/+3
|
* notebook: use gesture for clicksTimm Bäder2016-11-051-45/+74
| | | | Instead of GtkWidget's buton-press-event/button-release-event
* gtk: Chain up in realize()Benjamin Otte2016-11-021-7/+2
| | | | ... instead of copy/paste from gtk_widget_real_realize.
* notebook: Use gtk_widget_queue_draw()Benjamin Otte2016-10-271-2/+3
|
* widget: Use ::measure vfunc to measure sizeTimm Bäder2016-10-221-72/+30
| | | | | | | | 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.
* notebook: Remove deprecated public APITimm Bäder2016-10-181-42/+0
|