1998-12-07 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gicon.c (gnome_file_entry_color): If we do not have permissions for this directory, indicate this with a special icon. * gscreen.c (panel_icon_list_select_icon): Middle button opens a new panel on a directory.
Этот коммит содержится в:
родитель
d09470310a
Коммит
771413102b
@ -1,3 +1,11 @@
|
|||||||
|
1998-12-07 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gicon.c (gnome_file_entry_color): If we do not have permissions
|
||||||
|
for this directory, indicate this with a special icon.
|
||||||
|
|
||||||
|
* gscreen.c (panel_icon_list_select_icon): Middle button opens a
|
||||||
|
new panel on a directory.
|
||||||
|
|
||||||
1998-12-08 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1998-12-08 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gdesktop.c: Moved the old DnD cruft to olddnd.c to keep it there
|
* gdesktop.c: Moved the old DnD cruft to olddnd.c to keep it there
|
||||||
|
@ -26,6 +26,7 @@ PIXMAPS = \
|
|||||||
dir-open.xpm
|
dir-open.xpm
|
||||||
|
|
||||||
GNOMESRCS = \
|
GNOMESRCS = \
|
||||||
|
gaction.c \
|
||||||
gblist.c \
|
gblist.c \
|
||||||
gcache.c \
|
gcache.c \
|
||||||
gcliplabel.c \
|
gcliplabel.c \
|
||||||
@ -79,6 +80,7 @@ GNOMEHDRS = \
|
|||||||
|
|
||||||
ICONS = \
|
ICONS = \
|
||||||
directory.xpm \
|
directory.xpm \
|
||||||
|
i-dirclosed.png \
|
||||||
i-directory.png \
|
i-directory.png \
|
||||||
i-executable.png \
|
i-executable.png \
|
||||||
i-symlink.png \
|
i-symlink.png \
|
||||||
|
@ -22,6 +22,7 @@ static int gicon_inited = FALSE;
|
|||||||
|
|
||||||
/* These are some default images used in the Icon View */
|
/* These are some default images used in the Icon View */
|
||||||
static GdkImlibImage *icon_view_directory;
|
static GdkImlibImage *icon_view_directory;
|
||||||
|
static GdkImlibImage *icon_view_dirclosed;
|
||||||
static GdkImlibImage *icon_view_executable;
|
static GdkImlibImage *icon_view_executable;
|
||||||
static GdkImlibImage *icon_view_symlink;
|
static GdkImlibImage *icon_view_symlink;
|
||||||
static GdkImlibImage *icon_view_regular;
|
static GdkImlibImage *icon_view_regular;
|
||||||
@ -31,6 +32,10 @@ static GdkImlibImage *icon_view_char_dev;
|
|||||||
static GdkImlibImage *icon_view_block_dev;
|
static GdkImlibImage *icon_view_block_dev;
|
||||||
static GdkImlibImage *icon_view_stalled;
|
static GdkImlibImage *icon_view_stalled;
|
||||||
|
|
||||||
|
/* Our UID and GID */
|
||||||
|
static uid_t our_uid;
|
||||||
|
static gid_t our_gid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gicon_init:
|
* gicon_init:
|
||||||
*
|
*
|
||||||
@ -45,8 +50,12 @@ gicon_init (void)
|
|||||||
icon_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
icon_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
||||||
gicon_inited = TRUE;
|
gicon_inited = TRUE;
|
||||||
|
|
||||||
|
our_uid = getuid ();
|
||||||
|
our_gid = getgid ();
|
||||||
|
|
||||||
/* Recursive call to load the stock images */
|
/* Recursive call to load the stock images */
|
||||||
icon_view_directory = gicon_stock_load ("i-directory.png");
|
icon_view_directory = gicon_stock_load ("i-directory.png");
|
||||||
|
icon_view_dirclosed = gicon_stock_load ("i-dirclosed.png");
|
||||||
icon_view_executable = gicon_stock_load ("i-executable.png");
|
icon_view_executable = gicon_stock_load ("i-executable.png");
|
||||||
icon_view_symlink = gicon_stock_load ("i-symlink.png");
|
icon_view_symlink = gicon_stock_load ("i-symlink.png");
|
||||||
icon_view_regular = gicon_stock_load ("i-regular.png");
|
icon_view_regular = gicon_stock_load ("i-regular.png");
|
||||||
@ -57,6 +66,7 @@ gicon_init (void)
|
|||||||
icon_view_stalled = gicon_stock_load ("i-stalled.png");
|
icon_view_stalled = gicon_stock_load ("i-stalled.png");
|
||||||
|
|
||||||
if (icon_view_directory == NULL ||
|
if (icon_view_directory == NULL ||
|
||||||
|
icon_view_dirclosed == NULL ||
|
||||||
icon_view_executable == NULL ||
|
icon_view_executable == NULL ||
|
||||||
icon_view_symlink == NULL ||
|
icon_view_symlink == NULL ||
|
||||||
icon_view_regular == NULL ||
|
icon_view_regular == NULL ||
|
||||||
@ -129,9 +139,35 @@ static GdkImlibImage *
|
|||||||
gnome_file_entry_color (file_entry *fe)
|
gnome_file_entry_color (file_entry *fe)
|
||||||
{
|
{
|
||||||
mode_t mode = fe->buf.st_mode;
|
mode_t mode = fe->buf.st_mode;
|
||||||
|
|
||||||
if (S_ISDIR (mode))
|
/*
|
||||||
|
* If a directory, choose the best icon that reprensents it
|
||||||
|
*/
|
||||||
|
if (S_ISDIR (mode)){
|
||||||
|
if (fe->buf.st_uid != our_uid){
|
||||||
|
if (fe->buf.st_gid != our_gid){
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We do not share the UID or the GID,
|
||||||
|
* test for read/execute permissions
|
||||||
|
*/
|
||||||
|
if ((mode & (S_IROTH | S_IXOTH)) != (S_IROTH | S_IXOTH))
|
||||||
|
return icon_view_dirclosed;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Same group, check if we have permissions
|
||||||
|
*/
|
||||||
|
if ((mode & (S_IRGRP | S_IXGRP)) != (S_IRGRP | S_IXGRP))
|
||||||
|
return icon_view_dirclosed;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ((mode & (S_IRUSR | S_IXUSR)) != (S_IRUSR | S_IXUSR))
|
||||||
|
return icon_view_dirclosed;
|
||||||
|
}
|
||||||
|
|
||||||
return icon_view_directory;
|
return icon_view_directory;
|
||||||
|
}
|
||||||
|
|
||||||
if (S_ISLNK (mode)){
|
if (S_ISLNK (mode)){
|
||||||
if (fe->f.link_to_dir)
|
if (fe->f.link_to_dir)
|
||||||
|
@ -290,8 +290,8 @@ GnomeUIInfo gview_file_menu [] = {
|
|||||||
N_("Jump to a specified line number"),
|
N_("Jump to a specified line number"),
|
||||||
&gnome_goto_line, GNOME_STOCK_PIXMAP_JUMP_TO),
|
&gnome_goto_line, GNOME_STOCK_PIXMAP_JUMP_TO),
|
||||||
GNOMEUIINFO_ITEM (N_("Monitor file"), N_("Monitor file growing"), &gnome_monitor, NULL),
|
GNOMEUIINFO_ITEM (N_("Monitor file"), N_("Monitor file growing"), &gnome_monitor, NULL),
|
||||||
GNOMEUIINFO_ITEM_STOCK (N_("Quit"),
|
GNOMEUIINFO_ITEM_STOCK (N_("Close"),
|
||||||
N_("Terminate the viewer"),
|
N_("Close the viewer"),
|
||||||
&gview_quit, GNOME_STOCK_PIXMAP_QUIT),
|
&gview_quit, GNOME_STOCK_PIXMAP_QUIT),
|
||||||
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
|
{ GNOME_APP_UI_ENDOFINFO, 0, 0 }
|
||||||
};
|
};
|
||||||
|
Двоичные данные
gnome/i-dirclosed.png
Обычный файл
Двоичные данные
gnome/i-dirclosed.png
Обычный файл
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.1 KiB |
@ -1,3 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Default metadata file provided by the GNOME File Manaeger.
|
||||||
|
#
|
||||||
|
# The following metadata keys are used by the File Manager:
|
||||||
|
#
|
||||||
|
# icon-filename:
|
||||||
|
# Points to a full pathname that contains the icon that
|
||||||
|
# is bound to this file.
|
||||||
|
#
|
||||||
|
# icon-inline-png:
|
||||||
|
# If present, the value of this entry is an inlined PNG image
|
||||||
|
# that should be used to display this file.
|
||||||
|
#
|
||||||
|
# drop-open:
|
||||||
|
# Command to run when a file or files are dropped on this
|
||||||
|
# file. If value is not available, the file manager will try
|
||||||
|
# to use the contents of the 'open' key.
|
||||||
|
#
|
||||||
|
# open:
|
||||||
|
# Command to execute when the file is "opened". The same interpolation
|
||||||
|
# done for "drop-open" is done with "open".
|
||||||
|
#
|
||||||
|
# Interpolation for open and drop-open:
|
||||||
|
# Any ocurrence of the strings '%c'/%C '%f' are interpolated.
|
||||||
|
# with the drop site name (ie, the name of the file or executable where
|
||||||
|
# data was dropped) and the file or files that were dropped there
|
||||||
|
# respectively. The character "\" can be used to escape text.
|
||||||
|
#
|
||||||
|
# Execution is done without shell intervention, so no shell metacharacters
|
||||||
|
# are used.
|
||||||
|
#
|
||||||
|
|
||||||
regex: \.c$
|
regex: \.c$
|
||||||
type=x-application-gnome/c-source
|
type=x-application-gnome/c-source
|
||||||
icon-filename=@icondir@/c.xpm
|
icon-filename=@icondir@/c.xpm
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user