diff --git a/schemas/linux/application.gschema.xml.in b/schemas/linux/application.gschema.xml.in index e76893e..3709103 100644 --- a/schemas/linux/application.gschema.xml.in +++ b/schemas/linux/application.gschema.xml.in @@ -38,6 +38,7 @@ The ID of the current user interface style + true Allow host settings @@ -62,6 +63,12 @@ + + true + Update default session time from command line + + + diff --git a/schemas/windows/application.gschema.xml.in b/schemas/windows/application.gschema.xml.in index 186b09a..020f073 100644 --- a/schemas/windows/application.gschema.xml.in +++ b/schemas/windows/application.gschema.xml.in @@ -38,16 +38,47 @@ The ID of the current user interface style + + 0 + GTK CSD + Gtk Client side decorations + + + true Allow host settings Allow changing of host session properties - - 0 - GTK CSD - Gtk Client side decorations + + true + Allow host settings + Allow changing of host session properties + + + + true + Enable new tab actions + Enable new tab actions + + + + true + Enable new window actions + Enable new window actions + + + + '~/.config/default.3270' + Path of the default session file + + + + + true + Update default session time from command line + diff --git a/src/objects/application/application.c b/src/objects/application/application.c index 77f5975..7aea1fd 100644 --- a/src/objects/application/application.c +++ b/src/objects/application/application.c @@ -240,6 +240,7 @@ // Bind properties if(app->settings) { + g_object_ref_sink(G_OBJECT(app->settings)); #ifdef _WIN32 @@ -296,8 +297,6 @@ } - - } g_dir_close(dir); @@ -310,7 +309,6 @@ } - } } diff --git a/src/objects/application/open.c b/src/objects/application/open.c index 0f2d912..65d3840 100644 --- a/src/objects/application/open.c +++ b/src/objects/application/open.c @@ -28,6 +28,7 @@ */ #include "private.h" + #include gchar * v3270_keyfile_find(const gchar *name) { // @@ -71,6 +72,8 @@ void pw3270_application_open(GApplication *application, GFile **files, gint n_files, const gchar G_GNUC_UNUSED(*hint)) { GtkWidget * window = GTK_WIDGET(gtk_application_get_active_window(GTK_APPLICATION(application))); + GSettings * settings = pw3270_application_get_settings(application); + gint file; debug("%s files=%d",__FUNCTION__,n_files); @@ -113,6 +116,13 @@ pw3270_application_window_new_tab(window,path); } + if(g_settings_get_boolean(settings,"update-session-file")) { + + g_message("Updating default session file to '%s'",path); + g_settings_set_string(settings,"default-session-file",path); + + } + continue; } @@ -130,6 +140,13 @@ pw3270_application_window_new_tab(window, filename); } + if(g_settings_get_boolean(settings,"update-session-file")) { + + g_message("Updating default session file to '%s'",filename); + g_settings_set_string(settings,"default-session-file",filename); + + } + continue; } -- libgit2 0.21.2