Commit Graph

2599 Commits

Author SHA1 Message Date
Matthias Clasen
0760bf5850 Add parser roundtrip tests 2011-12-08 18:05:13 -05:00
Matthias Clasen
a2aeea7acd GMenuMarkup: fixes uncovered by roundtrip testing
The print function was forgetting to emit type information for
attributes, and the parser was not handling types properly either.
2011-12-08 18:05:13 -05:00
Matthias Clasen
d5a1b674f5 Improve docs
Specify that g_menu_item_set_attribute_value consumes floating
@values.
2011-12-08 18:05:13 -05:00
Matthias Clasen
41c19c7df8 GApplication: Add a menu example to the docs 2011-12-08 18:05:13 -05:00
Matthias Clasen
8d96e68eeb GMenu: Enforce attribute name restrictions
The code assumes in various places that ':' does not occur
in attribute names. We are a little more strict than that,
and only allow lowercase ASCII, digits and '-'.
2011-12-08 18:05:13 -05:00
Matthias Clasen
9bebf15077 Reduce excessive width of gmenu.h 2011-12-08 18:05:12 -05:00
Matthias Clasen
58a8c02dfb Match up a parameter name 2011-12-08 18:05:12 -05:00
Matthias Clasen
60ab57c4b0 Describe the org.gtk.Menus interface
Even though we consider the interface to be an implementation
detail, we should have internal documentation of the interface.
2011-12-08 18:05:12 -05:00
Matthias Clasen
cd22e1967d Describe the org.gtk.Actions interface
Even though we consider the interface to be an implementation
detail, we should have internal documentation for the interface.
2011-12-08 18:05:12 -05:00
Matthias Clasen
db34b1aebe Rename exporter APIs
There are no public 'exporter' objects, so don't allude to them
in the function names. At the same time, we want to make it clear
that these functions are D-Bus specific.

The new APIs are
g_action_group_dbus_export_start
g_action_group_dbus_export_query
g_action_group_dbus_export_stop
g_menu_model_dbus_export_start
g_menu_model_dbus_export_query
g_menu_model_dbus_export_stop
2011-12-08 18:05:12 -05:00
Matthias Clasen
435b2418da GActionGroup: Mention GMenuModel in the docs 2011-12-08 18:05:12 -05:00
Matthias Clasen
ae0bd032ca Add g_application_set_menu
This adds ane asy way to export menu information alongside
the actions that are already exported by GApplication.
2011-12-08 18:05:12 -05:00
Ryan Lortie
6dfb9d583f Add GMenuModel testcases 2011-12-08 18:05:12 -05:00
Ryan Lortie
d110fd9202 Add GMenuProxy
GMenuProxy can be used as a client-side wrapper
for the a menu model that has been exported on D-Bus.
2011-12-08 18:05:12 -05:00
Matthias Clasen
66e089f086 Add GMenuModel D-Bus exporter 2011-12-08 18:05:12 -05:00
Matthias Clasen
6b40d4eb6b Add GMenu markup
These functions serialize and deserialize a GMenuModel
to and from XML.
2011-12-08 18:05:12 -05:00
Matthias Clasen
13f5977735 Add GMenu 2011-12-08 18:05:12 -05:00
Matthias Clasen
12a39a05d3 Add GMenuModel 2011-12-08 18:05:12 -05:00
Matthias Clasen
df4cd241e5 GApplication: use GDBusActionGroup
instead of the internal version of the same
2011-12-08 18:05:12 -05:00
Ryan Lortie
c249e10d11 Add GDBusActionGroup
GDBusActionGroup can be used as a client-side wrapper
for the an action group that has been exported on D-Bus.
2011-12-08 18:05:12 -05:00
Ryan Lortie
bc5fe41dec GApplication: port action client to new D-Bus API
for compatibility with GActionGroup exporter
2011-12-08 18:05:12 -05:00
Ryan Lortie
20d1de3a1b GApplication: use GActionGroup exporter
instead of home-grown internal implementation of the same
2011-12-08 18:05:12 -05:00
Ryan Lortie
940ec94f0a Add GActionGroup D-Bus exporter 2011-12-08 18:05:12 -05:00
Ryan Lortie
8d1cc7f463 Revert "Use an XML blob for gapplication interface info"
This reverts commit 8013401f6e.
2011-12-08 18:05:12 -05:00
Ryan Lortie
45818762d3 Revert "Forgot one interface..."
This reverts commit 30580bdca7.
2011-12-08 18:05:12 -05:00
Matthias Clasen
3d686e3d8f Clarify docs around main loop vfuncs
Mention that the vfuncs are no longer used, and tweak the
wording around what g_application_run() does.

https://bugzilla.gnome.org/show_bug.cgi?id=665391
2011-12-07 14:38:37 -05:00
David Zeuthen
70dacf83d2 Bug 665733 – GDBusConnection holds lock while calling destroynotify
Fix this problem by always running the destroynotify from an idle.

https://bugzilla.gnome.org/show_bug.cgi?id=665733

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-07 10:30:42 -05:00
David Zeuthen
990af4b372 GDBus: Note in docs that g_dbus_node_info_new_for_xml() is using GMarkup
This was discussed in bug 665634.

https://bugzilla.gnome.org/show_bug.cgi?id=665634

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-06 13:41:53 -05:00
David Zeuthen
74e131551d GDBus: fix link to D-Bus spec
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-06 13:41:53 -05:00
Benjamin Otte
482f226270 outputstream: Clarify docs of flush()
After questioning the semantics of flush on IRC, it seemed necessary to
clarify what flushing is supposed to do. The Linux man page for fflush()
seemed to cover it perfectly, so I just copied it.

I did not add the "via the underlying write mechanism" part as that in
my opinion is not something subclasses should need to guarantee.
2011-12-05 22:40:18 +01:00
Cosimo Alfarano
fd1e9938b3 Send CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted
This patch makes GFileMonitor to emit EVENT_CHANGES_DONE_HINT when
EVENT_CREATED is emitted but the file is not opened for writing.

On file moves across different mounted volumes, inotify will always emit
IN_CREATE and IN_CLOSE_WRITE (plus other events).
This translates into GIO's _EVENT_CREATED and _EVENT_CHANGES_DONE_HINT.

On file moves across the same mounted volumes, inotify will emit
IN_MOVED_FROM/IN_MOVED_TO which will be translated into
_EVENT_DELETED/_EVENT_CREATED GIO's side. No _EVENT_CHANGES_DONE_HINT is
emited afterwards.
Under such circumstances a file indexer does not know when actually the
file is ready to be indexed, either waiting too much or triggering the
indexing twice. On small devices it's not advisable.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=640077
Bug-NB: NB#219982
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Tomas Bzatek <tbzatek@redhat.com>
2011-12-05 18:27:34 +00:00
Simon McVittie
83d0c8a739 GDBusConnection: propagate error correctly if flags are inappropriate
Previously, this would fail the assertion
"connection->initialization_error != NULL" after the label "out".

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=665067
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
2011-12-05 18:15:19 +00:00
Tristan Van Berkom
a00530ecb0 GDBusInterfaceSkeleton: make it possible to export on multiple connections
This is useful in peer-to-peer connections.

With minor changes by David Zeuthen <davidz@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=662718

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-02 11:20:21 -05:00
Dan Winship
e798349587 GMemoryInputStream/GMemoryOutputStream: fix bug in previous commit
A g_input_stream_read_async() implementation can't call
g_input_stream_read() on itself directly because it will fail because
the pending flag is already set. So fix that by invoking the vmethod
directly rather than calling the wrapper. Likewise with
GMemoryOutputStream.

Add a test to gio/tests/memory-input-stream.c to catch read_async
failures in the future.
2011-12-01 13:10:25 +01:00
Dan Winship
a5876e5fc1 GMemoryInputStream/GMemoryOutputStream: make these properly subclassable
The async methods were directly invoking their own implementations of
the sync methods, making it impossible for a subclass to reimplement
them.

https://bugzilla.gnome.org/show_bug.cgi?id=664635
2011-11-30 10:34:19 +01:00
Matthias Clasen
3aa0fc43a6 Clarify local_command_line docs
https://bugzilla.gnome.org/show_bug.cgi?id=641720
2011-11-29 22:10:37 -05:00
Dan Winship
1f33446e1f gnetworkmonitornetlink.c: Make the error messages less geeky
This makes several different errors have identical messages, but
they're pretty much "can't happen" situations anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=664406
2011-11-29 21:45:37 +01:00
Dan Winship
69043de3e0 gzlibdecompressor.c: fix a comment 2011-11-29 21:43:00 +01:00
Michael Vogt
0627759331 Add missing annotation to g_file_set_attribute()
g_file_set_attribute() also permits a NULL value for value_p, and requires it
to be NULL to unset it. Also fix the wrong variable name in the documentation.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2011-11-29 12:01:25 +01:00
Matthias Clasen
30580bdca7 Forgot one interface... 2011-11-28 19:57:44 -05:00
Matthias Clasen
8013401f6e Use an XML blob for gapplication interface info
This is both more readable and more efficient. Double win !
2011-11-28 19:33:24 -05:00
Ryan Lortie
01ce06ac27 gio.symbols: add g_application_[gs]et_default() 2011-11-26 20:28:50 -05:00
Matthias Clasen
c7dc66602a Cosmetics
Reword the title of GSimpleAction in the docs.
2011-11-26 20:12:34 -05:00
Ryan Lortie
a81cdf297c GApplication: add default application 2011-11-26 20:11:40 -05:00
Ryan Lortie
95c3796d6a GApplication: unregister action interface export
We missed a few cases of unexporting the action group interface (in
error cases, and on GApplication teardown).
2011-11-26 20:07:24 -05:00
Matthias Clasen
2cbc6d9ae6 GApplication: Implement query_action 2011-11-26 19:43:46 -05:00
Matthias Clasen
c3a2c280c3 GSimpleActionGroup: Implement query_action 2011-11-26 19:27:30 -05:00
Ryan Lortie
f468e9c309 Add g_action_group_query_action()
This new API allows requesting multiple pieces of information about a
particular action in one go and also simplifies the burden for
GActionGroup implementations -- they need not implement all the separate
APIs now.
2011-11-26 19:25:32 -05:00
Simon McVittie
0104c62f3f GInitable, GAsyncInitable: not initializing gives undefined behaviour
This is the ISO C sense of undefined behaviour, in which
works-by-coincidence, critical warning, abort, demons-fly-out-of-your-nose
are all valid implementations.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662208
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
2011-11-23 12:30:06 +00:00
Simon McVittie
968ef5f5ff GDBusWorker: continue_writing: initialize flush_async_data if closing
This was a regression in commit f41178c6c: flush_async_data wasn't
necessarily NULL in the "don't flush" case.

Also move initialization of these variables up so that it's
unconditional, since that's easier to verify than checking
that each branch gets it right.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=664617
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-11-23 11:20:15 +00:00