Branch: refs/heads/master Author: Nick Treleaven ntrel002@gmail.com Committer: Nick Treleaven ntrel002@gmail.com Date: Fri, 12 Apr 2024 16:55:07 UTC Commit: 41620fc8626ab2c0f1b00b9d695b5b773273745d https://github.com/geany/geany/commit/41620fc8626ab2c0f1b00b9d695b5b77327374...
Log Message: ----------- [build] Improve custom command dialog
Show the command stem in the label. Use command label for dialog title.
Modified Paths: -------------- src/build.c src/dialogs.c
Modified: src/build.c 13 lines changed, 10 insertions(+), 3 deletions(-) =================================================================== @@ -1266,17 +1266,24 @@ static void on_build_menu_item(GtkWidget *w, gpointer user_data) if (grp == GEANY_GBG_NON_FT && cmd == GBO_TO_CMD(GEANY_GBO_CUSTOM)) { static GtkWidget *dialog = NULL; /* keep dialog for combo history */ + gchar *str;
+ bc = get_build_cmd(doc, grp, cmd, NULL); + str = g_strdup_printf(_("Enter custom text to append to the command "%s":"), + bc->command); if (! dialog) { - dialog = dialogs_show_input_persistent(_("Custom Text"), GTK_WINDOW(main_widgets.window), - _("Enter custom text here, all entered text is appended to the command."), - build_info.custom_target, &on_make_custom_input_response, NULL); + dialog = dialogs_show_input_persistent(NULL, GTK_WINDOW(main_widgets.window), + str, build_info.custom_target, &on_make_custom_input_response, NULL); } else { + gtk_label_set_label(GTK_LABEL(ui_lookup_widget(dialog, "label")), str); gtk_widget_show(dialog); } + SETPTR(str, utils_str_remove_chars(g_strdup(bc->label), "_")); + gtk_window_set_title(GTK_WINDOW(dialog), str); + g_free(str); return; } else if (grp == GEANY_GBG_EXEC)
Modified: src/dialogs.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -954,6 +954,7 @@ dialogs_show_input_full(const gchar *title, GtkWindow *parent, GtkWidget *label = gtk_label_new(label_text); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + ui_hookup_widget(dialog, label, "label"); gtk_container_add(GTK_CONTAINER(vbox), label); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).