mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-05 11:04:42 +03:00
442ad09caf
* gdesktop.c (get_transparent_window_for_dentry): New function, creates the proper transparent icon window for a dentry. (post_setup_desktop_icon): New function, does post-setup stuff for a desktop icon (setting it as a drop target, positioning it, etc.). * gpageprop.c (item_properties): Now the dentry parameter is a desktop_icon_t instead. We now return a bitmask that indicates what stuff changed. The caller can use this information to decide what to update, repaint, etc. * gdesktop.h: Moved the icon_t and desktop_icon_t structures here. * gpageprop.c (item_properties): Insert icon control if appropriate. * gprop.c (gprop_icon_new): (gprop_icon_get_data): Renamed from gprop_dir_*(). * gscreen.c (panel_action_properties): Re-reads panel only if necessary. *gpageprop.c (item_properties): now returns TRUE if something got changed, FALSE otherwise. This should be used to decide whether to re-read the panel or not. * gpageprop.c: #include "../vfs/vfs.h". #include "dialog.h". * gprop.c (gprop_dir_new): (gprop_perm_new): (gprop_general_new): Connect to the destroy signal of the toplevel widget and destroy the Gprop structure on the callback.
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
#ifndef _GDESKTOP_H
|
|
#define _GDESKTOP_H
|
|
|
|
#define MC_LIB_DESKTOP "mc.desktop"
|
|
|
|
|
|
/* Types of desktop icons:
|
|
*
|
|
* o Application: Double click: start up application;
|
|
* Dropping: start up program with arguments.
|
|
*
|
|
* o Directory: Double click: opens the directory in a panel.
|
|
* Double click: copies/moves files.
|
|
*
|
|
* o File: Opens the application according to regex_command
|
|
*/
|
|
|
|
typedef enum {
|
|
application,
|
|
directory,
|
|
file
|
|
} icon_t;
|
|
|
|
/* A structure that describes each icon on the desktop */
|
|
typedef struct {
|
|
GnomeDesktopEntry *dentry;
|
|
GtkWidget *widget;
|
|
icon_t type;
|
|
int x, y;
|
|
char *title;
|
|
char *pathname;
|
|
} desktop_icon_t;
|
|
|
|
|
|
/* gtrans.c */
|
|
GtkWidget *create_transparent_text_window (char *file, char *text, int extra_events);
|
|
GtkWidget *make_transparent_window (char *file);
|
|
|
|
/* gdesktop.c */
|
|
void drop_on_directory (GdkEventDropDataAvailable *event, char *dest, int force_manually);
|
|
void artificial_drag_start (GdkWindow *source_window, int x, int y);
|
|
|
|
#endif
|