Revert "link mute/volumeup/volumedown keys to respective amixer commands"
[notion/jeffpc.git] / mod_query / fwarn.c
blob54ad1ab8a526217f62c2fdef4fced7e22efcc2b6
1 /*
2 * ion/mod_query/query.c
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
10 #include <ioncore/common.h>
11 #include <ioncore/global.h>
12 #include <ioncore/focus.h>
13 #include <ioncore/frame.h>
14 #include <ioncore/stacking.h>
15 #include <libtu/objp.h>
16 #include "wmessage.h"
17 #include "fwarn.h"
20 /*(internal) EXTL_DOC
21 * Display an error message box in the multiplexer \var{mplex}.
23 EXTL_EXPORT
24 WMessage *mod_query_do_warn(WMPlex *mplex, const char *p)
26 char *p2;
27 WMessage *wmsg;
29 if(p==NULL)
30 return NULL;
32 p2=scat(TR("Error:\n"), p);
34 if(p2==NULL)
35 return NULL;
37 wmsg=mod_query_do_message(mplex, p2);
39 free(p2);
41 return wmsg;
45 /*(internal) EXTL_DOC
46 * Display a message in the \var{mplex}.
48 EXTL_EXPORT
49 WMessage *mod_query_do_message(WMPlex *mplex, const char *p)
51 WMPlexAttachParams par;
53 if(p==NULL)
54 return NULL;
56 par.flags=(MPLEX_ATTACH_SWITCHTO|
57 MPLEX_ATTACH_LEVEL|
58 MPLEX_ATTACH_UNNUMBERED|
59 MPLEX_ATTACH_SIZEPOLICY);
60 par.szplcy=SIZEPOLICY_FULL_BOUNDS;
61 par.level=STACKING_LEVEL_MODAL1+2;
63 return (WMessage*)mplex_do_attach_new(mplex, &par,
64 (WRegionCreateFn*)create_wmsg,
65 (void*)p);