Skip to content

Instantly share code, notes, and snippets.

/*
Copyright (c) 2014 Angelo Naselli <anaselli@linux.it>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
/*
Copyright (c) 2014 Angelo Naselli <anaselli@linux.it>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
diff --git a/examples/ManyWidgets.cc b/examples/ManyWidgets.cc
index 252cd3a..3069b0c 100644
--- a/examples/ManyWidgets.cc
+++ b/examples/ManyWidgets.cc
@@ -392,7 +392,6 @@ int main( int argc, char **argv )
}
}
- std::string TEST = "Test string";
frame = YUI::widgetFactory()->createCheckBoxFrame( hbox, "Tree", false );
diff --git a/src/NCTree.cc b/src/NCTree.cc
index 9c77a37..69a4124 100644
--- a/src/NCTree.cc
+++ b/src/NCTree.cc
@@ -488,7 +488,31 @@ void NCTree::CreateTreeLines( NCTreeLine * parentLine, NCTreePad * pad, YItem *
NCTreeLine * line = new NCTreeLine( parentLine, treeItem, multiSel );
pad->Append( line );
-
+
/*
Copyright (c) 2014 Angelo Naselli <anaselli@linux.it>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@anaselli
anaselli / LinkOnRichText.patch
Created November 7, 2014 12:01
Patch to workaround ncurses problem on RichText link management
iff --git a/src/NCRichText.cc b/src/NCRichText.cc
index ca1ded0..ba82fd5 100644
--- a/src/NCRichText.cc
+++ b/src/NCRichText.cc
@@ -276,7 +276,8 @@ NCursesEvent NCRichText::wHandleInput( wint_t key )
std::string str;
NCstring::RecodeFromWchar( anchors[armed].target, "UTF-8", &str );
yuiMilestone() << "LINK: " << str << std::endl;
- ret.selection = new YMenuItem( str );
+ ret.result = str;
diff --git a/swig/yui.i b/swig/yui.i
index ec38584..8373555 100644
--- a/swig/yui.i
+++ b/swig/yui.i
@@ -270,6 +270,15 @@ class Exception;
}
#endif
+%extend YItem {
+#if defined(SWIGPERL5)
@anaselli
anaselli / Test-YTree-selection.cpp
Created February 20, 2015 14:04
test file to show that sub tree item are not selected
/*
* Copyright (c) 2014 Angelo Naselli <anaselli@linux.it>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@anaselli
anaselli / BUILD_ARCH.patch
Created March 18, 2015 09:03
Orion context broker build arch patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4996227..5705083 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -130,11 +130,11 @@ include_directories("/usr/include")
# Library directories
#
MESSAGE("Building for ${BUILD_ARCH}")
-if (${BUILD_ARCH} STREQUAL "x86_64")
+if ("${BUILD_ARCH}" STREQUAL "x86_64")