summaryrefslogtreecommitdiff
path: root/glib/gbookmarkfile.c
Commit message (Collapse)AuthorAgeFilesLines
* comments/docs: Fix couple of typosRavi Sankar Guntur2012-01-281-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=668857
* glib/*: Use g_list_free_full()Javier Jardón2012-01-031-32/+6
|
* one missed docs fixRyan Lortie2011-09-051-1/+1
|
* gtk-doc fixups for glib/Ryan Lortie2011-09-051-2/+2
|
* Don't assert too muchMatthias Clasen2010-08-031-4/+2
|
* Fix a typoMatthias Clasen2010-07-101-0/+44
|
* glib/: fully remove galias hacksRyan Lortie2010-07-071-4/+0
|
* fix a typoMatthias Clasen2009-01-201-1/+1
| | | | svn path=/trunk/; revision=7823
* Fix some compiler warningsMatthias Clasen2008-12-311-1/+1
| | | | svn path=/trunk/; revision=7755
* Bug 550096 – GBookmarkFile parser is not forward compatibleEmmanuele Bassi2008-08-311-27/+6
| | | | | | | | | | | | | | | | | 2008-08-31 Emmanuele Bassi <ebassi@gnome.org> Bug 550096 – GBookmarkFile parser is not forward compatible * glib/gbookmarkfile.c: (parse_bookmark_element), (parse_application_element), (parse_mime_type_element), (parse_icon_element): Relax the attributes checking of the GBookmarkFile parser for the attributes that the desktop bookmark file specification defines and controls. This allows adding new attributes to the existing elements in newer versions without breaking the parser in older ones. svn path=/trunk/; revision=7418
* Do not set the timestamp value using time(), as it will be overwrittenEmmanuele Bassi2008-07-211-26/+44
| | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-21 Emmanuele Bassi <ebassi@gnome.org> * glib/gbookmarkfile.c: (bookmark_app_info_new): Do not set the timestamp value using time(), as it will be overwritten anyway. (#535223, Michael Meeks) (parse_application_element), (bookmark_app_info_dump): Support the "modified" attribute, which takes an ISO-formatted string instead of a Unix time stamp, to keep the number of g_strdup_printf() calls to a minimum. * glib/gtimer.c: (g_time_val_to_iso8601): Do not use strftime(): we know the format and contents of the ISO 8601 date format we use. * tests/bookmarks/valid-03.xbel: Add a test file for the modified attribute. svn path=/trunk/; revision=7231
* Use g_set_error_literal where appropriate. Patch from bug #535947.Christian Persch2008-06-161-3/+3
| | | | svn path=/trunk/; revision=7051
* Don't leak apps_by_name in GBookmarkFile metadata itemsFederico Mena Quintero2008-04-091-3/+3
| | | | | | | | | | | 2008-04-09 Federico Mena Quintero <federico@novell.com> * glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak the apps_by_name hash table if the applications list is empty. Signed-off-by: Federico Mena Quintero <federico@gnu.org> svn path=/trunk/; revision=6846
* Bug 523877 – gbookmarkfile: avoid using g_string_append_printf() andClaudio Saavedra2008-03-221-111/+131
| | | | | | | | | | | | | | | | | | 2008-03-22 Claudio Saavedra <csaavedra@gnome.org> Bug 523877 – gbookmarkfile: avoid using g_string_append_printf() and other optimizations * glib/gbookmarkfile.c: (bookmark_metadata_dump), (bookmark_item_dump), (g_bookmark_file_dump), (expand_exec_line): Replace all calls to g_string_append_printf with g_strconcat () or g_string_append () where appropriate, to reduce the file creation time. Also, use g_string_sized_new () with an appropriate buffer size instead of g_string_new (NULL), to reduce time spent in memory reallocation. (#523877, Claudio Saavedra, Emmanuele Bassi) svn path=/trunk/; revision=6752
* Bug 518160 - replace two g_strdup_printf calls in GBookmarkFileEmmanuele Bassi2008-03-221-8/+5
| | | | | | | | | | | | 2008-03-22 Emmanuele Bassi <ebassi@gnome.org> Bug 518160 - replace two g_strdup_printf calls in GBookmarkFile * glib/gbookmarkfile.c (is_element_full): Compare the fragments instead of building two strings; this avoids two g_strdup_printf() per namespaced element enountered. (#518160, Felix Riemann) svn path=/trunk/; revision=6751
* http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html15:08:59 Tim Janik2007-12-101-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-10 15:08:59 Tim Janik <timj@imendio.com> * let g_warn_if_fail replace g_assert as discussed here: http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html * fix bug #502498: Test framework assertion failures should follow gcc error format. * gmessages.h, gmessages.c: deprecated g_assert_warning() which is unused now. removed g_assert*() definitions whcih are provided by gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail() which are recommended as g_assert/g_assert_not_reached replacements for non-test programs. added g_warn_message() to implement g_warn_*() macros. use emacs-next-error friendly formatting for file:line: for warnings. * gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting. implement g_assert_not_reached() with g_assertion_message() and g_assert() in terms of g_assertion_message_expr() so we'll be able to provide assertion messages in test logs. * gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail() or g_return_if_fail() where suitable. * gio/: changed g_assert to g_warn_if_fail. svn path=/trunk/; revision=6086
* Include the gshell.h header file (to define g_shell_[un]quote) and correctChris Wilson2007-04-301-1/+2
| | | | | | | | | | | | 2007-04-30 Chris Wilson <chris@chris-wilson.co.uk> * glib/gbookmarkfile.c (g_bookmark_file_get_app_info): Include the gshell.h header file (to define g_shell_[un]quote) and correct the order of the arguments to g_propagate_error(), as spotted by gcc. svn path=/trunk/; revision=5467
* Quote the passed command line...Emmanuele Bassi2007-04-291-3/+19
| | | | | | | | | | | | 2007-04-29 Emmanuele Bassi <ebassi@gnome.org> * glib/gbookmarkfile.c: (g_bookmark_file_set_app_info): Quote the passed command line... (g_bookmark_file_get_app_info): ... and unquote it when giving it back. (#432274) svn path=/trunk/; revision=5466
* Remove redundant NULL checksMatthias Clasen2007-01-151-22/+9
| | | | svn path=/trunk/; revision=5264
* Add support for expanding the desktop entry spec variables %U (list ofEmmanuele Bassi2007-01-021-0/+2
| | | | | | | | | | | | 2007-01-02 Emmanuele Bassi <ebassi@gnome.org> * glib/gbookmarkfile.c (expand_exec_line): Add support for expanding the desktop entry spec variables %U (list of URIs) and %F (list of filenames), so that using the command line from the Exec and TryExec key of a desktop entry file works as intended. svn path=/trunk/; revision=5196
* Return an error if the uri is bad. (#391370, Maciej Piechotka)Matthias Clasen2007-01-021-4/+22
| | | | | | | | | | | 2007-01-02 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (g_bookmark_file_get_app_info): Return an error if the uri is bad. (#391370, Maciej Piechotka) svn path=/trunk/; revision=5192
* Add Since tags. Fix Since tag. (#351583, Brian Cameron)Matthias Clasen2006-08-161-0/+2
| | | | | | | | | 2006-08-15 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (g_bookmark_file_get_groups): * glib/gmain.c (g_source_is_destroyed): Add Since tags. * glib/gkeyfile.c (g_key_file_get_double_list): Fix Since tag. (#351583, Brian Cameron)
* Plug a couple of leaks when removing data from a bookmark.Emmanuele Bassi2006-08-081-2/+4
| | | | | | | | 2006-08-08 Emmanuele Bassi <ebassi@gnome.org> * glib/gbookmarkfile.c (g_bookmark_file_remove_group) (g_bookmark_file_set_app_info): Plug a couple of leaks when removing data from a bookmark.
* Correct the grammar of an error message. (#349792, Jakub Friedl)Matthias Clasen2006-08-051-1/+1
| | | | | | | 2006-08-05 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (find_file_in_data_dirs): Correct the grammar of an error message. (#349792, Jakub Friedl)
* Return a boolean instead of void.Emmanuele Bassi2006-06-121-4/+8
| | | | | | | | | | | 2006-06-12 Emmanuele Bassi <ebassi@cvs.gnome.org> * glib/gbookmarkfile.h: * glib/gbookmarkfile.c (g_bookmark_file_remove_item): Return a boolean instead of void. * tests/bookmarkfile-test.c (test_modify): Add a test case for g_bookmark_file_remove_item().
* Use an empty string to pass the test in set_app_info.Emmanuele Bassi2006-06-091-5/+9
| | | | | | | | | | 2006-06-09 Emmanuele Bassi <ebassi@cvs.gnome.org> * glib/gbookmarkfile.c (g_bookmark_file_remove_application): Use an empty string to pass the test in set_app_info. (g_bookmark_file_move_item): Remove the old item from the look up table; return success in case of empty target.
* (bookmark_app_info_dump): Escape strings before dumpingMatthias Clasen2006-04-271-10/+19
| | | | them in xml. (#339340, Morten Welinder)
* Remove some special-casing of empty string which led to dangling pointers.Matthias Clasen2006-04-271-7/+9
| | | | | | | | | | | | 2006-04-27 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (g_bookmark_file_set_description) (g_bookmark_file_set_title, g_bookmark_file_set_icon): Remove some special-casing of empty string which led to dangling pointers. (#339337, Morten Welinder) (expand_exec_line): Don't use printf() needlessly, handle trailing '%' gracefully. (#339338, Morten Welinder) (is_element_full): Silence the compiler.
* Remove some special-casing of empty string which led to dangling pointers.Matthias Clasen2006-04-271-15/+6
| | | | | | | | | 2006-04-27 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (g_bookmark_file_set_description) (g_bookmark_file_set_title, g_bookmark_file_set_icon): Remove some special-casing of empty string which led to dangling pointers. (#339337, Morten Welinder)
* Avoid a possible NULL dereference (found by Coverity), also avoid someMatthias Clasen2006-04-261-9/+10
| | | | | | | | 2006-04-25 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (is_element_full): Avoid a possible NULL dereference (found by Coverity), also avoid some pointless strdups.
* Move short_month_names and long_month_names to bss.Matthias Clasen2006-04-041-6/+1
| | | | | | | | | | | | | | | | | | | | | | 2006-04-04 Matthias Clasen <mclasen@redhat.com> * glib/gdate.c: Move short_month_names and long_month_names to bss. * glib/gspawn-win32.c (g_spawn_error_quark): * glib/gspawn.c (g_spawn_error_quark): * glib/gshell.c (g_shell_error_quark): * glib/gmarkup.c (g_markup_error_quark): * glib/goption.c (g_option_error_quark): * glib/gkeyfile.c (g_key_file_error_quark): * glib/giochannel.c (g_io_channel_error_quark): * glib/gfileutils.c (g_file_error_quark): * glib/gconvert.c (g_convert_error_quark): * glib/gbookmarkfile.c (g_bookmark_file_error_quark): * glib/gthread.c (g_thread_error_quark): No point in making the error path fast by caching quarks. * glib/gbookmarkfile.c: Make the parser struct const.
* Make the parser struct constMatthias Clasen2006-04-041-1/+1
|
* Fix accidentally broken build.Behdad Esfahbod2006-04-041-1/+2
| | | | | | 2006-04-04 Behdad Esfahbod <behdad@gnome.org> * glib/gbookmarkfile.c: Fix accidentally broken build.
* Don't include sys/time.h (#337027, Kazuki IWAMOTO)Matthias Clasen2006-04-031-3/+1
| | | | | | | 2006-04-03 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c: Don't include sys/time.h (#337027, Kazuki IWAMOTO)
* Make it buildMatthias Clasen2006-03-301-1/+1
|
* Sync the parameter names with the .h files, otherwise gtk-doc misbehaves.Matthias Clasen2006-03-301-8/+8
| | | | | | | | 2006-03-30 Matthias Clasen <mclasen@redhat.com> * glib/gbookmarkfile.c (g_bookmark_file_get_app_info): Sync the parameter names with the .h files, otherwise gtk-doc misbehaves.
* glib/gbookmarkfile.h Add GBookmarkFile, a parser for files containingEmmanuele Bassi2006-03-271-0/+3662
2006-03-27 Emmanuele Bassi <ebassi@cvs.gnome.org> * glib/glib.h: * glib/gbookmarkfile.h * glib/gbookmarkfile.c: Add GBookmarkFile, a parser for files containing bookmarks stored using the Desktop Bookmark specification. Fixes bug #327662. * glib/glib.symbols: * glib/Makefile.am: * glib/makefile.msc.in: * glib/makefile.mingw.in: Build glue for GBookmarkFile.