check for non-digits isn't necessary

launch_url does this already
This commit is contained in:
Daniel Micay 2013-02-20 02:38:19 -05:00
parent c41934c5fd
commit f0c3f1a0f6
1 changed files with 0 additions and 9 deletions

View File

@ -760,15 +760,6 @@ gboolean entry_key_press_cb(GtkEntry *entry, GdkEventKey *event, keybind_info *i
const char *const text = gtk_entry_get_text(entry); const char *const text = gtk_entry_get_text(entry);
char *fulltext = g_strndup(text, strlen(text) + 1); char *fulltext = g_strndup(text, strlen(text) + 1);
fulltext[strlen(text)] = (char)event->keyval; fulltext[strlen(text)] = (char)event->keyval;
gboolean exalpha = FALSE;
for (unsigned i = 0; text[i] != '\0'; i++) {
if (!g_ascii_isdigit(text[i])) {
exalpha = TRUE;
break;
}
}
if (exalpha)
break;
char *str_ptr = (char*)malloc(sizeof(text)); char *str_ptr = (char*)malloc(sizeof(text));
sprintf(str_ptr, "%d", (int)info->panel.url_list.size()); sprintf(str_ptr, "%d", (int)info->panel.url_list.size());
int url_num = (int)strlen(str_ptr); int url_num = (int)strlen(str_ptr);