Commit 01c9a748ac126c5ae7a71094b99a17f963064354
1 parent
2ebec433
Exists in
master
and in
2 other branches
Visual adjustment on 'save shortcut' dialog
Fixing package build.
Showing
4 changed files
with
18 additions
and
2 deletions
Show diff stats
src/include/v3270/keyfile.h
@@ -47,6 +47,7 @@ | @@ -47,6 +47,7 @@ | ||
47 | 47 | ||
48 | V3270KeyFile * v3270_key_file_open(GtkWidget *terminal, const gchar *name, GError **error); | 48 | V3270KeyFile * v3270_key_file_open(GtkWidget *terminal, const gchar *name, GError **error); |
49 | void v3270_key_file_close(GtkWidget *terminal); | 49 | void v3270_key_file_close(GtkWidget *terminal); |
50 | + | ||
50 | void v3270_key_file_save(GtkWidget *terminal, GError **error); | 51 | void v3270_key_file_save(GtkWidget *terminal, GError **error); |
51 | void v3270_key_file_save_to_file(GtkWidget * terminal, const gchar *filename, GError **error); | 52 | void v3270_key_file_save_to_file(GtkWidget * terminal, const gchar *filename, GError **error); |
52 | 53 |
src/objects/os/linux/savedesktopicon.c
@@ -233,6 +233,17 @@ X-Desktop-File-Install-Version=0.23 | @@ -233,6 +233,17 @@ X-Desktop-File-Install-Version=0.23 | ||
233 | // 1 = Shortcut filename | 233 | // 1 = Shortcut filename |
234 | gtk_entry_set_text(GTK_ENTRY(inputs[1]),filename); | 234 | gtk_entry_set_text(GTK_ENTRY(inputs[1]),filename); |
235 | 235 | ||
236 | + // 2 = Session name | ||
237 | + { | ||
238 | + gtk_widget_set_margin_top(GTK_WIDGET(inputs[2]),12); | ||
239 | + | ||
240 | + const gchar * session_name = v3270_get_session_name(terminal); | ||
241 | + | ||
242 | + if(strcmp(session_name,G_STRINGIFY(PRODUCT_NAME))) | ||
243 | + gtk_entry_set_text(GTK_ENTRY(inputs[2]),session_name); | ||
244 | + | ||
245 | + } | ||
246 | + | ||
236 | // 3 = Session filename | 247 | // 3 = Session filename |
237 | { | 248 | { |
238 | g_autofree gchar * session_filename = get_filename(terminal); | 249 | g_autofree gchar * session_filename = get_filename(terminal); |
@@ -240,6 +251,7 @@ X-Desktop-File-Install-Version=0.23 | @@ -240,6 +251,7 @@ X-Desktop-File-Install-Version=0.23 | ||
240 | } | 251 | } |
241 | 252 | ||
242 | // 4 = Generic name | 253 | // 4 = Generic name |
254 | + gtk_widget_set_margin_top(GTK_WIDGET(inputs[4]),12); | ||
243 | gtk_entry_set_placeholder_text(GTK_ENTRY(inputs[4]),v3270_get_url(terminal)); | 255 | gtk_entry_set_placeholder_text(GTK_ENTRY(inputs[4]),v3270_get_url(terminal)); |
244 | gtk_entry_set_text(GTK_ENTRY(inputs[4]),v3270_get_url(terminal)); | 256 | gtk_entry_set_text(GTK_ENTRY(inputs[4]),v3270_get_url(terminal)); |
245 | gtk_entry_set_input_hints(GTK_ENTRY(inputs[4]),GTK_INPUT_HINT_SPELLCHECK); | 257 | gtk_entry_set_input_hints(GTK_ENTRY(inputs[4]),GTK_INPUT_HINT_SPELLCHECK); |
src/objects/window/keyfile.c
@@ -191,7 +191,7 @@ void v3270_key_file_close(GtkWidget *terminal) { | @@ -191,7 +191,7 @@ void v3270_key_file_close(GtkWidget *terminal) { | ||
191 | 191 | ||
192 | void v3270_key_file_save_to_file(GtkWidget * terminal, const gchar *filename, GError **error) { | 192 | void v3270_key_file_save_to_file(GtkWidget * terminal, const gchar *filename, GError **error) { |
193 | 193 | ||
194 | - if(*error) | 194 | + if(error && *error) |
195 | return; | 195 | return; |
196 | 196 | ||
197 | V3270KeyFile * new_session = (V3270KeyFile *) g_malloc0(sizeof(struct _V3270KeyFile) + strlen(filename)); | 197 | V3270KeyFile * new_session = (V3270KeyFile *) g_malloc0(sizeof(struct _V3270KeyFile) + strlen(filename)); |
@@ -211,6 +211,9 @@ void v3270_key_file_close(GtkWidget *terminal) { | @@ -211,6 +211,9 @@ void v3270_key_file_close(GtkWidget *terminal) { | ||
211 | 211 | ||
212 | void v3270_key_file_save(GtkWidget *terminal, GError **error) { | 212 | void v3270_key_file_save(GtkWidget *terminal, GError **error) { |
213 | 213 | ||
214 | + if(error && *error) | ||
215 | + return; | ||
216 | + | ||
214 | V3270KeyFile *session = v3270_get_session_descriptor(terminal); | 217 | V3270KeyFile *session = v3270_get_session_descriptor(terminal); |
215 | 218 | ||
216 | session->changed = FALSE; | 219 | session->changed = FALSE; |
src/objects/window/terminal.c
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | } | 54 | } |
55 | 55 | ||
56 | static void save_settings(GtkWidget *terminal, gpointer G_GNUC_UNUSED(dunno)) { | 56 | static void save_settings(GtkWidget *terminal, gpointer G_GNUC_UNUSED(dunno)) { |
57 | - v3270_key_file_save(terminal); | 57 | + v3270_key_file_save(terminal,NULL); |
58 | } | 58 | } |
59 | 59 | ||
60 | static void print_done(GtkWidget *widget, GtkPrintOperation *operation, GtkPrintOperationResult result, gpointer G_GNUC_UNUSED(dunno)) { | 60 | static void print_done(GtkWidget *widget, GtkPrintOperation *operation, GtkPrintOperationResult result, gpointer G_GNUC_UNUSED(dunno)) { |