diff options
Diffstat (limited to 'udev-block-notify.c')
-rw-r--r-- | udev-block-notify.c | 47 |
1 files changed, 2 insertions, 45 deletions
diff --git a/udev-block-notify.c b/udev-block-notify.c index 210b0e8..ef9ba18 100644 --- a/udev-block-notify.c +++ b/udev-block-notify.c @@ -5,47 +5,10 @@ * of the GNU General Public License, incorporated herein by reference. */ -#define _GNU_SOURCE - -#include <getopt.h> -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <unistd.h> -#include <string.h> - -#include <libnotify/notify.h> -#include <libudev.h> - +#include "udev-block-notify.h" +#include "config.h" #include "version.h" -#define PROGNAME "udev-block-notify" - -#define NOTIFICATION_TIMEOUT 10000 - -#define ICON_DEVICE_MAPPER "media-playlist-shuffle" -#define ICON_DRIVE_HARDDISK "drive-harddisk" -#define ICON_DRIVE_HARDDISK_IEEE1394 "drive-harddisk-ieee1394" -#define ICON_DRIVE_HARDDISK_USB "drive-harddisk-usb" -#define ICON_DRIVE_OPTICAL "drive-optical" -#define ICON_DRIVE_MULTIDISK "drive-multidisk" -#define ICON_LOOP "media-playlist-repeat" -#define ICON_MEDIA_FLASH "media-flash" -#define ICON_MEDIA_FLOPPY "media-floppy" -#define ICON_MEDIA_REMOVABLE "media-removable" -#define ICON_MEDIA_ZIP "media-zip" -#define ICON_MULTIMEDIA_PLAYER "multimedia-player" -#define ICON_NETWORK_SERVER "network-server" -#define ICON_UNKNOWN "dialog-question" - -#define TEXT_TOPIC "Udev Block Notification" -#define TEXT_ADD "Device <b>%s</b> (%i:%i) <b>appeared</b>." -#define TEXT_REMOVE "Device <b>%s</b> (%i:%i) <b>disappeared</b>." -#define TEXT_MOVE "Device <b>%s</b> (%i:%i) was <b>renamed</b>." -#define TEXT_CHANGE "Device <b>%s</b> (%i:%i) media <b>changed</b>." -#define TEXT_DEFAULT "Anything happend to <b>%s</b> (%i:%i)... Don't know." -#define TEXT_TAG "\n%s: <i>%s</i>" - const static char optstring[] = "hv"; const static struct option options_long[] = { /* name has_arg flag val */ @@ -54,12 +17,6 @@ const static struct option options_long[] = { { 0, 0, 0, 0 } }; -struct notifications { - dev_t devnum; - NotifyNotification *notification; - struct notifications *next; -}; - uint8_t verbose = 0; /*** get_notification ***/ |