summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.build.yml33
-rw-r--r--configure.ac6
-rw-r--r--drivemount/src/Makefile.am7
-rw-r--r--drivemount/src/drive-button.c6
4 files changed, 48 insertions, 4 deletions
diff --git a/.build.yml b/.build.yml
index fb2dc1f7..f2abb29b 100644
--- a/.build.yml
+++ b/.build.yml
@@ -24,6 +24,9 @@ requires:
- which
- wireless_tools
- yelp-tools
+ # mate-desktop dependencies
+ - iso-codes
+ - gobject-introspection
debian:
# Useful URL: https://github.com/mate-desktop/debian-packages
@@ -58,6 +61,10 @@ requires:
- mate-common
- x11proto-kb-dev
- yelp-tools
+ # mate-desktop dependencies
+ - iso-codes
+ - gobject-introspection
+ - libgirepository1.0-dev
fedora:
# Useful URL: https://src.fedoraproject.org/cgit/rpms/mate-applets.git
@@ -89,6 +96,9 @@ requires:
- redhat-rpm-config
- startup-notification-devel
- upower-devel
+ # mate-desktop dependencies
+ - iso-codes-devel
+ - gobject-introspection-devel
ubuntu:
- autopoint
@@ -120,6 +130,10 @@ requires:
- mate-common
- x11proto-kb-dev
- yelp-tools
+ # mate-desktop dependencies
+ - iso-codes
+ - gobject-introspection
+ - libgirepository1.0-dev
variables:
- 'CHECKERS="
@@ -138,10 +152,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 0ed74fea..033fb7d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,7 @@ LIBXML_REQUIRED=2.5.0
POLKIT_REQUIRED=0.97
LIBWNCK_REQUIRED=3.0.0
GUCHARMAP_REQUIRED=3.0.0
+MATE_DESKTOP_REQUIRED=1.27.1
dnl ***************************************************************************
AM_MAINTAINER_MODE
@@ -63,6 +64,11 @@ PKG_CHECK_MODULES(MATE_APPLETS4, libmatepanelapplet-4.0 >= $LIBPANEL4_REQUIRED)
AC_SUBST(MATE_APPLETS4_CFLAGS)
AC_SUBST(MATE_APPLETS4_LIBS)
+dnl -- check for mate-desktop-2.0 (required) ------------------------------------
+PKG_CHECK_MODULES(MATE_DESKTOP, mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED)
+AC_SUBST(MATE_DESKTOP_CFLAGS)
+AC_SUBST(MATE_DESKTOP_LIBS)
+
dnl -- check for libgtop (optional) -------------------------------------------
build_gtop_applets=false
PKG_CHECK_MODULES(GTOP_APPLETS,
diff --git a/drivemount/src/Makefile.am b/drivemount/src/Makefile.am
index a887b1e5..855e48e2 100644
--- a/drivemount/src/Makefile.am
+++ b/drivemount/src/Makefile.am
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
-DDRIVEMOUNT_RESOURCE_PATH=\""/org/mate/mate-applets/drivemount/"\" \
${WARN_CFLAGS} \
$(MATE_APPLETS4_CFLAGS) \
+ $(MATE_DESKTOP_CFLAGS) \
$(NULL)
BUILT_SOURCES = \
@@ -28,13 +29,15 @@ nodist_libmate_drivemount_applet_la_SOURCES = $(BUILT_SOURCES)
libmate_drivemount_applet_la_SOURCES = $(APPLET_SOURCES)
libmate_drivemount_applet_la_CFLAGS = $(AM_CFLAGS)
libmate_drivemount_applet_la_LDFLAGS = -module -avoid-version
-libmate_drivemount_applet_la_LIBADD = $(APPLET_LIBS)
+libmate_drivemount_applet_la_LIBADD = $(APPLET_LIBS) \
+ $(MATE_DESKTOP_LIBS)
else !ENABLE_IN_PROCESS
libexec_PROGRAMS = mate-drivemount-applet
nodist_mate_drivemount_applet_SOURCES = $(BUILT_SOURCES)
mate_drivemount_applet_SOURCES = $(APPLET_SOURCES)
mate_drivemount_applet_CFLAGS = $(AM_CFLAGS)
-mate_drivemount_applet_LDADD = $(APPLET_LIBS)
+mate_drivemount_applet_LDADD = $(APPLET_LIBS) \
+ $(MATE_DESKTOP_LIBS)
endif !ENABLE_IN_PROCESS
drivemount-resources.c: ../data/drivemount-resources.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/../data/ --generate-dependencies $(srcdir)/../data/drivemount-resources.gresource.xml)
diff --git a/drivemount/src/drive-button.c b/drivemount/src/drive-button.c
index e0b86bf1..d33600f0 100644
--- a/drivemount/src/drive-button.c
+++ b/drivemount/src/drive-button.c
@@ -31,6 +31,8 @@
#include <gdk/gdkkeysyms.h>
#include <gio/gdesktopappinfo.h>
+#include <libmate-desktop/mate-image-menu-item.h>
+
#include <string.h>
enum {
@@ -531,10 +533,10 @@ create_menu_item (DriveButton *self,
{
GtkWidget *item, *image;
- item = gtk_image_menu_item_new_with_mnemonic (label);
+ item = mate_image_menu_item_new_with_mnemonic (label);
if (icon_name) {
image = gtk_image_new_from_icon_name (icon_name, 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);
gtk_widget_show (image);
}
if (callback)