Skip to content

Instantly share code, notes, and snippets.

@anaselli
anaselli / Test-YTree-multiselection.cpp
Last active August 29, 2015 14:17
test file to show that multiselection works on sub tree item with proposed patch
/*
* Copyright (c) 2015 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 / seek_tail.patch
Created May 15, 2015 15:33
Possible Linux::Systemd::Journal::Read::seek_tail patch
diff --git a/lib/Linux/Systemd/Journal/Read.pm b/lib/Linux/Systemd/Journal/Read.pm
index c24bfbd..f799cb2 100644
--- a/lib/Linux/Systemd/Journal/Read.pm
+++ b/lib/Linux/Systemd/Journal/Read.pm
@@ -42,7 +42,7 @@ Seeks to the end of the open journal.
sub seek_tail {
my $self = shift;
- __seek_tail($self->_j);
+ __seek_tail();
@anaselli
anaselli / test_yitems.pl
Created August 31, 2015 14:04
YItem comparison in perl
use yui;
my $factory = yui::YUI::widgetFactory;
my $dialog = $factory->createMainDialog;
my $vbox = $factory->createVBox( $dialog );
my $selMinSize = $factory->createMinSize($vbox, 50, 12);
my $sel = $factory->createSelectionBox($selMinSize, "Selection Box");
@anaselli
anaselli / test_yitems.py
Created August 31, 2015 14:06
YItem comparison in python
import sys
import yui
factory = yui.YUI.widgetFactory()
dialog = factory.createMainDialog()
VBox = factory.createVBox(dialog)
mySelMinSize = factory.createMinSize(VBox, 50, 12)
mySel = factory.createSelectionBox(mySelMinSize, "Selection Box")
@anaselli
anaselli / test_yitems.rb
Created August 31, 2015 14:07
YItem comparison in ruby
require '_yui'
factory = Yui::YUI::widget_factory
dialog = factory.create_main_dialog
vbox = factory.create_vbox dialog
mySelMinSize = factory.create_min_size(vbox, 50, 12)
mySel = factory.create_selection_box(mySelMinSize, "Selection Box")
mySel.set_notify(1);
@anaselli
anaselli / MultiplicationTablesReview.pl
Last active September 13, 2015 13:20
multiplication tables with libyui
#
# Copyright (C) 2015, Angelo Naselli.
#
# TThis program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- a/swig/yui.i.mga 2015-12-04 11:43:42.614392025 +0100
+++ a/swig/yui.i 2015-12-04 12:02:08.414341480 +0100
@@ -223,6 +223,7 @@ class Exception;
%include yui/YMultiLineEdit.h
%include yui/YMultiProgressMeter.h
%include yui/YMultiSelectionBox.h
+%include yui/YWizard.h
%include yui/YOptionalWidgetFactory.h
%include yui/YPackageSelector.h
%include yui/YPackageSelectorPlugin.h
@anaselli
anaselli / libyui-bindings-1.1.0-python3-YWidget-and-YItem.patch
Created December 5, 2015 23:58
python 3 binding YWidget comparison fails (and YItem too)
--- a/swig/yui.i 2015-12-05 21:09:48.996373277 +0100
+++ b/swig/yui.i 2015-12-06 00:22:11.517161595 +0100
@@ -278,8 +278,10 @@ class Exception;
{ return ($self != i); }
#endif
#if defined(SWIGPYTHON)
- int __cmp__( YItem *i )
- { return ($self - i); }
+ int __eq__( YItem *i )
+ { return ($self == i); }
@anaselli
anaselli / YTable_n_YItemCollection.py
Created March 22, 2016 09:11
YItemCollection issue in python bindings
import yui
# enable logging for debug
log = yui.YUILog.instance()
log.setLogFileName("debug.log")
log.enableDebugLogging( True )
factory = yui.YUI.widgetFactory()
dialog = factory.createMainDialog()
@anaselli
anaselli / manauser_tab_items-git.patch
Last active April 25, 2016 19:44
patches to manage yitems comparison in users/groups tab
diff --git a/lib/ManaTools/Module/Users.pm b/lib/ManaTools/Module/Users.pm
index 522b0d5..19509b3 100644
--- a/lib/ManaTools/Module/Users.pm
+++ b/lib/ManaTools/Module/Users.pm
@@ -205,6 +205,13 @@ sub _config_fileBuilder {
return $confDir . "/manauser";
}
+# users/groups tab
+has 'groups_users_tab' => (