Commit Graph

6198 Commits

Author SHA1 Message Date
Christian Persch
5d31f41df4 Bug 555313 – GFileAttribute boxed type get_type function should use
usual get_type pattern

svn path=/trunk/; revision=7580
2008-10-08 20:54:39 +00:00
Christian Persch
c973369e31 Bug 555314 – mem leak in gmarkup
svn path=/trunk/; revision=7579
2008-10-08 20:54:35 +00:00
Tor Lillqvist
c7501c8223 Bug 554790 - g_convert() misbehaves with winiconv versions
2008-10-08  Tor Lillqvist  <tml@novell.com>

	Bug 554790 - g_convert() misbehaves with winiconv versions

	* glib/win_iconv.c (kernel_mbtowc): If converting from ASCII,
	explicitly check for and reject 8bit chars. MultiByteToWideChar()
	doesn't, at least not on XP.


svn path=/trunk/; revision=7578
2008-10-08 20:35:39 +00:00
Matthias Clasen
57d48592db Properly include gmacros.h
svn path=/trunk/; revision=7575
2008-10-07 18:52:18 +00:00
Behdad Esfahbod
af866931b6 Bug 555309 – giochannel breaks on error Patch from Christian Persch
2008-10-06  Behdad Esfahbod  <behdad@gnome.org>

        Bug 555309 – giochannel breaks on error
        Patch from Christian Persch

        * glib/giounix.c (g_io_unix_read), (g_io_unix_write),
        (g_io_unix_seek), (g_io_unix_close), (g_io_unix_set_flags):
        Don't shadow err.  Oops!


svn path=/trunk/; revision=7574
2008-10-06 22:57:49 +00:00
Colin Walters
b383c8f08f Bug 554745 - GFileAttributeInfoList should be boxed
2008-10-06  Colin Walters  <walters@verbum.org>

	Bug 554745 - GFileAttributeInfoList should be boxed

	* gio/gfileattribute.c: Define a boxed type for GFileAttributeList
	for convenience of bindings.
	* gio/gfileattribute.h: Prototype it.


svn path=/trunk/; revision=7573
2008-10-06 21:59:29 +00:00
Christophe Fergeau
6a19b99a9d Bug 555224 – Improve g_format_size_for_display doc
* glib/gfileutils.c: change g_format_size_for_display API doc to
explicitly say that the returned string has to be freed. Change
spelling of "newly allocated" to "newly-allocated" in g_file_read_link
API doc to be more consistent with what is done in that file.

svn path=/trunk/; revision=7572
2008-10-06 18:50:39 +00:00
Pascal Terjan
d8b489853c Bug 554970 – segfault when update-desktop-database is not available
2008-10-05  Pascal Terjan  <pterjan@linuxfr.org>

	Bug 554970 – segfault when update-desktop-database is not available
	on the system

	* gdesktopappinfo.c (run_update_command): Have the error set before 
	using it.


svn path=/trunk/; revision=7570
2008-10-05 00:33:43 +00:00
Og B. Maciel
aa7e065688 Updated Brazilian Portuguese translation.
svn path=/trunk/; revision=7568
2008-10-04 14:20:29 +00:00
David Zeuthen
04f0742818 If possible, always pass FUSE file:// URIs (such as
2008-10-01  David Zeuthen  <davidz@redhat.com>

	* gdesktopappinfo.c (expand_macro): If possible, always pass FUSE
	file:// URIs (such as '/home/davidz/.gvfs/sftp on foo/file.avi')
	instead of the gio URI (such as sftp://foo/file.avi) when using
	g_app_info_launch() and friends. With a sufficiently recent gvfs,
	apps using gio+gvfs will map the FUSE file:// URI back to the gio
	URI (and thus bypass the fuse daemon) thanks the patch from bug
	#530654.  Since Nautilus is an user of g_app_info_launch() it
	means that non-gio POSIX apps, such as mplayer, will Just Work(tm)
	when launced via the file manager. Win. Fixes bug #528670.

	* gappinfo.c: Add some notes about the FUSE POSIX URI <-> GIO URI
	mapping to the description of GAppInfo.

2008-10-01  David Zeuthen  <davidz@redhat.com>

	* README.in: Add "Notes about glib 2.20" section detailing the
	ramifications of the patch from bug #528670.


svn path=/trunk/; revision=7566
2008-10-01 17:46:57 +00:00
Behdad Esfahbod
ef4d522b9b Bug 554092 – glib doesn't return G_FILE_ERROR_NOENT et al on OS X
2008-09-30  Behdad Esfahbod  <behdad@gnome.org>

        Bug 554092 – glib doesn't return G_FILE_ERROR_NOENT et al on OS X

        * glib/giounix.c (g_io_unix_read), (g_io_unix_write),
        (g_io_unix_seek), (g_io_unix_close), (g_io_unix_set_flags),
        (g_io_unix_get_flags), (g_io_channel_new_file):
        Like mclasen says: "well, thats the way errno works...,
        save it or loose it".  Save errno.


svn path=/trunk/; revision=7565
2008-09-30 20:40:31 +00:00
Tor Lillqvist
23a4ae82e5 Makefile.decl Bypass gtester related stuff on Windows.
2008-09-30  Tor Lillqvist  <tml@novell.com>

	* Makefile.decl
	* glib/tests/Makefile.am: Bypass gtester related stuff on Windows.


svn path=/trunk/; revision=7564
2008-09-30 14:46:45 +00:00
Tor Lillqvist
b1557680dd glib/gprintf.c Don't define _GNU_SOURCE on Windows, as _GNU_SOURCE has
2008-09-30  Tor Lillqvist  <tml@novell.com>

	* glib/gprintf.c
	* glib/gnulib/vasnprintf.c: Don't define _GNU_SOURCE on Windows,
	as _GNU_SOURCE has unintended side effects when compiling against
	newest mingw headers.


svn path=/trunk/; revision=7563
2008-09-30 14:04:35 +00:00
Tor Lillqvist
402d950ec7 Build desktop-app-info only on Unix.
2008-09-30  Tor Lillqvist  <tml@novell.com>

	* tests/Makefile.am: Build desktop-app-info only on Unix.


svn path=/trunk/; revision=7562
2008-09-30 11:08:38 +00:00
Tor Lillqvist
801da1dfc1 Avoid a g_critical(). Pass a large enough result buffer to
2008-09-30  Tor Lillqvist  <tml@novell.com>

	* glocalfile.c (get_volume_for_path) [Win32]: Avoid a
	g_critical(). Pass a large enough result buffer to
	GetVolumePathNameW(). Just use MAX_PATH.


svn path=/trunk/; revision=7561
2008-09-30 10:47:06 +00:00
David Zeuthen
8070d3b02f Clarify semantics of g_volume_mount_finish() (#552168)
2008-09-29  David Zeuthen  <davidz@redhat.com>

        * gvolume.c: Clarify semantics of g_volume_mount_finish() (#552168)


svn path=/trunk/; revision=7559
2008-09-29 17:42:01 +00:00
Dan Winship
1ae3a4aec1 Fix lots of typos, document g_assert_error() and g_assert_no_error()
* glib/tmpl/testing.sgml: Fix lots of typos, document
	g_assert_error() and g_assert_no_error()

svn path=/trunk/; revision=7557
2008-09-27 01:44:07 +00:00
Dan Winship
29ddd48ff2 Use g_assert_error() and g_assert_no_error()
* tests/data-input-stream.c:
	* tests/data-output-stream.c:
	* tests/live-g-file.c:
	* tests/memory-input-stream.c:
	* tests/memory-output-stream.c: Use g_assert_error() and
	g_assert_no_error()

svn path=/trunk/; revision=7556
2008-09-27 01:43:43 +00:00
Dan Winship
5c53925ed0 Bug 553447 $(Q#|(B g_assert_no_error()
* glib/gtestutils.h (g_assert_no_error, g_assert_error): Macros to
	assert that a GError is not set, or else is set to a particular
	error.

	* glib/gtestutils.c (g_assertion_message_error): utility for
	those macros

	* glib/tests/keyfile.c:
	* tests/asyncqueue-test.c:
	* tests/bookmarkfile-test.c:
	* tests/convert-test.c:
	* tests/file-test.c: Use g_assert_error/g_assert_no_error

svn path=/trunk/; revision=7555
2008-09-27 01:43:29 +00:00
Matthias Clasen
764e187fd9 Bug 545350 – GAppInfo deletion Bug 545351 – Reset associations for
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 545350 – GAppInfo deletion
        Bug 545351 – Reset associations for content type

        * gio.symbols:
        * gappinfo.[hc]: New functions g_app_info_can_delete,
        g_app_info_delete and g_app_info_reset_type_associations.

        * gdesktopappinfo.c:
        * gwin32appinfo.c: Implementations of these.

        * tests/Makefile.am:
        * tests/desktop-app-info.c: Tests for GAppInfo functionality.


svn path=/trunk/; revision=7554
2008-09-26 19:57:36 +00:00
Dan Winship
7f4864e58d Bug 505361 - gunixinputstream.c assumes poll() available
Bug 509446 - portable blocking gio cancellation

	* gcancellable.c (g_cancellable_make_pollfd): New method to make a
	GPollFD for a cancellable (which is slightly more complicated on
	Windows than Unix).

	* gunixinputstream.c (g_unix_input_stream_read):
	* gunixoutputstream.c (g_unix_output_stream_write): Use
	g_cancellable_make_pollfd() and g_poll() rather than using poll()
	directly.

	* tests/unix-streams.c: test of GUnixInputStream,
	GUnixOutputStream, and GCancellable.

svn path=/trunk/; revision=7553
2008-09-26 16:19:35 +00:00
Dan Winship
ea0970e9ca make this a "const gpointer" rather than a gconstpointer to avoid warnings
* glib/gthreadpool.c (wakeup_thread_marker): make this a "const
	gpointer" rather than a gconstpointer to avoid warnings later

	* glib/pcre/pcre_ucp_searchfuncs.c:
	* glib/pcre/pcre_valid_utf8.c: #include "config.h"

	* glib/tests/printf.c (test_d): fool gcc into not warning about
	some printf format strings that we know are dubious

svn path=/trunk/; revision=7552
2008-09-26 16:00:45 +00:00
Dan Winship
7afe2bb07a add uint* -> int* casts in g_atomic_int calls to avoid gcc warnings
* gobject.c (g_object_ref, g_object_unref)
	(g_object_freeze_notify, g_object_notify, g_object_thaw_notify):
	* gparam.c (g_param_spec_ref, g_param_spec_unref):
	* gsignal.c (handler_ref, handler_unref_R): add uint* -> int*
	casts in g_atomic_int calls to avoid gcc warnings

svn path=/trunk/; revision=7551
2008-09-26 16:00:33 +00:00
Dan Winship
5360907e9e add a cast to stop a gcc warning
* gdesktopappinfo.c (get_all_desktop_entries_for_mime_type): add a
	cast to stop a gcc warning

	* gfile.c (g_file_copy_attributes): add parens to stop a gcc
	warning

svn path=/trunk/; revision=7550
2008-09-26 16:00:17 +00:00
Matthias Clasen
b60040d9ed Bug 553857 – gbacktrace.h requires signal.h
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553857 – gbacktrace.h requires signal.h

        * glib/gbacktrace.h: Include signal.h for raise().
        Pointed out by Sebastien Bacher



svn path=/trunk/; revision=7548
2008-09-26 14:33:48 +00:00
Matthias Clasen
93d9e7abf4 Bug 553724 – python interpretter path not patched in correctly
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553724 – python interpretter path not patched in correctly

        * glib/Makefile.am: Fix the sed magic to replace python.



svn path=/trunk/; revision=7546
2008-09-26 14:28:25 +00:00
Matthias Clasen
40e192abf2 Add more docs
svn path=/trunk/; revision=7545
2008-09-26 14:05:03 +00:00
Matthias Clasen
8d88b840a2 Move docs
svn path=/trunk/; revision=7544
2008-09-26 13:55:51 +00:00
Tor Lillqvist
30f2323d62 Improve error reporting: When g_module_open() fails, include the name of
2008-09-26  Tor Lillqvist  <tml@novell.com>

	* gmodule-win32.c: Improve error reporting: When g_module_open()
	fails, include the name of the module passed to LoadLibrary() in
	what g_module_error() returns.


svn path=/trunk/; revision=7543
2008-09-26 09:16:25 +00:00
Tor Lillqvist
fc542a462a Bug 553820 - gpoll.c: undeclared identifier
2008-09-25  Tor Lillqvist  <tml@novell.com>

	Bug 553820 - gpoll.c: undeclared identifier

	* glib/gmain.c
	* glib/gpoll.c: Make the g_poll() function non-static also on
	Windows. Prefix an underscore to the g_main_poll_debug variable
	and make it non-static in gmain.c so that it can be used in
	gpoll.c. Add back missing variable declaration.


svn path=/trunk/; revision=7542
2008-09-25 19:59:49 +00:00
Dan Winship
efce76ce67 Bug 553426 - cancellable clarifications
* gcancellable.c (g_cancellable_class_init): Add a note to the
	"cancelled" signal docs warning about thread-safety issues
	(g_cancellable_cancel): Note that cancelling an asynchronous
	operation takes effect asynchronously, not immediately.

svn path=/trunk/; revision=7541
2008-09-25 12:04:52 +00:00
Tor Lillqvist
0ed8b94bfe Just ignore the child_setup function, never call it. The is no situation
2008-09-25  Tor Lillqvist  <tml@novell.com>

	* glib/gspawn-win32.c (do_spawn_with_pipes) (do_spawn_directly):
	Just ignore the child_setup function, never call it. The is no
	situation in which it could be useful on Windows. Do print a
	warning, like before.

	* glib/gspawn.c (g_spawn_async_with_pipes): Corresponding change
	in documentation.


svn path=/trunk/; revision=7540
2008-09-25 08:05:41 +00:00
Sven Herzberg
ee685b003e Be a little more explcit in the docs. Includes Owen's requested changes.
2008-09-24  Sven Herzberg  <sven@imendio.com>

	Be a little more explcit in the docs. Includes Owen's requested
	changes.

	* glib/gmain.c: improved documentation for g_source_attach() and
	g_source_destroy()


svn path=/trunk/; revision=7539
2008-09-24 13:44:27 +00:00
Michael Natterer
0275c4141e Move ChangeLog entry to right ChangeLog.
svn path=/trunk/; revision=7538
2008-09-23 18:57:16 +00:00
Michael Natterer
db1ff156d5 #include <glib/gpoll.h>
2008-09-23  Michael Natterer  <mitch@imendio.com>

	* glib/glib.h: #include <glib/gpoll.h>

	* glib/gpoll.h: #error out if gpoll.h is included directly.

	* glib/gpoll.c: remove trailing whitespace.


svn path=/trunk/; revision=7537
2008-09-23 18:56:31 +00:00
Dan Winship
333ef486a4 Move this out of gmain.c and make it part of the public API. (Part of Bug
* glib/gpoll.c (g_poll): Move this out of gmain.c and make it part
	of the public API. (Part of Bug 505361 - gunixinputstream.c assumes
	poll() available.)

svn path=/trunk/; revision=7536
2008-09-23 16:41:37 +00:00
Dan Winship
ac68024ec1 Move this out of gmain.c and make it part of the public API. (Part of Bug
* glib/gpoll.c (g_poll): Move this out of gmain.c and make it part
	of the public API. (Part of Bug 505361 - gunixinputstream.c
	assumes poll() available.)

svn path=/trunk/; revision=7535
2008-09-23 16:32:30 +00:00
Tor Lillqvist
f911ead382 Fix embarrassing bug: I was passing an incorrect third parameter to
2008-09-23  Tor Lillqvist  <tml@novell.com>

	* glib/gmain.c (poll_rest) [Win32]: Fix embarrassing bug: I was
	passing an incorrect third parameter to memmove(), had forgotten
	to multiply by the size of the table entry. Just use a for loop
	instead, clearer. Odd I didn't notice when testing this code.


svn path=/trunk/; revision=7533
2008-09-23 15:35:12 +00:00
Kenneth Nielsen
a1450c73e7 Updated Danish translation
svn path=/trunk/; revision=7532
2008-09-22 21:21:15 +00:00
Kenneth Nielsen
c8895a035c Updated Danish translation
svn path=/trunk/; revision=7528
2008-09-22 01:09:14 +00:00
Nelson Benítez León
811fcbcd95 Add new GFileCopyFlag
svn path=/trunk/; revision=7526
2008-09-21 23:53:40 +00:00
Nickolay V. Shmyrev
0fcfcb3a91 Updated Russian translation.
2008-09-21  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation.


svn path=/trunk/; revision=7524
2008-09-21 19:22:36 +00:00
Wadim Dziedzic
67af32712e Updated Polish translation
2008-09-21  Wadim Dziedzic  <wdziedzic@aviary.pl>

	* pl.po: Updated Polish translation

svn path=/trunk/; revision=7522
2008-09-21 18:05:00 +00:00
Matthias Clasen
130d8f010f Plug a memory leak
svn path=/trunk/; revision=7520
2008-09-21 00:00:18 +00:00
Hans Petter Jansson
991b625aea Rewrite most of GHashTable to use open addressing with quadratic probing
2008-09-19  Hans Petter Jansson  <hpj@novell.com>

	Rewrite most of GHashTable to use open addressing with quadratic
	probing instead of chaining. This has the potential to reduce memory
	fragmentation significantly, while being slightly faster due to
	better locality and no need to call alloc/free functions for nodes.
	Benchmarks suggest it also uses less memory overall.

	* glib/ghash.c (prime_mod): Table of suitable primes for
	initial-probe distribution.
	(g_hash_table_set_shift): New function.
	(g_hash_table_find_closest_shift): New function.
	(g_hash_table_set_shift_from_size): New function.
	(g_hash_table_lookup_node_for_insertion): New function.
	(g_hash_table_lookup_node): Rewritten to return node index instead of
	pointer, use quadratic probe on flat table, and not return insertion
	data. The latter saves some computation for read-only lookups.
	(g_hash_table_remove_node): Rewrite to take a pointer directly to the
	node structure to remove, and clear that. Remove unlinking code.
	(g_hash_table_remove_all_nodes): Rewrite to not clear nodes
	individually, but en masse using memset () after potentially calling
	notify functions.
	(iter_remove_or_steal): Use new data structure and algorithm. Vastly
	simplified - now just a call to g_hash_table_remove_node ().
	(g_hash_table_resize): New resize code, re-indexing with new prime
	and cleaning up tombstones.
	(g_hash_table_maybe_resize): Table may hold 8 buckets minimum, no less
	than 1/4 load excluding tombstones, and no more than 15/16 load
	including tombstones. These numbers are the results of a lot of
	benchmarking with multiple complex applications, and should not be
	changed lightly.
	(g_hash_table_iter_next)
	(g_hash_table_lookup)
	(g_hash_table_lookup_extended)
	(g_hash_table_insert_internal)
	(g_hash_table_remove_internal)
	(g_hash_table_foreach_remove_or_steal)
	(g_hash_table_foreach)
	(g_hash_table_find)
	(g_hash_table_get_keys)
	(g_hash_table_get_values): Use new data structure and algorithm,
	fairly trivial changes.


svn path=/trunk/; revision=7518
2008-09-20 04:05:11 +00:00
Mugurel Tudor
39a0716c92 Updated Romanian translation by Mişu Moldovan <dumol@gnome.ro>
2008-09-19  Mugurel Tudor  <mugurelu@gnome.ro>

	* ro.po: Updated Romanian translation by
	Mişu Moldovan <dumol@gnome.ro>

svn path=/trunk/; revision=7515
2008-09-19 14:09:48 +00:00
Tor Lillqvist
4c264998cb Look for man pages in share/man.
2008-09-19  Tor Lillqvist  <tml@novell.com>

	* glib-zip.in: Look for man pages in share/man.


svn path=/trunk/; revision=7512
2008-09-19 10:42:04 +00:00
Tor Lillqvist
bc8e1dd8c1 glib/gutils.c (_glib_get_dll_directory) Be a bit less restrictive, look
2008-09-19  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (_glib_get_dll_directory)
	* glib/gspawn-win32.c (do_spawn_with_pipes): Be a bit less
	restrictive, look for the helper programs in the same folder where
	the GLib DLL is, not necessarily in a "bin" subfolder of the top
	GLib installation folder.


svn path=/trunk/; revision=7511
2008-09-19 10:20:41 +00:00
Matthias Clasen
a44ff6ef33 Bump version to 2.19.0
2008-09-18  Matthias Clasen <mclasen@redhat.com>

        * configure.in: Bump version to 2.19.0

        * ChangeLog.pre-2-18: rotate ChangeLog

        * === branch for 2.18 ===


svn path=/trunk/; revision=7510
2008-09-18 14:47:14 +00:00
Djihed Afifi
c7b74d417e Updated Arabic Translation by Anas Afif Emad.
* Updated Arabic Translation by Anas Afif Emad. 

svn path=/trunk/; revision=7508
2008-09-18 02:02:45 +00:00