7084 Commits

Author SHA1 Message Date
Matthias Clasen
84e791e580 Revert the g_set_prgname change
This change breaks our API and causes warnings from essentially all applications.
See bug 563627.
2009-12-21 09:21:12 -05:00
Gian Mario Tagliaretti
7e9ad3d746 Remove wrong file imports, only gio/gio.h should be included 2009-12-16 23:38:39 +01:00
Tor Lillqvist
3d546303e8 Check for <wspiapi.h> and use it if present
Should help bug #603527 if glib is built in an environment that has
<wspiapi.h>.
2009-12-14 03:30:39 +02:00
Matthew W. S. Bell
3a7a950b2b Initialise variable in g_time_val_from_iso8601()
The function does not initialise the struct tm,
giving it improper values of tm_isdst making the result
an hour out.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=603540
(cherry picked from commit 2321e5aed07154761223bb124770beba56700e41)
2009-12-10 01:16:38 -05:00
Alexander Larsson
31f928a2c3 Remove default implementation of async filter steam ops
Not only is the default implementation broken (it causes infinite recursion
as seen in bug #603982), but its also worthless. If we just fall back on the
default stream operations we automatically get async version based on
the sync filter stream operations, which is what we want.
(cherry picked from commit 4fbbe190b7cbfd271bbb18428bc103ebffa41112)
2009-12-07 22:15:27 +01:00
Matthias Clasen
a8027e093e Bump version 2009-12-01 08:22:54 -05:00
Matthias Clasen
227609c73b 2.22.3 2.22.3 2009-12-01 08:21:55 -05:00
Matthias Clasen
189453aa81 Disable a test that does not work 2009-12-01 00:06:11 -05:00
Matthias Clasen
14e22aae00 Updates 2009-11-30 23:43:33 -05:00
Ryan Lortie
8a190a155c Bug 598712 - can't detect text file with backspace
looks_like_text(): Allow '\b' to appear in text files.
(cherry picked from commit 48e2a570439373882cf755567e1d147bc5dd50e5)
2009-11-30 23:31:50 -05:00
Cody Russell
7c177e274a gtester should fail even if -k is passed
(cherry picked from commit 04d83e8e503a07e7b4279227c8f992ddf7c6ef4e)
2009-11-30 23:31:26 -05:00
Ryan Lortie
7a1b265e97 Bug 595138 - GFile not robust with invalid input
Improve handling of g_file_query_default_handler() when called on an
invalid GFile (ie: one created with an invalid URI).
(cherry picked from commit 9681d7e75f2d1296a890bfa64b3478ea7025df62)
2009-11-30 23:30:38 -05:00
Carles Ferrando
be89d5034b Updated Catalan Valencian translation 2009-11-29 19:32:56 +01:00
Alexander Larsson
b0e4df9375 Pass in the right device to vfs->local_file_add_info for symlinks
We used to pass the path for the symlink, but the device of the target
which is wrong and breaks metadata access.

https://bugzilla.gnome.org/show_bug.cgi?id=593809
(cherry picked from commit 2b2195bf68bf68837dc9f6b4765d3716694f42b3)
2009-11-26 16:07:13 +01:00
Mures Andone
c5b846eb13 Fixed bug 91 (GIO monitoring not working due to bad assert)
https://bugzilla.gnome.org/show_bug.cgi?id=593856
(cherry picked from commit 96f41b62836810563c4f69ba6d053e91c638728a)
2009-11-26 15:41:58 +01:00
Tor Lillqvist
fbde782a2a Include all of share/gtk-doc/html to get also the gio docs
Also add -D switches to not pointlessly include entries for directories
in the zip files.
2009-11-10 14:19:59 +02:00
Tor Lillqvist
7a3ce3f5e0 Avoid gcc warning about redeclaration of atexit() on MinGW 2009-11-10 01:37:13 +02:00
Tor Lillqvist
1f604fe208 Don't call WSAEventSelect() on -1
If g_io_win32_sock_close() has been called on a socket channel, don't
later in g_io_win32_free() call WSAEventSelect() on its fd which has
been set to -1.
2009-11-04 23:59:18 +02:00
Hib Eris
e7f6869b7e Fix check for C++ compiler when cross-compiling
Use AC_CHECK_TOOLS instead of AC_CHECK_PROGS. Patch from bug #577711.
2009-11-03 15:09:13 +02:00
Carlo Bramini
0f5d8b4cba Make g_file_test() behave on Windows more like as on POSIX
Patch from bug #572252.
2009-11-03 14:32:16 +02:00
Benjamin Otte
07e22befad Properly nul-terminate return values from g_convert()
The patch ensures that multibyte character sets are properly
nul-terminated. This is an issue because the documentation claims to
return a "nul-terminated" string and users of the API assume that means
a proper nul-termination in the resulting character set.

I looked at Pidgin and GStreamer code and found at least 3 cases where
this was happening.

This patch also reverts the documentation change from
8c936178a130f06511164dbd317180177da6b448 as that is now no longer
necessary.
2009-10-28 19:26:39 +01:00
Benjamin Otte
8c936178a1 Clarify documentation about g_convert() nul-terminated returns
THere is effectively no nul-termination for multibyte characters.
2009-10-27 21:38:36 +01:00
Matthias Clasen
d8fc1528b7 Avoid a warning 2009-10-25 02:53:55 -04:00
Matthias Clasen
36df8c9b9c Don't give up too early when collecting mime types
Since returning exactly one match has special significance, don't
give up matching before we've found at least 2 types. Also, make
sure that we don't return the same mime type more than once.
Bug 541236.
2009-10-25 02:53:54 -04:00
Sven Herzberg
2a49cdbfac make sure g_set_prgname() gets called only once
* glib/gutils.c: copy the call-once statement from g_set_application_name();
  Fixes Bug #563627: g_get_prgname() threadsafety
2009-10-25 02:53:54 -04:00
Cody Russell
7acedea49c GTypeModule derived class unref does not unload plugin
Correctly unref the pclass. Patch by Chris Wilson and Tim Janik.

https://bugzilla.gnome.org/show_bug.cgi?id=350200
2009-10-25 02:53:54 -04:00
Alexander Larsson
cf622936c4 xdgmime: sort glob hits with larger weight first
Higher weight is more important, so return these first meaning
they will be used as the default.
2009-10-25 02:53:54 -04:00
Ivar Smolin
048d74b694 Updating Estonian translation 2009-10-25 02:53:54 -04:00
Tor Lillqvist
a7a480b335 Fix GWin32DirectoryMonitor
GWin32DirectoryMonitor was quite broken, but nobody had apparently
noticed, or at least not filed any bug. Only now with a bleeding edge
GTK+ file chooser does the code get exercised in common programs like
gtk-demo or GIMP, apparently. Bug #598899.
2009-10-23 00:51:48 +03:00
Tomas Bzatek
d5f4e7c656 Documentation fixes 2009-10-13 16:22:16 +02:00
Tor Lillqvist
ae0a220bf3 Construct the gio module directory pathname at run-time on Windows 2009-10-12 00:18:48 +03:00
Matthias Clasen
3daaa459e3 Bump version 2009-10-07 10:31:19 -04:00
Matthias Clasen
f814174371 2.22.2 2.22.2 2009-10-07 10:29:32 -04:00
Matthias Clasen
3d76112aed Updates 2009-10-07 09:28:19 -04:00
Cody Russell
855deaa578 g_object_unref racy condition can lead to crash
Store whether the object has a toggleref before decrementing the
refcount to prevent race condition when two threads simultaneously
try to unref an object with a refcount of 2.
Patch by Antoine Tremblay.

https://bugzilla.gnome.org/show_bug.cgi?id=551706
2009-10-06 12:27:12 -04:00
Leonid Kanter
afa0db59df Updated Russian translation by <vicanis@gmail.com> 2009-10-06 11:52:48 +03:00
Edward Hervey
68b1ca0443 gobject/gtype.h: Fix _G_TYPE_CVH macro. Fixes #597194
If __val doesn't exist, we shouldn't do any other checks.
2009-10-03 16:17:17 +02:00
Alexander Larsson
1937765f9f Add fast path for construction with no params
This avoids a bunch of code and makes construction of simple objects
faster.

Object construction performance improvement:
         Non-Threaded   Threaded
Simple:           14%         5%
Complex:        -1.1%      -2.2%

Other tests stable.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:48 +02:00
Alexander Larsson
ffc625ec9b Don't freeze/thaw notification during construction if no properties
If the class has no properties there could be no notification anyway.
This is an important optimization for construction of simple objects.

Object construction performance improvement:
         Non-Threaded   Threaded
Simple:           84%        91%
Complex:        -1.4%      -0.6%

Other tests stable.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:48 +02:00
Alexander Larsson
302d13a757 Add a check that no properties are added after a class is derived
We can't support that, because that would cause the CLASS_HAS_PROPS_FLAG
class flag to not be correct.
2009-10-02 21:02:48 +02:00
Alexander Larsson
39a1fe5782 Add GObjectClass flag CLASS_HAS_PROPS_FLAG
This is set if a class or any of its parents have installed any
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:48 +02:00
Alexander Larsson
301d52d858 Add flags member for GObjectClass
https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:48 +02:00
Alexander Larsson
af017accc5 Allocate GObjectNotifyQueue with g_slice instead of abusing g_list
This is both cleaner and faster (it avoids function calls and
zeroing the memory twice).

Object construction performance improvement:
         Non-Threaded   Threaded
Simple:           11%       1.3%
Complex:           8%         6%

Other tests stable.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:48 +02:00
Alexander Larsson
f4d9789fcf Add gobject performance tests for threaded code
This measures how much things like lock contention affects the gobject
code.
2009-10-02 21:02:48 +02:00
Alexander Larsson
b1f94af095 Add performance tests for GObject primitives
These are basic performance test for a couple of basic gobject
primitives:

* construction of simple objects. Simple is a bare gobject derived
  class with no properties, signals or interfaces.

* construction of complex objects. Complex is a gobject subclass
  with construct properties, normal properties, signals, and
  implements an interface.

* run-time type check of complex objects

* signal emissions

Lots of care is taken to try to make the results reproducible. Each
test is run for multible "rounds", where we try to make each round be
"not too short" in order to be significant wrt timer accuracy, but
also "not to long" to make the probability of some other random event
happening on the system (interrupts, other process scheduled, etc)
during the round less likely.
The current target round time is 4 msecs, which was picked without
rigour, but seems small wrt e.g. scheduler time.

For each test we then run the calculated round size for 60 seconds,
and then report the performance based on the minimal time of one
round. The model here is that any random stuff that happens during a
round can only slow it down, there is nothing that can make it go
faster, so the minimal time is the best estimate of how fast one round
goes.

The result is not ideal, even on a "idle" system the results vary
from round to round, but the variation seems to be less than 1%.
So, any performance difference reported by this test over 1% is
probably statistically significant.

Additionally the tests can be run with or without threads being
initialized. The script tests/gobject/run-performance.sh makes
it easy to produce a performance report for the current checkout.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
2009-10-02 21:02:23 +02:00
Alexander Larsson
07ad638adf remove xdgmime test
This is getting diverged from the xdgmime copy and we don't need it here.
2009-10-02 12:55:54 +02:00
Alexander Larsson
c7c0bcef89 xdgmime - Correct the range checks for magic matching 2009-10-02 12:55:54 +02:00
Alexander Larsson
2624e7d6c6 Remove unnecessary includes 2009-10-02 12:55:54 +02:00
Alexander Larsson
e1643fd76d xdgmime - support the new case sensitive flag 2009-10-02 12:55:54 +02:00
Alexander Larsson
7c27df1fee xdgmime - support cache files with minor version 2 2009-10-02 12:55:54 +02:00