summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGediminas Paulauskas <menesis@delfi.lt>2001-12-05 18:58:07 +0000
committerGediminas Paulauskas <menesis@src.gnome.org>2001-12-05 18:58:07 +0000
commit60c93330fba3a0bb93d7f7d09431e94209483775 (patch)
tree1e19296c895720c89fcc0d7d385da71ebb147e3e
parent0ab4560728c8d9104cf6da7f3d8ad5f2052ce545 (diff)
downloadnautilus-60c93330fba3a0bb93d7f7d09431e94209483775.tar.gz
remove cut'n'pasted functions which are in glib now. don't set close key
2001-12-05 Gediminas Paulauskas <menesis@delfi.lt> * libnautilus-private/nautilus-desktop-file-loader.c: remove cut'n'pasted functions which are in glib now. * src/nautilus-about.c (nautilus_about_instance_init): don't set close key accelerator, Gtk+ does that already. 2001-12-05 Gediminas Paulauskas <menesis@delfi.lt> * configure.in, libnautilus/Makefile.am, libnautilus/libnautilus.pc.in: make libnautilus know to pkg-config 2001-12-05 Gediminas Paulauskas <menesis@delfi.lt> * components/hardware/main.c, components/help/hyperbola-main.c, components/image-viewer/nautilus-image-view.c, components/mozilla/main.c, libnautilus/nautilus-view-standard-main.c, src/nautilus-main.c: (main) get translated messages from nautilus text domain in utf-8. * src/nautilus-window-menus.c: (help_menu_about_nautilus_callback) replace copyright symbol with utf-8 version of it.
-rw-r--r--ChangeLog22
-rw-r--r--components/Makefile.am6
-rw-r--r--components/hardware/main.c1
-rw-r--r--components/help/hyperbola-main.c1
-rw-r--r--components/image-viewer/nautilus-image-view.c1
-rw-r--r--components/mozilla/main.c1
-rw-r--r--configure.in1
-rw-r--r--libnautilus-private/nautilus-desktop-file-loader.c62
-rw-r--r--libnautilus/.cvsignore1
-rw-r--r--libnautilus/Makefile.am4
-rw-r--r--libnautilus/libnautilus.pc.in11
-rw-r--r--libnautilus/nautilus-view-standard-main.c1
-rw-r--r--src/file-manager/nautilus-indexing-info.c2
-rw-r--r--src/nautilus-about.c3
-rw-r--r--src/nautilus-main.c1
-rw-r--r--src/nautilus-navigation-window-menus.c7
-rw-r--r--src/nautilus-window-menus.c7
17 files changed, 56 insertions, 76 deletions
diff --git a/ChangeLog b/ChangeLog
index 467961960..5def05ba6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2001-12-05 Gediminas Paulauskas <menesis@delfi.lt>
+
+ * libnautilus-private/nautilus-desktop-file-loader.c: remove
+ cut'n'pasted functions which are in glib now.
+ * src/nautilus-about.c (nautilus_about_instance_init): don't set
+ close key accelerator, Gtk+ does that already.
+
+2001-12-05 Gediminas Paulauskas <menesis@delfi.lt>
+
+ * configure.in, libnautilus/Makefile.am,
+ libnautilus/libnautilus.pc.in: make libnautilus know to pkg-config
+
+2001-12-05 Gediminas Paulauskas <menesis@delfi.lt>
+
+ * components/hardware/main.c, components/help/hyperbola-main.c,
+ components/image-viewer/nautilus-image-view.c,
+ components/mozilla/main.c, libnautilus/nautilus-view-standard-main.c,
+ src/nautilus-main.c: (main) get translated messages from nautilus
+ text domain in utf-8.
+ * src/nautilus-window-menus.c: (help_menu_about_nautilus_callback)
+ replace copyright symbol with utf-8 version of it.
+
2001-12-04 Darin Adler <darin@bentspoon.com>
Fix bugs exposed by "make check".
diff --git a/components/Makefile.am b/components/Makefile.am
index 7637a8557..95569b870 100644
--- a/components/Makefile.am
+++ b/components/Makefile.am
@@ -5,18 +5,18 @@ MOZILLA_COMPONENT_SUBDIRS = mozilla
endif
SUBDIRS = \
- sample \
+ help \
history \
+ image-viewer \
news \
notes \
+ sample \
throbber \
$(NULL)
XXX=
adapter \
hardware \
- help \
- image-viewer \
loser \
music \
text \
diff --git a/components/hardware/main.c b/components/hardware/main.c
index c660b5cab..8e96d1853 100644
--- a/components/hardware/main.c
+++ b/components/hardware/main.c
@@ -76,6 +76,7 @@ int main(int argc, char *argv[])
/* Initialize gettext support */
#ifdef ENABLE_NLS /* sadly we need this ifdef because otherwise the following get empty statement warnings */
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
#endif
diff --git a/components/help/hyperbola-main.c b/components/help/hyperbola-main.c
index 965163107..0ffa68af6 100644
--- a/components/help/hyperbola-main.c
+++ b/components/help/hyperbola-main.c
@@ -98,6 +98,7 @@ main (int argc, char *argv[])
/* Initialize gettext support */
#ifdef ENABLE_NLS /* sadly we need this ifdef because otherwise the following get empty statement warnings */
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
#endif
diff --git a/components/image-viewer/nautilus-image-view.c b/components/image-viewer/nautilus-image-view.c
index aa74dfd55..a71b71e28 100644
--- a/components/image-viewer/nautilus-image-view.c
+++ b/components/image-viewer/nautilus-image-view.c
@@ -848,6 +848,7 @@ main (int argc, char *argv [])
/* Initialize gettext support */
#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
#endif
diff --git a/components/mozilla/main.c b/components/mozilla/main.c
index d9cb6e131..8e33df903 100644
--- a/components/mozilla/main.c
+++ b/components/mozilla/main.c
@@ -247,6 +247,7 @@ main (int argc, char *argv[])
/* Initialize gettext support */
#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
#endif
diff --git a/configure.in b/configure.in
index 7cf923399..8dd66db40 100644
--- a/configure.in
+++ b/configure.in
@@ -601,6 +601,7 @@ icons/throbber/Makefile
libnautilus-adapter/Makefile
libnautilus-private/Makefile
libnautilus/Makefile
+libnautilus/libnautilus.pc
nautilus.spec
omf-install/Makefile
po/Makefile.in
diff --git a/libnautilus-private/nautilus-desktop-file-loader.c b/libnautilus-private/nautilus-desktop-file-loader.c
index 346de05b9..60c285635 100644
--- a/libnautilus-private/nautilus-desktop-file-loader.c
+++ b/libnautilus-private/nautilus-desktop-file-loader.c
@@ -294,50 +294,10 @@ nautilus_desktop_file_free (NautilusDesktopFile *df)
}
-/* This is cut and pasted from glib 1.3.x
- * It should be removed when porting to glib 2
- */
-/**
- * g_strdupv:
- * @str_array: %NULL-terminated array of strings
- *
- * Copies %NULL-terminated array of strings. The copy is a deep copy;
- * the new array should be freed by first freeing each string, then
- * the array itself. g_strfreev() does this for you. If called
- * on a %NULL value, g_strdupv() simply returns %NULL.
- *
- * Return value: a new %NULL-terminated array of strings
- **/
-static gchar**
-cnp_g_strdupv (gchar **str_array)
-{
- if (str_array) {
- gint i;
- gchar **retval;
-
- i = 0;
- while (str_array[i])
- ++i;
-
- retval = g_new (gchar*, i + 1);
-
- i = 0;
- while (str_array[i]) {
- retval[i] = g_strdup (str_array[i]);
- ++i;
- }
- retval[i] = NULL;
-
- return retval;
- } else {
- return NULL;
- }
-}
-
char**
nautilus_desktop_file_get_lines (NautilusDesktopFile *df)
{
- return cnp_g_strdupv (df->lines);
+ return g_strdupv (df->lines);
}
/* Custom hash functions allow us to avoid strdups */
@@ -1071,24 +1031,6 @@ validated_strdup (const char *str)
return buf;
}
-/* This is cut and pasted from glib 1.3.x
- * It should be removed when porting to glib 2
- */
-static void
-cnp_g_string_append_len (GString *str,
- const char *s,
- int len)
-{
- if (len < 0) {
- g_string_append (str, s);
- } else {
- char *tmp;
- tmp = g_strndup (s, len);
- g_string_append (str, tmp);
- g_free (tmp);
- }
-}
-
static char*
nautilus_desktop_file_sub_formats (NautilusDesktopFile *df,
const char *src)
@@ -1107,7 +1049,7 @@ nautilus_desktop_file_sub_formats (NautilusDesktopFile *df,
while (p) {
if (p != end) {
/* Append what we just scanned over */
- cnp_g_string_append_len (new, end, p - end);
+ g_string_append_len (new, end, p - end);
}
end = p;
diff --git a/libnautilus/.cvsignore b/libnautilus/.cvsignore
index bfba3f41e..bb26a14b7 100644
--- a/libnautilus/.cvsignore
+++ b/libnautilus/.cvsignore
@@ -15,3 +15,4 @@ nautilus-view-component-stubs.c
nautilus-view-component.h
nautilus_distributed_undo_idl_stamp
nautilus_view_component_idl_stamp
+libnautilus.pc
diff --git a/libnautilus/Makefile.am b/libnautilus/Makefile.am
index 6e9d09ff4..a619a919f 100644
--- a/libnautilus/Makefile.am
+++ b/libnautilus/Makefile.am
@@ -78,9 +78,13 @@ idl_DATA = \
nautilus-distributed-undo.idl \
$(NULL)
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA=libnautilus.pc
+
EXTRA_DIST = \
$(ui_DATA) \
$(idl_DATA) \
+ libnautilus.pc.in \
$(NULL)
BUILT_SOURCES = \
diff --git a/libnautilus/libnautilus.pc.in b/libnautilus/libnautilus.pc.in
new file mode 100644
index 000000000..3bfd6c1a1
--- /dev/null
+++ b/libnautilus/libnautilus.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libnautilus
+Description: A library to create Nautilus components
+Version: @VERSION@
+Requires: eel-2.0 bonobo-activation-2.0 libbonobo-2.0 libbonoboui-2.0
+Libs: -L${libdir} -lnautilus
+Cflags: -I${includedir}
diff --git a/libnautilus/nautilus-view-standard-main.c b/libnautilus/nautilus-view-standard-main.c
index 7ae8a37f1..04136a67a 100644
--- a/libnautilus/nautilus-view-standard-main.c
+++ b/libnautilus/nautilus-view-standard-main.c
@@ -188,6 +188,7 @@ nautilus_view_standard_main_multi (const char *executable_name,
if (gettext_package_name != NULL
&& gettext_locale_directory != NULL) {
bindtextdomain (gettext_package_name, gettext_locale_directory);
+ bind_textdomain_codeset (gettext_package_name, "UTF-8");
textdomain (gettext_package_name);
}
#endif
diff --git a/src/file-manager/nautilus-indexing-info.c b/src/file-manager/nautilus-indexing-info.c
index 0f880c176..e518594f5 100644
--- a/src/file-manager/nautilus-indexing-info.c
+++ b/src/file-manager/nautilus-indexing-info.c
@@ -110,7 +110,7 @@ update_progress_display (gpointer callback_data)
static void
dialog_close_cover (gpointer dialog_data)
{
- g_assert (GNOME_IS_DIALOG (dialog_data));
+ g_assert (GTK_IS_DIALOG (dialog_data));
gtk_dialog_close (dialog_data);
}
diff --git a/src/nautilus-about.c b/src/nautilus-about.c
index 725319852..491c789e3 100644
--- a/src/nautilus-about.c
+++ b/src/nautilus-about.c
@@ -126,10 +126,9 @@ nautilus_about_instance_init (NautilusAbout *about)
about->details->background_pixbuf = gdk_pixbuf_new_from_file (background_path, NULL);
g_free (background_path);
- /* set the window title and standard close key accelerator */
+ /* set the window title */
gtk_window_set_title (GTK_WINDOW (about), _("About Nautilus"));
gtk_window_set_wmclass (GTK_WINDOW (about), "about", "Nautilus");
- eel_gtk_window_set_up_close_accelerator (GTK_WINDOW (about));
/* allocate a frame to hold the drawing area */
frame = gtk_frame_new (NULL);
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index 37ea782d7..7363ed31d 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -190,6 +190,7 @@ main (int argc, char *argv[])
*/
#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (PACKAGE, "UTF-8");
textdomain (PACKAGE);
#endif
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 91b846269..3f2487c74 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -628,11 +628,8 @@ help_menu_about_nautilus_callback (BonoboUIComponent *component,
|| strcmp (locale, "C") == 0
|| strcmp (locale, "POSIX") == 0
|| strcmp (locale, "en_US") == 0) {
- /* The copyright character here is correct for
- * Latin-1 encoding, but not for UTF-8, so we
- * have to change it when we move to GTK 2.0.
- */
- copyright = "Copyright \xA9 1999-2001 Eazel, Inc.";
+ /* The copyright character here is in UTF-8 */
+ copyright = "Copyright \xC2\xA9 1999-2001 Eazel, Inc.";
} else {
/* Localize to deal with issues in the copyright
* symbol characters -- do not translate the company
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 91b846269..3f2487c74 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -628,11 +628,8 @@ help_menu_about_nautilus_callback (BonoboUIComponent *component,
|| strcmp (locale, "C") == 0
|| strcmp (locale, "POSIX") == 0
|| strcmp (locale, "en_US") == 0) {
- /* The copyright character here is correct for
- * Latin-1 encoding, but not for UTF-8, so we
- * have to change it when we move to GTK 2.0.
- */
- copyright = "Copyright \xA9 1999-2001 Eazel, Inc.";
+ /* The copyright character here is in UTF-8 */
+ copyright = "Copyright \xC2\xA9 1999-2001 Eazel, Inc.";
} else {
/* Localize to deal with issues in the copyright
* symbol characters -- do not translate the company