Commit Graph

13865 Commits

Author SHA1 Message Date
Arnel A. Borja
19e20084ab g_uri_unescape_string: Mention (allow-none)/%NULL in documentation
https://bugzilla.gnome.org/show_bug.cgi?id=701409
2013-06-19 17:26:45 +02:00
Arnel A. Borja
8d29a5a357 g_uri_escape_string: Add missing allow-none annotation
https://bugzilla.gnome.org/show_bug.cgi?id=701409
2013-06-19 17:26:45 +02:00
Milo Casagrande
87d5985718 [l10n] Updated Italian translation. 2013-06-19 10:37:13 +02:00
Colin Walters
18702168e1 gobject/tests: Add missing build dependency 2013-06-17 13:05:11 -04:00
Matthias Clasen
f9e47f1f2f Bump version 2013-06-17 12:56:40 -04:00
Matthias Clasen
544816bf6e 2.37.2 2013-06-17 12:40:47 -04:00
Matthias Clasen
d929eb64ee Try to make the testgdate test hobble along a little longer 2013-06-17 12:40:47 -04:00
Matthias Clasen
1eefcb4d66 Plug a small memory leak
g_test_trap_assertions was leaking the process_id string.
2013-06-16 09:28:59 -04:00
Emmanuele Bassi
910732ea7e tests/binding: Ensure that the binding goes away
Use weak pointers so that we can check that the GBinding instance goes
away when it should.

https://bugzilla.gnome.org/show_bug.cgi?id=698018
2013-06-12 11:24:55 +01:00
Emmanuele Bassi
d1959e4faa binding: Use hash table as a set 2013-06-12 11:24:55 +01:00
Emmanuele Bassi
25a3c8720c binding: Make unbind() release the reference on GBinding
The automatic memory management of GBinding is not optimal for high
order languages with garbage collectors semantics. If we leave the
binding instance inert but still referenced it will be leaked, so one
solution that does not throw away the baby of C convenience with the
bathwater of language bindability is to have unbind() perform an
implicit unref().

Hopefully, C developers will read the documentation and especially the
note that says that after calling unbind() the reference count on the
GBinding instance is decreased.

https://bugzilla.gnome.org/show_bug.cgi?id=698018
2013-06-12 11:24:55 +01:00
Emmanuele Bassi
270d73a1e0 docs: Fix g_binding_unbind() in the API reference 2013-06-12 11:24:55 +01:00
Krishnababu Krothapalli
236ee65561 Updated Telugu Translations 2013-06-11 14:23:53 +05:30
Shankar Prasad
f1f7c97e08 updated kn translations 2013-06-11 11:52:33 +05:30
Colin Walters
9d9532bdd3 gmain: Document more use cases of g_main_context_wakeup()
https://bugzilla.gnome.org/show_bug.cgi?id=701878
2013-06-11 01:46:08 +02:00
Benjamin Otte
8a37af7f0e tests: Add a test for a specific invariant
See the documentation in the test. The invariant is used by
gnome-test-runner.

https://bugzilla.gnome.org/show_bug.cgi?id=701878
2013-06-11 01:46:08 +02:00
Marek Černocký
8474ad7f6a Updated Czech translation 2013-06-10 21:31:36 +02:00
Piotr Drąg
57eca445ca Updated Polish translation 2013-06-10 20:33:26 +02:00
Ryan Lortie
c1e32a5c59 GObject: turn add-property-after-init to a warning
We have turned up enough cases of this being done (including GTK API
allowing apps to do this to GtkSettings well after it has been
instantiated) that it is clear that we cannot really break this feature
while claiming to be backwards compatible.

For that reason, it becomes a warning rather than a critical (ie: it is
still well-defined behaviour, but you are discouraged from doing it).

The intention is to keep this feature for at least the next while.
A given GObjectClass will be able to avoid using GParamSpec pool for as
long as you don't install properties after init.  If you do that, you
will get a warning and we will devolve to using GParamSpecPool.

https://bugzilla.gnome.org/show_bug.cgi?id=698614
2013-06-10 11:18:06 -04:00
Nilamdyuti Goswami
bbf9f5e97c Assamese translation updated 2013-06-10 14:58:53 +05:30
Fran Diéguez
3fdbfe7c0a Updated Galician translations 2013-06-10 10:31:01 +02:00
Ryan Lortie
12958ed5cc gio/tests: sort tests in the Makefile.am
...to make it clear where people should add theirs, reducing the chance
of conflicts caused by everyone always adding at the end.
2013-06-08 17:01:56 -04:00
Ryan Lortie
afc8b1020a GDesktopAppInfo: support DBusActivatable
Support the sender-side of the freedesktop application specification for
cases that we find 'DBusActivatable=true' in the desktop file.

https://bugzilla.gnome.org/show_bug.cgi?id=699259
2013-06-07 18:36:55 -04:00
Matthias Clasen
0aaac55d14 Update link to documentation 2013-06-06 00:06:46 -04:00
Dan Winship
6965b721b1 tests: fix and re-add the broken test 2013-06-05 23:49:56 -03:00
Matthias Clasen
1dac271ace Remove a failing testcase
One of the recently added examples seems wrong. Drop it.
2013-06-05 21:50:52 -04:00
Colin Walters
76a10a572c GFileEnumerator: Add some documentation about ordering
Kind of a gratuitious gaping hole in the docs...

https://bugzilla.gnome.org/show_bug.cgi?id=701680
2013-06-05 18:52:14 -04:00
Ryan Lortie
74a034028a tests: add a few more invalid IPv6 address tests
https://bugzilla.gnome.org/show_bug.cgi?id=701401
2013-06-05 19:48:29 -03:00
Dan Winship
59ed934b05 ginetaddress: fix addr/string conversions on windows
When parsing an address, we need to re-set "len" between IPv4 and
IPv6, since WSAStringToAddress() might set it to sizeof(struct sin_addr)
when trying to parse the string as IPv4, even if it fails. Also, we
need to make sure to not pass strings to WSAStringToAddress() that it
will accept but that we don't want it to.

When stringifying an address, we need to clear the sockaddr before
filling it in, so we don't accidentally end up with an unwanted
scope_id or the like.

https://bugzilla.gnome.org/show_bug.cgi?id=701401
2013-06-05 19:48:19 -03:00
Colin Walters
9f1a0b57cd Ensure g_file_copy() does not temporarily expose private files
Previously, g_file_copy() would (on Unix) create files with the
default mode of 644.  For applications which might at user request
copy arbitrary private files such as ~/.ssh or /etc/shadow, a
world-readable copy would be temporarily exposed.

This patch is suboptimal in that it *only* fixes g_file_copy()
for the case where both source and destination are instances of
GLocalFile on Unix.

The reason for this is that the public GFile APIs for creating files
allow very limited control over the access permissions for the created
file; one can either say a file is "private" or not.  Fixing
this by adding e.g. g_file_create_with_attributes() would make sense,
except this would entail 8 new API calls for all the variants of
_create(), _create_async(), _replace(), _replace_async(),
_create_readwrite(), _create_readwrite_async(), _replace_readwrite(),
_replace_readwrite_async().  That can be done as a separate patch
later.

https://bugzilla.gnome.org/show_bug.cgi?id=699959
2013-06-05 19:00:20 +01:00
Colin Walters
02aaef5a4d g_file_copy(): Clean up logic for info query
Previously, we called g_file_query_info() *again* on the source at the
very end of the copy.  This has the lame semantics that if the source
happened to be deleted, we would fail to apply attributes to the
destination.  This could even be a security flaw.

This commit changes things so that we query info from the source
*stream* after opening - i.e. on Unix we use the proper fstat() and
friends.  That way we operate more atomically.

https://bugzilla.gnome.org/show_bug.cgi?id=699959
2013-06-05 18:56:53 +01:00
Ryan Lortie
b4df86fa19 GApplication: implement fd.o application spec
The freedesktop application specification is largely overlapping the
GLib application D-Bus interface but implementing it will allow for
applications to be launched directly from desktop files, which we want.

We keep the old Gtk interface for compatibility reasons and because it
has some functionality not in the freedesktop spec (Busy state,
CommandLine, etc.).

https://bugzilla.gnome.org/show_bug.cgi?id=699259
2013-06-05 12:50:50 -04:00
Ryan Lortie
7baea0aee5 GApplication: set prgname to appid for services
Since services are based on D-Bus activation and desktop files are
supposed to be named like the busname for DBusActivatable applications
and since gnome-shell wants wmclass equal to the desktop file name, we
therefore want wmclass equal to the application ID in this case.

wmclass is determined from the prgname, which is otherwise pretty
pointless to set to some random thing in $(libexec) for a D-Bus service,
so set that to the appid.

This means that for D-Bus services, the following things are now all the
same:

 - application ID
 - prgname
 - wmclass property set on all windows
 - desktop file name
 - well-known bus name

There are not many applications running as D-Bus services at present so
this shouldn't impact anybody except for gnome-clocks (where this change
will be fixing a bug) and gnome-terminal.

https://bugzilla.gnome.org/show_bug.cgi?id=699259
2013-06-05 12:50:50 -04:00
Daniel Mustieles
25d6560588 Updated Spanish translation 2013-06-05 18:28:48 +02:00
ManojKumar Giri
27c2864843 Updated Odia Translation. 2013-06-05 13:08:46 +05:30
Sandeep Sheshrao Shedmake
5b872bb4fd Updated Marathi Translations 2013-06-05 12:28:00 +05:30
Sweta Kothari
78ebab5bea Updated Gujarati Translations 2013-06-05 10:49:24 +05:30
Ryan Lortie
9d0c17b501 g_file_set_contents(): don't fsync on ext3/4
ext3 and ext4 (for quite some time) with default mount options don't
need fsync() to ensure safety of replace-by-rename.  Stop doing that for
these filesystems.

Note: this patch also impacts ext2, which is probably not safe, but I
don't know of any way to check ext2. vs the others because they all have
the same magic numbers (short of opening /proc/mount).

This patch assumes that if BTRFS_SUPER_MAGIC is defined then so will be
EXT3_SUPER_MAGIC.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-04 09:52:10 -04:00
Dan Winship
16b26231ca gio/tests/inet-address: fix to work on OS X
OS X's getaddrinfo() only supports IPv6 scope IDs that are interface
names, not numbers. So use if_indextoname() to get the name of an
interface and construct an address using that.

https://bugzilla.gnome.org/show_bug.cgi?id=700123
2013-06-04 09:24:47 -03:00
Ryan Lortie
c828aef014 g_file_set_contents: change {posix_ => }fallocate
Use fallocate() instead of posix_fallocate() so that we just fail
instead of getting the emulated version from the libc.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03 22:55:20 -04:00
Ryan Lortie
fc98c13fde g_file_set_contents(): fix simple logic error
CI FTW.
2013-06-03 17:59:29 -04:00
Ryan Lortie
e40435e834 g_file_set_contents(): use unistd instead of stdio
Use a normal write() system call instead of fdopen() and fwrite().

This will definitely work on UNIX system and should work on Windows as
well...

As an added bonus, we can use g_close() now as well.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03 17:49:06 -04:00
Ryan Lortie
c152ceba09 g_file_set_contents(): don't allocate display name
g_file_set_contents() sets a GError in the event of various failures
that count occur.  It uses g_filename_display_name() in order to get the
filename to include in the messages.

Factor out the error handling to make it easier to allocate the display
name only when we need it (instead of allocating it every time).

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03 17:43:36 -04:00
Ryan Lortie
d3be43fcc5 g_file_set_contents(): use posix_fallocate()
Extents-based filesystems like knowing in advance how much data will be
written to a file in order to prevent fragmentation.  If we have it, use
posix_fallocate() before writing data in g_file_set_contents().

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03 16:12:04 -04:00
Matej Urbančič
b935059738 Updated Slovenian translation 2013-06-03 21:37:49 +02:00
Daniel Mustieles
771c841b3d Updated Spanish translation 2013-06-03 11:27:44 +02:00
ManojKumar Giri
ebea942d95 Updated Odia Translation. 2013-06-03 13:48:33 +05:30
Sweta Kothari
72af6b0d5b Updated Gujarati Translations 2013-06-03 13:31:25 +05:30
Kjell Ahlstedt
9acc480d72 Remove extra comma in gtestutils.h
https://bugzilla.gnome.org/show_bug.cgi?id=701474
2013-06-03 09:37:01 +02:00
Matthias Clasen
d0301080ee Improve GSettings test coverage 2013-06-02 20:02:06 -04:00