Commit 4ae4ae0a88f4eba9e9eeec899bc4be74761d8a5b

Authored by Perry Werneck
1 parent c1238299
Exists in develop

Writing id of the last created session to registry.

Showing 2 changed files with 9 additions and 0 deletions   Show diff stats
.gitignore
... ... @@ -30,3 +30,5 @@ doxygen/html
30 30 *.lib
31 31 *.exp
32 32 *.pot
  33 +*~
  34 +
... ...
server/src/core/windows/start.c
... ... @@ -32,6 +32,7 @@
32 32 #include <lib3270/actions.h>
33 33 #include <lib3270/properties.h>
34 34 #include <lib3270/log.h>
  35 +#include <lib3270/win32.h>
35 36 #include <ipc-glib.h>
36 37  
37 38 void ipc3270_export_object(GObject *object, const char *name, GError G_GNUC_UNUSED(**error)) {
... ... @@ -72,6 +73,12 @@ void ipc3270_export_object(GObject *object, const char *name, GError G_GNUC_UNUS
72 73  
73 74 g_message("Got session \"%c\"",id);
74 75  
  76 + // Update registry
  77 + {
  78 + g_autofree gchar * session_name = g_strdup_printf("%s:%c",name,id);
  79 + lib3270_win32_set_string(PACKAGE_NAME,"last_session",session_name);
  80 + }
  81 +
75 82 lib3270_set_session_id(ipc->hSession, id);
76 83  
77 84 ipc->source->hPipe = hPipe;
... ...