To identify where widget sizes are set in the xtor repository, you'll want to look for specific GTK function calls and patterns. Here are the key files and search patterns to check:
Primary Files to Examine:
1. Main UI Files (likely locations):
src/main.c or main.c - Main window setup
src/gui.c, src/interface.c, or similar - UI construction
src/xtor.c - Main application file
- Any files with "window", "gui", "interface", or "ui" in the name
2. Header Files:
src/*.h files that might contain size constants or macros
Search Patterns to Look For:
Use grep or your editor's search function to find:
# Fixed widget sizes
grep -r "gtk_widget_set_size_request" src/
grep -r "set_size_request" src/
# Window sizing
grep -r "gtk_window_set_default_size" src/
grep -r "set_default_size" src/
# Fixed positioning (GtkFixed)
grep -r "gtk_fixed" src/
grep -r "GTK_FIXED" src/
# Hardcoded dimensions
grep -r -E "[0-9]{3,4}.*[0-9]{3,4}" src/ # Look for large numbers that might be pixel values
grep -r -E "(width|height|size).*[0-9]+" src/
# Container sizing
grep -r "gtk_container_set_border_width" src/
grep -r "gtk_box_set_spacing" src/
Common File Patterns in GTK Applications:
Look specifically in files named:
*gui*, *interface*, *window*, *dialog*
*main*, *app*, *xtor*
- Files that include GTK headers:
grep -l "gtk/gtk.h" src/*
Quick Repository Scan:
You can also do a broad search for size-related function calls:
# From the repository root
find . -name "*.c" -o -name "*.h" | xargs grep -l "size_request\|default_size\|set_size\|width\|height"
Typical Locations:
In most GTK applications, widget sizing is typically set in:
- Main window creation function - Sets overall window size
- Widget initialization functions - Individual widget sizes
- Layout/packing functions - Container and spacing settings
- Configuration/settings files - Sometimes sizes are stored as constants
What to Look For:
Once you find the relevant files, look for patterns like:
gtk_widget_set_size_request(widget, 800, 600); // Fixed sizes
gtk_window_set_default_size(GTK_WINDOW(window), 1200, 900); // Window size
gtk_container_set_border_width(GTK_CONTAINER(container), 20); // Spacing
If you can share the output of ls src/ or the main directory structure, I can give you more specific guidance on which files are most likely to contain the sizing code.