File: | _build/../libvnck/test-selector.c |
Warning: | line 66, column 5 This statement is never executed |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* vim: set sw=2 et: */ |
2 | |
3 | #include <libvnck/libvnck.h> |
4 | #include <ctk/ctk.h> |
5 | |
6 | static gboolean skip_tasklist = FALSE(0); |
7 | |
8 | static GOptionEntry entries[] = { |
9 | /* Translators: "tasklist" is the list of running applications (the |
10 | * window list) */ |
11 | {"skip-tasklist", 's', 0, G_OPTION_ARG_NONE, &skip_tasklist, "Don't show window in tasklist", NULL((void*)0)}, |
12 | {NULL((void*)0) } |
13 | }; |
14 | |
15 | int |
16 | main (int argc, char **argv) |
17 | { |
18 | GOptionContext *ctxt; |
19 | VnckScreen *screen; |
20 | CtkWidget *win; |
21 | CtkWidget *frame; |
22 | CtkWidget *selector; |
23 | |
24 | ctxt = g_option_context_new (""); |
25 | g_option_context_add_main_entries (ctxt, entries, NULL((void*)0)); |
26 | g_option_context_add_group (ctxt, ctk_get_option_group (TRUE(!(0)))); |
27 | g_option_context_parse (ctxt, &argc, &argv, NULL((void*)0)); |
28 | g_option_context_free (ctxt); |
29 | ctxt = NULL((void*)0); |
30 | |
31 | ctk_init (&argc, &argv); |
32 | |
33 | screen = vnck_screen_get_default (); |
34 | |
35 | /* because the pager doesn't respond to signals at the moment */ |
36 | vnck_screen_force_update (screen); |
37 | |
38 | win = ctk_window_new (CTK_WINDOW_TOPLEVEL); |
39 | ctk_window_set_default_size (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ())))))), 200, 32); |
40 | ctk_window_stick (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ()))))))); |
41 | /* vnck_ctk_window_set_dock_type (CTK_WINDOW (win)); */ |
42 | |
43 | ctk_window_set_title (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ())))))), "Window Selector"); |
44 | ctk_window_set_resizable (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ())))))), TRUE(!(0))); |
45 | |
46 | /* quit on window close */ |
47 | g_signal_connect (G_OBJECT (win), "destroy",g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((win)), (((GType) ((20) << (2)))))) ))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void*)0 )), ((void*)0), (GConnectFlags) 0) |
48 | G_CALLBACK (ctk_main_quit),g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((win)), (((GType) ((20) << (2)))))) ))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void*)0 )), ((void*)0), (GConnectFlags) 0) |
49 | NULL)g_signal_connect_data ((((((GObject*) (void *) g_type_check_instance_cast ((GTypeInstance*) ((win)), (((GType) ((20) << (2)))))) ))), ("destroy"), (((GCallback) (ctk_main_quit))), (((void*)0 )), ((void*)0), (GConnectFlags) 0); |
50 | |
51 | selector = vnck_selector_new (); |
52 | |
53 | frame = ctk_frame_new (NULL((void*)0)); |
54 | ctk_frame_set_shadow_type (CTK_FRAME (frame)((((CtkFrame*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((frame)), ((ctk_frame_get_type ())))))), CTK_SHADOW_IN); |
55 | ctk_container_add (CTK_CONTAINER (win)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_container_get_type ())))))), frame); |
56 | |
57 | ctk_container_add (CTK_CONTAINER (frame)((((CtkContainer*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((frame)), ((ctk_container_get_type ())))))), selector); |
58 | |
59 | ctk_widget_show (selector); |
60 | ctk_widget_show (frame); |
61 | |
62 | ctk_window_move (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ())))))), 0, 0); |
63 | |
64 | if (skip_tasklist) |
65 | { |
66 | ctk_window_set_skip_taskbar_hint (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ())))))), TRUE(!(0))); |
This statement is never executed | |
67 | ctk_window_set_keep_above (CTK_WINDOW (win)((((CtkWindow*) (void *) g_type_check_instance_cast ((GTypeInstance *) ((win)), ((ctk_window_get_type ())))))), TRUE(!(0))); |
68 | } |
69 | |
70 | ctk_widget_show (win); |
71 | |
72 | ctk_main (); |
73 | |
74 | return 0; |
75 | } |