Author: jannis
Date: 2006-08-01 22:21:26 +0000 (Tue, 01 Aug 2006)
New Revision: 22617
Added:
libfrap/trunk/libfrap/appfinder/
libfrap/trunk/libfrap/appfinder/ChangeLog
libfrap/trunk/libfrap/appfinder/Makefile.am
libfrap/trunk/libfrap/appfinder/README
libfrap/trunk/libfrap/appfinder/appfinder.c
libfrap/trunk/libfrap/menu/STATUS
Modified:
libfrap/trunk/ChangeLog
libfrap/trunk/configure.in.in
libfrap/trunk/libfrap/Makefile.am
libfrap/trunk/libfrap/menu/Makefile.am
libfrap/trunk/libfrap/menu/README
libfrap/trunk/libfrap/menu/frap-menu.c
Log:
* configure.in.in: Added libxfcegui4 to the dependencies.
* configure.in.in, libfrap/Makefile.am, libfrap/appfinder/: Import
FrapAppfinder program (just an almost empty program at the moment)
which is intended to be a replacement for the current appfinder one
day. It depends on libfrap/menu/.
* libfrap/menu/STATUS, libfrap/menu/Makefile.am: Implementation status
file (STATUS) added to libfrap/menu/.
Modified: libfrap/trunk/ChangeLog
===================================================================
--- libfrap/trunk/ChangeLog 2006-08-01 21:36:48 UTC (rev 22616)
+++ libfrap/trunk/ChangeLog 2006-08-01 22:21:26 UTC (rev 22617)
@@ -1,3 +1,13 @@
+2006-08-02 Jannis Pohlmann <[EMAIL PROTECTED]>
+
+ * configure.in.in: Added libxfcegui4 to the dependencies.
+ * configure.in.in, libfrap/Makefile.am, libfrap/appfinder/: Import
+ FrapAppfinder program (just an almost empty program at the moment)
+ which is intended to be a replacement for the current appfinder one
+ day. It depends on libfrap/menu/.
+ * libfrap/menu/STATUS, libfrap/menu/Makefile.am: Implementation status
+ file (STATUS) added to libfrap/menu/.
+
2006-08-01 Benedikt Meurer <[EMAIL PROTECTED]>
* AUTHORS, COPYING, INSTALL, Makefile.am, autogen.sh, configure.in.in:
Modified: libfrap/trunk/configure.in.in
===================================================================
--- libfrap/trunk/configure.in.in 2006-08-01 21:36:48 UTC (rev 22616)
+++ libfrap/trunk/configure.in.in 2006-08-01 22:21:26 UTC (rev 22617)
@@ -72,6 +72,7 @@
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.6.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.90.2])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.90.2])
dnl ***********************************
dnl *** Check for debugging support ***
@@ -119,4 +120,5 @@
libfrap/Makefile
libfrap/icon-entry/Makefile
libfrap/menu/Makefile
+libfrap/appfinder/Makefile
])
Modified: libfrap/trunk/libfrap/Makefile.am
===================================================================
--- libfrap/trunk/libfrap/Makefile.am 2006-08-01 21:36:48 UTC (rev 22616)
+++ libfrap/trunk/libfrap/Makefile.am 2006-08-01 22:21:26 UTC (rev 22617)
@@ -2,6 +2,7 @@
SUBDIRS = \
icon-entry \
- menu
+ menu \
+ appfinder
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Added: libfrap/trunk/libfrap/appfinder/ChangeLog
===================================================================
--- libfrap/trunk/libfrap/appfinder/ChangeLog (rev 0)
+++ libfrap/trunk/libfrap/appfinder/ChangeLog 2006-08-01 22:21:26 UTC (rev
22617)
@@ -0,0 +1,5 @@
+2006-08-02 Jannis Pohlmann <[EMAIL PROTECTED]>
+
+ * Initial import into libfrap.
+
+# vi:set ts=8 sw=8 noet ai nocindent:
Property changes on: libfrap/trunk/libfrap/appfinder/ChangeLog
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Added: libfrap/trunk/libfrap/appfinder/Makefile.am
===================================================================
--- libfrap/trunk/libfrap/appfinder/Makefile.am (rev 0)
+++ libfrap/trunk/libfrap/appfinder/Makefile.am 2006-08-01 22:21:26 UTC (rev
22617)
@@ -0,0 +1,30 @@
+# $Id$
+
+INCLUDES = \
+ -DG_LOG_DOMAIN=\"FrapAppfinder\" \
+ -I$(top_builddir)/libfrap/menu/
+
+
+noinst_PROGRAMS = \
+ appfinder
+
+appfinder_CFLAGS = \
+ $(GTK_CFLAGS) \
+ $(LIBXFCEGUI4_CFLAGS)
+
+appfinder_SOURCES = \
+ appfinder.c
+
+appfinder_LDFLAGS = \
+ $(top_builddir)/libfrap/menu/libfrapmenu.la \
+ $(GTK_LIBS) \
+ $(LIBXFCEGUI4_LIBS)
+
+appfinder_DEPENDENCIES = \
+ $(top_builddir)/libfrap/menu/libfrapmenu.la
+
+
+EXTRA_DIST = \
+ README
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Property changes on: libfrap/trunk/libfrap/appfinder/Makefile.am
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Added: libfrap/trunk/libfrap/appfinder/README
===================================================================
--- libfrap/trunk/libfrap/appfinder/README (rev 0)
+++ libfrap/trunk/libfrap/appfinder/README 2006-08-01 22:21:26 UTC (rev
22617)
@@ -0,0 +1,50 @@
+appfinder
+========================================================================
+
+ I. Module information
+ II. How to use this module
+
+
+
+I. Module information
+=====================
+
+ appfinder is a replacement for the current xfce4-appfinder. It makes
+ use of libfrapmenu, which currently is in development.
+
+ Besides providing the same features as the current appfinder does
+ (displaying applications in categories, dragging applications into
+ panel starter dialogs) it will probably act as a kind of simplified
+ menu editor in that it will allow:
+
+ - to hide/show applications (in a XDG menu spec compliant way)
+ - to add new categories and applications (also XDG menu compliant)
+
+ Other possible features include:
+
+ - to edit/unedit application entries (and thus, create copies in the
+ home directory)
+
+ Until these features are implemented, it should only be considered a
+ simple test program for the application entry database of libfrapmenu.
+
+
+
+II. How to use this module
+==========================
+
+ This module only contains one program marked with "noinst". If you
+ really want to install this program into your system, you'll have to
+ check out libfrap completely and do
+
+ sed -i -e 's/noinst_//g' libfrap/appfinder/Makefile.am
+
+ before running ./autogen.sh and building it. This will hard-link
+ appfinder to the libfrapmenu library and will also install it into
+ your system.
+
+
+
+Written by Jannis Pohlmann <[EMAIL PROTECTED]>.
+
+$Id$
Property changes on: libfrap/trunk/libfrap/appfinder/README
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Added: libfrap/trunk/libfrap/appfinder/appfinder.c
===================================================================
--- libfrap/trunk/libfrap/appfinder/appfinder.c (rev 0)
+++ libfrap/trunk/libfrap/appfinder/appfinder.c 2006-08-01 22:21:26 UTC (rev
22617)
@@ -0,0 +1,58 @@
+/* $Id$ */
+/* vi:set expandtab sw=2 sts=2: */
+/*-
+ * Copyright (c) 2006 Jannis Pohlmann <[EMAIL PROTECTED]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include <libxfcegui4/libxfcegui4.h>
+
+#include <libfrapmenu.h>
+
+
+int main (int argc,
+ gchar **argv)
+{
+ FrapMenu *root;
+
+ /* Initialize the frap menu library */
+ frap_menu_init ();
+
+ /* Get a pointer to the root menu */
+ root = frap_menu_get_root ();
+
+ /* Print root menu name (just temporarily here for testing) */
+ g_debug ("Root menu name: %s", frap_menu_get_name (root));
+
+ /* Drop reference on the root menu */
+ g_object_unref (root);
+
+ /* Shutdown the frap menu library */
+ frap_menu_shutdown ();
+
+ return EXIT_SUCCESS;
+}
Property changes on: libfrap/trunk/libfrap/appfinder/appfinder.c
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Modified: libfrap/trunk/libfrap/menu/Makefile.am
===================================================================
--- libfrap/trunk/libfrap/menu/Makefile.am 2006-08-01 21:36:48 UTC (rev
22616)
+++ libfrap/trunk/libfrap/menu/Makefile.am 2006-08-01 22:21:26 UTC (rev
22617)
@@ -15,14 +15,17 @@
$(GLIB_CFLAGS) \
$(GTHREAD_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
- -DLIBFRAPMENU_COMPILATION
+ -DLIBFRAPMENU_COMPILATION \
+ -DG_LOG_DOMAIN=\"FrapMenu\"
LIBS =
\
$(GLIB_LIBS) \
$(GTHREAD_LIBS) \
$(LIBXFCE4UTIL_LIBS)
+
EXTRA_DIST = \
- README
+ README \
+ STATUS
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
Modified: libfrap/trunk/libfrap/menu/README
===================================================================
--- libfrap/trunk/libfrap/menu/README 2006-08-01 21:36:48 UTC (rev 22616)
+++ libfrap/trunk/libfrap/menu/README 2006-08-01 22:21:26 UTC (rev 22617)
@@ -1,8 +1,46 @@
FrapMenu
========
-TODO Add documentation here.
+ I. Module information
+ II. How to use this module
+
+
+I. Module information
+=====================
+
+ libfrapmenu is an implementation of the XDG menu specification which
+ can be found on
+
+ http://standards.freedesktop.org/menu-spec/latest/
+
+ This specification contains rules for searching, parsing, merging and
+ displaying menu files. As a side-effect it implies an application
+ desktop entry database which can be used by other programs such as
+ file managers to determine applications for certain MIME types.
+
+ libfrapmenu consists (or better: will consist) of a GObject class
+ structure providing all necessary features for displaying menus and
+ querying the MIME database.
+
+
+ i. Dependencies
+ ===============
+
+ libfrapmenu depends on the following libraries and tools:
+
+ GLib/GObject >= 2.x
+ libxfce4util >= 4.3.90.2
+
+
+
+II. How to use this module
+==========================
+
+ TODO: Add update-from-frap.sh code snippet and linking information
+ here.
+
+
Written by Jannis Pohlmann <[EMAIL PROTECTED]>.
$Id$
Property changes on: libfrap/trunk/libfrap/menu/README
___________________________________________________________________
Name: svn:keywords
- Author Date Id Rev
+ Id Author Date Revision
Added: libfrap/trunk/libfrap/menu/STATUS
===================================================================
--- libfrap/trunk/libfrap/menu/STATUS (rev 0)
+++ libfrap/trunk/libfrap/menu/STATUS 2006-08-01 22:21:26 UTC (rev 22617)
@@ -0,0 +1,124 @@
+XDG menu specificatiom implementation status
+=======================================================================
+
+ I. Menu file elements
+ II. Filesystem monitoring
+ III. UI interaction
+
+
+
+I. Menu file elements
+=====================
+
+ [x] <Menu>
+
+ [x] <AppDir>
+
+ [x] <DefaultAppDirs>
+
+ [x] <DirectoryDir>
+
+ [x] <DefaultDirectoryDirs>
+
+ [-] <Name>
+ The <Name> is parsed and implemented as a property of XfceMenu
+ but there are no functions yet to parse menu paths, such as
+ "/Applications/Graphics".
+
+ [x] <Directory>
+
+ [x] <OnlyUnallocated> and <NotOnlyUnallocated>
+
+ [x] <Deleted> and <NotDeleted>
+
+ [ ] <Include>
+
+ TODO: Recursively load elements (using a stack).
+
+ Recursion scheme (only recurse on and/or/not elements):
+
+ and|or|not
+ and|or|not
+ and|or|not
+ ...
+ category|filename
+ category|filename
+
+ [ ] <Exclude>
+
+ [ ] <Filename>
+
+ [ ] <Category>
+
+ [ ] <All>
+
+ [ ] <And>
+
+ [ ] <Or>
+
+ [ ] <Not>
+
+ [ ] <MergeFile>
+
+ [ ] <MergeDir>
+
+ [ ] <DefaultMergeDirs>
+
+ [-] <LegacyDir>
+
+ <LegacyDir> elements are parsed into a string list, but there is
+ no further parsing or merging performed afterwards - not yet.
+
+ [-] <DefaultLegacyDirs>
+
+ See <LegacyDir>
+
+ [-] <KDELegacyDirs>
+
+ See <LegacyDir>
+
+ [ ] <Move>
+
+ [ ] <Old>
+
+ [ ] <New>
+
+ [ ] <Layout>
+
+ [ ] <DefaultLayout>
+
+ [ ] <Menuname>
+
+ [ ] <Separator>
+
+ [ ] <Merge>
+
+
+
+II. Filesystem monitoring
+=========================
+
+ With a proper GObject structure for all classes (XfceMenu,
+ XfceMenuDirectory, XfceMenuItem etc.) reloading objects independently
+ of each other should be no problem.
+
+ The only question is how monitoring should be done. Perhaps we can
+ copy parts of ThunarVFS for this (as using ThunarVFS would only be
+ possible if Thunar wouldn't use libxfce4menu).
+
+ So, unless there is a better method, FAM/Gamin would be used for
+ monitoring files and directories.
+
+
+
+III. UI interaction
+===================
+
+ Using GObject signals it should be easy to connect to menus and
+ menu items in order to update the related widgets.
+
+
+
+Written by Jannis Pohlmann <[EMAIL PROTECTED]>.
+
+$Id$
Property changes on: libfrap/trunk/libfrap/menu/STATUS
___________________________________________________________________
Name: svn:keywords
+ Id Author Date Revision
Modified: libfrap/trunk/libfrap/menu/frap-menu.c
===================================================================
--- libfrap/trunk/libfrap/menu/frap-menu.c 2006-08-01 21:36:48 UTC (rev
22616)
+++ libfrap/trunk/libfrap/menu/frap-menu.c 2006-08-01 22:21:26 UTC (rev
22617)
@@ -488,11 +488,22 @@
}
-
+/**
+ * frap_menu_get_root:
+ *
+ * Returns a pointer to the system root menu. If the root menu is not in memory
+ * already, it is loaded from disk, which may take some time as it involves
+ * parsing and merging a lot of files. So if you call this function from a GUI
+ * program it should be done in a way that won't block the user interface (e.g.
+ * by using a worker thread).
+ * The returned pointer needs to be unref'd when it is not used anymore.
+ *
+ * Return value: Pointer to the system root menu. This pointer needs to be
+ * unref'd later.
+ **/
FrapMenu*
frap_menu_get_root (void)
{
- /* TODO how would this need to be free'd later? */
static FrapMenu *root_menu = NULL;
if (G_UNLIKELY (root_menu == NULL))
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits