summaryrefslogtreecommitdiff
path: root/applets/clock/clock.c
AgeCommit message (Collapse)AuthorFilesLines
2025-09-22clock: Store calendar client in ClockData (#1516)Victor Kareh1-0/+22
* clock: Store calendar client in ClockData This simplifies the evolution calendar client architecture and makes the popup show up faster, since we don't need to create a new one every time we open it. * clock: Fix calendar data refresh when opening popup The calendar popup was not showing recently added Evolution events/tasks. Added a refresh timeout call every time the calendar popup opens. That way the popup opens immediately and the data is refresh after a small delay.
2025-09-04Wayland-only-build attempt 3 - changes from other branch removedmark.herbert1-0/+5
2025-09-04Fix uninitialized and unused screen varsVictor Kareh1-0/+1
A previous overzealous cleanup left some hanging screen variables and one instance of an uninitialized screen being used.
2025-08-03clock: Provide fallback preferences pathVictor Kareh1-0/+11
Provide a fallback preferences path in case the applet doesn't provide one. This happens when running outside the actual panel, like in the case of mate-panel-test-applets.
2025-08-03clock: Backport Evolution calendar integration from gnome-panelVictor Kareh1-4/+42
Add Evolution Data Server (EDS) calendar integration to the MATE panel clock applet, most of it ported from gnome-panel's clock applet. This allows users to view calendar events and tasks directly from the clock popup calendar. The calendar integration is disabled by default and can be enabled with --enable-eds during configuration. When disabled, the clock applet functions normally without any EDS dependencies.
2025-07-23Remove deprecated gdk_screen_get_* functionsVictor Kareh1-2/+1
Screen functions are replaced with their Display equivalents to remove deprecation warnings. Display functions take into account the entire display server connection, rather than a single physical monitor.
2025-04-24Clock Applet: Add scrollbar to Locations lists when the lists get too longGordon Norman Squash1-3/+14
Before this commit, the Clock Applet's popup window would expand off the screen if the user added more than a few locations to the Locations list. In addition, the list of locations in the Clock Applet Preferences could get extremely tall as well, and could even push the bottom part of the Preferences dialog off the screen. This commit adds (vertical) scrollbars to both widgets.
2024-12-06applets/clock: Fix compatibility with musl libcĐoàn Trần Công Danh1-1/+1
%l is an glibc extension for strftime, this extensions isn't supported by musl libc. Replace %l with %_I, which is functionaly equivalence. %_I itself is also an extensions, however, %_I is supported by both glibc, musl, FreeBSD and deriviates, AIX, and Solaris. Fix: #1451
2024-02-04Reduce scope of variablesColomban Wendling1-9/+6
Mostly found by cppcheck. origin commit was: https://github.com/mate-desktop/mate-panel/commit/96c7ebc
2024-02-04Revert "Reduce scope of variables"raveit651-6/+9
This reverts commit 96c7ebc6dc9e8b8327db04a9570054ee78743353.
2023-11-21Reduce scope of variablesColomban Wendling1-9/+6
Mostly found by cppcheck.
2023-11-21clock: Simplify sort_locations_by_time()Colomban Wendling1-29/+11
There is no need to return -1 or 1 specifically, anything on the right side of 0 is OK, so simplify using the usual `a - b` implementation for such sort functions. Note that the type is OK here, as the `struct tm` are ints, the same as the function's return value.
2023-07-11Clock applet/wayland: position calendar window same as in x11Luke from DC1-83/+187
* Clock applet/wayland: position calendar window same as in x11 - Wayland/clock: fix calendar window rendering when moved Ensure the calendar window cannot be "stretched" across the screen if the panel or the applet is moved while the calendar is showing
2023-05-17tell dconf-edit about relocatable schemas (#1355)Denis Gorodnichev1-10/+0
* tell dconf-edit about relocatable schemas * self fix for incorrect and duplicated records remove duplicated schemas for currect path remove incorrect schemas for current path * remove clock applet hack * expose mate_panel_applet_settings_new to introspection add "transfer full" annotation to make this method available throught introspection
2023-03-27Clock Applet: Update date/time and weather after resume from sleep modeGordon Norman Squash1-0/+103
Before this commit, the Clock Applet was unaware of when the system resumed from sleep mode (e.g. suspend or hibernate). This meant that, if the user suspended the system and then woke it up some time later, the clock might not show the real current time, but instead would continue to show the time at which the system was suspended for up to a minute after the system woke up. This could be confusing to the user if they peered up at the clock immediately after, say, opening their laptop lid. This commit connects to ConsoleKit or (if available) systemd-logind via D-Bus, and listens for a signal that indicates when the system wakes up from sleep mode. When the system does wake up, the Clock Applet updates the date/time immediately, and also updates all the weather/temperature readings if possible. Note that if logind is missing, ConsoleKit2 is required for this feature to work; the original ConsoleKit lacked the signal required to implement this feature. This should not be a problem since it is unlikely that anyone would even consider using the original ConsoleKit in this day and age.
2022-06-28clock: Fix memory leakColomban Wendling1-1/+2
2022-03-18clock: cast from function call of type 'gdouble' to non-matching typerbuj1-3/+3
2021-12-20Remove unnecessary cast in g_signal_connect* callrbuj1-20/+17
2021-12-19Use dashes instead of underscores in signal namesrbuj1-13/+13
2021-12-19clock: gtk_entry_set_alignment in clock.uirbuj1-3/+0
2021-12-19clock: gtk_entry_set_width_chars in clock.uirbuj1-3/+0
2021-12-19clock: Define _clock_get_widget instead of using one sentence methodrbuj1-7/+2
2021-12-19clock: simplify temperature_unit_changed and speed_unit_changedrbuj1-22/+23
2021-12-19clock: fix temperature_unit_changed and -Wsign-compare warningsrbuj1-7/+13
2021-12-11Use a blank line at mostrbuj1-5/+0
2021-07-28Fix clock applet add location crashzhuyaliang1-2/+2
2021-02-07Redundant NULL check before freeing a variablerbuj1-6/+5
2021-02-04build: Use PACKAGE_URL variablerbuj1-1/+1
2021-01-16Update copyright to 2021rbuj1-1/+1
2020-12-11remove function calls to mate_panel_applet_set_background_widgetmbkma1-3/+0
keep mate_panel_applet_set_background_widget for compatibility
2020-09-07Remove variableScope warnings reported by cppcheckrbuj1-13/+8
cppcheck --enable=all . 2> err.txt grep variableScope err.txt
2020-08-01clock: assignment to 'GSList *' from incompatible pointer type 'GList *'rbuj1-2/+2
2020-08-01clock: Use single-linked lists for locationsrbuj1-39/+39
2020-08-01clock: sort locations by time reverse and namerbuj1-1/+17
2020-08-01clock: merge sorting and reversing node list of selected locationsrbuj1-2/+7
2020-07-29clock: Fix GError double freeTomas Bzatek1-2/+0
Let the GError ownership on the async finish method call.
2020-07-29clock: Fix leaking GtkListStoreTomas Bzatek1-4/+4
The gtk_tree_view_set_model() adds its own reference.
2020-07-29clock: Fix list iterationTomas Bzatek1-11/+12
Iteration over a linked list should be done over a side control variable and list head needs to be preserved for proper list free.
2020-07-08clock: Simplify notebook scroll-event callbackrbuj1-40/+35
2020-07-05Use '#include <config.h>' instead of '#include "config.h"'rbuj1-1/+1
2020-01-12Update copyright to 2020raveit651-1/+1
2019-12-13Clock applet: Fix string comparisonClement Lefebvre1-2/+5
2019-12-13clock applet: add a call to ATK to provide the current displayed timeJonathan Michalon1-2/+7
2019-10-09Fetch clock formats using LC_TIME (as opposed to LANGUAGE)Clement Lefebvre1-0/+17
This is a port of https://github.com/linuxmint/cinnamon-desktop/commit/7cd7c008e05acf36efd87446256d28a8b89d187a Which fixed https://github.com/linuxmint/cinnamon-desktop/pull/132 This commit fixes the same issue in the MATE clock applet.
2019-07-09[clock-applet] Add scroll interface tabs with mouse wheelLaurent Napias1-1/+70
2019-02-17Ensure proper translation of the about dialog titlerbuj1-0/+1
Note that GTK+ sets a default title of _("About %s") on the dialog window (where %s is replaced by the name of the application, but in order to ensure proper translation of the title, applications should set the title property explicitly when constructing a GtkAboutDialog https://developer.gnome.org/gtk3/stable/GtkAboutDialog.html
2019-02-15Make translatable the copyright in about dialogrbuj1-5/+2
2019-01-29Clock: Wayland supportWilliam Wold1-1/+9
2019-01-17clock: set horizontal padding for clock-buttonraveit651-2/+2
To make sure we have space left and right inside the button if applet is build-in-process.
2019-01-03Clock: Fix weather icon size selection for panel heightlukefromdc1-2/+29