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