summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
Commit message (Collapse)AuthorAgeFilesLines
* calendar: Stop using ::focus-out-eventMatthias Clasen2018-01-161-9/+12
| | | | Use the generic ::event signal.
* dnd: Pass device, not eventBenjamin Otte2017-12-121-8/+3
| | | | | You don't start a dnd operation with a device, you start it with an event.
* dnd: Remove button argument from drag_begin()Benjamin Otte2017-12-121-3/+1
| | | | It was unused.
* calendar: Stop using a legacy event handlerMatthias Clasen2017-12-101-27/+63
| | | | Replace the motion_notify handler by a drag gesture.
* calendar: Don't request drag data on every motion eventBenjamin Otte2017-12-111-1/+1
| | | | At least wait until we've received the previous one.
* dnd: Remove "delete" argument from gtk_drag_finish()Benjamin Otte2017-12-101-2/+2
| | | | | | | The argument is ignored by anything but X11. It's treated like suggested_action == MOVE. So do that in gtk_drag_finish(), too.
* dnd: Remove x/y coordinates from drag-data-receivedBenjamin Otte2017-12-051-4/+0
| | | | | | This is in preparation of using input streams to show that these coordinates aren't needed most of the time and can otherwise be saved during GtkWidget::drag-drop.
* gdk: Make GdkContentFormats immutableBenjamin Otte2017-11-201-1/+1
|
* contentformats: Rename GtkTargetListBenjamin Otte2017-11-201-3/+3
| | | | It's now called GdkContentsFormat
* Some more interningMatthias Clasen2017-11-181-3/+3
| | | | This avoids more strdups at startup.
* gtk: Intern css namesMatthias Clasen2017-11-171-1/+1
| | | | This avoids a bunch of strdups at startup.
* selection: Remove the info uintBenjamin Otte2017-11-161-5/+1
| | | | | | | | | 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.
* gdk: Replace GDK_NONE with NULLBenjamin Otte2017-11-151-2/+2
|
* dnd: Make GtkDragDest and GtkDragSource use GtkTargetListBenjamin Otte2017-11-151-1/+1
| | | | | This gets rid of GtkTargetEntry in the API and consistently uses GtkTargetList.
* calendar: Fix for GTK4 changesBenjamin Otte2017-11-101-61/+29
|
* build: Enable -Wswitch-enum and -Wswitch-defaultBenjamin Otte2017-10-061-0/+2
| | | | | | | | | | | | | | | | | | | 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.
* gtkcalendar: Use scroll event controllerCarlos Garnacho2017-09-191-25/+27
|
* calendar: Update to using GdkEvent APICarlos Garnacho2017-09-191-9/+20
|
* calendar: Stop using ::button-{press,release}-eventTimm Bäder2017-09-131-39/+53
|
* Calendar: Add default case to appease CoverityDaniel Boles2017-08-011-0/+3
| | | | | | | | | | CID 1432024 (#1 of 1): Uninitialized scalar variable (UNINIT) 2. uninit_use_in_call: Using uninitialized value rect.x when calling calendar_arrow_rectangle. Add a default case to the switch which will bail out with g_assert_not_reached(), which should reassure Coverity that the method is always called with a valid value that is handled in the switch.
* widget: Add baseline and out_clip parameters to size-allocateTimm Bäder2017-07-191-7/+8
| | | | | | | | | | | 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.
* calendar: Remove all input windowsTimm Bäder2017-07-191-368/+23
| | | | and simultaneously fix input! \o/
* calendar: Remove style propertiesTimm Bäder2017-07-191-56/+3
| | | | | Hardcode the default values until someone comes and fixes the actual widget.
* calendar: Remove custom css background and border drawingTimm Bäder2017-07-191-15/+3
|
* Remove calls to gtk_widget_set_allocationTimm Bäder2017-07-191-1/+0
| | | | gtk_widget_size_allocate_with_baselines does it automatically now.
* set clip of more widgetsTimm Bäder2017-07-191-0/+2
|
* gtk: Mass delete all GtkWidget event mask APICarlos Garnacho2017-05-251-9/+2
| | | | | | | | | | 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.
* calendar: Fix else branch indentationsTimm Bäder2017-03-181-2/+2
|
* snapshot: Rename gtk_snapshot_translate_2d()Benjamin Otte2017-01-131-14/+14
| | | | It's now called gtk_snapshot_offset().
* snapshot: Rename append APIsBenjamin Otte2017-01-131-7/+7
| | | | | | Instead of having gtk_snapshot_append_foo_node(), just have gtk_snapshot_append_foo(). Nobody needs to know that this internally uses nodes.
* calendar: Implement snapshot()Benjamin Otte2016-12-231-116/+109
|
* API: Remove gtk_cairo_should_draw_window()Benjamin Otte2016-11-231-15/+11
| | | | The answer is: Yes.
* widget: Use ::measure vfunc to measure sizeTimm Bäder2016-10-221-24/+19
| | | | | | | | 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.
* calendar: Use gdk_window_new_input()Benjamin Otte2016-10-181-41/+23
|
* API: stylecontext: Remove state argument from gettersBenjamin Otte2016-10-161-7/+5
| | | | The argument must always be the current state.
* Use NULL for generic marshallers in g_signal_new()Benjamin Otte2016-08-291-7/+7
| | | | | glib will use the correct marshaller automatically. And as a side effect, we also get all glib optimizations, like a va marshaller.
* dnd: Move GtkDragDest to a separate fileMatthias Clasen2016-03-251-0/+1
| | | | | | This follows what was done for GtkDragSource in 415030d25f2552d3937ee3c394c50d22c5382982 and shaves another 500 lines off gtkdnd.c.
* calendar: Remove duplicate flags valueBenjamin Otte2016-03-201-1/+1
| | | | http://www.viva64.com/en/b/0383/
* calendar: Fix drag highlight problemsMatthias Clasen2016-03-111-1/+19
| | | | Don't propagate :drop(active) to components.
* gtk: Strip newlines from g_warning and g_errorMatthias Clasen2016-02-281-4/+4
| | | | g_logv adds one for us already.
* Don't pass widget state flags to GtkStyleContext APITimm Bäder2015-11-221-1/+1
|
* calendar: Add an element nameMatthias Clasen2015-10-281-2/+3
| | | | This will allow us to drop hardcoded type names in the theme.
* gtk: Stop setting GDK_EXPOSURE_MASK on random widgetsAlexander Larsson2015-09-141-1/+0
| | | | | | | | | | | | | | These days exposure happens only on the native windows (generally the toplevel window) and is propagated down recursively. The expose event is only useful for backwards compat, and in fact, for double buffered widgets we totally ignore the event (and non-double buffering breaks on wayland). So, by not setting the mask we avoid emitting these events and then later ignoring them. We still keep it on eventbox, fixed and layout as these are used in weird ways that want backwards compat.
* Remove some unused dataMatthias Clasen2015-08-091-6/+0
|
* calendar: Handle invalid datesEmmanuele Bassi2015-01-021-0/+6
| | | | | | | | | | | | | GtkCalendar can have an invalid date — mostly at initialization. This means that GDateTime construction may fail. We need to handle that case gracefully, like the old code did. This fixes the `notify` test suite, which started failing with: /Notification/GtkCalendar: GLib-CRITICAL **: g_date_time_get_day_of_week: assertion 'datetime != NULL' failed inside the Continuous builder.
* GtkCalendar: Slightly change overflow behaviourMatthias Clasen2014-12-231-10/+9
| | | | | | | | | If the first of the month was falling on a Sunday, we would not render any days of the previous month, and instead show two weeks of the next month at the bottom. Improve this by showing one week of each. https://bugzilla.gnome.org/show_bug.cgi?id=301835
* GtkCalendar: Use GDateTime for calculationsMatthias Clasen2014-12-231-97/+32
| | | | | Instead of old copy-paste code, use GDateTime to determine week numbers and days of week.
* stylecontext: Split render functions out into gtkrender.[ch]Benjamin Otte2014-10-031-0/+1
|
* GtkCalendar: deal better with a large allocationMatthias Clasen2014-10-011-7/+4
| | | | | | | | | | | | When allocated more than the requested height, GtkCalendar was 'falling apart'. Not only was the main part rendered at the far end of the allocation, clicking on days was broken in this scenario. Fix this by always placing the main part directly under the header and day names. https://bugzilla.gnome.org/show_bug.cgi?id=737670
* Trivial formatting fixMatthias Clasen2014-10-011-3/+6
|