mirror of https://github.com/MidnightCommander/mc
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
|
||||
*
|
||||
|
@ -20,7 +20,7 @@ desktop_load_init_from (const char *file)
|
|||
{
|
||||
void *iterator_handle;
|
||||
char *config_path = g_strconcat ("=", file, "=", NULL);
|
||||
|
||||
|
||||
iterator_handle = gnome_config_init_iterator_sections (config_path);
|
||||
|
||||
do {
|
||||
|
@ -45,7 +45,7 @@ desktop_load_init_from (const char *file)
|
|||
int used;
|
||||
char *icon = NULL, *url;
|
||||
char *icon2 = NULL;
|
||||
|
||||
|
||||
url = gnome_config_get_string ("url");
|
||||
icon = gnome_config_get_string_with_default ("icon=", &used);
|
||||
if (!icon)
|
||||
|
@ -57,9 +57,8 @@ desktop_load_init_from (const char *file)
|
|||
}
|
||||
if (url && *url){
|
||||
char *filename = g_concat_dir_and_file (desktop_directory, key);
|
||||
|
||||
desktop_create_url (filename, title, url, icon2);
|
||||
|
||||
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);
|
||||
|
@ -295,7 +316,7 @@ automounter_is_running (void)
|
|||
gboolean result = FALSE;
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
|
||||
|
||||
server = goad_server_activate_with_id (NULL,
|
||||
"GOAD:magicdev:19990913",
|
||||
GOAD_ACTIVATE_EXISTING_ONLY,
|
||||
|
@ -305,12 +326,12 @@ automounter_is_running (void)
|
|||
result = GNOME_MagicDev_is_running (server, &ev);
|
||||
if (ev._major != CORBA_NO_EXCEPTION)
|
||||
result = FALSE;
|
||||
|
||||
|
||||
CORBA_Object_release (server, &ev);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
#else /* !HAVE_CORBA */
|
||||
return FALSE;
|
||||
#endif /* HAVE_CORBA */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/* Printing support for the Midnight Commander
|
||||
*
|
||||
* Copyright (C) 1998-1999 The Free Software Foundation
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ gprint_setup_devices (void)
|
|||
static char *gprint_path;
|
||||
char *desktop_quoted;
|
||||
char *command;
|
||||
|
||||
|
||||
if (!gprint_path)
|
||||
gprint_path = gnome_is_program_in_path ("g-print");
|
||||
|
||||
|
@ -28,9 +28,7 @@ gprint_setup_devices (void)
|
|||
desktop_quoted = name_quote (desktop_directory, 0);
|
||||
command = g_strconcat (gprint_path, " --desktop-dir ", desktop_quoted, NULL);
|
||||
g_free (desktop_quoted);
|
||||
|
||||
|
||||
my_system (EXECUTE_WAIT | EXECUTE_AS_SHELL, shell, command);
|
||||
g_free (command);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[gnews]
|
||||
[gnotices]
|
||||
title=GNOME News
|
||||
type=url
|
||||
url=http://www.gnome.org/news
|
||||
url=http://news.gnome.org/gnome-news
|
||||
|
||||
[slashdot]
|
||||
title=Slashdot
|
||||
type=url
|
||||
url=http://slashdot.org
|
||||
url=http://slashdot.org
|
||||
|
|
Loading…
Reference in New Issue