├── .gitignore ├── .mailmap ├── AUTHORS ├── COPYING ├── ChangeLog ├── Makefile.am ├── NEWS ├── README ├── configure.ac ├── data ├── Makefile.am ├── icon-theme-installer ├── icons │ ├── Makefile.am │ ├── image-x-generic-16.png │ ├── nitrogen-128.png │ ├── nitrogen-16.png │ ├── nitrogen-22.png │ ├── nitrogen-32.png │ ├── nitrogen-48.png │ ├── video-display-16.png │ ├── wallpaper-centered-16.png │ ├── wallpaper-scaled-16.png │ ├── wallpaper-tiled-16.png │ └── wallpaper-zoomed-16.png ├── nitrogen.appdata.xml └── nitrogen.desktop.in ├── po ├── ChangeLog ├── LINGUAS ├── Makevars ├── POTFILES ├── POTFILES.in ├── bs.po ├── de.po ├── fi.po ├── hr.po ├── nitrogen.pot ├── pl.po ├── ru.po ├── sr.po ├── stamp-po └── tr.po └── src ├── ArgParser.cc ├── ArgParser.h ├── Config.cc ├── Config.h ├── ImageCombo.cc ├── ImageCombo.h ├── Inotify.cc ├── Inotify.h ├── Makefile.am ├── NPrefsWindow.cc ├── NPrefsWindow.h ├── NWindow.cc ├── NWindow.h ├── SetBG.cc ├── SetBG.h ├── Thumbview.cc ├── Thumbview.h ├── Util.cc ├── Util.h ├── gcs-i18n.h ├── main.cc ├── main.h ├── md5.c ├── md5.h └── nitrogen.1 /.gitignore: -------------------------------------------------------------------------------- 1 | ABOUT-NLS 2 | autom4te.cache 3 | compile 4 | configure 5 | config.rpath 6 | depcomp 7 | INSTALL 8 | install-sh 9 | Makefile 10 | Makefile.in 11 | missing 12 | stamp-h1 13 | tags 14 | config.* 15 | *.m4 16 | *.o 17 | *.tar.gz 18 | *.swp 19 | *~ 20 | 21 | src/nitrogen 22 | src/.deps 23 | 24 | po/Makefile* 25 | po/Makevars.template 26 | po/*.sin 27 | po/*quot* 28 | 29 | data/nitrogen.desktop -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Dave Foster Dave Foster 2 | Dave Foster Dave Foster 3 | Dave Foster daf 4 | Javeed Shaikh syscrash 5 | 6 | 7 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Developed by: 2 | Dave Foster 3 | Javeed Shaikh 4 | 5 | Contributors: 6 | Craig Duquette - Artwork 7 | Chris Henhawke - Testing, bug reports 8 | Lars Kinn Ekroll - Much debugging help 9 | Евдокимов Сергей - patches 10 | Siiseli Koulutus - finnish translation 11 | Cloudef - Xinerama mode resource leak fix 12 | Julian Knauer - Xinerama/multihead --head select 13 | Andrew Starr-Bochicchio - .desktop file 14 | Evan Purkhiser - FDO thumbnails dir update 15 | dglava 16 | easysid 17 | jameh 18 | JamesNZ 19 | Max Vorob'jov 20 | Michael Vetter 21 | rtlanceroad 22 | Unit 193 23 | Vladimir-csp 24 | Jeff Blake 25 | 26 | Items Ruthlessly Stolen: 27 | Icon theme installer from Banshee 28 | (http://cvs.gnome.org/viewcvs/banshee/build/) 29 | 30 | Packagers (that are known?): 31 | Mogaal/Nion - debian packages 32 | Smoon - Arch packages 33 | Omp - gentoo packages 34 | JamesNZ - Fedora 35 | jubalh - openSUSE 36 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = po src data 2 | #DIST_SUBDIRS = data 3 | EXTRA_DIST = config.rpath 4 | 5 | ACLOCAL_AMFLAGS = -I m4 6 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Check for latest news at http://projects.l3ib.org/nitrogen 2 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | NITROGEN 2 | 3 | WEBPAGE: http://projects.l3ib.org/nitrogen/ 4 | 5 | REQUIREMENTS: 6 | GTKMM 2.10 7 | GTK 2.10 8 | 9 | BUILDING: 10 | 11 | autoreconf -fi 12 | ./configure 13 | make 14 | make install (as root or a user with proper permissions) 15 | 16 | The binary is called, amazingly enough, "nitrogen". 17 | 18 | NOTE: If the "CXXFLAGS" env var is not set at ./configure time, autotools 19 | will gladly insert "-g -O2" in them. "-g" will inflate the size of 20 | the nitrogen binary to nearly 2mb, so consider using: 21 | CXXFLAGS="-O2" ./configure 22 | 23 | PACKAGERS: Make sure you set CXXFLAGS to an appropriate value for 24 | the target system. For instance, CXXFLAGS=" -std=c++11" if using 25 | gcc 5.x. 26 | 27 | NOTE: If you want to install translations locally, you'll need to invoke 28 | `make dist` to build the .gmo files before `make install`. No, I 29 | don't know why. 30 | 31 | USAGE: 32 | See the man page. It *might* be up to date. 33 | 34 | CONTACT: 35 | If you want to tell us about the many bugs that we have, drop by #l3ib on 36 | irc.freenode.net, and talk to mz4 or jvd. 37 | 38 | LICENSE: 39 | Nitrogen is licensed under the GPL. See COPYING. 40 | Icons are licensed under a Creative Commons Attribution-Share Alike license. 41 | 42 | See http://creativecommons.org/licenses/by-sa/3.0 43 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ([2.69]) 2 | AC_INIT([nitrogen],[1.6.1],[daf@minuslab.net]) 3 | AC_CONFIG_SRCDIR([config.h.in]) 4 | AC_CONFIG_HEADER([config.h]) 5 | AC_CONFIG_AUX_DIR([.]) 6 | AC_ISC_POSIX 7 | AC_HEADER_STDC++ 8 | AM_INIT_AUTOMAKE([-Wno-obsolete]) 9 | 10 | AC_PROG_CXX 11 | AC_PROG_AWK 12 | AC_PROG_CC 13 | AC_PROG_CPP 14 | AC_PROG_RANLIB 15 | AC_PROG_INSTALL 16 | AC_PROG_LN_S 17 | AC_PROG_MAKE_SET 18 | 19 | dnl 20 | dnl Our depend list 21 | dnl 22 | 23 | GLIB2_VERSION=2.6.0 24 | GTK2_VERSION=2.10.0 25 | GTKMM2_VERSION=2.10.0 26 | GTHREAD2_VERSION=2.6.0 27 | 28 | AC_SUBST([GLIB2_VERSION]) 29 | AC_SUBST([GTK2_VERSION]) 30 | 31 | PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= $GLIB2_VERSION]) 32 | PKG_CHECK_MODULES([GTK2], [gtk+-2.0 >= $GTK2_VERSION]) 33 | PKG_CHECK_MODULES([GTKMM2], [gtkmm-2.4 >= $GTKMM2_VERSION]) 34 | PKG_CHECK_MODULES([GTHREAD2], [gthread-2.0 >= $GTHREAD2_VERSION]) 35 | 36 | NITROGEN_LIBS="$GLIB2_LIBS $GTK2_LIBS $GTKMM2_LIBS $GTHREAD2_LIBS" 37 | NITROGEN_CFLAGS="$GLIB2_CFLAGS $GTK2_CFLAGS $GTKMM2_CFLAGS $GTHREAD2_CFLAGS" 38 | 39 | dnl apparantly we have to check for X11 now 40 | AC_CHECK_LIB(X11, XOpenDisplay, [NITROGEN_LIBS="$NITROGEN_LIBS -lX11"]) 41 | 42 | ALL_LINGUAS="" 43 | AM_GNU_GETTEXT([external]) 44 | AM_GNU_GETTEXT_VERSION([0.19.7]) 45 | 46 | AC_LANG([C++]) 47 | AC_LANG_COMPILER_REQUIRE 48 | AC_HEADER_STDC([]) 49 | 50 | # Check for header files 51 | AC_CHECK_HEADERS([libintl.h string.h sys/time.h unistd.h]) 52 | 53 | # Checks for typedefs, structures, and compiler characteristics. 54 | AC_CHECK_HEADER_STDBOOL 55 | AC_C_INLINE 56 | AC_TYPE_SSIZE_T 57 | AC_TYPE_UINT32_T 58 | 59 | # Checks for library functions. 60 | AC_CHECK_FUNCS([select]) 61 | 62 | # Get autotools to use inotify 63 | AC_ARG_ENABLE([inotify], [ --disable-inotify disable support for inotify watching of dirs (default: enabled)], [enable_inotify=$enableval],[enable_inotify=yes]) 64 | 65 | AC_ARG_ENABLE([debug], [ --enable-debug enable debugging flags ]) 66 | 67 | if test "$enable_debug" = "yes"; then 68 | CXXFLAGS+=" -g -g3 -ggdb -DDEBUG" 69 | fi 70 | 71 | if test x$enable_inotify = xyes; then 72 | AC_DEFINE([USE_INOTIFY], 1, [Define to enable inotify dir watching]) 73 | fi 74 | 75 | # Check for Xinerama 76 | AC_ARG_ENABLE([xinerama], [ --disable-xinerama disable support for Xinerama (default: enabled)], [enable_xinerama=$enableval],[enable_xinerama=yes]) 77 | 78 | if test x$enable_xinerama = xyes; then 79 | AC_CHECK_LIB([Xinerama], [XineramaQueryScreens], 80 | [AC_DEFINE(USE_XINERAMA, 1, [Define to enable Xinerama]) 81 | NITROGEN_LIBS="$NITROGEN_LIBS -lXinerama"], 82 | [enable_xinerama=no]) 83 | fi 84 | 85 | AC_SUBST([NITROGEN_LIBS]) 86 | AC_SUBST([NITROGEN_CFLAGS]) 87 | 88 | AC_CONFIG_FILES([Makefile 89 | po/Makefile.in 90 | data/Makefile 91 | data/nitrogen.desktop 92 | data/icons/Makefile 93 | src/Makefile]) 94 | AC_OUTPUT 95 | 96 | # syscrash says don't test for inotify support in kernel for some reason 97 | echo "" 98 | echo "##########################################" 99 | echo "" 100 | echo "Options:" 101 | echo "" 102 | 103 | if test x$enable_inotify = xyes; then 104 | echo "inotify support ............. enabled" 105 | else 106 | echo "inotify support ............. disabled" 107 | fi 108 | 109 | if test x$enable_xinerama = xyes; then 110 | echo "xinerama support ............ enabled" 111 | else 112 | echo "xinerama support ............ disabled" 113 | fi 114 | 115 | echo "" 116 | echo "##########################################" 117 | echo "" 118 | echo "You are now ready to compile nitrogen" 119 | echo "Type \"make\" to compile nitrogen" 120 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = icons 2 | 3 | appdatadir = $(datarootdir)/appdata 4 | desktopdir = $(datadir)/applications 5 | desktop_DATA = nitrogen.desktop 6 | appdata_DATA = nitrogen.appdata.xml 7 | 8 | UPDATE_DESKTOP = update-desktop-database $(datadir)/applications || : 9 | 10 | install-data-hook: 11 | $(UPDATE_DESKTOP) 12 | uninstall-hook: 13 | $(UPDATE_DESKTOP) 14 | 15 | EXTRA_DIST = icon-theme-installer nitrogen.appdata.xml 16 | 17 | -------------------------------------------------------------------------------- /data/icon-theme-installer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # icon-theme-installer 4 | # Copyright (C) 2006 Novell, Inc. 5 | # Written by Aaron Bockover 6 | # Licensed under the MIT/X11 license 7 | # 8 | # This script is meant to be invoked from within a Makefile/Makefile.am 9 | # in the install-data-local and uninstall-data sections. It handles the 10 | # task of properly installing icons into the icon theme. It requires a 11 | # few arguments to set up its environment, and a list of files to be 12 | # installed. The format of the file list is critical: 13 | # 14 | # , 15 | # 16 | # apps,music-player-banshee.svg 17 | # apps,music-player-banshee-16.png 18 | # apps,music-player-banshee-22.png 19 | # 20 | # is the icon theme category, for instance, apps, devices, 21 | # actions, emblems... 22 | # 23 | # must have a basename in the form of: 24 | # 25 | # proper-theme-name[-]. 26 | # 27 | # Where should be either nothing, which will default to scalable 28 | # or \-[0-9]{2}, which will expand to x. For example: 29 | # 30 | # music-player-banshee-16.png 31 | # 32 | # The here is -16 and will expand to 16x16 per the icon theme spec 33 | # 34 | # What follows is an example Makefile.am for icon theme installation: 35 | # 36 | # --------------- 37 | # theme=hicolor 38 | # themedir=$(datadir)/icons/$(theme) 39 | # theme_icons = \ 40 | # apps,music-player-banshee.svg \ 41 | # apps,music-player-banshee-16.png \ 42 | # apps,music-player-banshee-22.png \ 43 | # apps,music-player-banshee-24.png \ 44 | # apps,music-player-banshee-32.png 45 | # 46 | # install_icon_exec = $(top_srcdir)/build/icon-theme-installer -t $(theme) -s $(srcdir) -d "x$(DESTDIR)" -b $(themedir) -m "$(mkinstalldirs)" -x "$(INSTALL_DATA)" 47 | # install-data-local: 48 | # $(install_icon_exec) -i $(theme_icons) 49 | # 50 | # uninstall-hook: 51 | # $(install_icon_exec) -u $(theme_icons) 52 | # 53 | # MAINTAINERCLEANFILES = Makefile.in 54 | # EXTRA_DIST = $(wildcard *.svg *.png) 55 | # --------------- 56 | # 57 | # Arguments to this program: 58 | # 59 | # -i : Install 60 | # -u : Uninstall 61 | # -t : Theme name (hicolor) 62 | # -b : Theme installation dest directory [x$(DESTDIR)] - Always prefix 63 | # this argument with x; it will be stripped but will act as a 64 | # placeholder for zero $DESTDIRs (only set by packagers) 65 | # -d : Theme installation directory [$(hicolordir)] 66 | # -s : Source directory [$(srcdir)] 67 | # -m : Command to exec for directory creation [$(mkinstalldirs)] 68 | # -x : Command to exec for single file installation [$(INSTALL_DATA)] 69 | # : All remainging should be category,filename pairs 70 | 71 | while getopts "iut:b:d:s:m:x:" flag; do 72 | case "$flag" in 73 | i) INSTALL=yes ;; 74 | u) UNINSTALL=yes ;; 75 | t) THEME_NAME=$OPTARG ;; 76 | d) INSTALL_DEST_DIR=${OPTARG##x} ;; 77 | b) INSTALL_BASE_DIR=$OPTARG ;; 78 | s) SRC_DIR=$OPTARG ;; 79 | m) MKINSTALLDIRS_EXEC=$OPTARG ;; 80 | x) INSTALL_DATA_EXEC=$OPTARG ;; 81 | esac 82 | done 83 | 84 | shift $(($OPTIND - 1)) 85 | 86 | if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then 87 | echo "Cannot pass both -i and -u" 88 | exit 1 89 | elif test "x$INSTALL" = "x" -a "x$UNINSTALL" = "x"; then 90 | echo "Must path either -i or -u" 91 | exit 1 92 | fi 93 | 94 | if test -z "$THEME_NAME"; then 95 | echo "Theme name required (-t hicolor)" 96 | exit 1 97 | fi 98 | 99 | if test -z "$INSTALL_BASE_DIR"; then 100 | echo "Base theme directory required [-d \$(hicolordir)]" 101 | exit 1 102 | fi 103 | 104 | if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then 105 | echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)" 106 | exit 1 107 | fi 108 | 109 | if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then 110 | echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)" 111 | exit 1 112 | fi 113 | 114 | if test -z "$SRC_DIR"; then 115 | SRC_DIR=. 116 | fi 117 | 118 | for icon in $@; do 119 | size=$(echo $icon | sed s/[^0-9]*//g) 120 | category=$(echo $icon | cut -d, -f1) 121 | build_name=$(echo $icon | cut -d, -f2) 122 | install_name=$(echo $build_name | sed "s/[0-9]//g; s/-\././") 123 | install_name=$(basename $install_name) 124 | 125 | if test -z $size; then 126 | size=scalable; 127 | else 128 | size=${size}x${size}; 129 | fi 130 | 131 | install_dir=${INSTALL_DEST_DIR}${INSTALL_BASE_DIR}/$size/$category 132 | install_path=$install_dir/$install_name 133 | 134 | if test "x$INSTALL" = "xyes"; then 135 | echo "Installing $size $install_name into $THEME_NAME icon theme" 136 | 137 | $($MKINSTALLDIRS_EXEC $install_dir) || { 138 | echo "Failed to create directory $install_dir" 139 | exit 1 140 | } 141 | 142 | $($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || { 143 | echo "Failed to install $SRC_DIR/$build_name into $install_path" 144 | exit 1 145 | } 146 | 147 | if test ! -e $install_path; then 148 | echo "Failed to install $SRC_DIR/$build_name into $install_path" 149 | exit 1 150 | fi 151 | else 152 | if test -e $install_path; then 153 | echo "Removing $size $install_name from $THEME_NAME icon theme" 154 | 155 | rm $install_path || { 156 | echo "Failed to remove $install_path" 157 | exit 1 158 | } 159 | fi 160 | fi 161 | done 162 | 163 | if test "x$INSTALL" = "xyes"; then 164 | gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)" 165 | gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR" 166 | 167 | if test -z "$INSTALL_DEST_DIR"; then 168 | if test -x $gtk_update_icon_cache_bin; then 169 | echo "Updating GTK icon cache" 170 | $gtk_update_icon_cache 171 | else 172 | echo "*** Icon cache not updated. Could not execute $gtk_update_icon_cache_bin" 173 | fi 174 | else 175 | echo "*** Icon cache not updated. After install, run this:" 176 | echo "*** $gtk_update_icon_cache" 177 | fi 178 | fi 179 | 180 | -------------------------------------------------------------------------------- /data/icons/Makefile.am: -------------------------------------------------------------------------------- 1 | theme=hicolor 2 | themedir=$(datadir)/icons/$(theme) 3 | theme_icons = \ 4 | apps,nitrogen-128.png \ 5 | apps,nitrogen-16.png \ 6 | apps,nitrogen-22.png \ 7 | apps,nitrogen-32.png \ 8 | apps,nitrogen-48.png \ 9 | devices,video-display-16.png \ 10 | actions,wallpaper-zoomed-16.png \ 11 | actions,wallpaper-centered-16.png \ 12 | actions,wallpaper-scaled-16.png \ 13 | actions,wallpaper-tiled-16.png \ 14 | mimetypes,image-x-generic-16.png 15 | 16 | install_icon_exec = $(top_srcdir)/data/icon-theme-installer \ 17 | -t "$(theme)" \ 18 | -s "$(srcdir)" \ 19 | -d "x$(DESTDIR)" \ 20 | -b "$(themedir)" \ 21 | -m "$(mkinstalldirs)" \ 22 | -x "$(INSTALL_DATA)" 23 | 24 | install-data-local: 25 | $(install_icon_exec) -i $(theme_icons) 26 | 27 | uninstall-hook: 28 | $(install_icon_exec) -u $(theme_icons) 29 | 30 | MAINTAINERCLEANFILES = Makefile.in 31 | EXTRA_DIST = video-display-16.png wallpaper-zoomed-16.png wallpaper-centered-16.png wallpaper-tiled-16.png nitrogen-22.png nitrogen-32.png nitrogen-48.png wallpaper-scaled-16.png nitrogen-128.png nitrogen-16.png image-x-generic-16.png 32 | 33 | -------------------------------------------------------------------------------- /data/icons/image-x-generic-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/image-x-generic-16.png -------------------------------------------------------------------------------- /data/icons/nitrogen-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/nitrogen-128.png -------------------------------------------------------------------------------- /data/icons/nitrogen-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/nitrogen-16.png -------------------------------------------------------------------------------- /data/icons/nitrogen-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/nitrogen-22.png -------------------------------------------------------------------------------- /data/icons/nitrogen-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/nitrogen-32.png -------------------------------------------------------------------------------- /data/icons/nitrogen-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/nitrogen-48.png -------------------------------------------------------------------------------- /data/icons/video-display-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/video-display-16.png -------------------------------------------------------------------------------- /data/icons/wallpaper-centered-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/wallpaper-centered-16.png -------------------------------------------------------------------------------- /data/icons/wallpaper-scaled-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/wallpaper-scaled-16.png -------------------------------------------------------------------------------- /data/icons/wallpaper-tiled-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/wallpaper-tiled-16.png -------------------------------------------------------------------------------- /data/icons/wallpaper-zoomed-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l3ib/nitrogen/5fe0018ddc6abccd119215d4222941940ada53a6/data/icons/wallpaper-zoomed-16.png -------------------------------------------------------------------------------- /data/nitrogen.appdata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | nitrogen.desktop 5 | CC0-1.0 6 | GPL-2.0+ and Zlib and CC-BY-SA-3.0 7 | 8 | Nitrogen 9 | Background browser and setter for X windows 10 | 11 | 12 |

13 | Nitrogen is a program that allows you to set the desktop background. Its 14 | browser mode allows you to choose and apply a desktop background, and the 15 | recall mode lets you apply the saved configuration from the command line. 16 |

17 |

18 | It features Multihead and Xinerama awareness, inotify monitoring of browse 19 | directory, lazy loading of thumbnails to conserve memory, and an 20 | 'automatic' set mode which determines the best mode to set an image based 21 | on its size. 22 |

23 |
24 | 25 | 26 | http://projects.l3ib.org/nitrogen/images/nitrogen-shot1.png 27 | http://projects.l3ib.org/nitrogen/images/nitrogen-ss-2.png 28 | 29 | 30 | http://projects.l3ib.org/nitrogen/ 31 | jwrigley7@gmail.com 32 |
33 | -------------------------------------------------------------------------------- /data/nitrogen.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Exec=@PACKAGE@ 4 | Name=@PACKAGE_NAME@ 5 | GenericName=Wallpaper Setter 6 | GenericName[ru]=Установщик фонов 7 | Categories=Utility;GTK;DesktopSettings; 8 | Icon=@PACKAGE@ 9 | Comment=Browse and set desktop backgrounds 10 | Comment[bs]=Pregledaj i postavi pozadinske slike 11 | Comment[hr]=Pregledaj i postavi pozadinske slike 12 | Comment[sr]=Прегледај и постави позадинске слике 13 | Comment[ru]=Просмотр и выбор фонов рабочих столов 14 | Keywords=background;desktop; 15 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | 2017-02-11 gettextize 2 | 3 | * Makefile.in.in: Upgrade to gettext-0.19.7. 4 | * Rules-quot: Upgrade to gettext-0.19.7. 5 | 6 | 2013-12-19 gettextize 7 | 8 | * Makefile.in.in: New file, from gettext-0.18.3. 9 | * Rules-quot: Upgrade to gettext-0.18.3. 10 | 11 | 2007-05-25 gettextize 12 | 13 | * Makefile.in.in: New file, from gettext-0.16.1. 14 | * Rules-quot: New file, from gettext-0.16.1. 15 | * boldquot.sed: New file, from gettext-0.16.1. 16 | * en@boldquot.header: New file, from gettext-0.16.1. 17 | * en@quot.header: New file, from gettext-0.16.1. 18 | * insert-header.sin: New file, from gettext-0.16.1. 19 | * quot.sed: New file, from gettext-0.16.1. 20 | * remove-potcdate.sin: New file, from gettext-0.16.1. 21 | * POTFILES.in: New file. 22 | 23 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Set of available languages 2 | bs fi hr pl ru sr tr 3 | 4 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ 12 | 13 | # This is the copyright holder that gets inserted into the header of the 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 15 | # package. (Note that the msgstr strings, extracted from the package's 16 | # sources, belong to the copyright holder of the package.) Translators are 17 | # expected to transfer the copyright for their translations to this person 18 | # or entity, or to disclaim their copyright. The empty string stands for 19 | # the public domain; in this case the translators are expected to disclaim 20 | # their copyright. 21 | COPYRIGHT_HOLDER = l3ib.org 22 | 23 | # This tells whether or not to prepend "GNU " prefix to the package 24 | # name that gets inserted into the header of the $(DOMAIN).pot file. 25 | # Possible values are "yes", "no", or empty. If it is empty, try to 26 | # detect it automatically by scanning the files in $(top_srcdir) for 27 | # "GNU packagename" string. 28 | PACKAGE_GNU = 29 | 30 | # This is the email address or URL to which the translators shall report 31 | # bugs in the untranslated strings: 32 | # - Strings which are not entire sentences, see the maintainer guidelines 33 | # in the GNU gettext documentation, section 'Preparing Strings'. 34 | # - Strings which use unclear terms or require additional context to be 35 | # understood. 36 | # - Strings which make invalid assumptions about notation of date, time or 37 | # money. 38 | # - Pluralisation problems. 39 | # - Incorrect English spelling. 40 | # - Incorrect formatting. 41 | # It can be your email address, or a mailing list address where translators 42 | # can write to without being subscribed, or the URL of a web page through 43 | # which the translators can contact you. 44 | MSGID_BUGS_ADDRESS = daf@minuslab.net 45 | 46 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 47 | # message catalogs shall be used. It is usually empty. 48 | EXTRA_LOCALE_CATEGORIES = 49 | 50 | # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' 51 | # context. Possible values are "yes" and "no". Set this to yes if the 52 | # package uses functions taking also a message context, like pgettext(), or 53 | # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. 54 | USE_MSGCTXT = no 55 | 56 | # These options get passed to msgmerge. 57 | # Useful options are in particular: 58 | # --previous to keep previous msgids of translated messages, 59 | # --quiet to reduce the verbosity. 60 | MSGMERGE_OPTIONS = 61 | 62 | # These options get passed to msginit. 63 | # If you want to disable line wrapping when writing PO files, add 64 | # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and 65 | # MSGINIT_OPTIONS. 66 | MSGINIT_OPTIONS = 67 | 68 | # This tells whether or not to regenerate a PO file when $(DOMAIN).pot 69 | # has changed. Possible values are "yes" and "no". Set this to no if 70 | # the POT file is checked in the repository and the version control 71 | # program ignores timestamps. 72 | PO_DEPENDS_ON_POT = yes 73 | 74 | # This tells whether or not to forcibly update $(DOMAIN).pot and 75 | # regenerate PO files on "make dist". Possible values are "yes" and 76 | # "no". Set this to no if the POT file and PO files are maintained 77 | # externally. 78 | DIST_DEPENDS_ON_UPDATE_PO = yes 79 | -------------------------------------------------------------------------------- /po/POTFILES: -------------------------------------------------------------------------------- 1 | ../src/ArgParser.cc \ 2 | ../src/Config.cc \ 3 | ../src/ImageCombo.cc \ 4 | ../src/Inotify.cc \ 5 | ../src/NWindow.cc \ 6 | ../src/SetBG.cc \ 7 | ../src/Thumbview.cc \ 8 | ../src/Util.cc \ 9 | ../src/main.cc 10 | ../src/NPrefsWindow.cc 11 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files which contain translatable strings. 2 | src/ArgParser.cc 3 | src/Config.cc 4 | src/ImageCombo.cc 5 | src/Inotify.cc 6 | src/NWindow.cc 7 | src/SetBG.cc 8 | src/Thumbview.cc 9 | src/Util.cc 10 | src/main.cc 11 | src/NPrefsWindow.cc 12 | -------------------------------------------------------------------------------- /po/bs.po: -------------------------------------------------------------------------------- 1 | # Bosnian translations for Nitrogen. 2 | # Copyright (C) 2016 l3ib.org 3 | # This file is distributed under the same license as the Nitrogen package. 4 | # Dino Duratović , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 1.5.2\n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2017-02-11 13:29-0500\n" 11 | "PO-Revision-Date: 2016-03-17 07:58+0100\n" 12 | "Last-Translator: Dino Duratović \n" 13 | "Language-Team: \n" 14 | "Language: bs\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 20 | 21 | #: src/ArgParser.cc:75 22 | msgid "Unexpected argument " 23 | msgstr "Neočekivani argument" 24 | 25 | #: src/ArgParser.cc:84 26 | msgid " expects an argument." 27 | msgstr " očekuje argument." 28 | 29 | #: src/ArgParser.cc:87 30 | msgid " does not expect an argument." 31 | msgstr " ne očekuje argument." 32 | 33 | #: src/ArgParser.cc:93 34 | msgid " conflicts with another argument." 35 | msgstr " je u sukobu sa drugim argumentom." 36 | 37 | #: src/ArgParser.cc:105 38 | msgid "Usage:" 39 | msgstr "Upotreba:" 40 | 41 | #: src/Config.cc:128 src/Config.cc:217 42 | msgid "ERROR: Unable to load config file" 43 | msgstr "GREŠKA: Nemoguće učitati konfiguracioni fajl" 44 | 45 | #: src/Config.cc:139 46 | msgid "Couldn't find group for" 47 | msgstr "Nije moguće pronaći grupu za" 48 | 49 | #: src/Config.cc:151 50 | msgid "Could not get filename from config file." 51 | msgstr "Nije moguće dobiti ime fajla iz konfiguracionog fajla." 52 | 53 | #: src/Config.cc:160 54 | msgid "Could not get mode from config file." 55 | msgstr "Nije moguće dobiti način iz konfiguracionog fajla." 56 | 57 | #: src/Config.cc:219 58 | msgid "The error code returned was" 59 | msgstr "Kod greške je" 60 | 61 | #: src/Config.cc:220 62 | msgid "We expected" 63 | msgstr "Očekivali smo" 64 | 65 | #: src/Config.cc:220 66 | msgid "or" 67 | msgstr "ili" 68 | 69 | #: src/NWindow.cc:253 70 | #, fuzzy 71 | msgid "You previewed an image without applying it, apply?" 72 | msgstr "Pregledali ste sliku bez prihvatanja, ipak napustiti?" 73 | 74 | #: src/NWindow.cc:329 75 | msgid "Automatic" 76 | msgstr "Automatski" 77 | 78 | #: src/NWindow.cc:336 79 | msgid "Scaled" 80 | msgstr "Srazmjerno" 81 | 82 | #: src/NWindow.cc:344 83 | msgid "Centered" 84 | msgstr "Centrirano" 85 | 86 | #: src/NWindow.cc:352 87 | msgid "Tiled" 88 | msgstr "Popločano" 89 | 90 | #: src/NWindow.cc:361 91 | msgid "Zoomed" 92 | msgstr "Uvećano" 93 | 94 | #: src/NWindow.cc:362 95 | msgid "Zoomed Fill" 96 | msgstr "Uvećano popunjenje" 97 | 98 | #: src/SetBG.cc:516 src/SetBG.cc:544 99 | msgid "Scale" 100 | msgstr "Skaliraj" 101 | 102 | #: src/SetBG.cc:519 src/SetBG.cc:546 103 | msgid "Center" 104 | msgstr "Centar" 105 | 106 | #: src/SetBG.cc:522 src/SetBG.cc:548 107 | msgid "Tile" 108 | msgstr "Popločaj" 109 | 110 | #: src/SetBG.cc:525 src/SetBG.cc:550 111 | msgid "Zoom" 112 | msgstr "Uvećaj" 113 | 114 | #: src/SetBG.cc:528 src/SetBG.cc:552 115 | msgid "ZoomFill" 116 | msgstr "Uvećaj i popuni" 117 | 118 | #: src/SetBG.cc:531 src/SetBG.cc:554 119 | msgid "Auto" 120 | msgstr "Automatski" 121 | 122 | #: src/SetBG.cc:622 123 | msgid "Could not get bg groups from config file." 124 | msgstr "Nemoguće dobiti pozadinske grupe iz konfiguracionog fajla." 125 | 126 | #: src/SetBG.cc:646 src/SetBG.cc:653 127 | msgid "ERROR" 128 | msgstr "GREŠKA" 129 | 130 | #: src/SetBG.cc:665 src/SetBG.cc:1040 131 | msgid "Could not open display" 132 | msgstr "Ne mogu otvoriti displej" 133 | 134 | # Provjeriti da li slijedi nešto poslije 135 | #: src/SetBG.cc:726 136 | msgid "ERROR: Could not load file in bg set" 137 | msgstr "GREŠKA: Ne mogu učitati pozadinski fajl" 138 | 139 | #: src/SetBG.cc:804 140 | msgid "Unknown mode for saved bg" 141 | msgstr "Nepoznat način za sačuvanu pozadinu" 142 | 143 | #: src/SetBG.cc:918 144 | msgid "ERROR: BG set could not make atoms." 145 | msgstr "GREŠKA: postavljena pozadina ne može napraviti atome." 146 | 147 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 148 | msgid "Screen" 149 | msgstr "Ekran" 150 | 151 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 152 | msgid "Full Screen" 153 | msgstr "Preko cijelog ekrana" 154 | 155 | #: src/SetBG.cc:1179 156 | msgid "Could not find Xinerama screen number" 157 | msgstr "Nije moguće pronaći broj Xinerama ekrana" 158 | 159 | #: src/Util.cc:95 160 | msgid "Restore saved backgrounds" 161 | msgstr "Povrati sačuvane pozadine" 162 | 163 | #: src/Util.cc:96 164 | msgid "Do not recurse into subdirectories" 165 | msgstr "Ne zalazi u poddirektorije" 166 | 167 | #: src/Util.cc:97 168 | msgid "" 169 | "How to sort the backgrounds. Valid options are:\n" 170 | "\t\t\t* alpha, for alphanumeric sort\n" 171 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 172 | "\t\t\t* time, for last modified time sort (oldest first)\n" 173 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 174 | msgstr "" 175 | "Kako sortirati pozadine. Važeće opcije su:\n" 176 | "\t\t\t* alpha, prema abecedi\n" 177 | "\t\t\t* ralpha, prema obrnutom redoslijedu abecede\n" 178 | "\t\t\t* time, prema posljednjem datumu izmjene (najstariji prvo)\n" 179 | "\t\t\t* rtime, prema obrnutom posljednjem datumu izmjene (najnoviji prvo)" 180 | 181 | #: src/Util.cc:98 182 | msgid "background color in hex, #000000 by default" 183 | msgstr "pozadinska boja u hexu, #000000 podrazumijevano" 184 | 185 | #: src/Util.cc:99 186 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 187 | msgstr "" 188 | 189 | #: src/Util.cc:100 190 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 191 | msgstr "" 192 | 193 | #: src/Util.cc:101 194 | msgid "Choose random background from config or given directory" 195 | msgstr "" 196 | 197 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 198 | #: src/Util.cc:110 src/Util.cc:111 199 | msgid "Sets the background to the given file" 200 | msgstr "Postavlja pozadinu na zadati fajl" 201 | 202 | #: src/Util.cc:106 203 | msgid "scaled" 204 | msgstr "skalirano" 205 | 206 | #: src/Util.cc:107 207 | msgid "tiled" 208 | msgstr "popločano" 209 | 210 | #: src/Util.cc:108 211 | msgid "auto" 212 | msgstr "automatski" 213 | 214 | #: src/Util.cc:109 215 | msgid "centered" 216 | msgstr "centrirano" 217 | 218 | #: src/Util.cc:110 219 | msgid "zoom" 220 | msgstr "uvećano" 221 | 222 | #: src/Util.cc:111 223 | msgid "zoom-fill" 224 | msgstr "uvećano-popunjeno" 225 | 226 | #: src/Util.cc:112 227 | msgid "Saves the background permanently" 228 | msgstr "Sačuva pozadinu trajno" 229 | 230 | #: src/Util.cc:207 231 | msgid "Could not open dir" 232 | msgstr "Ne mogu otvoriti direktorij" 233 | 234 | #: src/Util.cc:292 235 | msgid "Currently set background" 236 | msgstr "Trenutno postavljena pozadina" 237 | 238 | #: src/Util.cc:295 239 | msgid "for" 240 | msgstr "za" 241 | 242 | #: src/main.cc:133 243 | msgid "Error parsing command line" 244 | msgstr "Greška pri rasčlanjivanju komandne linije" 245 | 246 | #~ msgid "Could not open config directory." 247 | #~ msgstr "Nije moguće otvoriti konfiguracioni direktorij." 248 | 249 | #~ msgid "Default" 250 | #~ msgstr "Podrazumijevani" 251 | 252 | # Provjeriti da li slijedi nešto poslije 253 | #~ msgid "Unknown mode for saved bg on" 254 | #~ msgstr "Nepoznat način za sačuvanu pozadinu" 255 | 256 | #~ msgid "" 257 | #~ "UNKNOWN ROOT WINDOW TYPE DETECTED, will attempt to set via normal X " 258 | #~ "procedure" 259 | #~ msgstr "" 260 | #~ "NEPOZAT TIP ROOT PROZORA PRONAĐEN, pokušaću postaviti preko normalne X " 261 | #~ "procedure" 262 | 263 | #~ msgid "Invalid UTF-8 encountered. Skipping file" 264 | #~ msgstr "Naišao na nevažeći UTF-8. Preskačem fajl" 265 | 266 | #~ msgid "Could not get bg info for fullscreen xinerama" 267 | #~ msgstr "" 268 | #~ "Nemoguće dobiti pozadinsku informaciju za Xineramu preko cijelog ekrana" 269 | 270 | #~ msgid "Could not get bg info for" 271 | #~ msgstr "Nemoguće dobiti pozadinsku informaciju za" 272 | 273 | #~ msgid "Could not get bg info" 274 | #~ msgstr "Nemoguće dobiti pozadinsku informaciju" 275 | -------------------------------------------------------------------------------- /po/de.po: -------------------------------------------------------------------------------- 1 | # German translations for nitrogen 2 | # Copyright (C) 2013 l3ib.org 3 | # This file is distributed under the same license as the nitrogen 4 | # Max Vorob'jov , 2013 5 | # Vinzenz Vietzke , 2018 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2017-02-11 13:29-0500\n" 11 | "PO-Revision-Date: 2018-04-10 14:20+0200\n" 12 | "Last-Translator: Vinzenz Vietzke \n" 13 | "Language-Team: German\n" 14 | "Language: de\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | "X-Generator: Poedit 1.8.7.1\n" 20 | 21 | #: src/ArgParser.cc:75 22 | msgid "Unexpected argument " 23 | msgstr "Unerwartetes Argument" 24 | 25 | #: src/ArgParser.cc:84 26 | msgid " expects an argument." 27 | msgstr " erwartet ein Argument." 28 | 29 | #: src/ArgParser.cc:87 30 | msgid " does not expect an argument." 31 | msgstr " erwartet kein Argument." 32 | 33 | #: src/ArgParser.cc:93 34 | msgid " conflicts with another argument." 35 | msgstr " steht in Konflikt mit einem weiteren Argument." 36 | 37 | #: src/ArgParser.cc:105 38 | msgid "Usage:" 39 | msgstr "Verwendung:" 40 | 41 | #: src/Config.cc:128 src/Config.cc:217 42 | msgid "ERROR: Unable to load config file" 43 | msgstr "FEHLER: Kann Konfigurationsdatei nicht laden" 44 | 45 | #: src/Config.cc:139 46 | msgid "Couldn't find group for" 47 | msgstr "Konnte keine Gruppe finden für" 48 | 49 | #: src/Config.cc:151 50 | msgid "Could not get filename from config file." 51 | msgstr "Konnte keinen Dateinamen aus der Konfigurationsdatei lesen." 52 | 53 | #: src/Config.cc:160 54 | msgid "Could not get mode from config file." 55 | msgstr "Konnte keinen Modus aus der Konfigurationsdatei lesen." 56 | 57 | #: src/Config.cc:219 58 | msgid "The error code returned was" 59 | msgstr "Der zurückgemeldete Fehlercode war" 60 | 61 | #: src/Config.cc:220 62 | msgid "We expected" 63 | msgstr "Wir erwarteten" 64 | 65 | #: src/Config.cc:220 66 | msgid "or" 67 | msgstr "oder" 68 | 69 | #: src/NWindow.cc:253 70 | msgid "You previewed an image without applying it, apply?" 71 | msgstr "Sie haben eine Bild in der Vorschau angezeigt ohne es anzuwenden, jetzt anwenden?" 72 | 73 | #: src/NWindow.cc:329 74 | msgid "Automatic" 75 | msgstr "Automatisch" 76 | 77 | #: src/NWindow.cc:336 78 | msgid "Scaled" 79 | msgstr "Skaliert" 80 | 81 | #: src/NWindow.cc:344 82 | msgid "Centered" 83 | msgstr "Zentriert" 84 | 85 | #: src/NWindow.cc:352 86 | msgid "Tiled" 87 | msgstr "Gekachelt" 88 | 89 | #: src/NWindow.cc:361 90 | msgid "Zoomed" 91 | msgstr "Gezoomt" 92 | 93 | #: src/NWindow.cc:362 94 | msgid "Zoomed Fill" 95 | msgstr "Gezoomt und gefüllt" 96 | 97 | #: src/SetBG.cc:516 src/SetBG.cc:544 98 | msgid "Scale" 99 | msgstr "Skalieren" 100 | 101 | #: src/SetBG.cc:519 src/SetBG.cc:546 102 | msgid "Center" 103 | msgstr "Zentrieren" 104 | 105 | #: src/SetBG.cc:522 src/SetBG.cc:548 106 | msgid "Tile" 107 | msgstr "Kacheln" 108 | 109 | #: src/SetBG.cc:525 src/SetBG.cc:550 110 | msgid "Zoom" 111 | msgstr "Zoomen" 112 | 113 | #: src/SetBG.cc:528 src/SetBG.cc:552 114 | msgid "ZoomFill" 115 | msgstr "Zoomen und Füllen" 116 | 117 | #: src/SetBG.cc:531 src/SetBG.cc:554 118 | msgid "Auto" 119 | msgstr "Automatisch" 120 | 121 | #: src/SetBG.cc:622 122 | msgid "Could not get bg groups from config file." 123 | msgstr "Konnte bg-Gruppen nicht aus der Konfigurationsdatei lesen." 124 | 125 | #: src/SetBG.cc:646 src/SetBG.cc:653 126 | msgid "ERROR" 127 | msgstr "FEHLER" 128 | 129 | #: src/SetBG.cc:665 src/SetBG.cc:1040 130 | msgid "Could not open display" 131 | msgstr "Konnte Anzeige nicht öffnen" 132 | 133 | #: src/SetBG.cc:726 134 | msgid "ERROR: Could not load file in bg set" 135 | msgstr "FEHLER: Konnte keine Datei im bg-Set laden" 136 | 137 | #: src/SetBG.cc:804 138 | msgid "Unknown mode for saved bg" 139 | msgstr "Unbekannter Modus für gespeicherten bg" 140 | 141 | #: src/SetBG.cc:918 142 | #, fuzzy 143 | msgid "ERROR: BG set could not make atoms." 144 | msgstr "FEHLER: BG-Set konnte keine Atome erstellen." 145 | 146 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 147 | msgid "Screen" 148 | msgstr "Bildschirm" 149 | 150 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 151 | msgid "Full Screen" 152 | msgstr "Vollbild" 153 | 154 | #: src/SetBG.cc:1179 155 | msgid "Could not find Xinerama screen number" 156 | msgstr "Konnte Xinerama-Bildschirmnummer nicht finden" 157 | 158 | #: src/Util.cc:95 159 | msgid "Restore saved backgrounds" 160 | msgstr "Gespeicherte Hintergründe wiederhergestellt" 161 | 162 | #: src/Util.cc:96 163 | msgid "Do not recurse into subdirectories" 164 | msgstr "Nicht auf Unterverzeichnisse zurückgreifen" 165 | 166 | #: src/Util.cc:97 167 | msgid "" 168 | "How to sort the backgrounds. Valid options are:\n" 169 | "\t\t\t* alpha, for alphanumeric sort\n" 170 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 171 | "\t\t\t* time, for last modified time sort (oldest first)\n" 172 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 173 | msgstr "" 174 | "Wie Hintergründe sortiert werden. Gültige Optionen sind:\n" 175 | "\t\t\t* alpha, für alphanumerische Sortierung\n" 176 | "\t\t\t* ralpha, für umgekehrte alphanumerische Sortierung\n" 177 | "\t\t\t* Zeit, für Sortierung nach zuletzt geänderter Zeit (älteste zuerst)\n" 178 | "\t\t\t* rtime, für umgekehrte Sortierung nach zuletzt geänderter Zeit (neueste zuerst)" 179 | 180 | #: src/Util.cc:98 181 | msgid "background color in hex, #000000 by default" 182 | msgstr "Hintergrundfarbe als Hex, standardmäßig #000000" 183 | 184 | #: src/Util.cc:99 185 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 186 | msgstr "Gewähltes xinerama/multihead-Display in der GUI, 0..n, -1 für Vollbild" 187 | 188 | #: src/Util.cc:100 189 | #, fuzzy 190 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 191 | msgstr "Setzer-Engine erzwingen: xwindows, xinerama, gnome, pcmanfm" 192 | 193 | #: src/Util.cc:101 194 | msgid "Choose random background from config or given directory" 195 | msgstr "Einen zufälligen Hintergrund aus der Konfiguration oder dem angegebenen Verzeichnis wählen" 196 | 197 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 198 | #: src/Util.cc:110 src/Util.cc:111 199 | msgid "Sets the background to the given file" 200 | msgstr "Legt den Hintergrund auf die angegebene Datei fest" 201 | 202 | #: src/Util.cc:106 203 | msgid "scaled" 204 | msgstr "skaliert" 205 | 206 | #: src/Util.cc:107 207 | msgid "tiled" 208 | msgstr "gekachelt" 209 | 210 | #: src/Util.cc:108 211 | msgid "auto" 212 | msgstr "automatisch" 213 | 214 | #: src/Util.cc:109 215 | msgid "centered" 216 | msgstr "zentriert" 217 | 218 | #: src/Util.cc:110 219 | msgid "zoom" 220 | msgstr "gezoomt" 221 | 222 | #: src/Util.cc:111 223 | msgid "zoom-fill" 224 | msgstr "gezoomt und gefüllt" 225 | 226 | #: src/Util.cc:112 227 | msgid "Saves the background permanently" 228 | msgstr "Speichert den Hintergrund dauerhaft" 229 | 230 | #: src/Util.cc:207 231 | msgid "Could not open dir" 232 | msgstr "Konnte Verzeichnis nicht öffnen" 233 | 234 | #: src/Util.cc:292 235 | msgid "Currently set background" 236 | msgstr "Momentan festgelegter Hintergrund" 237 | 238 | #: src/Util.cc:295 239 | msgid "for" 240 | msgstr "für" 241 | 242 | #: src/main.cc:133 243 | msgid "Error parsing command line" 244 | msgstr "Fehler beim Parsen der Kommandozeile" 245 | 246 | msgid "Could not open config directory." 247 | msgstr "Konnte Verzeichnis der Konfiguration nicht öffnen." 248 | 249 | msgid "Default" 250 | msgstr "Standard" 251 | 252 | #, fuzzy 253 | msgid "Unknown mode for saved bg on" 254 | msgstr "Unbekannter Modus für gespeichterten BG bei" 255 | 256 | msgid "UNKNOWN ROOT WINDOW TYPE DETECTED, will attempt to set via normal X procedure" 257 | msgstr "UNBEKANNTER URSPRUNGSFENSTER-TYP ERKANNT, versuche ihn über das normale X-Vorgehen zu setzen" 258 | 259 | msgid "Invalid UTF-8 encountered. Skipping file" 260 | msgstr "Ungültiges UTF-8 erkannt. Überspringe Datei" 261 | 262 | msgid "Could not get bg info for fullscreen xinerama" 263 | msgstr "Konnte keine BG-Info laden für Vollbild xinerama" 264 | 265 | msgid "Could not get bg info for" 266 | msgstr "Konnte keine BG-Info laden für" 267 | 268 | msgid "Could not get bg info" 269 | msgstr "Konnte BG-Info nicht laden" 270 | -------------------------------------------------------------------------------- /po/fi.po: -------------------------------------------------------------------------------- 1 | # Finnish translations for nitrogen package. 2 | # Copyright (C) 2010 l3ib.org 3 | # This file is distributed under the same license as the nitrogen package. 4 | # Siiseli Koulutus , 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: nitrogen 1.5.1\n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2017-02-11 13:29-0500\n" 11 | "PO-Revision-Date: 2010-08-26 09:04+0300\n" 12 | "Last-Translator: Siiseli Koulutus \n" 13 | "Language-Team: Finnish\n" 14 | "Language: fi\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 19 | 20 | #: src/ArgParser.cc:75 21 | msgid "Unexpected argument " 22 | msgstr "Odottamaton argumentti " 23 | 24 | #: src/ArgParser.cc:84 25 | msgid " expects an argument." 26 | msgstr " vaatii argumentin." 27 | 28 | #: src/ArgParser.cc:87 29 | msgid " does not expect an argument." 30 | msgstr " ei odottanut argumenttia." 31 | 32 | #: src/ArgParser.cc:93 33 | msgid " conflicts with another argument." 34 | msgstr " on ristiriidassa toisen argumentin kanssa." 35 | 36 | #: src/ArgParser.cc:105 37 | msgid "Usage:" 38 | msgstr "Käyttö:" 39 | 40 | #: src/Config.cc:128 src/Config.cc:217 41 | msgid "ERROR: Unable to load config file" 42 | msgstr "VIRHE: Ei voitu avata asetustiedostoa." 43 | 44 | #: src/Config.cc:139 45 | msgid "Couldn't find group for" 46 | msgstr "Ei löydetty ryhmää:" 47 | 48 | #: src/Config.cc:151 49 | msgid "Could not get filename from config file." 50 | msgstr "Ei voitu noutaa tiedostonimeä asetustiedostosta." 51 | 52 | #: src/Config.cc:160 53 | msgid "Could not get mode from config file." 54 | msgstr "Ei voitu noutaa tilaa asetustiedostosta." 55 | 56 | #: src/Config.cc:219 57 | msgid "The error code returned was" 58 | msgstr "Palautettu virhekoodi oli" 59 | 60 | #: src/Config.cc:220 61 | msgid "We expected" 62 | msgstr "Odotettiin seuraavaa:" 63 | 64 | #: src/Config.cc:220 65 | msgid "or" 66 | msgstr "tai" 67 | 68 | #: src/NWindow.cc:253 69 | #, fuzzy 70 | msgid "You previewed an image without applying it, apply?" 71 | msgstr "" 72 | "Valitsit kuvan, mutta et asettanut sitä taustakuvaksi. Haluatko silti " 73 | "lopettaa?" 74 | 75 | #: src/NWindow.cc:329 76 | msgid "Automatic" 77 | msgstr "Automaattinen" 78 | 79 | #: src/NWindow.cc:336 80 | msgid "Scaled" 81 | msgstr "Skaalattu" 82 | 83 | #: src/NWindow.cc:344 84 | msgid "Centered" 85 | msgstr "Keskitetty" 86 | 87 | #: src/NWindow.cc:352 88 | msgid "Tiled" 89 | msgstr "Laatoita" 90 | 91 | #: src/NWindow.cc:361 92 | msgid "Zoomed" 93 | msgstr "Lähennys" 94 | 95 | #: src/NWindow.cc:362 96 | msgid "Zoomed Fill" 97 | msgstr "Venytetty" 98 | 99 | #: src/SetBG.cc:516 src/SetBG.cc:544 100 | msgid "Scale" 101 | msgstr "Skaala" 102 | 103 | #: src/SetBG.cc:519 src/SetBG.cc:546 104 | msgid "Center" 105 | msgstr "Keskitetty" 106 | 107 | #: src/SetBG.cc:522 src/SetBG.cc:548 108 | msgid "Tile" 109 | msgstr "Laatta" 110 | 111 | #: src/SetBG.cc:525 src/SetBG.cc:550 112 | msgid "Zoom" 113 | msgstr "Suurennos" 114 | 115 | #: src/SetBG.cc:528 src/SetBG.cc:552 116 | msgid "ZoomFill" 117 | msgstr "Venytys" 118 | 119 | #: src/SetBG.cc:531 src/SetBG.cc:554 120 | msgid "Auto" 121 | msgstr "Automaattinen" 122 | 123 | #: src/SetBG.cc:622 124 | msgid "Could not get bg groups from config file." 125 | msgstr "Ei voitu noutaa taustakuvaryhmiä asetustiedostosta." 126 | 127 | #: src/SetBG.cc:646 src/SetBG.cc:653 128 | msgid "ERROR" 129 | msgstr "VIRHE" 130 | 131 | #: src/SetBG.cc:665 src/SetBG.cc:1040 132 | msgid "Could not open display" 133 | msgstr "Ei voitu avata näyttöä" 134 | 135 | #: src/SetBG.cc:726 136 | msgid "ERROR: Could not load file in bg set" 137 | msgstr "VIRHE: Ei voitu ladata tiedostoa taustakuvajoukosta" 138 | 139 | #: src/SetBG.cc:804 140 | msgid "Unknown mode for saved bg" 141 | msgstr "Tuntematon tila tallennetulle taustakuvalle" 142 | 143 | #: src/SetBG.cc:918 144 | msgid "ERROR: BG set could not make atoms." 145 | msgstr "VIRHE: Taustakuvan asetus ei voinut tehdä atomeita." 146 | 147 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 148 | msgid "Screen" 149 | msgstr "Näyttö" 150 | 151 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 152 | msgid "Full Screen" 153 | msgstr "Koko näyttö" 154 | 155 | #: src/SetBG.cc:1179 156 | msgid "Could not find Xinerama screen number" 157 | msgstr "Ei voitu löytää Xineraman näyttönumeroa" 158 | 159 | #: src/Util.cc:95 160 | msgid "Restore saved backgrounds" 161 | msgstr "Palauta tallennetut taustakuvat" 162 | 163 | #: src/Util.cc:96 164 | msgid "Do not recurse into subdirectories" 165 | msgstr "Älä etsi alikansioista" 166 | 167 | #: src/Util.cc:97 168 | msgid "" 169 | "How to sort the backgrounds. Valid options are:\n" 170 | "\t\t\t* alpha, for alphanumeric sort\n" 171 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 172 | "\t\t\t* time, for last modified time sort (oldest first)\n" 173 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 174 | msgstr "" 175 | "Kuinka taustakuvat lajitellaan. Sopivat valinnat ovat:\n" 176 | "\t\t\t* alpha, lajitellaan kirjainten ja numeroiden perusteella\n" 177 | "\t\t\t* ralpha, lajittelu kirjainten ja numeroiden perusteella käänteisesti\n" 178 | "\t\t\t* time, lajittelu viimeksi muokatun ajan perusteella, (vanhin ensin)\n" 179 | "\t\t\t* rtime, käänteinen lajittelu viimeksi muokatun ajan perusteella, " 180 | "(uusin ensin)" 181 | 182 | #: src/Util.cc:98 183 | msgid "background color in hex, #000000 by default" 184 | msgstr "taustaväri heksadesimaalimuodossa, oletuksena #000000" 185 | 186 | #: src/Util.cc:99 187 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 188 | msgstr "" 189 | 190 | #: src/Util.cc:100 191 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 192 | msgstr "" 193 | 194 | #: src/Util.cc:101 195 | msgid "Choose random background from config or given directory" 196 | msgstr "" 197 | 198 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 199 | #: src/Util.cc:110 src/Util.cc:111 200 | msgid "Sets the background to the given file" 201 | msgstr "Asettaa taustakuvan osoitettuun tiedostoon" 202 | 203 | #: src/Util.cc:106 204 | msgid "scaled" 205 | msgstr "skaalattu" 206 | 207 | #: src/Util.cc:107 208 | msgid "tiled" 209 | msgstr "laatoitettu" 210 | 211 | #: src/Util.cc:108 212 | msgid "auto" 213 | msgstr "automaattinen" 214 | 215 | #: src/Util.cc:109 216 | msgid "centered" 217 | msgstr "keskitetty" 218 | 219 | #: src/Util.cc:110 220 | msgid "zoom" 221 | msgstr "suurennettu" 222 | 223 | #: src/Util.cc:111 224 | msgid "zoom-fill" 225 | msgstr "suurennettu ja täytetty" 226 | 227 | #: src/Util.cc:112 228 | msgid "Saves the background permanently" 229 | msgstr "Tallentaa taustakuvan pysyvästi" 230 | 231 | #: src/Util.cc:207 232 | msgid "Could not open dir" 233 | msgstr "Ei voitu avata hakemistoa" 234 | 235 | #: src/Util.cc:292 236 | msgid "Currently set background" 237 | msgstr "Tämänhetkinen taustakuva" 238 | 239 | #: src/Util.cc:295 240 | msgid "for" 241 | msgstr "kohteelle" 242 | 243 | #: src/main.cc:133 244 | msgid "Error parsing command line" 245 | msgstr "Virhe jäsenneltäessä komentoriviä" 246 | 247 | #~ msgid "Could not open config directory." 248 | #~ msgstr "Ei voitu avata asetushakemistoa." 249 | 250 | #~ msgid "Default" 251 | #~ msgstr "Oletus" 252 | 253 | #~ msgid "Unknown mode for saved bg on" 254 | #~ msgstr "Tuntematon tila tallennetulle taustakuvalle" 255 | 256 | #~ msgid "" 257 | #~ "UNKNOWN ROOT WINDOW TYPE DETECTED, will attempt to set via normal X " 258 | #~ "procedure" 259 | #~ msgstr "" 260 | #~ "TUNTEMATON ROOT-IKKUNA TUNNISTETTU, yritetään asettaa tavanomaisen X-" 261 | #~ "proseduurin kautta" 262 | 263 | #~ msgid "Invalid UTF-8 encountered. Skipping file" 264 | #~ msgstr "Epäkelpo UTF-8 tunnistettu. Ohitetaan tiedosto" 265 | 266 | #~ msgid "Could not get bg info for fullscreen xinerama" 267 | #~ msgstr "Ei voitu noutaa taustakuvan tietoja koko näytön xineramaa varten" 268 | 269 | #~ msgid "Could not get bg info for" 270 | #~ msgstr "Ei voitu noutaa taustakuvan tietoja kohteelle" 271 | 272 | #~ msgid "Could not get bg info" 273 | #~ msgstr "Ei voitu noutaa taustakuvan tietoja" 274 | -------------------------------------------------------------------------------- /po/hr.po: -------------------------------------------------------------------------------- 1 | # Croatian translations for Nitrogen. 2 | # Copyright (C) 2016 l3ib.org 3 | # This file is distributed under the same license as the Nitrogen package. 4 | # Dino Duratović , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 1.5.2\n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2017-02-11 13:29-0500\n" 11 | "PO-Revision-Date: 2016-03-17 07:58+0100\n" 12 | "Last-Translator: Dino Duratović \n" 13 | "Language-Team: \n" 14 | "Language: hr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 20 | 21 | #: src/ArgParser.cc:75 22 | msgid "Unexpected argument " 23 | msgstr "Neočekivani argument" 24 | 25 | #: src/ArgParser.cc:84 26 | msgid " expects an argument." 27 | msgstr " očekuje argument." 28 | 29 | #: src/ArgParser.cc:87 30 | msgid " does not expect an argument." 31 | msgstr " ne očekuje argument." 32 | 33 | #: src/ArgParser.cc:93 34 | msgid " conflicts with another argument." 35 | msgstr " je u sukobu sa drugim argumentom." 36 | 37 | #: src/ArgParser.cc:105 38 | msgid "Usage:" 39 | msgstr "Upotreba:" 40 | 41 | #: src/Config.cc:128 src/Config.cc:217 42 | msgid "ERROR: Unable to load config file" 43 | msgstr "GREŠKA: Nemoguće učitati konfiguracioni fajl" 44 | 45 | #: src/Config.cc:139 46 | msgid "Couldn't find group for" 47 | msgstr "Nije moguće pronaći grupu za" 48 | 49 | #: src/Config.cc:151 50 | msgid "Could not get filename from config file." 51 | msgstr "Nije moguće dobiti ime fajla iz konfiguracionog fajla." 52 | 53 | #: src/Config.cc:160 54 | msgid "Could not get mode from config file." 55 | msgstr "Nije moguće dobiti način iz konfiguracionog fajla." 56 | 57 | #: src/Config.cc:219 58 | msgid "The error code returned was" 59 | msgstr "Kod greške je" 60 | 61 | #: src/Config.cc:220 62 | msgid "We expected" 63 | msgstr "Očekivali smo" 64 | 65 | #: src/Config.cc:220 66 | msgid "or" 67 | msgstr "ili" 68 | 69 | #: src/NWindow.cc:253 70 | #, fuzzy 71 | msgid "You previewed an image without applying it, apply?" 72 | msgstr "Pregledali ste sliku bez prihvatanja, ipak napustiti?" 73 | 74 | #: src/NWindow.cc:329 75 | msgid "Automatic" 76 | msgstr "Automatski" 77 | 78 | #: src/NWindow.cc:336 79 | msgid "Scaled" 80 | msgstr "Srazmjerno" 81 | 82 | #: src/NWindow.cc:344 83 | msgid "Centered" 84 | msgstr "Centrirano" 85 | 86 | #: src/NWindow.cc:352 87 | msgid "Tiled" 88 | msgstr "Popločano" 89 | 90 | #: src/NWindow.cc:361 91 | msgid "Zoomed" 92 | msgstr "Uvećano" 93 | 94 | #: src/NWindow.cc:362 95 | msgid "Zoomed Fill" 96 | msgstr "Uvećano popunjenje" 97 | 98 | #: src/SetBG.cc:516 src/SetBG.cc:544 99 | msgid "Scale" 100 | msgstr "Skaliraj" 101 | 102 | #: src/SetBG.cc:519 src/SetBG.cc:546 103 | msgid "Center" 104 | msgstr "Centar" 105 | 106 | #: src/SetBG.cc:522 src/SetBG.cc:548 107 | msgid "Tile" 108 | msgstr "Popločaj" 109 | 110 | #: src/SetBG.cc:525 src/SetBG.cc:550 111 | msgid "Zoom" 112 | msgstr "Uvećaj" 113 | 114 | #: src/SetBG.cc:528 src/SetBG.cc:552 115 | msgid "ZoomFill" 116 | msgstr "Uvećaj i popuni" 117 | 118 | #: src/SetBG.cc:531 src/SetBG.cc:554 119 | msgid "Auto" 120 | msgstr "Automatski" 121 | 122 | #: src/SetBG.cc:622 123 | msgid "Could not get bg groups from config file." 124 | msgstr "Nemoguće dobiti pozadinske grupe iz konfiguracionog fajla." 125 | 126 | #: src/SetBG.cc:646 src/SetBG.cc:653 127 | msgid "ERROR" 128 | msgstr "GREŠKA" 129 | 130 | #: src/SetBG.cc:665 src/SetBG.cc:1040 131 | msgid "Could not open display" 132 | msgstr "Ne mogu otvoriti displej" 133 | 134 | # Provjeriti da li slijedi nešto poslije 135 | #: src/SetBG.cc:726 136 | msgid "ERROR: Could not load file in bg set" 137 | msgstr "GREŠKA: Ne mogu učitati pozadinski fajl" 138 | 139 | #: src/SetBG.cc:804 140 | msgid "Unknown mode for saved bg" 141 | msgstr "Nepoznat način za sačuvanu pozadinu" 142 | 143 | #: src/SetBG.cc:918 144 | msgid "ERROR: BG set could not make atoms." 145 | msgstr "GREŠKA: postavljena pozadina ne može napraviti atome." 146 | 147 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 148 | msgid "Screen" 149 | msgstr "Ekran" 150 | 151 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 152 | msgid "Full Screen" 153 | msgstr "Preko cijelog ekrana" 154 | 155 | #: src/SetBG.cc:1179 156 | msgid "Could not find Xinerama screen number" 157 | msgstr "Nije moguće pronaći broj Xinerama ekrana" 158 | 159 | #: src/Util.cc:95 160 | msgid "Restore saved backgrounds" 161 | msgstr "Povrati sačuvane pozadine" 162 | 163 | #: src/Util.cc:96 164 | msgid "Do not recurse into subdirectories" 165 | msgstr "Ne zalazi u poddirektorije" 166 | 167 | #: src/Util.cc:97 168 | msgid "" 169 | "How to sort the backgrounds. Valid options are:\n" 170 | "\t\t\t* alpha, for alphanumeric sort\n" 171 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 172 | "\t\t\t* time, for last modified time sort (oldest first)\n" 173 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 174 | msgstr "" 175 | "Kako sortirati pozadine. Važeće opcije su:\n" 176 | "\t\t\t* alpha, prema abecedi\n" 177 | "\t\t\t* ralpha, prema obrnutom redoslijedu abecede\n" 178 | "\t\t\t* time, prema posljednjem datumu izmjene (najstariji prvo)\n" 179 | "\t\t\t* rtime, prema obrnutom posljednjem datumu izmjene (najnoviji prvo)" 180 | 181 | #: src/Util.cc:98 182 | msgid "background color in hex, #000000 by default" 183 | msgstr "pozadinska boja u hexu, #000000 podrazumijevano" 184 | 185 | #: src/Util.cc:99 186 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 187 | msgstr "" 188 | 189 | #: src/Util.cc:100 190 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 191 | msgstr "" 192 | 193 | #: src/Util.cc:101 194 | msgid "Choose random background from config or given directory" 195 | msgstr "" 196 | 197 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 198 | #: src/Util.cc:110 src/Util.cc:111 199 | msgid "Sets the background to the given file" 200 | msgstr "Postavlja pozadinu na zadati fajl" 201 | 202 | #: src/Util.cc:106 203 | msgid "scaled" 204 | msgstr "skalirano" 205 | 206 | #: src/Util.cc:107 207 | msgid "tiled" 208 | msgstr "popločano" 209 | 210 | #: src/Util.cc:108 211 | msgid "auto" 212 | msgstr "automatski" 213 | 214 | #: src/Util.cc:109 215 | msgid "centered" 216 | msgstr "centrirano" 217 | 218 | #: src/Util.cc:110 219 | msgid "zoom" 220 | msgstr "uvećano" 221 | 222 | #: src/Util.cc:111 223 | msgid "zoom-fill" 224 | msgstr "uvećano-popunjeno" 225 | 226 | #: src/Util.cc:112 227 | msgid "Saves the background permanently" 228 | msgstr "Sačuva pozadinu trajno" 229 | 230 | #: src/Util.cc:207 231 | msgid "Could not open dir" 232 | msgstr "Ne mogu otvoriti direktorij" 233 | 234 | #: src/Util.cc:292 235 | msgid "Currently set background" 236 | msgstr "Trenutno postavljena pozadina" 237 | 238 | #: src/Util.cc:295 239 | msgid "for" 240 | msgstr "za" 241 | 242 | #: src/main.cc:133 243 | msgid "Error parsing command line" 244 | msgstr "Greška pri rasčlanjivanju komandne linije" 245 | 246 | #~ msgid "Could not open config directory." 247 | #~ msgstr "Nije moguće otvoriti konfiguracioni direktorij." 248 | 249 | #~ msgid "Default" 250 | #~ msgstr "Podrazumijevani" 251 | 252 | # Provjeriti da li slijedi nešto poslije 253 | #~ msgid "Unknown mode for saved bg on" 254 | #~ msgstr "Nepoznat način za sačuvanu pozadinu" 255 | 256 | #~ msgid "" 257 | #~ "UNKNOWN ROOT WINDOW TYPE DETECTED, will attempt to set via normal X " 258 | #~ "procedure" 259 | #~ msgstr "" 260 | #~ "NEPOZAT TIP ROOT PROZORA PRONAĐEN, pokušaću postaviti preko normalne X " 261 | #~ "procedure" 262 | 263 | #~ msgid "Invalid UTF-8 encountered. Skipping file" 264 | #~ msgstr "Naišao na nevažeći UTF-8. Preskačem fajl" 265 | 266 | #~ msgid "Could not get bg info for fullscreen xinerama" 267 | #~ msgstr "" 268 | #~ "Nemoguće dobiti pozadinsku informaciju za Xineramu preko cijelog ekrana" 269 | 270 | #~ msgid "Could not get bg info for" 271 | #~ msgstr "Nemoguće dobiti pozadinsku informaciju za" 272 | 273 | #~ msgid "Could not get bg info" 274 | #~ msgstr "Nemoguće dobiti pozadinsku informaciju" 275 | -------------------------------------------------------------------------------- /po/nitrogen.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR l3ib.org 3 | # This file is distributed under the same license as the nitrogen package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: nitrogen 1.6.1\n" 10 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 11 | "POT-Creation-Date: 2018-03-22 23:01+0300\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: src/ArgParser.cc:75 21 | msgid "Unexpected argument " 22 | msgstr "" 23 | 24 | #: src/ArgParser.cc:84 25 | msgid " expects an argument." 26 | msgstr "" 27 | 28 | #: src/ArgParser.cc:87 29 | msgid " does not expect an argument." 30 | msgstr "" 31 | 32 | #: src/ArgParser.cc:93 33 | msgid " conflicts with another argument." 34 | msgstr "" 35 | 36 | #: src/ArgParser.cc:105 37 | msgid "Usage:" 38 | msgstr "" 39 | 40 | #: src/Config.cc:128 src/Config.cc:217 41 | msgid "ERROR: Unable to load config file" 42 | msgstr "" 43 | 44 | #: src/Config.cc:139 45 | msgid "Couldn't find group for" 46 | msgstr "" 47 | 48 | #: src/Config.cc:151 49 | msgid "Could not get filename from config file." 50 | msgstr "" 51 | 52 | #: src/Config.cc:160 53 | msgid "Could not get mode from config file." 54 | msgstr "" 55 | 56 | #: src/Config.cc:219 57 | msgid "The error code returned was" 58 | msgstr "" 59 | 60 | #: src/Config.cc:220 61 | msgid "We expected" 62 | msgstr "" 63 | 64 | #: src/Config.cc:220 65 | msgid "or" 66 | msgstr "" 67 | 68 | #: src/NWindow.cc:253 69 | msgid "You previewed an image without applying it, apply?" 70 | msgstr "" 71 | 72 | #: src/NWindow.cc:329 73 | msgid "Automatic" 74 | msgstr "" 75 | 76 | #: src/NWindow.cc:336 77 | msgid "Scaled" 78 | msgstr "" 79 | 80 | #: src/NWindow.cc:344 81 | msgid "Centered" 82 | msgstr "" 83 | 84 | #: src/NWindow.cc:352 85 | msgid "Tiled" 86 | msgstr "" 87 | 88 | #: src/NWindow.cc:361 89 | msgid "Zoomed" 90 | msgstr "" 91 | 92 | #: src/NWindow.cc:362 93 | msgid "Zoomed Fill" 94 | msgstr "" 95 | 96 | #: src/SetBG.cc:520 src/SetBG.cc:548 97 | msgid "Scale" 98 | msgstr "" 99 | 100 | #: src/SetBG.cc:523 src/SetBG.cc:550 101 | msgid "Center" 102 | msgstr "" 103 | 104 | #: src/SetBG.cc:526 src/SetBG.cc:552 105 | msgid "Tile" 106 | msgstr "" 107 | 108 | #: src/SetBG.cc:529 src/SetBG.cc:554 109 | msgid "Zoom" 110 | msgstr "" 111 | 112 | #: src/SetBG.cc:532 src/SetBG.cc:556 113 | msgid "ZoomFill" 114 | msgstr "" 115 | 116 | #: src/SetBG.cc:535 src/SetBG.cc:558 117 | msgid "Auto" 118 | msgstr "" 119 | 120 | #: src/SetBG.cc:626 121 | msgid "Could not get bg groups from config file." 122 | msgstr "" 123 | 124 | #: src/SetBG.cc:650 src/SetBG.cc:657 125 | msgid "ERROR" 126 | msgstr "" 127 | 128 | #: src/SetBG.cc:669 src/SetBG.cc:1044 129 | msgid "Could not open display" 130 | msgstr "" 131 | 132 | #: src/SetBG.cc:730 133 | msgid "ERROR: Could not load file in bg set" 134 | msgstr "" 135 | 136 | #: src/SetBG.cc:808 137 | msgid "Unknown mode for saved bg" 138 | msgstr "" 139 | 140 | #: src/SetBG.cc:922 141 | msgid "ERROR: BG set could not make atoms." 142 | msgstr "" 143 | 144 | #: src/SetBG.cc:1023 src/SetBG.cc:1123 src/SetBG.cc:1533 145 | msgid "Screen" 146 | msgstr "" 147 | 148 | #: src/SetBG.cc:1118 src/SetBG.cc:1526 149 | msgid "Full Screen" 150 | msgstr "" 151 | 152 | #: src/SetBG.cc:1183 153 | msgid "Could not find Xinerama screen number" 154 | msgstr "" 155 | 156 | #: src/Util.cc:95 157 | msgid "Restore saved backgrounds" 158 | msgstr "" 159 | 160 | #: src/Util.cc:96 161 | msgid "Do not recurse into subdirectories" 162 | msgstr "" 163 | 164 | #: src/Util.cc:97 165 | msgid "" 166 | "How to sort the backgrounds. Valid options are:\n" 167 | "\t\t\t* alpha, for alphanumeric sort\n" 168 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 169 | "\t\t\t* time, for last modified time sort (oldest first)\n" 170 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 171 | msgstr "" 172 | 173 | #: src/Util.cc:98 174 | msgid "background color in hex, #000000 by default" 175 | msgstr "" 176 | 177 | #: src/Util.cc:99 178 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 179 | msgstr "" 180 | 181 | #: src/Util.cc:100 182 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 183 | msgstr "" 184 | 185 | #: src/Util.cc:101 186 | msgid "Choose random background from config or given directory" 187 | msgstr "" 188 | 189 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 190 | #: src/Util.cc:110 src/Util.cc:111 191 | msgid "Sets the background to the given file" 192 | msgstr "" 193 | 194 | #: src/Util.cc:106 195 | msgid "scaled" 196 | msgstr "" 197 | 198 | #: src/Util.cc:107 199 | msgid "tiled" 200 | msgstr "" 201 | 202 | #: src/Util.cc:108 203 | msgid "auto" 204 | msgstr "" 205 | 206 | #: src/Util.cc:109 207 | msgid "centered" 208 | msgstr "" 209 | 210 | #: src/Util.cc:110 211 | msgid "zoom" 212 | msgstr "" 213 | 214 | #: src/Util.cc:111 215 | msgid "zoom-fill" 216 | msgstr "" 217 | 218 | #: src/Util.cc:112 219 | msgid "Saves the background permanently" 220 | msgstr "" 221 | 222 | #: src/Util.cc:208 223 | msgid "Could not open dir" 224 | msgstr "" 225 | 226 | #: src/Util.cc:293 227 | msgid "Currently set background" 228 | msgstr "" 229 | 230 | #: src/Util.cc:296 231 | msgid "for" 232 | msgstr "" 233 | 234 | #: src/main.cc:133 235 | msgid "Error parsing command line" 236 | msgstr "" 237 | 238 | #: src/NPrefsWindow.cc:27 239 | msgid "Preferences" 240 | msgstr "" 241 | 242 | #: src/NPrefsWindow.cc:28 243 | msgid "View Options" 244 | msgstr "" 245 | 246 | #: src/NPrefsWindow.cc:29 247 | msgid "Directories" 248 | msgstr "" 249 | 250 | #: src/NPrefsWindow.cc:30 251 | msgid "Sort by" 252 | msgstr "" 253 | 254 | #: src/NPrefsWindow.cc:31 255 | msgid "_Icon" 256 | msgstr "" 257 | 258 | #: src/NPrefsWindow.cc:32 259 | msgid "_Icon with captions" 260 | msgstr "" 261 | 262 | #: src/NPrefsWindow.cc:33 263 | msgid "_List" 264 | msgstr "" 265 | 266 | #: src/NPrefsWindow.cc:34 267 | msgid "_Time (descending)" 268 | msgstr "" 269 | 270 | #: src/NPrefsWindow.cc:35 271 | msgid "_Time (ascending)" 272 | msgstr "" 273 | 274 | #: src/NPrefsWindow.cc:36 275 | msgid "_Name (ascending)" 276 | msgstr "" 277 | 278 | #: src/NPrefsWindow.cc:37 279 | msgid "_Name (descending)" 280 | msgstr "" 281 | 282 | #: src/NPrefsWindow.cc:38 283 | msgid "Recurse" 284 | msgstr "" 285 | 286 | #: src/NPrefsWindow.cc:202 287 | msgid "Are you sure you want to delete %1?" 288 | msgstr "" 289 | -------------------------------------------------------------------------------- /po/pl.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR l3ib.org 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2017-02-11 13:29-0500\n" 11 | "PO-Revision-Date: 2016-11-21 10:03+0100\n" 12 | "Last-Translator: \n" 13 | "Language-Team: \n" 14 | "Language: pl\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 1.8.11\n" 19 | "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 20 | "|| n%100>=20) ? 1 : 2);\n" 21 | 22 | #: src/ArgParser.cc:75 23 | msgid "Unexpected argument " 24 | msgstr "Niespodziewany argument" 25 | 26 | #: src/ArgParser.cc:84 27 | msgid " expects an argument." 28 | msgstr "wymaga argumentu." 29 | 30 | #: src/ArgParser.cc:87 31 | msgid " does not expect an argument." 32 | msgstr "nie wymaga argumentu." 33 | 34 | #: src/ArgParser.cc:93 35 | msgid " conflicts with another argument." 36 | msgstr "jest w konflikcie z innym argumentem." 37 | 38 | #: src/ArgParser.cc:105 39 | msgid "Usage:" 40 | msgstr "Użycie: " 41 | 42 | #: src/Config.cc:128 src/Config.cc:217 43 | msgid "ERROR: Unable to load config file" 44 | msgstr "BŁĄD: Nie udało się wczytać pliku konfiguracyjnego" 45 | 46 | #: src/Config.cc:139 47 | msgid "Couldn't find group for" 48 | msgstr "" 49 | 50 | #: src/Config.cc:151 51 | msgid "Could not get filename from config file." 52 | msgstr "" 53 | 54 | #: src/Config.cc:160 55 | msgid "Could not get mode from config file." 56 | msgstr "" 57 | 58 | #: src/Config.cc:219 59 | msgid "The error code returned was" 60 | msgstr "" 61 | 62 | #: src/Config.cc:220 63 | msgid "We expected" 64 | msgstr "" 65 | 66 | #: src/Config.cc:220 67 | msgid "or" 68 | msgstr "lub" 69 | 70 | #: src/NWindow.cc:253 71 | msgid "You previewed an image without applying it, apply?" 72 | msgstr "Podglądasz obraz bez zastosowania go, zastosować?" 73 | 74 | #: src/NWindow.cc:329 75 | msgid "Automatic" 76 | msgstr "Automatycznie" 77 | 78 | #: src/NWindow.cc:336 79 | msgid "Scaled" 80 | msgstr "Skalowanie" 81 | 82 | #: src/NWindow.cc:344 83 | msgid "Centered" 84 | msgstr "Wycentrowane" 85 | 86 | #: src/NWindow.cc:352 87 | msgid "Tiled" 88 | msgstr "Sąsiadująco" 89 | 90 | #: src/NWindow.cc:361 91 | msgid "Zoomed" 92 | msgstr "Powiększone" 93 | 94 | #: src/NWindow.cc:362 95 | msgid "Zoomed Fill" 96 | msgstr "Powiększone wypełniając" 97 | 98 | #: src/SetBG.cc:516 src/SetBG.cc:544 99 | msgid "Scale" 100 | msgstr "Skalowanie" 101 | 102 | #: src/SetBG.cc:519 src/SetBG.cc:546 103 | msgid "Center" 104 | msgstr "Wycentrowanie" 105 | 106 | #: src/SetBG.cc:522 src/SetBG.cc:548 107 | msgid "Tile" 108 | msgstr "Sąsiadująco" 109 | 110 | #: src/SetBG.cc:525 src/SetBG.cc:550 111 | msgid "Zoom" 112 | msgstr "Powiększenie" 113 | 114 | #: src/SetBG.cc:528 src/SetBG.cc:552 115 | msgid "ZoomFill" 116 | msgstr "Powiększenie i wypełnienie" 117 | 118 | #: src/SetBG.cc:531 src/SetBG.cc:554 119 | msgid "Auto" 120 | msgstr "Automatycznie" 121 | 122 | #: src/SetBG.cc:622 123 | msgid "Could not get bg groups from config file." 124 | msgstr "" 125 | 126 | #: src/SetBG.cc:646 src/SetBG.cc:653 127 | msgid "ERROR" 128 | msgstr "BŁĄD" 129 | 130 | #: src/SetBG.cc:665 src/SetBG.cc:1040 131 | msgid "Could not open display" 132 | msgstr "" 133 | 134 | #: src/SetBG.cc:726 135 | msgid "ERROR: Could not load file in bg set" 136 | msgstr "" 137 | 138 | #: src/SetBG.cc:804 139 | msgid "Unknown mode for saved bg" 140 | msgstr "" 141 | 142 | #: src/SetBG.cc:918 143 | msgid "ERROR: BG set could not make atoms." 144 | msgstr "" 145 | 146 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 147 | msgid "Screen" 148 | msgstr "Ekran" 149 | 150 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 151 | msgid "Full Screen" 152 | msgstr "Pełny ekran" 153 | 154 | #: src/SetBG.cc:1179 155 | msgid "Could not find Xinerama screen number" 156 | msgstr "" 157 | 158 | #: src/Util.cc:95 159 | msgid "Restore saved backgrounds" 160 | msgstr "" 161 | 162 | #: src/Util.cc:96 163 | msgid "Do not recurse into subdirectories" 164 | msgstr "" 165 | 166 | #: src/Util.cc:97 167 | msgid "" 168 | "How to sort the backgrounds. Valid options are:\n" 169 | "\t\t\t* alpha, for alphanumeric sort\n" 170 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 171 | "\t\t\t* time, for last modified time sort (oldest first)\n" 172 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 173 | msgstr "" 174 | 175 | #: src/Util.cc:98 176 | msgid "background color in hex, #000000 by default" 177 | msgstr "" 178 | 179 | #: src/Util.cc:99 180 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 181 | msgstr "" 182 | 183 | #: src/Util.cc:100 184 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 185 | msgstr "" 186 | 187 | #: src/Util.cc:101 188 | msgid "Choose random background from config or given directory" 189 | msgstr "Wybierz losowe tło z pliku konfiguracyjnego lub podanego katalogu" 190 | 191 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 192 | #: src/Util.cc:110 src/Util.cc:111 193 | msgid "Sets the background to the given file" 194 | msgstr "Ustawia podany plik jako tło" 195 | 196 | #: src/Util.cc:106 197 | msgid "scaled" 198 | msgstr "przeskalowane" 199 | 200 | #: src/Util.cc:107 201 | msgid "tiled" 202 | msgstr "sąsiadująco" 203 | 204 | #: src/Util.cc:108 205 | msgid "auto" 206 | msgstr "automatycznie" 207 | 208 | #: src/Util.cc:109 209 | msgid "centered" 210 | msgstr "wycentrowane" 211 | 212 | #: src/Util.cc:110 213 | msgid "zoom" 214 | msgstr "powiększone" 215 | 216 | #: src/Util.cc:111 217 | msgid "zoom-fill" 218 | msgstr "powiększone i wypełnione" 219 | 220 | #: src/Util.cc:112 221 | msgid "Saves the background permanently" 222 | msgstr "Zapisuje tło na stałe" 223 | 224 | #: src/Util.cc:207 225 | msgid "Could not open dir" 226 | msgstr "Nie mogę otworzyć katalogu" 227 | 228 | #: src/Util.cc:292 229 | msgid "Currently set background" 230 | msgstr "Obecnie ustawione tło" 231 | 232 | #: src/Util.cc:295 233 | msgid "for" 234 | msgstr "dla" 235 | 236 | #: src/main.cc:133 237 | msgid "Error parsing command line" 238 | msgstr "Błąd przetwarzania linii komend" 239 | -------------------------------------------------------------------------------- /po/ru.po: -------------------------------------------------------------------------------- 1 | # Russian translations for nitrogen 2 | # Copyright (C) 2013 l3ib.org 3 | # This file is distributed under the same license as the nitrogen 4 | # Max Vorob'jov , 2013 5 | # Vladimir Kudrya , 2018 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2018-03-22 22:04+0300\n" 11 | "PO-Revision-Date: 2018-03-22 22:11+0300\n" 12 | "Last-Translator: Vladimir Kudrya \n" 13 | "Language-Team: Russian\n" 14 | "Language: ru\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=utf-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 20 | "X-Generator: Poedit 2.0.6\n" 21 | 22 | #: ../src/ArgParser.cc:75 23 | msgid "Unexpected argument " 24 | msgstr "Неожиданный аргумент " 25 | 26 | #: ../src/ArgParser.cc:84 27 | msgid " expects an argument." 28 | msgstr " ожидается аргумент." 29 | 30 | #: ../src/ArgParser.cc:87 31 | msgid " does not expect an argument." 32 | msgstr " не ожидался аргумент." 33 | 34 | #: ../src/ArgParser.cc:93 35 | msgid " conflicts with another argument." 36 | msgstr " конфликтует с другим аргументом." 37 | 38 | #: ../src/ArgParser.cc:105 39 | msgid "Usage:" 40 | msgstr "Использование:" 41 | 42 | #: ../src/Config.cc:128 ../src/Config.cc:217 43 | msgid "ERROR: Unable to load config file" 44 | msgstr "Ошибка: не удалось загрузить конфигурационный файл" 45 | 46 | #: ../src/Config.cc:139 47 | msgid "Couldn't find group for" 48 | msgstr "Не удалось найти группу для" 49 | 50 | #: ../src/Config.cc:151 51 | msgid "Could not get filename from config file." 52 | msgstr "Не удалось получить имя файла из конфигурационного файла." 53 | 54 | #: ../src/Config.cc:160 55 | msgid "Could not get mode from config file." 56 | msgstr "Не удалось получить режим из конфигурационного файла." 57 | 58 | #: ../src/Config.cc:219 59 | msgid "The error code returned was" 60 | msgstr "Программа завершилась с кодом" 61 | 62 | #: ../src/Config.cc:220 63 | msgid "We expected" 64 | msgstr "Ожидалось" 65 | 66 | #: ../src/Config.cc:220 67 | msgid "or" 68 | msgstr "или" 69 | 70 | #: ../src/NWindow.cc:253 71 | msgid "You previewed an image without applying it, apply?" 72 | msgstr "Просмотренное изображение не было применено. Применить?" 73 | 74 | #: ../src/NWindow.cc:329 75 | msgid "Automatic" 76 | msgstr "Автоматически" 77 | 78 | #: ../src/NWindow.cc:336 79 | msgid "Scaled" 80 | msgstr "Растянуть" 81 | 82 | #: ../src/NWindow.cc:344 83 | msgid "Centered" 84 | msgstr "По центру" 85 | 86 | #: ../src/NWindow.cc:352 87 | msgid "Tiled" 88 | msgstr "Замостить" 89 | 90 | #: ../src/NWindow.cc:361 91 | msgid "Zoomed" 92 | msgstr "Пропорционально уместить" 93 | 94 | #: ../src/NWindow.cc:362 95 | msgid "Zoomed Fill" 96 | msgstr "Пропорционально заполнить" 97 | 98 | #: ../src/SetBG.cc:520 ../src/SetBG.cc:548 99 | msgid "Scale" 100 | msgstr "Растянуть" 101 | 102 | #: ../src/SetBG.cc:523 ../src/SetBG.cc:550 103 | msgid "Center" 104 | msgstr "По центру" 105 | 106 | #: ../src/SetBG.cc:526 ../src/SetBG.cc:552 107 | msgid "Tile" 108 | msgstr "Замостить" 109 | 110 | #: ../src/SetBG.cc:529 ../src/SetBG.cc:554 111 | msgid "Zoom" 112 | msgstr "Пропорционально уместить" 113 | 114 | #: ../src/SetBG.cc:532 ../src/SetBG.cc:556 115 | msgid "ZoomFill" 116 | msgstr "Пропорционально заполнить" 117 | 118 | #: ../src/SetBG.cc:535 ../src/SetBG.cc:558 119 | msgid "Auto" 120 | msgstr "Автоматически" 121 | 122 | #. @TODO exception?? 123 | #: ../src/SetBG.cc:626 124 | msgid "Could not get bg groups from config file." 125 | msgstr "Не удалось получить группы изображений из конфигурационного файла." 126 | 127 | #: ../src/SetBG.cc:650 ../src/SetBG.cc:657 128 | msgid "ERROR" 129 | msgstr "Ошибка" 130 | 131 | #: ../src/SetBG.cc:669 ../src/SetBG.cc:1044 132 | msgid "Could not open display" 133 | msgstr "Не могу открыть дисплей" 134 | 135 | #: ../src/SetBG.cc:730 136 | msgid "ERROR: Could not load file in bg set" 137 | msgstr "Ошибка: не удалось загрузить файл изображения" 138 | 139 | #: ../src/SetBG.cc:808 140 | msgid "Unknown mode for saved bg" 141 | msgstr "Неизвестный режим для сохранённого изображения" 142 | 143 | #: ../src/SetBG.cc:922 144 | msgid "ERROR: BG set could not make atoms." 145 | msgstr "Ошибка: не удалось установить изображение как фон рабочего стола." 146 | 147 | #: ../src/SetBG.cc:1023 ../src/SetBG.cc:1123 ../src/SetBG.cc:1533 148 | msgid "Screen" 149 | msgstr "Экран" 150 | 151 | #. always add full screen as we need the -1 key always 152 | #: ../src/SetBG.cc:1118 ../src/SetBG.cc:1526 153 | msgid "Full Screen" 154 | msgstr "Весь экран" 155 | 156 | #: ../src/SetBG.cc:1183 157 | msgid "Could not find Xinerama screen number" 158 | msgstr "Не удалось определить номер дисплея Ximerama" 159 | 160 | #: ../src/Util.cc:95 161 | msgid "Restore saved backgrounds" 162 | msgstr "Восстанавливать сохранённые изображения рабочего стола" 163 | 164 | #: ../src/Util.cc:96 165 | msgid "Do not recurse into subdirectories" 166 | msgstr "Просматривать папку без подпапок" 167 | 168 | #: ../src/Util.cc:97 169 | msgid "" 170 | "How to sort the backgrounds. Valid options are:\n" 171 | "\t\t\t* alpha, for alphanumeric sort\n" 172 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 173 | "\t\t\t* time, for last modified time sort (oldest first)\n" 174 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 175 | msgstr "" 176 | "Способ сортировки изображений. Возможные опции:\n" 177 | "\t\t\t* alpha, по алфавиту\n" 178 | "\t\t\t* ralpha, по алфавиту (в обратном порядке)\n" 179 | "\t\t\t* time, по дате изменения (сначала самые старые)\n" 180 | "\t\t\t* rtime, по дате изменения в обратном порядке (сначала самые новые)" 181 | 182 | #: ../src/Util.cc:98 183 | msgid "background color in hex, #000000 by default" 184 | msgstr "шестнадцатеричный код цвета, по умолчанию #000000" 185 | 186 | #: ../src/Util.cc:99 187 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 188 | msgstr "" 189 | "Выбрать дисплей многомониторной конфигурации: 0..n, -1 для общего фона" 190 | 191 | #: ../src/Util.cc:100 192 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 193 | msgstr "" 194 | "Переопределить движок установщика фонов: xwindows, xinerama, gnome, pcmanfm" 195 | 196 | #: ../src/Util.cc:101 197 | msgid "Choose random background from config or given directory" 198 | msgstr "Выбрать случайное изображение из конфигурации или каталога" 199 | 200 | #: ../src/Util.cc:106 ../src/Util.cc:107 ../src/Util.cc:108 ../src/Util.cc:109 201 | #: ../src/Util.cc:110 ../src/Util.cc:111 202 | msgid "Sets the background to the given file" 203 | msgstr "Устанавливает указаный файл фоном рабочего стола" 204 | 205 | #: ../src/Util.cc:106 206 | msgid "scaled" 207 | msgstr "растянуть" 208 | 209 | #: ../src/Util.cc:107 210 | msgid "tiled" 211 | msgstr "замостить" 212 | 213 | #: ../src/Util.cc:108 214 | msgid "auto" 215 | msgstr "автоматически" 216 | 217 | #: ../src/Util.cc:109 218 | msgid "centered" 219 | msgstr "по центру" 220 | 221 | #: ../src/Util.cc:110 222 | msgid "zoom" 223 | msgstr "пропорционально уместить" 224 | 225 | #: ../src/Util.cc:111 226 | msgid "zoom-fill" 227 | msgstr "пропорционально заполнить" 228 | 229 | #: ../src/Util.cc:112 230 | msgid "Saves the background permanently" 231 | msgstr "Сохраняет изображение рабочего стола" 232 | 233 | #: ../src/Util.cc:208 234 | msgid "Could not open dir" 235 | msgstr "Не могу открыть папку" 236 | 237 | #: ../src/Util.cc:293 238 | msgid "Currently set background" 239 | msgstr "Текущее изображение рабочего стола" 240 | 241 | #: ../src/Util.cc:296 242 | msgid "for" 243 | msgstr "для" 244 | 245 | #: ../src/main.cc:133 246 | msgid "Error parsing command line" 247 | msgstr "Ошибка распознавания аргумента командной строки" 248 | 249 | #: ../src/NPrefsWindow.cc:27 250 | msgid "Preferences" 251 | msgstr "Настройки" 252 | 253 | #: ../src/NPrefsWindow.cc:28 254 | msgid "View Options" 255 | msgstr "Параметры отображения" 256 | 257 | #: ../src/NPrefsWindow.cc:29 258 | msgid "Directories" 259 | msgstr "Каталоги" 260 | 261 | #: ../src/NPrefsWindow.cc:30 262 | msgid "Sort by" 263 | msgstr "Сортировка" 264 | 265 | #: ../src/NPrefsWindow.cc:31 266 | msgid "_Icon" 267 | msgstr "_Значки" 268 | 269 | #: ../src/NPrefsWindow.cc:32 270 | msgid "_Icon with captions" 271 | msgstr "Значки с _подписями" 272 | 273 | #: ../src/NPrefsWindow.cc:33 274 | msgid "_List" 275 | msgstr "Список" 276 | 277 | #: ../src/NPrefsWindow.cc:34 278 | msgid "_Time (descending)" 279 | msgstr "В_ремя (по убыванию)" 280 | 281 | #: ../src/NPrefsWindow.cc:35 282 | msgid "_Time (ascending)" 283 | msgstr "_Время (по возрастанию)" 284 | 285 | #: ../src/NPrefsWindow.cc:36 286 | msgid "_Name (ascending)" 287 | msgstr "_Имя (по возрастанию)" 288 | 289 | #: ../src/NPrefsWindow.cc:37 290 | msgid "_Name (descending)" 291 | msgstr "Им_я (по убыванию)" 292 | 293 | #: ../src/NPrefsWindow.cc:38 294 | msgid "Recurse" 295 | msgstr "Рекурсивно" 296 | 297 | #: ../src/NPrefsWindow.cc:202 298 | msgid "Are you sure you want to delete %1?" 299 | msgstr "Вы уверены что хотите удалить %1?" 300 | 301 | #~ msgid "Could not open config directory." 302 | #~ msgstr "Не удалось открыть папку с настройками." 303 | 304 | #~ msgid "Default" 305 | #~ msgstr "По умолчанию" 306 | 307 | #~ msgid "Unknown mode for saved bg on" 308 | #~ msgstr "Неизвестный режим для сохранённого изображения" 309 | 310 | #~ msgid "" 311 | #~ "UNKNOWN ROOT WINDOW TYPE DETECTED, will attempt to set via normal X " 312 | #~ "procedure" 313 | #~ msgstr "" 314 | #~ "Неизвестный тип корневого окна, попытаюсь установить фон другим методом" 315 | 316 | #~ msgid "Invalid UTF-8 encountered. Skipping file" 317 | #~ msgstr "Неверная кодировка, пропускаю файл" 318 | 319 | #~ msgid "Could not get bg info for fullscreen xinerama" 320 | #~ msgstr "Не удалось получить информацию об изображении для Ximerama" 321 | 322 | #~ msgid "Could not get bg info for" 323 | #~ msgstr "Не удалось получить информацию о" 324 | 325 | #~ msgid "Could not get bg info" 326 | #~ msgstr "Не удалось получить информацию о фоне рабочего стола" 327 | -------------------------------------------------------------------------------- /po/sr.po: -------------------------------------------------------------------------------- 1 | # Serbian translations for Nitrogen. 2 | # Copyright (C) 2016 l3ib.org 3 | # This file is distributed under the same license as the Nitrogen package. 4 | # Dino Duratović , 2016. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: 1.5.2\n" 9 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 10 | "POT-Creation-Date: 2017-02-11 13:29-0500\n" 11 | "PO-Revision-Date: 2016-03-17 07:58+0100\n" 12 | "Last-Translator: Dino Duratović \n" 13 | "Language-Team: \n" 14 | "Language: sr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 20 | 21 | #: src/ArgParser.cc:75 22 | msgid "Unexpected argument " 23 | msgstr "Неочекивани аргумент" 24 | 25 | #: src/ArgParser.cc:84 26 | msgid " expects an argument." 27 | msgstr " очекује аргумент." 28 | 29 | #: src/ArgParser.cc:87 30 | msgid " does not expect an argument." 31 | msgstr " не очекује арумент." 32 | 33 | #: src/ArgParser.cc:93 34 | msgid " conflicts with another argument." 35 | msgstr " је у сукобу са другим аргументом." 36 | 37 | #: src/ArgParser.cc:105 38 | msgid "Usage:" 39 | msgstr "Употреба:" 40 | 41 | #: src/Config.cc:128 src/Config.cc:217 42 | msgid "ERROR: Unable to load config file" 43 | msgstr "ГРЕШКА: Немогуће учитати конфигурациони фајл" 44 | 45 | #: src/Config.cc:139 46 | msgid "Couldn't find group for" 47 | msgstr "Није могуће пронаћи групу за" 48 | 49 | #: src/Config.cc:151 50 | msgid "Could not get filename from config file." 51 | msgstr "Није могуће добити име фајла из конфигурационог фајла." 52 | 53 | #: src/Config.cc:160 54 | msgid "Could not get mode from config file." 55 | msgstr "Није могуће добити начин из конфигурационог фајла." 56 | 57 | #: src/Config.cc:219 58 | msgid "The error code returned was" 59 | msgstr "Код грешке је" 60 | 61 | #: src/Config.cc:220 62 | msgid "We expected" 63 | msgstr "Очекивали смо" 64 | 65 | #: src/Config.cc:220 66 | msgid "or" 67 | msgstr "или" 68 | 69 | #: src/NWindow.cc:253 70 | #, fuzzy 71 | msgid "You previewed an image without applying it, apply?" 72 | msgstr "Прегледали сте слику без прихватања, ипак напустити?" 73 | 74 | #: src/NWindow.cc:329 75 | msgid "Automatic" 76 | msgstr "Аутоматски" 77 | 78 | #: src/NWindow.cc:336 79 | msgid "Scaled" 80 | msgstr "Сразмерно" 81 | 82 | #: src/NWindow.cc:344 83 | msgid "Centered" 84 | msgstr "Центрирано" 85 | 86 | #: src/NWindow.cc:352 87 | msgid "Tiled" 88 | msgstr "Поплочано" 89 | 90 | #: src/NWindow.cc:361 91 | msgid "Zoomed" 92 | msgstr "Увећано" 93 | 94 | #: src/NWindow.cc:362 95 | msgid "Zoomed Fill" 96 | msgstr "Увећано попуњење" 97 | 98 | #: src/SetBG.cc:516 src/SetBG.cc:544 99 | msgid "Scale" 100 | msgstr "Скалирај" 101 | 102 | #: src/SetBG.cc:519 src/SetBG.cc:546 103 | msgid "Center" 104 | msgstr "Центар" 105 | 106 | #: src/SetBG.cc:522 src/SetBG.cc:548 107 | msgid "Tile" 108 | msgstr "Поплочај" 109 | 110 | #: src/SetBG.cc:525 src/SetBG.cc:550 111 | msgid "Zoom" 112 | msgstr "Увећај" 113 | 114 | #: src/SetBG.cc:528 src/SetBG.cc:552 115 | msgid "ZoomFill" 116 | msgstr "Увећај и попуни" 117 | 118 | #: src/SetBG.cc:531 src/SetBG.cc:554 119 | msgid "Auto" 120 | msgstr "Аутоматски" 121 | 122 | #: src/SetBG.cc:622 123 | msgid "Could not get bg groups from config file." 124 | msgstr "Немогуће добити позадинске групе из конфигурационог фајла." 125 | 126 | #: src/SetBG.cc:646 src/SetBG.cc:653 127 | msgid "ERROR" 128 | msgstr "ГРЕШКА" 129 | 130 | #: src/SetBG.cc:665 src/SetBG.cc:1040 131 | msgid "Could not open display" 132 | msgstr "Не могу отворити дисплеј" 133 | 134 | # Provjeriti da li slijedi nešto poslije 135 | #: src/SetBG.cc:726 136 | msgid "ERROR: Could not load file in bg set" 137 | msgstr "ГРЕШКА: Не могу учитати позадински фајл" 138 | 139 | #: src/SetBG.cc:804 140 | msgid "Unknown mode for saved bg" 141 | msgstr "Непознат начин за сачувану позадину" 142 | 143 | #: src/SetBG.cc:918 144 | msgid "ERROR: BG set could not make atoms." 145 | msgstr "ГРЕШКА: постављена позадина не може направити атоме." 146 | 147 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 148 | msgid "Screen" 149 | msgstr "Екран" 150 | 151 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 152 | msgid "Full Screen" 153 | msgstr "Преко целог екрана" 154 | 155 | #: src/SetBG.cc:1179 156 | msgid "Could not find Xinerama screen number" 157 | msgstr "Није могуће пронаћи број Xinerama екрана" 158 | 159 | #: src/Util.cc:95 160 | msgid "Restore saved backgrounds" 161 | msgstr "Поврати сачуване позадине" 162 | 163 | #: src/Util.cc:96 164 | msgid "Do not recurse into subdirectories" 165 | msgstr "Не залази у поддиректорије" 166 | 167 | #: src/Util.cc:97 168 | msgid "" 169 | "How to sort the backgrounds. Valid options are:\n" 170 | "\t\t\t* alpha, for alphanumeric sort\n" 171 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 172 | "\t\t\t* time, for last modified time sort (oldest first)\n" 173 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 174 | msgstr "" 175 | "Како сортирати позадине. Важеће опције су:\n" 176 | "\t\t\t* alpha, према абецеди\n" 177 | "\t\t\t* ralpha, према обрнутом редоследу абецеде\n" 178 | "\t\t\t* time, према последњем датуму измене (најстарији прво)\n" 179 | "\t\t\t* rtime, према обрнутом датуму последње измене (најновији прво)" 180 | 181 | #: src/Util.cc:98 182 | msgid "background color in hex, #000000 by default" 183 | msgstr "позадинска боја у hexu, #000000 подразумевано" 184 | 185 | #: src/Util.cc:99 186 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 187 | msgstr "" 188 | 189 | #: src/Util.cc:100 190 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 191 | msgstr "" 192 | 193 | #: src/Util.cc:101 194 | msgid "Choose random background from config or given directory" 195 | msgstr "" 196 | 197 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 198 | #: src/Util.cc:110 src/Util.cc:111 199 | msgid "Sets the background to the given file" 200 | msgstr "Поставља позадину на задати фајл" 201 | 202 | #: src/Util.cc:106 203 | msgid "scaled" 204 | msgstr "скалирано" 205 | 206 | #: src/Util.cc:107 207 | msgid "tiled" 208 | msgstr "поплочано" 209 | 210 | #: src/Util.cc:108 211 | msgid "auto" 212 | msgstr "аутоматски" 213 | 214 | #: src/Util.cc:109 215 | msgid "centered" 216 | msgstr "центрирано" 217 | 218 | #: src/Util.cc:110 219 | msgid "zoom" 220 | msgstr "увећано" 221 | 222 | #: src/Util.cc:111 223 | msgid "zoom-fill" 224 | msgstr "увећано-попуњено" 225 | 226 | #: src/Util.cc:112 227 | msgid "Saves the background permanently" 228 | msgstr "Сачува позадину трајно" 229 | 230 | #: src/Util.cc:207 231 | msgid "Could not open dir" 232 | msgstr "Не могу отворити директориј" 233 | 234 | #: src/Util.cc:292 235 | msgid "Currently set background" 236 | msgstr "Тренутно постављена позадина" 237 | 238 | #: src/Util.cc:295 239 | msgid "for" 240 | msgstr "за" 241 | 242 | #: src/main.cc:133 243 | msgid "Error parsing command line" 244 | msgstr "Грешка при расчлањењу командне линије" 245 | 246 | #~ msgid "Could not open config directory." 247 | #~ msgstr "Није могуће отворити конфигурациони директориј." 248 | 249 | #~ msgid "Default" 250 | #~ msgstr "Подразумевани" 251 | 252 | # Provjeriti da li slijedi nešto poslije 253 | #~ msgid "Unknown mode for saved bg on" 254 | #~ msgstr "Непознат начин за сачувану позадину" 255 | 256 | #~ msgid "" 257 | #~ "UNKNOWN ROOT WINDOW TYPE DETECTED, will attempt to set via normal X " 258 | #~ "procedure" 259 | #~ msgstr "" 260 | #~ "НЕПОЗНАТ ТИП ROOT ПРОЗОРА ПРОНАЂЕН, покушаћу поставити преко нормалне X " 261 | #~ "процедуре" 262 | 263 | #~ msgid "Invalid UTF-8 encountered. Skipping file" 264 | #~ msgstr "Наишао на неважећи UTF-8. Прескачем фајл" 265 | 266 | #~ msgid "Could not get bg info for fullscreen xinerama" 267 | #~ msgstr "" 268 | #~ "Немогуће добити позадинску информацију за Xineramu преко целог екрана" 269 | 270 | #~ msgid "Could not get bg info for" 271 | #~ msgstr "Немогуће добити позадинску информацију за" 272 | 273 | #~ msgid "Could not get bg info" 274 | #~ msgstr "Немогуће добити позадинску информацију" 275 | -------------------------------------------------------------------------------- /po/stamp-po: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /po/tr.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR l3ib.org 3 | # This file is distributed under the same license as the nitrogen package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: nitrogen 1.6.1\n" 10 | "Report-Msgid-Bugs-To: daf@minuslab.net\n" 11 | "POT-Creation-Date: 2017-02-11 14:19-0500\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: Yaşar Çiv \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=1; plural=0;\n" 20 | "X-Language: tr\n" 21 | "X-Source-Language: C\n" 22 | 23 | #: src/ArgParser.cc:75 24 | msgid "Unexpected argument " 25 | msgstr "Beklenmeyen değişken " 26 | 27 | #: src/ArgParser.cc:84 28 | msgid " expects an argument." 29 | msgstr " beklenen bir değişken." 30 | 31 | #: src/ArgParser.cc:87 32 | msgid " does not expect an argument." 33 | msgstr " beklenen bir değişken değil." 34 | 35 | #: src/ArgParser.cc:93 36 | msgid " conflicts with another argument." 37 | msgstr " başka bir değişkenle çatışıyor." 38 | 39 | #: src/ArgParser.cc:105 40 | msgid "Usage:" 41 | msgstr "Kullanım:" 42 | 43 | #: src/Config.cc:128 src/Config.cc:217 44 | msgid "ERROR: Unable to load config file" 45 | msgstr "HATA: Yapılandırma dosyası yüklenemedi" 46 | 47 | #: src/Config.cc:139 48 | msgid "Couldn't find group for" 49 | msgstr "Şunun için grup bulunamadı" 50 | 51 | #: src/Config.cc:151 52 | msgid "Could not get filename from config file." 53 | msgstr "Yapılandırma dosyasından dosya adı alınamadı." 54 | 55 | #: src/Config.cc:160 56 | msgid "Could not get mode from config file." 57 | msgstr "Yapılandırma dosyasından kip alınamadı." 58 | 59 | #: src/Config.cc:219 60 | msgid "The error code returned was" 61 | msgstr "Döndürülen hata kodu şuydu" 62 | 63 | #: src/Config.cc:220 64 | msgid "We expected" 65 | msgstr "Bekledik" 66 | 67 | #: src/Config.cc:220 68 | msgid "or" 69 | msgstr "veya" 70 | 71 | #: src/NWindow.cc:253 72 | msgid "You previewed an image without applying it, apply?" 73 | msgstr "Bir resmi uygulamadan önizlediniz, uygulansın mı?" 74 | 75 | #: src/NWindow.cc:329 76 | msgid "Automatic" 77 | msgstr "Otomatik" 78 | 79 | #: src/NWindow.cc:336 80 | msgid "Scaled" 81 | msgstr "Ölçeklenmiş" 82 | 83 | #: src/NWindow.cc:344 84 | msgid "Centered" 85 | msgstr "Ortalanmış" 86 | 87 | #: src/NWindow.cc:352 88 | msgid "Tiled" 89 | msgstr "Döşenmiş" 90 | 91 | #: src/NWindow.cc:361 92 | msgid "Zoomed" 93 | msgstr "Büyütülmüş" 94 | 95 | #: src/NWindow.cc:362 96 | msgid "Zoomed Fill" 97 | msgstr "Büyütülmüş Dolgu" 98 | 99 | #: src/SetBG.cc:516 src/SetBG.cc:544 100 | msgid "Scale" 101 | msgstr "Ölçekle" 102 | 103 | #: src/SetBG.cc:519 src/SetBG.cc:546 104 | msgid "Center" 105 | msgstr "Ortala" 106 | 107 | #: src/SetBG.cc:522 src/SetBG.cc:548 108 | msgid "Tile" 109 | msgstr "Döşe" 110 | 111 | #: src/SetBG.cc:525 src/SetBG.cc:550 112 | msgid "Zoom" 113 | msgstr "Büyüt" 114 | 115 | #: src/SetBG.cc:528 src/SetBG.cc:552 116 | msgid "ZoomFill" 117 | msgstr "Büyüterek Doldur" 118 | 119 | #: src/SetBG.cc:531 src/SetBG.cc:554 120 | msgid "Auto" 121 | msgstr "Otomatik" 122 | 123 | #: src/SetBG.cc:622 124 | msgid "Could not get bg groups from config file." 125 | msgstr "Yapılandırma dosyasından arka plan grupları alınamadı." 126 | 127 | #: src/SetBG.cc:646 src/SetBG.cc:653 128 | msgid "ERROR" 129 | msgstr "HATA" 130 | 131 | #: src/SetBG.cc:665 src/SetBG.cc:1040 132 | msgid "Could not open display" 133 | msgstr "Ekran açılamadı" 134 | 135 | #: src/SetBG.cc:726 136 | msgid "ERROR: Could not load file in bg set" 137 | msgstr "HATA: arka plan ayarında dosya yüklenemedi" 138 | 139 | #: src/SetBG.cc:804 140 | msgid "Unknown mode for saved bg" 141 | msgstr "Kaydedilmiş arka plan için bilinmeyen kip" 142 | 143 | #: src/SetBG.cc:918 144 | msgid "ERROR: BG set could not make atoms." 145 | msgstr "HATA: Arka Plan ayarı atom oluşturamadı." 146 | 147 | #: src/SetBG.cc:1019 src/SetBG.cc:1119 src/SetBG.cc:1521 148 | msgid "Screen" 149 | msgstr "Ekran" 150 | 151 | #: src/SetBG.cc:1114 src/SetBG.cc:1514 152 | msgid "Full Screen" 153 | msgstr "Tam Ekran" 154 | 155 | #: src/SetBG.cc:1179 156 | msgid "Could not find Xinerama screen number" 157 | msgstr "Xinerama ekran numarası bulunamadı" 158 | 159 | #: src/Util.cc:95 160 | msgid "Restore saved backgrounds" 161 | msgstr "Kayıtlı arka planları geri yükle" 162 | 163 | #: src/Util.cc:96 164 | msgid "Do not recurse into subdirectories" 165 | msgstr "Alt dizinlere özyineleme yapma" 166 | 167 | #: src/Util.cc:97 168 | msgid "" 169 | "How to sort the backgrounds. Valid options are:\n" 170 | "\t\t\t* alpha, for alphanumeric sort\n" 171 | "\t\t\t* ralpha, for reverse alphanumeric sort\n" 172 | "\t\t\t* time, for last modified time sort (oldest first)\n" 173 | "\t\t\t* rtime, for reverse last modified time sort (newest first)" 174 | msgstr "" 175 | "Arka planlar nasıl sıralanır. Geçerli seçenekler:\n" 176 | "\t\t\t* alfasayısal sıralama için alfa\n" 177 | "\t\t\t* ters alfasayısal sıralama için ralpha\n" 178 | "\t\t\t* son değiştirilme zamanı sıralaması için (en eskisi) time\n" 179 | "\t\t\t* son değiştirilme zamanı tersine (en yenisi) rtime" 180 | 181 | #: src/Util.cc:98 182 | msgid "background color in hex, #000000 by default" 183 | msgstr "arka plan rengi onaltılık, varsayılan olarak #000000" 184 | 185 | #: src/Util.cc:99 186 | msgid "Select xinerama/multihead display in GUI, 0..n, -1 for full" 187 | msgstr "Arayüzde xinerama/çok başlı ekranı seçin, tam olarak 0..n, -1" 188 | 189 | #: src/Util.cc:100 190 | msgid "Force setter engine: xwindows, xinerama, gnome, pcmanfm" 191 | msgstr "Zorla ayarlama motoru: xwindows, xinerama, gnome, pcmanfm" 192 | 193 | #: src/Util.cc:101 194 | msgid "Choose random background from config or given directory" 195 | msgstr "Yapılandırmadan veya verilen dizinden rastgele arkaplan seç" 196 | 197 | #: src/Util.cc:106 src/Util.cc:107 src/Util.cc:108 src/Util.cc:109 198 | #: src/Util.cc:110 src/Util.cc:111 199 | msgid "Sets the background to the given file" 200 | msgstr "Arka planı verilen dosyaya ayarlar" 201 | 202 | #: src/Util.cc:106 203 | msgid "scaled" 204 | msgstr "ölçeklenmiş" 205 | 206 | #: src/Util.cc:107 207 | msgid "tiled" 208 | msgstr "döşenmiş" 209 | 210 | #: src/Util.cc:108 211 | msgid "auto" 212 | msgstr "otomatik" 213 | 214 | #: src/Util.cc:109 215 | msgid "centered" 216 | msgstr "ortalanmış" 217 | 218 | #: src/Util.cc:110 219 | msgid "zoom" 220 | msgstr "büyütülmüş" 221 | 222 | #: src/Util.cc:111 223 | msgid "zoom-fill" 224 | msgstr "büyütülmüş dolgu" 225 | 226 | #: src/Util.cc:112 227 | msgid "Saves the background permanently" 228 | msgstr "Arka planı kalıcı olarak kaydeder" 229 | 230 | #: src/Util.cc:207 231 | msgid "Could not open dir" 232 | msgstr "Dizin açılamadı" 233 | 234 | #: src/Util.cc:292 235 | msgid "Currently set background" 236 | msgstr "Şu anda ayarlanmış arka plan" 237 | 238 | #: src/Util.cc:295 239 | msgid "for" 240 | msgstr "için" 241 | 242 | #: src/main.cc:133 243 | msgid "Error parsing command line" 244 | msgstr "Komut satırı ayrıştırılırken hata oluştu" 245 | -------------------------------------------------------------------------------- /src/ArgParser.cc: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "ArgParser.h" 23 | #include "gcs-i18n.h" 24 | 25 | bool ArgParser::parse 26 | (int argc, char ** argv) { 27 | std::vector argVec; 28 | for (int i = 0; i < argc; i++) { 29 | argVec.push_back(Glib::ustring(argv[i])); 30 | } 31 | 32 | return this->parse(argVec); 33 | } 34 | 35 | bool ArgParser::parse 36 | (std::vector argVec) { 37 | bool retval = true; 38 | 39 | std::string marker("--"); 40 | 41 | for (std::vector::const_iterator i = argVec.begin() + 1; i != argVec.end(); i++) { 42 | std::string arg(*i); 43 | std::string key = arg; 44 | std::string value; 45 | 46 | if (key == "-h" || key == "--help") { 47 | received_args["help"]; 48 | continue; 49 | } 50 | 51 | if (key.compare(0, marker.length(), marker) != 0) { 52 | // this is not an arg, append it 53 | // to the extra string 54 | if (extra_arg_str.length ()) { 55 | // it has stuff, we need to add blank space 56 | extra_arg_str += " "; 57 | } 58 | extra_arg_str += key; 59 | continue; 60 | } 61 | 62 | key = std::string(key, 2); //trim marker 63 | 64 | std::string::size_type pos = key.find ('='); 65 | if (pos != std::string::npos) { 66 | key.erase (pos); 67 | value = std::string (arg, pos + 3); 68 | } 69 | 70 | std::map::const_iterator iter; 71 | Arg current; 72 | 73 | if ((iter = expected_args.find (key)) == expected_args.end ()) { 74 | // ignore this argument and set the error string 75 | retval = false; 76 | error_str += _("Unexpected argument ") + key + "\n"; 77 | continue; 78 | } else { 79 | current = iter->second; 80 | } 81 | 82 | if (current.get_has_arg () && !value.length ()) { 83 | // this expects an arg, but has received none. 84 | retval = false; 85 | error_str += key + _(" expects an argument.") + "\n"; 86 | } else if (value.length () && !current.get_has_arg ()) { 87 | retval = false; 88 | error_str += key + _(" does not expect an argument.") + "\n"; 89 | } 90 | 91 | if (conflicts (key)) { 92 | // use the previously supplied argument 93 | retval = false; 94 | error_str += key + _(" conflicts with another argument.") + "\n"; 95 | continue; 96 | } 97 | 98 | // save it. 99 | received_args[key] = value; 100 | } 101 | 102 | return retval; 103 | } 104 | 105 | std::string ArgParser::help_text (void) const { 106 | std::string ret_str = _("Usage:"); 107 | 108 | std::map::const_iterator iter; 109 | 110 | for (iter=expected_args.begin();iter!=expected_args.end();iter++) { 111 | std::string name = "--" + iter->first; 112 | std::string arg = iter->second.get_has_arg () ? "=[arg]" : ""; 113 | std::string desc = iter->second.get_desc (); 114 | ret_str += "\n\t" + name + arg + "\n\t\t" + desc; 115 | } 116 | 117 | return ret_str; 118 | } 119 | 120 | bool ArgParser::conflicts (std::string key) { 121 | std::vector< std::vector >::const_iterator iter; 122 | 123 | // Look through the exclusive iter. Cramped together to fit 124 | // into 80 columns. 125 | for (iter=exclusive.begin();iter!=exclusive.end();iter++) { 126 | std::vector::const_iterator str_iter; 127 | 128 | // Look through every option in this exclusive series. 129 | for (str_iter=iter->begin();str_iter!=iter->end();str_iter++) { 130 | if (*str_iter == key) { 131 | // this option cannot be used with any others 132 | // in this vector. 133 | // check if any of the options in this vector 134 | // have already been specified. 135 | std::vector::const_iterator new_str_iter; 136 | for (new_str_iter=iter->begin();new_str_iter!=iter->end();new_str_iter++) { 137 | if (received_args.find (*new_str_iter) != received_args.end ()) { 138 | // this option conflicts with a 139 | // previous option. 140 | return true; 141 | } 142 | } 143 | // no conflicts. 144 | return false; 145 | } 146 | } 147 | } 148 | 149 | return false; 150 | } 151 | -------------------------------------------------------------------------------- /src/ArgParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #ifndef _ARGPARSER_H_ 23 | #define _ARGPARSER_H_ 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | class Arg { 33 | public: 34 | Arg ( std::string desc = "", 35 | bool has_arg = false) { 36 | set_desc (desc); 37 | set_has_arg (has_arg); 38 | } 39 | 40 | std::string get_desc (void) const { 41 | return desc; 42 | } 43 | 44 | bool get_has_arg (void) const { 45 | return has_arg; 46 | } 47 | 48 | void set_desc (std::string desc) { 49 | this->desc = desc; 50 | } 51 | 52 | void set_has_arg (bool has_arg) { 53 | this->has_arg = has_arg; 54 | } 55 | 56 | ~Arg () {}; 57 | 58 | protected: 59 | std::string desc; 60 | bool has_arg; 61 | }; 62 | 63 | class ArgParser { 64 | public: 65 | ArgParser (void) { 66 | register_option ("help, -h", "Prints this help text."); 67 | }; 68 | ~ArgParser () {}; 69 | 70 | // adds a valid option. 71 | inline void register_option (std::string name, std::string desc = "", bool has_arg = false) { 72 | expected_args[name] = Arg(desc, has_arg); 73 | } 74 | 75 | // makes two or more options mutually exclusive (only one or the other.) 76 | inline void make_exclusive (std::vector exclusive_opts) { 77 | exclusive.push_back (exclusive_opts); 78 | } 79 | 80 | // returns the parsed map. 81 | inline std::map get_map (void) const { 82 | return received_args; 83 | } 84 | 85 | // returns all errors. 86 | inline std::string get_error (void) const { 87 | return error_str; 88 | } 89 | 90 | inline std::string get_extra_args (void) const { 91 | return extra_arg_str; 92 | } 93 | 94 | inline bool has_argument (std::string option) { 95 | if (received_args.find (option) != received_args.end ()) { 96 | return true; 97 | } 98 | return false; 99 | } 100 | 101 | inline std::string get_value (std::string key) { 102 | std::map::const_iterator iter = received_args.find (key); 103 | if (iter != received_args.end ()) { 104 | // key exists. 105 | return iter->second; 106 | } 107 | 108 | // key doesn't exist. 109 | return std::string (); 110 | } 111 | 112 | inline int get_intvalue (std::string key) { 113 | std::stringstream stream; 114 | std::string tmp_str = this->get_value(key); 115 | int tmp_int; 116 | 117 | stream << tmp_str; 118 | stream >> tmp_int; 119 | return tmp_int; 120 | } 121 | 122 | // parses away. 123 | bool parse (int argc, char ** argv); 124 | bool parse (std::vector argVec); 125 | 126 | // returns the help text (--help) 127 | std::string help_text (void) const; 128 | 129 | protected: 130 | // checks if the supplied key conflicts with an existing key. 131 | bool conflicts (std::string key); 132 | 133 | std::string error_str, extra_arg_str; 134 | std::map received_args; 135 | std::map expected_args; 136 | std::vector< std::vector > exclusive; 137 | }; 138 | 139 | #endif 140 | -------------------------------------------------------------------------------- /src/Config.cc: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "Config.h" 23 | #include 24 | #include "gcs-i18n.h" 25 | #include "Util.h" 26 | 27 | /** 28 | * Constructor, initializes default settings. 29 | */ 30 | Config::Config() 31 | { 32 | recurse = true; 33 | 34 | m_display_mode = ICON; 35 | 36 | m_posx = -1; 37 | m_posy = -1; 38 | 39 | m_sizex = 450; 40 | m_sizey = 500; 41 | 42 | m_icon_captions = false; 43 | 44 | m_sort_mode = Thumbview::SORT_ALPHA; 45 | } 46 | 47 | /** 48 | * Singleton retreiver. NOT THREAD SAFE. Call this func early to create, then it's ok. 49 | * 50 | * @return A pointer to the one config instance. 51 | */ 52 | Config* Config::get_instance() 53 | { 54 | // instance 55 | static Config* _instance; 56 | 57 | if (!_instance) 58 | _instance = new Config(); 59 | 60 | return _instance; 61 | } 62 | 63 | /** 64 | * Creates a clone of this Config instance. Used so the preferences dialog may manipulate the 65 | * configuration without disturbing the real one. 66 | */ 67 | Config* Config::clone() 68 | { 69 | Config* retVal = new Config(); 70 | 71 | retVal->recurse = recurse; 72 | retVal->m_display_mode = m_display_mode; 73 | retVal->m_posx = m_posx; 74 | retVal->m_posy = m_posy; 75 | retVal->m_sizex = m_sizex; 76 | retVal->m_sizey = m_sizey; 77 | retVal->m_icon_captions = m_icon_captions; 78 | retVal->m_vec_dirs = VecStrs(m_vec_dirs); 79 | retVal->m_sort_mode = m_sort_mode; 80 | 81 | return retVal; 82 | } 83 | 84 | /** 85 | * Returns the full path to the config file to be used. 86 | * 87 | * The file will exist. 88 | * 89 | * @return An empty string, or a full path to a config file. 90 | */ 91 | std::string Config::get_file(const Glib::ustring filename) const 92 | { 93 | VecStrs config_paths = Glib::get_system_config_dirs(); 94 | config_paths.insert(config_paths.begin(), Glib::get_user_config_dir()); 95 | 96 | std::string cfgfile; 97 | 98 | for (VecStrs::const_iterator i = config_paths.begin(); i != config_paths.end(); i++) { 99 | cfgfile = Glib::build_filename(*i, "nitrogen", filename); 100 | if (Glib::file_test(cfgfile, Glib::FILE_TEST_EXISTS)) { 101 | return cfgfile; 102 | } 103 | } 104 | 105 | return ""; 106 | } 107 | 108 | /** 109 | * Returns the bg information for a previously stored one 110 | * 111 | * @param disp The display string to use 112 | * @param file Returns the file thats in there 113 | * @param mode Returns the mode thats in there 114 | * @param bgcolor Returns the bg color thats in there, if any, or a default Gdk::Color if none 115 | * @return If it could find the entry 116 | */ 117 | bool Config::get_bg(const Glib::ustring disp, Glib::ustring &file, SetBG::SetMode &mode, Gdk::Color &bgcolor) { 118 | 119 | Glib::ustring cfgfile = get_bg_config_file(); 120 | if (cfgfile.empty()) 121 | return false; 122 | 123 | GKeyFile *kf = g_key_file_new(); 124 | 125 | GError *ge = NULL; 126 | if ( g_key_file_load_from_file(kf, cfgfile.c_str(), G_KEY_FILE_NONE, &ge) == FALSE ) { 127 | 128 | std::cerr << _("ERROR: Unable to load config file") << " (" << cfgfile << "): " << ge->message << "\n"; 129 | g_clear_error(&ge); 130 | g_key_file_free(kf); 131 | return false; 132 | } 133 | 134 | // check if the group for this display exists 135 | if ( ! g_key_file_has_group(kf, disp.c_str()) ) { 136 | // there is no config entry for this display. 137 | // abort. 138 | g_key_file_free(kf); 139 | std::cerr << _("Couldn't find group for") << " " << disp << "." << std::endl; 140 | return false; 141 | } 142 | 143 | // get data 144 | 145 | gchar *fileptr = g_key_file_get_string(kf, disp.c_str(), "file", NULL); 146 | if ( fileptr ) { 147 | file = Glib::ustring(fileptr); 148 | free(fileptr); 149 | } else { 150 | g_key_file_free(kf); 151 | std::cerr << _("Could not get filename from config file.") << std::endl; 152 | return false; 153 | } 154 | //error = true; 155 | 156 | mode = (SetBG::SetMode)g_key_file_get_integer(kf, disp.c_str(), "mode", &ge); 157 | if (ge) { 158 | g_clear_error(&ge); 159 | g_key_file_free(kf); 160 | std::cerr << _("Could not get mode from config file.") << std::endl; 161 | return false; 162 | } 163 | 164 | Glib::ustring tcol("#000000"); 165 | gchar *color = g_key_file_get_string(kf, disp.c_str(), "bgcolor", &ge); 166 | if (ge) { 167 | g_clear_error(&ge); 168 | // This is not a critical error. 169 | //g_key_file_free(kf); 170 | //std::cerr << "Could not get bg color from config file." << std::endl; 171 | //return false; 172 | } else { 173 | // worked properly 174 | tcol = color; 175 | free(color); 176 | } 177 | 178 | // did not fail 179 | // Glib::ustring tcol(color); 180 | // free(color); 181 | bgcolor.set(tcol); 182 | 183 | g_key_file_free(kf); 184 | 185 | 186 | // this function looks like less of an eyesore without all the 187 | // failed trix. 188 | 189 | return true; // success 190 | } 191 | 192 | /** 193 | * Sets the specified bg in the config file. 194 | * 195 | * @param disp The display this one is for 196 | * @param file The bg file to set 197 | * @param mode The mode the bg is set in 198 | * @param bgcolor The background color, ignored depending on mode 199 | * @return Success 200 | */ 201 | bool Config::set_bg(const Glib::ustring disp, const Glib::ustring file, const SetBG::SetMode mode, const Gdk::Color bgcolor) { 202 | 203 | if ( ! Config::check_dir() ) 204 | return false; 205 | 206 | Glib::ustring realdisp = disp; 207 | Glib::ustring cfgfile = Glib::build_filename(Glib::ustring(g_get_user_config_dir()), Glib::ustring("nitrogen")); 208 | cfgfile = Glib::build_filename(cfgfile, Glib::ustring("bg-saved.cfg")); 209 | 210 | GKeyFile *kf = g_key_file_new(); 211 | 212 | GError *ge = NULL; 213 | if ( g_key_file_load_from_file(kf, cfgfile.c_str(), G_KEY_FILE_NONE, &ge) == FALSE ) { 214 | 215 | // only give an error if it doesn't exist 216 | if ( ! ( ge->code == G_FILE_ERROR_NOENT || ge->code == G_KEY_FILE_ERROR_NOT_FOUND ) ) { 217 | std::cerr << _("ERROR: Unable to load config file") << " (" << cfgfile << "): " << ge->message << "\n"; 218 | #ifdef DEBUG 219 | std::cerr << _("The error code returned was") << " " << ge->code << "\n"; 220 | std::cerr << _("We expected") << " " << G_FILE_ERROR_NOENT << " " << _("or") << " " << G_KEY_FILE_ERROR_NOT_FOUND << "\n"; 221 | #endif 222 | g_key_file_free(kf); 223 | g_clear_error(&ge); 224 | return false; 225 | } 226 | g_clear_error(&ge); 227 | } 228 | 229 | // must do complex removals if xinerama occurs 230 | if (realdisp.find("xin_", 0, 4) != Glib::ustring::npos) { 231 | 232 | if (realdisp == "xin_-1") { 233 | // get all keys, remove all keys that exist with xin_ prefixes 234 | gchar **groups; 235 | gsize num; 236 | groups = g_key_file_get_groups(kf, &num); 237 | for (int i=0; i &groups) { 274 | 275 | Glib::ustring cfgfile = get_bg_config_file(); 276 | if (cfgfile.empty()) 277 | return false; 278 | 279 | GKeyFile *kf = g_key_file_new(); 280 | 281 | if ( g_key_file_load_from_file(kf, cfgfile.c_str(), G_KEY_FILE_NONE, NULL) == FALSE ) { 282 | 283 | // do not output anything here, we just want to know 284 | g_key_file_free(kf); 285 | return false; 286 | } 287 | 288 | std::vector res; 289 | gsize num; 290 | gchar** filegroups = g_key_file_get_groups(kf, &num); 291 | 292 | // drop into vector 293 | for (unsigned int i=0; i 26 | #include "SetBG.h" 27 | #include 28 | #include "Thumbview.h" 29 | 30 | /** 31 | * Static class that interfaces with the configuration. 32 | * 33 | * @author Dave Foster 34 | * @date 6 Sept 2005 35 | */ 36 | class Config { 37 | private: 38 | 39 | bool check_dir(); 40 | 41 | bool recurse; 42 | DisplayMode m_display_mode; 43 | gint m_posx, m_posy; 44 | guint m_sizex, m_sizey; 45 | gboolean m_icon_captions; 46 | VecStrs m_vec_dirs; 47 | Thumbview::SortMode m_sort_mode; 48 | 49 | std::string get_bg_config_file() const { return get_file("bg-saved.cfg"); } 50 | std::string get_config_file() const { return get_file("nitrogen.cfg"); } 51 | std::string get_file(const Glib::ustring filename) const; 52 | 53 | public: 54 | 55 | // instance getter 56 | static Config* get_instance(); 57 | 58 | Config(); 59 | 60 | Config* clone(); 61 | 62 | // get/set for bgs 63 | bool get_bg(const Glib::ustring disp, Glib::ustring &file, SetBG::SetMode &mode, Gdk::Color &bgcolor); 64 | bool set_bg(const Glib::ustring disp, const Glib::ustring file, const SetBG::SetMode mode, Gdk::Color bgcolor); 65 | 66 | // get all groups (bg_saved.cfg) 67 | bool get_bg_groups(std::vector &groups); 68 | 69 | bool get_recurse() { return recurse; } 70 | void set_recurse(bool n) { recurse = n; } 71 | DisplayMode get_display_mode() { return m_display_mode; } 72 | void set_display_mode(DisplayMode mode) { m_display_mode = mode; } 73 | bool get_icon_captions() { return m_icon_captions; } 74 | void set_icon_captions(gboolean caps) { m_icon_captions = caps; } 75 | 76 | void get_pos(gint &x, gint &y); 77 | void set_pos(gint x, gint y); 78 | void get_size(guint &w, guint &h); 79 | void set_size(guint w, guint h); 80 | 81 | void set_sort_mode(Thumbview::SortMode s) { m_sort_mode = s; } 82 | Thumbview::SortMode get_sort_mode(){ return m_sort_mode; } 83 | 84 | VecStrs get_dirs(); 85 | void set_dirs(const VecStrs& new_dirs); 86 | bool add_dir(const std::string& dir); 87 | bool rm_dir(const std::string& dir); 88 | 89 | bool save_cfg(); // save non bg related cfg info 90 | bool load_cfg(); 91 | }; 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /src/ImageCombo.cc: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "ImageCombo.h" 23 | 24 | /** 25 | * Constructor, initializes renderers, columns, etc 26 | */ 27 | ImageCombo::ImageCombo() { 28 | 29 | // add tmcs to the record 30 | this->colrecord.add( this->tmc_image ); 31 | this->colrecord.add( this->tmc_desc ); 32 | this->colrecord.add( this->tmc_data ); 33 | 34 | // init liststore 35 | this->store = Gtk::ListStore::create( this->colrecord ); 36 | this->set_model( store ); 37 | 38 | this->pack_start( this->rend_img, FALSE ); 39 | this->pack_start( this->rend_text ); 40 | 41 | this->add_attribute( this->rend_text, "text", 1 ); 42 | this->add_attribute( this->rend_img, "pixbuf", 0 ); 43 | 44 | } 45 | 46 | /** 47 | * Do nothing! 48 | */ 49 | ImageCombo::~ImageCombo() { 50 | 51 | } 52 | 53 | /** 54 | * Adds a row to the combo box. 55 | * 56 | * @param img The pixbuf to show for this row 57 | * @param desc The text label to display alongside it 58 | * @param data Textual data to store in this row 59 | * @param active Whether to set this row as active or not 60 | */ 61 | void ImageCombo::add_image_row(Glib::RefPtr img, Glib::ustring desc, Glib::ustring data, bool active) { 62 | 63 | Gtk::TreeModel::iterator iter = this->store->append (); 64 | Gtk::TreeModel::Row row = *iter; 65 | 66 | row[this->tmc_image] = img; 67 | row[this->tmc_desc] = desc; 68 | row[this->tmc_data] = data; 69 | 70 | if ( active ) 71 | this->set_active(iter); 72 | } 73 | 74 | /** 75 | * Returns the data field of the selected row. 76 | * 77 | * @return Exactly what I said above. 78 | */ 79 | Glib::ustring ImageCombo::get_active_data() { 80 | Gtk::TreeModel::Row arow = *(this->get_active()); 81 | return arow[this->tmc_data]; 82 | } 83 | 84 | /** 85 | * Selects the entry with the value specified. 86 | * 87 | * @param value The value to search for and select. 88 | * @returns If the value was able to be set. 89 | */ 90 | bool ImageCombo::select_value(Glib::ustring value) 91 | { 92 | for (Gtk::TreeIter iter = store->children().begin(); iter != store->children().end(); iter++) { 93 | 94 | if ( (*iter)[tmc_data] == value ) { 95 | set_active(iter); 96 | return true; 97 | } 98 | } 99 | 100 | return false; 101 | } 102 | -------------------------------------------------------------------------------- /src/ImageCombo.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "main.h" 23 | 24 | class ImageCombo : public Gtk::ComboBox { 25 | 26 | public: 27 | ImageCombo(); 28 | ~ImageCombo(); 29 | 30 | void add_image_row(Glib::RefPtr img, Glib::ustring desc, Glib::ustring data, bool active); 31 | Glib::ustring get_active_data(); 32 | 33 | bool select_value(Glib::ustring); 34 | 35 | protected: 36 | 37 | Gtk::TreeModelColumn tmc_data; 38 | Gtk::TreeModelColumn< Glib::RefPtr > tmc_image; 39 | Gtk::TreeModelColumn tmc_desc; 40 | 41 | Gtk::TreeModel::ColumnRecord colrecord; 42 | 43 | Gtk::TreeViewColumn tvc_col_img; 44 | Gtk::TreeViewColumn tvc_col_desc; 45 | 46 | Glib::RefPtr store; 47 | 48 | Gtk::CellRendererPixbuf rend_img; 49 | Gtk::CellRendererText rend_text; 50 | }; 51 | -------------------------------------------------------------------------------- /src/Inotify.cc: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | 3 | /* don't compile if the option is not set */ 4 | #ifdef USE_INOTIFY 5 | 6 | #include "Inotify.h" 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #define MAXLEN 16384 14 | 15 | namespace Inotify { 16 | 17 | std::map< int, Watch* > Watch::watch_descriptors; 18 | int Watch::inotify_fd = -1; 19 | 20 | Watch * Watch::create(std::string path) { 21 | // check inotify_fd; set it if it is currently unset 22 | if (inotify_fd == -1) { 23 | inotify_fd = inotify_init(); 24 | if (inotify_fd == -1) { 25 | // an error occurred. 26 | switch(errno) { // oh dear god. 27 | case EMFILE: 28 | break; 29 | case ENFILE: 30 | break; 31 | case ENOMEM: 32 | break; 33 | } 34 | return 0; 35 | } 36 | } 37 | Watch * retval = new Watch(path); 38 | int watch_descriptor = -1; 39 | if ((watch_descriptor = inotify_add_watch(inotify_fd, path.c_str(), 40 | IN_ALL_EVENTS)) == -1) { 41 | return 0; 42 | } 43 | watch_descriptors[watch_descriptor] = retval; 44 | retval->watch_descriptor = watch_descriptor; 45 | 46 | retval->signal_deleted_self.connect(sigc::mem_fun(retval, &Watch::remove_wrap)); 47 | 48 | return retval; 49 | } 50 | 51 | void Watch::poll(suseconds_t timeout) { 52 | if (inotify_fd == -1) return; 53 | // initialize the fd set for select() 54 | fd_set set; 55 | FD_ZERO(&set); 56 | FD_SET(inotify_fd, &set); 57 | 58 | // initialize the timeout 59 | struct timeval timeval; 60 | timeval.tv_sec = 0; 61 | timeval.tv_usec = timeout; 62 | 63 | int select_return = -1; 64 | 65 | select_return = select(inotify_fd + 1, &set, NULL, NULL, &timeval); 66 | if (select_return <= 0) return; 67 | // something interesting happened. 68 | 69 | char buffer[MAXLEN]; 70 | ssize_t size = 0; 71 | size = read(inotify_fd, buffer, MAXLEN); 72 | if (size <= 0) return; 73 | 74 | // process events 75 | ssize_t i = 0; 76 | while(i < size) { 77 | uint32_t wd = *((uint32_t*)&buffer[i]); 78 | i += sizeof(uint32_t); 79 | uint32_t mask = *((uint32_t*)&buffer[i]); 80 | i += sizeof(uint32_t); 81 | //uint32_t cookie = buffer[i]; 82 | i += sizeof(uint32_t); 83 | uint32_t len = *((uint32_t*)&buffer[i]); 84 | i += sizeof(uint32_t); 85 | std::string name(&buffer[i], len); 86 | i += len; 87 | 88 | if (watch_descriptors.find(wd) == watch_descriptors.end()) continue; 89 | 90 | Watch * watch = watch_descriptors[wd]; 91 | 92 | std::string path; 93 | if (name.length() == 0) { 94 | name = watch->path; 95 | } else { 96 | name = watch->path + "/" + name; 97 | } 98 | 99 | // you have absolutely no idea how much of a pita it was writing this 100 | // out. 101 | if (mask & IN_ACCESS) { 102 | watch->signal_accessed.emit(name); 103 | } 104 | if (mask & IN_ATTRIB) { 105 | watch->signal_metadata_changed.emit(name); 106 | } 107 | if (mask & IN_CLOSE_WRITE) { 108 | watch->signal_write_closed.emit(name); 109 | } 110 | if (mask & IN_CLOSE_NOWRITE) { 111 | watch->signal_nowrite_closed.emit(name); 112 | } 113 | if (mask & IN_CREATE) { 114 | watch->signal_created.emit(name); 115 | } 116 | if (mask & IN_DELETE) { 117 | watch->signal_deleted.emit(name); 118 | } 119 | if (mask & IN_DELETE_SELF) { 120 | watch->signal_deleted_self.emit(name); 121 | } 122 | if (mask & IN_MODIFY) { 123 | watch->signal_modified.emit(name); 124 | } 125 | /*if (mask & IN_MOVE_SELF) { 126 | watch->signal_moved_self.emit(name); 127 | }*/ // not supported in my "inotify.h" glue 128 | if (mask & IN_MOVED_FROM) { 129 | watch->signal_moved_from.emit(name); 130 | } 131 | if (mask & IN_MOVED_TO) { 132 | watch->signal_moved_to.emit(name); 133 | } 134 | if (mask & IN_OPEN) { 135 | watch->signal_opened.emit(name); 136 | } 137 | } 138 | } 139 | 140 | void Watch::remove(void) { 141 | inotify_rm_watch(inotify_fd, watch_descriptor); 142 | watch_descriptors.erase(watch_descriptor); 143 | delete this; // self aware! 144 | } 145 | 146 | } 147 | 148 | #endif /* USE_INOTIFY */ 149 | -------------------------------------------------------------------------------- /src/Inotify.h: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | 3 | /* don't compile if the option is not set */ 4 | #ifdef USE_INOTIFY 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace Inotify { 13 | 14 | // the string here is the path to the file that the signal is for 15 | typedef sigc::signal inotify_signal; 16 | 17 | class Watch { 18 | public: 19 | // returns an inotify 'watch' associated with 'path' 20 | // internally calls inotify_add_watch() and adds itself to the map of 21 | // watch descriptors. 22 | static Watch * create(std::string path); 23 | 24 | // stops monitoring a file or directory; calls inotify_rm_watch() 25 | void remove(void); 26 | 27 | // should be called on a timeout or something; calls select() and waits 28 | // for events. timeout is the amount of time to wait in microseconds. 29 | static void poll(suseconds_t timeout); 30 | 31 | // signals that can be emitted 32 | inotify_signal signal_accessed; // file was accessed 33 | inotify_signal signal_metadata_changed; // file permissions.. changed 34 | inotify_signal signal_write_closed; // file opened for writing closed 35 | inotify_signal signal_nowrite_closed; // file opened for reading closed 36 | inotify_signal signal_created; // file created in watched dir 37 | inotify_signal signal_deleted; // file deleted in watched dir 38 | inotify_signal signal_deleted_self; // file/dir itself deleted 39 | inotify_signal signal_modified; // file modified 40 | inotify_signal signal_moved_self; // self was moved 41 | inotify_signal signal_moved_from; // file was moved out 42 | inotify_signal signal_moved_to; // file was moved in 43 | inotify_signal signal_opened; // file opened 44 | 45 | protected: 46 | Watch(std::string path) { 47 | this->path = path; 48 | watch_descriptor = -1; 49 | }; 50 | ~Watch() {}; 51 | 52 | void remove_wrap(std::string path) { 53 | remove(); 54 | } 55 | 56 | // maps watch descriptor -> inotify object 57 | static std::map< int, Watch* > watch_descriptors; 58 | // inotify file descriptor returned by inotify_init() 59 | static int inotify_fd; 60 | 61 | // the path that this watch is for 62 | std::string path; 63 | 64 | // this watch's descriptor 65 | int watch_descriptor; 66 | }; 67 | 68 | } 69 | 70 | #endif /* USE_INOTIFY */ 71 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = nitrogen 2 | nitrogen_SOURCES = Config.h NWindow.h main.cc md5.h SetBG.cc main.h Thumbview.cc Config.cc NWindow.cc SetBG.h md5.c ArgParser.h ArgParser.cc Thumbview.h ImageCombo.cc ImageCombo.h Inotify.cc Inotify.h Util.h Util.cc NPrefsWindow.cc 3 | LIBS=@NITROGEN_LIBS@ 4 | INCLUDES = @NITROGEN_CFLAGS@ \ 5 | -DNITROGEN_DATA_DIR=\"$(pkgdatadir)\" 6 | man_MANS = nitrogen.1 7 | noinst_HEADERS = Config.h NWindow.h SetBG.h main.h md5.h Thumbview.h ImageCombo.h ArgParser.h Inotify.h Util.h gcs-i18n.h NPrefsWindow.h 8 | EXTRA_DIST = $(man_MANS) 9 | 10 | AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" 11 | -------------------------------------------------------------------------------- /src/NPrefsWindow.cc: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2009 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "NPrefsWindow.h" 23 | #include "Config.h" 24 | #include "Util.h" 25 | #include "gcs-i18n.h" 26 | 27 | NPrefsWindow::NPrefsWindow(Gtk::Window& parent, Config *cfg) : Gtk::Dialog(_("Preferences"), parent, true, false), 28 | m_frame_view(_("View Options")), 29 | m_frame_dirs(_("Directories")), 30 | m_frame_sort(_("Sort by")), 31 | m_rb_view_icon(_("_Icon"), true), 32 | m_rb_view_icon_caps(_("_Icon with captions"), true), 33 | m_rb_view_list(_("_List"), true), 34 | m_rb_sort_rtime(_("_Time (descending)"), true), 35 | m_rb_sort_time(_("_Time (ascending)"), true), 36 | m_rb_sort_alpha(_("_Name (ascending)"), true), 37 | m_rb_sort_ralpha(_("_Name (descending)"), true), 38 | m_cb_recurse(_("Recurse"), true), 39 | m_btn_adddir(Gtk::Stock::ADD), 40 | m_btn_deldir(Gtk::Stock::DELETE) 41 | { 42 | // radio button grouping 43 | Gtk::RadioButton::Group group = m_rb_view_icon.get_group(); 44 | m_rb_view_icon_caps.set_group(group); 45 | m_rb_view_list.set_group(group); 46 | 47 | Gtk::RadioButton::Group sort_group = m_rb_sort_alpha.get_group(); 48 | m_rb_sort_rtime.set_group(sort_group); 49 | m_rb_sort_time.set_group(sort_group); 50 | m_rb_sort_ralpha.set_group(sort_group); 51 | 52 | m_cfg = cfg; 53 | DisplayMode mode = m_cfg->get_display_mode(); 54 | 55 | if (mode == ICON) { 56 | if (m_cfg->get_icon_captions()) 57 | m_rb_view_icon_caps.set_active(true); 58 | else 59 | m_rb_view_icon.set_active(true); 60 | } 61 | else 62 | m_rb_view_list.set_active(true); 63 | 64 | bool recurse = m_cfg->get_recurse(); 65 | m_cb_recurse.set_active(recurse); 66 | 67 | Thumbview::SortMode sort_mode = m_cfg->get_sort_mode(); 68 | if (sort_mode == Thumbview::SORT_ALPHA) 69 | m_rb_sort_alpha.set_active(true); 70 | else if (sort_mode == Thumbview::SORT_RALPHA) 71 | m_rb_sort_ralpha.set_active(true); 72 | else if (sort_mode == Thumbview::SORT_TIME) 73 | m_rb_sort_time.set_active(true); 74 | else 75 | m_rb_sort_rtime.set_active(true); 76 | 77 | // signal handlers for directory buttons 78 | m_btn_adddir.signal_clicked().connect(sigc::mem_fun(this, &NPrefsWindow::sighandle_click_adddir)); 79 | m_btn_deldir.signal_clicked().connect(sigc::mem_fun(this, &NPrefsWindow::sighandle_click_deldir)); 80 | 81 | // fill dir list from config 82 | Gtk::TreeModelColumnRecord tmcr; 83 | tmcr.add(m_tmc_dir); 84 | 85 | m_store_dirs = Gtk::ListStore::create(tmcr); 86 | m_list_dirs.set_model(m_store_dirs); 87 | m_list_dirs.append_column("Directory", m_tmc_dir); 88 | m_list_dirs.set_headers_visible(false); 89 | 90 | VecStrs vecdirs = m_cfg->get_dirs(); 91 | for (VecStrs::iterator i = vecdirs.begin(); i != vecdirs.end(); i++) 92 | { 93 | Gtk::TreeModel::iterator iter = m_store_dirs->append(); 94 | (*iter)[m_tmc_dir] = *i; 95 | } 96 | 97 | // layout stuff 98 | m_align_view.set_padding(0, 0, 12, 0); 99 | m_align_view.add(m_vbox_view); 100 | 101 | m_frame_view.add(m_align_view); 102 | m_frame_view.set_shadow_type(Gtk::SHADOW_NONE); 103 | m_vbox_view.pack_start(m_rb_view_icon, false, true); 104 | m_vbox_view.pack_start(m_rb_view_icon_caps, false, true); 105 | m_vbox_view.pack_start(m_rb_view_list, false, true); 106 | 107 | m_align_sort.set_padding(0, 0, 12, 0); 108 | m_align_sort.add(m_vbox_sort); 109 | m_frame_sort.add(m_align_sort); 110 | m_frame_sort.set_shadow_type(Gtk::SHADOW_NONE); 111 | m_vbox_sort.pack_start(m_rb_sort_alpha, false, true); 112 | m_vbox_sort.pack_start(m_rb_sort_ralpha, false, true); 113 | m_vbox_sort.pack_start(m_rb_sort_time, false, true); 114 | m_vbox_sort.pack_start(m_rb_sort_rtime, false, true); 115 | 116 | m_align_dirs.set_padding(0, 0, 12, 0); 117 | m_align_dirs.add(m_vbox_dirs); 118 | 119 | m_frame_dirs.add(m_align_dirs); 120 | m_frame_dirs.set_shadow_type(Gtk::SHADOW_NONE); 121 | m_vbox_dirs.pack_start(m_scrolledwin, true, true); 122 | m_vbox_dirs.pack_start(m_hbox_dirbtns, false, true); 123 | 124 | m_scrolledwin.add(m_list_dirs); 125 | m_scrolledwin.set_shadow_type(Gtk::SHADOW_IN); 126 | m_scrolledwin.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); 127 | 128 | m_hbox_dirbtns.pack_start(m_btn_adddir, false, true); 129 | m_hbox_dirbtns.pack_start(m_btn_deldir, false, true); 130 | m_hbox_dirbtns.pack_end(m_cb_recurse, false, true); 131 | 132 | get_vbox()->pack_start(m_frame_view, false, true); 133 | get_vbox()->pack_start(m_frame_sort, false, true); 134 | get_vbox()->pack_start(m_frame_dirs, true, true); 135 | 136 | add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); 137 | add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK); 138 | set_response_sensitive(Gtk::RESPONSE_CANCEL); 139 | 140 | set_default_size(350, 350); 141 | 142 | show_all(); 143 | } 144 | 145 | ///////////////////////////////////////////////////////////////////////////// 146 | 147 | void NPrefsWindow::on_response(int response_id) 148 | { 149 | if (response_id == Gtk::RESPONSE_OK) 150 | { 151 | DisplayMode mode = (m_rb_view_icon.get_active() || m_rb_view_icon_caps.get_active()) ? ICON : LIST; 152 | m_cfg->set_display_mode(mode); 153 | m_cfg->set_icon_captions(m_rb_view_icon_caps.get_active()); 154 | m_cfg->set_recurse((m_cb_recurse.get_active()) ? true : false); 155 | if (m_rb_sort_alpha.get_active()) 156 | m_cfg->set_sort_mode(Thumbview::SORT_ALPHA); 157 | else if (m_rb_sort_ralpha.get_active()) 158 | m_cfg->set_sort_mode(Thumbview::SORT_RALPHA); 159 | else if (m_rb_sort_time.get_active()) 160 | m_cfg->set_sort_mode(Thumbview::SORT_TIME); 161 | else 162 | m_cfg->set_sort_mode(Thumbview::SORT_RTIME); 163 | 164 | m_cfg->save_cfg(); 165 | } 166 | 167 | hide(); 168 | } 169 | 170 | ///////////////////////////////////////////////////////////////////////////// 171 | 172 | void NPrefsWindow::sighandle_click_adddir() 173 | { 174 | Gtk::FileChooserDialog dialog("Folder", Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); 175 | dialog.set_transient_for(*this); 176 | 177 | dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); 178 | dialog.add_button("Select", Gtk::RESPONSE_OK); 179 | 180 | int result = dialog.run(); 181 | if (result == Gtk::RESPONSE_OK) 182 | { 183 | std::string newdir = dialog.get_filename(); 184 | if (m_cfg->add_dir(newdir)) 185 | { 186 | Gtk::TreeModel::iterator iter = m_store_dirs->append(); 187 | (*iter)[m_tmc_dir] = newdir; 188 | } 189 | } 190 | } 191 | 192 | ///////////////////////////////////////////////////////////////////////////// 193 | 194 | void NPrefsWindow::sighandle_click_deldir() 195 | { 196 | Gtk::TreeIter iter = m_list_dirs.get_selection()->get_selected(); 197 | if (!iter) 198 | return; 199 | 200 | std::string dir = (*iter)[m_tmc_dir]; 201 | 202 | Glib::ustring msg = Glib::ustring::compose(_("Are you sure you want to delete %1?"), dir); 203 | 204 | Gtk::MessageDialog dialog(*this, msg, true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO); 205 | 206 | int result = dialog.run(); 207 | if (result == Gtk::RESPONSE_YES) 208 | { 209 | if (m_cfg->rm_dir(dir)) 210 | { 211 | m_store_dirs->erase(iter); 212 | } 213 | } 214 | } 215 | 216 | -------------------------------------------------------------------------------- /src/NPrefsWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2009 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #ifndef _NPREFSWINDOW_H_ 23 | #define _NPREFSWINDOW_H_ 24 | 25 | #include "main.h" 26 | #include "Config.h" 27 | 28 | class NPrefsWindow : public Gtk::Dialog 29 | { 30 | public: 31 | NPrefsWindow(Gtk::Window& parent, Config* cfg); 32 | virtual ~NPrefsWindow() {} 33 | 34 | protected: 35 | virtual void on_response(int response_id); 36 | protected: 37 | Gtk::VBox m_vbox_view; 38 | Gtk::VBox m_vbox_dirs; 39 | Gtk::VBox m_vbox_sort; 40 | Gtk::HBox m_hbox_dirbtns; 41 | Gtk::Frame m_frame_view; 42 | Gtk::Frame m_frame_dirs; 43 | Gtk::Frame m_frame_sort; 44 | Gtk::Alignment m_align_view; 45 | Gtk::Alignment m_align_dirs; 46 | Gtk::Alignment m_align_sort; 47 | Gtk::RadioButton m_rb_view_icon; 48 | Gtk::RadioButton m_rb_view_icon_caps; 49 | Gtk::RadioButton m_rb_view_list; 50 | Gtk::RadioButton m_rb_sort_alpha; 51 | Gtk::RadioButton m_rb_sort_ralpha; 52 | Gtk::RadioButton m_rb_sort_time; 53 | Gtk::RadioButton m_rb_sort_rtime; 54 | Gtk::CheckButton m_cb_recurse; 55 | 56 | Gtk::ScrolledWindow m_scrolledwin; 57 | Gtk::TreeView m_list_dirs; 58 | Gtk::Button m_btn_adddir; 59 | Gtk::Button m_btn_deldir; 60 | Config* m_cfg; 61 | 62 | // handlers 63 | void sighandle_click_adddir(); 64 | void sighandle_click_deldir(); 65 | 66 | // tree view noise 67 | Glib::RefPtr m_store_dirs; 68 | Gtk::TreeModelColumn m_tmc_dir; 69 | }; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /src/NWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #ifndef _NWINDOW_H_ 23 | #define _NWINDOW_H_ 24 | 25 | #include "main.h" 26 | #include "Thumbview.h" 27 | #include "ImageCombo.h" 28 | #include "SetBG.h" 29 | 30 | class NWindow : public Gtk::Window { 31 | public: 32 | NWindow(SetBG* bg_setter); 33 | void show (void); 34 | virtual ~NWindow (); 35 | 36 | Thumbview view; 37 | void sighandle_dblclick_item(const Gtk::TreeModel::Path& path); 38 | void sighandle_click_apply(void); 39 | void sighandle_mode_change(void); 40 | 41 | void set_default_selections(); 42 | 43 | std::map map_displays; // a map of current displays on the running instance to their display names 44 | void set_default_display(int display); 45 | 46 | bool set_bg(Glib::ustring file); 47 | 48 | protected: 49 | Glib::RefPtr m_action_group; 50 | Glib::RefPtr m_ui_manager; 51 | Gtk::VBox main_vbox; 52 | Gtk::HBox bot_hbox; 53 | SetBG* bg_setter; 54 | 55 | ImageCombo select_mode, select_display; 56 | 57 | Gtk::Button apply; 58 | Gtk::Button btn_prefs; 59 | Gtk::ColorButton button_bgcolor; 60 | 61 | bool m_dirty; // set if the user double clicks to preview but forgets to press apply 62 | 63 | void setup_select_boxes(); 64 | 65 | void sighandle_accel_quit(); 66 | void sighandle_random(); 67 | void sighandle_togb_list_toggled(); 68 | void sighandle_togb_icon_toggled(); 69 | void sighandle_btn_prefs(); 70 | void apply_bg(); 71 | 72 | virtual bool on_delete_event(GdkEventAny *event); 73 | bool handle_exit_request(); 74 | 75 | #ifdef USE_XINERAMA 76 | // xinerama stuff 77 | XineramaScreenInfo* xinerama_info; 78 | gint xinerama_num_screens; 79 | #endif 80 | }; 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /src/SetBG.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #ifndef _SETBG_H_ 23 | #define _SETBG_H_ 24 | 25 | #include "main.h" 26 | #include 27 | #include 28 | #ifdef USE_XINERAMA 29 | #include 30 | #endif 31 | 32 | typedef int (*XErrorHandler)(Display*, XErrorEvent*); 33 | 34 | /** 35 | * Utility class for setting the background image. 36 | * 37 | * @author Dave Foster 38 | * @date 30 Aug 2005 39 | */ 40 | class SetBG { 41 | public: 42 | // NOTE: do not change the order of these, they are changed to integer and 43 | // put on disk. 44 | enum SetMode { 45 | SET_SCALE, 46 | SET_TILE, 47 | SET_CENTER, 48 | SET_ZOOM, 49 | SET_AUTO, 50 | SET_ZOOM_FILL 51 | }; 52 | 53 | enum RootWindowType { 54 | DEFAULT, 55 | NAUTILUS, 56 | XFCE, 57 | UNKNOWN, 58 | XINERAMA, 59 | NEMO, 60 | PCMANFM, 61 | IGNORE // Conky, etc 62 | }; 63 | 64 | typedef struct RootWindowData { 65 | Window window; 66 | RootWindowType type; 67 | std::string wm_class; 68 | 69 | RootWindowData() : type(UNKNOWN) {} 70 | RootWindowData(Window newWindow) : type(UNKNOWN), window(newWindow) {} 71 | RootWindowData(Window newWindow, RootWindowType newType) : type(newType), window(newWindow) {} 72 | RootWindowData(Window newWindow, RootWindowType newType, std::string newClass) : type(newType), window(newWindow), wm_class(newClass) {} 73 | } RootWindowData; 74 | 75 | virtual bool set_bg(Glib::ustring &disp, 76 | Glib::ustring file, 77 | SetMode mode, 78 | Gdk::Color bgcolor); 79 | 80 | virtual void restore_bgs(); 81 | 82 | virtual Glib::ustring make_display_key(gint head) = 0; 83 | virtual std::map get_active_displays() = 0; 84 | virtual Glib::ustring get_fullscreen_key() = 0; 85 | 86 | static SetBG* get_bg_setter(); 87 | 88 | static Glib::ustring mode_to_string( const SetMode mode ); 89 | static SetMode string_to_mode( const Glib::ustring str ); 90 | 91 | // public methods used on save/shutdown to work with first pixmaps 92 | void clear_first_pixmaps(); 93 | void reset_first_pixmaps(); 94 | void disable_pixmap_save(); 95 | 96 | virtual bool save_to_config(); 97 | 98 | protected: 99 | 100 | virtual Glib::ustring get_prefix() = 0; 101 | 102 | static Glib::RefPtr make_scale(const Glib::RefPtr, const gint, const gint, Gdk::Color); 103 | static Glib::RefPtr make_tile(const Glib::RefPtr, const gint, const gint, Gdk::Color); 104 | static Glib::RefPtr make_center(const Glib::RefPtr, const gint, const gint, Gdk::Color); 105 | static Glib::RefPtr make_zoom(const Glib::RefPtr, const gint, const gint, Gdk::Color); 106 | static Glib::RefPtr make_zoom_fill(const Glib::RefPtr, const gint, const gint, Gdk::Color); 107 | static SetMode get_real_mode(const Glib::RefPtr, const gint, const gint); 108 | 109 | static guint32 GdkColorToUint32(const Gdk::Color); 110 | 111 | static int handle_x_errors(Display *display, XErrorEvent *error); 112 | static std::vector find_desktop_windows(Display *display, Window curwindow); 113 | static RootWindowData get_root_window_data(Glib::RefPtr display); 114 | static RootWindowData check_window_type(Display *display, Window window); 115 | 116 | Glib::RefPtr make_resized_pixbuf(Glib::RefPtr pixbuf, SetBG::SetMode mode, Gdk::Color bgcolor, gint tarw, gint tarh); 117 | virtual Glib::RefPtr get_display(const Glib::ustring& disp); 118 | 119 | virtual bool get_target_dimensions(Glib::ustring& disp, gint winx, gint winy, gint winw, gint winh, gint& tarx, gint& tary, gint& tarw, gint& tarh); 120 | Glib::RefPtr get_or_create_pixmap(Glib::ustring disp, Glib::RefPtr _display, Glib::RefPtr window, gint winw, gint winh, gint wind, Glib::RefPtr colormap); 121 | 122 | 123 | Pixmap* get_current_pixmap(Glib::RefPtr _display); 124 | void set_current_pixmap(Glib::RefPtr _display, Pixmap* new_pixmap); 125 | 126 | // data for saving initial pixmap on first set (for restore later) 127 | bool has_set_once; 128 | std::map first_pixmaps; 129 | }; 130 | 131 | /** 132 | * Concrete setter for X windows (default). 133 | */ 134 | class SetBGXWindows : public SetBG { 135 | public: 136 | virtual std::map get_active_displays(); 137 | virtual Glib::ustring get_fullscreen_key(); 138 | protected: 139 | virtual Glib::ustring get_prefix(); 140 | virtual Glib::ustring make_display_key(gint head); 141 | virtual Glib::RefPtr get_display(Glib::ustring& disp); 142 | }; 143 | 144 | #ifdef USE_XINERAMA 145 | class SetBGXinerama : public SetBG { 146 | public: 147 | void set_xinerama_info(XineramaScreenInfo* xinerama_info, gint xinerama_num_screens); 148 | virtual std::map get_active_displays(); 149 | virtual Glib::ustring get_fullscreen_key(); 150 | 151 | protected: 152 | // xinerama stuff 153 | XineramaScreenInfo* xinerama_info; 154 | gint xinerama_num_screens; 155 | 156 | virtual Glib::ustring get_prefix(); 157 | virtual Glib::ustring make_display_key(gint head); 158 | virtual bool get_target_dimensions(Glib::ustring& disp, gint winx, gint winy, gint winw, gint winh, gint& tarx, gint& tary, gint& tarw, gint& tarh); 159 | }; 160 | #endif 161 | 162 | class SetBGGnome : public SetBG { 163 | public: 164 | virtual bool set_bg(Glib::ustring &disp, 165 | Glib::ustring file, 166 | SetMode mode, 167 | Gdk::Color bgcolor); 168 | 169 | virtual std::map get_active_displays(); 170 | virtual Glib::ustring get_fullscreen_key(); 171 | virtual bool save_to_config(); 172 | protected: 173 | virtual Glib::ustring get_prefix(); 174 | virtual Glib::ustring make_display_key(gint head); 175 | virtual Glib::ustring get_gsettings_key(); 176 | virtual void set_show_desktop(); 177 | }; 178 | 179 | class SetBGNemo : public SetBGGnome { 180 | public: 181 | virtual bool save_to_config(); 182 | protected: 183 | virtual Glib::ustring get_gsettings_key(); 184 | virtual void set_show_desktop(); 185 | }; 186 | 187 | class SetBGPcmanfm : public SetBGGnome { 188 | public: 189 | virtual Glib::ustring get_fullscreen_key(); 190 | virtual bool set_bg(Glib::ustring &disp, 191 | Glib::ustring file, 192 | SetMode mode, 193 | Gdk::Color bgcolor); 194 | 195 | virtual std::map get_active_displays(); 196 | virtual bool save_to_config(); 197 | protected: 198 | virtual Glib::ustring make_display_key(gint head); 199 | }; 200 | 201 | class SetBGXFCE : public SetBG { 202 | public: 203 | virtual Glib::ustring get_fullscreen_key(); 204 | virtual std::map get_active_displays(); 205 | virtual bool save_to_config(); 206 | virtual bool set_bg(Glib::ustring &disp, 207 | Glib::ustring file, 208 | SetMode mode, 209 | Gdk::Color bgcolor); 210 | protected: 211 | virtual Glib::ustring get_prefix(); 212 | virtual Glib::ustring make_display_key(gint head); 213 | 214 | bool call_xfconf(Glib::ustring disp, std::string key, const std::vector& params); 215 | }; 216 | 217 | #endif 218 | -------------------------------------------------------------------------------- /src/Thumbview.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #ifndef _THUMBVIEW_H_ 23 | #define _THUMBVIEW_H_ 24 | 25 | #include "main.h" 26 | #include 27 | #include 28 | 29 | #ifdef USE_INOTIFY 30 | #include "Inotify.h" 31 | #endif 32 | 33 | struct TreePair { 34 | Glib::ustring file; 35 | Gtk::TreeModel::iterator iter; 36 | Glib::RefPtr thumb; 37 | }; 38 | 39 | class Thumbview; 40 | 41 | class DelayLoadingStore : public Gtk::ListStore 42 | { 43 | public: 44 | static Glib::RefPtr create(const Gtk::TreeModelColumnRecord& columns) 45 | { 46 | return Glib::RefPtr(new DelayLoadingStore(columns)); 47 | } 48 | 49 | protected: 50 | DelayLoadingStore() : Gtk::ListStore() {} 51 | DelayLoadingStore(const Gtk::TreeModelColumnRecord& columns) : Gtk::ListStore(columns) {} 52 | 53 | protected: 54 | virtual void get_value_vfunc (const iterator& iter, int column, Glib::ValueBase& value) const; 55 | 56 | public: 57 | void set_queue(GAsyncQueue *queue) { aqueue_loadthumbs = queue; } 58 | void set_thumbview(Thumbview *view) { thumbview = view; } 59 | 60 | protected: 61 | GAsyncQueue *aqueue_loadthumbs; 62 | Thumbview *thumbview; 63 | }; 64 | 65 | ///////////////////////////////////////////////////////////////////////////// 66 | 67 | /** 68 | * Column record for the Thumbview store. 69 | */ 70 | class ThumbviewRecord : public Gtk::TreeModelColumnRecord 71 | { 72 | public: 73 | ThumbviewRecord() 74 | { 75 | add(Thumbnail); 76 | add(Description); 77 | add(Filename); 78 | add(Time); 79 | add(LoadingThumb); 80 | add(CurBGOnDisp); 81 | add(RootDir); 82 | } 83 | 84 | Gtk::TreeModelColumn Filename; 85 | Gtk::TreeModelColumn Description; 86 | Gtk::TreeModelColumn< Glib::RefPtr > Thumbnail; 87 | Gtk::TreeModelColumn Time; 88 | Gtk::TreeModelColumn LoadingThumb; 89 | Gtk::TreeModelColumn CurBGOnDisp; 90 | Gtk::TreeModelColumn RootDir; 91 | }; 92 | 93 | ///////////////////////////////////////////////////////////////////////////// 94 | 95 | enum DisplayMode 96 | { 97 | LIST, 98 | ICON 99 | }; 100 | 101 | ///////////////////////////////////////////////////////////////////////////// 102 | 103 | class Thumbview : public Gtk::ScrolledWindow { 104 | public: 105 | Thumbview (); 106 | ~Thumbview (); 107 | 108 | typedef enum { 109 | SORT_ALPHA, 110 | SORT_RALPHA, 111 | SORT_TIME, 112 | SORT_RTIME 113 | } SortMode; 114 | 115 | Glib::RefPtr store; 116 | Gtk::TreeView view; 117 | Gtk::IconView iview; 118 | ThumbviewRecord record; 119 | 120 | // dispatcher 121 | Glib::Dispatcher dispatch_thumb; 122 | 123 | // thread/idle funcs 124 | void load_cache_images(); 125 | void create_cache_images(); 126 | void load_dir(std::string dir); 127 | void load_dir(const VecStrs& dirs); 128 | void unload_dir(std::string dir); 129 | 130 | void set_sort_mode (SortMode mode); 131 | // search compare function 132 | bool search_compare (const Glib::RefPtr& model, int column, const Glib::ustring& key, const Gtk::TreeModel::iterator& iter); 133 | 134 | bool select(const Gtk::TreeModel::iterator *iter); 135 | 136 | // loading image 137 | Glib::RefPtr loading_image; 138 | 139 | // "cache" of config - maps displays to full filenames 140 | std::map map_setbgs; 141 | void load_map_setbgs(); 142 | 143 | DisplayMode m_curmode; 144 | 145 | void set_current_display_mode(DisplayMode newmode); 146 | DisplayMode get_current_display_mode() { return m_curmode; } 147 | 148 | void set_icon_captions(gboolean caps); 149 | gboolean get_icon_captions() { return m_icon_captions; } 150 | 151 | Gtk::TreeModel::iterator get_selected(); 152 | void set_selected(const Gtk::TreePath&, Gtk::TreeModel::const_iterator*); 153 | sigc::signal signal_selected; 154 | 155 | const Glib::TimeVal& get_last_loaded_time() 156 | { return m_last_loaded_time; } 157 | 158 | protected: 159 | 160 | Glib::TimeVal m_last_loaded_time; 161 | 162 | void update_last_loaded_time() 163 | { m_last_loaded_time.assign_current_time(); } 164 | 165 | void sighandle_iview_activated(const Gtk::TreePath& path); 166 | void sighandle_view_activated(const Gtk::TreePath& path, Gtk::TreeViewColumn *column); 167 | 168 | #ifdef USE_INOTIFY 169 | void file_deleted_callback(std::string filename); 170 | void file_changed_callback(std::string filename); 171 | void file_created_callback(std::string filename); 172 | std::map watches; 173 | #endif 174 | 175 | void add_file(std::string filename, std::string rootdir); 176 | void handle_dispatch_thumb(); 177 | 178 | VecStrs m_list_loaded_rootdirs; 179 | 180 | Gtk::TreeViewColumn *col_thumb; 181 | Gtk::TreeViewColumn *col_desc; 182 | 183 | Gtk::CellRendererPixbuf rend_img; 184 | Gtk::CellRendererText rend; 185 | 186 | gboolean m_icon_captions; 187 | 188 | // utility functions 189 | Glib::ustring cache_file(Glib::ustring file); 190 | void update_thumbnail(Glib::ustring file, Gtk::TreeModel::iterator iter, Glib::RefPtr pb); 191 | 192 | // load thumbnail queue 193 | GAsyncQueue* aqueue_loadthumbs; 194 | GAsyncQueue* aqueue_createthumbs; 195 | GAsyncQueue* aqueue_donethumbs; 196 | 197 | }; 198 | 199 | #endif 200 | -------------------------------------------------------------------------------- /src/Util.cc: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "Util.h" 23 | #include "SetBG.h" 24 | #include "Config.h" 25 | #include 26 | #include 27 | #include "gcs-i18n.h" 28 | #include 29 | #include "NWindow.h" 30 | 31 | namespace Util { 32 | 33 | // parafarmance testing / bug finding 34 | // http://primates.ximian.com/~federico/news-2006-03.html#09 35 | // 36 | // this functiona always does something. If the enable-debug flag is 37 | // on when configured, this prints out to stdout. if not, it tries to 38 | // access() a string which is useful for the link above. 39 | void program_log (const char *format, ...) 40 | { 41 | va_list args; 42 | char *formatted, *str; 43 | 44 | va_start (args, format); 45 | formatted = g_strdup_vprintf (format, args); 46 | va_end (args); 47 | 48 | str = g_strdup_printf ("MARK: %s: %s", g_get_prgname(), formatted); 49 | g_free (formatted); 50 | 51 | #ifdef DEBUG 52 | g_printf("%s\n", str); 53 | #else 54 | access (str, F_OK); 55 | #endif 56 | g_free (str); 57 | } 58 | 59 | // Converts a relative path to an absolute path. 60 | // Probably works best if the path doesn't start with a '/' :) 61 | // XXX: There must be a better way to do this, haha. 62 | Glib::ustring path_to_abs_path(Glib::ustring path) { 63 | unsigned parents = 0; 64 | Glib::ustring cwd = Glib::get_current_dir(); 65 | Glib::ustring::size_type pos; 66 | 67 | // find out how far up we have to go. 68 | while( (pos = path.find("../", 0)) !=Glib::ustring::npos ) { 69 | path.erase(0, 3); 70 | parents++; 71 | } 72 | 73 | // now erase that many directories from the path to the current 74 | // directory. 75 | 76 | while( parents ) { 77 | if ( (pos = cwd.rfind ('/')) != Glib::ustring::npos) { 78 | // remove this directory from the path 79 | cwd.erase (pos); 80 | } 81 | parents--; 82 | } 83 | 84 | return cwd + '/' + path; 85 | } 86 | 87 | /** 88 | * Creates an instance of an ArgParser with all options set up. 89 | * 90 | * @returns An ArgParser instance. 91 | */ 92 | ArgParser* create_arg_parser() { 93 | 94 | ArgParser* parser = new ArgParser(); 95 | parser->register_option("restore", _("Restore saved backgrounds")); 96 | parser->register_option("no-recurse", _("Do not recurse into subdirectories")); 97 | parser->register_option("sort", _("How to sort the backgrounds. Valid options are:\n\t\t\t* alpha, for alphanumeric sort\n\t\t\t* ralpha, for reverse alphanumeric sort\n\t\t\t* time, for last modified time sort (oldest first)\n\t\t\t* rtime, for reverse last modified time sort (newest first)"), true); 98 | parser->register_option("set-color", _("background color in hex, #000000 by default"), true); 99 | parser->register_option("head", _("Select xinerama/multihead display in GUI, 0..n, -1 for full"), true); 100 | parser->register_option("force-setter", _("Force setter engine: xwindows, xinerama, gnome, pcmanfm, xfce"), true); 101 | parser->register_option("random", _("Choose random background from config or given directory")); 102 | 103 | // command line set modes 104 | Glib::ustring openp(" ("); 105 | Glib::ustring closep(")"); 106 | parser->register_option("set-scaled", _("Sets the background to the given file") + openp + _("scaled") + closep); 107 | parser->register_option("set-tiled", _("Sets the background to the given file") + openp + _("tiled") + closep); 108 | parser->register_option("set-auto", _("Sets the background to the given file") + openp + _("auto") + closep); 109 | parser->register_option("set-centered", _("Sets the background to the given file") + openp + _("centered") + closep); 110 | parser->register_option("set-zoom", _("Sets the background to the given file") + openp + _("zoom") + closep); 111 | parser->register_option("set-zoom-fill", _("Sets the background to the given file") + openp + _("zoom-fill") + closep); 112 | parser->register_option("save", _("Saves the background permanently")); 113 | 114 | std::vector vecsetopts; 115 | vecsetopts.push_back("set-scaled"); 116 | vecsetopts.push_back("set-tiled"); 117 | vecsetopts.push_back("set-auto"); 118 | vecsetopts.push_back("set-centered"); 119 | vecsetopts.push_back("set-zoom"); 120 | vecsetopts.push_back("set-zoom-fill"); 121 | 122 | parser->make_exclusive(vecsetopts); 123 | 124 | return parser; 125 | } 126 | 127 | /** 128 | * Prepares the inputted start dir to the conventions needed throughout the program. 129 | * 130 | * Changes a relative dir to a absolute dir, trims terminating slash. 131 | */ 132 | std::string fix_start_dir(std::string startdir) { 133 | 134 | // trims the terminating '/'. if it exists 135 | if ( startdir[startdir.length()-1] == '/' ) { 136 | startdir.resize(startdir.length()-1); 137 | } 138 | 139 | // if this is not an absolute path, make it one. 140 | if ( !Glib::path_is_absolute(startdir) ) { 141 | startdir = Util::path_to_abs_path(startdir); 142 | } 143 | 144 | return startdir; 145 | } 146 | 147 | /** 148 | * Picks a random file from the given path. 149 | */ 150 | std::string pick_random_file(std::string path, bool recurse) 151 | { 152 | std::pair lists = get_image_files(path, recurse); 153 | Glib::Rand rando; 154 | 155 | if (lists.first.size() == 0) { 156 | return ""; 157 | } 158 | 159 | int idx = rando.get_int_range(0, lists.first.size()); 160 | return lists.first[idx]; 161 | } 162 | 163 | /** 164 | * Picks a given file from the given paths. 165 | */ 166 | std::string pick_random_file(VecStrs paths, bool recurse) 167 | { 168 | VecStrs all_files; 169 | Glib::Rand rando; 170 | 171 | for (VecStrs::const_iterator i = paths.begin(); i != paths.end(); i++) { 172 | std::pair lists = get_image_files(*i, recurse); 173 | 174 | all_files.insert(all_files.end(), lists.first.begin(), lists.first.end()); 175 | } 176 | 177 | if (all_files.size() == 0) { 178 | return ""; 179 | } 180 | 181 | int idx = rando.get_int_range(0, all_files.size()); 182 | return all_files[idx]; 183 | } 184 | 185 | /** 186 | * Returns a pair of image files, directories discovered from searching the given path. 187 | * 188 | * If recurse is not true, the second part of the pair will always be length 1 and match 189 | * the passed in path. 190 | */ 191 | std::pair get_image_files(std::string path, bool recurse) 192 | { 193 | std::queue queue_dirs; 194 | Glib::Dir *dirhandle; 195 | VecStrs dir_list; // full list of the dirs we've seen so we don't get dups 196 | VecStrs file_list; 197 | 198 | dir_list.push_back(path); 199 | queue_dirs.push(path); 200 | 201 | while (!queue_dirs.empty()) { 202 | std::string curdir = queue_dirs.front(); 203 | queue_dirs.pop(); 204 | 205 | try { 206 | dirhandle = new Glib::Dir(curdir); 207 | } catch (const Glib::FileError& e) { 208 | std::cerr << _("Could not open dir") << " " << curdir << ": " << e.what() << "\n"; 209 | continue; 210 | } 211 | 212 | for (Glib::Dir::iterator i = dirhandle->begin(); i != dirhandle->end(); i++) { 213 | Glib::ustring fullstr = Glib::build_filename(curdir, *i); 214 | 215 | if (Glib::file_test(fullstr, Glib::FILE_TEST_IS_DIR)) 216 | { 217 | if (recurse) 218 | { 219 | if (std::find(dir_list.begin(), dir_list.end(), fullstr) == dir_list.end()) 220 | { 221 | dir_list.push_back(fullstr); 222 | queue_dirs.push(fullstr); 223 | } 224 | } 225 | } 226 | else { 227 | if (is_image(fullstr) ) { 228 | file_list.push_back(fullstr); 229 | } 230 | } 231 | } 232 | 233 | delete dirhandle; 234 | } 235 | 236 | return std::pair(file_list, dir_list); 237 | } 238 | 239 | /** 240 | * Tests the file to see if it is an image 241 | * TODO: come up with less sux way of doing it than extension 242 | * 243 | * @param file The filename to test 244 | * @return If its an image or not 245 | */ 246 | bool is_image(std::string file) { 247 | if (file.find(".png") != std::string::npos || 248 | file.find(".PNG") != std::string::npos || 249 | file.find(".jpg") != std::string::npos || 250 | file.find(".JPG") != std::string::npos || 251 | file.find(".jpeg") != std::string::npos || 252 | file.find(".JPEG") != std::string::npos || 253 | file.find(".gif") != std::string::npos || 254 | file.find(".GIF") != std::string::npos || 255 | file.find(".svg") != std::string::npos || 256 | file.find(".SVG") != std::string::npos) 257 | return true; 258 | 259 | return false; 260 | } 261 | 262 | /** 263 | * Determines if the passed display is one that is currently seen by the program. 264 | * 265 | * Displays are passed in here to determine if they need to be shown as the "current 266 | * background". 267 | */ 268 | bool is_display_relevant(Gtk::Window* window, Glib::ustring display) 269 | { 270 | // cast window to an NWindow. we have to do this to avoid a circular dep 271 | NWindow *nwindow = dynamic_cast(window); 272 | return (nwindow->map_displays.find(display) != nwindow->map_displays.end()); 273 | } 274 | 275 | /** 276 | * Makes a string for the UI to indicate it is the currently selected background. 277 | * 278 | * Checks to make sure the display is relevant with is_display_relevant(). If it is 279 | * not relevent, it simply returns the filename. 280 | * 281 | * ex: "filename\nCurrently set background for Screen 1" 282 | */ 283 | Glib::ustring make_current_set_string(Gtk::Window* window, Glib::ustring filename, Glib::ustring display) 284 | { 285 | // cast window to an NWindow. we have to do this to avoid a circular dep 286 | NWindow *nwindow = dynamic_cast(window); 287 | 288 | Glib::ustring shortfile(filename, filename.rfind("/")+1); 289 | if (!is_display_relevant(window, display)) 290 | return shortfile; 291 | 292 | std::ostringstream ostr; 293 | ostr << shortfile << "\n\n" << "" << _("Currently set background"); 294 | 295 | if (nwindow->map_displays.size() > 1) 296 | ostr << " " << _("for") << " " << nwindow->map_displays[display]; 297 | 298 | ostr << ""; 299 | 300 | return ostr.str(); 301 | } 302 | 303 | /** 304 | * Converts a Gdk::Color to a string representation with a #. 305 | * 306 | * @param color The color to convert 307 | * @return A hex string 308 | */ 309 | Glib::ustring color_to_string(Gdk::Color color) { 310 | guchar red = guchar(color.get_red_p() * 255); 311 | guchar green = guchar(color.get_green_p() * 255); 312 | guchar blue = guchar(color.get_blue_p() * 255); 313 | 314 | char * c_str = new char[7]; 315 | 316 | snprintf(c_str, 7, "%.2x%.2x%.2x", red, green, blue); 317 | Glib::ustring string = '#' + Glib::ustring(c_str); 318 | 319 | delete[] c_str; 320 | return string; 321 | } 322 | 323 | } 324 | -------------------------------------------------------------------------------- /src/Util.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #ifndef _UTIL_H_ 23 | #define _UTIL_H_ 24 | 25 | #include "ArgParser.h" 26 | #include "SetBG.h" 27 | #include 28 | 29 | namespace Util { 30 | 31 | void program_log(const char *format, ...); 32 | Glib::ustring path_to_abs_path(Glib::ustring path); 33 | ArgParser* create_arg_parser(); 34 | std::string fix_start_dir(std::string startdir); 35 | std::string pick_random_file(std::string path, bool recurse = false); 36 | std::string pick_random_file(VecStrs paths, bool recurse = false); 37 | 38 | std::pair get_image_files(std::string path, bool recurse = false); 39 | bool is_image(std::string file); 40 | 41 | bool is_display_relevant(Gtk::Window* window, Glib::ustring display); 42 | Glib::ustring make_current_set_string(Gtk::Window* window, Glib::ustring filename, Glib::ustring display); 43 | 44 | Glib::ustring color_to_string(Gdk::Color color); 45 | } 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /src/gcs-i18n.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PROJECT: GNOME Colorscheme 3 | * 4 | * AUTHOR: Jonathon Jongsma 5 | * 6 | * Copyright (c) 2005 Jonathon Jongsma 7 | * 8 | * License: 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the 21 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | * Boston, MA 02111-1307 USA 23 | * 24 | *******************************************************************************/ 25 | 26 | #ifndef __GCS_I18N_H_ 27 | #define __GCS_I18N_H_ 28 | 29 | #ifdef HAVE_CONFIG_H 30 | #include "config.h" 31 | #endif /* HAVE_CONFIG_H */ 32 | 33 | #ifdef ENABLE_NLS 34 | #include 35 | #define _(String) gettext(String) 36 | #ifdef gettext_noop 37 | #define N_(String) gettext_noop(String) 38 | #else 39 | #define N_(String) (String) 40 | #endif 41 | #else /* NLS is disabled */ 42 | #define _(String) (String) 43 | #define N_(String) (String) 44 | #define textdomain(String) (String) 45 | #define gettext(String) (String) 46 | #define dgettext(Domain,String) (String) 47 | #define dcgettext(Domain,String,Type) (String) 48 | #define bindtextdomain(Domain,Directory) (Domain) 49 | #define bind_textdomain_codeset(Domain,Codeset) (Codeset) 50 | #endif /* ENABLE_NLS */ 51 | 52 | #endif /* __GCS_I18N_H_ */ 53 | -------------------------------------------------------------------------------- /src/main.cc: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include "main.h" 23 | #include "NWindow.h" 24 | #include "Config.h" 25 | #include "SetBG.h" 26 | #include "ArgParser.h" 27 | #include "Util.h" 28 | //#include "gettext.h" 29 | //#include 30 | #include "gcs-i18n.h" 31 | 32 | void restore_bgs(SetBG* bg_setter) 33 | { 34 | Util::program_log("entering restore_bgs()"); 35 | bg_setter->restore_bgs(); 36 | while( Gtk::Main::events_pending() ) 37 | Gtk::Main::iteration(); 38 | Util::program_log("leaving restore_bgs()"); 39 | } 40 | 41 | int set_bg_once(Config *cfg, SetBG* bg_setter, Glib::ustring path, int head, SetBG::SetMode mode, bool save, Gdk::Color col, bool random) 42 | { 43 | Util::program_log("entering set_bg_once()"); 44 | Glib::ustring disp; 45 | Glib::ustring file; 46 | 47 | if (random) { 48 | if (path.length() > 0) { 49 | if (Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) { 50 | path = Util::pick_random_file(path, cfg->get_recurse()); 51 | } 52 | } else { 53 | path = Util::pick_random_file(cfg->get_dirs(), cfg->get_recurse()); 54 | } 55 | 56 | if (path.length() == 0) { 57 | std::cerr << "Could not find an image to set!\n"; 58 | return 1; 59 | } 60 | } 61 | 62 | // path must be resolved to a file at this point, make sure it exists 63 | if (Glib::file_test(path, Glib::FILE_TEST_IS_REGULAR|Glib::FILE_TEST_IS_SYMLINK)) { 64 | file = path; 65 | } else { 66 | std::cerr << "Set must be called with a file!\n"; 67 | return 1; 68 | } 69 | 70 | // @TODO: test file for an image format supported 71 | 72 | // saving of pixmaps is for interactive only 73 | bg_setter->disable_pixmap_save(); 74 | 75 | disp = bg_setter->make_display_key(head); 76 | bool shouldSave = bg_setter->set_bg(disp, file, mode, col); 77 | 78 | if (save && shouldSave) 79 | Config::get_instance()->set_bg(disp, file, mode, col); 80 | 81 | while (Gtk::Main::events_pending()) 82 | Gtk::Main::iteration(); 83 | 84 | Util::program_log("leaving set_bg_once()"); 85 | return 0; 86 | } 87 | 88 | bool on_window_close_save_pos(GdkEventAny* event, Gtk::Window *window) 89 | { 90 | Config *cfg = Config::get_instance(); 91 | int x, y; 92 | window->get_position(x, y); 93 | cfg->set_pos(x, y); 94 | 95 | int w, h; 96 | window->get_size(w, h); 97 | cfg->set_size(w, h); 98 | 99 | return false; 100 | } 101 | 102 | #ifdef USE_INOTIFY 103 | bool poll_inotify(void) { 104 | Inotify::Watch::poll(0); 105 | return true; 106 | } 107 | #endif 108 | 109 | int main (int argc, char ** argv) { 110 | int xin_head = -1; 111 | bool random = false; 112 | bool set_once = false; 113 | SetBG::SetMode mode; 114 | 115 | 116 | // set up i18n 117 | bindtextdomain(PACKAGE, LOCALEDIR); 118 | bind_textdomain_codeset(PACKAGE, "UTF-8"); 119 | textdomain(PACKAGE); 120 | 121 | /* i18n::set_text_domain_dir(PACKAGE, LOCALEDIR); 122 | i18n::set_text_domain(PACKAGE);*/ 123 | 124 | Gtk::Main kit(argc, argv); 125 | Gtk::IconTheme::get_default()->append_search_path(NITROGEN_DATA_DIR 126 | G_DIR_SEPARATOR_S "icons"); 127 | if (!Glib::thread_supported()) Glib::thread_init(); 128 | Config *cfg = Config::get_instance(); 129 | ArgParser *parser = Util::create_arg_parser(); 130 | 131 | // parse command line 132 | if ( ! parser->parse(argc, argv) ) { 133 | std::cerr << _("Error parsing command line") << ": " << parser->get_error() << "\n"; 134 | return -1; 135 | } 136 | 137 | // if we got a help, display it and exit 138 | if ( parser->has_argument("help") ) { 139 | std::cout << parser->help_text() << "\n"; 140 | return 0; 141 | } 142 | 143 | // factory to make the correct setter, if no force specified on command line 144 | SetBG* setter; 145 | if (parser->has_argument("force-setter")) { 146 | Glib::ustring setter_str = parser->get_value("force-setter"); 147 | 148 | if (setter_str == "xwindows") 149 | setter = new SetBGXWindows(); 150 | #ifdef USE_XINERAMA 151 | else if (setter_str == "xinerama") { 152 | setter = new SetBGXinerama(); 153 | 154 | XineramaScreenInfo *xinerama_info; 155 | gint xinerama_num_screens; 156 | 157 | Glib::RefPtr dpy = Gdk::DisplayManager::get()->get_default_display(); 158 | xinerama_info = XineramaQueryScreens(GDK_DISPLAY_XDISPLAY(dpy->gobj()), &xinerama_num_screens); 159 | ((SetBGXinerama*)setter)->set_xinerama_info(xinerama_info, xinerama_num_screens); 160 | } 161 | #endif /* USE_XINERAMA */ 162 | else if (setter_str == "gnome") 163 | setter = new SetBGGnome(); 164 | else if (setter_str == "pcmanfm") 165 | setter = new SetBGPcmanfm(); 166 | else if (setter_str == "xfce") 167 | setter = new SetBGXFCE(); 168 | else 169 | setter = SetBG::get_bg_setter(); 170 | 171 | } else { 172 | setter = SetBG::get_bg_setter(); 173 | } 174 | 175 | // if we got restore, set it and exit 176 | if ( parser->has_argument("restore") ) { 177 | restore_bgs(setter); 178 | return 0; 179 | } 180 | 181 | // get the starting dir 182 | std::string startdir = parser->get_extra_args(); 183 | bool bcmdlinedir = startdir.length() > 0; 184 | if (bcmdlinedir) { 185 | startdir = Util::fix_start_dir(std::string(startdir)); 186 | 187 | if (!Glib::file_test(startdir, Glib::FILE_TEST_EXISTS)) { 188 | std::cerr << "Given path \"" << startdir << "\" does not exist!\n"; 189 | return 1; 190 | } 191 | } 192 | 193 | // load configuration if there is one 194 | cfg->load_cfg(); 195 | 196 | // should we set on the command line? 197 | Gdk::Color color("#000000"); 198 | if ( parser->has_argument("set-color") ) { 199 | Glib::ustring bgcolor_str = parser->get_value ("set-color"); 200 | color.parse(bgcolor_str); 201 | } 202 | 203 | if ( parser->has_argument("head") ) 204 | xin_head = parser->get_intvalue("head"); 205 | 206 | if (parser->has_argument("random")) 207 | random = true; 208 | 209 | if ( parser->has_argument("set-tiled") ) { 210 | set_once = true; 211 | mode = SetBG::SET_TILE; 212 | } 213 | 214 | if ( parser->has_argument("set-scaled") ) { 215 | set_once = true; 216 | mode = SetBG::SET_SCALE; 217 | } 218 | 219 | if ( parser->has_argument("set-auto") ) { 220 | set_once = true; 221 | mode = SetBG::SET_AUTO; 222 | } 223 | 224 | if ( parser->has_argument("set-zoom") ) { 225 | set_once = true; 226 | mode = SetBG::SET_ZOOM; 227 | } 228 | 229 | if ( parser->has_argument("set-zoom-fill") ) { 230 | set_once = true; 231 | mode = SetBG::SET_ZOOM_FILL; 232 | } 233 | 234 | if ( parser->has_argument("set-centered") ) { 235 | set_once = true; 236 | mode = SetBG::SET_CENTER; 237 | } 238 | 239 | if (set_once) { 240 | set_once = true; 241 | return set_bg_once(cfg, setter, startdir, xin_head, mode, parser->has_argument("save"), color, random); 242 | } 243 | 244 | if ( parser->has_argument("no-recurse") ) 245 | cfg->set_recurse(false); 246 | else 247 | cfg->set_recurse(cfg->get_recurse()); 248 | 249 | guint w, h; 250 | cfg->get_size(w, h); 251 | 252 | gint x, y; 253 | cfg->get_pos(x, y); 254 | 255 | // create main window 256 | NWindow* main_window = new NWindow(setter); 257 | main_window->set_default_size(w, h); 258 | main_window->move(x, y); // most likely will be ignored by the wm 259 | 260 | // main_window->view.set_dir(startdir); 261 | if (bcmdlinedir) 262 | main_window->view.load_dir(startdir); 263 | else 264 | main_window->view.load_dir(cfg->get_dirs()); 265 | 266 | main_window->view.set_current_display_mode(cfg->get_display_mode()); 267 | main_window->set_default_selections(); 268 | main_window->view.set_icon_captions(cfg->get_icon_captions()); 269 | main_window->signal_delete_event().connect(sigc::bind(sigc::ptr_fun(&on_window_close_save_pos), main_window)); 270 | main_window->show(); 271 | 272 | main_window->set_default_display(xin_head); 273 | 274 | if ( parser->has_argument("sort") ) { 275 | Glib::ustring sort_mode = parser->get_value ("sort"); 276 | Thumbview::SortMode mode; 277 | 278 | if (sort_mode == "alpha") { 279 | mode = Thumbview::SORT_ALPHA; 280 | } else if (sort_mode == "ralpha") { 281 | mode = Thumbview::SORT_RALPHA; 282 | } else if (sort_mode == "time") { 283 | mode = Thumbview::SORT_TIME; 284 | } else { 285 | mode = Thumbview::SORT_RTIME; 286 | } 287 | 288 | main_window->view.set_sort_mode (mode); 289 | } 290 | else 291 | main_window->view.set_sort_mode(cfg->get_sort_mode()); 292 | 293 | // remove parser 294 | delete parser; 295 | 296 | // rig up idle/thread routines 297 | Glib::Thread::create(sigc::mem_fun(main_window->view, &Thumbview::load_cache_images), true); 298 | Glib::Thread::create(sigc::mem_fun(main_window->view, &Thumbview::create_cache_images), true); 299 | 300 | #ifdef USE_INOTIFY 301 | Glib::signal_timeout().connect(sigc::ptr_fun(&poll_inotify), (unsigned)1e3); 302 | #endif 303 | 304 | Gtk::Main::run (*main_window); 305 | 306 | cfg->save_cfg(); 307 | 308 | return 0; 309 | } 310 | -------------------------------------------------------------------------------- /src/main.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include 30 | #include 31 | #include 32 | 33 | #ifdef HAVE_CONFIG_H 34 | #include "config.h" 35 | #endif 36 | 37 | typedef std::vector VecStrs; 38 | 39 | -------------------------------------------------------------------------------- /src/md5.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1999 Aladdin Enterprises. All rights reserved. 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 3. This notice may not be removed or altered from any source distribution. 19 | 20 | L. Peter Deutsch 21 | ghost@aladdin.com 22 | 23 | */ 24 | /*$Id: md5.c $ */ 25 | /* 26 | Independent implementation of MD5 (RFC 1321). 27 | 28 | This code implements the MD5 Algorithm defined in RFC 1321. 29 | It is derived directly from the text of the RFC and not from the 30 | reference implementation. 31 | 32 | The original and principal author of md5.c is L. Peter Deutsch 33 | . Other authors are noted in the change history 34 | that follows (in reverse chronological order): 35 | 36 | 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 37 | 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 38 | 1999-05-03 lpd Original version. 39 | */ 40 | 41 | #include "md5.h" 42 | #include 43 | 44 | #ifdef TEST 45 | /* 46 | * Compile with -DTEST to create a self-contained executable test program. 47 | * The test program should print out the same values as given in section 48 | * A.5 of RFC 1321, reproduced below. 49 | */ 50 | #include 51 | main() 52 | { 53 | static const char *const test[7] = { 54 | "", /*d41d8cd98f00b204e9800998ecf8427e*/ 55 | "a", /*0cc175b9c0f1b6a831c399e269772661*/ 56 | "abc", /*900150983cd24fb0d6963f7d28e17f72*/ 57 | "message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/ 58 | "abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/ 59 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 60 | /*d174ab98d277d9f5a5611c2c9f419d9f*/ 61 | "12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/ 62 | }; 63 | int i; 64 | 65 | for (i = 0; i < 7; ++i) { 66 | md5_state_t state; 67 | md5_byte_t digest[16]; 68 | int di; 69 | 70 | md5_init(&state); 71 | md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i])); 72 | md5_finish(&state, digest); 73 | printf("MD5 (\"%s\") = ", test[i]); 74 | for (di = 0; di < 16; ++di) 75 | printf("%02x", digest[di]); 76 | printf("\n"); 77 | } 78 | return 0; 79 | } 80 | #endif /* TEST */ 81 | 82 | 83 | /* 84 | * For reference, here is the program that computed the T values. 85 | */ 86 | #if 0 87 | #include 88 | main() 89 | { 90 | int i; 91 | for (i = 1; i <= 64; ++i) { 92 | unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i))); 93 | printf("#define T%d 0x%08lx\n", i, v); 94 | } 95 | return 0; 96 | } 97 | #endif 98 | /* 99 | * End of T computation program. 100 | */ 101 | #define T1 0xd76aa478 102 | #define T2 0xe8c7b756 103 | #define T3 0x242070db 104 | #define T4 0xc1bdceee 105 | #define T5 0xf57c0faf 106 | #define T6 0x4787c62a 107 | #define T7 0xa8304613 108 | #define T8 0xfd469501 109 | #define T9 0x698098d8 110 | #define T10 0x8b44f7af 111 | #define T11 0xffff5bb1 112 | #define T12 0x895cd7be 113 | #define T13 0x6b901122 114 | #define T14 0xfd987193 115 | #define T15 0xa679438e 116 | #define T16 0x49b40821 117 | #define T17 0xf61e2562 118 | #define T18 0xc040b340 119 | #define T19 0x265e5a51 120 | #define T20 0xe9b6c7aa 121 | #define T21 0xd62f105d 122 | #define T22 0x02441453 123 | #define T23 0xd8a1e681 124 | #define T24 0xe7d3fbc8 125 | #define T25 0x21e1cde6 126 | #define T26 0xc33707d6 127 | #define T27 0xf4d50d87 128 | #define T28 0x455a14ed 129 | #define T29 0xa9e3e905 130 | #define T30 0xfcefa3f8 131 | #define T31 0x676f02d9 132 | #define T32 0x8d2a4c8a 133 | #define T33 0xfffa3942 134 | #define T34 0x8771f681 135 | #define T35 0x6d9d6122 136 | #define T36 0xfde5380c 137 | #define T37 0xa4beea44 138 | #define T38 0x4bdecfa9 139 | #define T39 0xf6bb4b60 140 | #define T40 0xbebfbc70 141 | #define T41 0x289b7ec6 142 | #define T42 0xeaa127fa 143 | #define T43 0xd4ef3085 144 | #define T44 0x04881d05 145 | #define T45 0xd9d4d039 146 | #define T46 0xe6db99e5 147 | #define T47 0x1fa27cf8 148 | #define T48 0xc4ac5665 149 | #define T49 0xf4292244 150 | #define T50 0x432aff97 151 | #define T51 0xab9423a7 152 | #define T52 0xfc93a039 153 | #define T53 0x655b59c3 154 | #define T54 0x8f0ccc92 155 | #define T55 0xffeff47d 156 | #define T56 0x85845dd1 157 | #define T57 0x6fa87e4f 158 | #define T58 0xfe2ce6e0 159 | #define T59 0xa3014314 160 | #define T60 0x4e0811a1 161 | #define T61 0xf7537e82 162 | #define T62 0xbd3af235 163 | #define T63 0x2ad7d2bb 164 | #define T64 0xeb86d391 165 | 166 | static void 167 | md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) 168 | { 169 | md5_word_t 170 | a = pms->abcd[0], b = pms->abcd[1], 171 | c = pms->abcd[2], d = pms->abcd[3]; 172 | md5_word_t t; 173 | 174 | #ifndef ARCH_IS_BIG_ENDIAN 175 | # define ARCH_IS_BIG_ENDIAN 1 /* slower, default implementation */ 176 | #endif 177 | #if ARCH_IS_BIG_ENDIAN 178 | 179 | /* 180 | * On big-endian machines, we must arrange the bytes in the right 181 | * order. (This also works on machines of unknown byte order.) 182 | */ 183 | md5_word_t X[16]; 184 | const md5_byte_t *xp = data; 185 | int i; 186 | 187 | for (i = 0; i < 16; ++i, xp += 4) 188 | X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); 189 | 190 | #else /* !ARCH_IS_BIG_ENDIAN */ 191 | 192 | /* 193 | * On little-endian machines, we can process properly aligned data 194 | * without copying it. 195 | */ 196 | md5_word_t xbuf[16]; 197 | const md5_word_t *X; 198 | 199 | if (!((data - (const md5_byte_t *)0) & 3)) { 200 | /* data are properly aligned */ 201 | X = (const md5_word_t *)data; 202 | } else { 203 | /* not aligned */ 204 | memcpy(xbuf, data, 64); 205 | X = xbuf; 206 | } 207 | #endif 208 | 209 | #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) 210 | 211 | /* Round 1. */ 212 | /* Let [abcd k s i] denote the operation 213 | a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ 214 | #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) 215 | #define SET(a, b, c, d, k, s, Ti)\ 216 | t = a + F(b,c,d) + X[k] + Ti;\ 217 | a = ROTATE_LEFT(t, s) + b 218 | /* Do the following 16 operations. */ 219 | SET(a, b, c, d, 0, 7, T1); 220 | SET(d, a, b, c, 1, 12, T2); 221 | SET(c, d, a, b, 2, 17, T3); 222 | SET(b, c, d, a, 3, 22, T4); 223 | SET(a, b, c, d, 4, 7, T5); 224 | SET(d, a, b, c, 5, 12, T6); 225 | SET(c, d, a, b, 6, 17, T7); 226 | SET(b, c, d, a, 7, 22, T8); 227 | SET(a, b, c, d, 8, 7, T9); 228 | SET(d, a, b, c, 9, 12, T10); 229 | SET(c, d, a, b, 10, 17, T11); 230 | SET(b, c, d, a, 11, 22, T12); 231 | SET(a, b, c, d, 12, 7, T13); 232 | SET(d, a, b, c, 13, 12, T14); 233 | SET(c, d, a, b, 14, 17, T15); 234 | SET(b, c, d, a, 15, 22, T16); 235 | #undef SET 236 | 237 | /* Round 2. */ 238 | /* Let [abcd k s i] denote the operation 239 | a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ 240 | #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) 241 | #define SET(a, b, c, d, k, s, Ti)\ 242 | t = a + G(b,c,d) + X[k] + Ti;\ 243 | a = ROTATE_LEFT(t, s) + b 244 | /* Do the following 16 operations. */ 245 | SET(a, b, c, d, 1, 5, T17); 246 | SET(d, a, b, c, 6, 9, T18); 247 | SET(c, d, a, b, 11, 14, T19); 248 | SET(b, c, d, a, 0, 20, T20); 249 | SET(a, b, c, d, 5, 5, T21); 250 | SET(d, a, b, c, 10, 9, T22); 251 | SET(c, d, a, b, 15, 14, T23); 252 | SET(b, c, d, a, 4, 20, T24); 253 | SET(a, b, c, d, 9, 5, T25); 254 | SET(d, a, b, c, 14, 9, T26); 255 | SET(c, d, a, b, 3, 14, T27); 256 | SET(b, c, d, a, 8, 20, T28); 257 | SET(a, b, c, d, 13, 5, T29); 258 | SET(d, a, b, c, 2, 9, T30); 259 | SET(c, d, a, b, 7, 14, T31); 260 | SET(b, c, d, a, 12, 20, T32); 261 | #undef SET 262 | 263 | /* Round 3. */ 264 | /* Let [abcd k s t] denote the operation 265 | a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ 266 | #define H(x, y, z) ((x) ^ (y) ^ (z)) 267 | #define SET(a, b, c, d, k, s, Ti)\ 268 | t = a + H(b,c,d) + X[k] + Ti;\ 269 | a = ROTATE_LEFT(t, s) + b 270 | /* Do the following 16 operations. */ 271 | SET(a, b, c, d, 5, 4, T33); 272 | SET(d, a, b, c, 8, 11, T34); 273 | SET(c, d, a, b, 11, 16, T35); 274 | SET(b, c, d, a, 14, 23, T36); 275 | SET(a, b, c, d, 1, 4, T37); 276 | SET(d, a, b, c, 4, 11, T38); 277 | SET(c, d, a, b, 7, 16, T39); 278 | SET(b, c, d, a, 10, 23, T40); 279 | SET(a, b, c, d, 13, 4, T41); 280 | SET(d, a, b, c, 0, 11, T42); 281 | SET(c, d, a, b, 3, 16, T43); 282 | SET(b, c, d, a, 6, 23, T44); 283 | SET(a, b, c, d, 9, 4, T45); 284 | SET(d, a, b, c, 12, 11, T46); 285 | SET(c, d, a, b, 15, 16, T47); 286 | SET(b, c, d, a, 2, 23, T48); 287 | #undef SET 288 | 289 | /* Round 4. */ 290 | /* Let [abcd k s t] denote the operation 291 | a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ 292 | #define I(x, y, z) ((y) ^ ((x) | ~(z))) 293 | #define SET(a, b, c, d, k, s, Ti)\ 294 | t = a + I(b,c,d) + X[k] + Ti;\ 295 | a = ROTATE_LEFT(t, s) + b 296 | /* Do the following 16 operations. */ 297 | SET(a, b, c, d, 0, 6, T49); 298 | SET(d, a, b, c, 7, 10, T50); 299 | SET(c, d, a, b, 14, 15, T51); 300 | SET(b, c, d, a, 5, 21, T52); 301 | SET(a, b, c, d, 12, 6, T53); 302 | SET(d, a, b, c, 3, 10, T54); 303 | SET(c, d, a, b, 10, 15, T55); 304 | SET(b, c, d, a, 1, 21, T56); 305 | SET(a, b, c, d, 8, 6, T57); 306 | SET(d, a, b, c, 15, 10, T58); 307 | SET(c, d, a, b, 6, 15, T59); 308 | SET(b, c, d, a, 13, 21, T60); 309 | SET(a, b, c, d, 4, 6, T61); 310 | SET(d, a, b, c, 11, 10, T62); 311 | SET(c, d, a, b, 2, 15, T63); 312 | SET(b, c, d, a, 9, 21, T64); 313 | #undef SET 314 | 315 | /* Then perform the following additions. (That is increment each 316 | of the four registers by the value it had before this block 317 | was started.) */ 318 | pms->abcd[0] += a; 319 | pms->abcd[1] += b; 320 | pms->abcd[2] += c; 321 | pms->abcd[3] += d; 322 | } 323 | 324 | void 325 | md5_init(md5_state_t *pms) 326 | { 327 | pms->count[0] = pms->count[1] = 0; 328 | pms->abcd[0] = 0x67452301; 329 | pms->abcd[1] = 0xefcdab89; 330 | pms->abcd[2] = 0x98badcfe; 331 | pms->abcd[3] = 0x10325476; 332 | } 333 | 334 | void 335 | md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) 336 | { 337 | const md5_byte_t *p = data; 338 | int left = nbytes; 339 | int offset = (pms->count[0] >> 3) & 63; 340 | md5_word_t nbits = (md5_word_t)(nbytes << 3); 341 | 342 | if (nbytes <= 0) 343 | return; 344 | 345 | /* Update the message length. */ 346 | pms->count[1] += nbytes >> 29; 347 | pms->count[0] += nbits; 348 | if (pms->count[0] < nbits) 349 | pms->count[1]++; 350 | 351 | /* Process an initial partial block. */ 352 | if (offset) { 353 | int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); 354 | 355 | memcpy(pms->buf + offset, p, copy); 356 | if (offset + copy < 64) 357 | return; 358 | p += copy; 359 | left -= copy; 360 | md5_process(pms, pms->buf); 361 | } 362 | 363 | /* Process full blocks. */ 364 | for (; left >= 64; p += 64, left -= 64) 365 | md5_process(pms, p); 366 | 367 | /* Process a final partial block. */ 368 | if (left) 369 | memcpy(pms->buf, p, left); 370 | } 371 | 372 | void 373 | md5_finish(md5_state_t *pms, md5_byte_t digest[16]) 374 | { 375 | static const md5_byte_t pad[64] = { 376 | 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 377 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 378 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 379 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 380 | }; 381 | md5_byte_t data[8]; 382 | int i; 383 | 384 | /* Save the length before padding. */ 385 | for (i = 0; i < 8; ++i) 386 | data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); 387 | /* Pad to 56 bytes mod 64. */ 388 | md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); 389 | /* Append the length. */ 390 | md5_append(pms, data, 8); 391 | for (i = 0; i < 16; ++i) 392 | digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); 393 | } 394 | -------------------------------------------------------------------------------- /src/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | This file is from Nitrogen, an X11 background setter. 4 | Copyright (C) 2006 Dave Foster & Javeed Shaikh 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | */ 21 | 22 | /* 23 | Copyright (C) 1999 Aladdin Enterprises. All rights reserved. 24 | 25 | This software is provided 'as-is', without any express or implied 26 | warranty. In no event will the authors be held liable for any damages 27 | arising from the use of this software. 28 | 29 | Permission is granted to anyone to use this software for any purpose, 30 | including commercial applications, and to alter it and redistribute it 31 | freely, subject to the following restrictions: 32 | 33 | 1. The origin of this software must not be misrepresented; you must not 34 | claim that you wrote the original software. If you use this software 35 | in a product, an acknowledgment in the product documentation would be 36 | appreciated but is not required. 37 | 2. Altered source versions must be plainly marked as such, and must not be 38 | misrepresented as being the original software. 39 | 3. This notice may not be removed or altered from any source distribution. 40 | 41 | L. Peter Deutsch 42 | ghost@aladdin.com 43 | 44 | */ 45 | /*$Id: md5.h $ */ 46 | /* 47 | Independent implementation of MD5 (RFC 1321). 48 | 49 | This code implements the MD5 Algorithm defined in RFC 1321. 50 | It is derived directly from the text of the RFC and not from the 51 | reference implementation. 52 | 53 | The original and principal author of md5.h is L. Peter Deutsch 54 | . Other authors are noted in the change history 55 | that follows (in reverse chronological order): 56 | 57 | 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 58 | 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); 59 | added conditionalization for C++ compilation from Martin 60 | Purschke . 61 | 1999-05-03 lpd Original version. 62 | */ 63 | 64 | #ifndef md5_INCLUDED 65 | # define md5_INCLUDED 66 | 67 | /* 68 | * This code has some adaptations for the Ghostscript environment, but it 69 | * will compile and run correctly in any environment with 8-bit chars and 70 | * 32-bit ints. Specifically, it assumes that if the following are 71 | * defined, they have the same meaning as in Ghostscript: P1, P2, P3, 72 | * ARCH_IS_BIG_ENDIAN. 73 | */ 74 | 75 | typedef unsigned char md5_byte_t; /* 8-bit byte */ 76 | typedef unsigned int md5_word_t; /* 32-bit word */ 77 | 78 | /* Define the state of the MD5 Algorithm. */ 79 | typedef struct md5_state_s { 80 | md5_word_t count[2]; /* message length in bits, lsw first */ 81 | md5_word_t abcd[4]; /* digest buffer */ 82 | md5_byte_t buf[64]; /* accumulate block */ 83 | } md5_state_t; 84 | 85 | #ifdef __cplusplus 86 | extern "C" 87 | { 88 | #endif 89 | 90 | /* Initialize the algorithm. */ 91 | #ifdef P1 92 | void md5_init(P1(md5_state_t *pms)); 93 | #else 94 | void md5_init(md5_state_t *pms); 95 | #endif 96 | 97 | /* Append a string to the message. */ 98 | #ifdef P3 99 | void md5_append(P3(md5_state_t *pms, const md5_byte_t *data, int nbytes)); 100 | #else 101 | void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); 102 | #endif 103 | 104 | /* Finish the message and return the digest. */ 105 | #ifdef P2 106 | void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16])); 107 | #else 108 | void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); 109 | #endif 110 | 111 | #ifdef __cplusplus 112 | } /* end extern "C" */ 113 | #endif 114 | 115 | #endif /* md5_INCLUDED */ 116 | -------------------------------------------------------------------------------- /src/nitrogen.1: -------------------------------------------------------------------------------- 1 | .TH NITROGEN 1 "JANUARY 2016" "NITROGEN" "NITROGEN" 2 | .SH NAME 3 | nitrogen \- X11 background previewer and setter 4 | .SH SYNOPSIS 5 | .B nitrogen [ 6 | .I OPTIONS 7 | .B ] 8 | .I DIRECTORY? 9 | .SH DESCRIPTION 10 | In normal working mode, provides an interface which displays all pictures in the given DIRECTORY. From this interface, it is possible to set the X11 root pixmap either temporarily or set and store the picture, drawing mode, and X display for restoration later. If no directory is specified, it uses the stored directories in your "library" (as of 1.5). See the Preferences dialog. 11 | .P 12 | When the --restore option is passed, nitrogen sets all backgrounds that it has a configuration for and exits immediately, for use in an .xinitrc or .xsession file. 13 | .SH OPTIONS 14 | .IP --restore 15 | Restores previously saved pictures to the root displays. 16 | .IP --no-recurse 17 | Do not recurse into subdirectories of DIRECTORY. 18 | .IP --sort=[option] 19 | Sorts the background list by the given option. By default, items are sorted as they are found on the filesystem, giving a quasi-newest first sorting order. Valid options are: 20 | .RS 21 | .IP alpha 22 | Alphabetical order. 23 | .IP ralpha 24 | Reverse alphabetical order. 25 | .IP time 26 | Modified time, ascending. 27 | .IP rtime 28 | Modified time, descending. 29 | .RE 30 | .IP --set-auto 31 | Set the background specified by DIRECTORY using the automatic size setting. 32 | .IP --set-centered 33 | Set the background specified by DIRECTORY using the centered size setting. 34 | .IP --set-scaled 35 | Set the background specified by DIRECTORY using the scaled size setting. 36 | .IP --set-tiled 37 | Set the background specified by DIRECTORY using the tiled size setting. 38 | .IP --set-zoom 39 | Set the background specified by DIRECTORY using the zoom size setting. 40 | .IP --set-zoom-fill 41 | Set the background specified by DIRECTORY using the zoom fill size setting. 42 | .IP --save 43 | Saves the background permanently in the config. Only used with one of the --set-xxx options. 44 | .IP --set-color=[arg] 45 | Sets background color in hex, #000000 by default. Only used with one of the --set-xxx options. 46 | .IP --random 47 | Choose random background from config or given directory. Only used with one of the --set-xxx options. 48 | .IP --head=[option] 49 | Select Xinerama/multihead display in GUI, 0..n, use -1 for full screen (Xinerama only). 50 | .IP --force-setter=[option] 51 | DEBUG: Forces the background setting engine to use a specific backend. This is for advanced debugging use only. Valid options are: 52 | .RS 53 | .IP xwindows 54 | Standard XWindows primitives. 55 | .IP xinerama 56 | Xinerama/XWindows primitives. 57 | .IP gnome 58 | GNOME/Nautilus based. 59 | .RE 60 | .IP --help 61 | I'm just here so I won't get fined. 62 | .SH FILES 63 | .I ~/.config/nitrogen/ 64 | .RS 65 | Holds the configuration for saved backgrounds. 66 | .RE 67 | .SH BUGS 68 | Use the GitHub issue tracker: https://github.com/l3ib/nitrogen/issues 69 | .SH AUTHORS 70 | Dave Foster 71 | Javeed Shaikh 72 | .SH AVAILABILITY 73 | Nitrogen is developed on GitHub: https://github.com/l3ib/nitrogen/ 74 | 75 | 76 | --------------------------------------------------------------------------------