Author: jannis
Date: 2007-01-14 14:47:57 +0000 (Sun, 14 Jan 2007)
New Revision: 24445
Modified:
libfrap/trunk/libfrap/appfinder/ChangeLog
libfrap/trunk/libfrap/appfinder/appfinder.c
Log:
* appfinder.c: Make use of the GError support which has been
added to FrapMenu.
Modified: libfrap/trunk/libfrap/appfinder/ChangeLog
===================================================================
--- libfrap/trunk/libfrap/appfinder/ChangeLog 2007-01-14 14:47:00 UTC (rev
24444)
+++ libfrap/trunk/libfrap/appfinder/ChangeLog 2007-01-14 14:47:57 UTC (rev
24445)
@@ -1,3 +1,8 @@
+2007-01-14 Jannis Pohlmann <[EMAIL PROTECTED]>
+
+ * appfinder.c: Make use of the GError support which has been
+ added to FrapMenu.
+
2006-08-02 Jannis Pohlmann <[EMAIL PROTECTED]>
* Initial import into libfrap.
Modified: libfrap/trunk/libfrap/appfinder/appfinder.c
===================================================================
--- libfrap/trunk/libfrap/appfinder/appfinder.c 2007-01-14 14:47:00 UTC (rev
24444)
+++ libfrap/trunk/libfrap/appfinder/appfinder.c 2007-01-14 14:47:57 UTC (rev
24445)
@@ -27,6 +27,10 @@
#include <stdlib.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <gtk/gtk.h>
#include <libxfcegui4/libxfcegui4.h>
@@ -37,19 +41,29 @@
int main (int argc,
gchar **argv)
{
- FrapMenu *root;
+ GError *error = NULL;
+ FrapMenu *root = NULL;
+ gint exit_code = EXIT_SUCCESS;
/* Initialize the frap menu library */
frap_menu_init ();
/* Get a pointer to the root menu */
- root = frap_menu_get_root ();
+ root = frap_menu_get_root (&error);
- /* Print root menu name (just temporarily here for testing) */
- g_debug ("Root menu name: %s", frap_menu_get_name (root));
+ if (G_LIKELY (root != NULL))
+ {
+ /* 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);
+ /* Drop reference on the root menu */
+ g_object_unref (root);
+ }
+ else
+ {
+ g_error (error->message);
+ exit_code = EXIT_FAILURE;
+ }
/* Shutdown the frap menu library */
frap_menu_shutdown ();
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits