Commit 247a690eca83a2f670a0b552f2e854d62eb9f66e

Authored by Perry Werneck
1 parent 16406a1c

Fixing portability issue detected by OBS.

@@ -68,9 +68,6 @@ @@ -68,9 +68,6 @@
68 <Unit filename="src/objects/actions/clipboard.c"> 68 <Unit filename="src/objects/actions/clipboard.c">
69 <Option compilerVar="CC" /> 69 <Option compilerVar="CC" />
70 </Unit> 70 </Unit>
71 - <Unit filename="src/objects/actions/connect.c">  
72 - <Option compilerVar="CC" />  
73 - </Unit>  
74 <Unit filename="src/objects/actions/dialog.c"> 71 <Unit filename="src/objects/actions/dialog.c">
75 <Option compilerVar="CC" /> 72 <Option compilerVar="CC" />
76 </Unit> 73 </Unit>
@@ -125,6 +122,9 @@ @@ -125,6 +122,9 @@
125 <Unit filename="src/objects/window/actions/close.c"> 122 <Unit filename="src/objects/window/actions/close.c">
126 <Option compilerVar="CC" /> 123 <Option compilerVar="CC" />
127 </Unit> 124 </Unit>
  125 + <Unit filename="src/objects/window/actions/connect.c">
  126 + <Option compilerVar="CC" />
  127 + </Unit>
128 <Unit filename="src/objects/window/actions/filetransfer.c"> 128 <Unit filename="src/objects/window/actions/filetransfer.c">
129 <Option compilerVar="CC" /> 129 <Option compilerVar="CC" />
130 </Unit> 130 </Unit>
src/objects/actions/connect.c
@@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
1 -/*  
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.  
22 - *  
23 - * Contatos:  
24 - *  
25 - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)  
26 - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)  
27 - *  
28 - */  
29 -  
30 - /**  
31 - * @brief Implement PW3270 "connect" action.  
32 - *  
33 - */  
34 -  
35 - #include "private.h"  
36 -  
37 - static void activate(GAction G_GNUC_UNUSED(*action), GVariant G_GNUC_UNUSED(*parameter), GtkWidget *terminal) {  
38 -  
39 - debug("%s",__FUNCTION__);  
40 - gtk_widget_activate(terminal);  
41 -  
42 - }  
43 -  
44 - GAction * pw3270_action_connect_new(void) {  
45 -  
46 - pw3270SimpleAction * action = pw3270_simple_action_new_from_lib3270(lib3270_action_get_by_name("reconnect"),"connect");  
47 - action->parent.activate = activate;  
48 - action->label = N_("Connect");  
49 - action->tooltip = N_("Connect to host");  
50 -  
51 - return G_ACTION(action);  
52 -  
53 - }  
src/objects/actions/private.h
@@ -56,7 +56,5 @@ @@ -56,7 +56,5 @@
56 G_GNUC_INTERNAL void pw3270_action_notify_enabled(GAction *action); 56 G_GNUC_INTERNAL void pw3270_action_notify_enabled(GAction *action);
57 G_GNUC_INTERNAL void pw3270_action_notify_state(GAction *object); 57 G_GNUC_INTERNAL void pw3270_action_notify_state(GAction *object);
58 58
59 - // Internal actions  
60 - G_GNUC_INTERNAL GAction * pw3270_action_connect_new(void);  
61 59
62 #endif // PRIVATE_H_INCLUDED 60 #endif // PRIVATE_H_INCLUDED
src/objects/window/actions/close.c
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
27 * 27 *
28 */ 28 */
29 29
  30 + #include "../private.h"
30 #include <pw3270.h> 31 #include <pw3270.h>
31 #include <pw3270/actions.h> 32 #include <pw3270/actions.h>
32 #include <lib3270.h> 33 #include <lib3270.h>
src/objects/window/actions/connect.c 0 → 100644
@@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
  1 +/*
  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.
  22 + *
  23 + * Contatos:
  24 + *
  25 + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck)
  26 + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça)
  27 + *
  28 + */
  29 +
  30 + /**
  31 + * @brief Implement PW3270 "connect" action.
  32 + *
  33 + */
  34 +
  35 + #include <pw3270.h>
  36 + #include <pw3270/actions.h>
  37 + #include "../private.h"
  38 +
  39 + static void activate(GAction G_GNUC_UNUSED(*action), GVariant G_GNUC_UNUSED(*parameter), GtkWidget *terminal) {
  40 +
  41 + debug("%s",__FUNCTION__);
  42 + gtk_widget_activate(terminal);
  43 +
  44 + }
  45 +
  46 + GAction * pw3270_action_connect_new(void) {
  47 +
  48 + pw3270SimpleAction * action = pw3270_simple_action_new_from_lib3270(lib3270_action_get_by_name("reconnect"),"connect");
  49 + action->parent.activate = activate;
  50 + action->label = N_("Connect");
  51 + action->tooltip = N_("Connect to host");
  52 +
  53 + return G_ACTION(action);
  54 +
  55 + }
src/objects/window/private.h
@@ -78,6 +78,7 @@ @@ -78,6 +78,7 @@
78 G_GNUC_INTERNAL GAction * pw3270_set_color_action_new(void); 78 G_GNUC_INTERNAL GAction * pw3270_set_color_action_new(void);
79 G_GNUC_INTERNAL GAction * pw3270_file_transfer_action_new(void); 79 G_GNUC_INTERNAL GAction * pw3270_file_transfer_action_new(void);
80 G_GNUC_INTERNAL GAction * pw3270_action_window_close_new(void); 80 G_GNUC_INTERNAL GAction * pw3270_action_window_close_new(void);
  81 + G_GNUC_INTERNAL GAction * pw3270_action_connect_new(void);
81 82
82 GAction * pw3270_action_session_properties_new(void); 83 GAction * pw3270_action_session_properties_new(void);
83 84