summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2023-10-02 18:12:30 +0200
committermouse <[email protected]>2023-10-04 16:54:40 +0800
commitcb6f36c8ca31e3b714b651c3c2358e8091fa2eae (patch)
treedfc8fbbc0564f28025142cc09eae1afd4598bbac
parentac0f045781ec36cd67736ff7857ff34acddc81e9 (diff)
downloadmate-media-cb6f36c8ca31e3b714b651c3c2358e8091fa2eae.tar.bz2
mate-media-cb6f36c8ca31e3b714b651c3c2358e8091fa2eae.tar.xz
replace deprecated gtk_image_menu_item
-rw-r--r--.build.yml33
-rw-r--r--configure.ac2
-rw-r--r--mate-volume-control/gvc-stream-status-icon.c9
3 files changed, 39 insertions, 5 deletions
diff --git a/.build.yml b/.build.yml
index 7322cea..28a842b 100644
--- a/.build.yml
+++ b/.build.yml
@@ -15,6 +15,9 @@ requires:
- mate-desktop
- mate-panel
- which
+ # mate-desktop dependencies
+ - iso-codes
+ - gobject-introspection
debian:
# Useful URL: https://github.com/mate-desktop/debian-packages
@@ -36,6 +39,10 @@ requires:
- libxml2-dev
- make
- mate-common
+ # mate-desktop dependencies
+ - iso-codes
+ - gobject-introspection
+ - libgirepository1.0-dev
fedora:
# Useful URL: https://src.fedoraproject.org/cgit/rpms/mate-media.git
@@ -56,6 +63,9 @@ requires:
- mate-desktop-devel
- mate-panel-devel
- redhat-rpm-config
+ # mate-desktop dependencies
+ - iso-codes-devel
+ - gobject-introspection-devel
ubuntu:
- autoconf-archive
@@ -74,6 +84,10 @@ requires:
- libxml2-dev
- make
- mate-common
+ # mate-desktop dependencies
+ - iso-codes
+ - gobject-introspection
+ - libgirepository1.0-dev
variables:
- 'CHECKERS="
@@ -92,10 +106,29 @@ variables:
-enable-checker alpha.unix.cstring.OutOfBounds
-enable-checker alpha.core.FixedAddr
-enable-checker security.insecureAPI.strcpy"'
+ - MATE_DESKTOP_VERSION=1.27.1
before_scripts:
build_scripts:
+ - cd ${START_DIR}
+ - if [ ! -f mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz ];then
+ - curl -Ls -o mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz https://github.com/mate-desktop/mate-desktop/releases/download/v${MATE_DESKTOP_VERSION}/mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz
+ - fi
+ - tar xf mate-desktop-${MATE_DESKTOP_VERSION}.tar.xz
+ - cd mate-desktop-${MATE_DESKTOP_VERSION}
+ - if [ ${DISTRO_NAME} == "debian" -o ${DISTRO_NAME} == "ubuntu" ];then
+ - ./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu
+ - else
+ - ./autogen.sh --prefix=/usr
+ - fi
+ - if [ ${TRAVIS} == "false" ]; then
+ - make clean
+ - fi
+ - make
+ - make install
+
+ - cd ${START_DIR}
- if [ ${DISTRO_NAME} == "debian" ];then
- export CFLAGS+=" -Wsign-compare"
- cppcheck --enable=warning,style,performance,portability,information,missingInclude .
diff --git a/configure.ac b/configure.ac
index 18bb55c..020dd8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ GIO_REQUIRED_VERSION=2.50.0
GTK_REQUIRED_VERSION=3.22.0
CANBERRA_REQUIRED_VERSION=0.13
MATE_MIXER_REQUIRED_VERSION=1.10.0
-MATE_DESKTOP_REQUIRED_VERSION=1.17.0
+MATE_DESKTOP_REQUIRED_VERSION=1.27.1
LIBPANEL4_REQUIRED=1.17.0
GTK_LAYER_SHELL_REQUIRED_VERSION=0.6
GDK_WAYLAND_REQUIRED_VERSION=3.22.0
diff --git a/mate-volume-control/gvc-stream-status-icon.c b/mate-volume-control/gvc-stream-status-icon.c
index 0f7ee2b..b1371cf 100644
--- a/mate-volume-control/gvc-stream-status-icon.c
+++ b/mate-volume-control/gvc-stream-status-icon.c
@@ -29,6 +29,7 @@
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmate-desktop/mate-desktop-utils.h>
+#include <libmate-desktop/mate-image-menu-item.h>
#include "gvc-channel-bar.h"
#include "gvc-stream-status-icon.h"
@@ -244,8 +245,8 @@ on_status_icon_popup_menu (GtkStatusIcon *status_icon,
/* Set icon to muted*/
image = gtk_image_new_from_icon_name(icon->priv->icon_names[0], GTK_ICON_SIZE_MENU);
}
- item = gtk_image_menu_item_new_with_mnemonic(label);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+ item = mate_image_menu_item_new_with_mnemonic(label);
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (item), image);
g_signal_connect (G_OBJECT (item),
"activate",
G_CALLBACK (on_menu_mute_toggled),
@@ -253,10 +254,10 @@ on_status_icon_popup_menu (GtkStatusIcon *status_icon,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- item = gtk_image_menu_item_new_with_mnemonic (_("_Sound Preferences"));
+ item = mate_image_menu_item_new_with_mnemonic (_("_Sound Preferences"));
image = gtk_image_new_from_icon_name ("multimedia-volume-control",
GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
+ mate_image_menu_item_set_image (MATE_IMAGE_MENU_ITEM (item), image);
g_signal_connect (G_OBJECT (item),
"activate",