...
 
Commits (3)
version 3.28.1
--------------
Bugs fixed:
* Keep "create" button disabled until a file name is entered (#789766)
New or updated application translations:
* Catalan (Gil Forcada)
* Chinese (China) (Dingzhong Chen)
* Chinese (traditional) (Cheng-Chia Tseng)
* Polish (Piotr Drąg)
* Afrikaans (Pieter Schalk Schoeman)
* Русский (Stas Solovey)
New or updated manual translations:
* Galician (marcos)
version 3.28.0
--------------
......
project('file-roller', 'c',
license : 'GPL2+',
version : '3.28.0',
version : '3.28.1',
meson_version : '>=0.43'
)
......
This diff is collapsed.
......@@ -57,24 +57,6 @@ file_selector_destroy_cb (GtkWidget *widget,
}
static gboolean
utf8_only_spaces (const char *text)
{
const char *scan;
if (text == NULL)
return TRUE;
for (scan = text; *scan != 0; scan = g_utf8_next_char (scan)) {
gunichar c = g_utf8_get_char (scan);
if (! g_unichar_isspace (c))
return FALSE;
}
return TRUE;
}
static void dlg_add_folder_save_last_options (DialogData *data);
......@@ -127,15 +109,15 @@ file_selector_response_cb (GtkWidget *widget,
follow_links = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("follow_links_checkbutton")));
include_files = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("include_files_entry")));
if (utf8_only_spaces (include_files))
if (_g_utf8_all_spaces (include_files))
include_files = "*";
exclude_files = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("exclude_files_entry")));
if (utf8_only_spaces (exclude_files))
if (_g_utf8_all_spaces (exclude_files))
exclude_files = NULL;
exclude_folders = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("exclude_folders_entry")));
if (utf8_only_spaces (exclude_folders))
if (_g_utf8_all_spaces (exclude_folders))
exclude_folders = NULL;
files = fr_file_selector_dialog_get_selected_files (FR_FILE_SELECTOR_DIALOG (data->dialog));
......@@ -491,15 +473,15 @@ get_options_from_widgets (DialogData *data,
*no_symlinks = ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("follow_links_checkbutton")));
*include_files = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("include_files_entry")));
if (utf8_only_spaces (*include_files))
if (_g_utf8_all_spaces (*include_files))
*include_files = "";
*exclude_files = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("exclude_files_entry")));
if (utf8_only_spaces (*exclude_files))
if (_g_utf8_all_spaces (*exclude_files))
*exclude_files = "";
*exclude_folders = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("exclude_folders_entry")));
if (utf8_only_spaces (*exclude_folders))
if (_g_utf8_all_spaces (*exclude_folders))
*exclude_folders = "";
}
......
......@@ -126,6 +126,7 @@ fr_new_archive_dialog_init (FrNewArchiveDialog *self)
static void
_fr_new_archive_dialog_update_sensitivity (FrNewArchiveDialog *self)
{
gtk_widget_set_sensitive (gtk_dialog_get_widget_for_response (GTK_DIALOG (self), GTK_RESPONSE_OK), ! _g_utf8_all_spaces (gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("filename_entry")))));
gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (GET_WIDGET ("encrypt_header_checkbutton")), ! self->priv->can_encrypt_header);
gtk_widget_set_sensitive (GET_WIDGET ("encrypt_header_checkbutton"), self->priv->can_encrypt_header);
gtk_widget_set_sensitive (GET_WIDGET ("volume_spinbutton"), ! self->priv->can_create_volumes || gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("volume_checkbutton"))));
......@@ -133,8 +134,8 @@ _fr_new_archive_dialog_update_sensitivity (FrNewArchiveDialog *self)
static void
password_entry_changed_cb (GtkEditable *editable,
gpointer user_data)
entry_changed_cb (GtkEditable *editable,
gpointer user_data)
{
_fr_new_archive_dialog_update_sensitivity (FR_NEW_ARCHIVE_DIALOG (user_data));
}
......@@ -279,9 +280,13 @@ _fr_new_archive_dialog_construct (FrNewArchiveDialog *self,
/* Set the signals handlers. */
g_signal_connect (GET_WIDGET ("filename_entry"),
"changed",
G_CALLBACK (entry_changed_cb),
self);
g_signal_connect (GET_WIDGET ("password_entry"),
"changed",
G_CALLBACK (password_entry_changed_cb),
G_CALLBACK (entry_changed_cb),
self);
g_signal_connect (GET_WIDGET ("volume_checkbutton"),
"toggled",
......
......@@ -390,6 +390,27 @@ _g_str_get_static (const char *s)
}
/* utf8 */
gboolean
_g_utf8_all_spaces (const char *text)
{
const char *scan;
if (text == NULL)
return TRUE;
for (scan = text; *scan != 0; scan = g_utf8_next_char (scan)) {
gunichar c = g_utf8_get_char (scan);
if (! g_unichar_isspace (c))
return FALSE;
}
return TRUE;
}
/* string vector */
......
......@@ -90,6 +90,10 @@ const char * _g_str_get_last_field (const char *line,
int last_field);
const char * _g_str_get_static (const char *s);
/* utf8 */
gboolean _g_utf8_all_spaces (const char *text);
/* string vector */
char ** _g_strv_prepend (char **str_array,
......