@@ -81,6 +81,9 @@ module gtk_app |
| 81 | 81 | type(c_ptr), save :: open_finder_btn_ptr = c_null_ptr |
| 82 | 82 | type(c_ptr), save :: delete_btn_ptr = c_null_ptr |
| 83 | 83 | |
| 84 | + ! Open directory button pointer (for pulsing on empty tabs) |
| 85 | + type(c_ptr), save :: open_dir_btn_ptr = c_null_ptr |
| 86 | + |
| 84 | 87 | ! Drawing area pointer (for redrawing treemap) |
| 85 | 88 | type(c_ptr), save :: drawing_area_ptr = c_null_ptr |
| 86 | 89 | |
@@ -139,6 +142,7 @@ contains |
| 139 | 142 | back_btn_ptr = c_null_ptr |
| 140 | 143 | forward_btn_ptr = c_null_ptr |
| 141 | 144 | cancel_scan_btn_ptr = c_null_ptr |
| 145 | + open_dir_btn_ptr = c_null_ptr |
| 142 | 146 | end subroutine sniffly_app_quit |
| 143 | 147 | |
| 144 | 148 | ! Set the directory path to scan (call before sniffly_app_run) |
@@ -170,6 +174,7 @@ contains |
| 170 | 174 | path_entry_ptr = c_null_ptr |
| 171 | 175 | back_btn_ptr = c_null_ptr |
| 172 | 176 | forward_btn_ptr = c_null_ptr |
| 177 | + open_dir_btn_ptr = c_null_ptr |
| 173 | 178 | main_window_ptr = c_null_ptr |
| 174 | 179 | |
| 175 | 180 | ! Return FALSE (0) to allow the window to close |
@@ -233,6 +238,7 @@ contains |
| 233 | 238 | |
| 234 | 239 | ! Create Open Directory button with folder icon |
| 235 | 240 | open_dir_btn = gtk_button_new() |
| 241 | + open_dir_btn_ptr = open_dir_btn ! Store for later access (pulsing on empty tabs) |
| 236 | 242 | call gtk_button_set_icon_name(open_dir_btn, "folder-open"//c_null_char) |
| 237 | 243 | call gtk_widget_set_tooltip_text(open_dir_btn, "Open Directory (Ctrl+O)"//c_null_char) |
| 238 | 244 | call g_signal_connect(open_dir_btn, "clicked"//c_null_char, & |
@@ -896,12 +902,26 @@ contains |
| 896 | 902 | print *, " Active tab index: ", active_tab_index |
| 897 | 903 | print *, " Tab has_data: ", tab%has_data |
| 898 | 904 | |
| 899 | | - ! Only update if tab has data |
| 905 | + ! Check if tab has data |
| 900 | 906 | if (.not. tab%has_data) then |
| 901 | | - print *, " Tab has no data yet - skipping UI update" |
| 907 | + print *, " Tab has no data yet - showing empty tab UI" |
| 908 | + |
| 909 | + ! Add blue suggested-action class to open-dir button to draw attention |
| 910 | + if (c_associated(open_dir_btn_ptr)) then |
| 911 | + call gtk_widget_add_css_class(open_dir_btn_ptr, "suggested-action"//c_null_char) |
| 912 | + end if |
| 913 | + |
| 914 | + ! Update status bar to guide user |
| 915 | + call sniffly_update_status("No directory selected - click the folder icon to choose a directory") |
| 916 | + |
| 902 | 917 | return |
| 903 | 918 | end if |
| 904 | 919 | |
| 920 | + ! Tab has data - remove suggested-action class from open-dir button |
| 921 | + if (c_associated(open_dir_btn_ptr)) then |
| 922 | + call gtk_widget_remove_css_class(open_dir_btn_ptr, "suggested-action"//c_null_char) |
| 923 | + end if |
| 924 | + |
| 905 | 925 | ! Get the current view node |
| 906 | 926 | current_view => tab%current_view_node |
| 907 | 927 | if (.not. associated(current_view)) then |