summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-30gobject: Use fast fundamental instance type checkfundamentalEdward Hervey1-1/+1
Speeds up g_object_ref/_unref by 50%-65% (i.e. takes 60-65% of the time it used to take). https://bugzilla.gnome.org/show_bug.cgi?id=730984
2014-05-30gtype: Add check for fundamental instance typeEdward Hervey2-0/+14
When checking whether an instance is of a given fundamental type (such as G_TYPE_OBJECT), we can avoid over 60%+ of the cost of checking types. https://bugzilla.gnome.org/show_bug.cgi?id=730984
2014-03-24GLib 2.40.0Ryan Lortie2-2/+16
2014-03-21gio/tests/socket: skip IPv6 tests on IPv6-less machinesDan Winship1-0/+32
https://bugzilla.gnome.org/show_bug.cgi?id=667468
2014-03-20Clarify expectations with error codes like G_IO_ERROR_FAILEDDan Winship3-6/+35
If an error code enumeration is expected to be extended in the future, people shouldn't compare explicitly against its generic "FAILED" value. https://bugzilla.gnome.org/show_bug.cgi?id=726775
2014-03-20Updated Danish translationAsk H. Larsen1-918/+1121
2014-03-20Updated Serbian translationМирослав Николић2-1876/+2356
2014-03-17update Punjabi Translation 17March2014: AlamA S Alam1-933/+1166
2014-03-17GLib 2.39.92Ryan Lortie2-1/+29
2014-03-15Updated French translationClaude Paroz1-929/+1123
2014-03-14GSettingsBackend: fix a nasty race conditionRyan Lortie1-24/+20
In the event that a GSettings object is being destroyed just as a change signal is being delivered, the destroying thread will race with the dconf worker thread for acquiring the lock on the GSettingsBackend. If the signalling thread gets there first then the destroying thread will block on the lock. The signalling thread adds a reference to the GSettings object that is being destroyed and releases the lock. The idea is that this should prevent the GSettings object from being destroyed and thus maintain its entry in the list. Unfortunately, the weak reference notify function is already running and as soon as we release the lock, the list entry is removed. The signalling thread crashes. This bug is indicative of a serious problem encountered in many situations where GObject instances are touched from multiple threads. Ideally, we will move to a place where g_object_ref() is not called at all on the GSettings object from the dconf worker thread and instead, a dispatch will be done without holding a reference (similar to how GAppInfoMonitor presently works). This would also prevent the unfortunate case of someone dropping what they assume to be the last reference on a GSettings object, only to have an already-pending signal delivered once they return to the mainloop, crashing their program. Making this change for GSettings (with multiple instances per thread, the possibility of multiple backends and each instance being interested in different events) is going to be extremely non-trivial, so it's not a change that makes sense at this point in the cycle. For now, we can do a relatively small and isolated tweak so that we never access the list except under a lock. We still perform the bad pattern of acquiring a ref in a foreign thread which means that we still risk delivering a signal to a GSettings object that the user has assumed is dead (unless they explicitly disconnect their signal handler). This is a problem that we already had, however. https://bugzilla.gnome.org/show_bug.cgi?id=710367
2014-03-14gsettingsbackend: a minor simplificationRyan Lortie4-55/+31
Change the order of the arguments on the (internal) keys_changed callback in GSettingsListenerVTable. This means that all functions in the table now fit the following signature: void (* f) (GObject *target, GSettingsBackend *backend, const gchar *name_or_path, gpointer origin_tag, const gchar * const *names); allowing the possibility of arguments ignored at the end. This allows us to simplify our dispatch-to-thread code in GSettingsBackend, making it a bit less generic. So far, this should be a straight refactor. https://bugzilla.gnome.org/show_bug.cgi?id=710367
2014-03-12Update config.h.win32.inChun-wei Fan1-20/+16
Make the entries of config.h.win32.in match those that are being checked in config.h.in.
2014-03-12Updated Portuguese translationDuarte Loreto1-919/+1121
2014-03-11GUnixVolume: implement _finish functionsRyan Lortie1-2/+6
The _finish functions for GUnixVolume _mount and _eject functions were never implemented, having been simply stubbed out as 'return TRUE;'. Implement them. https://bugzilla.gnome.org/show_bug.cgi?id=724916
2014-03-11GUnixVolume: port to GSubprocessRyan Lortie1-137/+37
Do the same as we just did for GUnixMount, for GUnixVolume too. https://bugzilla.gnome.org/show_bug.cgi?id=724916
2014-03-11GUnixMount: port unmount to GSubprocessRyan Lortie1-126/+32
The existing code is buggy and now that we have GSubprocess, we should just use it instead, allowing for some substantial reduction in complexity. https://bugzilla.gnome.org/show_bug.cgi?id=724916
2014-03-11Updated Russian translationYuri Myasoedov1-1333/+1624
2014-03-11glocalfileinfo: don't special-case directory iconsLars Uebernickel1-8/+2
As of e6af432, g_content_type_get_symbolic_icon() returns non-symbolic fallbacks. Thus, we can't append another symbolic icon to the fallbacks. The special case was a bit of a hack anyway. It was only applied to themed icons and there was no generic fallback for mime types that are not folders. https://bugzilla.gnome.org/show_bug.cgi?id=726046
2014-03-10Add g_application_command_line_get_options_dict() to docsDavid King1-0/+1
2014-03-09Updated Traditional Chinese translation(Hong Kong and Taiwan)Chao-Hsiung Liao2-1782/+1736
2014-03-08gtype – Mark _get_instance_private() function as G_GNUC_UNUSEDSebastian Dröge1-0/+1
clang likes to complain about it being unused. https://bugzilla.gnome.org/show_bug.cgi?id=723899
2014-03-08Updated Latvian translationRūdolfs Mazurs1-933/+1168
2014-03-08Updated Chinese (China) translationWylmer Wang1-847/+862
2014-03-07gio tests: add codegen to BUILT_SOURCESRyan Lortie1-0/+1
We need to have these in BUILT_SOURCES so that 'make' knows to generate them before attempting to compile other .c files in the same directory (since some of these files include the header). Should fix up remaining issues about partial versions of this file being included under parallel builds. https://bugzilla.gnome.org/show_bug.cgi?id=725891
2014-03-07GObject: Remove more leftover markup from headersMatthias Clasen5-14/+13
2014-03-07Updated Korean translationChangwoo Ryu1-926/+1109
2014-03-05Updated Norwegian bokmål translationKjartan Maraas1-31/+30
2014-03-05Unskip GVariantDictGiovanni Campagna1-1/+1
There is no reason to (skip) GVariantDict, it's a boxed type and perfectly usable from gobject-introspection. https://bugzilla.gnome.org/show_bug.cgi?id=725656
2014-03-05cond test: remove alarm() usageRyan Lortie1-5/+0
This means that the test can't build on Windows (and we do want it there). This will be properly resolved with bug 725266, but let's not block the build before then. https://bugzilla.gnome.org/show_bug.cgi?id=724859
2014-03-04Work around gtk-doc problemsMatthias Clasen1-2/+2
Returns shall never be at the beginning of a line.
2014-03-04gsubprocess: test environment a bit moreRyan Lortie2-0/+53
Add a test for GSubprocess to test setting, unsetting and inheritance of environment variables. Use communicate() to give it a bit more of a workout as well. https://bugzilla.gnome.org/show_bug.cgi?id=725651
2014-03-04GSubprocessLauncher: don't get empty environmentRyan Lortie1-1/+1
Use g_get_environ() to get the environment variables with their values instead of g_listenv() which only lists off the keys. https://bugzilla.gnome.org/show_bug.cgi?id=725651
2014-03-03gsubprocess: test empty splicesRyan Lortie1-0/+29
Make sure we handle the case that our splice returns no data properly. https://bugzilla.gnome.org/show_bug.cgi?id=724916
2014-03-03gsubprocess: fix communicate() with empty buffersRyan Lortie1-1/+1
On the splice for stdout or stderr completing, GSubprocess calls _slice_finish() to collect the result. We assume that a zero return value here means failure, but in fact this function returns a gssize -- the number of bytes transferred, or -1 for an error. This causes GSubprocess to mistakenly think that it has an error when it actually just has an empty buffer (as would be the case when collecting stderr from a successful command). Check for -1 instead of FALSE to detect the error. https://bugzilla.gnome.org/show_bug.cgi?id=724916
2014-03-03GLib 2.39.91Ryan Lortie1-0/+33
2014-03-03desktopappinfo: add Exec to searchable keysRyan Lortie3-8/+38
Add the basename from the first component of the Exec line to the list of strings to search for via g_desktop_app_info_search(). We treat Exec as a fairly strong match -- just below the visible name. Add a testcase to make sure everything is working OK. https://bugzilla.gnome.org/show_bug.cgi?id=725023
2014-03-03Updated Thai translationTheppitak Karoonboonyanan1-270/+282
2014-03-02Add a few tests for G_MARKUP_TREAT_CDATA_AS_TEXTMatthias Clasen5-1/+107
Related to https://bugzilla.gnome.org/show_bug.cgi?id=725433
2014-03-02Add a way to test different markup parser flagsMatthias Clasen1-24/+57
For now, we are mainly interested in G_MARKUP_TREAT_CDATA_AS_TEXT. This commit makes markup-parse look for expected output files with the extension .cdata-as-text in addition to .expected, and compares the output of parsing with G_MARKUP_TREAT_CDATA_AS_TEXT against them. markup-parse --cdata-as-text foo.gmarkup can be used to produce such expected output.
2014-03-02docs: Ditch more markupMatthias Clasen12-202/+164
Some markup was hiding in docs in headers. Drop it there, too.
2014-03-02Updated Polish translationPiotr Drąg1-929/+1123
2014-02-24hmac: Make unit test const-correctPhilip Withnall1-3/+3
https://bugzilla.gnome.org/show_bug.cgi?id=724741
2014-02-24gmain: simplify g_main_context_find_source_by_id()Ryan Lortie1-17/+10
Since we now keep a hashtable of sources, we can implement this function without iteration. https://bugzilla.gnome.org/show_bug.cgi?id=724839
2014-02-24gmain: Simplify source id trackingRyan Lortie1-59/+18
Simplify our tracking of issued source id integers and fix some bugs. Previously the source's id was remove from the 'used' table from source_remove_from_context() which was also called if the source priority was changed (in which case it would never be added back to the table). The source id could be reissued in that case. In the new approach, we just always keep a hash table of sources, by source id. This simplifies the logic and will also allow us to improve performance of g_main_context_find_source_by_id() which is called in some fairly common cases, such as g_source_remove(). These improvements will be in the following commits. https://bugzilla.gnome.org/show_bug.cgi?id=724839
2014-02-23Test content type icons more thoroughlyMatthias Clasen1-0/+71
Check we actually get the right icon names, and check that symbolic icons fall back to non-symbolic ones.
2014-02-23Add non-symbolic fallback icons in g_content_type_get_symbolic_icon().John Lindgren1-25/+19
This makes the behavior consistent with e.g. g_volume_get_symbolic_icon(). https://bugzilla.gnome.org/show_bug.cgi?id=724994
2014-02-23asyncqueue: fix timeout math on 32bit systemsRyan Lortie1-4/+2
88182d375e13ae6519a288d5295220c83ca27e73 caught this issue in g_async_queue_timed_pop() but failed to fix the same bug in the _unlocked() variant. This is only a problem on 32bit systems. On 64bit systems, the tv_sec in a timeval is already 64 bits, so no overflow occurs. https://bugzilla.gnome.org/show_bug.cgi?id=722604
2014-02-23mappedfile test: permit ENODEV on /dev/nullRyan Lortie1-0/+1
mmap() on /dev/null returns ENODEV on old Linux versions and also on Hurd, so accept that in the testcase. https://bugzilla.gnome.org/show_bug.cgi?id=722360
2014-02-23Fix build of gio/gapplication.c on Visual C++Chun-wei Fan1-1/+2
Visual C++ is quite zealous about checking against the types used in the initializing of array of structures, even up to Visual C++ 2013. Fix this by splitting up the initializing steps. https://bugzilla.gnome.org/show_bug.cgi?id=724609