mc/gnome/gdesktop.h
Miguel de Icaza b3bb157ad5 These are a bunch of changes to fix CORBA and session management. They
are almost complete (i.e. to handle all nitty gritty cases), but they
seem to be working OK right now.  SM should be much more stable now.
Please tell me if you find any weird behavior - Federico

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdesktop-icon.c (desktop_icon_realize): Remove the
	WM_CLIENT_LEADER property from icon windows so that window
	managers will not store SM information for them.

	* gnome-open-dialog.c: Added missing #includes.

	* gdesktop-init.c (desktop_init_at): Removed an unused variable.

	* gdesktop.h: Added some missing prototypes.

	* gmain.h: Added some missing prototypes.

	* Makefile.in: Added gsession.[ch] to the list of sources.

	* gmain.c (create_panels): Consider whether we have a CORBA server
	and session management.

	* gdesktop.c: #include "gdesktop-init.h"
	* gdesktop.c: Added a missing cast to GNOME_DIALOG.

	* gmain.c (create_panels): Removed the run_desktop global
	variable.

	* glayout.c (create_container): Set the wmclass of the panel to
	include its unique ID.

	* gsession.[ch]: New file with the functions that deal with
	session management.

	* glayout.c (gnome_exit): Use session_set_restart().

	* gcorba.c (corba_init): Now returns an int with an error value.
	(corba_init_server): Initialize the server properly.
	Fixed all the object implementation code.
	(corba_create_window): New function used to create a window with
	the CORBA server.

	* gmain.c (gnome_check_super_user): Now the check for running as
	root is done here.  There should be no GUI code in src/.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* dlg.c (dlg_run_done): Do not call the callback of a NULL current
	widget.

	* setup.h: Added missing prototype for setup_init().

	* filegui.c (check_progress_buttons): Added a missing return
	value.

	* dlg.c (remove_widget): Added a missing return value.

	* main.c: Removed the global directory_list variable.
	Removed the main_corba_register_server() function.

	* main.h: Removed the global run_desktop variable.

	* panel.h: Now the panel structure has a unique numerical ID used
	for session management.

	* screen.c (panel_new): Maintain a unique ID for each panel.

	* main.c (maybe_display_linksdir): Handle display of the desktop
	init dir here.
	(main): Call gnome_check_super_user().
	(init_corba_with_args): Call corba_init_server().

	* main.c (init_corba_with_args): Do CORBA initialization here.  Also
	removed the global force_activation option.

1999-03-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* vfs.c (vfs_add_current_stamps): Only do stamping of the panels
	if they exist.

	* mcserv.c: #include <sys/wait.h>
	(get_client): Put `#ifdef __EMX__' around an otherwise-unused
	variable.

	* utilvfs.c (vfs_split_url): Fix NULL <-> 0 confusion when
	comparing characters.

	* ftpfs.c (retrieve_dir): Removed unused variable dot_dot_found.

	* extfs.c (extfs_init): Assign `key' to c, not `&key'.
1999-03-30 06:09:56 +00:00

74 lines
2.5 KiB
C

/* Desktop management for the Midnight Commander
*
* Copyright (C) 1998-1999 The Free Software Foundation
*
* Authors: Federico Mena <federico@nuclecu.unam.mx>
* Miguel de Icaza <miguel@nuclecu.unam.mx>
*/
#ifndef GDESKTOP_H
#define GDESKTOP_H
#include "dir.h"
/* Snap granularity for desktop icons -- maybe these should be calculated in
* terms of the font size?
*/
#define DESKTOP_SNAP_X 80
#define DESKTOP_SNAP_Y 80
/* Name of the user's desktop directory (i.e. ~/desktop) */
#define DESKTOP_DIR_NAME ".gnome-desktop"
/* Configuration options for the desktop */
extern int desktop_use_shaped_icons; /* Whether to use shaped icons or not (for slow X servers) */
extern int desktop_auto_placement; /* Whether to auto-place icons or not (user placement) */
extern int desktop_snap_icons; /* Whether to snap icons to the grid or not */
extern char *desktop_directory;
/* Initializes the desktop -- init DnD, load the default desktop icons, etc. */
void desktop_init (void);
/* Shuts the desktop down by destroying the desktop icons. */
void desktop_destroy (void);
/* This structure defines the information carried by a desktop icon */
typedef struct {
GtkWidget *dicon; /* The desktop icon widget */
int x, y; /* Position in the desktop */
int slot; /* Index of the slot the icon is in, or -1 for none */
char *filename; /* The file this icon refers to
* (relative to the desktop_directory)
*/
char *url; /* URL this icon points to */
int selected : 1; /* Is the icon selected? */
int tmp_selected : 1; /* Temp storage for original selection while rubberbanding */
} DesktopIconInfo;
void desktop_icon_info_open (DesktopIconInfo *dii);
void desktop_icon_info_delete (DesktopIconInfo *dii);
void desktop_icon_set_busy (DesktopIconInfo *dii, int busy);
DesktopIconInfo *desktop_icon_info_get_by_filename (char *filename);
file_entry *file_entry_from_file (char *filename);
void file_entry_free (file_entry *fe);
gboolean is_mountable (char *filename, file_entry *fe, int *is_mounted, char **mount_point);
gboolean is_ejectable (char *filename);
gboolean do_mount_umount (char *filename, gboolean is_mount);
gboolean do_eject (char *filename);
void desktop_arrange_icons (void);
void desktop_rescan_devices (void);
void desktop_reload_icons (int user_pos, int xpos, int ypos);
void desktop_create_url (const char *filename, const char *title, const char *url, const char *icon);
extern int desktop_wm_is_gnome_compliant;
#endif