2000-02-01 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>

* gicon.c (gicon_init): make missing icons non-fatal error

        * gmain.c, gdesktop.c: added option not to display desktop icons
This commit is contained in:
Pavel Machek 2000-01-31 15:05:23 +00:00
parent aa6cbcbc89
commit 8dcb55ce88
5 changed files with 25 additions and 22 deletions

View File

@ -1,3 +1,9 @@
2000-02-01 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>
* gicon.c (gicon_init): make missing icons non-fatal error
* gmain.c, gdesktop.c: added option not to display desktop icons
2000-01-26 Federico Mena Quintero <federico@helixcode.com>
* gmc-client.c (options): Added the --arrange-desktop-icons

View File

@ -3188,11 +3188,13 @@ desktop_init (void)
{
icon_hash = g_hash_table_new (g_str_hash, g_str_equal);
gdnd_init ();
gicon_init ();
create_layout_info ();
create_desktop_dir ();
desktop_reload_icons (FALSE, 0, 0);
if (!nodesktop) {
gdnd_init ();
gicon_init ();
create_layout_info ();
create_desktop_dir ();
desktop_reload_icons (FALSE, 0, 0);
}
/* Create the proxy window and initialize all proxying stuff */

View File

@ -72,6 +72,8 @@ build_overlay (GdkImlibImage *plain, GdkImlibImage *overlay)
im = gdk_imlib_clone_image (plain);
g_return_val_if_fail(plain, NULL);
g_return_val_if_fail(overlay, NULL);
rowstride = plain->rgb_width * 3;
overlay_rowstride = overlay->rgb_width * 3;
@ -211,14 +213,6 @@ get_icon_set (const char *filename)
return iset;
}
/* Die because the icon installation is wrong */
static void
die_with_no_icons (void)
{
message (1, _("Error"), _("Default set of icons not found, please check your installation"));
exit (1);
}
/* Convenience function to load one of the default icons and die if this fails */
static IconSet *
get_stock_icon (char *name)
@ -230,9 +224,6 @@ get_stock_icon (char *name)
iset = get_icon_set (filename);
g_free (filename);
if (!iset)
die_with_no_icons ();
return iset;
}
@ -247,9 +238,6 @@ get_stock_overlay (char *name)
im = gdk_imlib_load_image (filename);
g_free (filename);
if (!im)
die_with_no_icons ();
return im;
}
@ -288,6 +276,11 @@ gicon_init (void)
symlink_overlay = get_stock_overlay ("i-symlink.png");
stalled_overlay = get_stock_overlay ("i-stalled.png");
if (!iset_directory || !iset_dirclosed || !iset_executable ||
!iset_regular || !iset_core || !iset_fifo || !iset_chardev ||
!iset_blockdev || !symlink_overlay || !stalled_overlay)
message (1, _("Warning"), _("Default set of icons not found, check your installation"));
our_uid = getuid ();
our_gid = getgid ();
}
@ -500,7 +493,7 @@ gicon_get_icon_for_file (char *directory, file_entry *fe, gboolean do_quick)
add_link:
g_assert (iset != NULL);
g_return_val_if_fail (iset, NULL);
if (S_ISLNK (mode)) {
if (fe->f.link_to_dir && !is_user_set)

View File

@ -9,7 +9,7 @@ int xtoolkit_init (int *argc, char *argv []);
void xtoolkit_end (void);
extern Dlg_head *desktop_dlg;
extern int nowindows;
extern int nowindows, nodesktop, twopanel;
extern int corba_have_server;
extern int use_magic;

View File

@ -366,7 +366,7 @@ char cmd_buf [512];
int finish_program = 0;
/* If set, then no windows are displayed in the GNOME edition */
int nowindows = 0;
int nowindows = 0, nodesktop = 0, twopanel;
/* If set it displays the directory that holds the gnome .links files */
int display_linksdir = 0;
@ -2753,6 +2753,8 @@ static const struct poptOption argument_table [] = {
#ifdef HAVE_GNOME
{ "geometry", '\0', POPT_ARG_STRING, &cmdline_geometry, 0, N_("Geometry for the window"), N_("GEOMETRY")},
{"nowindows", '\0', POPT_ARG_NONE, &nowindows, 0, N_("No windows opened at startup"), NULL},
{"nodesktop", '\0', POPT_ARG_NONE, &nodesktop, 0, N_("No desktop icons"), NULL},
{"twopanel", '\0', POPT_ARG_NONE, &twopanel, 0, N_("Look more like traditional gmc"), NULL},
{"desktop-linksdir", '\0', POPT_ARG_NONE, &display_linksdir, 0,
N_("Display the directory that holds the .links startup files and exit")},
#endif