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,19 +44,17 @@ | ||
44 | if(!(widget && GTK_IS_V3270(widget))) | 44 | if(!(widget && GTK_IS_V3270(widget))) |
45 | return errno = EINVAL; | 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 | if(!v3270_is_connected(widget)) | 49 | if(!v3270_is_connected(widget)) |
50 | return errno = ENOTCONN; | 50 | return errno = ENOTCONN; |
51 | 51 | ||
52 | // Print operation. | 52 | // Print operation. |
53 | - debug("************** %s",__FUNCTION__); | ||
54 | GtkPrintOperation * operation = v3270_print_operation_new(widget, mode); | 53 | GtkPrintOperation * operation = v3270_print_operation_new(widget, mode); |
55 | if(!operation) | 54 | if(!operation) |
56 | return errno = EPERM; | 55 | return errno = EPERM; |
57 | 56 | ||
58 | gtk_print_operation_set_show_progress(operation,TRUE); | 57 | gtk_print_operation_set_show_progress(operation,TRUE); |
59 | - | ||
60 | gtk_print_operation_set_allow_async(operation,TRUE); | 58 | gtk_print_operation_set_allow_async(operation,TRUE); |
61 | 59 | ||
62 | GtkPrintOperationResult result = GTK_PRINT_OPERATION_RESULT_ERROR; | 60 | GtkPrintOperationResult result = GTK_PRINT_OPERATION_RESULT_ERROR; |
@@ -105,25 +103,25 @@ | @@ -105,25 +103,25 @@ | ||
105 | { | 103 | { |
106 | case GTK_PRINT_OPERATION_RESULT_ERROR: | 104 | case GTK_PRINT_OPERATION_RESULT_ERROR: |
107 | debug("%s: Error on print operation",__FUNCTION__); | 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 | rc = -1; | 107 | rc = -1; |
110 | break; | 108 | break; |
111 | 109 | ||
112 | case GTK_PRINT_OPERATION_RESULT_APPLY: | 110 | case GTK_PRINT_OPERATION_RESULT_APPLY: |
113 | debug("%s: The print settings should be stored.",__FUNCTION__); | 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 | rc = 0; | 113 | rc = 0; |
116 | break; | 114 | break; |
117 | 115 | ||
118 | case GTK_PRINT_OPERATION_RESULT_CANCEL: | 116 | case GTK_PRINT_OPERATION_RESULT_CANCEL: |
119 | debug("%s: The print operation has been canceled, the print settings should not be stored.", __FUNCTION__); | 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 | rc = 0; | 119 | rc = 0; |
122 | break; | 120 | break; |
123 | 121 | ||
124 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: | 122 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: |
125 | debug("%s: The print operation is running",__FUNCTION__); | 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 | rc = 0; | 125 | rc = 0; |
128 | break; | 126 | break; |
129 | 127 |
src/dialogs/print/print.c
@@ -69,27 +69,27 @@ | @@ -69,27 +69,27 @@ | ||
69 | { | 69 | { |
70 | case GTK_PRINT_OPERATION_RESULT_ERROR: | 70 | case GTK_PRINT_OPERATION_RESULT_ERROR: |
71 | debug("%s: Error on print operation",__FUNCTION__); | 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 | break; | 73 | break; |
74 | 74 | ||
75 | case GTK_PRINT_OPERATION_RESULT_APPLY: | 75 | case GTK_PRINT_OPERATION_RESULT_APPLY: |
76 | debug("%s: The print settings should be stored.",__FUNCTION__); | 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 | break; | 78 | break; |
79 | 79 | ||
80 | case GTK_PRINT_OPERATION_RESULT_CANCEL: | 80 | case GTK_PRINT_OPERATION_RESULT_CANCEL: |
81 | debug("%s: The print operation has been canceled, the print settings should not be stored.", __FUNCTION__); | 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 | break; | 83 | break; |
84 | 84 | ||
85 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: | 85 | case GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: |
86 | debug("%s: The print operation is running",__FUNCTION__); | 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 | break; | 88 | break; |
89 | 89 | ||
90 | default: | 90 | default: |
91 | debug("Unexpected status %d in print operation",(int) result); | 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,32 +100,22 @@ | ||
100 | 100 | ||
101 | static void dispose(GObject *object) | 101 | static void dispose(GObject *object) |
102 | { | 102 | { |
103 | - | ||
104 | - debug("%s(%p)",__FUNCTION__,object); | ||
105 | - g_message("%s(%p)",__FUNCTION__,object); | ||
106 | - | ||
107 | V3270PrintOperation * operation = GTK_V3270_PRINT_OPERATION(object); | 103 | V3270PrintOperation * operation = GTK_V3270_PRINT_OPERATION(object); |
108 | 104 | ||
109 | operation->contents.selection = NULL; | 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 | if(operation->font.info.scaled) | 107 | if(operation->font.info.scaled) |
114 | { | 108 | { |
115 | cairo_scaled_font_destroy(operation->font.info.scaled); | 109 | cairo_scaled_font_destroy(operation->font.info.scaled); |
116 | operation->font.info.scaled = NULL; | 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 | if(operation->font.name) | 113 | if(operation->font.name) |
122 | { | 114 | { |
123 | g_free(operation->font.name); | 115 | g_free(operation->font.name); |
124 | operation->font.name = NULL; | 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 | if(operation->contents.dynamic) | 119 | if(operation->contents.dynamic) |
130 | { | 120 | { |
131 | #pragma GCC diagnostic push | 121 | #pragma GCC diagnostic push |
@@ -140,13 +130,7 @@ | @@ -140,13 +130,7 @@ | ||
140 | #pragma GCC diagnostic pop | 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 | G_OBJECT_CLASS(V3270PrintOperation_parent_class)->dispose(object); | 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 |