-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new widgets: YMenuBar, YItemSelector #36
Conversation
@shundhammer looks ok to me. |
@dmulder : Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also add this python example under swig/python/examples
I have a build fix for the Travis failure... |
@shundhammer please cherry pick 2abc86f (and if you in the future make PRs from a branch in the main repo instead of from your fork, I will be able to simply add the commit instead of bothering you to do it) |
but keep working with 3.17 (in Leap 15.2 for example)
@anaselli I have added your example, but it has not worked for me until I applied the fix below. The runtime error was
and swig 4.0.2 was saying at compile time
I wonder if you've seen this. Fix: diff --git a/swig/yui.i b/swig/yui.i
index b90a336..55b3878 100644
--- a/swig/yui.i
+++ b/swig/yui.i
@@ -66,10 +66,10 @@ SWIGEXPORT void Init__yui(void) {
#include "yui/YMacro.h"
#include "yui/YMacroPlayer.h"
#include "yui/YMacroRecorder.h"
+#include "yui/YMenuWidget.h"
#include "yui/YMenuBar.h"
#include "yui/YMenuButton.h"
#include "yui/YMenuItem.h"
-#include "yui/YMenuWidget.h"
#include "yui/YMultiLineEdit.h"
#include "yui/YMultiProgressMeter.h"
#include "yui/YMultiSelectionBox.h"
@@ -224,10 +224,10 @@ class Exception;
%include yui/YMacro.h
%include yui/YMacroPlayer.h
%include yui/YMacroRecorder.h
+%include yui/YMenuWidget.h
%include yui/YMenuBar.h
%include yui/YMenuButton.h
%include yui/YMenuItem.h
-%include yui/YMenuWidget.h
%include yui/YMultiLineEdit.h
%include yui/YMultiProgressMeter.h
%include yui/YMultiSelectionBox.h |
@mvidner yes i wrote for those missing entries in my review comments... |
otherwise swig 4.0.2 says /usr/include/yui/YMenuBar.h:50: Warning 401: Base class 'YMenuWidget' undefined. /usr/include/yui/YMenuWidget.h:39: Warning 401: 'YMenuWidget' must be defined before it is used as a base class. and then it fails at runtime self.menubar.resolveShortcutConflicts() AttributeError: 'YMenuBar' object has no attribute 'resolveShortcutConflicts'
…nubar Added new widgets: YMenuBar, YItemSelector
This adds the new widgets that were added to libyui in recent months to the bindings:
This was requested by @anaselli so they can finally migrate from the MGAMenuBar to this new common YMenuBar.
Please notice that I don't know much about SWIG bindings; I just added lines that were similar to existing ones (YMenuButton).
Most of YMenuButton is now in a new base class YMenuWidget that is also inherited by YMenuBar, so both widgets share the parts that might be sensitive (
addItem( YWidget *item_disown )
).YItemSelector is another YSelectionWidget that also heavily relies on its base class; I don't expect any trouble there.
@dmulder : I was told you are interested in this package from the SUSE side. Can you have a look at this PR?