Example #1
0
static gboolean
input_is_valid (GiggleCloneDialog *dialog)
{
	gboolean is_valid = FALSE;

	is_valid = entry_has_input (dialog->priv->remote_entry) &&
	           entry_has_input (dialog->priv->local_entry);
	return is_valid;
}
Example #2
0
static gboolean
pw_dialog_input_is_valid (GtkMountOperation *operation)
{
    GtkMountOperationPrivate *priv = operation->priv;
    gboolean is_valid = TRUE;

    is_valid = entry_has_input (priv->username_entry) &&
               entry_has_input (priv->domain_entry) &&
               entry_has_input (priv->password_entry);

    return is_valid;
}
Example #3
0
static gboolean
preset_local_name (GiggleCloneDialog *dialog,
                   GdkEventFocus     *event,
                   GtkWidget         *widget)
{
	if (!entry_has_input (widget))
		return FALSE;

	if (!entry_has_input (dialog->priv->local_entry)) {
		const gchar *remote;
		gchar *local;

		remote = gtk_entry_get_text (GTK_ENTRY (dialog->priv->remote_entry));
		local  = create_local_name_from_remote (remote);
		gtk_entry_set_text (GTK_ENTRY (dialog->priv->local_entry),
		                    local);
		g_free (local);
	}

	return FALSE;
}