[Howto] GTK3 with CSS (minimal example)

posted in: computer | 0

It is a working example for a button, which changes its color while mouse-over. gtk-version:   3.24.12-1 note:  the css-property “background-image: none” is sometimes mandatory, because the default theme prevents displaying the css-defined background-color. The workaround is to set the … Continued

[Howto] FreeBSD v12 and TP-Link TL-WN725N WLAN-Stick

posted in: computer | 0

OS: FreeBSD 12.0-RELEASE-p4 amd64 WLAN hardware: TP-Link TL-WN725N (builtin REALTEK RTL8188EU chipset) insert the USB WLAN-stick to your computer check, if the kernel recognizes the usb-stick: dmesg and check the output load the corresponding kernel-modules: kldload rtwn.ko and kldload if_rtwn_usb.ko … Continued

[Howto] enable column sorting in GTK+ views

posted in: computer | 0

it’s very simple, because you must only define a “sort-column-id” for the column (GTK Version 3.24.5-1) # define sort-column-id for a specific columngtk_tree_view_column_set_sort_column_id(GTK_TREE_VIEW_COLUMN(firstcolumn), 0) This function enables a “clickable column-header” and sorting (default: switches with every click between ascending/descending sortorder) … Continued

[Howto] speed-up a slow gtk_tree_view (GTK3)

posted in: computer | 0

problem: every time, when the model-data inside the GTK_TREE_VIEW is changed/updated, the whole view will be recalculated (e.g. auto-sizing of row height and column width). This behaviour can lead to massive cpu load and time consumption, because the recalculation will … Continued

[Facts] ZFS RAID-Z2 scrubbing speed

posted in: computer | 0

8-core CPU Intel Xeon E5-2665 64 GB DDR3 ECC RAM OS FreeBSD 11.212x hdd’s RAID-Z2 (5400 rpm, SATA-2, consumer-grade) 2x ssd’s L2ARC (SATA-2, consumer-grade) 1x ssd SLOG (SATA-2, consumer-grade) pool specs: 81% full, 40% fragmentationscrub CPU-load: 60..75 % on all … Continued

[Howto] GTK+ FileChooser-dialog example

posted in: computer | 0

GTK+ 3 example: open filechooser-dialog with 2 buttons, select file, click open, print filename to console, clear filename-memory, close filechooser-dialog GtkWidget *fc_dialog;GtkFileChooser *fc;char *filename;fc_dialog = gtk_file_chooser_dialog_new(“Title”, NULL, GTK_FILE_CHOOSER_ACTION_OPEN, “Abort”, GTK_RESPONSE_CANCEL, “Open”, GTK_RESPONSE_ACCEPT, NULL);gtk_widget_show(fc_dialog);if (gtk_dialog_run(GTK_DIALOG(fc_dialog)) == GTK_RESPONSE_ACCEPT){ fc = GTK_FILE_CHOOSER(fc_dialog); filename … Continued