Lines Matching refs:desktop_file
60 BusDesktopFile *desktop_file; /**< The resulting object */ member
98 bus_desktop_file_free (parser->desktop_file); in parser_free()
123 bus_desktop_file_free (BusDesktopFile *desktop_file) in bus_desktop_file_free() argument
127 for (i = 0; i < desktop_file->n_sections; i++) in bus_desktop_file_free()
128 bus_desktop_file_section_free (&desktop_file->sections[i]); in bus_desktop_file_free()
129 dbus_free (desktop_file->sections); in bus_desktop_file_free()
131 dbus_free (desktop_file); in bus_desktop_file_free()
159 grow_sections (BusDesktopFile *desktop_file) in grow_sections() argument
164 if (desktop_file->n_allocated_sections == 0) in grow_sections()
167 new_n_sections = desktop_file->n_allocated_sections*2; in grow_sections()
169 sections = dbus_realloc (desktop_file->sections, in grow_sections()
174 desktop_file->sections = sections; in grow_sections()
176 desktop_file->n_allocated_sections = new_n_sections; in grow_sections()
268 new_section (BusDesktopFile *desktop_file, in new_section() argument
274 if (desktop_file->n_allocated_sections == desktop_file->n_sections) in new_section()
276 if (!grow_sections (desktop_file)) in new_section()
284 n = desktop_file->n_sections; in new_section()
285 desktop_file->sections[n].section_name = name_copy; in new_section()
287 desktop_file->sections[n].n_lines = 0; in new_section()
288 desktop_file->sections[n].lines = NULL; in new_section()
289 desktop_file->sections[n].n_allocated_lines = 0; in new_section()
291 if (!grow_lines_in_section (&desktop_file->sections[n])) in new_section()
293 dbus_free (desktop_file->sections[n].section_name); in new_section()
294 desktop_file->sections[n].section_name = NULL; in new_section()
298 desktop_file->n_sections += 1; in new_section()
300 return &desktop_file->sections[n]; in new_section()
309 section = new_section (parser->desktop_file, name); in open_section()
313 parser->current_section = parser->desktop_file->n_sections - 1; in open_section()
314 _dbus_assert (&parser->desktop_file->sections[parser->current_section] == section); in open_section()
325 section = &parser->desktop_file->sections[parser->current_section]; in new_line()
591 section_name = parser->desktop_file->sections[parser->current_section].section_name; in report_error()
665 parser.desktop_file = dbus_new0 (BusDesktopFile, 1); in bus_desktop_file_load()
666 if (parser.desktop_file == NULL) in bus_desktop_file_load()
702 return parser.desktop_file; in bus_desktop_file_load()
706 lookup_section (BusDesktopFile *desktop_file, in lookup_section() argument
715 for (i = 0; i < desktop_file->n_sections; i ++) in lookup_section()
717 section = &desktop_file->sections[i]; in lookup_section()
727 lookup_line (BusDesktopFile *desktop_file, in lookup_line() argument
746 bus_desktop_file_get_raw (BusDesktopFile *desktop_file, in bus_desktop_file_get_raw() argument
756 section = lookup_section (desktop_file, section_name); in bus_desktop_file_get_raw()
761 line = lookup_line (desktop_file, in bus_desktop_file_get_raw()
774 bus_desktop_file_get_string (BusDesktopFile *desktop_file, in bus_desktop_file_get_string() argument
786 if (!bus_desktop_file_get_raw (desktop_file, section, keyname, &raw)) in bus_desktop_file_get_string()