Browse Source

Add i18n framework and Dutch translation

(Old svn revision: 3501)
upstream/xfce4-panel-4.10.1
Jasper Huijsmans 20 years ago
parent
commit
dcf0765127
  1. 14
      ChangeLog
  2. 2
      Makefile.am
  3. 20
      Makefile.in
  4. 330
      aclocal.m4
  5. 21
      config.h.in
  6. 2978
      configure
  7. 9
      configure.ac
  8. 16
      icons/Makefile.in
  9. 2
      panel/Makefile.am
  10. 18
      panel/Makefile.in
  11. 3
      panel/callbacks.c
  12. 20
      panel/controls.c
  13. 11
      panel/controls_dialog.c
  14. 4
      panel/global.h
  15. 3
      panel/groups.c
  16. 96
      panel/handle.c
  17. 3
      panel/icons.c
  18. 19
      panel/info.c
  19. 5
      panel/item.c
  20. 9
      panel/item_dialog.c
  21. 22
      panel/main.c
  22. 12
      panel/mcs_client.c
  23. 49
      panel/my_gettext.h
  24. 3
      panel/panel.c
  25. 7
      panel/popup.c
  26. 15
      panel/settings.c
  27. 3
      panel/xfce_support.c
  28. 16
      plugins/Makefile.in
  29. 2
      plugins/clock/Makefile.am
  30. 18
      plugins/clock/Makefile.in
  31. 5
      plugins/clock/clock.c
  32. 2
      plugins/mailcheck/Makefile.am
  33. 18
      plugins/mailcheck/Makefile.in
  34. 5
      plugins/mailcheck/mailcheck.c
  35. 2
      plugins/switcher/Makefile.am
  36. 18
      plugins/switcher/Makefile.in
  37. 44
      plugins/switcher/switcher.c
  38. 2
      plugins/systembuttons/Makefile.am
  39. 18
      plugins/systembuttons/Makefile.in
  40. 5
      plugins/systembuttons/systembuttons.c
  41. 2
      plugins/trash/Makefile.am
  42. 18
      plugins/trash/Makefile.in
  43. 13
      plugins/trash/trash.c
  44. 243
      po/Makefile.in.in
  45. 30
      po/POTFILES.in
  46. BIN
      po/nl.gmo
  47. 573
      po/nl.po
  48. 561
      po/xfce4-panel.pot
  49. 2
      settings/Makefile.am
  50. 18
      settings/Makefile.in
  51. 10
      settings/xfce_settings_dialog.c
  52. 22
      settings/xfce_settings_plugin.c
  53. 16
      themes/Crystal/Makefile.in
  54. 16
      themes/Curve/Makefile.in
  55. 16
      themes/Gnome/Makefile.in
  56. 16
      themes/Makefile.in
  57. 16
      themes/Noia/Makefile.in
  58. 16
      themes/XFce/Makefile.in

14
ChangeLog

@ -1,3 +1,17 @@
2003-01-21 20:12 huysmans
* ChangeLog, panel/controls.c, panel/panel.c: Small things that
weren't committed yet
2003-01-19 23:22 huysmans
* panel/controls.c: Fixing popup menu positioning
2003-01-19 22:51 huysmans
* panel/: controls.c, panel.c: Use edit/remove/add menu on panel
control right-click
2003-01-19 17:39 madkiss
* panel/xfce_support.c:

2
Makefile.am

@ -10,7 +10,7 @@ conf_DATA = xfce4rc
EXTRA_DIST = example.xfce4rc.in xfce4.spec xfce4.spec.in autogen.sh
SUBDIRS = @MY_SUBDIRS@
SUBDIRS = po @MY_SUBDIRS@
distclean-local:
rm -rf xfce4rc xfce4.spec *.cache

20
Makefile.in

@ -46,12 +46,15 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@ -60,12 +63,17 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -82,6 +90,8 @@ MCS_CLIENT_CFLAGS = @MCS_CLIENT_CFLAGS@
MCS_CLIENT_LIBS = @MCS_CLIENT_LIBS@
MCS_MANAGER_CFLAGS = @MCS_MANAGER_CFLAGS@
MCS_MANAGER_LIBS = @MCS_MANAGER_LIBS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MY_SUBDIRS = @MY_SUBDIRS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@ -93,13 +103,19 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PANGO_REQUIRED_VERSION = @PANGO_REQUIRED_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XFCE_MCS_MANAGER_CFLAGS = @XFCE_MCS_MANAGER_CFLAGS@
XFCE_MCS_MANAGER_LIBS = @XFCE_MCS_MANAGER_LIBS@
XGETTEXT = @XGETTEXT@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
@ -148,7 +164,7 @@ conf_DATA = xfce4rc
EXTRA_DIST = example.xfce4rc.in xfce4.spec xfce4.spec.in autogen.sh
SUBDIRS = @MY_SUBDIRS@
SUBDIRS = po @MY_SUBDIRS@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@ -388,7 +404,7 @@ distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/.
$(mkinstalldirs) $(distdir)/. $(distdir)/po
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \

330
aclocal.m4

@ -848,6 +848,336 @@ AC_PREREQ([2.52])
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
#
# Modified to never use included libintl.
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
#
# Major rework to remove unused code
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
#
#
# We need this here as well, since someone might use autoconf-2.5x
# to configure GLib then an older version to configure a package
# using AM_GLIB_GNU_GETTEXT
AC_PREREQ(2.53)
dnl
dnl We go to great lengths to make sure that aclocal won't
dnl try to pull in the installed version of these macros
dnl when running aclocal in the glib directory.
dnl
m4_copy([AC_DEFUN],[glib_DEFUN])
m4_copy([AC_REQUIRE],[glib_REQUIRE])
dnl
dnl At the end, if we're not within glib, we'll define the public
dnl definitions in terms of our private definitions.
dnl
# GLIB_LC_MESSAGES
#--------------------
glib_DEFUN([GLIB_LC_MESSAGES],
[AC_CHECK_HEADERS([locale.h])
if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
fi])
# GLIB_PATH_PROG_WITH_TEST
#----------------------------
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# GLIB_WITH_NLS
#-----------------
glib_DEFUN([GLIB_WITH_NLS],
dnl NLS is obligatory
[USE_NLS=yes
AC_SUBST(USE_NLS)
gt_cv_have_gettext=no
CATOBJEXT=NONE
XGETTEXT=:
INTLLIBS=
AC_CHECK_HEADER(libintl.h,
[gt_cv_func_dgettext_libintl="no"
libintl_extra_libs=""
#
# First check in libc
#
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
[AC_TRY_LINK([
#include <libintl.h>
],
[return (int) dgettext ("","")],
gt_cv_func_dgettext_libc=yes,
gt_cv_func_dgettext_libc=no)
])
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
AC_CHECK_FUNCS(bind_textdomain_codeset)
fi
#
# If we don't have everything we want, check in libintl
#
if test "$gt_cv_func_dgettext_libc" != "yes" \
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CHECK_LIB(intl, dgettext,
gt_cv_func_dgettext_libintl=yes)])
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
AC_MSG_CHECKING([if -liconv is needed to use gettext])
AC_MSG_RESULT([])
AC_CHECK_LIB(intl, dcgettext,
[gt_cv_func_dgettext_libintl=yes
libintl_extra_libs=-liconv],
:,-liconv)
fi
#
# If we found libintl, then check in it for bind_textdomain_codeset();
# we'll prefer libc if neither have bind_textdomain_codeset(),
# and both have dgettext
#
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
glib_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $libintl_extra_libs"
unset ac_cv_func_bind_textdomain_codeset
AC_CHECK_FUNCS(bind_textdomain_codeset)
LIBS="$glib_save_LIBS"
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
gt_cv_func_dgettext_libc=no
else
if test "$gt_cv_func_dgettext_libc" = "yes"; then
gt_cv_func_dgettext_libintl=no
fi
fi
fi
fi
if test "$gt_cv_func_dgettext_libc" = "yes" \
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
gt_cv_have_gettext=yes
fi
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
INTLLIBS="-lintl $libintl_extra_libs"
fi
if test "$gt_cv_have_gettext" = "yes"; then
AC_DEFINE(HAVE_GETTEXT,1,
[Define if the GNU gettext() function is already present or preinstalled.])
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
if test "$gt_cv_have_gettext" = "yes" ; then
AC_DEFINE(ENABLE_NLS, 1,
[always defined to indicate that i18n is enabled])
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is not GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac])
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLLIBS)
AC_SUBST(PO_IN_DATADIR_TRUE)
AC_SUBST(PO_IN_DATADIR_FALSE)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
# AM_GLIB_GNU_GETTEXT
# -------------------
# Do checks necessary for use of gettext. If a suitable implementation
# of gettext is found in either in libintl or in the C library,
# it will set INTLLIBS to the libraries needed for use of gettext
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
# on various variables needed by the Makefile.in.in installed by
# glib-gettextize.
dnl
glib_DEFUN(GLIB_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
GLIB_LC_MESSAGES
GLIB_WITH_NLS
if test "$gt_cv_have_gettext" = "yes"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
# -------------------------------
# Define VARIABLE to the location where catalog files will
# be installed by po/Makefile.
glib_DEFUN(GLIB_DEFINE_LOCALEDIR,
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
glib_save_prefix="$prefix"
test "x$prefix" = xNONE && prefix=$ac_default_prefix
if test "x$CATOBJEXT" = "x.mo" ; then
localedir=`eval echo "${libdir}/locale"`
else
localedir=`eval echo "${datadir}/locale"`
fi
prefix="$glib_save_prefix"
AC_DEFINE_UNQUOTED($1, "$localedir",
[Define the location where the catalogs will be installed])
])
dnl
dnl Now the definitions that aclocal will find
dnl
ifdef(glib_configure_in,[],[
AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)])
AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)])
])dnl
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page

21
config.h.in

@ -3,18 +3,36 @@
/* Define to 1 for debug. */
#undef DEBUG
/* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS
/* Name of default gettext domain */
#undef GETTEXT_PACKAGE
/* Define glib required version. */
#undef GLIB_REQUIRED_VERSION
/* Define gtk required version. */
#undef GTK_REQUIRED_VERSION
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if you have the `X11' library (-lX11). */
#undef HAVE_LIBX11
@ -24,6 +42,9 @@
/* Define to 1 if you have the `Xpm' library (-lXpm). */
#undef HAVE_LIBXPM
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

2978
configure

File diff suppressed because it is too large

9
configure.ac

@ -11,6 +11,14 @@ AM_CONFIG_HEADER(config.h)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
GETTEXT_PACKAGE=xfce4-panel
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default
gettext domain])
ALL_LINGUAS="nl"
AM_GLIB_GNU_GETTEXT
AC_PROG_CC
AC_PROG_INSTALL
@ -71,6 +79,7 @@ AC_PROG_LIBTOOL
AC_OUTPUT([
xfce4.spec
Makefile
po/Makefile.in
icons/Makefile
panel/Makefile
plugins/Makefile

16
icons/Makefile.in

@ -46,12 +46,15 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@ -60,12 +63,17 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -82,6 +90,8 @@ MCS_CLIENT_CFLAGS = @MCS_CLIENT_CFLAGS@
MCS_CLIENT_LIBS = @MCS_CLIENT_LIBS@
MCS_MANAGER_CFLAGS = @MCS_MANAGER_CFLAGS@
MCS_MANAGER_LIBS = @MCS_MANAGER_LIBS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MY_SUBDIRS = @MY_SUBDIRS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@ -93,13 +103,19 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PANGO_REQUIRED_VERSION = @PANGO_REQUIRED_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XFCE_MCS_MANAGER_CFLAGS = @XFCE_MCS_MANAGER_CFLAGS@
XFCE_MCS_MANAGER_LIBS = @XFCE_MCS_MANAGER_LIBS@
XGETTEXT = @XGETTEXT@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@

2
panel/Makefile.am

@ -44,5 +44,5 @@ plugins.h \
xfce_support.h \
xfce.h
xfce4_panel_CFLAGS = -Wall @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ @MCS_CLIENT_CFLAGS@ -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DDATADIR=\"$(pkgdatadir)\" -DLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DVERSION=\"@VERSION@\"
xfce4_panel_CFLAGS = -Wall @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ @MCS_CLIENT_CFLAGS@ -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DDATADIR=\"$(pkgdatadir)\" -DLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DVERSION=\"@VERSION@\" -DLOCALEDIR=\"$(datadir)/locale\"
xfce4_panel_LDADD = @LIBS@ @X_LIBS@ @BASE_DEPENDENCIES_LIBS@ @MCS_CLIENT_LIBS@

18
panel/Makefile.in

@ -46,12 +46,15 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@ -60,12 +63,17 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -82,6 +90,8 @@ MCS_CLIENT_CFLAGS = @MCS_CLIENT_CFLAGS@
MCS_CLIENT_LIBS = @MCS_CLIENT_LIBS@
MCS_MANAGER_CFLAGS = @MCS_MANAGER_CFLAGS@
MCS_MANAGER_LIBS = @MCS_MANAGER_LIBS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MY_SUBDIRS = @MY_SUBDIRS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@ -93,13 +103,19 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PANGO_REQUIRED_VERSION = @PANGO_REQUIRED_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XFCE_MCS_MANAGER_CFLAGS = @XFCE_MCS_MANAGER_CFLAGS@
XFCE_MCS_MANAGER_LIBS = @XFCE_MCS_MANAGER_LIBS@
XGETTEXT = @XGETTEXT@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
@ -186,7 +202,7 @@ xfce_support.h \
xfce.h
xfce4_panel_CFLAGS = -Wall @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ @MCS_CLIENT_CFLAGS@ -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DDATADIR=\"$(pkgdatadir)\" -DLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DVERSION=\"@VERSION@\"
xfce4_panel_CFLAGS = -Wall @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ @MCS_CLIENT_CFLAGS@ -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DDATADIR=\"$(pkgdatadir)\" -DLIBDIR=\"$(pkglibdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DVERSION=\"@VERSION@\" -DLOCALEDIR=\"$(datadir)/locale\"
xfce4_panel_LDADD = @LIBS@ @X_LIBS@ @BASE_DEPENDENCIES_LIBS@ @MCS_CLIENT_LIBS@
subdir = panel
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

3
panel/callbacks.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>

20
panel/controls.c

@ -39,6 +39,9 @@
* ------------------
*/
#include <config.h>
#include <my_gettext.h>
#include "xfce.h"
#include "item.h"
#include "popup.h"
@ -290,10 +293,10 @@ static void add_control(void)
}
static GtkItemFactoryEntry control_items[] = {
{ N_("/Edit ..."), NULL, edit_control, 0, "<Item>" },
{ N_("/Remove"), NULL, remove_control, 0, "<Item>" },
{ N_("/_Edit ..."), NULL, edit_control, 0, "<Item>" },
{ N_("/_Remove"), NULL, remove_control, 0, "<Item>" },
{ "/sep", NULL, NULL, 0, "<Separator>" },
{ N_("/Add new item"), NULL, add_control, 0, "<Item>" }
{ N_("/Add _new item"), NULL, add_control, 0, "<Item>" }
};
static GtkWidget *get_control_menu(void)
@ -303,12 +306,15 @@ static GtkWidget *get_control_menu(void)
if (!menu)
{
factory = gtk_item_factory_new(GTK_TYPE_MENU, "<popup>", NULL);
factory = gtk_item_factory_new(GTK_TYPE_MENU, "<popup>", NULL);
gtk_item_factory_create_items(factory, G_N_ELEMENTS(control_items),
control_items, NULL);
gtk_item_factory_set_translate_func(factory,
(GtkTranslateFunc) gettext,
NULL, NULL);
gtk_item_factory_create_items(factory, G_N_ELEMENTS(control_items),
control_items, NULL);
menu = gtk_item_factory_get_widget(factory, "<popup>");
menu = gtk_item_factory_get_widget(factory, "<popup>");
}
return menu;

11
panel/controls_dialog.c

@ -29,6 +29,9 @@
* Important data are kept as global variables for easy access.
*/
#include <config.h>
#include <my_gettext.h>
#include "xfce.h"
#include "controls_dialog.h"
#include "groups.h"
@ -246,11 +249,11 @@ void controls_dialog(Control * control)
gtk_widget_show(button);
gtk_dialog_add_action_widget(GTK_DIALOG(dlg), button, RESPONSE_REMOVE);
revert = button = mixed_button_new(GTK_STOCK_UNDO, _("Revert"));
revert = button = mixed_button_new(GTK_STOCK_UNDO, _("_Revert"));
gtk_widget_show(button);
gtk_dialog_add_action_widget(GTK_DIALOG(dlg), button, RESPONSE_REVERT);
done = button = mixed_button_new(GTK_STOCK_OK, _("Done"));
done = button = mixed_button_new(GTK_STOCK_OK, _("_Done"));
gtk_widget_show(button);
gtk_dialog_add_action_widget(GTK_DIALOG(dlg), button, RESPONSE_DONE);
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
@ -324,12 +327,16 @@ void controls_dialog(Control * control)
if (response == RESPONSE_REMOVE)
{
gtk_widget_hide(dlg);
if (confirm(_("Removing an item will also remove its popup menu.\n\n"
"Do you want to remove the item?"),
GTK_STOCK_REMOVE, NULL))
{
break;
}
gtk_widget_show(dlg);
}
else if (response != RESPONSE_REVERT)
{

4
panel/global.h

@ -27,10 +27,6 @@
/* Debug purpose */
#include "debug.h"
/* gettext */
#define _(x) x
#define N_(x) x
/* why is this not in the standard C library ? */
#define strequal(s1,s2) !strcmp (s1, s2)
#define strnequal(s1,s2,n) !strncmp (s1, s2, n)

3
panel/groups.c

@ -27,6 +27,9 @@
* button.
*/
#include <config.h>
#include <my_gettext.h>
#include "xfce.h"
#include "groups.h"
#include "popup.h"

96
panel/handle.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <libxfcegui4/xfce_movehandler.h>
#include <libxfcegui4/xfce_decorbutton.h>
@ -78,12 +81,12 @@ static GtkItemFactoryEntry panel_items[] = {
{ "/sep", NULL, NULL, 0, "<Separator>" },
{ N_("/Add _new item"), NULL, add_new, 0, "<Item>" },
{ "/sep", NULL, NULL, 0, "<Separator>" },
{ N_("/_Preferences"), NULL, edit_prefs, 0, "<Item>" },
{ N_("/_Panel settings"), NULL, edit_prefs, 0, "<Item>" },
{ N_("/_Settings manager"), NULL, settings_mgr, 0, "<Item>" },
{ "/sep", NULL, NULL, 0, "<Separator>" },
{ N_("/_About XFce"), NULL, do_info, 0, "<Item>" },
{ N_("/_Help"), NULL, do_help, 0, "<Item>" },
{ N_("/sep"), NULL, NULL, 0, "<Separator>" },
{ "/sep", NULL, NULL, 0, "<Separator>" },
{ N_("/_Lock screen"), NULL, lock_screen, 0, "<Item>" },
{ N_("/E_xit"), NULL, exit_panel, 0, "<Item>" },
};
@ -97,9 +100,11 @@ static GtkMenu *create_handle_menu(void)
{
ifactory = gtk_item_factory_new(GTK_TYPE_MENU, "<popup>", NULL);
gtk_item_factory_set_translate_func(ifactory,
(GtkTranslateFunc) gettext,
NULL, NULL);
gtk_item_factory_create_items(ifactory, G_N_ELEMENTS(panel_items),
panel_items, NULL);
menu = GTK_MENU(gtk_item_factory_get_widget(ifactory, "<popup>"));
}
@ -120,55 +125,6 @@ struct _Handle
static void handle_arrange(Handle * mh)
{
#if 0
gboolean vertical = settings.orientation == VERTICAL;
int position = settings.popup_position;
if(mh->box)
{
gtk_container_remove(GTK_CONTAINER(mh->box), mh->button);
gtk_container_remove(GTK_CONTAINER(mh->box), mh->handler);
/* removing the box will destroy it */
gtk_container_remove(GTK_CONTAINER(mh->base), mh->box);
}
/* create new box */
if(vertical)
mh->box = gtk_hbox_new(FALSE, 0);
else
mh->box = gtk_vbox_new(FALSE, 0);
gtk_widget_show(mh->box);
gtk_container_add(GTK_CONTAINER(mh->base), mh->box);
if(vertical)
{
if (position == LEFT)
{
gtk_box_pack_start(GTK_BOX(mh->box), mh->button, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(mh->box), mh->handler, TRUE, TRUE, 0);
}
else
{
gtk_box_pack_start(GTK_BOX(mh->box), mh->handler, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(mh->box), mh->button, FALSE, FALSE, 0);
}
}
else
{
if (position == BOTTOM)
{
gtk_box_pack_start(GTK_BOX(mh->box), mh->handler, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(mh->box), mh->button, FALSE, FALSE, 0);
}
else
{
gtk_box_pack_start(GTK_BOX(mh->box), mh->button, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(mh->box), mh->handler, TRUE, TRUE, 0);
}
}
#endif
}
static gboolean handler_pressed_cb(GtkWidget *h, GdkEventButton *event,
@ -201,42 +157,6 @@ Handle *handle_new(int side)
Handle *mh = g_new(Handle, 1);
GtkMenu *menu;
#if 0
mh->base = gtk_alignment_new(0, 0, 1, 1);
gtk_widget_show(mh->base);
/* protect against destruction when unpacking */
g_object_ref(mh->base);
mh->button = gtk_button_new();
if(settings.style == NEW_STYLE)
gtk_button_set_relief(GTK_BUTTON(mh->button), GTK_RELIEF_NONE);
gtk_widget_show(mh->button);
if (side == LEFT)
{
im = xfce_decorbutton_new(XFCE_DECORBUTTON_CLOSE);
gtk_widget_show(im);
gtk_container_add(GTK_CONTAINER(mh->button), im);
add_tooltip(mh->button, _("Quit..."));
g_signal_connect(mh->button, "clicked", G_CALLBACK(close_cb), NULL);
}
else
{
im = xfce_decorbutton_new(XFCE_DECORBUTTON_HIDE);
gtk_widget_show(im);
gtk_container_add(GTK_CONTAINER(mh->button), im);
add_tooltip(mh->button, _("Iconify panel"));
g_signal_connect(mh->button, "clicked", G_CALLBACK(iconify_cb), NULL);
}
gtk_widget_set_name(im, "xfce_popup_button");
#endif
mh->handler = xfce_movehandler_new(toplevel);
gtk_widget_show(mh->handler);

3
panel/icons.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include "xfce.h"
/* program icons */

19
panel/info.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <stdio.h>
#include <string.h>
@ -32,12 +35,6 @@
#define XFCE_AUTHORS "ChangeLog"
#endif
#ifndef VERSION
#define VERSION "unknown"
#endif
#define XFCE_VERSION N_("XFce 4: build " VERSION)
static void fill_buffer(const char *filename, char **buf, int *nb)
{
GError *err = NULL;
@ -49,7 +46,7 @@ static void fill_buffer(const char *filename, char **buf, int *nb)
if(err)
{
g_printerr("\nxfce4: %s (line: %d): %s\n\n", __FILE__, __LINE__,
g_printerr("%s: %s (line: %d): %s\n\n", PACKAGE, __FILE__, __LINE__,
err->message);
}
}
@ -118,6 +115,7 @@ static GtkWidget *create_info_header(void)
GtkWidget *logo_im;
GtkWidget *frame;
GtkWidget *label;
char text[100];
vbox1 = gtk_vbox_new(FALSE, 4);
gtk_widget_show(vbox1);
@ -138,12 +136,13 @@ static GtkWidget *create_info_header(void)
gtk_widget_show(vbox2);
gtk_container_add(GTK_CONTAINER(frame), vbox2);
label = create_bold_label(_(XFCE_VERSION));
sprintf(text, _("XFce 4"));
label = create_bold_label(text);
gtk_widget_show(label);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 0);
label = create_bold_label(_("By Olivier Fourdan (c) 1997-2002"));
label = create_bold_label(_("By Olivier Fourdan (c) 1997-2003"));
gtk_widget_show(label);
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 0);
@ -269,7 +268,7 @@ void info_panel_dialog(void)
info = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_position(GTK_WINDOW(info), GTK_WIN_POS_CENTER);
gtk_window_set_title(GTK_WINDOW(info), _("Info ..."));
gtk_window_set_title(GTK_WINDOW(info), _("Info"));
/* Make the info dialog sticky */
gtk_window_stick(GTK_WINDOW(info));

5
panel/item.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <libxfcegui4/xfce_iconbutton.h>
#include "xfce.h"
@ -70,7 +73,7 @@ static PanelItem *panel_item_new(void)
gtk_widget_show(pi->button);
gtk_button_set_relief(GTK_BUTTON(pi->button), GTK_RELIEF_NONE);
add_tooltip(pi->button, _("Click Mouse 3 to change item"));
add_tooltip(pi->button, _("Click mouse button 3 to change item"));
g_signal_connect(pi->button, "clicked", G_CALLBACK(panel_item_click_cb), pi);

9
panel/item_dialog.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include "xfce.h"
#include "popup.h"
#include "item.h"
@ -234,7 +237,7 @@ static GtkWidget *create_icon_option_menu(void)
GtkWidget *mi;
int i;
mi = gtk_menu_item_new_with_label(_("External Icon"));
mi = gtk_menu_item_new_with_label(_("Other Icon"));
gtk_widget_show(mi);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi);
@ -909,12 +912,12 @@ GtkWidget *create_menu_item_dialog(MenuItem * mi)
gtk_dialog_add_action_widget(GTK_DIALOG(dlg), remove_button,
RESPONSE_REMOVE);
revert_button = mixed_button_new(GTK_STOCK_UNDO, _("Revert"));
revert_button = mixed_button_new(GTK_STOCK_UNDO, _("_Revert"));
gtk_widget_show(revert_button);
gtk_dialog_add_action_widget(GTK_DIALOG(dlg), revert_button,
RESPONSE_REVERT);
done_button = mixed_button_new(GTK_STOCK_OK, _("Done"));
done_button = mixed_button_new(GTK_STOCK_OK, _("_Done"));
gtk_widget_show(done_button);
gtk_dialog_add_action_widget(GTK_DIALOG(dlg), done_button, RESPONSE_DONE);

22
panel/main.c

@ -23,9 +23,8 @@
* and session management.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <config.h>
#include <my_gettext.h>
#include <signal.h>
#include <stddef.h>
@ -80,7 +79,7 @@ void quit(gboolean force)
logout_session(client_session);
return;
}
else if (!confirm(_("Are you sure you want to Exit ?"), GTK_STOCK_QUIT, NULL))
else if (!confirm(_("Are you sure you want to exit?"), GTK_STOCK_QUIT, NULL))
{
return;
}
@ -148,13 +147,22 @@ int main(int argc, char **argv)
int i;
gboolean net_wm_support = FALSE;
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#endif
gtk_set_locale ();
gtk_init(&argc, &argv);
if(argc == 2 && (strequal(argv[1], "-v") || strequal(argv[1], "--version")))
if(argc == 2 &&
(strequal(argv[1], "-v") || strequal(argv[1], "--version") ||
strequal(argv[1], "-h") || strequal(argv[1], "--help")))
{
g_print(_("xfce4, version %s\n\n"
g_print(_("%s, version %s\n"
"Part of the XFce Desktop Environment\n"
"http://www.xfce.org\n"), VERSION);
"http://www.xfce.org\n"), PACKAGE, VERSION);
return 0;
}

12
panel/mcs_client.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <ctype.h>
#include <stdio.h>
#include <stddef.h>
@ -197,18 +200,15 @@ void mcs_watch_xfce_channel(void)
init_settings_hash();
if (!mcs_client_check_manager(dpy, screen, "xfce-mcs-manager"))
g_critical(_("MCS settings manager not running!"));
g_critical("%s: MCS settings manager not running!", PACKAGE);
client = mcs_client_new(dpy, screen, notify_cb, watch_cb, NULL);
if(!client)
{
g_critical(_("xfce4: could not connect to settings manager!"
"Please check your installation."));
g_warning("%s: could not connect to settings manager", PACKAGE);
show_error(_("The XFce panel could not connect to the settings \n"
"manager.\n"
"Please make sure it is installed on your system."));
show_warning(_("Settings manager not available"));
return;
}

49
panel/my_gettext.h

@ -0,0 +1,49 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
*/
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
#else
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.
On pre-ANSI systems without 'const', the config.h file is supposed to
contain "#define const". */
# define gettext(Msgid) ((const char *) (Msgid))
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# define textdomain(Domainname) ((const char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
#endif
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
The argument, String, should be a literal string. Concatenated strings
and other string expressions won't work.
The macro's expansion is not parenthesized, so that it is suitable as
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
#endif /* _LIBGETTEXT_H */
/* gettext convenience */
#define _(x) gettext(x)
#define N_(x) gettext_noop(x)

3
panel/panel.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <X11/Xlib.h>
#include <libxfcegui4/libnetk.h>

7
panel/popup.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <libxfcegui4/xfce_togglebutton.h>
#include <libxfcegui4/xfce_menubutton.h>
@ -190,7 +193,7 @@ void menu_item_apply_config(MenuItem * mi)
void create_addtomenu_item(MenuItem * mi)
{
mi->button = xfce_menubutton_new_with_stock_icon(_("Add icon..."), GTK_STOCK_ADD);
mi->button = xfce_menubutton_new_with_stock_icon(_("Add launcher"), GTK_STOCK_ADD);
gtk_widget_show(mi->button);
gtk_button_set_relief(GTK_BUTTON(mi->button), GTK_RELIEF_NONE);
@ -232,7 +235,7 @@ void create_menu_item(MenuItem * mi)
else if(mi->command && strlen(mi->command))
add_tooltip(mi->button, mi->command);
else
add_tooltip(mi->button, _("Click Mouse 3 to change item"));
add_tooltip(mi->button, _("Click mouse button 3 to change item"));
/* signals */
g_signal_connect(mi->button, "button-press-event",

15
panel/settings.c

@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <my_gettext.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
@ -101,7 +104,7 @@ void get_global_prefs(void)
if(!node)
{
g_printerr(_("xfce: %s (line %d): empty document\n"), __FILE__,
g_printerr("%s: %s (line %d): empty document\n", PACKAGE, __FILE__,
__LINE__);
xmlFreeDoc(xmlconfig);
@ -111,8 +114,8 @@ void get_global_prefs(void)
if(!xmlStrEqual(node->name, (const xmlChar *)ROOT))
{
g_printerr(_("xfce: %s (line %d): wrong document type\n"),
__FILE__, __LINE__);
g_printerr("%s: %s (line %d): wrong document type\n", PACKAGE,
__FILE__, __LINE__);
xmlFreeDoc(xmlconfig);
xmlconfig = make_empty_doc();
@ -146,7 +149,7 @@ void get_panel_config(void)
if(!node)
{
g_printerr(_("xfce: %s (line %d): empty document\n"), __FILE__,
g_printerr("%s: %s (line %d): empty document\n", PACKAGE, __FILE__,
__LINE__);
xmlFreeDoc(xmlconfig);
@ -156,8 +159,8 @@ void get_panel_config(void)
if(!xmlStrEqual(node->name, (const xmlChar *)ROOT))
{
g_printerr(_("xfce: %s (line %d): wrong document type\n"),
__FILE__, __LINE__);
g_printerr("%s: %s (line %d): wrong document type\n",
PACKAGE, __FILE__, __LINE__);
xmlFreeDoc(xmlconfig);
xmlconfig = make_empty_doc();

3
panel/xfce_support.c

@ -23,6 +23,9 @@
* all modules (and external plugins).
*/
#include <config.h>
#include <my_gettext.h>
#include <ctype.h>
#include <stdio.h>
#include <stddef.h>

16
plugins/Makefile.in

@ -46,12 +46,15 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@ -60,12 +63,17 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -82,6 +90,8 @@ MCS_CLIENT_CFLAGS = @MCS_CLIENT_CFLAGS@
MCS_CLIENT_LIBS = @MCS_CLIENT_LIBS@
MCS_MANAGER_CFLAGS = @MCS_MANAGER_CFLAGS@
MCS_MANAGER_LIBS = @MCS_MANAGER_LIBS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MY_SUBDIRS = @MY_SUBDIRS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@ -93,13 +103,19 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PANGO_REQUIRED_VERSION = @PANGO_REQUIRED_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XFCE_MCS_MANAGER_CFLAGS = @XFCE_MCS_MANAGER_CFLAGS@
XFCE_MCS_MANAGER_LIBS = @XFCE_MCS_MANAGER_LIBS@
XGETTEXT = @XGETTEXT@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@

2
plugins/clock/Makefile.am

@ -6,5 +6,5 @@ libclock_la_LDFLAGS = "-module"
libclock_la_SOURCES = \
clock.c
libclock_la_CFLAGS = -Wall -I../../panel @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ -DG_DISABLE_DEPRECATED -DDATADIR=\"$(pkgdatadir)\" -DLIBDIR=\"$(pkglibdir)\"
libclock_la_CFLAGS = -Wall -I$(top_srcdir) -I$(top_srcdir)/panel @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ -DG_DISABLE_DEPRECATED -DDATADIR=\"$(pkgdatadir)\" -DLIBDIR=\"$(pkglibdir)\"
libclock_la_LIBADD = @LIBS@ @X_LIBS@ @BASE_DEPENDENCIES_LIBS@

18
plugins/clock/Makefile.in

@ -46,12 +46,15 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASE_DEPENDENCIES_CFLAGS = @BASE_DEPENDENCIES_CFLAGS@
BASE_DEPENDENCIES_LIBS = @BASE_DEPENDENCIES_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@ -60,12 +63,17 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_REQUIRED_VERSION = @GLIB_REQUIRED_VERSION@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GTK_REQUIRED_VERSION = @GTK_REQUIRED_VERSION@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@ -82,6 +90,8 @@ MCS_CLIENT_CFLAGS = @MCS_CLIENT_CFLAGS@
MCS_CLIENT_LIBS = @MCS_CLIENT_LIBS@
MCS_MANAGER_CFLAGS = @MCS_MANAGER_CFLAGS@
MCS_MANAGER_LIBS = @MCS_MANAGER_LIBS@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MY_SUBDIRS = @MY_SUBDIRS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@ -93,13 +103,19 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PANGO_REQUIRED_VERSION = @PANGO_REQUIRED_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@