mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
a57560f5dd
* gicon.c (gicon_get_filename_for_icon): Return const char *, this tells the user of this routine "you better not touch or free this you dofus". * gnome-file-property-dialog.c (apply_metadata_change): Always set the name of the icon to the new value, as the entry will always match the imlib image anyways (due to the fixes I did to const correctness). (generate_icon_sel): Do not free the value. We do not own this return value. * gdesktop.c (is_mountable): NULL terminate string returned from readlink. Yes guys, readlink does not NULL terminate things. (do_mount_umount): ditto. * gnome-file-property-dialog.c (init_metadata): ditto
70 lines
1.5 KiB
C
70 lines
1.5 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"
|
|
|
|
|
|
/***** Filename *****/
|
|
|
|
typedef struct {
|
|
GtkWidget *top;
|
|
|
|
GtkWidget *filename;
|
|
} GpropFilename;
|
|
|
|
GpropFilename *gprop_filename_new (const char *complete_filename, const char *filename);
|
|
void gprop_filename_get_data (GpropFilename *gp, 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 *gp, umode_t *umode, char **owner, char **group);
|
|
|
|
/***** General *****/
|
|
|
|
typedef struct {
|
|
GtkWidget *top;
|
|
|
|
GtkWidget *title;
|
|
GtkWidget *icon_filename;
|
|
GtkWidget *icon_pixmap;
|
|
} GpropGeneral;
|
|
|
|
GpropGeneral *gprop_general_new (const char *title, const char *icon_filename);
|
|
void gprop_general_get_data (GpropGeneral *gp, char **title, char **icon_filename);
|
|
|
|
typedef struct {
|
|
GtkWidget *top;
|
|
GtkWidget *entry;
|
|
GtkWidget *check;
|
|
} GpropExec;
|
|
|
|
GpropExec *gprop_exec_new (GnomeDesktopEntry *dentry);
|
|
void gprop_exec_get_data (GpropExec *ge, GnomeDesktopEntry *dentry);
|
|
|
|
#endif
|