diff --git a/ChangeLog b/ChangeLog index 8aad34b977c3468d7a7412ba12884086528f3ceb..35797322a8635b1cc8e9d9713e61feae0c1cfdbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2007-09-20 Jannis Pohlmann <jannis@xfce.org> + + * libxfce4menu/xfce-menu-monitor.c: Use g_str_hash and + g_str_equal for the file/directory to monitor handle + hash table, rather than comparing the pointers directly. + * libxfce4menu/xfce-menu.c: Create submenu monitors after + parsing by traversing the XfceMenu tree but remove them + in xfce_menu_finalize (so creating the monitors happens + in the root menu, removing is handled inside the + submenus). Now all monitors are properly removed when + the root menu is destroyed. + * tests/test-display-root-menu.c: Print the pseudo monitor + handle ID in monitor_file and monitor_directory. + 2007-09-20 Jannis Pohlmann <jannis@xfce.org> * libxfce4menu/xfce-menu-monitor.{c,h}: Added methods to diff --git a/INSTALL b/INSTALL index 095b1eb406356f57c8d90c89f53681bbb36124a7..5458714e1e2cb289572992ad92eceffc848f64d6 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -78,7 +78,7 @@ details on some of the pertinent environment variables. by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,31 +87,29 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular @@ -159,7 +157,7 @@ where SYSTEM can have one of these forms: need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -189,9 +187,14 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc -will cause the specified gcc to be used as the C compiler (unless it is +causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + `configure' Invocation ====================== diff --git a/libxfce4menu/xfce-menu-monitor.c b/libxfce4menu/xfce-menu-monitor.c index 661caf82a917d74aa1a8eefd6746a97dfd5aaaea..34b02dc23ca86c4638021868391767b4fb16ac9d 100644 --- a/libxfce4menu/xfce-menu-monitor.c +++ b/libxfce4menu/xfce-menu-monitor.c @@ -64,7 +64,7 @@ _xfce_menu_monitor_init (void) { /* Initialize hash tables */ xfce_menu_monitor_item_handles = g_hash_table_new (NULL, NULL); - xfce_menu_monitor_shared_handles = g_hash_table_new_full (NULL, NULL, g_free, g_free); + xfce_menu_monitor_shared_handles = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); } @@ -299,6 +299,7 @@ xfce_menu_monitor_remove_file (XfceMenu *menu, { SharedHandle *shared_handle; + g_return_if_fail (XFCE_IS_MENU (menu)); g_return_if_fail (filename != NULL); if (G_UNLIKELY (xfce_menu_monitor_vtable.remove_monitor == NULL)) diff --git a/libxfce4menu/xfce-menu.c b/libxfce4menu/xfce-menu.c index baf0753b5cdef1d81b2478af2735d6fbadbd5095..7efbd006ddfa1d6d2cca663e2f6ac1912fa681e0 100644 --- a/libxfce4menu/xfce-menu.c +++ b/libxfce4menu/xfce-menu.c @@ -3186,10 +3186,6 @@ xfce_menu_monitor_stop (XfceMenu *menu) g_return_if_fail (XFCE_IS_MENU (menu)); - /* Stop monitoring items in submenus */ - for (iter = menu->priv->submenus; iter != NULL; iter = g_slist_next (iter)) - xfce_menu_monitor_stop (XFCE_MENU (iter->data)); - /* Stop monitoring the items */ xfce_menu_item_pool_foreach (menu->priv->pool, (GHFunc) item_monitor_stop, menu); diff --git a/po/libxfce4menu-0.1.pot b/po/libxfce4menu-0.1.pot index 82d2a21b8941801dc803363a30bf99ecf85588f1..c0aa0fb34446a571d56c70f20df628f13b15b41f 100644 --- a/po/libxfce4menu-0.1.pot +++ b/po/libxfce4menu-0.1.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-03-23 22:37+0100\n" +"POT-Creation-Date: 2007-09-20 22:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #. Let the caller know there was no suitable file -#: ../libxfce4menu/xfce-menu.c:729 +#: ../libxfce4menu/xfce-menu.c:741 msgid "Failed to locate the application root menu" msgstr "" diff --git a/tests/test-display-menu.c b/tests/test-display-menu.c index 34067fc1eb9c1db1cfc79dac5be00fdfd72852d4..fedff2dfcd5ffdbae16e286678fb51587b455e55 100644 --- a/tests/test-display-menu.c +++ b/tests/test-display-menu.c @@ -59,8 +59,8 @@ monitor_file (XfceMenu *menu, const gchar *filename, gpointer user_data) { - g_debug ("%s: monitoring file %s", xfce_menu_element_get_name (XFCE_MENU_ELEMENT (menu)), filename); - return GUINT_TO_POINTER (++pseudo_monitor_handler); + g_debug ("%s: monitoring file %s => %d", xfce_menu_element_get_name (XFCE_MENU_ELEMENT (menu)), filename, ++pseudo_monitor_handler); + return GUINT_TO_POINTER (pseudo_monitor_handler); } @@ -70,8 +70,8 @@ monitor_directory (XfceMenu *menu, const gchar *filename, gpointer user_data) { - g_debug ("%s: monitoring directory %s", xfce_menu_element_get_name (XFCE_MENU_ELEMENT (menu)), filename); - return GUINT_TO_POINTER (++pseudo_monitor_handler); + g_debug ("%s: monitoring directory %s => %d", xfce_menu_element_get_name (XFCE_MENU_ELEMENT (menu)), filename, ++pseudo_monitor_handler); + return GUINT_TO_POINTER (pseudo_monitor_handler); }