summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop some unnecessary includesMatthias Clasen2023-02-181-1/+0
|
* calendar: Set marked days immediatelyCorey Berla2023-01-061-0/+31
| | | | | | The marked days are set only as part of gtk_calendar_select_day(). This is insufficient, especially because the day-selected signal is emitted after the marked days are set in gtk_calendar_select_day().
* calendar: Only apply the marked_day to the current monthCorey Berla2023-01-061-2/+3
| | | | | | | The marked day gets applied to the current month, and either the previous or subsequent month if they are visible within the current month. This doesn't make any sense and likely was an accidental regression in a6f9052cf1c1c7b4224834ed18a63e70477d8729. Clarify the docs.
* gtk: Stop using gtk_widget_show/hideMatthias Clasen2022-11-281-1/+1
| | | | | | | 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.
* Drop gtkintl.hMatthias Clasen2022-09-241-1/+1
| | | | | Include gtkprivate.h for I_() and glib-i18n.h for gettext macros.
* Remove all nicks and blurbs from param specsSophie Herold2022-05-111-18/+6
| | | | | | | | 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
* calendar: Add an explanatory commentNiels De Graef2021-10-121-1/+1
| | | | On the magic numbers used to get the abbreviated day names.
* calendar: Fix abbreviated day namesNiels De Graef2021-10-121-48/+52
| | | | | | | | | | | | ... if the current locale has a different starting day than Sunday. This needed 2 fixes: * We need to take into account `calendar->week_start` when creating/adding the appropriate `day_name_labels` field * we were only calculating `calendar->week_start` _after_ attaching the `day_name_labels`, so it was still set to 0 (the default value). Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4338
* gtk: Clean up docs syntaxMatthias Clasen2021-05-221-2/+2
| | | | Replace leftover gtk-doc syntax (#Type) with backquotes.
* Documentation fixesMatthias Clasen2021-05-201-2/+1
| | | | | Mostly fixing up indentation of continuation lines, and other small cleanups.
* calendar: do not allow to set 0 as dayCarlos Garcia Campos2021-05-071-5/+2
| | | | | We no longer unselect the current day when 0 is set, so update the documentation and the property definition.
* calendar: value of day property is shifted by 1Carlos Garcia Campos2021-05-071-2/+2
| | | | | The day is a number between 1 and 31 and that's what we get from GDateTime.
* calendar: Typo fixMatthias Clasen2021-03-211-2/+2
|
* calendar: Use markdown for css treeMatthias Clasen2021-03-111-2/+2
|
* claendar: Add property annotationsMatthias Clasen2021-03-111-12/+10
| | | | Connect properties, getters, and setters with annotations.
* calendar: Convert docsMatthias Clasen2021-03-111-44/+60
| | | | Change link syntax, add an example image, generally clean things up.
* 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.
* Drop style class definesMatthias Clasen2020-08-141-1/+1
| | | | | | 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.
* Remove ATKEmmanuele Bassi2020-07-261-1/+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-3/+3
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-22/+22
|
* Replace most remaining uses of container apiMatthias Clasen2020-05-111-6/+6
| | | | These are all on GtkBox or enumerating children.
* Remove lots of focus vfuncsMatthias Clasen2020-05-111-3/+0
| | | | | In many cases, the default widget vfuncs work just fine, combined with setting focusable.
* widget: Add a :focusable propertyMatthias Clasen2020-05-101-1/+1
| | | | | | | | | | 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
* calendar: Drop the Private structMatthias Clasen2020-04-261-251/+212
|
* Assorted documentation fixesMatthias Clasen2020-04-201-17/+31
|
* calendar: Fix focus keynavMatthias Clasen2020-04-171-23/+45
| | | | This broke when the calendar was broken into widgets.
* Reinstate expected focus behaviorMatthias Clasen2020-04-091-0/+3
| | | | | | | | After the :can-focus change in the previous commit, widgets need to set suitable focus and grab_focus implementations to implement the desired focus behavior. This commit does that for all widgets.
* calendar: Only highlight one day as todayTimm Bäder2020-03-271-1/+2
| | | | Fixes #2490
* Replace fallthrough comments with G_GNUC_FALLTHROUGHTimm Bäder2020-03-061-0/+1
|
* calendar: Use a drag sourceBenjamin Otte2020-03-021-147/+23
|
* droptarget: RedoBenjamin Otte2020-03-021-154/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a huge reorganization of GtkDropTarget. I did not know how to split this up, so it's unfortunately all one commit. Highlights: - Split GtkDropTarget into GtkDropTarget and GtkDropTargetAsync GtkDropTarget is the simple one that only works with GTypes and offers a synchronous interface. GtkDropTargetAsync retains the full old functionality and allows handling mime types. - Drop events are handled differently Instead of picking a single drop target and sending all DND events to it, every event is sent to every drop target. The first one to handle the event gets to call gdk_drop_status(), further handlers do not interact with the GdkDrop. Of course, for the ultimate GDK_DROP_STARTING event, only the first one to accept the drop gets to handle it. This allows stacking DND event controllers that aren't necessarily interested in handling the event or that might decide later to drop it. - Port all widgets to either of those Both have a somewhat changed API due to the new event handling. For the ones who should use the sync version, lots of cleanup was involved to operate on a sync API.
* Don't use GdkAtom where const char * is usedBenjamin Otte2020-02-231-2/+2
| | | | Those are all forgotten transitions while updating code to new APIs.
* Split off GtkEventControllerFocusMatthias Clasen2020-02-211-7/+11
| | | | | | | | Split the focus tracking into a separate GtkEventControllerFocus, and change the API one more time. We are back to having ::focus-in and ::focus-out signals. Update all users.
* New focus change handlingMatthias Clasen2020-02-211-11/+6
| | | | | | | | | | | | | | Instead of relying on gdk's antiquated crossing events, create a new GtkCrossingData struct that contains the actual widgets, and a new event controller vfunc that expects this struct. This also saves us from making sense of X's crossing modes and details, and makes for a generally simpler api. The ::focus-in and ::focus-out signals of GtkEventControllerKey have been replaced by a single ::focus-change signal that takes GtkCrossingData as an argument. All callers have been updated.
* dragdest: Make gtk_drop_target_new() args be transfer fullBenjamin Otte2020-02-171-4/+2
| | | | Saves tons of code.
* contentprovider: Add gdk_content_provider_new_typed()Benjamin Otte2020-02-161-8/+1
| | | | | Gets around the boilerplate required to create and initialize a GValue by having this function doing it via G_VALUE_COLLECT().
* calendar: Emit {next,prev}-{month,year} signalsTimm Bäder2020-02-151-0/+8
| | | | Fixes #833
* calendar: Add style class to today's labelTimm Bäder2020-02-151-1/+19
| | | | | | Add the .today style class to the label indicating the current day. Fixes #230
* calendar: Document style classesTimm Bäder2020-02-151-3/+26
| | | | Fixes #790
* docs: Match the argument name with its declarationEmmanuele Bassi2020-02-131-2/+2
|
* calendar: Fix mismatches with GDateTimeMatthias Clasen2020-02-101-14/+23
| | | | | GDatetime uses 1-based month and day numbers, whereas GktCalendars are 0-based. Correct for this.
* Calendar: Make year/month/day writable againMatthias Clasen2020-02-101-6/+31
| | | | Our a11y tests were relying on this.
* Rename gtk_widget{get,set,has}_style_class to _css_classTimm Bäder2020-02-071-8/+8
| | | | We want to use css instead of style everywhere now.
* calendar: Remove day-selected-double-click signalTimm Bäder2020-02-071-42/+13
| | | | | | It doesn't really make sense to treat double clicks here different than single clicks (and is bad UX), and it also breaks switching months by quickly trying to single-click the last/first days in the calendar.
* calendar: Remove an unused enumTimm Bäder2020-02-071-7/+0
|
* calendar: Remove month-changed signalTimm Bäder2020-02-071-18/+0
| | | | Listen to notify::month instead.
* calendar: Keep a GDateTime aroundTimm Bäder2020-02-071-362/+170
| | | | Instead of a year/month/day triple.
* calendar: Return a GDateTime from get_date()Timm Bäder2020-02-071-22/+8
|