summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-07-02kconfig: gconf: remove init_tree_model()Masahiro Yamada
Move the relevant code into init_left_tree() or init_right_tree(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: remove global 'model1' and 'model2' variablesMasahiro Yamada
These variables are unnecessary because the current model can be retrieved using gtk_tree_view_get_model(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-02kconfig: gconf: use GtkTreeModelFilter to control row visibilityMasahiro Yamada
Currently, update_tree() adds/removes entries to show/hide rows. This approach is extremely complicated. Use the tree model filter to control row visibility instead. Do not toggle the MENU_CHANGED flag, as it is hard to control this correctly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: preserve menu selection when switching view modeMasahiro Yamada
Preserve the current menu selection when switching to a different view mode, as it improves usability. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: merge 'current' and 'browsed' global variablesMasahiro Yamada
The 'current' (SINGLE view) and 'browsed' (SPLIT_VIEW) variables serve similar purposes and are not needed at the same time. Merge them. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: remove global 'tree' variableMasahiro Yamada
Pass the tree store as a function parameter to make it clearer which tree is being updated. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: make introduction, about, license dialogs modalMasahiro Yamada
These are modal dialogs in xconfig. Make them modal in gconfig as well. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-02kconfig: gconf: refactor replace_button_icon()Masahiro Yamada
The "window" and "style" arguments for replace_button_icon() are now unused. Remove them and refactor the function accordingly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: use GdkPixbuf in replace_button_icon()Masahiro Yamada
gdk_pixmap_create_from_xpm_d has been deprecated since version 2.22. Use a GdkPixbuf instead. You can use gdk_pixbuf_new_from_xpm_data() to create it. [1] [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gdk/gdkpixmap.c#L742 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: use GtkFileChooser in on_save_as1_activate()Masahiro Yamada
gtk_file_selection_new() is deprecated, and gtk_file_chooser_dialog_new() should be used instead. [1] [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/docs/reference/gtk/tmpl/gtkfilesel.sgml?ref_type=tags#L156 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-02kconfig: gconf: use GtkFileChooser in on_load1_activate()Masahiro Yamada
gtk_file_selection_new() is deprecated, and gtk_file_chooser_dialog_new() should be used instead. [1] [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/docs/reference/gtk/tmpl/gtkfilesel.sgml?ref_type=tags#L156 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-02kconfig: gconf: add on_save_clicked() event handlerMasahiro Yamada
The "clicked" event handler for GtkToolButton takes the GtkToolButton* as the first parameter. This is different from the existing on_save_activate() handler. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: avoid hardcoding model* in on_treeview*_button_press_event()Masahiro Yamada
It is better not to hardcode model1 or model2 for consistency. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: avoid hardcoding model2 in renderer_edited()Masahiro Yamada
Although this is only used in the right tree view, it is better not to hardcode model2 for consistency. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: avoid hardcoding model2 in on_treeview2_cursor_changed()Masahiro Yamada
The on_treeview2_cursor_changed() handler is connected to both the left and right tree views, but it hardcodes model2 (the GtkTreeModel of the right tree view). This is incorrect. Get the associated model from the view. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: make key_press_event work in left pane tooMasahiro Yamada
Currently, on_treeview2_key_press_event() returns early for the tree1 widget. We can make it work on the left pane as well by avoiding the hardcoded use of model2. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: remove glade_xml_signal_autoconnect() callMasahiro Yamada
Now that all signals are connected manually, this is no longer necessary. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: add static qualifiers to event handlersMasahiro Yamada
This fixes several -Wmissing-prototypes warnings. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-02kconfig: gconf: move button1 and save1 initialization codeMasahiro Yamada
Move the relevant initialization code closer together. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: move the main window event handlers belowMasahiro Yamada
This allows removal of the forward delcaration of on_save_activate(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-02kconfig: gconf: grey out button for current viewMasahiro Yamada
This clarifies which view is currently selected. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-02kconfig: gconf: refactor view setting codeMasahiro Yamada
Factor out common code for setting the view into a new function, set_view_mode(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-01kconfig: gconf: move init_*() functions belowMasahiro Yamada
This allows removal of the forward declaration of renderer_edited(). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: add static qualifiers to variablesMasahiro Yamada
I also removed unnecessary initializers. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove unused 'color' variableMasahiro Yamada
This is not used at all. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove unneeded variables in on_treeview*_button_press_event()Masahiro Yamada
Not all position parameters are used here. Passing NULL to gtk_tree_view_get_cursor() or gtk_tree_view_get_path_at_pos() is allowed. [1] [2] [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtktreeview.c#L12638 [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtktreeview.c#L12795 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove unneeded variable in on_split_clicked()Masahiro Yamada
The height of the window is not used here. Passing NULL to gtk_window_get_default_size() is allowed. [1] [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtkwindow.c#L3974 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove unnecessary NULL checks for tree1 and tree2Masahiro Yamada
The tree1 and tree2 variables are initialized earlier in init_tree_model(), so the NULL checks are redundant. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove parents[] array and indent variableMasahiro Yamada
The parents[] array is used to store the GtkTreeIter of parent nodes, but this can be simplified: we can pass a GtkTreeIter pointer down when _display_tree() recurses. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove internal-child="image" nodes from gladeMasahiro Yamada
These nodes do not appear to serve anything useful. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove unnecessary gtk_set_locale() callMasahiro Yamada
gtk_set_locale() has been deprecated since version 2.24, and setlocale() should be used directly. [1] However, gtk_init() automatically does this, so there is typically no point in calling this function. [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/2.24.33/gtk/gtkmain.c#L1152 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove gtk_tree_view_set_rules_hint() callsMasahiro Yamada
The use of the this function is not recommended, and it has been deprecated since GTK 3.14. [1]: https://gitlab.gnome.org/GNOME/gtk/-/blob/3.14.0/gtk/gtktreeview.c#L11891 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove gtk_widget_realize() callsMasahiro Yamada
This function is primarily used in widget implementations, and isn't very useful otherwise. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove gtk_tree_view_column_set_visible() callsMasahiro Yamada
The columns are visible by default. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove unneeded gtk_tree_view_set_headers_visible() callsMasahiro Yamada
The headers are visible by default. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: remove meaningless code in init_main_window()Masahiro Yamada
The 'widget' variable is set, but not used in later code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-01kconfig: gconf: remove empty if-blockMasahiro Yamada
This if-block is empty. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-07-01kconfig: gconf: remove old #ifdef GTK_CHECK_VERSIONMasahiro Yamada
Remove old code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-07-01kconfig: gconf: always destroy dialog in on_window1_delete_event()Masahiro Yamada
When gtk_dialog_run() returns GTK_RESPONSE_YES or GTK_RESPONSE_NO, gtk_widget_destroy() is not called, resulting in a memory leak. It is better to always destroy the dialog, even if the application is about to exit. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-30kconfig: gconf: fix potential memory leak in renderer_edited()Masahiro Yamada
If gtk_tree_model_get_iter() fails, gtk_tree_path_free() is not called. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-30kconfig: gconf: make columns resizableMasahiro Yamada
The variable "resizeable" is a typo and always set to FALSE, resulting in dead code in init_right_tree(). It is unclear column resizing should be disabled. Enable it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-30kconfig: re-add menu_get_parent_menu() that returns parent menuMasahiro Yamada
This helper returns the parent menu, or NULL if there is no parent. The main difference from the previous version is that it always returns the parent menu even when the given argument is itself a menu. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-30kconfig: rename menu_get_parent_menu() to menu_get_menu_or_parent_menu()Masahiro Yamada
The current menu_get_parent_menu() does not always return the parent menu; if the given argument is itself a menu, it returns that menu. Rename this function to better reflect this behavior. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-30kconfig: qconf: show selected choice in the Value columnMasahiro Yamada
It is useful to display the selected choice's value in the Value column. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-30kconfig: qconf: do not show checkbox icon for choiceMasahiro Yamada
When you select "Show All Options" or "Show Prompt Options", choice entries display a check box icon, but this has no point because choice is always y since commit fde192511bdb ("kconfig: remove tristate choice support"). Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org>
2025-06-28kconfig: set MENU_CHANGED to choice when the selected member is changedMasahiro Yamada
In gconf, choice entries display the selected symbol in the 'Value' column, but it is not updated when the selected symbol is changed. Set the MENU_CHANGED flag, so it is updated. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-06-24module: remove meaningless 'name' parameter from __MODULE_INFO()Masahiro Yamada
The symbol names in the .modinfo section are never used and already randomized by the __UNIQUE_ID() macro. Therefore, the second parameter of __MODULE_INFO() is meaningless and can be removed to simplify the code. With this change, the symbol names in the .modinfo section will be prefixed with __UNIQUE_ID_modinfo, making it clearer that they originate from MODULE_INFO(). [Before] $ objcopy -j .modinfo vmlinux.o modinfo.o $ nm -n modinfo.o | head -n10 0000000000000000 r __UNIQUE_ID_license560 0000000000000011 r __UNIQUE_ID_file559 0000000000000030 r __UNIQUE_ID_description558 0000000000000074 r __UNIQUE_ID_license580 000000000000008e r __UNIQUE_ID_file579 00000000000000bd r __UNIQUE_ID_description578 00000000000000e6 r __UNIQUE_ID_license581 00000000000000ff r __UNIQUE_ID_file580 0000000000000134 r __UNIQUE_ID_description579 0000000000000179 r __UNIQUE_ID_uncore_no_discover578 [After] $ objcopy -j .modinfo vmlinux.o modinfo.o $ nm -n modinfo.o | head -n10 0000000000000000 r __UNIQUE_ID_modinfo560 0000000000000011 r __UNIQUE_ID_modinfo559 0000000000000030 r __UNIQUE_ID_modinfo558 0000000000000074 r __UNIQUE_ID_modinfo580 000000000000008e r __UNIQUE_ID_modinfo579 00000000000000bd r __UNIQUE_ID_modinfo578 00000000000000e6 r __UNIQUE_ID_modinfo581 00000000000000ff r __UNIQUE_ID_modinfo580 0000000000000134 r __UNIQUE_ID_modinfo579 0000000000000179 r __UNIQUE_ID_modinfo578 Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
2025-06-24kheaders: double-quote variables to satisfy shellcheckMasahiro Yamada
Fix the following: In kernel/gen_kheaders.sh line 48: -I $XZ -cf $tarfile -C "${tmpdir}/" . > /dev/null ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-06-24kheaders: rebuild kheaders_data.tar.xz when KBUILD_BUILD_TIMESTAMP is changedMasahiro Yamada
This problem is similar to commit 7f8256ae0efb ("initramfs: Encode dependency on KBUILD_BUILD_TIMESTAMP"): kernel/gen_kheaders.sh has an internal dependency on KBUILD_BUILD_TIMESTAMP that is not exposed to make, so changing KBUILD_BUILD_TIMESTAMP will not trigger a rebuild of the archive. Move $(KBUILD_BUILD_TIMESTAMP) to the Makefile so that is is recorded in the *.cmd file. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2025-06-24kheaders: rebuild kheaders_data.tar.xz when a file is modified within a minuteMasahiro Yamada
When a header file is changed, kernel/gen_kheaders.sh may fail to update kernel/kheaders_data.tar.xz. [steps to reproduce] [1] Build kernel/kheaders_data.tar.xz $ make -j$(nproc) kernel/kheaders.o DESCEND objtool INSTALL libsubcmd_headers CALL scripts/checksyscalls.sh CHK kernel/kheaders_data.tar.xz GEN kernel/kheaders_data.tar.xz CC kernel/kheaders.o [2] Modify a header without changing the file size $ sed -i s/0xdeadbeef/0xfeedbeef/ include/linux/elfnote.h [3] Rebuild kernel/kheaders_data.tar.xz $ make -j$(nproc) kernel/kheaders.o DESCEND objtool INSTALL libsubcmd_headers CALL scripts/checksyscalls.sh CHK kernel/kheaders_data.tar.xz kernel/kheaders_data.tar.xz is not updated if steps [1] - [3] are run within the same minute. The headers_md5 variable stores the MD5 hash of the 'ls -l' output for all header files. This hash value is used to determine whether kheaders_data.tar.xz needs to be rebuilt. However, 'ls -l' prints the modification times with minute-level granularity. If a file is modified within the same minute and its size remains the same, the MD5 hash does not change. To reliably detect file modifications, this commit rewrites kernel/gen_kheaders.sh to output header dependencies to kernel/.kheaders_data.tar.xz.cmd. Then, Make compares the timestamps and reruns kernel/gen_kheaders.sh when necessary. This is the standard mechanism used by Make and Kbuild. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>