Commit 6958a2c162ebfca738e2ecb1f830235121e08e28
1 parent
fdf7000d
Exists in
master
and in
5 other branches
Corrigindo empacotamento windows
Showing
3 changed files
with
15 additions
and
11 deletions
Show diff stats
src/plugins/hllapi/pluginmain.c
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | - #include "server.h" | 34 | + #include "server.h" #include <pw3270/plugin.h> |
35 | #include <pw3270/ipcpackets.h> | 35 | #include <pw3270/ipcpackets.h> |
36 | #include <lib3270/actions.h> | 36 | #include <lib3270/actions.h> |
37 | 37 | ||
@@ -439,7 +439,7 @@ | @@ -439,7 +439,7 @@ | ||
439 | LocalFree(lpMsgBuf); | 439 | LocalFree(lpMsgBuf); |
440 | } | 440 | } |
441 | 441 | ||
442 | - LIB3270_EXPORT int pw3270_plugin_init(GtkWidget *window) | 442 | + LIB3270_EXPORT int pw3270_plugin_start(GtkWidget *window) |
443 | { | 443 | { |
444 | char id; | 444 | char id; |
445 | 445 | ||
@@ -503,7 +503,7 @@ | @@ -503,7 +503,7 @@ | ||
503 | return -1; | 503 | return -1; |
504 | } | 504 | } |
505 | 505 | ||
506 | - LIB3270_EXPORT int pw3270_plugin_deinit(GtkWidget *window) | 506 | + LIB3270_EXPORT int pw3270_plugin_stop(GtkWidget *window) |
507 | { | 507 | { |
508 | 508 | ||
509 | return 0; | 509 | return 0; |
src/plugins/rx3270/Makefile.in
@@ -50,7 +50,7 @@ include ../../include/plugin.mak | @@ -50,7 +50,7 @@ include ../../include/plugin.mak | ||
50 | $(BINDBG)/$(PLUGIN_NAME): $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJDBG)/$(SRC).o) $(BINDBG)$(DLL_NAME) | 50 | $(BINDBG)/$(PLUGIN_NAME): $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJDBG)/$(SRC).o) $(BINDBG)$(DLL_NAME) |
51 | @echo " CCLD `basename $@`" | 51 | @echo " CCLD `basename $@`" |
52 | @$(MKDIR) `dirname $@` | 52 | @$(MKDIR) `dirname $@` |
53 | - @$(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) | 53 | + @$(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(PW3270_LIBS) |
54 | 54 | ||
55 | $(BINDBG)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJDBG)/$(SRC)@OBJEXT@) | 55 | $(BINDBG)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJDBG)/$(SRC)@OBJEXT@) |
56 | @echo " CCLD `basename $@`" | 56 | @echo " CCLD `basename $@`" |
@@ -62,7 +62,7 @@ $(BINDBG)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJ | @@ -62,7 +62,7 @@ $(BINDBG)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJ | ||
62 | $(BINRLS)/$(PLUGIN_NAME): $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJRLS)/$(SRC).o) $(BINRLS)$(DLL_NAME) | 62 | $(BINRLS)/$(PLUGIN_NAME): $(foreach SRC, $(basename $(PLUGIN_SRC)), $(OBJRLS)/$(SRC).o) $(BINRLS)$(DLL_NAME) |
63 | @echo " CCLD `basename $@`" | 63 | @echo " CCLD `basename $@`" |
64 | @$(MKDIR) `dirname $@` | 64 | @$(MKDIR) `dirname $@` |
65 | - $(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) | 65 | + $(CXX) $(DLL_FLAGS) @LDSOFLAGS@ $(LDFLAGS) -o $@ $^ $(LIBS) $(LIB3270_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(PW3270_LIBS) |
66 | 66 | ||
67 | $(BINRLS)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJRLS)/$(SRC).o) | 67 | $(BINRLS)$(DLL_NAME).$(VERSION): $(foreach SRC, $(basename $(EXTAPI_SRC)), $(OBJRLS)/$(SRC).o) |
68 | @echo " CCLD `basename $@`" | 68 | @echo " CCLD `basename $@`" |
src/plugins/rx3270/pluginmain.cc
@@ -98,14 +98,15 @@ | @@ -98,14 +98,15 @@ | ||
98 | 98 | ||
99 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 99 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
100 | 100 | ||
101 | - static plugin * session = NULL; | ||
102 | - static GMutex mutex; | 101 | + static plugin * session = NULL; #if GTK_CHECK_VERSION(2,32,0) |
102 | + static GMutex mutex; #else static GStaticMutex mutex = G_STATIC_MUTEX_INIT; #endif // GTK_CHECK_VERSION | ||
103 | 103 | ||
104 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 104 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
105 | 105 | ||
106 | LIB3270_EXPORT int pw3270_plugin_init(GtkWidget *window) | 106 | LIB3270_EXPORT int pw3270_plugin_init(GtkWidget *window) |
107 | { | 107 | { |
108 | - g_mutex_init(&mutex); | 108 | +#if GTK_CHECK_VERSION(2,32,0) |
109 | + g_mutex_init(&mutex); #endif // GTK_CHECK_VERSION | ||
109 | session = new plugin(lib3270_get_default_session_handle()); | 110 | session = new plugin(lib3270_get_default_session_handle()); |
110 | session->set_plugin(); | 111 | session->set_plugin(); |
111 | trace("%s: Rexx object is %p",__FUNCTION__,session); | 112 | trace("%s: Rexx object is %p",__FUNCTION__,session); |
@@ -119,7 +120,8 @@ | @@ -119,7 +120,8 @@ | ||
119 | delete session; | 120 | delete session; |
120 | session = NULL; | 121 | session = NULL; |
121 | } | 122 | } |
122 | - g_mutex_clear(&mutex); | 123 | +#if GTK_CHECK_VERSION(2,32,0) |
124 | + g_mutex_clear(&mutex); #endif // GTK_CHECK_VERSION | ||
123 | return 0; | 125 | return 0; |
124 | } | 126 | } |
125 | 127 | ||
@@ -363,7 +365,8 @@ extern "C" | @@ -363,7 +365,8 @@ extern "C" | ||
363 | 365 | ||
364 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p",gtk_action_get_name(action),widget); | 366 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p",gtk_action_get_name(action),widget); |
365 | 367 | ||
366 | - if(!g_mutex_trylock(&mutex)) | 368 | +#if GTK_CHECK_VERSION(2,32,0) |
369 | + if(!g_mutex_trylock(&mutex)) #else if(!g_static_mutex_trylock(&mutex)) #endif // GTK_CHECK_VERSION | ||
367 | { | 370 | { |
368 | GtkWidget *dialog = gtk_message_dialog_new( GTK_WINDOW(gtk_widget_get_toplevel(widget)), | 371 | GtkWidget *dialog = gtk_message_dialog_new( GTK_WINDOW(gtk_widget_get_toplevel(widget)), |
369 | GTK_DIALOG_DESTROY_WITH_PARENT, | 372 | GTK_DIALOG_DESTROY_WITH_PARENT, |
@@ -422,7 +425,8 @@ extern "C" | @@ -422,7 +425,8 @@ extern "C" | ||
422 | } | 425 | } |
423 | 426 | ||
424 | gtk_action_set_sensitive(action,TRUE); | 427 | gtk_action_set_sensitive(action,TRUE); |
425 | - g_mutex_unlock(&mutex); | 428 | +#if GTK_CHECK_VERSION(2,32,0) |
429 | + g_mutex_unlock(&mutex); #else g_static_mutex_unlock(&mutex); #endif // GTK_CHECK_VERSION | ||
426 | 430 | ||
427 | } | 431 | } |
428 | 432 |