summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-01-25run-dialog: Don't needlessly override DISPLAY environment variableColomban Wendling1-20/+2
This code got introduced with 3c21f66bf30810fcb25dfe8c3c0960df270dc416 trying to mimic `gdk_spawn_on_screen()`, but does not: what `gdk_spawn_on_screen()` did (on X11) was to append the screen number to the display, so that it worked on a multi-screen setup where the app is not on the default X screen. However, the code that got introduced just sets the display, which is gonna be already there anyway (yet possibly loosing the default screen in the process?), and AFAIK GDK dropped support for multi-screen setups anyway (not to be confused with multi-monitor with e.g. Xinerama). We should actually be better of without any of this, as it most likely doesn't do what it is supposed to, nobody needs what it failed to do, and it breaks XWayland on Wayland. Fixes #1387.
2024-01-23ci: use ubuntu jammy as dockerraveit651-1/+1
2024-01-06Update opacity when changed gsettings color valuezhu yaliang1-0/+17
2023-11-22wnck-pager: Fix workspace switcher aspect ratiolukefromdc1-1/+153
2023-11-21Constify some pointer references in localsColomban Wendling1-30/+30
No need to have pointers to mutables when not needed. This does not cover everything at all, and is limited to one file for the moment.
2023-11-21Reduce scope of more codeColomban Wendling1-7/+7
The computed values are only used in one branch, so compute them there.
2023-11-21Remove a redundant NULL checkColomban Wendling1-2/+1
`info` cannot be NULL, and if it was it'd already have crashed above. > mate-panel/panel.c:893:34: warning: Either the condition 'info!=((void*)0)' is redundant or there is possible null pointer dereference: info. [nullPointerRedundantCheck] > parent = gtk_widget_get_parent (info->widget); > ^ > mate-panel/panel.c:895:11: note: Assuming that condition 'info!=((void*)0)' is not redundant > if (info != NULL && > ^ > mate-panel/panel.c:893:34: note: Null pointer dereference > parent = gtk_widget_get_parent (info->widget); > ^
2023-11-21Avoid a redundant NULL checkColomban Wendling1-4/+5
It's probably not necessary to perform the NULL check at all as the only code paths that could make `list` NULL are already pretty dramatically broken, but as we have a NULL check move everything relevant inside it.
2023-11-21Constify a parameterColomban Wendling2-2/+2
2023-11-21Return a value even after an assertion failureColomban Wendling1-1/+1
This is not strictly needed as there's already an assertion (assuming it's not compiled out), but returning a value help analyzers get this right.
2023-11-21Remove redundant shadowing variableColomban Wendling1-1/+0
No need to get the default icon theme again anyway.
2023-11-21Remove unused-but-set variableColomban Wendling1-2/+0
2023-11-21wncklet: Remove double assignmentColomban Wendling1-3/+1
2023-11-21Reduce scope of variablesColomban Wendling19-74/+58
Mostly found by cppcheck.
2023-11-21Remove unused member PanelAction::typeColomban Wendling1-9/+0
> mate-panel/panel-action-button.c:516:26: style: struct member 'PanelAction::type' is never used. [unusedStructMember] > PanelActionButtonType type; > ^
2023-11-21Optimize mate_panel_applet_settings_get_g*list()Colomban Wendling1-10/+10
- Build the list in reverse order, then reverse the result. This is useful because GS?List are list nodes, not containers of nodes, and thus don't contain a pointer to the list's end, meaning to append one has to walk the entire list to find the end each time. To avoid this we use the common idiom of prepending to the list (which is cheap, as it's adding a node before the given one), and then reversing the resulting list to get back the original order. - Avoid unnecessary memory copy by stealing the GStrv's members. We get the array as a copy, so we can simply steal the members and free the container array only, saving a copy for each member.
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-11-21Do not perform useless incoherent NULL checkColomban Wendling1-1/+1
cppcheck tells us that we perform NULL checking inconsistently, and reports a potential NULL dereference. Here however the string cannot be NULL, so just drop the unnecessary check. > mate-panel/panel-run-dialog.c:1663:10: warning: Either the condition '!start' is redundant or there is possible null pointer dereference: start. [nullPointerRedundantCheck] > while (*start != '\0' && g_ascii_isspace (*start)) > ^ > mate-panel/panel-run-dialog.c:1679:6: note: Assuming that condition '!start' is not redundant > if (!start || !start [0]) { > ^ > mate-panel/panel-run-dialog.c:1663:10: note: Null pointer dereference > while (*start != '\0' && g_ascii_isspace (*start)) > ^
2023-11-21Reorder array index limit checkColomban Wendling1-3/+1
This is *not* an issue, as it's not really a bounds check but a mere limit, and the array is NULL-terminated. However, it looks odd and cppcheck (unsurprisingly) doesn't understand the details well enough and reports this as a misordered bounds check. > mate-panel/panel-run-dialog.c:166:12: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] > items[i] && i < history_max_size; > ^
2023-10-24status-notifier: Show AttentionIcon when Status is NeedsAttentionColomban Wendling1-9/+30
Fixes #1412.
2023-10-24status-notifier: fix typoAlberts Muktupāvels3-3/+3
Cherry-picked from gnome-panel commit 1cc654e16dc06edccaef8c877db4e0da30ceeeaa.
2023-10-24status-notifier: fix a typoAlberts Muktupāvels1-3/+3
Cherry-picked from gnome-panel commit 55667a735ea33336f5b0912631b184b95ea2140b.
2023-10-12Main menus: fix missing Places, System iconslukefromdc1-2/+2
*After replacing gtk_image_menu_item with mate_image_menu_item *We must also replace GTK_TYPE_IMAGE_MENU_ITEM with MATE_TYPE_IMAGE_MENU_ITEM *This fixes leftover GtkImageMenuItem deprecation warnings and restores missing Places and System icons in main menus
2023-10-09replace deprecated gtk-image-menu-item*raveit657-23/+60
2023-10-05Wayland: Fix force-quit unsupported message dialoglukefromdc1-1/+1
*For some reason "widget" is not being properly passed to this, so use NULL for the parent window
2023-10-05Wayland: Make panel shutdown button work under waylandlukefromdc1-5/+203
*This uses systemd to be able to shutdown when a display manager is running as root *If no session or display manager is running as root, systemd used only to suspend or hibernate *Suspend/hibernate require systemd at this point *If suspend or hibernate not supported error dialog shown if those buttons clicked *If "disable logout" lockdown option set, shut down button cannot be added same as in x11 *If shut down button added to panel and lockout later disabled, same non-responsive button as in x11 *Logind support would be welcome
2023-10-05Force-quit/x11: Fix misalignment of popup with multimonitorslukefromdc1-6/+13
*Compute the size of the monitor we are actually showing the popup on *by getting the monitor it is shown on and running gdk_monitor_get_geometry() *This returns application (scaled) pixels not device pixels
2023-10-02Hidpi x11: center panel force-quit popup windowlukefromdc1-3/+4
2023-09-02tx: update resourcesraveit651-91/+107
2023-08-23release 1.27.2v1.27.2raveit652-1/+25
2023-08-23tx: pull with transifexraveit6520-39/+43
2023-08-12libmate-panel-applet: don't use panel plug to find the screenlukefromdc1-1/+1
* There is only one screen in GTK 3.22 or later * Finding the screen from that used by GtkPanelPlug is out of process only * Any in-process applet calling mate_panel_applet_request_focus needs this to avoid a segfault * One known user: dictionary applet
2023-07-31wayland-tasklist: really set maximum label widthlukefromdc1-1/+4
*Otherwise taskbuttons for programs using URLs or filenames in the window name can balloon across the whole taskbar
2023-07-28wayland tasklist: fit buttons to tasklist, limit button size, hide contents ↵lukefromdc1-5/+237
as necessary *Empty space between buttons removed *padding in buttons similar to x11 *Vertical panel: do not modify buttons, they just plain work! *We have a working window list on vertical panels in wayland only *Horizontal panels: *expand buttons like in X11 until more expanded buttons won't fit *When expanded buttons won't fit, resize buttons to fit tasklist *When ellipsized text plus icon won't fit, remove the label *When one more button with icon won't fit, remove the icon *but bring back the (compressable) label as in x11. *Prevents window list buttons disappearing when theme does not set a border
2023-07-26notification-area: stop warning on removallukefromdc1-1/+1
*Use automatic signal handling for changing icon size so this code doesn't get called when the applet is removed
2023-07-26Update org.mate.panel.object schema descriptionsColomban Wendling1-9/+9
It was listing outdated values, and missing new ones. Fixes #1132.
2023-07-23button-widget.c: replace tabs with 4 spacesLuke from DC2-662/+663
- button-widget.c: replace tabs with 4 spaces and reformat as necessary - button-widget.h: tab to 4 spaces - button-widget.c: adjust indents and bracket style --------- Co-authored-by: raveit65 <[email protected]>
2023-07-20Wayland: Fix blurry rendering of panel launcher iconslukefromdc1-34/+49
*Custom icons not findable by gtk_icon_theme_load_surface are still blurry
2023-07-20Wayland: ensure tasklist buttons get widget namelukefromdc1-0/+1
*we need this for theming
2023-07-20wayland: stop tasklist overflowing over other appletslukefromdc1-6/+3
*allows up to 20 window buttons on a half screen width window list before overflow
2023-07-11Clock applet/wayland: position calendar window same as in x11Luke from DC3-84/+196
* 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-06-29libmate-panel-applet/Makefile.am: Fix build with gettext 0.22Brahmajit Das1-1/+1
With gettext-0.22 we are getting build errors like: /usr/bin/msgfmt --desktop --keyword Name --keyword Description --template org.mate.panel.TestApplet.mate-panel-applet.desktop.in -d ../po -o org.mate.panel.TestApplet.mate-panel-applet /usr/bin/msgfmt: no input file should be given if --desktop and -d are specified Try '/usr/bin/msgfmt --help' for more information. make[3]: *** [Makefile:1035: org.mate.panel.TestApplet.mate-panel-applet] Error 1 make[3]: *** Waiting for unfinished jobs.... Bug: https://bugs.gentoo.org/908877 Signed-off-by: Brahmajit Das <[email protected]>
2023-06-28Fix distribution of applet service filesColomban Wendling4-4/+4
Fix distribution of the applet service files sources when building from an in-process-configured build. This fixes `make distcheck` and tarballs in builds configured with `--with-in-process-applets=all` (or actually any in-process applet). The issue was that the .service.in file was referenced indirectly in EXTRA_DIST, and the variable listed there was only filled in a conditional. Automake is not able to resolve this and see it still should distribute the reference of that variable, even if set conditionally. Fix this by always setting the variable properly, even if it's only used for out-of-process builds.
2023-06-15Wayland, Tray applet: allow in-process applet to load, using SNI only (#1372)Luke from DC5-11/+12
*We cannot load the legacy system tray in Wayland as that requires xembed. *We CAN load the status-notifier (SNI support) *Wayland needs us to explicitly set gtk_button_set_always_show_image to TRUE *Wayland needs us to explicitly set gtk_image_menu_item_set_always_show_image to TRUE
2023-05-22Wayland, hidpi: do not scale buttons in wayland (#1370)Luke from DC1-8/+36
Otherwise they are rendered double-sized and offset. Wayland apparently handles this for us
2023-05-17tell dconf-edit about relocatable schemas (#1355)Denis Gorodnichev4-10/+137
* 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-05-17applets/wncklet/wayland-backend: Add basic icon support (#1275)Consolatis1-2/+31
* applets/wncklet/wayland-backend: add basic icon support This commit uses GTK to find an icon with the same name as the wayland app_id. A more complete implementation would need to search for .desktop files matching the app_id, get the icon name and finally use GTK to find the proper icon based on that name. * applets/wncklet/wayland-backend: add more complete icon support * applets/wncklet/wayland-backend: code style fixup
2023-05-17applets/wncklet/wayland-backend: Add basic context menu (#1276)Consolatis1-5/+110
* applets/wncklet/wayland-backend: Add basic context menu for (un)maximize, (un)minimize and close * applets/wncklet/wayland-backend: code style fixup
2023-05-07panel-run-dialog: Add accelerator keys for "list of known applications" (#1359)Matthias Reis1-20/+136
* panel-run-dialog: Add accelerator keys for "list of known applications" in panel run dialog, display modifier keys by using GtkCellRendererAccel * fixup! panel-run-dialog: Add accelerator keys for "list of known applications" in panel run dialog, display modifier keys by using GtkCellRendererAccel * fixup! fixup! panel-run-dialog: Add accelerator keys for "list of known applications" in panel run dialog, display modifier keys by using GtkCellRendererAccel * fixup! fixup! fixup! panel-run-dialog: Add accelerator keys for "list of known applications" in panel run dialog, display modifier keys by using GtkCellRendererAccel * fixup! fixup! fixup! fixup! panel-run-dialog: Add accelerator keys for "list of known applications" in panel run dialog, display modifier keys by using GtkCellRendererAccel
2023-04-04release 1.27.1v1.27.1raveit652-1/+30