mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
1999-09-20 Federico Mena Quintero <federico@redhat.com>
* lib/startup.links: Changed the news link to Gnotices 1999-09-19 David Martin <dmartina@usa.net> * gtkedit/editcmd.c (edit_print_string): Use unsigned char so that 8 bit chars from strftime get displayed when inserting date. * lib/mc.ext.in: Add entries for bzip2 compressed pages as used in Mandrake 6.0. The generic entry for bzip2 moved to the end of the file to avoid interferences. In this one I changed the extension check to a type check (as used for gzip) which might give problems in some systems.
This commit is contained in:
parent
d836e5a79a
commit
4317569de1
@ -1,3 +1,7 @@
|
||||
1999-09-20 Federico Mena Quintero <federico@redhat.com>
|
||||
|
||||
* lib/startup.links: Changed the news link to Gnotices
|
||||
|
||||
1999-09-19 David Martin <dmartina@usa.net>
|
||||
|
||||
* gtkedit/editcmd.c (edit_print_string): Use unsigned char so that
|
||||
|
@ -5,7 +5,7 @@ AC_INIT(create_vcs)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
PACKAGE=mc
|
||||
VERSION=4.5.39-pre1
|
||||
VERSION=4.5.39-pre2
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
|
||||
AC_SUBST(VERSION)
|
||||
|
@ -1,3 +1,18 @@
|
||||
1999-09-20 Federico Mena Quintero <federico@redhat.com>
|
||||
|
||||
* gdesktop.c (desktop_rescan_devices): Call gmount_setup_devices().
|
||||
|
||||
* gdesktop-init.c (gdesktop_links_init): Renamed from
|
||||
gdesktop_init(). Only set up customizable links here.
|
||||
|
||||
* gdesktop.c (create_desktop_dir): Do the default setup of desktop
|
||||
icons here.
|
||||
|
||||
* gmount.c (option_has_owner): New function to see if a mount
|
||||
entry has the "owner" flag and its uid matches our euid.
|
||||
(is_block_device_mountable): Use option_has_owner().
|
||||
(get_mountable_devices): Likewise.
|
||||
|
||||
1999-09-17 Federico Mena Quintero <federico@redhat.com>
|
||||
|
||||
* gmain.c (x_init_dlg): Display a warning if the GtkTed code path
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/* Customizable desktop links for the Midnight Commander
|
||||
*
|
||||
* Copyright (C) 1998-1999 The Free Software Foundation
|
||||
*
|
||||
@ -59,7 +59,6 @@ desktop_load_init_from (const char *file)
|
||||
char *filename = g_concat_dir_and_file (desktop_directory, key);
|
||||
|
||||
desktop_create_url (filename, title, url, icon2);
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
@ -132,7 +131,7 @@ desktop_init_at (const char *dir)
|
||||
}
|
||||
|
||||
void
|
||||
gdesktop_init (void)
|
||||
gdesktop_links_init (void)
|
||||
{
|
||||
char *dir;
|
||||
|
||||
@ -143,7 +142,4 @@ gdesktop_init (void)
|
||||
desktop_init_at (dir);
|
||||
g_free (dir);
|
||||
}
|
||||
gmount_setup_devices ();
|
||||
gprint_setup_devices ();
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,13 @@
|
||||
/* Customizable desktop links for the Midnight Commander
|
||||
*
|
||||
* Copyright (C) 1998-1999 The Free Software Foundation
|
||||
*
|
||||
* Authors: Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
*/
|
||||
|
||||
#ifndef GDESKTOP_INIT_H
|
||||
#define GDESKTOP_INIT_H
|
||||
|
||||
void gdesktop_init (void);
|
||||
void gdesktop_links_init (void);
|
||||
|
||||
#endif
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "gcmd.h"
|
||||
#include "gdnd.h"
|
||||
#include "gpopup.h"
|
||||
#include "gprint.h"
|
||||
#include "gscreen.h"
|
||||
#include "../vfs/vfs.h"
|
||||
#include "main.h"
|
||||
@ -2211,7 +2212,11 @@ create_desktop_dir (void)
|
||||
}
|
||||
g_free (home_link_name);
|
||||
|
||||
gdesktop_init ();
|
||||
/* Create the default set of icons */
|
||||
|
||||
gdesktop_links_init ();
|
||||
gmount_setup_devices ();
|
||||
gprint_setup_devices ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2551,7 +2556,7 @@ void
|
||||
desktop_rescan_devices (void)
|
||||
{
|
||||
desktop_cleanup_devices ();
|
||||
gdesktop_init ();
|
||||
gmount_setup_devices ();
|
||||
desktop_reload_icons (FALSE, 0, 0);
|
||||
}
|
||||
|
||||
@ -2633,7 +2638,7 @@ GnomeUIInfo desktop_popup_items[] = {
|
||||
GNOMEUIINFO_SUBTREE (N_("_Arrange Icons"), desktop_arrange_icons_items),
|
||||
GNOMEUIINFO_ITEM_NONE (N_("Create _New Window"), NULL, handle_new_window),
|
||||
GNOMEUIINFO_SEPARATOR,
|
||||
GNOMEUIINFO_ITEM_NONE (N_("Recreate Desktop _Shortcuts"), NULL, handle_rescan_devices),
|
||||
GNOMEUIINFO_ITEM_NONE (N_("Rescan Desktop _Devices"), NULL, handle_rescan_devices),
|
||||
GNOMEUIINFO_ITEM_NONE (N_("Rescan _Desktop"), NULL, handle_rescan_desktop),
|
||||
GNOMEUIINFO_ITEM_NONE (N_("Configure _Background Image"), NULL, set_background_image),
|
||||
GNOMEUIINFO_END
|
||||
|
@ -135,6 +135,27 @@ option_has_user (char *str)
|
||||
|
||||
#ifdef MOUNTED_GETMNTENT1
|
||||
|
||||
/* Returns whether the mount entry has the owner flag and our euid matches the
|
||||
* device file.
|
||||
*/
|
||||
static gboolean
|
||||
option_has_owner (struct mntent *mnt)
|
||||
{
|
||||
char *p;
|
||||
struct stat st;
|
||||
|
||||
if (strstr (mnt->mnt_opts, "owner") == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (stat (mnt->mnt_fsname, &st) != 0)
|
||||
return FALSE;
|
||||
|
||||
if (st.st_uid != geteuid ())
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Returns whether devname is mountable: NULL if it is not or g_strdup()ed
|
||||
* string with the mount point.
|
||||
*/
|
||||
@ -163,7 +184,7 @@ is_block_device_mountable (char *mount_point)
|
||||
break;
|
||||
}
|
||||
|
||||
if (option_has_user (mnt->mnt_opts)) {
|
||||
if (option_has_user (mnt->mnt_opts) || option_has_owner (mnt)) {
|
||||
retval = g_strdup (mnt->mnt_dir);
|
||||
break;
|
||||
}
|
||||
@ -207,7 +228,7 @@ get_mountable_devices (void)
|
||||
}
|
||||
|
||||
while ((mnt = getmntent (f)) != NULL) {
|
||||
if (option_has_user (mnt->mnt_opts)) {
|
||||
if (option_has_user (mnt->mnt_opts) || option_has_owner (mnt)) {
|
||||
devname_info_t *dit;
|
||||
|
||||
dit = g_new0 (devname_info_t, 1);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/* Printing support for the Midnight Commander
|
||||
*
|
||||
* Copyright (C) 1998-1999 The Free Software Foundation
|
||||
*
|
||||
@ -32,5 +32,3 @@ gprint_setup_devices (void)
|
||||
my_system (EXECUTE_WAIT | EXECUTE_AS_SHELL, shell, command);
|
||||
g_free (command);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[gnews]
|
||||
[gnotices]
|
||||
title=GNOME News
|
||||
type=url
|
||||
url=http://www.gnome.org/news
|
||||
url=http://news.gnome.org/gnome-news
|
||||
|
||||
[slashdot]
|
||||
title=Slashdot
|
||||
|
Loading…
Reference in New Issue
Block a user