Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: GitHub noreply@github.com Date: Sun, 09 Jun 2024 11:46:03 UTC Commit: be7e3cea30d723d9d4a3fcaa8ea3e7e83cd60c44 https://github.com/geany/geany/commit/be7e3cea30d723d9d4a3fcaa8ea3e7e83cd60c...
Log Message: ----------- Merge pull request #3833 from ntrel/custom-dialog
[build] Improve custom command dialog
Modified Paths: -------------- src/build.c src/dialogs.c
Modified: src/build.c 13 lines changed, 10 insertions(+), 3 deletions(-) =================================================================== @@ -1268,17 +1268,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).