| 73 |
/* =================================================================== */ |
/* =================================================================== */ |
| 74 |
|
|
| 75 |
DuiWindow * |
DuiWindow * |
| 76 |
dui_gtk_top_find_window_by_name (DuiGtkTop *top, const char * name) |
dui_gtk_top_find_window_by_name (DuiGtkTop *top, const gchar * name) |
| 77 |
{ |
{ |
| 78 |
GList *node; |
GList *node; |
| 79 |
|
|
| 82 |
for (node=top->window_list; node; node=node->next) |
for (node=top->window_list; node; node=node->next) |
| 83 |
{ |
{ |
| 84 |
DuiWindow *win = node->data; |
DuiWindow *win = node->data; |
| 85 |
const char *winname = dui_window_get_name (win); |
const gchar *winname = dui_window_get_name (win); |
| 86 |
if (winname && !strcmp(winname, name)) |
if (winname && !strcmp(winname, name)) |
| 87 |
{ |
{ |
| 88 |
return win; |
return win; |
| 93 |
|
|
| 94 |
/* =================================================================== */ |
/* =================================================================== */ |
| 95 |
|
|
| 96 |
static void |
static gboolean |
| 97 |
dui_gtk_top_realize (gpointer self, gboolean fatal_if_no_main) |
dui_gtk_top_realize (gpointer self, gboolean fatal_if_no_main) |
| 98 |
{ |
{ |
| 99 |
DuiGtkTop *top = self; |
DuiGtkTop *top = self; |
| 117 |
} |
} |
| 118 |
} |
} |
| 119 |
|
|
| 120 |
/* Without this test, its just to easy to write a dwi file |
/* Without this test, its just too easy to write an estron file |
| 121 |
* that just hangs there, doing nothing, and you scratch your |
* that just hangs there, doing nothing, and you scratch your |
| 122 |
* head wondering why ... |
* head wondering why ... |
| 123 |
*/ |
*/ |
| 124 |
|
/** @bug it is still too easy to hang estron with a |
| 125 |
|
flawed estron file, despite passing TRUE to dui_interface_realize, |
| 126 |
|
typically after this point. Check why. */ |
| 127 |
if (fatal_if_no_main && 0 == found_app_window) |
if (fatal_if_no_main && 0 == found_app_window) |
| 128 |
{ |
{ |
| 129 |
FATAL ("could not find an application main window!"); |
// fatal causes an abort which causes a crash detection dialogue. |
| 130 |
|
PWARN ("could not find an application main window!"); |
| 131 |
|
return FALSE; |
| 132 |
} |
} |
| 133 |
|
return TRUE; |
| 134 |
} |
} |
| 135 |
|
|
| 136 |
/* =================================================================== */ |
/* =================================================================== */ |