Commit Graph

13701 Commits

Author SHA1 Message Date
Piotr Drąg
454691a4b4 Updated POTFILES.in 2013-04-22 00:37:20 +02:00
Ryan Lortie
c16f914b40 GIcon: add g_icon_[de]serialize()
Add support for serialising a GIcon to a GVariant and deserialising the
result back to a GIcon.

This solves a number of problems suffered by the existing to_string()
API, primarily these:

 - not forcing the icon to be a utf8 string means that we can
   efficiently encode a PNG (ie: just give the array of bytes)

 - there is no need to ensure that proper types are loaded before using
   the deserialisation interface.  'Foreign' icon types will probably
   emit a serialised format the deserialises to a GBytesIcon.

We additionally clearly document what is required for being a consumer
or implementation of #GIcon.

Further patches will be required to GdkPixbuf and GVfsIcon to bring
their implementations in line with the new rules (essentially: introduce
implementations of the new serialize() API).

https://bugzilla.gnome.org/show_bug.cgi?id=688820
2013-04-21 16:31:14 -04:00
Ryan Lortie
9cc222c0bf Introduce GBytesIcon
GBytesIcon is an icon that has a GBytes inside of it where the GBytes
contains some sort of encoded image in a widely-recognised file format.
Ideally this will be a PNG.

It implements GLoadableIcon, so GTK will already understand how to use
it, but we will add another patch there to make things more efficient.

https://bugzilla.gnome.org/show_bug.cgi?id=688820
2013-04-21 16:25:15 -04:00
Ryan Lortie
519e989ea8 GIcon: pure re-factor of _from_string()
Split out the 'simple string format' cases of URIs, file paths and
themed icons to a separate function.

This function will be shared by g_icon_deserialize().

https://bugzilla.gnome.org/show_bug.cgi?id=688820
2013-04-21 16:25:13 -04:00
Jasper St. Pierre
c0af442909 gdesktopappinfo: Allow getting the desktop ID from the filename 2013-04-21 00:09:47 -04:00
Lars Uebernickel
390115f385 gactionmap: don't require GActionGroup
https://bugzilla.gnome.org/show_bug.cgi?id=698478
2013-04-20 22:10:36 -04:00
Lars Uebernickel
ac1379e22c g_variant_get_data_as_bytes: return a sub-bytes if necessary
https://bugzilla.gnome.org/show_bug.cgi?id=698457
2013-04-20 19:24:47 -04:00
Ryan Lortie
dbb65b5465 GVariant: add new g_variant_new_take_string() API
Lots of people have variously asked for APIs like
g_variant_new_string_printf() in order to avoid having to use
g_strdup_printf(), create a GVariant using g_variant_new_string(), then
free the temporary string.

Instead of supporting that, plus a million other potential cases,
introduce g_variant_new_take_string() as a compromise.

It's not possible to write:

 v = g_variant_new_take_string (g_strdup_printf (....));

to get the desired result and avoid the extra copies.  In addition, it
works with many other functions.

https://bugzilla.gnome.org/show_bug.cgi?id=698455
2013-04-20 18:58:24 -04:00
Sébastien Wilmet
a2a44a9617 Add async version of g_file_make_directory()
https://bugzilla.gnome.org/show_bug.cgi?id=548353
2013-04-19 21:38:13 +02:00
Sébastien Wilmet
bd57c3f171 GFile: fix the *_async_thread()
In the *_async_thread() functions, call the corresponding synchronous
function instead of calling the interface vfunc, which can be NULL.

In some cases the check for the vfunc == NULL was done, but to be
consistent it is better to always call the synchronous version (and the
code is simpler).

https://bugzilla.gnome.org/show_bug.cgi?id=548353
2013-04-19 21:38:13 +02:00
Ryan Lortie
1de0625103 GMenu: add g_menu_remove_all() API
Removes all of the items from a GMenu.  The keyboard indicator wants to
do this as part of refreshing the layout list, as an example.

https://bugzilla.gnome.org/show_bug.cgi?id=697601
2013-04-19 14:52:51 -04:00
Ryan Lortie
57cd876321 GVariant parser: tweak lexer for format strings
Tweak the lexer so that '[%s]' gets parsed as three separate tokens,
instead of the closing bracket getting sucked into the format string.
2013-04-19 11:40:04 -04:00
Ryan Lortie
1d87c6c7f8 GVariant parser: turn two asserts into soft errors
Parsing wrongly-typed GVariant text format data is a well-defined
operation and it ought to result in a GError.  We do that for most
cases, but 'v' and 'ay' were being treated differently.  Fix those as
well.
2013-04-19 11:40:04 -04:00
Robert Bragg
c70b497859 utils: avoid redundant set/endpwent around getpwuid
set/endpwent are only required for iterating through passwd entries
using getpwent(). Since we are explicitly requesting a passwd entry
for a uid then the set/endpwent calls are redundant.

Removing these redundant calls is required for building on Android
since their C library doesn't implement these.

https://bugzilla.gnome.org/show_bug.cgi?id=645881
2013-04-17 04:36:24 -04:00
Giovanni Campagna
d171e83347 GVariant: fix transfer annotation
g_variant_new_from_bytes() returns a floating reference, so it
must be annotated (transfer none)

https://bugzilla.gnome.org/show_bug.cgi?id=697887
2013-04-16 15:57:19 +02:00
Emilio Pozuelo Monfort
ad12142943 check-abis.sh: allow _ftext as that's leaked on mips
https://bugzilla.gnome.org/show_bug.cgi?id=697942
2013-04-16 15:44:27 +02:00
Sebastian Dröge
bcbaf1bef0 Fix compilation on Android with the bionic C library
https://bugzilla.gnome.org/show_bug.cgi?id=689223
2013-04-16 13:24:26 +02:00
Jasper St. Pierre
5e2cad9de9 bookmarkfile: Fix annotations on GBookmarkFile 2013-04-12 16:41:57 -04:00
Marek Kasik
3c614be04a tests: Add test for disabled help options
Test whether help options are hidden when they are disabled
by g_option_context_set_help_enabled(.., FALSE).

https://bugzilla.gnome.org/show_bug.cgi?id=697652
2013-04-12 17:04:06 +02:00
Marek Kasik
d20336130d Don't show help options when help is disabled
Check whether help is enabled when creating help text
in g_option_context_get_help().

https://bugzilla.gnome.org/show_bug.cgi?id=697652
2013-04-12 17:04:02 +02:00
Jason Quinn
a12157b1f8 building.xml: Fix a typo of "fo" to "of"
https://bugzilla.gnome.org/show_bug.cgi?id=697771
2013-04-11 05:00:59 -04:00
Balázs Úr
f5806a208c Updated Hungarian translation 2013-04-10 23:33:20 +02:00
Sébastien Wilmet
733bf96202 Add async version of g_file_trash()
https://bugzilla.gnome.org/show_bug.cgi?id=548353
2013-04-10 22:32:33 +02:00
Sébastien Wilmet
c35b73a90f Add missing details in GFile documentation
https://bugzilla.gnome.org/show_bug.cgi?id=548353
2013-04-10 20:31:44 +02:00
Dan Winship
0513c855cb gmain: fix double-unlock in g_main_context_unref()
When unreffing a context with sources still attached, it would end up
unlocking an already-unlocked context, causing crashes on platforms
that (unlike Linux) actually check for that.

https://bugzilla.gnome.org/show_bug.cgi?id=697595
2013-04-10 11:39:12 -04:00
Lionel Landwerlin
74ed1cf5b0 gunixmounts: remove warning on unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=697367
2013-04-10 11:07:12 +01:00
Robert Ancell
907a931082 Fix deprecation warning for g_io_channel_read 2013-04-10 15:55:37 +12:00
Руслан Ижбулатов
2ca9dda72a win32: Allow POSIX threads to be used if --with-threads=posix
All tests pass with this patch AND a good pthreads implementation
(i'm using winpthreads, not pthreads-w32).

https://bugzilla.gnome.org/show_bug.cgi?id=697626
2013-04-09 14:10:13 +02:00
Руслан Ижбулатов
0a130c8bb0 win32: Fix warning 2013-04-09 14:02:54 +02:00
Руслан Ижбулатов
c237338b04 Use AC_LINK_IFELSE instead of AC_TRY_COMPILE
Fixes #665445
2013-04-09 11:55:42 +02:00
Lars Uebernickel
00f6d78125 g_dbus_connection_signal_subscribe: add path and namespace matching
https://bugzilla.gnome.org/show_bug.cgi?id=695156
2013-04-08 15:59:39 +02:00
James Turner
690d6b97f8 g_atomic_int_get, g_atomic_pointer_get: accept const arguments
https://bugzilla.gnome.org/show_bug.cgi?id=697386
2013-04-08 14:15:22 +02:00
Antoine Jacoutot
aba02c5248 simpler regex match on the shebang
The previous pattern didn't match on traditional non-GNU sed(1).
https://bugzilla.gnome.org/show_bug.cgi?id=696629
2013-04-07 09:09:59 +02:00
Lionel Landwerlin
d474309c3f gunixmounts: correctly flag hasmntopt usage
https://bugzilla.gnome.org/show_bug.cgi?id=697365
2013-04-07 07:11:30 +01:00
Shankar Prasad
3d03c9cb13 Updated kn translations 2013-04-05 17:23:01 +05:30
Shankar Prasad
a045964170 Updated kn translations 2013-04-05 16:20:28 +05:30
Shankar Prasad
1517cdb813 Updated kn translations 2013-04-05 12:36:29 +05:30
Jesse van den Kieboom
fb1ad873a6 GDateTime to GTimeZone in opaque structure doc 2013-04-05 08:01:17 +02:00
Cosimo Cecchi
3b4c9f5fcc gversionmacros: fix a typo 2013-04-04 13:15:00 -04:00
Cosimo Cecchi
db325cd6a3 application: introduce methods to mark the application as busy
This feature is intended for clients that want to signal a desktop shell
their busy state, for instance because a long-running operation is
pending.
The API works in a similar way to g_application_hold and
g_application_release: applications can call g_application_mark_busy()
to increase a counter that will keep the application marked as busy
until the counter reaches zero again.

The busy state is exported read-only on the org.gtk.Application interface
for clients to use.

https://bugzilla.gnome.org/show_bug.cgi?id=672018
2013-04-04 13:13:53 -04:00
Ryan Lortie
96f7e6d70b gtype: interface-after-init exception for gtk#
gtk# also has a problem with the new interface-after-init restriction
that nobody noticed until now.  Add an exception for them as well so
that they have a cycle or so to sort things out.

https://bugzilla.gnome.org/show_bug.cgi?id=687659
2013-04-04 11:41:19 -04:00
Ryan Lortie
c5307e4cba gtype: interface-after-init exception for glibmm
glibmm has a pretty difficult-to-solve problem caused by our recent
change to deny addition of interfaces to classes after initialisation.

They're looking for a long-term workaround for the problem, but in the
meantime we can allow the registration to succeed (with warning) if the
class looks like it's being defined by gtkmm.

https://bugzilla.gnome.org/show_bug.cgi?id=697229
2013-04-04 11:10:17 -04:00
Andres G. Aragoneses
859e4239c5 gobject: fix G_DEFINE_TYPE_EXTENDED docs so code snippet actually compiles
Flags being used in the G_DEFINE_TYPE_EXTENDED sample was "0", so it
should expand to 0 as well, otherwise the compiler would bark with:
maman-bar.c: In function ‘maman_bar_get_type’:
maman-bar.c:36:53: error: ‘flags’ undeclared (first use in this function)
maman-bar.c:36:53: note: each undeclared identifier is reported only once for each function it appears in

https://bugzilla.gnome.org/show_bug.cgi?id=697250
2013-04-04 12:11:06 +01:00
Nilamdyuti Goswami
cef5ce2012 Assamese translation updated 2013-04-04 13:27:35 +05:30
David Gomes
bfb6ff0dbd gsettings: implemented --version command
This was discussed in
https://bugzilla.gnome.org/show_bug.cgi?id=697131
2013-04-03 21:35:57 -04:00
Kjartan Maraas
4214078f33 Updated Norwegian bokmål translation 2013-04-03 11:51:27 +02:00
Colin Walters
d1bbab5689 gmacros: Mark G_UNAVAILABLE() functions as deprecated (gcc <= 4.4)
RHEL6 ships with GCC 4.4 by default, which doesn't understand the
nicer deprecated attribute that takes a message.  However, we can at
least fall back to the old G_DEPRECATED, rather than silently doing
nothing.

This gives me warning messages when building OSTree on RHEL6 when I
accidentally added a usage of g_unix_fd_source_new().

https://bugzilla.gnome.org/show_bug.cgi?id=697160
2013-04-03 00:33:45 -04:00
Giovanni Campagna
3456152f23 GThreadedResolver: set an error if no records could be found
It is possible that the upstream servers return something, but
we then filter all results because they are of the wrong type.
In that case the API and subsequent GTask calls expect a GError
to be set.

https://bugzilla.gnome.org/show_bug.cgi?id=696857
2013-04-02 23:04:15 +02:00
Guido Günther
31c00c1fbe codegen: move G_DEFINE_INTERFACE{,_WITH_CODE} before _default_init
to avoid warnings when built with -Wredundant-decls:

  sessionmanager-presence-generated.c:316:1: warning: redundant redeclaration of ‘session_manager_presence_default_init’ [-Wredundant-decls]
  sessionmanager-presence-generated.c:281:1: note: previous definition of ‘session_manager_presence_default_init’ was here
  sessionmanager-presence-generated.c:1273:1: warning: redundant redeclaration of ‘object_default_init’ [-Wredundant-decls]
  sessionmanager-presence-generated.c:1259:1: note: previous definition of ‘object_default_init’ was here

https://bugzilla.gnome.org/show_bug.cgi?id=696108
2013-04-02 21:49:59 +02:00
Guido Günther
576e2ce1db codegen: Avoid warnings when the generated client code is built with -Wunused-parameter
https://bugzilla.gnome.org/show_bug.cgi?id=696108
2013-04-02 21:49:54 +02:00