Commit 83eab83e156ef858800464956c127b6050fee40c
1 parent
f24b2b22
Exists in
master
and in
1 other branch
Fixing load 'dialog'.
Showing
1 changed file
with
1 additions
and
16 deletions
Show diff stats
src/dialogs/load.c
@@ -132,23 +132,8 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | @@ -132,23 +132,8 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | ||
132 | return; | 132 | return; |
133 | } | 133 | } |
134 | 134 | ||
135 | - if(g_str_has_suffix(text,G_DIR_SEPARATOR_S)) { | ||
136 | - gtk_widget_set_sensitive(button,FALSE); | ||
137 | - return; | ||
138 | - } | ||
139 | - | ||
140 | - g_autofree gchar * dirname = g_path_get_dirname(text); | ||
141 | - | ||
142 | - if(!g_file_test(dirname,G_FILE_TEST_IS_DIR)) { | ||
143 | - gtk_widget_set_sensitive(button,FALSE); | ||
144 | - return; | ||
145 | - } | ||
146 | - | ||
147 | - | ||
148 | - // g_autofree gchar * basename = g_path_get_basename(text); | ||
149 | - | 135 | + gtk_widget_set_sensitive(button,g_file_test(text, G_FILE_TEST_IS_REGULAR)); |
150 | 136 | ||
151 | - gtk_widget_set_sensitive(button,TRUE); | ||
152 | } | 137 | } |
153 | 138 | ||
154 | static void V3270LoadDialog_init(V3270LoadDialog *dialog) { | 139 | static void V3270LoadDialog_init(V3270LoadDialog *dialog) { |