Merge lp:~gue5t/midori/gir-3 into lp:midori

Proposed by gue5t gue5t
Status: Merged
Approved by: Cris Dywan
Approved revision: 6984
Merged at revision: 6985
Proposed branch: lp:~gue5t/midori/gir-3
Merge into: lp:midori
Diff against target: 538 lines (+100/-54)
12 files modified
midori/midori-app.c (+1/-1)
midori/midori-bookmarks-db.c (+1/-1)
midori/midori-bookmarks-db.h (+1/-1)
midori/midori-browser.c (+19/-19)
midori/midori-extension.c (+25/-3)
midori/midori-locationaction.c (+1/-1)
midori/midori-panel.c (+2/-5)
midori/midori-preferences.c (+1/-1)
midori/midori-privatedata.c (+21/-3)
midori/midori-searchaction.c (+1/-1)
midori/midori-view.c (+26/-17)
midori/midori-websettings.c (+1/-1)
To merge this branch: bzr merge lp:~gue5t/midori/gir-3
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+263980@code.launchpad.net

Commit message

Fix various mis[sing ]annotations and style issues in GIR

Description of the change

This cuts down the number of warnings from g-ir-scanner significantly. Most of the remaining ones are caused by g-ir-scanner not finding dependencies or such--I need to investigate those separately.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

Niiice.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-app.c'
2--- midori/midori-app.c 2015-06-24 19:23:51 +0000
3+++ midori/midori-app.c 2015-07-06 21:42:31 +0000
4@@ -1061,7 +1061,7 @@
5 *
6 * Retrieves the browsers as a list.
7 *
8- * Return value: a newly allocated #Glist of #MidoriBrowser
9+ * Return value: (transfer container) (element-type Midori.Browser): a newly allocated #Glist of #MidoriBrowser
10 *
11 * Since: 0.2.5
12 **/
13
14=== modified file 'midori/midori-bookmarks-db.c'
15--- midori/midori-bookmarks-db.c 2015-02-24 18:18:08 +0000
16+++ midori/midori-bookmarks-db.c 2015-07-06 21:42:31 +0000
17@@ -880,7 +880,7 @@
18
19 /**
20 * midori_bookmarks_db_query_recursive:
21- * @array: the main bookmark array
22+ * @bookmarks: the main bookmark array
23 * @fields: comma separated list of fields
24 * @condition: condition, like "folder = '%q'"
25 * @value: a value to be inserted if @condition contains %q
26
27=== modified file 'midori/midori-bookmarks-db.h'
28--- midori/midori-bookmarks-db.h 2014-02-26 21:22:00 +0000
29+++ midori/midori-bookmarks-db.h 2015-07-06 21:42:31 +0000
30@@ -41,7 +41,7 @@
31 midori_bookmarks_db_new (char** errmsg);
32
33 void
34-midori_bookmarks_db_on_quit (MidoriBookmarksDb* array);
35+midori_bookmarks_db_on_quit (MidoriBookmarksDb* bookmarks);
36
37 void
38 midori_bookmarks_db_add_item (MidoriBookmarksDb* bookmarks, KatzeItem* item);
39
40=== modified file 'midori/midori-browser.c'
41--- midori/midori-browser.c 2015-06-25 21:04:19 +0000
42+++ midori/midori-browser.c 2015-07-06 21:42:31 +0000
43@@ -3119,7 +3119,7 @@
44 *
45 * Retrieves a list of actions which are suitable for use in a toolbar.
46 *
47- * Return value: a NULL-terminated array of strings with actions
48+ * Return value: (array zero-terminated=1) (transfer none): a NULL-terminated array of strings with actions
49 *
50 * Since: 0.1.8
51 **/
52@@ -7031,13 +7031,13 @@
53 /**
54 * midori_browser_page_num:
55 * @browser: a #MidoriBrowser
56- * @widget: a widget in the browser
57+ * @view: a child widget of the browser's notebook
58 *
59- * Retrieves the position of @widget in the browser.
60+ * Retrieves the position of @view in the browser.
61 *
62 * If there is no page present at all, -1 is returned.
63 *
64- * Return value: the index of the widget, or -1
65+ * Return value: the index of the view, or -1
66 *
67 * Since: 0.4.5
68 **/
69@@ -7075,7 +7075,7 @@
70 * @browser: a #MidoriBrowser
71 * @item: an item
72 *
73- * Return value: a #GtkWidget
74+ * Return value: (type MidoriView) (transfer none): the added view
75 *
76 * Since: 0.4.9: Return type is GtkWidget*
77 **/
78@@ -7103,7 +7103,7 @@
79 *
80 * Appends an uri in the form of a new view.
81 *
82- * Return value: a #GtkWidget
83+ * Return value: (type MidoriView) (transfer none): the added view
84 *
85 * Since: 0.4.9: Return type is GtkWidget*
86 **/
87@@ -7153,7 +7153,7 @@
88 /**
89 * midori_browser_block_action:
90 * @browser: a #MidoriBrowser
91- * @name: the action to be blocked
92+ * @action: the action to be blocked
93 *
94 * Blocks built-in behavior of the specified action without
95 * disabling it, which gives you a chance to connect your
96@@ -7185,7 +7185,7 @@
97 /**
98 * midori_browser_unblock_action:
99 * @browser: a #MidoriBrowser
100- * @name: the action to be unblocked
101+ * @action: the action to be unblocked
102 *
103 * Restores built-in behavior of the specified action after
104 * previously blocking it with midori_browser_block_action().
105@@ -7221,7 +7221,7 @@
106 * by the browser. It allows obtaining individual
107 * actions and adding new actions.
108 *
109- * Return value: the action group of the browser
110+ * Return value: (transfer none): the action group of the browser
111 *
112 * Since: 0.1.4
113 **/
114@@ -7342,23 +7342,23 @@
115 /**
116 * midori_browser_get_nth_tab:
117 * @browser: a #MidoriBrowser
118- * @page: the index of a tab
119+ * @n: the index of a tab
120 *
121- * Retrieves the tab at the position @page.
122+ * Retrieves the tab at the position @n.
123 *
124 * If there is no page present at all, %NULL is returned.
125 *
126- * Return value: the selected page, or -1
127+ * Return value: (type MidoriTab) (transfer none): the selected page, or %NULL
128 *
129 * Since: 0.1.9
130 **/
131 GtkWidget*
132 midori_browser_get_nth_tab (MidoriBrowser* browser,
133- gint page)
134+ gint n)
135 {
136 g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL);
137
138- return (GtkWidget*)midori_notebook_get_nth_tab (MIDORI_NOTEBOOK (browser->notebook), page);
139+ return (GtkWidget*)midori_notebook_get_nth_tab (MIDORI_NOTEBOOK (browser->notebook), n);
140 }
141
142 /**
143@@ -7389,7 +7389,7 @@
144 }
145
146 /**
147- * midori_browser_get_tab:
148+ * midori_browser_get_current_tab:
149 * @browser: a #MidoriBrowser
150 *
151 * Retrieves the currently selected tab.
152@@ -7398,7 +7398,7 @@
153 *
154 * See also midori_browser_get_current_page().
155 *
156- * Return value: the selected tab, or %NULL
157+ * Return value: (transfer none): the selected tab, or %NULL
158 *
159 * Since: 0.2.6
160 **/
161@@ -7416,7 +7416,7 @@
162 *
163 * Retrieves the tabs as a list.
164 *
165- * Return value: a newly allocated #GList of #MidoriView
166+ * Return value: (element-type MidoriView) (transfer container): the browser's tabs
167 *
168 * Since: 0.2.5
169 **/
170@@ -7435,7 +7435,7 @@
171 * Retrieves a proxy array representing the respective proxy items.
172 * The array is updated automatically.
173 *
174- * Return value: the proxy #KatzeArray
175+ * Return value: (transfer none): the proxy #KatzeArray
176 **/
177 KatzeArray*
178 midori_browser_get_proxy_array (MidoriBrowser* browser)
179@@ -7451,7 +7451,7 @@
180 *
181 * Determines the browser appropriate for the specified widget.
182 *
183- * Return value: a #MidoriBrowser
184+ * Return value: (transfer none): a #MidoriBrowser, or %NULL
185 *
186 * Since 0.1.7
187 **/
188
189=== modified file 'midori/midori-extension.c'
190--- midori/midori-extension.c 2014-04-05 19:15:34 +0000
191+++ midori/midori-extension.c 2015-07-06 21:42:31 +0000
192@@ -581,6 +581,17 @@
193 g_free (extension_path);
194 }
195
196+/**
197+ * midori_extension_load_from_file:
198+ * @extension_path: the path to use for the extension's data files
199+ * @filename: the path to the extension's module file
200+ * @activate: whether to activate the extension
201+ * @test: whether to run the extension's tests
202+ *
203+ * Load an extension from a file.
204+ *
205+ * Return value: (transfer none): the loaded extension, or %NULL
206+ **/
207 GObject*
208 midori_extension_load_from_file (const gchar* extension_path,
209 const gchar* filename,
210@@ -640,6 +651,17 @@
211 return extension;
212 }
213
214+/**
215+ * midori_extension_activate_gracefully:
216+ * @app: the #MidoriApp for which to load the extension
217+ * @extension_path: the path to use for the extension's data files
218+ * @filename: the path to the extension's module file
219+ * @activate: whether to activate the extension
220+ *
221+ * Load an extension into the context of a #MidoriApp.
222+ *
223+ * Return value: (transfer none): the loaded extension, or %NULL
224+ **/
225 GObject*
226 midori_extension_activate_gracefully (MidoriApp* app,
227 const gchar* extension_path,
228@@ -826,7 +848,7 @@
229 * Retrieves the #MidoriApp the extension belongs to. The
230 * extension has to be active.
231 *
232- * Return value: the #MidoriApp instance
233+ * Return value: (transfer none): the #MidoriApp instance
234 *
235 * Since 0.1.6
236 **/
237@@ -1174,8 +1196,8 @@
238 *
239 * Retrieves the value of the specified setting.
240 *
241- * Return value: a newly allocated NULL-terminated list of strings,
242- * should be freed with g_strfreev()
243+ * Return value: (transfer full) (array zero-terminated=1): the list of
244+ * strings, NULL-terminated and to be freed with g_strfreev()
245 *
246 * Since: 0.1.7
247 **/
248
249=== modified file 'midori/midori-locationaction.c'
250--- midori/midori-locationaction.c 2015-03-23 11:33:24 +0000
251+++ midori/midori-locationaction.c 2015-07-06 21:42:31 +0000
252@@ -1812,7 +1812,7 @@
253 /**
254 * midori_location_action_set_secondary_icon:
255 * @location_action: a #MidoriLocationAction
256- * @icon: a stock ID, or an icon name
257+ * @stock_id: a stock ID, or an icon name
258 *
259 * Sets the secondary, ie right hand side icon.
260 *
261
262=== modified file 'midori/midori-panel.c'
263--- midori/midori-panel.c 2013-10-28 19:54:21 +0000
264+++ midori/midori-panel.c 2015-07-06 21:42:31 +0000
265@@ -443,7 +443,7 @@
266 *
267 * Creates a new empty panel.
268 *
269- * Return value: a new #MidoriPanel
270+ * Return value: (transfer full): a new #MidoriPanel
271 **/
272 GtkWidget*
273 midori_panel_new (void)
274@@ -552,9 +552,6 @@
275 * midori_panel_append_page:
276 * @panel: a #MidoriPanel
277 * @viewable: a viewable widget
278- * @toolbar: a toolbar widget, or %NULL
279- * @stock_id: a stock ID
280- * @label: a string to use as the label
281 *
282 * Appends a new page to the panel. If @toolbar is specified it will
283 * be packed above @viewable.
284@@ -713,7 +710,7 @@
285 *
286 * If @panel has no children, %NULL is returned.
287 *
288- * Return value: the child widget of the new page, or %NULL
289+ * Return value: (transfer none): the child widget of the new page, or %NULL
290 **/
291 GtkWidget*
292 midori_panel_get_nth_page (MidoriPanel* panel,
293
294=== modified file 'midori/midori-preferences.c'
295--- midori/midori-preferences.c 2015-06-06 13:03:43 +0000
296+++ midori/midori-preferences.c 2015-07-06 21:42:31 +0000
297@@ -140,7 +140,7 @@
298 *
299 * Since 0.1.2 @parent may be %NULL.
300 *
301- * Return value: a new #MidoriPreferences
302+ * Return value: (transfer full): a new #MidoriPreferences
303 **/
304 GtkWidget*
305 midori_preferences_new (GtkWindow* parent,
306
307=== modified file 'midori/midori-privatedata.c'
308--- midori/midori-privatedata.c 2015-04-21 02:00:38 +0000
309+++ midori/midori-privatedata.c 2015-07-06 21:42:31 +0000
310@@ -96,7 +96,11 @@
311 }
312
313 /**
314+ * midori_private_data_dialog_is_empty:
315+ * @dialog: the dialog
316+ *
317 * The dialog is "empty" when none of the relevant checkboxes are activated.
318+ *
319 * This function returns true if the dialog is empty.
320 **/
321 static bool
322@@ -131,8 +135,11 @@
323 }
324
325 /**
326+ * midori_private_data_clear_button_check_sensitive:
327+ * @dialog: the dialog to clear
328+ *
329 * When called, sets the sensitivity of the clear private data button depending
330- * on whether the dialog is empty (see: midori_private_data_dialog_is_empty)
331+ * on whether the dialog is empty (see: midori_private_data_dialog_is_empty())
332 **/
333 static void
334 midori_private_data_clear_button_check_sensitive (GtkDialog* dialog)
335@@ -153,6 +160,15 @@
336 midori_private_data_clear_button_check_sensitive (GTK_DIALOG (dialog));
337 }
338
339+/**
340+ * midori_private_data_get_dialog:
341+ * @browser: the browser for which to create a dialog
342+ *
343+ * Shows a dialog for the user to configure private data settings
344+ * and clear some items.
345+ *
346+ * Return value: (transfer full): the dialog
347+ **/
348 GtkWidget*
349 midori_private_data_get_dialog (MidoriBrowser* browser)
350 {
351@@ -419,12 +435,14 @@
352 * midori_private_data_register_item:
353 * @name: the name of the privacy item
354 * @label: a user visible, localized label
355- * @clear: a callback clearing data
356+ * @clear: (scope async): a callback clearing data
357 *
358 * Registers an item to clear data, either via the
359 * Clear Private Data dialogue or when Midori quits.
360 *
361- * Return value: a #GList if all arguments are %NULL
362+ * Return value: (element-type MidoriPrivateDataItem) (transfer none):
363+ * a #GList of all previously-registered items if all arguments are
364+ * given as %NULL, %NULL otherwise
365 **/
366 GList*
367 midori_private_data_register_item (const gchar* name,
368
369=== modified file 'midori/midori-searchaction.c'
370--- midori/midori-searchaction.c 2015-05-21 20:08:59 +0000
371+++ midori/midori-searchaction.c 2015-07-06 21:42:31 +0000
372@@ -1387,7 +1387,7 @@
373 * the very same dialog until it is destroyed, in which case
374 * a new dialog is created.
375 *
376- * Return value: a #GtkDialog
377+ * Return value: (transfer none): a #GtkDialog
378 **/
379 GtkWidget*
380 midori_search_action_get_dialog (MidoriSearchAction* search_action)
381
382=== modified file 'midori/midori-view.c'
383--- midori/midori-view.c 2015-03-23 11:33:24 +0000
384+++ midori/midori-view.c 2015-07-06 21:42:31 +0000
385@@ -924,7 +924,7 @@
386 * @view: a #MidoriView
387 * @message_type: a #GtkMessageType
388 * @message: a message string
389- * @response_cb: a response callback
390+ * @response_cb: (scope async): a response callback
391 * @user_data: user data passed to the callback
392 * @first_button_text: button text or stock ID
393 * @...: first response ID, then more text - response ID pairs
394@@ -933,7 +933,7 @@
395 * button invokes the specified callback. The infobar is
396 * automatically destroyed if the location changes or reloads.
397 *
398- * Return value: an infobar widget
399+ * Return value: (transfer none): an infobar widget
400 *
401 * Since: 0.2.9
402 **/
403@@ -3255,7 +3255,7 @@
404 * Creates a new view with the specified parameters that
405 * is visible by default.
406 *
407- * Return value: a new #MidoriView
408+ * Return value: (transfer full): a new #MidoriView
409 *
410 * Since: 0.3.0
411 * Deprecated: 0.4.3
412@@ -3279,7 +3279,7 @@
413 *
414 * Creates a new view from an item that is visible by default.
415 *
416- * Return value: a new #MidoriView
417+ * Return value: (transfer full): a new #MidoriView
418 *
419 * Since: 0.4.3
420 * Deprecated: 0.5.8: Use midori_view_new_from_view instead.
421@@ -3316,7 +3316,7 @@
422 *
423 * Usually @settings should be passed from an existing view or browser.
424 *
425- * Return value: a new #MidoriView
426+ * Return value: (transfer full): a new #MidoriView
427 *
428 * Since: 0.5.8
429 **/
430@@ -4023,7 +4023,7 @@
431 *
432 * The returned icon is owned by the @view and must not be modified.
433 *
434- * Return value: a #GdkPixbuf, or %NULL
435+ * Return value: (transfer none): a #GdkPixbuf, or %NULL
436 **/
437 GdkPixbuf*
438 midori_view_get_icon (MidoriView* view)
439@@ -4205,7 +4205,7 @@
440 *
441 * The menu item is valid until it is removed from its container.
442 *
443- * Return value: the proxy #GtkMenuItem
444+ * Return value: (transfer none): the proxy #GtkMenuItem
445 **/
446 GtkWidget*
447 midori_view_get_proxy_menu_item (MidoriView* view)
448@@ -4228,6 +4228,15 @@
449 return view->menu_item;
450 }
451
452+/**
453+ * midori_view_duplicate
454+ * @view: a #MidoriView
455+ *
456+ * Create a new #MidoriView from an existing one by using
457+ * the item of the old view.
458+ *
459+ * Return value: (transfer full): the new #MidoriView
460+ **/
461 GtkWidget*
462 midori_view_duplicate (MidoriView* view)
463 {
464@@ -4247,7 +4256,7 @@
465 * Retrieves a menu that is typically shown when right-clicking
466 * a tab label or equivalent representation.
467 *
468- * Return value: a #GtkMenu
469+ * Return value: (transfer full): a #GtkMenu
470 *
471 * Since: 0.1.8
472 * Deprecated: 0.5.7: Use MidoriNotebook API instead.
473@@ -4271,7 +4280,7 @@
474 * Retrieves a proxy tab label that is typically used when
475 * adding the view to a notebook.
476 *
477- * Return value: the proxy #GtkEventBox
478+ * Return value: (transfer none): the proxy #GtkEventBox
479 *
480 * Deprecated: 0.5.7: Don't use this label.
481 **/
482@@ -4336,7 +4345,7 @@
483 *
484 * The item reflects changes to title (name), URI and MIME type (mime-type).
485 *
486- * Return value: the proxy #KatzeItem
487+ * Return value: (transfer none): the proxy #KatzeItem
488 **/
489 KatzeItem*
490 midori_view_get_proxy_item (MidoriView* view)
491@@ -4920,7 +4929,7 @@
492 * If width and height are negative, the resulting
493 * image is going to be optimized for speed.
494 *
495- * Returns: a newly allocated #GdkPixbuf
496+ * Returns: (transfer full): a newly allocated #GdkPixbuf
497 *
498 * Since: 0.2.1
499 * Deprecated: 0.5.4
500@@ -4939,7 +4948,7 @@
501 * midori_view_get_web_view
502 * @view: a #MidoriView
503 *
504- * Returns: The #WebKitWebView for this view
505+ * Returns: (transfer none): The #WebKitWebView for this view
506 *
507 * Since: 0.2.5
508 * Deprecated: 0.4.8: Use midori_tab_get_web_view() instead.
509@@ -4954,11 +4963,11 @@
510
511 /**
512 * midori_view_get_for_widget:
513- * @widget: a #GtkWidget
514- *
515- * Determines the view appropriate for the specified widget.
516- *
517- * Return value: a #MidoriView
518+ * @web_view: a #GtkWidget of type #WebKitWebView
519+ *
520+ * Determines the MidoriView for the specified #WebkitWebView widget.
521+ *
522+ * Return value: (transfer none): a #MidoriView, or %NULL
523 *
524 * Since 0.4.5
525 **/
526
527=== modified file 'midori/midori-websettings.c'
528--- midori/midori-websettings.c 2014-03-19 20:03:50 +0000
529+++ midori/midori-websettings.c 2015-07-06 21:42:31 +0000
530@@ -1525,7 +1525,7 @@
531 /**
532 * midori_settings_save_to_file:
533 * @settings: a MidoriWebSettings instance to save
534- * @app: (type Midori.Application) (allow-none): a MidoriApplication instance
535+ * @app: (type MidoriApp) (allow-none): a MidoriApp instance
536 * @filename: the filename into which to save settings
537 * @error: (out) (allow-none): return location for a GError, or %NULL
538 *

Subscribers

People subscribed via source and target branches

to all changes: