1. 01 Aug, 2011 2 commits
  2. 04 Mar, 2010 1 commit
  3. 22 Feb, 2010 1 commit
  4. 08 Dec, 2005 1 commit
    • Mark McLoughlin's avatar
      Add GMENU_TREE_FLAGS_INCLUDE_NODISPLAY, gmenu_tree_entry_get_nodisplay() · 56c1a3e8
      Mark McLoughlin authored
      2005-12-08  Mark McLoughlin  <mark@skynet.ie>
      
              Add GMENU_TREE_FLAGS_INCLUDE_NODISPLAY, gmenu_tree_entry_get_nodisplay()
              and gmenu_tree_directory_get_nodisplay() in order to allow fix for
              bug #323476
      
              * libmenu/gmenu-tree.[ch]:
              (gmenu_tree_directory_get_is_nodisplay),
              (gmenu_tree_entry_get_is_nodisplay): add new API
              (gmenu_tree_directory_new),
              (gmenu_tree_entry_new): add is_nodisplay flag on entries
              and directories
              (entries_listify_foreach),
              (excluded_entries_listify_foreach): set the flag here
              (process_layout): don't remove if is_nodisplay and the
              INCLUDE_NODISPLAY tree flag is set.
      
              * util/test-menu-spec.c: (main): add -n arg to allow
              testing.
      56c1a3e8
  5. 25 Jul, 2005 1 commit
    • Mark McLoughlin's avatar
      Revert some of the changes related to handling different filename · 71015097
      Mark McLoughlin authored
      2005-07-25  Mark McLoughlin  <mark@skynet.ie>
      
              Revert some of the changes related to handling different
              filename encodings.
      
              Basically, we shouldn't be trying to convert the desktop
              file ID to UTF-8 as that makes the matching process
              locale dependant.
      
              * libmenu/desktop-entries.c,
                libmenu/entry-directories.[ch],
                libmenu/gmenu-tree.c:  don't try to convert the path
              to UTF-8 in various places.
      
              * util/test-menu-spec.c: (print_entry): convert the
              desktop file ID to UTF-8 before printing as well
              as the desktop file path.
      71015097
  6. 20 Jul, 2005 1 commit
    • Mark McLoughlin's avatar
      plug a leak. · 093f83de
      Mark McLoughlin authored
      2005-07-20  Mark McLoughlin  <mark@skynet.ie>
      
      	* libmenu/menu-monitor.c: (free_event_info): plug
      	a leak.
      
      	* libmenu/entry-directories.c:
      	(cached_dir_find_file_id),
      	(entry_directory_get_desktop),
      	(entry_directory_list_get_desktop): remove some unused code.
      	It became unused when we switched to matching <Filename>s
      	against a DesktopEntrySet of all the desktop entries.
      
      2005-07-20  Mark McLoughlin  <mark@skynet.ie>
      
      	Fix things up so that we correctly handle different
      	filename encodings. Fixes bug #310939
      
      	As far as the API goes, the rule is that the return value
      	from gmenu_tree_entry_get_desktop_file_path() is in
      	the filename encoding; everything else is UTF-8
      
      	* libmenu/gmenu-tree.c: (gmenu_tree_directory_make_path):
      	Convert filename encoded basename to UTF-8 before appending
      	to returned menu path.
      
      	* libmenu/desktop-entries.c: (desktop_entry_new): don't
      	load any .desktop files whose filenames aren't in a
      	recognised encoding.
      
      	* libmenu/entry-directories.[ch]:
      	(entry_directory_new_full): convert UTF-8 path to filename
      	encoding before loading; fallback to original path if UTF-8
      	conversion fails.
      	(get_desktop_file_id_from_path): convert the filename
      	encoded path to a UTF-8 desktop-file-id
      	(entry_directory_foreach_recursive): don't pass the
      	path and file_id to the callback; use the path as
      	a file_id for .directory files.
      	(entry_directory_get_flat_contents): convert filename
      	encoded path of .directory file to UTF-8 before using as
      	a desktop-file-id.
      	(entry_directory_list_get_directory): convert UTF-8 path
      	to filename encoding; fallback to original path if conversion
      	fails.
      	(get_all_func): we don't get passed the path anymore.
      	(entry_directory_list_get_all_desktops): munge the code
      	from entry_directory_list_add() in here since it was
      	its only user.
      
      	* util/Makefile.am: define GNOMELOCALEDIR in CFLAGS.
      
      	* util/test-menu-spec.c:
      	(print_entry): convert desktop entry path to UTF-8 before
      	printing
      	(handle_tree_changed), (main): i18nize.
      093f83de
  7. 22 Apr, 2005 1 commit
    • Mark McLoughlin's avatar
      Use FAM directly instead of gnome-vfs and ensure that we only ever add a · 610d4f0b
      Mark McLoughlin authored
      2005-04-22  Mark McLoughlin  <mark@skynet.ie>
      
              Use FAM directly instead of gnome-vfs and ensure that
              we only ever add a single FAM monitor any given path.
              Should fix bug #160194.
      
              Oh, also use the FAMNoExists() extension from gamin
              if available - should cut down on a whole heap of
              FAM traffic.
      
              * configure.in: don't require gnome-vfs, check for FAM
              and FAMNoExists().
      
              * libmenu/Makefile.am: build menu-monitor.[ch] and
              link against libfam.
      
              * libmenu/menu-monitor.[ch]: add file/directory monitoring
              implementation using FAM.
      
              * libmenu/entry-directories.c,
                libmenu/gmenu-tree.c: use the internal monitoring API
              instead of gnome-vfs.
      
              * python/gmenu.c,
                util/test-menu-spec.c: (main): no need to initialize
              gnome-vfs anymore.
      
              * python/Makefile.am,
                util/Makefile.am: upd.
      610d4f0b
  8. 15 Apr, 2005 1 commit
    • Mark McLoughlin's avatar
      Fix for bug #300589 - if you've a .desktop file in the user's app dir and · 848e69a2
      Mark McLoughlin authored
      2005-04-15  Mark McLoughlin  <mark@skynet.ie>
      
              Fix for bug #300589 - if you've a .desktop file in
              the user's app dir and another in the system app dir,
              and they have a different set of categories, we'll
              match against both .desktop files when processing
              <Category>
      
              * libmenu/gmenu-tree.c:
              (get_by_category_foreach), (get_by_category): iterate
              over a DesktopEntrySet looking for entries which have
              a given category.
              (process_include_rules): take a DesktopEntrySet which
              contains the pool of desktop file IDs available, rather
              than an EntryDirectoryList.
              (process_layout): generate a pool of desktop file IDs
              for matching against.
      
              * libmenu/entry-directories.[ch]:
              (entry_directory_list_get_by_category),
              (entry_directory_list_invert_set): remove, they're unused
              now.
      
              * util/test-menu-spec.c: (print_entry): remove trailing
              space which screws over the tests in menu-spec.
      848e69a2
  9. 11 Apr, 2005 2 commits
    • Mark McLoughlin's avatar
      "Namespace" the API + menu-tree.h -> gmenu-tree.h + menu_tree_* -> · 36d242f8
      Mark McLoughlin authored
      2005-04-11  Mark McLoughlin  <mark@skynet.ie>
      
              "Namespace" the API
                + menu-tree.h -> gmenu-tree.h
                + menu_tree_* -> gmenu_tree_*
                + MenuTree* -> GMenuTree*
                + MENU_TREE_* -> GMENU_TREE_*
                + MENU_I_KNOW_THIS_IS_UNSTABLE -> GMENU_I_KNOW_THIS_IS_UNSTABLE
      
              * configure.in: upd for menu-tree.h rename.
      
              * libmenu/Makefile.am: upd for renamed files.
      
              * libmenu/gmenu-tree.[ch]: rename from menu-tree.[ch] and rename
              the APIs.
      
              * python/Makefile.am,
                python/gmenu.c: update.
      
              * util/Makefile.am,
                util/test-menu-spec.c: update.
      36d242f8
    • Mark McLoughlin's avatar
      use new form of AC_INIT - I think it cause PACKAGE_NAME and PACKAGE_VALUE · bbf888f5
      Mark McLoughlin authored
      2005-04-11  Mark McLoughlin  <mark@skynet.ie>
      
      	* configure.in: use new form of AC_INIT - I think it cause
      	PACKAGE_NAME and PACKAGE_VALUE to be defined. Add simple-editor
      	dirs.
      
      	* Makefile.am: build the simple-editor subdir if we're
      	building the python bindings.
      
      	* simple-editor/*: add gmenu-simple-editor
      
      2005-04-11  Mark McLoughlin  <mark@skynet.ie>
      
      	* libmenu/menu-tree.[ch]:
      	(menu_tree_directory_get_menu_id): new function to get the
      	menu's <Name> rather than the name from the .directory file.
      	(merge_resolved_children): improve debugging.
      	(move_children): don't reverse the order of nodes when merging
      	duplicate <Menu>s
      
      	* python/Makefile.am: install in $(pyexecdir) instead of
      	$(pythondir)
      
      	* python/gmenu.c:
      	(pygmenu_tree_directory_get_contents): return an empty list
      	instead of None when the directory is empty.
      	(pygmenu_tree_directory_get_menu_id): wrap new funcion.
      	(pygmenu_tree_directory_getattro): add "menu_id" and "contents"
      	attributes.
      	(pygmenu_tree_entry_getattro): add "is_excluded" attribute.
      	(pygmenu_tree_getattro): add "root" attribute.
      	(pygmenu_tree_wrap): set ->callbacks to NULL.
      
      	* util/test-menu-spec.c: (main): add --file option to allow
      	looking at menus other than applications.menu
      bbf888f5
  10. 06 Apr, 2005 1 commit
    • Mark McLoughlin's avatar
      Add a flags argument to menu_tree_lookup () to allow specifying that the · 8c094a5a
      Mark McLoughlin authored
      2005-04-06  Mark McLoughlin  <mark@skynet.ie>
      
              Add a flags argument to menu_tree_lookup () to allow specifying
              that the tree should include excluded items or empty submenus
      
              Also add menu_tree_entry_get_is_excluded ()
      
              Partially based on a patch from Christian Neumair <chris@gnome-de.org>
              in bug #168526
      
              * libmenu/Makefile.am: correctly pass the version info to libtool
              and also specify an export-symbols regex.
      
              * libmenu/menu-tree.[ch]:
              (get_cache_key), (menu_tree_add_to_cache),
              (menu_tree_remove_from_cache), (menu_tree_lookup_from_cache),
              (menu_tree_lookup_absolute), (menu_tree_lookup_basename): include
              the flags in the menu tree cache key.
              (menu_tree_lookup): add a "flags" argument.
              (menu_tree_entry_get_is_excluded): new function.
              (process_layout): include excluded entries in the entries list
              if the "include excluded" flag is set.
              (merge_subdir): include empty submenus if the "show empty" flag
              is set.
      
              * python/gmenu.c: add support for the new API.
      
              * util/test-menu-spec.c: add a --include-excluded option.
      8c094a5a
  11. 23 Mar, 2005 1 commit
    • Mark McLoughlin's avatar
      Merge from layout-support branch: · 236f57f9
      Mark McLoughlin authored
      2005-03-23  Mark McLoughlin  <mark@skynet.ie>
      
      	* python/Makefile.am: don't build with $(WARN_CFLAGS)
      
      2005-03-23  Mark McLoughlin  <mark@skynet.ie>
      
      	* libmenu/menu-layout.c: (menu_layout_values_set): fix silly
      	crasher.
      
      	* libmenu/menu-tree.c:
      	(merge_subdir), (merge_subdir_by_name),
      	(merge_entry), (merge_entry_by_id), (merge_subdirs),
      	(merge_entries), (process_layout_info): adding debugging
      	verbosity.
      	(merge_subdirs_and_entries): ditto and fix thinko causing
      	warnings.
      
      2005-03-15  Mark McLoughlin  <mark@skynet.ie>
      
      	Implement the last bits of the python binding.
      
      	* python/gmenu.pyx:
      	Include definition for g_free()
      	Implement Directory.make_path ()
      	Add MonitorCallback class to encapsulate a python
      	callback, user data and menu tree
      	Implement Tree.add_monitor() and Tree.remove_montor()
      
      2005-03-15  Mark McLoughlin  <mark@skynet.ie>
      
      	Add python bindings. Mostly complete, but still need
      	to finish wraping:
      	  - menu_tree_directory_make_path ()
      	  - menu_tree_add_monitor ()
      	  - menu_tree_remove_monitor ()
      
      	* configure.in, acinclude.m4: add python checks, copied
      	from dbus.
      
      	* Makefile.am: build the python subdir.
      
      	* python/Makefile.am: again copied from dbus.
      
      	* python/gmenu.pyx: Pyrex wrapping of the API.
      
      2005-03-15  Mark McLoughlin  <mark@skynet.ie>
      
      	* libmenu/menu-tree.h:
      	(menu_tree_entry_get_parent): remove.
      
      2005-03-14  Mark McLoughlin  <mark@skynet.ie>
      
      	Implement support for <Layout> and <DefaultLayout>.
      
      	Based on a patch from Frederic Crozat <fcrozat@mandrakesoft.com>
      	in bug #164310.
      
      	* libmenu/menu-tree.h: API changes:
      	  - Add MenuTreeItem type as base class of other items
      	  - Make MenuTreeEntry and MenuTreeDirectory its sub-classes
      	  - Add MenuTreeSeparator, MenuTreeAlias and MenuTreeHeader
      	  - menu_tree_entry_ref/unref() becomes menu_tree_item_ref/unref()
      	  - ditto for menu_tree_directory_ref/unref()
      	  - Instead of having menu_tree_directory_get_entries() and
      	    menu_tree_directory_get_subdirs, we now have
      	    menu_tree_directory_get_contents()
      	  - menu_tree_directory/entry_get_parent() becomes
      	    menu_tree_item_get_parent()
      	  - Add menu_tree_header_get_directory (), menu_tree_alias_get_directory()
      	    and menu_tree_alias_get_item ()
      
      	* libmenu/menu-tree.c:
      	(find_path): look up the path from the laid out contents.
      	(menu_tree_item_compare): add compare function for sorting
      	directories and entries as peers.
      	(collect_layout_info): retain the contents of the last <Layout>
      	node we come across for each <Menu>
      	(process_layout): retain the attributes of the last <DefaultLayout>
      	node we come across for each <Menu>.
      	(process_only_unallocated): don't prune empty subdirs here.
      	(merge_subdir), (merge_subdir_by_name),
      	(merge_entry), (merge_entry_by_id), (merge_subdirs),
      	(merge_entries), (merge_subdirs_and_entries): various helpers
      	to implement <Merge type="all|files|menus"> and merging by
      	<Filename>/<Menuname>
      	(get_values_with_defaults): get the <Layout> attributes from
      	a node, using the values from the <DefaultLayout> for any unset
      	attribute.
      	(process_layout_info): implement the final post-processing of
      	the menu where the list of entries and subdirs gets laid out
      	and merged according to <Layout> and <DefaultLayout>
      
      	* libmenu/menu-layout.[ch]:
      	(menu_layout_node_new): allocate DefaultLayout, Layout and
      	Menuname structures.
      	(menu_layout_node_copy): remove, unused.
      	(menu_layout_node_legacy_dir_set_prefix): remove string compare
      	by pointer.
      	(menu_layout_node_merge_get_type),
      	(menu_layout_node_merge_set_type),
      	(menu_layout_node_default_layout_get_values),
      	(menu_layout_node_menuname_get_values),
      	(menu_layout_values_set),
      	(menu_layout_node_default_layout_set_values):
      	(menu_layout_node_menuname_set_values):  support setting/getting
      	the various attributes on <DefaultLayout>, <Layout> and <Menuname>
      	(start_menu_child_element),
      	(start_layout_child_element): set the attributes.
      
      	* util/test-menu-spec.c:
      	(append_directory_path), (print_entry),	(print_directory),
      	(handle_tree_changed), (main): adapt to API changes.
      236f57f9
  12. 18 Feb, 2005 2 commits
    • Mark McLoughlin's avatar
      split out from handle_cached_dir_changed() and invoke monitors on · d18257ed
      Mark McLoughlin authored
      2005-02-18  Mark McLoughlin  <mark@skynet.ie>
      
              * libmenu/entry-directories.c:
              (cached_dir_invoke_monitors): split out from
              handle_cached_dir_changed() and invoke monitors on
              ancestors too. Fixes bug #167759.
              (handle_cached_dir_changed): upd.
      
              * util/test-menu-spec.c: add a --monitor option
              to test monitoring.
      d18257ed
    • Mark McLoughlin's avatar
      Make us pass most of the spec tests again. · adc2e1a8
      Mark McLoughlin authored
      2005-02-18  Mark McLoughlin  <mark@skynet.ie>
      
              Make us pass most of the spec tests again.
      
              * util/test-menu-spec.c:
              (append_directory_path), (make_path): add a variant
              of menu_tree_directory_make_path() - difference is
              we use the directory name from the directory entry
              if available. We don't want to do that in
              menu_tree_directory_make_path() because that would
              make the path locale dependant.
              (print_directory): use it here.
      adc2e1a8
  13. 09 Nov, 2004 1 commit