1999-09-20 20:34:38 +04:00
|
|
|
/* Printing support for the Midnight Commander
|
1999-02-25 08:11:35 +03:00
|
|
|
*
|
|
|
|
* Copyright (C) 1998-1999 The Free Software Foundation
|
|
|
|
*
|
|
|
|
* Authors: Miguel de Icaza <miguel@nuclecu.unam.mx>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
2001-06-16 03:28:07 +04:00
|
|
|
#include <libgnome/libgnome.h>
|
|
|
|
#include "x.h"
|
1999-02-25 08:11:35 +03:00
|
|
|
#include "main.h"
|
|
|
|
#include "util.h"
|
|
|
|
#include "gdesktop.h"
|
1999-03-11 05:40:53 +03:00
|
|
|
#include "gprint.h"
|
1999-02-25 08:11:35 +03:00
|
|
|
|
|
|
|
void
|
|
|
|
gprint_setup_devices (void)
|
|
|
|
{
|
|
|
|
static char *gprint_path;
|
|
|
|
char *desktop_quoted;
|
|
|
|
char *command;
|
1999-09-20 20:34:38 +04:00
|
|
|
|
1999-02-25 08:11:35 +03:00
|
|
|
if (!gprint_path)
|
|
|
|
gprint_path = gnome_is_program_in_path ("g-print");
|
|
|
|
|
|
|
|
if (!gprint_path)
|
|
|
|
return;
|
|
|
|
|
|
|
|
desktop_quoted = name_quote (desktop_directory, 0);
|
1999-03-20 21:08:52 +03:00
|
|
|
command = g_strconcat (gprint_path, " --desktop-dir ", desktop_quoted, NULL);
|
1999-02-25 08:11:35 +03:00
|
|
|
g_free (desktop_quoted);
|
1999-09-20 20:34:38 +04:00
|
|
|
|
1999-02-25 08:11:35 +03:00
|
|
|
my_system (EXECUTE_WAIT | EXECUTE_AS_SHELL, shell, command);
|
|
|
|
g_free (command);
|
|
|
|
}
|