Skip to content

Instantly share code, notes, and snippets.

Angelo Naselli anaselli

Block or report user

Report or block anaselli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anaselli
anaselli / updater-icon.patch
Created Jun 26, 2019
Patch to overrideicon theme if option is passed to command line
View updater-icon.patch
diff --git a/dnfdragora/updater.py b/dnfdragora/updater.py
index 8e2ba89..ed67074 100644
--- a/dnfdragora/updater.py
+++ b/dnfdragora/updater.py
@@ -57,7 +57,8 @@ class Updater:
else:
icon_path = icon_path + '/dnfdragora.png'
- theme_icon_pathname = self.__get_theme_icon_pathname() or icon_path
+ theme_icon_pathname = icon_path if 'icon-path' in options.keys() else self.__get_theme_icon_pathname() or icon_path
@anaselli
anaselli / firewalld-client.py
Last active May 13, 2019
firewalld client connection and connection-changed event
View firewalld-client.py
from firewall.client import FirewallClient
import threading
from gi.repository import GLib
def fwConnectionChanged():
print ("event connection changed")
def glib_mainloop(loop):
loop.run()
@anaselli
anaselli / test-YtableCell.cc
Created Jan 27, 2018
Changing an YtableCell does not work as expected and looses a coulmn entry (Gtk and ncurses)
View test-YtableCell.cc
// g++ -I/usr/include/yui -lyui test-YtableCell.cc -o test-YtableCell
#include <sstream>
#include "YUI.h"
#include "YApplication.h"
#include "YWidgetFactory.h"
#include "YDialog.h"
#include "YLayoutBox.h"
#include "YEvent.h"
#include "YTable.h"
@anaselli
anaselli / progressbar.patch
Created Apr 10, 2017
Possible workaround to max recursion in progress bar set value and libyui gtk bindings
View progressbar.patch
diff --git a/dnfdragora/progress_ui.py b/dnfdragora/progress_ui.py
index 3096142..9840862 100644
--- a/dnfdragora/progress_ui.py
+++ b/dnfdragora/progress_ui.py
@@ -74,7 +74,10 @@ class ProgressBar:
def set_progress(self, frac, label=None) :
if label is not None:
self.progressbar.setLabel(label)
- self.progressbar.setValue(int(100*frac))
+ val = self.progressbar.value()
View Test-YTree-ncurses.cc
/*
* 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 / manauser_tab_items-git.patch
Last active Apr 25, 2016
patches to manage yitems comparison in users/groups tab
View manauser_tab_items-git.patch
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' => (
@anaselli
anaselli / YTable_n_YItemCollection.py
Created Mar 22, 2016
YItemCollection issue in python bindings
View YTable_n_YItemCollection.py
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 / libyui-bindings-1.1.0-python3-YWidget-and-YItem.patch
Created Dec 5, 2015
python 3 binding YWidget comparison fails (and YItem too)
View libyui-bindings-1.1.0-python3-YWidget-and-YItem.patch
--- 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); }
View ibyui-bindings-1.1.0-python-missing-constants.patch
--- 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 / MultiplicationTablesReview.pl
Last active Sep 13, 2015
multiplication tables with libyui
View MultiplicationTablesReview.pl
#
# 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
You can’t perform that action at this time.