Skip to content

Commit

Permalink
replace deprecated gtk-image-menu-item
Browse files Browse the repository at this point in the history
  • Loading branch information
raveit65 committed Oct 2, 2023
1 parent 23c39b5 commit 5fbd44b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ requires:
- libgxps
- make
- mate-common
- mate-desktop
- poppler-glib
- texlive-bin
- webkit2gtk
- which
- yelp-tools
# mate-desktop dependencies
- iso-codes

debian:
# Useful URL: https://github.com/mate-desktop/debian-packages
Expand All @@ -38,6 +41,7 @@ requires:
- libgtk-3-dev
- libgxps-dev
- libkpathsea-dev
- libmate-desktop-dev
- libsynctex-dev
- libpoppler-glib-dev
- libsecret-1-dev
Expand All @@ -53,6 +57,8 @@ requires:
- xsltproc
- yelp-tools
- zlib1g-dev
# mate-desktop dependencies
- iso-codes

fedora:
# Useful URL: https://src.fedoraproject.org/cgit/rpms/atril.git
Expand All @@ -78,11 +84,14 @@ requires:
- libtiff-devel
- make
- mate-common
- mate-desktop-devel
- poppler-glib-devel
- redhat-rpm-config
- texlive-lib-devel
- webkit2gtk4.1-devel
- yelp-tools
# mate-desktop dependencies
- iso-codes-devel

ubuntu:
- autopoint
Expand All @@ -98,6 +107,7 @@ requires:
- libgtk-3-dev
- libgxps-dev
- libkpathsea-dev
- libmate-desktop-dev
- libsynctex-dev
- libpoppler-glib-dev
- libsecret-1-dev
Expand All @@ -113,6 +123,8 @@ requires:
- xsltproc
- yelp-tools
- zlib1g-dev
# mate-desktop dependencies
- iso-codes

variables:
- 'CHECKERS="
Expand All @@ -131,8 +143,27 @@ 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:
- 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
- egrep -lRZ 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS' . | xargs -0 -l sed -i -e 's/G_GNUC_BEGIN_IGNORE_DEPRECATIONS/ /g'
- egrep -lRZ 'G_GNUC_END_IGNORE_DEPRECATIONS' . | xargs -0 -l sed -i -e 's/G_GNUC_END_IGNORE_DEPRECATIONS/ /g'
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ dnl Specify required versions of dependencies
CAIRO_REQUIRED=1.14.0
GLIB_REQUIRED=2.54.0
GTK_REQUIRED=3.22.0
MATE_DESKTOP_REQUIRED=1.27.1
WEBKIT_REQUIRED=2.6.0
LIBSECRET_REQUIRED=0.5
LIBXML_REQUIRED=2.5.0
Expand All @@ -119,7 +120,7 @@ PKG_CHECK_MODULES(BACKEND, cairo >= $CAIRO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED)
PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)

PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 x11])
PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 x11 mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED,])

AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
Expand Down
4 changes: 3 additions & 1 deletion shell/ev-navigation-action.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "ev-navigation-action.h"
#include "ev-navigation-action-widget.h"

#include <libmate-desktop/mate-image-menu-item.h>

enum
{
WIDGET_ACTIVATE_LINK,
Expand Down Expand Up @@ -99,7 +101,7 @@ new_history_menu_item (EvNavigationAction *action,
const char *title;

title = ev_link_get_title (link);
item = gtk_image_menu_item_new_with_label (title);
item = mate_image_menu_item_new_with_label (title);
label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (item)));
gtk_label_set_use_markup (label, TRUE);
g_object_set_data (G_OBJECT (item), "index",
Expand Down
4 changes: 3 additions & 1 deletion shell/ev-sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>

#include <libmate-desktop/mate-image-menu-item.h>

#include "ev-sidebar.h"
#include "ev-sidebar-page.h"

Expand Down Expand Up @@ -427,7 +429,7 @@ ev_sidebar_add_page (EvSidebar *ev_sidebar,
index = gtk_notebook_append_page (GTK_NOTEBOOK (ev_sidebar->priv->notebook),
main_widget, NULL);

menu_item = gtk_image_menu_item_new_with_label (title);
menu_item = mate_image_menu_item_new_with_label (title);
g_signal_connect (menu_item, "activate",
G_CALLBACK (ev_sidebar_menu_item_activate_cb),
ev_sidebar);
Expand Down

0 comments on commit 5fbd44b

Please sign in to comment.