
* 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.
59 строки
1.1 KiB
C
59 строки
1.1 KiB
C
/* Properties dialog for the Gnome edition of the Midnight Commander
|
|
*
|
|
* Copyright (C) 1998 The Free Software Foundation
|
|
*
|
|
* Author: Federico Mena <federico@nuclecu.unam.mx>
|
|
*/
|
|
|
|
#ifndef GPROP_H
|
|
#define GPROP_H
|
|
|
|
|
|
#include <sys/stat.h>
|
|
#include <gtk/gtk.h>
|
|
#include "config.h"
|
|
|
|
|
|
/***** General *****/
|
|
|
|
typedef struct {
|
|
GtkWidget *top;
|
|
|
|
GtkWidget *filename;
|
|
} GpropGeneral;
|
|
|
|
GpropGeneral *gprop_general_new (char *complete_filename, char *filename);
|
|
void gprop_general_get_data (GpropGeneral *gpg, char **filename);
|
|
|
|
/***** Permissions *****/
|
|
|
|
typedef struct {
|
|
GtkWidget *top;
|
|
|
|
GtkWidget *mode_label;
|
|
|
|
GtkWidget *suid, *sgid, *svtx;
|
|
GtkWidget *rusr, *wusr, *xusr;
|
|
GtkWidget *rgrp, *wgrp, *xgrp;
|
|
GtkWidget *roth, *woth, *xoth;
|
|
|
|
GtkWidget *owner;
|
|
GtkWidget *group;
|
|
} GpropPerm;
|
|
|
|
GpropPerm *gprop_perm_new (umode_t umode, char *owner, char *group);
|
|
void gprop_perm_get_data (GpropPerm *gpp, umode_t *umode, char **owner, char **group);
|
|
|
|
/***** Icon *****/
|
|
|
|
typedef struct {
|
|
GtkWidget *top;
|
|
|
|
GtkWidget *icon_filename;
|
|
} GpropIcon;
|
|
|
|
GpropIcon *gprop_icon_new (char *icon_filename);
|
|
void gprop_icon_get_data (GpropIcon *gpi, char **icon_filename);
|
|
|
|
#endif
|