Commit 409a16f03f9d4b10655db40d87ebff24d72010ec
1 parent
92e2cadf
Exists in
master
and in
1 other branch
Cleaning up debug messages.
fixing event trace messages.
Showing
3 changed files
with
11 additions
and
28 deletions
Show diff stats
.gitignore
src/dialogs/print/convenience.c
... | ... | @@ -44,19 +44,17 @@ |
44 | 44 | if(!(widget && GTK_IS_V3270(widget))) |
45 | 45 | return errno = EINVAL; |
46 | 46 | |
47 | - lib3270_trace_event(v3270_get_session(widget),"print action activated (type=%d)",(int) mode); | |
47 | + lib3270_trace_event(v3270_get_session(widget),"print action activated (type=%d)\n",(int) mode); | |
48 | 48 | |
49 | 49 | if(!v3270_is_connected(widget)) |
50 | 50 | return errno = ENOTCONN; |
51 | 51 | |
52 | 52 | // Print operation. |
53 | - debug("************** %s",__FUNCTION__); | |
54 | 53 | GtkPrintOperation * operation = v3270_print_operation_new(widget, mode); |
55 | 54 | if(!operation) |
56 | 55 | return errno = EPERM; |
57 | 56 | |
58 | 57 | gtk_print_operation_set_show_progress(operation,TRUE); |
59 | - | |
60 | 58 | gtk_print_operation_set_allow_async(operation,TRUE); |
61 | 59 | |
62 | 60 | GtkPrintOperationResult result = GTK_PRINT_OPERATION_RESULT_ERROR; |
... | ... | @@ -105,25 +103,25 @@ |
105 | 103 | { |
106 | 104 | case GTK_PRINT_OPERATION_RESULT_ERROR: |
107 | 105 | debug("%s: Error on print operation",__FUNCTION__); |
108 | - lib3270_trace_event(v3270_get_session(widget),_("Error on print operation")); | |
106 | + lib3270_trace_event(v3270_get_session(widget),"%s\n",_("Error on print operation")); | |
109 | 107 | rc = -1; |
110 | 108 | break; |
111 | 109 | |
112 | 110 | case GTK_PRINT_OPERATION_RESULT_APPLY: |
113 | 111 | debug("%s: The print settings should be stored.",__FUNCTION__); |
114 | - lib3270_trace_event(v3270_get_session(widget),_("The print settings should be stored.")); | |
112 | + lib3270_trace_event(v3270_get_session(widget),"%s\n",_("The print settings should be stored.")); | |
115 | 113 | rc = 0; |
116 | 114 | break; |
117 | 115 | |
118 | 116 | case GTK_PRINT_OPERATION_RESULT_CANCEL: |
119 | 117 | debug("%s: The print operation has been canceled, the print settings should not be stored.", __FUNCTION__); |
120 | - lib3270_trace_event(v3270_get_session(widget),_("The print operation has been canceled, the print settings should not be stored.")); | |
118 | + lib3270_trace_event(v3270_get_session(widget),"%s\n",_("The print operation has been canceled, the print settings should not be stored.")); | |
121 | 119 | rc = 0; |
122 | 120 | break; |
123 | 121 | |
124 | 122 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: |
125 | 123 | debug("%s: The print operation is running",__FUNCTION__); |
126 | - lib3270_trace_event(v3270_get_session(widget),_("The print operation is running")); | |
124 | + lib3270_trace_event(v3270_get_session(widget),"%s\n",_("The print operation is running")); | |
127 | 125 | rc = 0; |
128 | 126 | break; |
129 | 127 | ... | ... |
src/dialogs/print/print.c
... | ... | @@ -69,27 +69,27 @@ |
69 | 69 | { |
70 | 70 | case GTK_PRINT_OPERATION_RESULT_ERROR: |
71 | 71 | debug("%s: Error on print operation",__FUNCTION__); |
72 | - lib3270_trace_event(operation->widget->host,_("Error on print operation")); | |
72 | + lib3270_trace_event(operation->widget->host,"%s\n",_("Error on print operation")); | |
73 | 73 | break; |
74 | 74 | |
75 | 75 | case GTK_PRINT_OPERATION_RESULT_APPLY: |
76 | 76 | debug("%s: The print settings should be stored.",__FUNCTION__); |
77 | - lib3270_trace_event(operation->widget->host,_("The print settings should be stored.")); | |
77 | + lib3270_trace_event(operation->widget->host,"%s\n",_("The print settings should be stored.")); | |
78 | 78 | break; |
79 | 79 | |
80 | 80 | case GTK_PRINT_OPERATION_RESULT_CANCEL: |
81 | 81 | debug("%s: The print operation has been canceled, the print settings should not be stored.", __FUNCTION__); |
82 | - lib3270_trace_event(operation->widget->host,_("The print operation has been canceled, the print settings should not be stored.")); | |
82 | + lib3270_trace_event(operation->widget->host,"%s\n",_("The print operation has been canceled, the print settings should not be stored.")); | |
83 | 83 | break; |
84 | 84 | |
85 | 85 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: |
86 | 86 | debug("%s: The print operation is running",__FUNCTION__); |
87 | - lib3270_trace_event(operation->widget->host,_("The print operation is running")); | |
87 | + lib3270_trace_event(operation->widget->host,"%s\n",_("The print operation is running")); | |
88 | 88 | break; |
89 | 89 | |
90 | 90 | default: |
91 | 91 | debug("Unexpected status %d in print operation",(int) result); |
92 | - lib3270_trace_event(operation->widget->host,_("Unexpected status %d in print operation"),(int) result); | |
92 | + lib3270_trace_event(operation->widget->host,"%s\n",_("Unexpected status %d in print operation"),(int) result); | |
93 | 93 | |
94 | 94 | } |
95 | 95 | |
... | ... | @@ -100,32 +100,22 @@ |
100 | 100 | |
101 | 101 | static void dispose(GObject *object) |
102 | 102 | { |
103 | - | |
104 | - debug("%s(%p)",__FUNCTION__,object); | |
105 | - g_message("%s(%p)",__FUNCTION__,object); | |
106 | - | |
107 | 103 | V3270PrintOperation * operation = GTK_V3270_PRINT_OPERATION(object); |
108 | 104 | |
109 | 105 | operation->contents.selection = NULL; |
110 | 106 | |
111 | - debug("%s.operation->font.info.scaled=%p",__FUNCTION__,operation->font.info.scaled); | |
112 | - g_message("%s.operation->font.info.scaled=%p",__FUNCTION__,operation->font.info.scaled); | |
113 | 107 | if(operation->font.info.scaled) |
114 | 108 | { |
115 | 109 | cairo_scaled_font_destroy(operation->font.info.scaled); |
116 | 110 | operation->font.info.scaled = NULL; |
117 | 111 | } |
118 | 112 | |
119 | - debug("%s.operation->font.name=%p",__FUNCTION__,operation->font.name); | |
120 | - g_message("%s.operation->font.name=%p",__FUNCTION__,operation->font.name); | |
121 | 113 | if(operation->font.name) |
122 | 114 | { |
123 | 115 | g_free(operation->font.name); |
124 | 116 | operation->font.name = NULL; |
125 | 117 | } |
126 | 118 | |
127 | - debug("%s.operation->contents.dynamic=%p",__FUNCTION__,operation->font.name); | |
128 | - g_message("%s.operation->contents.dynamic=%p",__FUNCTION__,operation->font.name); | |
129 | 119 | if(operation->contents.dynamic) |
130 | 120 | { |
131 | 121 | #pragma GCC diagnostic push |
... | ... | @@ -140,13 +130,7 @@ |
140 | 130 | #pragma GCC diagnostic pop |
141 | 131 | } |
142 | 132 | |
143 | - debug("%s: Calling parent dispose",__FUNCTION__); | |
144 | - | |
145 | - g_message("%s: Calling parent dispose",__FUNCTION__); | |
146 | 133 | G_OBJECT_CLASS(V3270PrintOperation_parent_class)->dispose(object); |
147 | - debug("%s: Dispose is complete",__FUNCTION__); | |
148 | - g_message("%s: Dispose is complete",__FUNCTION__); | |
149 | - | |
150 | 134 | |
151 | 135 | } |
152 | 136 | ... | ... |