GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit c0f797d9 authored by Andy Hertzfeld's avatar Andy Hertzfeld

first checkin for link sets, which are incomplete and not hooked up yet.


         first checkin for link sets, which are incomplete and not hooked
	 up yet.  Also, added a title to the property browser and improved
	 the default color choices to one's specified by Susan.
parent 68359c8c
2000-05-31 Andy Hertzfeld <andy@eazel.com>
first checkin for link-sets, which are still incomplete and
not hooked up yet.
* configure.in:
* data/Makefile.am:
* data/linksets/.cvsignore:
* data/linksets/Makefile.am:
* data/linksets/apps.xml:
added data directory for link sets and one actual set
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-link-set.c: (make_new_link),
(nautilus_link_set_install), (nautilus_link_set_remove):
* libnautilus-extensions/nautilus-link-set.h:
first, incomplete implementation of link sets
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize):
added a title to the property browser window
* data/browser.xml:
improved the default colors in the property browser to ones
suggested by Susan
2000-05-31 Seth Nickell <snickell@stanford.edu>
* libnautilus-extensions/nautilus-directory.c:
......
......@@ -320,6 +320,7 @@ data/Makefile
data/top/Makefile
data/backgrounds/Makefile
data/emblems/Makefile
data/linksets/Makefile
idl/Makefile
librsvg/Makefile
libnautilus/Makefile
......
......@@ -11,5 +11,6 @@ EXTRA_DIST = $(info_DATA)
SUBDIRS = \
backgrounds \
emblems \
linksets \
top \
$(NULL)
......@@ -3,15 +3,27 @@
<category name="backgrounds" image="nautilus/backgrounds.png" mode="directory" path="nautilus/backgrounds" type="property/bgimage"/>
<category name="emblems" image="nautilus/emblems.png" mode="directory" path="nautilus/emblems" type="property/keyword"/>
<category name="colors" image="nautilus/colors.png" mode="inline" type="application/x-color">
<color>rgb:FFFF/0000/0000</color>
<color>rgb:0000/FFFF/0000</color>
<color>rgb:0000/0000/FFFF</color>
<color>rgb:FFFF/FFFF/0000</color>
<color>rgb:0000/FFFF/FFFF</color>
<color>rgb:FFFF/0000/FFFF</color>
<color>rgb:FFFF/FFFF/3333</color>
<color>rgb:FFFF/CCCC/3333</color>
<color>rgb:FFFF/9999/3333</color>
<color>rgb:FFFF/6666/3333</color>
<color>rgb:FFFF/3333/3333</color>
<color>rgb:FFFF/0000/3333</color>
<color>rgb:6666/FFFF/FFFF</color>
<color>rgb:6666/CCCC/FFFF</color>
<color>rgb:6666/9999/FFFF</color>
<color>rgb:6666/6666/FFFF</color>
<color>rgb:6666/3333/FFFF</color>
<color>rgb:0000/3333/CCCC</color>
<color>rgb:CCCC/FFFF/CCCC</color>
<color>rgb:9999/FFFF/6666</color>
<color>rgb:6666/CCCC/6666</color>
<color>rgb:3333/6666/6666</color>
<color>rgb:3333/6666/3333</color>
<color>rgb:0000/0000/3333</color>
<color>rgb:0000/0000/0000</color>
<color>rgb:3333/3333/3333</color>
<color>rgb:6666/6666/6666</color>
<color>rgb:7FFF/7FFF/7FFF</color>
<color>rgb:9999/9999/9999</color>
<color>rgb:CCCC/CCCC/CCCC</color>
<color>rgb:FFFF/FFFF/FFFF</color>
......
Makefile
Makefile.in
NULL=
linkdir = $(datadir)/nautilus/linksets
link_DATA = \
apps.xml \
$(NULL)
EXTRA_DIST = $(link_DATA)
<?xml version="1.0"?>
<linkset name="Applications">
<link name="Netscape" image="netscape.png" uri="command:netscape"/>
<link name="AbiWord" image="abiword.png" uri="command:AbiWord"/>
<link name="Gnumeric" image="gnome-gnumeric.png" uri="command:gnumeric"/>
</linkset>
......@@ -58,6 +58,7 @@ libnautilus_extensionsinclude_HEADERS= \
nautilus-icon-text-item.h \
nautilus-keep-last-vertical-box.h \
nautilus-link.h \
nautilus-link-set.h \
nautilus-list-column-title.h \
nautilus-list.h \
nautilus-metadata.h \
......@@ -112,6 +113,7 @@ libnautilus_extensions_la_SOURCES = \
nautilus-keep-last-vertical-box.c \
nautilus-lib-self-check-functions.c \
nautilus-link.c \
nautilus-link-set.c \
nautilus-list-column-title.c \
nautilus-list.c \
nautilus-mini-icon.c \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-link.c: xml-based link file sets.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Andy Hertzfeld <andy@eazel.com>
*/
#include <config.h>
#include <stdlib.h>
#include <parser.h>
#include <xmlmemory.h>
#include "nautilus-file.h"
#include "nautilus-link.h"
#include "nautilus-metadata.h"
#include "nautilus-string.h"
#include "nautilus-xml-extensions.h"
#include "nautilus-global-preferences.h"
#include "nautilus-widgets/nautilus-preferences.h"
#include "nautilus-link-set.h"
/* routine to create a new .link file in the specified directory */
static gboolean
make_new_link(const char *directory_uri, const char *name, const char *image, const char *uri)
{
g_message("creating link %s, image %s, uri %s", name, image, uri);
return TRUE;
}
/* install a link set into the specified directory */
gboolean
nautilus_link_set_install (const char *directory_uri, const char *link_set_name)
{
NautilusFile *file;
xmlDocPtr document;
xmlNodePtr cur_node;
char *temp_str, *link_set_path;
char *link_name, *image_name, *uri_name;
file = nautilus_file_get(directory_uri);
if (file == NULL)
return FALSE;
/* make sure the target is a writable directory */
if (!nautilus_file_is_directory(file) || !nautilus_file_can_write(file)) {
nautilus_file_unref(file);
return FALSE;
}
/* compose the path of the link set file */
temp_str = g_strdup_printf ("nautilus/linksets/%s.xml", link_set_name);
link_set_path = gnome_datadir_file (temp_str);
/* load and parse the linkset xml file */
document = xmlParseFile (link_set_path);
g_free(temp_str);
g_free(link_set_path);
if (document == NULL)
return FALSE;
/* loop through the entries, generating .link files */
for (cur_node = document->root->childs; cur_node != NULL; cur_node = cur_node->next) {
if (strcmp(cur_node->name, "link") == 0) {
link_name = xmlGetProp (cur_node, "name");
image_name = xmlGetProp (cur_node, "image");
uri_name = xmlGetProp (cur_node, "uri");
make_new_link(directory_uri, link_name, image_name, uri_name);
}
}
/* all done so return TRUE */
xmlFreeDoc(document);
return TRUE;
}
/* remove a link set from the specified directory */
void
nautilus_link_set_remove (const char *directory_uri, const char *link_set_name)
{
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-link-set.h: xml-based sets of link files
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: Andy Hertzfeld <andy@eazel.com>
*/
#ifndef NAUTILUS_LINK_SET_H
#define NAUTILUS_LINK_SET_H
#include <glib.h>
gboolean nautilus_link_set_install (const char *file_uri, const char *link_set_name);
void nautilus_link_set_remove (const char *file_uri, const char *link_set_name);
#endif /* NAUTILUS_LINK_H */
......@@ -58,6 +58,7 @@ libnautilus_extensionsinclude_HEADERS= \
nautilus-icon-text-item.h \
nautilus-keep-last-vertical-box.h \
nautilus-link.h \
nautilus-link-set.h \
nautilus-list-column-title.h \
nautilus-list.h \
nautilus-metadata.h \
......@@ -112,6 +113,7 @@ libnautilus_extensions_la_SOURCES = \
nautilus-keep-last-vertical-box.c \
nautilus-lib-self-check-functions.c \
nautilus-link.c \
nautilus-link-set.c \
nautilus-list-column-title.c \
nautilus-list.c \
nautilus-mini-icon.c \
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-link.c: xml-based link file sets.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Andy Hertzfeld <andy@eazel.com>
*/
#include <config.h>
#include <stdlib.h>
#include <parser.h>
#include <xmlmemory.h>
#include "nautilus-file.h"
#include "nautilus-link.h"
#include "nautilus-metadata.h"
#include "nautilus-string.h"
#include "nautilus-xml-extensions.h"
#include "nautilus-global-preferences.h"
#include "nautilus-widgets/nautilus-preferences.h"
#include "nautilus-link-set.h"
/* routine to create a new .link file in the specified directory */
static gboolean
make_new_link(const char *directory_uri, const char *name, const char *image, const char *uri)
{
g_message("creating link %s, image %s, uri %s", name, image, uri);
return TRUE;
}
/* install a link set into the specified directory */
gboolean
nautilus_link_set_install (const char *directory_uri, const char *link_set_name)
{
NautilusFile *file;
xmlDocPtr document;
xmlNodePtr cur_node;
char *temp_str, *link_set_path;
char *link_name, *image_name, *uri_name;
file = nautilus_file_get(directory_uri);
if (file == NULL)
return FALSE;
/* make sure the target is a writable directory */
if (!nautilus_file_is_directory(file) || !nautilus_file_can_write(file)) {
nautilus_file_unref(file);
return FALSE;
}
/* compose the path of the link set file */
temp_str = g_strdup_printf ("nautilus/linksets/%s.xml", link_set_name);
link_set_path = gnome_datadir_file (temp_str);
/* load and parse the linkset xml file */
document = xmlParseFile (link_set_path);
g_free(temp_str);
g_free(link_set_path);
if (document == NULL)
return FALSE;
/* loop through the entries, generating .link files */
for (cur_node = document->root->childs; cur_node != NULL; cur_node = cur_node->next) {
if (strcmp(cur_node->name, "link") == 0) {
link_name = xmlGetProp (cur_node, "name");
image_name = xmlGetProp (cur_node, "image");
uri_name = xmlGetProp (cur_node, "uri");
make_new_link(directory_uri, link_name, image_name, uri_name);
}
}
/* all done so return TRUE */
xmlFreeDoc(document);
return TRUE;
}
/* remove a link set from the specified directory */
void
nautilus_link_set_remove (const char *directory_uri, const char *link_set_name)
{
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
nautilus-link-set.h: xml-based sets of link files
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: Andy Hertzfeld <andy@eazel.com>
*/
#ifndef NAUTILUS_LINK_SET_H
#define NAUTILUS_LINK_SET_H
#include <glib.h>
gboolean nautilus_link_set_install (const char *file_uri, const char *link_set_name);
void nautilus_link_set_remove (const char *file_uri, const char *link_set_name);
#endif /* NAUTILUS_LINK_H */
......@@ -175,6 +175,9 @@ nautilus_property_browser_initialize (GtkObject *object)
gtk_widget_set_usize (widget, PROPERTY_BROWSER_WIDTH, PROPERTY_BROWSER_HEIGHT);
gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
/* set the title */
gtk_window_set_title(GTK_WINDOW(widget), _("Nautilus Property Browser"));
/* set up the background */
background = nautilus_get_widget_background (GTK_WIDGET (property_browser));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment