Commit dedd87fa1ae07591b439baa1cd950b36f89f0d36

Authored by Perry Werneck
1 parent 8337bf52
Exists in master and in 1 other branch develop

Adding font settings dialog action (for classic menu).

src/dialogs/font/chooser.c
  1 +/* SPDX-License-Identifier: LGPL-3.0-or-later */
  2 +
1 3 /*
2   - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270
3   - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a
4   - * aplicativos mainframe. Registro no INPI sob o nome G3270.
5   - *
6   - * Copyright (C) <2008> <Banco do Brasil S.A.>
7   - *
8   - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob
9   - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela
10   - * Free Software Foundation.
11   - *
12   - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER
13   - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO
14   - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para
15   - * obter mais detalhes.
16   - *
17   - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este
18   - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin
19   - * St, Fifth Floor, Boston, MA 02110-1301 USA
20   - *
21   - * Este programa está nomeado como - e possui - linhas de código.
  4 + * Copyright (C) 2008 Banco do Brasil S.A.
22 5 *
23   - * Contatos:
  6 + * This program is free software: you can redistribute it and/or modify
  7 + * it under the terms of the GNU Lesser General Public License as published
  8 + * by the Free Software Foundation, either version 3 of the License, or
  9 + * (at your option) any later version.
24 10 *
25   - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
26   - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
27 15 *
  16 + * You should have received a copy of the GNU Lesser General Public License
  17 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
28 18 */
29 19  
30 20 /**
... ...
src/terminal/actions/table.c
... ... @@ -31,6 +31,8 @@
31 31 static int fire_accelerators_dialog(GtkWidget *widget, const struct _v3270_action * action);
32 32 static int fire_host_dialog(GtkWidget *widget, const struct _v3270_action * action);
33 33 static int fire_color_dialog(GtkWidget *widget, const struct _v3270_action * action);
  34 + static int fire_clipboard_dialog(GtkWidget *widget, const struct _v3270_action * action);
  35 + static int fire_font_dialog(GtkWidget *widget, const struct _v3270_action * action);
34 36  
35 37 /*--[ Implement ]------------------------------------------------------------------------------------*/
36 38  
... ... @@ -345,6 +347,23 @@
345 347 .activate = fire_color_dialog
346 348 },
347 349  
  350 + {
  351 + .group = LIB3270_ACTION_GROUP_NONE,
  352 + .name = "dialog-clipboard",
  353 + .label = N_("Selection settings"),
  354 + .summary = N_("Edit clipboard settings"),
  355 + .activate = fire_clipboard_dialog
  356 + },
  357 +
  358 + {
  359 + .group = LIB3270_ACTION_GROUP_NONE,
  360 + .icon = "preferences-desktop-font",
  361 + .name = "dialog-font",
  362 + .label = N_("Font settings"),
  363 + .summary = N_("Select terminal font"),
  364 + .activate = fire_font_dialog
  365 + },
  366 +
348 367 //
349 368 // Terminator
350 369 //
... ... @@ -439,10 +458,38 @@
439 458 }
440 459  
441 460 static int fire_color_dialog(GtkWidget *widget, const struct _v3270_action G_GNUC_UNUSED(* action)) {
442   - v3270_settings_popup_dialog(
443   - v3270_color_settings_new(),
444   - widget,
445   - FALSE
  461 + gtk_widget_show_all(
  462 + v3270_settings_popup_dialog(
  463 + v3270_color_settings_new(),
  464 + widget,
  465 + FALSE
  466 + )
446 467 );
447 468 return 0;
448 469 }
  470 +
  471 + static int fire_clipboard_dialog(GtkWidget *widget, const struct _v3270_action G_GNUC_UNUSED(* action)) {
  472 + gtk_widget_show_all(
  473 + v3270_settings_popup_dialog(
  474 + v3270_clipboard_settings_new(),
  475 + widget,
  476 + FALSE
  477 + )
  478 + );
  479 + return 0;
  480 + }
  481 +
  482 + static int fire_font_dialog(GtkWidget *widget, const struct _v3270_action G_GNUC_UNUSED(* action)) {
  483 +
  484 + GtkWidget * dialog =
  485 + v3270_settings_popup_dialog(
  486 + v3270_font_settings_new(),
  487 + widget,
  488 + TRUE
  489 + );
  490 +
  491 + gtk_window_set_default_size(GTK_WINDOW(dialog),950,400);
  492 + gtk_widget_show_all(dialog);
  493 +
  494 + return 0;
  495 + }
... ...