Commit 07a706ffa28258b7babe8d43e1a4e711acfa025f
1 parent
91ae35bb
Exists in
master
and in
1 other branch
Fixing memory leaks, removing more deprecated code.
Showing
3 changed files
with
15 additions
and
40 deletions
Show diff stats
src/filetransfer/activitylist.c
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | 70 | ||
71 | static void dispose(GObject *object) | 71 | static void dispose(GObject *object) |
72 | { | 72 | { |
73 | - debug("%s (model=%p)",__FUNCTION__,gtk_tree_view_get_model(GTK_TREE_VIEW(object))); | 73 | + debug("activityList::%s(%p)",__FUNCTION__,object); |
74 | 74 | ||
75 | V3270FTActivityList * list = GTK_V3270_FT_ACTIVITY_LIST(object); | 75 | V3270FTActivityList * list = GTK_V3270_FT_ACTIVITY_LIST(object); |
76 | 76 |
src/filetransfer/worker.c
@@ -133,14 +133,6 @@ | @@ -133,14 +133,6 @@ | ||
133 | 133 | ||
134 | g_clear_object(&worker->activity); | 134 | g_clear_object(&worker->activity); |
135 | 135 | ||
136 | - /* | ||
137 | - if(worker->activity) | ||
138 | - { | ||
139 | - g_object_unref(worker->activity); | ||
140 | - worker->activity = NULL; | ||
141 | - } | ||
142 | - */ | ||
143 | - | ||
144 | G_OBJECT_CLASS(V3270FTWorker_parent_class)->finalize(object); | 136 | G_OBJECT_CLASS(V3270FTWorker_parent_class)->finalize(object); |
145 | 137 | ||
146 | } | 138 | } |
src/terminal/widget.c
@@ -27,8 +27,6 @@ | @@ -27,8 +27,6 @@ | ||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
31 | - | ||
32 | #include <config.h> | 30 | #include <config.h> |
33 | #include "private.h" | 31 | #include "private.h" |
34 | #include "marshal.h" | 32 | #include "marshal.h" |
@@ -241,6 +239,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -241,6 +239,7 @@ static void v3270_class_init(v3270Class *klass) | ||
241 | 239 | ||
242 | lib3270_set_log_handler(loghandler); | 240 | lib3270_set_log_handler(loghandler); |
243 | 241 | ||
242 | + // Widget methods | ||
244 | widget_class->realize = v3270_realize; | 243 | widget_class->realize = v3270_realize; |
245 | widget_class->size_allocate = v3270_size_allocate; | 244 | widget_class->size_allocate = v3270_size_allocate; |
246 | widget_class->key_press_event = v3270_key_press_event; | 245 | widget_class->key_press_event = v3270_key_press_event; |
@@ -254,35 +253,21 @@ static void v3270_class_init(v3270Class *klass) | @@ -254,35 +253,21 @@ static void v3270_class_init(v3270Class *klass) | ||
254 | widget_class->scroll_event = v3270_scroll_event; | 253 | widget_class->scroll_event = v3270_scroll_event; |
255 | widget_class->query_tooltip = v3270_query_tooltip; | 254 | widget_class->query_tooltip = v3270_query_tooltip; |
256 | 255 | ||
257 | - /* Accessibility support */ | ||
258 | - widget_class->get_accessible = v3270_get_accessible; | ||
259 | - | ||
260 | - klass->activate = v3270_activate; | ||
261 | - klass->toggle_changed = v3270_toggle_changed; | ||
262 | - klass->message_changed = v3270_update_message; | ||
263 | - klass->popup_message = v3270_popup_message; | ||
264 | - | ||
265 | -#if GTK_CHECK_VERSION(3,0,0) | ||
266 | - | ||
267 | widget_class->get_preferred_height = get_preferred_height; | 256 | widget_class->get_preferred_height = get_preferred_height; |
268 | widget_class->get_preferred_width = get_preferred_width; | 257 | widget_class->get_preferred_width = get_preferred_width; |
269 | 258 | ||
270 | widget_class->destroy = v3270_destroy; | 259 | widget_class->destroy = v3270_destroy; |
271 | widget_class->draw = v3270_draw; | 260 | widget_class->draw = v3270_draw; |
272 | 261 | ||
273 | -#else | ||
274 | - | ||
275 | - { | ||
276 | - GtkObjectClass *object_class = (GtkObjectClass*) klass; | ||
277 | - | ||
278 | - object_class->destroy = v3270_destroy; | ||
279 | - } | ||
280 | - | ||
281 | - widget_class->expose_event = v3270_expose; | ||
282 | - | 262 | + // Accessibility support |
263 | + widget_class->get_accessible = v3270_get_accessible; | ||
283 | 264 | ||
284 | -#endif // GTK3 | 265 | + klass->activate = v3270_activate; |
266 | + klass->toggle_changed = v3270_toggle_changed; | ||
267 | + klass->message_changed = v3270_update_message; | ||
268 | + klass->popup_message = v3270_popup_message; | ||
285 | 269 | ||
270 | + // Register I/O Handlers | ||
286 | v3270_register_io_handlers(klass); | 271 | v3270_register_io_handlers(klass); |
287 | 272 | ||
288 | // Cursors | 273 | // Cursors |
@@ -331,11 +316,11 @@ static void v3270_class_init(v3270Class *klass) | @@ -331,11 +316,11 @@ static void v3270_class_init(v3270Class *klass) | ||
331 | 316 | ||
332 | for(f=0;f<LIB3270_POINTER_COUNT;f++) | 317 | for(f=0;f<LIB3270_POINTER_COUNT;f++) |
333 | { | 318 | { |
334 | - #ifdef WIN32 | 319 | +#ifdef WIN32 |
335 | v3270_cursor[f] = gdk_cursor_new_from_name(gdk_display_get_default(),cr[f]); | 320 | v3270_cursor[f] = gdk_cursor_new_from_name(gdk_display_get_default(),cr[f]); |
336 | - #else | ||
337 | - v3270_cursor[f] = gdk_cursor_new(cr[f]); | ||
338 | - #endif | 321 | +#else |
322 | + v3270_cursor[f] = gdk_cursor_new_for_display(gdk_display_get_default(),cr[f]); | ||
323 | +#endif | ||
339 | } | 324 | } |
340 | } | 325 | } |
341 | 326 | ||
@@ -573,6 +558,8 @@ static void v3270_destroy(GtkWidget *widget) | @@ -573,6 +558,8 @@ static void v3270_destroy(GtkWidget *widget) | ||
573 | { | 558 | { |
574 | v3270 * terminal = GTK_V3270(widget); | 559 | v3270 * terminal = GTK_V3270(widget); |
575 | 560 | ||
561 | + debug("%s",__FUNCTION__); | ||
562 | + | ||
576 | if(terminal->host) | 563 | if(terminal->host) |
577 | { | 564 | { |
578 | // Cleanup | 565 | // Cleanup |
@@ -657,11 +644,7 @@ static void v3270_destroy(GtkWidget *widget) | @@ -657,11 +644,7 @@ static void v3270_destroy(GtkWidget *widget) | ||
657 | terminal->session_name = NULL; | 644 | terminal->session_name = NULL; |
658 | } | 645 | } |
659 | 646 | ||
660 | -#if GTK_CHECK_VERSION(3,0,0) | ||
661 | GTK_WIDGET_CLASS(v3270_parent_class)->destroy(widget); | 647 | GTK_WIDGET_CLASS(v3270_parent_class)->destroy(widget); |
662 | -#else | ||
663 | - GTK_OBJECT_CLASS(v3270_parent_class)->destroy(widget); | ||
664 | -#endif // GTK3 | ||
665 | 648 | ||
666 | } | 649 | } |
667 | 650 |