Commit 1e843d2a84baabe83a1b7b2e1a5c4dd1f69abcc1

Authored by Perry Werneck
1 parent 39bade99

Fixing portability issue.

Showing 2 changed files with 7 additions and 4 deletions   Show diff stats
src/pw3270/tools.c
... ... @@ -79,7 +79,7 @@ int libpw3270_unloaded(void)
79 79 return 0;
80 80 }
81 81  
82   -
  82 +/*
83 83 LIB3270_EXPORT gchar * pw3270_build_filename(GtkWidget *widget, const gchar *first_element, ...)
84 84 {
85 85 va_list args;
... ... @@ -90,6 +90,7 @@ LIB3270_EXPORT gchar * pw3270_build_filename(GtkWidget *widget, const gchar *fir
90 90 va_end(args);
91 91 return path;
92 92 }
  93 +*/
93 94  
94 95 LIB3270_EXPORT void pw3270_save_window_size(GtkWidget *widget, const gchar *name)
95 96 {
... ...
src/pw3270/window.c
... ... @@ -769,16 +769,18 @@ static GtkWidget * trace_window = NULL;
769 769  
770 770 // Load UI
771 771 {
772   - gchar *path = pw3270_build_filename(GTK_WIDGET(widget),"ui",NULL);
  772 +#ifdef DEBUG
  773 + const char *path = "ui";
  774 +#else
  775 + lib3270_autoptr(char) path = lib3270_build_data_filename("ui",NULL);
  776 +#endif // DEBUG
773 777  
774 778 if(ui_parse_xml_folder(GTK_WINDOW(widget),path,groupname,popupname,widget->terminal,widget_setup))
775 779 {
776   - g_free(path);
777 780 gtk_widget_set_sensitive(widget->terminal,FALSE);
778 781 return;
779 782 }
780 783  
781   - g_free(path);
782 784 }
783 785  
784 786  
... ...