Port to meson (#258)
* Port to meson * plugin generation script: swtich to meson, update to python3, switch to libpeas, add some extra options, and cleanup * clean up some build warnings * kill xed-bugreport.sh with fire: it isn't used anymore, and probably doesn't even work * update gzip command to avoid warnings on some systems and move appdata.xml to /usr/share/metainfo/ as that's where it's supposed to go now * POTFILES.in: fix path that changed in the meson port, which was causing makepot to fail
This commit is contained in:
committed by
Clement Lefebvre
parent
39cadaa36e
commit
6e36dc4a5f
205
xed/Makefile.am
205
xed/Makefile.am
@@ -1,205 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = xed
|
||||
|
||||
pkglib_LTLIBRARIES = libxed.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(srcdir) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(INTROSPECTION_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||
-DDATADIR=\""$(datadir)"\" \
|
||||
-DLIBDIR=\""$(libdir)"\"
|
||||
|
||||
xed_SOURCES = \
|
||||
xed.c
|
||||
|
||||
xed_LDADD = \
|
||||
libxed.la \
|
||||
$(XED_LIBS) \
|
||||
$(INTROSPECTION_LIBS)
|
||||
|
||||
xed_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
|
||||
|
||||
libxed_la_LDFLAGS = -avoid-version -export-dynamic -no-undefined -export-symbols-regex "^[^_].*"
|
||||
|
||||
# XED_LIBS must be the last to ensure correct order on some platforms
|
||||
libxed_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
BUILT_SOURCES = \
|
||||
xed-enum-types.c \
|
||||
xed-enum-types.h \
|
||||
xed-marshal.c \
|
||||
xed-marshal.h
|
||||
|
||||
|
||||
NOINST_H_FILES = \
|
||||
xed-close-button.h \
|
||||
xed-close-confirmation-dialog.h \
|
||||
xed-dirs.h \
|
||||
xed-document-private.h \
|
||||
xed-documents-panel.h \
|
||||
xed-encodings-dialog.h \
|
||||
xed-history-entry.h \
|
||||
xed-io-error-info-bar.h \
|
||||
xed-metadata-manager.h \
|
||||
xed-paned.h \
|
||||
xed-plugins-engine.h \
|
||||
xed-preferences-dialog.h \
|
||||
xed-print-job.h \
|
||||
xed-print-preview.h \
|
||||
xed-settings.h \
|
||||
xed-status-combo-box.h \
|
||||
xed-tab-label.h \
|
||||
xed-ui.h \
|
||||
xed-utils.h \
|
||||
xed-view-frame.h \
|
||||
xed-view-gutter-renderer.h \
|
||||
xed-window-private.h
|
||||
|
||||
INST_H_FILES = \
|
||||
xed-app.h \
|
||||
xed-app-activatable.h \
|
||||
xed-commands.h \
|
||||
xed-debug.h \
|
||||
xed-document.h \
|
||||
xed-encodings-combo-box.h \
|
||||
xed-file-chooser-dialog.h \
|
||||
xed-message-bus.h \
|
||||
xed-message-type.h \
|
||||
xed-message.h \
|
||||
xed-notebook.h \
|
||||
xed-panel.h \
|
||||
xed-progress-info-bar.h \
|
||||
xed-searchbar.h \
|
||||
xed-statusbar.h \
|
||||
xed-tab.h \
|
||||
xed-view.h \
|
||||
xed-view-activatable.h \
|
||||
xed-window.h \
|
||||
xed-window-activatable.h
|
||||
|
||||
headerdir = $(prefix)/include/xed
|
||||
|
||||
header_DATA = \
|
||||
$(INST_H_FILES)
|
||||
|
||||
BUILT_SOURCES_PRIVATE = \
|
||||
xed-resources.c
|
||||
|
||||
libxed_c_files = \
|
||||
xed-app.c \
|
||||
xed-app-activatable.c \
|
||||
xed-view-activatable.c \
|
||||
xed-window-activatable.c \
|
||||
xed-resources.c \
|
||||
xed-close-button.c \
|
||||
xed-close-confirmation-dialog.c \
|
||||
xed-commands-documents.c \
|
||||
xed-commands-edit.c \
|
||||
xed-commands-file.c \
|
||||
xed-commands-file-print.c \
|
||||
xed-commands-help.c \
|
||||
xed-commands-search.c \
|
||||
xed-commands-view.c \
|
||||
xed-debug.c \
|
||||
xed-dirs.c \
|
||||
xed-document.c \
|
||||
xed-documents-panel.c \
|
||||
xed-encodings-combo-box.c \
|
||||
xed-encodings-dialog.c \
|
||||
xed-file-chooser-dialog.c \
|
||||
xed-history-entry.c \
|
||||
xed-io-error-info-bar.c \
|
||||
xed-message-bus.c \
|
||||
xed-message-type.c \
|
||||
xed-message.c \
|
||||
xed-metadata-manager.c \
|
||||
xed-notebook.c \
|
||||
xed-paned.c \
|
||||
xed-panel.c \
|
||||
xed-plugins-engine.c \
|
||||
xed-preferences-dialog.c \
|
||||
xed-print-job.c \
|
||||
xed-print-preview.c \
|
||||
xed-progress-info-bar.c \
|
||||
xed-settings.c \
|
||||
xed-searchbar.c \
|
||||
xed-statusbar.c \
|
||||
xed-status-combo-box.c \
|
||||
xed-tab.c \
|
||||
xed-tab-label.c \
|
||||
xed-utils.c \
|
||||
xed-view.c \
|
||||
xed-view-frame.c \
|
||||
xed-view-gutter-renderer.c \
|
||||
xed-window.c
|
||||
|
||||
libxed_la_SOURCES = \
|
||||
$(BUILT_SOURCES) \
|
||||
$(libxed_c_files) \
|
||||
$(POSIXIO_FILES) \
|
||||
$(NOINST_H_FILES) \
|
||||
$(INST_H_FILES)
|
||||
|
||||
xed-enum-types.h: xed-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
||||
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template xed-enum-types.h.template $(INST_H_FILES)) > $@
|
||||
|
||||
xed-enum-types.c: xed-enum-types.c.template $(INST_H_FILES) $(GLIB_MKENUMS)
|
||||
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template xed-enum-types.c.template $(INST_H_FILES)) > $@
|
||||
|
||||
xed-marshal.h: xed-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=xed_marshal > $@
|
||||
|
||||
xed-marshal.c: xed-marshal.list $(GLIB_GENMARSHAL)
|
||||
$(AM_V_GEN) echo "#include \"xed-marshal.h\"" > $@ && \
|
||||
$(GLIB_GENMARSHAL) $< --body --prefix=xed_marshal >> $@
|
||||
|
||||
xed-resources.c: resources/xed.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/resources/xed.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/resources --generate-source $(srcdir)/resources/xed.gresource.xml
|
||||
|
||||
EXTRA_DIST = \
|
||||
xed-enum-types.h.template \
|
||||
xed-enum-types.c.template \
|
||||
xed-marshal.list \
|
||||
xed.rc \
|
||||
resources/xed.gresource.xml \
|
||||
resources/ui/xed-ui.xml \
|
||||
resources/ui/xed-encodings-dialog.ui \
|
||||
resources/ui/xed-preferences-dialog.ui \
|
||||
resources/ui/xed-print-preferences.ui \
|
||||
resources/ui/xed-searchbar.ui \
|
||||
resources/ui/xed-view-frame.ui
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES) $(BUILT_SOURCES_PRIVATE)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
INTROSPECTION_GIRS = Xed-1.0.gir
|
||||
|
||||
Xed-1.0.gir: xed
|
||||
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all
|
||||
Xed_1_0_gir_NAMESPACE = Xed
|
||||
Xed_1_0_gir_VERSION = 1.0
|
||||
Xed_1_0_gir_PROGRAM = $(builddir)/xed
|
||||
Xed_1_0_gir_FILES = $(INST_H_FILES) $(libxed_c_files) $(BUILT_SOURCES)
|
||||
Xed_1_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
|
||||
|
||||
girdir = $(datadir)/xed/gir-1.0
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibdir = $(libdir)/xed/girepository-1.0
|
||||
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += \
|
||||
$(gir_DATA) \
|
||||
$(typelib_DATA)
|
||||
endif
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir); rm -f $(BUILT_SOURCES) $(BUILT_SOURCES_PRIVATE)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
193
xed/meson.build
Normal file
193
xed/meson.build
Normal file
@@ -0,0 +1,193 @@
|
||||
xed_sources = [
|
||||
'xed.c'
|
||||
]
|
||||
|
||||
private_headers = [
|
||||
'xed-close-button.h',
|
||||
'xed-close-confirmation-dialog.h',
|
||||
'xed-dirs.h',
|
||||
'xed-document-private.h',
|
||||
'xed-documents-panel.h',
|
||||
'xed-encodings-dialog.h',
|
||||
'xed-history-entry.h',
|
||||
'xed-io-error-info-bar.h',
|
||||
'xed-metadata-manager.h',
|
||||
'xed-paned.h',
|
||||
'xed-plugins-engine.h',
|
||||
'xed-preferences-dialog.h',
|
||||
'xed-print-job.h',
|
||||
'xed-print-preview.h',
|
||||
'xed-settings.h',
|
||||
'xed-status-combo-box.h',
|
||||
'xed-tab-label.h',
|
||||
'xed-ui.h',
|
||||
'xed-utils.h',
|
||||
'xed-view-frame.h',
|
||||
'xed-view-gutter-renderer.h',
|
||||
'xed-window-private.h'
|
||||
]
|
||||
|
||||
public_headers = [
|
||||
'xed-app.h',
|
||||
'xed-app-activatable.h',
|
||||
'xed-commands.h',
|
||||
'xed-debug.h',
|
||||
'xed-document.h',
|
||||
'xed-encodings-combo-box.h',
|
||||
'xed-file-chooser-dialog.h',
|
||||
'xed-message-bus.h',
|
||||
'xed-message-type.h',
|
||||
'xed-message.h',
|
||||
'xed-notebook.h',
|
||||
'xed-panel.h',
|
||||
'xed-progress-info-bar.h',
|
||||
'xed-searchbar.h',
|
||||
'xed-statusbar.h',
|
||||
'xed-tab.h',
|
||||
'xed-view.h',
|
||||
'xed-view-activatable.h',
|
||||
'xed-window.h',
|
||||
'xed-window-activatable.h'
|
||||
]
|
||||
|
||||
libxed_sources = [
|
||||
'xed-app.c',
|
||||
'xed-app-activatable.c',
|
||||
'xed-view-activatable.c',
|
||||
'xed-window-activatable.c',
|
||||
'xed-close-button.c',
|
||||
'xed-close-confirmation-dialog.c',
|
||||
'xed-commands-documents.c',
|
||||
'xed-commands-edit.c',
|
||||
'xed-commands-file.c',
|
||||
'xed-commands-file-print.c',
|
||||
'xed-commands-help.c',
|
||||
'xed-commands-search.c',
|
||||
'xed-commands-view.c',
|
||||
'xed-debug.c',
|
||||
'xed-dirs.c',
|
||||
'xed-document.c',
|
||||
'xed-documents-panel.c',
|
||||
'xed-encodings-combo-box.c',
|
||||
'xed-encodings-dialog.c',
|
||||
'xed-file-chooser-dialog.c',
|
||||
'xed-history-entry.c',
|
||||
'xed-io-error-info-bar.c',
|
||||
'xed-message-bus.c',
|
||||
'xed-message-type.c',
|
||||
'xed-message.c',
|
||||
'xed-metadata-manager.c',
|
||||
'xed-notebook.c',
|
||||
'xed-paned.c',
|
||||
'xed-panel.c',
|
||||
'xed-plugins-engine.c',
|
||||
'xed-preferences-dialog.c',
|
||||
'xed-print-job.c',
|
||||
'xed-print-preview.c',
|
||||
'xed-progress-info-bar.c',
|
||||
'xed-settings.c',
|
||||
'xed-searchbar.c',
|
||||
'xed-statusbar.c',
|
||||
'xed-status-combo-box.c',
|
||||
'xed-tab.c',
|
||||
'xed-tab-label.c',
|
||||
'xed-utils.c',
|
||||
'xed-view.c',
|
||||
'xed-view-frame.c',
|
||||
'xed-view-gutter-renderer.c',
|
||||
'xed-window.c'
|
||||
]
|
||||
|
||||
xed_enums = gnome.mkenums(
|
||||
'xed-enum-types',
|
||||
sources : public_headers,
|
||||
c_template : 'xed-enum-types.c.template',
|
||||
h_template : 'xed-enum-types.h.template',
|
||||
identifier_prefix : 'Xed',
|
||||
symbol_prefix : 'xed'
|
||||
)
|
||||
|
||||
xed_marshal = gnome.genmarshal(
|
||||
'xed-marshal',
|
||||
sources: 'xed-marshal.list',
|
||||
prefix: 'xed_marshal'
|
||||
)
|
||||
|
||||
xed_resources = gnome.compile_resources(
|
||||
'xed-resources', 'resources/xed.gresource.xml',
|
||||
source_dir: ['resources', 'resources/css', 'resources/ui'],
|
||||
c_name: 'xed'
|
||||
)
|
||||
|
||||
xed_deps = [
|
||||
config_h,
|
||||
gio,
|
||||
glib,
|
||||
gtk,
|
||||
gtksourceview,
|
||||
libpeas,
|
||||
libpeas_gtk,
|
||||
libxml,
|
||||
math,
|
||||
xapp,
|
||||
X11
|
||||
]
|
||||
|
||||
libxed = library(
|
||||
'xed',
|
||||
libxed_sources + private_headers + public_headers + xed_enums + xed_marshal + xed_resources,
|
||||
dependencies: xed_deps,
|
||||
include_directories: include_dirs,
|
||||
install: true,
|
||||
install_dir: join_paths(libdir, 'xed')
|
||||
)
|
||||
|
||||
install_headers(
|
||||
public_headers,
|
||||
subdir: 'xed'
|
||||
)
|
||||
|
||||
libxed_dep = declare_dependency(
|
||||
dependencies: xed_deps,
|
||||
link_with: libxed,
|
||||
link_args: ['-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now'],
|
||||
include_directories: [include_dirs, include_directories('.')]
|
||||
)
|
||||
|
||||
executable(
|
||||
'xed',
|
||||
xed_sources,
|
||||
dependencies: libxed_dep,
|
||||
install_rpath: join_paths(prefix, libdir, 'xed'),
|
||||
install: true
|
||||
)
|
||||
|
||||
gir = gnome.generate_gir(
|
||||
libxed,
|
||||
namespace: 'Xed',
|
||||
nsversion: '1.0',
|
||||
sources: public_headers + libxed_sources + xed_enums + xed_marshal,
|
||||
identifier_prefix: 'Xed',
|
||||
symbol_prefix: 'xed',
|
||||
includes: ['Gtk-3.0', 'GtkSource-3.0'],
|
||||
install: true,
|
||||
install_dir_typelib: join_paths(libdir, 'xed', 'girepository-1.0'),
|
||||
install_dir_gir: join_paths(datadir, 'xed', 'gir-1.0')
|
||||
)
|
||||
|
||||
pkgconfig.generate(
|
||||
name: 'xed',
|
||||
description: 'xed',
|
||||
filebase: 'xed',
|
||||
version: meson.project_version(),
|
||||
libraries: libxed,
|
||||
requires: [
|
||||
'gtksourceview-3.0',
|
||||
'libpeas-1.0',
|
||||
'libpeas-gtk-1.0'
|
||||
],
|
||||
variables: [
|
||||
'exec_prefix=${prefix}',
|
||||
'pluginsdir=${prefix}/@0@/xed/plugins'.format(libdir)
|
||||
]
|
||||
)
|
@@ -20,9 +20,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-app-activatable.h"
|
||||
#include "xed-app.h"
|
||||
|
@@ -28,10 +28,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -28,20 +28,15 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-close-confirmation-dialog.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <xed/xed-app.h>
|
||||
#include <xed/xed-document.h>
|
||||
#include <xed/xed-document-private.h>
|
||||
#include <xed/xed-utils.h>
|
||||
#include <xed/xed-window.h>
|
||||
|
||||
#include "xed-close-confirmation-dialog.h"
|
||||
|
||||
/* Properties */
|
||||
enum
|
||||
|
@@ -30,10 +30,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
@@ -30,10 +30,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
@@ -30,10 +30,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
@@ -30,10 +30,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@@ -31,10 +31,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@@ -30,10 +30,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Copyright (C) 1998, 1999 Alex Roberts, Evan Lawrence
|
||||
* Copyright (C) 2000, 2001 Chema Celorio, Paolo Maggi
|
||||
* Copyright (C) 2002 - 2005 Paolo Maggi
|
||||
* Copyright (C) 2002 - 2005 Paolo Maggi
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,23 +18,21 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Modified by the xed Team, 1998-2005. See the AUTHORS file for a
|
||||
* list of people on the xed Team.
|
||||
* Modified by the xed Team, 1998-2005. See the AUTHORS file for a
|
||||
* list of people on the xed Team.
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "xed-debug.h"
|
||||
|
||||
#define ENABLE_PROFILING
|
||||
@@ -87,7 +85,7 @@ xed_debug_init (void)
|
||||
if (g_getenv ("XED_DEBUG_SAVER") != NULL)
|
||||
debug = debug | XED_DEBUG_SAVER;
|
||||
|
||||
out:
|
||||
out:
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
if (debug != XED_NO_DEBUG)
|
||||
@@ -104,7 +102,7 @@ xed_debug_message (XedDebugSection section,
|
||||
const gchar *format, ...)
|
||||
{
|
||||
if (G_UNLIKELY (debug & section))
|
||||
{
|
||||
{
|
||||
#ifdef ENABLE_PROFILING
|
||||
gdouble seconds;
|
||||
g_return_if_fail (timer != NULL);
|
||||
@@ -121,11 +119,11 @@ xed_debug_message (XedDebugSection section,
|
||||
|
||||
#ifdef ENABLE_PROFILING
|
||||
seconds = g_timer_elapsed (timer, NULL);
|
||||
g_print ("[%f (%f)] %s:%d (%s) %s\n",
|
||||
g_print ("[%f (%f)] %s:%d (%s) %s\n",
|
||||
seconds, seconds - last, file, line, function, msg);
|
||||
last = seconds;
|
||||
last = seconds;
|
||||
#else
|
||||
g_print ("%s:%d (%s) %s\n", file, line, function, msg);
|
||||
g_print ("%s:%d (%s) %s\n", file, line, function, msg);
|
||||
#endif
|
||||
|
||||
fflush (stdout);
|
||||
@@ -146,13 +144,13 @@ void xed_debug (XedDebugSection section,
|
||||
|
||||
g_return_if_fail (timer != NULL);
|
||||
|
||||
seconds = g_timer_elapsed (timer, NULL);
|
||||
g_print ("[%f (%f)] %s:%d (%s)\n",
|
||||
seconds = g_timer_elapsed (timer, NULL);
|
||||
g_print ("[%f (%f)] %s:%d (%s)\n",
|
||||
seconds, seconds - last, file, line, function);
|
||||
last = seconds;
|
||||
#else
|
||||
g_print ("%s:%d (%s)\n", file, line, function);
|
||||
#endif
|
||||
#endif
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
@@ -21,9 +21,7 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-dirs.h"
|
||||
|
||||
|
@@ -30,13 +30,9 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@@ -1016,8 +1012,8 @@ xed_document_get_short_name_for_display (XedDocument *doc)
|
||||
|
||||
/**
|
||||
* xed_document_set_short_name_for_display:
|
||||
* @doc:
|
||||
* @short_name: (allow-none):
|
||||
* @doc: a #XedDocument
|
||||
* @short_name: (allow-none): the short name to use
|
||||
*/
|
||||
void
|
||||
xed_document_set_short_name_for_display (XedDocument *doc,
|
||||
@@ -1626,7 +1622,7 @@ xed_document_set_search_context (XedDocument *doc,
|
||||
* xed_document_get_search_context:
|
||||
* @doc: a #XedDocument
|
||||
*
|
||||
* Returns: the current search context of the document,
|
||||
* Returns: (transfer full): the current search context of the document,
|
||||
* or NULL if there is no search context
|
||||
*/
|
||||
GtkSourceSearchContext *
|
||||
|
@@ -76,7 +76,7 @@ gchar *xed_document_get_uri_for_display (XedDocument *doc);
|
||||
gchar *xed_document_get_short_name_for_display (XedDocument *doc);
|
||||
|
||||
void xed_document_set_short_name_for_display (XedDocument *doc,
|
||||
const gchar *name);
|
||||
const gchar *short_name);
|
||||
|
||||
gchar *xed_document_get_content_type (XedDocument *doc);
|
||||
|
||||
|
@@ -28,15 +28,13 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "xed-documents-panel.h"
|
||||
#include "xed-utils.h"
|
||||
#include "xed-notebook.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#define XED_DOCUMENTS_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
||||
XED_TYPE_DOCUMENTS_PANEL, \
|
||||
|
@@ -29,15 +29,11 @@
|
||||
* $Id: xed-encodings-combo-box.c 6112 2008-01-23 08:26:24Z sfre $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <glib/gi18n.h>
|
||||
#include <xed/xed-encodings-dialog.h>
|
||||
|
||||
#include "xed-encodings-combo-box.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include <xed/xed-encodings-dialog.h>
|
||||
#include "xed-settings.h"
|
||||
#include "xed-utils.h"
|
||||
|
||||
|
@@ -28,12 +28,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtksourceview/gtksource.h>
|
||||
|
||||
|
@@ -31,12 +31,8 @@
|
||||
/* TODO: Override set_extra_widget */
|
||||
/* TODO: add encoding property */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "xed-file-chooser-dialog.h"
|
||||
|
@@ -28,10 +28,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@@ -32,21 +32,17 @@
|
||||
* Verbose error reporting for file I/O operations (load, save, revert, create)
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <xed/xed-encodings-combo-box.h>
|
||||
|
||||
#include "xed-settings.h"
|
||||
#include "xed-utils.h"
|
||||
#include "xed-document.h"
|
||||
#include "xed-io-error-info-bar.h"
|
||||
#include <xed/xed-encodings-combo-box.h>
|
||||
|
||||
#define MAX_URI_IN_DIALOG_LENGTH 50
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
BOOLEAN:NONE
|
||||
BOOLEAN:VOID
|
||||
BOOLEAN:OBJECT
|
||||
VOID:BOOLEAN
|
||||
VOID:BOOLEAN,POINTER
|
||||
|
@@ -11,9 +11,9 @@ G_BEGIN_DECLS
|
||||
#define XED_TYPE_MESSAGE_TYPE (xed_message_type_get_type ())
|
||||
#define XED_MESSAGE_TYPE(x) ((XedMessageType *)(x))
|
||||
|
||||
typedef void (*XedMessageTypeForeach) (const gchar *key,
|
||||
GType type,
|
||||
gboolean required,
|
||||
typedef void (*XedMessageTypeForeach) (const gchar *key,
|
||||
GType type,
|
||||
gboolean required,
|
||||
gpointer user_data);
|
||||
|
||||
typedef struct _XedMessageType XedMessageType;
|
||||
@@ -25,21 +25,21 @@ gchar *xed_message_type_identifier (const gchar *object_path,
|
||||
const gchar *method);
|
||||
gboolean xed_message_type_is_valid_object_path (const gchar *object_path);
|
||||
|
||||
XedMessageType *xed_message_type_new (const gchar *object_path,
|
||||
XedMessageType *xed_message_type_new (const gchar *object_path,
|
||||
const gchar *method,
|
||||
guint num_optional,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
XedMessageType *xed_message_type_new_valist (const gchar *object_path,
|
||||
const gchar *method,
|
||||
guint num_optional,
|
||||
va_list va_args);
|
||||
va_list var_args);
|
||||
|
||||
void xed_message_type_set (XedMessageType *message_type,
|
||||
guint num_optional,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void xed_message_type_set_valist (XedMessageType *message_type,
|
||||
guint num_optional,
|
||||
va_list va_args);
|
||||
va_list var_args);
|
||||
|
||||
XedMessageType *xed_message_type_ref (XedMessageType *message_type);
|
||||
void xed_message_type_unref (XedMessageType *message_type);
|
||||
@@ -55,7 +55,7 @@ const gchar *xed_message_type_get_method (XedMessageType *message_type);
|
||||
|
||||
GType xed_message_type_lookup (XedMessageType *message_type,
|
||||
const gchar *key);
|
||||
|
||||
|
||||
void xed_message_type_foreach (XedMessageType *message_type,
|
||||
XedMessageTypeForeach func,
|
||||
gpointer user_data);
|
||||
|
@@ -35,10 +35,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
@@ -984,6 +981,13 @@ xed_notebook_remove_all_tabs (XedNotebook *nb)
|
||||
gtk_container_foreach (GTK_CONTAINER (nb), (GtkCallback)remove_tab, nb);
|
||||
}
|
||||
|
||||
/**
|
||||
* xed_notebook_get_all_tabs:
|
||||
* @nb: a #XedNotebook
|
||||
*
|
||||
* Gets all #XedTab from @nb.
|
||||
* Returns: (element-type GtkWidget) (transfer container): #GList of all tabs
|
||||
*/
|
||||
GList *
|
||||
xed_notebook_get_all_tabs (XedNotebook *nb)
|
||||
{
|
||||
|
@@ -1,6 +1,4 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-paned.h"
|
||||
|
||||
|
@@ -28,12 +28,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <girepository.h>
|
||||
|
||||
|
@@ -29,14 +29,10 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
@@ -254,7 +250,7 @@ word_wrap_switch_toggled (GObject *toggle_switch,
|
||||
static void
|
||||
setup_editor_page (XedPreferencesDialog *dlg)
|
||||
{
|
||||
XedSettings *settings;
|
||||
GObject *settings;
|
||||
gchar *system_font = NULL;
|
||||
gchar *label_text;
|
||||
GtkWrapMode wrap_mode;
|
||||
@@ -263,7 +259,7 @@ setup_editor_page (XedPreferencesDialog *dlg)
|
||||
|
||||
/* Fonts */
|
||||
settings = _xed_app_get_settings (XED_APP (g_application_get_default ()));
|
||||
system_font = xed_settings_get_system_font (settings);
|
||||
system_font = xed_settings_get_system_font (XED_SETTINGS (settings));
|
||||
|
||||
label_text = g_strdup_printf(_("Use the system fixed width font (%s)"), system_font);
|
||||
gtk_label_set_text (GTK_LABEL (dlg->fixed_width_font_label), label_text);
|
||||
|
@@ -29,10 +29,7 @@
|
||||
* $Id: xed-print.c 6022 2007-12-09 14:38:57Z pborelli $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtksourceview/gtksource.h>
|
||||
|
||||
|
@@ -27,10 +27,7 @@
|
||||
* $Id: xed-commands-search.c 5931 2007-09-25 20:05:40Z pborelli $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <glib/gi18n.h>
|
||||
|
@@ -30,10 +30,7 @@
|
||||
|
||||
/* TODO: add properties */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
@@ -868,6 +865,14 @@ xed_searchbar_get_replace_text (XedSearchbar *searchbar)
|
||||
return gtk_entry_get_text (GTK_ENTRY (searchbar->priv->replace_text_entry));
|
||||
}
|
||||
|
||||
/**
|
||||
* xed_searchbar_get_search_settings:
|
||||
* @searchbar: the #XedSearchbar
|
||||
*
|
||||
* Gets the search settings.
|
||||
*
|
||||
* Returns: (transfer none): #GtkSourceSearchSettings
|
||||
*/
|
||||
GtkSourceSearchSettings *
|
||||
xed_searchbar_get_search_settings (XedSearchbar *searchbar)
|
||||
{
|
||||
|
@@ -28,10 +28,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@@ -20,12 +20,10 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-tab-label.h"
|
||||
#include "xed-close-button.h"
|
||||
|
||||
|
@@ -26,10 +26,7 @@
|
||||
* See the ChangeLog files for a list of changes.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
|
@@ -31,10 +31,7 @@
|
||||
#ifndef __XED_UI_H__
|
||||
#define __XED_UI_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "xed-commands.h"
|
||||
|
@@ -30,24 +30,19 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtksourceview/gtksource.h>
|
||||
|
||||
#include "xed-utils.h"
|
||||
|
||||
#include "xed-document.h"
|
||||
#include "xed-debug.h"
|
||||
|
||||
|
@@ -19,9 +19,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-view-activatable.h"
|
||||
#include "xed-view.h"
|
||||
|
@@ -20,9 +20,10 @@
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "xed-view-frame.h"
|
||||
#include "xed-marshal.h"
|
||||
@@ -30,10 +31,6 @@
|
||||
#include "xed-utils.h"
|
||||
#include "xed-settings.h"
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define XED_VIEW_FRAME_SEARCH_DIALOG_TIMEOUT (30*1000) /* 30 seconds */
|
||||
|
||||
#define SEARCH_POPUP_MARGIN 12
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@@ -19,9 +19,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xed-window-activatable.h"
|
||||
#include "xed-window.h"
|
||||
|
@@ -1,7 +1,4 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
@@ -1203,7 +1200,7 @@ create_menu_bar_and_toolbar (XedWindow *window,
|
||||
GtkUIManager *manager;
|
||||
GtkRecentManager *recent_manager;
|
||||
GError *error = NULL;
|
||||
GtkWidget *tool_item;
|
||||
GtkToolItem *tool_item;
|
||||
GtkWidget *tool_box;
|
||||
GtkWidget *box;
|
||||
GtkWidget *separator;
|
||||
@@ -1305,8 +1302,8 @@ create_menu_bar_and_toolbar (XedWindow *window,
|
||||
gtk_box_pack_start (GTK_BOX(main_box), window->priv->toolbar, FALSE, FALSE, 0);
|
||||
|
||||
tool_item = gtk_tool_item_new ();
|
||||
gtk_tool_item_set_expand (GTK_TOOL_ITEM (tool_item), TRUE);
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (window->priv->toolbar), GTK_TOOL_ITEM (tool_item), 0);
|
||||
gtk_tool_item_set_expand ((tool_item), TRUE);
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (window->priv->toolbar), (tool_item), 0);
|
||||
|
||||
tool_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_container_add (GTK_CONTAINER (tool_item), tool_box);
|
||||
@@ -1593,11 +1590,11 @@ set_tab_spaces_label (XedWindow *window,
|
||||
{
|
||||
if (use_spaces)
|
||||
{
|
||||
xed_status_combo_box_set_label (window->priv->tab_width_combo, _("Spaces"));
|
||||
xed_status_combo_box_set_label (XED_STATUS_COMBO_BOX (window->priv->tab_width_combo), _("Spaces"));
|
||||
}
|
||||
else
|
||||
{
|
||||
xed_status_combo_box_set_label (window->priv->tab_width_combo, _("Tabs"));
|
||||
xed_status_combo_box_set_label (XED_STATUS_COMBO_BOX (window->priv->tab_width_combo), _("Tabs"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2667,7 +2664,7 @@ fullscreen_controls_build (XedWindow *window)
|
||||
GtkAction *action;
|
||||
GtkWidget *box;
|
||||
GtkWidget *toolbar;
|
||||
GtkWidget *toolitem;
|
||||
GtkToolItem *toolitem;
|
||||
GtkWidget *toolbox;
|
||||
GtkWidget *fullscreen_btn;
|
||||
GtkWidget *separator;
|
||||
@@ -2684,8 +2681,8 @@ fullscreen_controls_build (XedWindow *window)
|
||||
|
||||
toolbar = gtk_toolbar_new ();
|
||||
toolitem = gtk_tool_item_new ();
|
||||
gtk_tool_item_set_expand (GTK_TOOL_ITEM (toolitem), TRUE);
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (toolitem), 0);
|
||||
gtk_tool_item_set_expand (toolitem, TRUE);
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), toolitem, 0);
|
||||
|
||||
toolbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (toolbar), "primary-toolbar");
|
||||
@@ -3763,6 +3760,16 @@ xed_window_create_tab_from_location (XedWindow *window,
|
||||
return process_create_tab (window, XED_TAB (tab), jump_to);
|
||||
}
|
||||
|
||||
/**
|
||||
* xed_window_create_tab_from_stream:
|
||||
* @window: a #XedWindow
|
||||
* @stream: the #GInputStream
|
||||
* @encoding: the encoding to use in the stream
|
||||
* @line_pos: the position
|
||||
* @jump_to: whether to jump to the new tab
|
||||
*
|
||||
* Returns: (transfer none): the active #XedTab in the @window.
|
||||
*/
|
||||
XedTab *
|
||||
xed_window_create_tab_from_stream (XedWindow *window,
|
||||
GInputStream *stream,
|
||||
@@ -4272,7 +4279,7 @@ _xed_window_is_fullscreen (XedWindow *window)
|
||||
*
|
||||
* Gets the #XedTab that matches with the given @location.
|
||||
*
|
||||
* Returns: the #XedTab that matches with the given @location.
|
||||
* Returns: (transfer none): the #XedTab that matches with the given @location.
|
||||
*/
|
||||
XedTab *
|
||||
xed_window_get_tab_from_location (XedWindow *window,
|
||||
|
Reference in New Issue
Block a user