1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * $Id: main.c,v 1.3 2004/05/21 23:43:38 nedko Exp $
12 *****************************************************************************/
19 #include "../result.h"
20 #include "../libdb/libdb.h"
21 #include "../libfrontend/conf.h"
22 #include "../libfrontend/db.h"
23 #include "../libfrontend/disk.h"
24 #include "../libfrontend/error.h"
27 const char *pszPathToExecutable
;
28 GtkWidget
*pMainWindow
= NULL
;
39 mediadb_error_callback(
40 unsigned int nCritical
,
41 const char *pszErrorDescription
46 g_warning("%s\n", pszErrorDescription
);
48 pDialog
= gtk_message_dialog_new(
49 GTK_WINDOW(pMainWindow
),
50 GTK_DIALOG_DESTROY_WITH_PARENT
,
55 gtk_dialog_run(GTK_DIALOG(pDialog
));
56 gtk_widget_destroy(pDialog
);
58 if (nCritical
== MEDIADB_ERROR_CRITICAL
)
72 gtk_init(&argc
, &argv
);
74 /* FIXME: pszPathToExecutable calculation is ugly workaround */
75 pszExecutable
= strrchr(argv
[0], '/');
77 if (pszExecutable
== NULL
)
79 pszExecutable
= argv
[0];
80 pszPathToExecutable
= "";
86 pszPathToExecutable
= argv
[0];
89 /* Look into configuration file */
97 pMainWindow
= CreateMediasWindow();
108 /*****************************************************************************
112 * !!! WARNING !!! Following lines are automatically updated by the CVS system.
115 * Revision 1.3 2004/05/21 23:43:38 nedko
116 * Implement media window.
118 * Revision 1.2 2004/05/16 20:19:08 nedko
119 * Display MessageDialog on error.
120 * Detect row activation within media list.
121 * Set sane default windows size.
123 * Revision 1.1 2004/05/16 19:05:38 nedko
124 * Initial revision of the gtk frontend.
126 *****************************************************************************/