Drop trying to reconnect when e16 exits
Didn't work and we shouldn't do it anyway.
This commit is contained in:
parent
4e3f9d5955
commit
930a0059fe
|
@ -35,7 +35,4 @@ extern GtkWidget *CreateMenuItem(GtkWidget * menu, GtkAccelGroup * agrp,
|
|||
const char *szAccel, const char *szTip,
|
||||
GCallback func, const void *data);
|
||||
|
||||
/* viewer.c */
|
||||
void on_exit_application(void);
|
||||
|
||||
#endif /* E16KEYEDIT_H */
|
||||
|
|
82
ipc.c
82
ipc.c
|
@ -35,7 +35,6 @@ static Client *e_client = NULL;
|
|||
static GdkWindow *gdkwin = NULL;
|
||||
static GdkWindow *gdkwin2 = NULL;
|
||||
static void (*msg_receive_callback)(char *msg) = NULL;
|
||||
static char in_init = 0;
|
||||
static unsigned int Atom_ENL_MSG;
|
||||
|
||||
static void
|
||||
|
@ -116,25 +115,6 @@ MakeClient(Window win)
|
|||
return cl;
|
||||
}
|
||||
|
||||
static void
|
||||
ListFreeClient(Client *cl)
|
||||
{
|
||||
if (!cl)
|
||||
return;
|
||||
free(cl->msg);
|
||||
#if 0
|
||||
free(cl->name);
|
||||
free(cl->clientname);
|
||||
free(cl->version);
|
||||
free(cl->author);
|
||||
free(cl->email);
|
||||
free(cl->web);
|
||||
free(cl->address);
|
||||
free(cl->info);
|
||||
#endif
|
||||
free(cl);
|
||||
}
|
||||
|
||||
static char *
|
||||
CommsGet(XEvent *ev)
|
||||
{
|
||||
|
@ -197,67 +177,7 @@ CommsFilter(GdkXEvent *gdk_xevent, GdkEvent *event __UNUSED__,
|
|||
switch (xevent->type)
|
||||
{
|
||||
case DestroyNotify:
|
||||
if (xevent->xdestroywindow.window == comms_win)
|
||||
{
|
||||
int i;
|
||||
|
||||
comms_win = 0;
|
||||
if (!in_init)
|
||||
{
|
||||
for (i = 0; ((i < 20) && (!comms_win)); i++)
|
||||
{
|
||||
if ((comms_win = CommsFindCommsWindow()))
|
||||
{
|
||||
ListFreeClient(e_client);
|
||||
e_client = MakeClient(comms_win);
|
||||
if (gdkwin)
|
||||
g_object_unref(gdkwin);
|
||||
gdkwin = gdk_window_foreign_new(comms_win);
|
||||
gdk_window_add_filter(gdkwin, CommsFilter, NULL);
|
||||
gdk_window_set_events(gdkwin, GDK_STRUCTURE_MASK);
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
if (!comms_win)
|
||||
{
|
||||
GtkWidget *win, *frame, *vbox, *label, *button;
|
||||
|
||||
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_resizable(GTK_WINDOW(win), FALSE);
|
||||
gtk_window_set_position(GTK_WINDOW(win), GTK_WIN_POS_CENTER);
|
||||
frame = gtk_frame_new(NULL);
|
||||
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT);
|
||||
vbox = gtk_vbox_new(FALSE, 5);
|
||||
button = gtk_button_new_with_label("Bye bye!");
|
||||
g_signal_connect(G_OBJECT(button), "clicked",
|
||||
on_exit_application, NULL);
|
||||
label =
|
||||
gtk_label_new("EEEEEEEEEEEEEEK! HELP! HEEEEEEEEEELP!\n"
|
||||
"\n" "Enlightenment disappeared on me!\n"
|
||||
"\n"
|
||||
"Someone help me - I'm drowning - drowning\n"
|
||||
"\n"
|
||||
"That's it. I'm out of here. I can't deal with the\n"
|
||||
"idea of losing Enlightenment. I'm going to jump and\n"
|
||||
"don't try and stop me.\n" "\n");
|
||||
gtk_container_add(GTK_CONTAINER(win), frame);
|
||||
gtk_container_add(GTK_CONTAINER(vbox), vbox);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 32);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show_all(win);
|
||||
gtk_main();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if USE_GTK == 0 /* Needed? */
|
||||
gdk_window_destroy_notify(((GdkEventAny *) event)->window);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
exit(1);
|
||||
|
||||
case ClientMessage:
|
||||
if (xevent->xclient.message_type != Atom_ENL_MSG)
|
||||
|
|
Loading…
Reference in New Issue