mc/gnome/gprint.c

36 lines
760 B
C
Raw Normal View History

/* Printing support for the Midnight Commander
*
* Copyright (C) 1998-1999 The Free Software Foundation
*
* Authors: Miguel de Icaza <miguel@nuclecu.unam.mx>
*/
#include <config.h>
#include <libgnome/libgnome.h>
#include "x.h"
#include "main.h"
#include "util.h"
#include "gdesktop.h"
1999-03-10 Federico Mena Quintero <federico@nuclecu.unam.mx> This is a semi-big slew of changes to integrate the DESKTOP_BRANCH into the main trunk. Now the gdesktop code creates a temprary WPanel structure and passes it on to the core file management functions. Also, the menu code is improved (we now use gpopup2; gpopup should go away shortly and gpopup2 should replace it). This makes the desktop act consistently with the file panels. Thanks to Jonathan for his help with this branch. * gdnd.c (perform_action): Use mc_lstat(), not mc_stat(). * glayout.c (update_panels): Do not update the panels that are desktop panels. * gdesktop.c (icon_is_in_area): An icon is not considered to be in a 0x0 area. * gpopup2.c (handle_open): Fetch the desktop icon from the filename and call desktop_icon_info_open(). * gdesktop.c (desktop_icon_info_get_by_filename): New function to look up a desktop icon by its filename. * glayout.c (create_new_menu_from): Test for the ".desktop" suffix correctly. * gpopup2.c (handle_properties): If the file comes from a desktop panel, always allow edition of the icon image. 1999-03-10 Federico Mena Quintero <federico@nuclecu.unam.mx> * file.c (erase_dir): Erase metadata for directories as well. (erase_dir_iff_empty): Likewise. (copy_file_file): Delete/copy the metadata even for char/block/sock/fifo files. Same thing for when copying symlinks. (copy_dir_dir): Delete/copy the metadata. (move_dir_dir): Delete/move the metadata. (recursive_erase): Delete the metadata.
1999-03-11 05:40:53 +03:00
#include "gprint.h"
void
gprint_setup_devices (void)
{
static char *gprint_path;
char *desktop_quoted;
char *command;
if (!gprint_path)
gprint_path = gnome_is_program_in_path ("g-print");
if (!gprint_path)
return;
desktop_quoted = name_quote (desktop_directory, 0);
command = g_strconcat (gprint_path, " --desktop-dir ", desktop_quoted, NULL);
g_free (desktop_quoted);
my_system (EXECUTE_WAIT | EXECUTE_AS_SHELL, shell, command);
g_free (command);
}