summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2021-06-29 03:31:56 +0000
committerLogan Rathbone <poprocks@gmail.com>2021-06-29 03:31:56 +0000
commitdc76b407e517bafb62f0a8c2cb5dc2df5723c4c6 (patch)
tree20e5f1389ffed3b6d643daab199d9877700c119a /src
parentUpdate Russian translation (diff)
parentUpdate Russian translation (diff)
downloadzenity-dc76b407e517bafb62f0a8c2cb5dc2df5723c4c6.tar.gz
zenity-dc76b407e517bafb62f0a8c2cb5dc2df5723c4c6.tar.bz2
zenity-dc76b407e517bafb62f0a8c2cb5dc2df5723c4c6.zip
Merge branch 'meson' into 'master'
Port build system to meson See merge request GNOME/zenity!14
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am57
-rw-r--r--src/main.c2
-rw-r--r--src/meson.build51
-rw-r--r--src/text.c2
-rw-r--r--src/zenity.h10
5 files changed, 54 insertions, 68 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index bcdd2056..00000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-bin_PROGRAMS = zenity
-
-bin_SCRIPTS = gdialog
-
-zenity_SOURCES = \
- about.c \
- calendar.c \
- entry.c \
- fileselection.c \
- main.c \
- msg.c \
- notification.c \
- option.c \
- option.h \
- progress.c \
- scale.c \
- text.c \
- tree.c \
- color.c \
- password.c \
- util.c \
- util.h \
- forms.c \
- zenity.h
-
-zenity_CPPFLAGS = \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- -DZENITY_DATADIR=\""$(pkgdatadir)"\" \
- $(AM_CPPFLAGS)
-
-zenity_CFLAGS = \
- $(ZENITY_CFLAGS) \
- $(LIBNOTIFY_CFLAGS) \
- $(WEBKIT_CFLAGS) \
- $(WARN_CFLAGS) \
- $(AM_CFLAGS)
-
-zenity_LDFLAGS = \
- $(AM_LDFLAGS)
-
-zenity_LDADD = \
- $(ZENITY_LIBS) \
- $(LIBNOTIFY_LIBS) \
- $(WEBKIT_LIBS)
-
-uidir = $(datadir)/zenity
-
-ui_DATA = \
- zenity.ui
-
-DISTCLEANFILES= \
- gdialog
-
-EXTRA_DIST = \
- $(ui_DATA) \
- gdialog \
- gdialog.in
diff --git a/src/main.c b/src/main.c
index 7f0c2db7..18b2a725 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,7 +43,7 @@ main (gint argc, gchar **argv) {
setlocale (LC_ALL, "");
#endif
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..748fe316
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,51 @@
+# for i in `ls *.c`; do echo " '${i}',"; done
+zenity_sources = [
+ 'about.c',
+ 'calendar.c',
+ 'color.c',
+ 'entry.c',
+ 'fileselection.c',
+ 'forms.c',
+ 'main.c',
+ 'msg.c',
+ 'notification.c',
+ 'option.c',
+ 'password.c',
+ 'progress.c',
+ 'scale.c',
+ 'text.c',
+ 'tree.c',
+ 'util.c'
+]
+
+zenity_deps = [
+ gtk_dep,
+ libnotify,
+ webkitgtk,
+ x11
+]
+
+zenity_c_args = [
+ '-DG_LOG_DOMAIN="Zenity"'
+]
+
+zenity = executable(
+ meson.project_name(),
+ zenity_sources,
+ include_directories: zenity_root_dir,
+ dependencies: zenity_deps,
+ c_args: zenity_c_args,
+ install: true
+)
+
+if perl.found()
+ configure_file(
+ input: 'gdialog.in',
+ output: 'gdialog',
+ configuration: zenity_conf,
+ install_dir: zenity_bindir,
+ install: true
+ )
+endif
+
+install_data('zenity.ui')
diff --git a/src/text.c b/src/text.c
index ffe7b35e..bbfa4212 100644
--- a/src/text.c
+++ b/src/text.c
@@ -289,11 +289,13 @@ zenity_text (ZenityData *data, ZenityTextData *text_data) {
if (text_data->no_wrap)
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_NONE);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (text_data->font) {
PangoFontDescription *fontDesc =
pango_font_description_from_string (text_data->font);
gtk_widget_override_font (GTK_WIDGET (text_view), fontDesc);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
if (text_data->uri)
zenity_util_fill_file_buffer (text_buffer, text_data->uri);
diff --git a/src/zenity.h b/src/zenity.h
index b86a264d..404eec77 100644
--- a/src/zenity.h
+++ b/src/zenity.h
@@ -5,7 +5,6 @@
G_BEGIN_DECLS
-#ifdef ENABLE_NLS
#include <libintl.h>
#define _(String) dgettext (GETTEXT_PACKAGE, String)
#ifdef gettext_noop
@@ -13,15 +12,6 @@ G_BEGIN_DECLS
#else
#define N_(String) (String)
#endif
-#else /* NLS is disabled */
-#define _(String) (String)
-#define N_(String) (String)
-#define textdomain(String) (String)
-#define gettext(String) (String)
-#define dgettext(Domain, String) (String)
-#define dcgettext(Domain, String, Type) (String)
-#define bindtextdomain(Domain, Directory) (Domain)
-#endif
typedef struct {
gchar *dialog_title;
bgstack15