summaryrefslogtreecommitdiff
path: root/components/help
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2000-05-04 15:46:22 +0000
committerDarin Adler <darin@src.gnome.org>2000-05-04 15:46:22 +0000
commite0e2e07eabc3000686e276e17bed6200b5eb55bf (patch)
tree7072f1c6f31f540effc715199e9c9ff54e0686b4 /components/help
parent9c14235dcd8ee598563d4a72c61d0570ccbb5623 (diff)
downloadnautilus-e0e2e07eabc3000686e276e17bed6200b5eb55bf.tar.gz
Some more instructions and cleanup. Removed one gratuitous renaming we
* HACKING: Some more instructions and cleanup. * RENAMING: Removed one gratuitous renaming we won't do. * components/html/ntl-web-browser.c: Removed stray "#include <config.h>" that I added by accident. * components/hardware/main.c: (main): * components/help/hyperbola-main.c: (main): * components/html/ntl-web-browser.c: (main): * components/music/main.c: (main): * components/notes/ntl-notes.c: (main): * components/rpmview/main.c: (main): * components/websearch/ntl-web-search.c: (main): * src/file-manager/gnome-desktop.c (main): * src/ntl-main.c (main): Added ifdefs so you don't get warnings when building with localization turned off. Ugly, but needed I think. * components/help/converters/gnome-db2html2/gdb3html.c: (ulink_start_element), (start_element): * components/help/converters/gnome-db2html2/sect-elements.c: (sect_sect_start_element), (sect_sect_end_element), (sect_title_start_element), (sect_xref_start_element), (sect_graphic_start_element), (sect_get_infobox_logo): * components/help/converters/gnome-db2html2/sect-preparse.c: (sect_preparse_sect_start_element), (sect_preparse_title_characters): * components/help/converters/gnome-db2html2/toc-elements.c: (toc_sect_start_element), (toc_title_start_element): * components/help/converters/gnome-info2html2/html.c: (write_node_link_html): * components/help/hyperbola-filefmt.c: (tree_key_compare): * components/help/hyperbola-nav-index.c: (start_element), (end_element), (hyperbola_navigation_index_new): * components/html/ntl-web-browser.c: (browser_submit): Replaced all uses of strcasecmp with g_strcasecmp. Why? Because Michael Meeks said so and that's good enough for me (in this case :-). * components/music/nautilus-music-view.c: (nautilus_music_view_update_from_uri): * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_mime_type_as_string_attribute), (nautilus_file_get_mime_type): * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_icon_name_for_regular_file): * src/file-manager/fm-icon-view.c (get_icon_property_callback): * src/ntl-index-panel.c (nautilus_index_panel_update_buttons): * src/ntl-uri-map.c (file_list_to_mime_type_hash_table): Changed get_mime_type to be like all other text functions and return a strdup'd string. John said it was a good idea. * libnautilus-extensions/nautilus-file-private.h: * libnautilus-extensions/nautilus-directory-async.c: (metafile_read_callback), (metafile_read_some), (set_up_request_by_file_attributes), (nautilus_directory_monitor_add_internal), (directory_list_get_next_position), (directory_load_callback), (ready_callback_call), (nautilus_directory_call_when_ready_internal), (wants_directory_count), (has_problem), (ready_callback_is_satisfied), (is_anyone_monitoring_file_list), (is_anyone_waiting_for_metafile), (is_wanted), (select_needy_file), (start_getting_directory_counts): Reorganize to get ready for adding code to read the top left text. * libnautilus-extensions/nautilus-file-attributes.h: Added name for the "top left text" attribute. * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_get_top_left_text): Added call to get the top left text. * libnautilus-extensions/nautilus-icon-canvas-item.c: (draw_embedded_text): Tiny format tweak. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_update_icon): Tiny format tweak. * libnautilus-extensions/nautilus-icon-factory.h: * libnautilus-extensions/nautilus-icon-factory.c: (nautilus_icon_factory_get_pixbuf_for_file), (nautilus_icon_factory_get_pixmap_and_mask_for_file), (nautilus_icon_factory_embed_text), (nautilus_icon_factory_embed_file_text): Added support for embedded text. Not completely deployed yet.
Diffstat (limited to 'components/help')
-rw-r--r--components/help/converters/gnome-db2html2/gdb3html.c6
-rw-r--r--components/help/converters/gnome-db2html2/sect-elements.c24
-rw-r--r--components/help/converters/gnome-db2html2/sect-preparse.c4
-rw-r--r--components/help/converters/gnome-db2html2/toc-elements.c4
-rw-r--r--components/help/converters/gnome-info2html2/html.c2
-rw-r--r--components/help/hyperbola-filefmt.c2
-rw-r--r--components/help/hyperbola-main.c3
-rw-r--r--components/help/hyperbola-nav-index.c28
8 files changed, 37 insertions, 36 deletions
diff --git a/components/help/converters/gnome-db2html2/gdb3html.c b/components/help/converters/gnome-db2html2/gdb3html.c
index 3d458f130..f651c41a9 100644
--- a/components/help/converters/gnome-db2html2/gdb3html.c
+++ b/components/help/converters/gnome-db2html2/gdb3html.c
@@ -35,7 +35,7 @@ ulink_start_element (Context *context, const gchar *name, const xmlChar **atrs)
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "url")) {
+ if (!g_strcasecmp (*atrs_ptr, "url")) {
atrs_ptr++;
if (index == UNDEFINED) {
g_print ("<A HREF=\"%s\">", *atrs_ptr);
@@ -200,9 +200,9 @@ start_element(Context *context,
if (element && element->start_element_func)
(* element->start_element_func) (context, name, attrs);
- if (!strcasecmp (name, "xref")) {
+ if (!g_strcasecmp (name, "xref")) {
context->stack = g_list_remove_link (context->stack, context->stack);
- } else if (!strcasecmp (name, "void")) {
+ } else if (!g_strcasecmp (name, "void")) {
context->stack = g_list_remove_link (context->stack, context->stack);
}
}
diff --git a/components/help/converters/gnome-db2html2/sect-elements.c b/components/help/converters/gnome-db2html2/sect-elements.c
index 9a14c4a69..fd6e75308 100644
--- a/components/help/converters/gnome-db2html2/sect-elements.c
+++ b/components/help/converters/gnome-db2html2/sect-elements.c
@@ -327,7 +327,7 @@ sect_sect_start_element (Context *context,
g_return_if_fail (strlen (name) >= 5);
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
((StackElement *)context->stack->data)->atrs = g_new0 (gchar *, 3);
((StackElement *)context->stack->data)->atrs[0] = g_strdup ("id");
@@ -397,7 +397,7 @@ sect_sect_end_element (Context *context,
atrs_ptr = ((StackElement *) context->stack->data)->atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
if (!strcmp (*atrs_ptr, context->target_section)) {
((SectContext *)context->data)->state = LOOKING_FOR_POST_SECT;
@@ -565,7 +565,7 @@ sect_title_start_element (Context *context,
atrs_ptr = (stack_el->atrs);
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
sect_print (context, "%s", *atrs_ptr);
break;
@@ -747,7 +747,7 @@ sect_xref_start_element (Context *context,
sect_print (context, "<A HREF=\"ghelp:%s", context->base_file);
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "linkend")) {
+ if (!g_strcasecmp (*atrs_ptr, "linkend")) {
atrs_ptr++;
sect_print (context, "?%s", *atrs_ptr);
break;
@@ -847,17 +847,17 @@ sect_graphic_start_element (Context *context,
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "format")) {
+ if (!g_strcasecmp (*atrs_ptr, "format")) {
atrs_ptr++;
format = *atrs_ptr;
atrs_ptr++;
continue;
- } else if (!strcasecmp (*atrs_ptr, "fileref")) {
+ } else if (!g_strcasecmp (*atrs_ptr, "fileref")) {
atrs_ptr++;
fileref = *atrs_ptr;
atrs_ptr++;
continue;
- } else if (!strcasecmp (*atrs_ptr, "id")) {
+ } else if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
sect_context->figure->id = g_strdup (*atrs_ptr);
atrs_ptr++;
@@ -869,7 +869,7 @@ sect_graphic_start_element (Context *context,
if (fileref == NULL)
return;
- if (format == NULL || (!strcasecmp (format, "gif")))
+ if (format == NULL || (!g_strcasecmp (format, "gif")))
sect_context->figure->img = g_strdup_printf ("%s.gif", fileref);
else
sect_context->figure->img = g_strdup_printf ("%s.png", fileref);
@@ -1109,13 +1109,13 @@ sect_programlisting_end_element (Context *context,
static gchar *
sect_get_infobox_logo (const gchar *name)
{
- if (!strcasecmp (name, "tip"))
+ if (!g_strcasecmp (name, "tip"))
return gnome_pixmap_file ("gnome-info.png");
- else if (!strcasecmp (name, "warning"))
+ else if (!g_strcasecmp (name, "warning"))
return gnome_pixmap_file ("gnome-warning.png");
- else if (!strcasecmp (name, "important"))
+ else if (!g_strcasecmp (name, "important"))
return gnome_pixmap_file ("gnome-info.png");
- else if (!strcasecmp (name, "note"))
+ else if (!g_strcasecmp (name, "note"))
return gnome_pixmap_file ("gnome-info.png");
return gnome_pixmap_file ("gnome-info.png");
}
diff --git a/components/help/converters/gnome-db2html2/sect-preparse.c b/components/help/converters/gnome-db2html2/sect-preparse.c
index d84ead78a..18b3cf442 100644
--- a/components/help/converters/gnome-db2html2/sect-preparse.c
+++ b/components/help/converters/gnome-db2html2/sect-preparse.c
@@ -89,7 +89,7 @@ sect_preparse_sect_start_element (Context *context,
g_return_if_fail (strlen (name) >= 5);
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
((StackElement *)context->stack->data)->atrs = g_new0 (gchar *, 3);
((StackElement *)context->stack->data)->atrs[0] = g_strdup ("id");
@@ -126,7 +126,7 @@ sect_preparse_title_characters (Context *context,
atrs_ptr = stack_el->atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
gchar *temp;
temp = g_strndup (chars, len);
diff --git a/components/help/converters/gnome-db2html2/toc-elements.c b/components/help/converters/gnome-db2html2/toc-elements.c
index f007f848b..2493529f3 100644
--- a/components/help/converters/gnome-db2html2/toc-elements.c
+++ b/components/help/converters/gnome-db2html2/toc-elements.c
@@ -151,7 +151,7 @@ toc_sect_start_element (Context *context,
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
((StackElement *)context->stack->data)->atrs = g_new0 (gchar *, 3);
((StackElement *)context->stack->data)->atrs[0] = g_strdup ("id");
@@ -367,7 +367,7 @@ toc_title_start_element (Context *context,
atrs_ptr = (stack_el->atrs);
while (atrs_ptr && *atrs_ptr) {
- if (!strcasecmp (*atrs_ptr, "id")) {
+ if (!g_strcasecmp (*atrs_ptr, "id")) {
atrs_ptr++;
g_print ("?%s", *atrs_ptr);
break;
diff --git a/components/help/converters/gnome-info2html2/html.c b/components/help/converters/gnome-info2html2/html.c
index ef0d74a9e..ebeaa7e3a 100644
--- a/components/help/converters/gnome-info2html2/html.c
+++ b/components/help/converters/gnome-info2html2/html.c
@@ -137,7 +137,7 @@ void write_node_link_html( FILE *f, char *nodefile, char *refname, char *ref )
char *href;
if (ref) {
- if (strcasecmp(ref, "(dir)")) {
+ if (g_strcasecmp(ref, "(dir)")) {
converted_nodename = g_strdup( ref );
map_spaces_to_underscores( converted_nodename );
href = form_info_tag_href(nodefile, converted_nodename);
diff --git a/components/help/hyperbola-filefmt.c b/components/help/hyperbola-filefmt.c
index 6c06e49df..ccfe0a0a0 100644
--- a/components/help/hyperbola-filefmt.c
+++ b/components/help/hyperbola-filefmt.c
@@ -50,7 +50,7 @@ tree_node_destroy(gpointer key, gpointer data, gpointer user_data)
static gint
tree_key_compare(gconstpointer k1, gconstpointer k2)
{
- return strcasecmp(k1, k2);
+ return g_strcasecmp(k1, k2);
}
HyperbolaDocTree *
diff --git a/components/help/hyperbola-main.c b/components/help/hyperbola-main.c
index 666bb2c20..1e0c2a7e0 100644
--- a/components/help/hyperbola-main.c
+++ b/components/help/hyperbola-main.c
@@ -51,9 +51,10 @@ main(int argc, char *argv[])
CORBA_ORB orb;
/* Initialize gettext support */
+#ifdef ENABLE_NLS /* sadly we need this ifdef because otherwise the following get empty statement warnings */
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
-
+#endif
gnome_init_with_popt_table("hyperbola", VERSION,
argc, argv,
diff --git a/components/help/hyperbola-nav-index.c b/components/help/hyperbola-nav-index.c
index 7cd32c3e2..81efd2b79 100644
--- a/components/help/hyperbola-nav-index.c
+++ b/components/help/hyperbola-nav-index.c
@@ -282,13 +282,13 @@ start_element(SAXParseInfo *spi,
const gchar *name,
const xmlChar **attrs)
{
- if(!strcasecmp(name, "indexterm"))
+ if(!g_strcasecmp(name, "indexterm"))
{
int i;
for(i = 0; attrs[i]; i++)
{
- if(!strcasecmp(attrs[i], "id"))
+ if(!g_strcasecmp(attrs[i], "id"))
{
i++;
break;
@@ -309,19 +309,19 @@ start_element(SAXParseInfo *spi,
if(!spi->in_term || spi->sub_type != NONE)
return;
- if(!strcasecmp(name, "primary"))
+ if(!g_strcasecmp(name, "primary"))
{
spi->sub_type = PRIMARY;
}
- else if(!strcasecmp(name, "secondary"))
+ else if(!g_strcasecmp(name, "secondary"))
{
spi->sub_type = SECONDARY;
}
- else if(!strcasecmp(name, "seealso"))
+ else if(!g_strcasecmp(name, "seealso"))
{
spi->sub_type = SEEALSO;
}
- else if(!strcasecmp(name, "see"))
+ else if(!g_strcasecmp(name, "see"))
{
spi->sub_type = SEE;
}
@@ -381,7 +381,7 @@ end_element (SAXParseInfo *spi,
{
int this_type;
- if(!strcasecmp(name, "indexterm"))
+ if(!g_strcasecmp(name, "indexterm"))
{
int i;
IndexItem *parent_ii = NULL, *ii = NULL;
@@ -410,7 +410,7 @@ end_element (SAXParseInfo *spi,
}
if(!parent_ii->subitems)
- parent_ii->subitems = g_tree_new((GCompareFunc)strcasecmp);
+ parent_ii->subitems = g_tree_new((GCompareFunc)g_strcasecmp);
parent_tree = parent_ii->subitems;
if(spi->stinfo[SECONDARY])
@@ -435,7 +435,7 @@ end_element (SAXParseInfo *spi,
}
if(!ii->subitems)
- ii->subitems = g_tree_new((GCompareFunc)strcasecmp);
+ ii->subitems = g_tree_new((GCompareFunc)g_strcasecmp);
parent_ii = ii;
parent_tree = parent_ii->subitems;
@@ -518,19 +518,19 @@ end_element (SAXParseInfo *spi,
if(!spi->in_term || spi->sub_type == NONE)
return;
- if(!strcasecmp(name, "primary"))
+ if(!g_strcasecmp(name, "primary"))
{
this_type = PRIMARY;
}
- else if(!strcasecmp(name, "secondary"))
+ else if(!g_strcasecmp(name, "secondary"))
{
this_type = SECONDARY;
}
- else if(!strcasecmp(name, "seealso"))
+ else if(!g_strcasecmp(name, "seealso"))
{
this_type = SEEALSO;
}
- else if(!strcasecmp(name, "see"))
+ else if(!g_strcasecmp(name, "see"))
{
this_type = SEE;
}
@@ -683,7 +683,7 @@ BonoboObject *hyperbola_navigation_index_new(void)
char *dir;
hni = g_new0(HyperbolaNavigationIndex, 1);
- hni->all_items = g_tree_new((GCompareFunc)strcasecmp);
+ hni->all_items = g_tree_new((GCompareFunc)g_strcasecmp);
dir = gnome_datadir_file("gnome/help");
if(!dir)