make style consistent
This commit is contained in:
		
							parent
							
								
									8a2a053857
								
							
						
					
					
						commit
						c41934c5fd
					
				
							
								
								
									
										19
									
								
								termite.cc
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								termite.cc
									
									
									
									
									
								
							| @ -756,33 +756,30 @@ gboolean entry_key_press_cb(GtkEntry *entry, GdkEventKey *event, keybind_info *i | ||||
|         case GDK_KEY_7: | ||||
|         case GDK_KEY_8: | ||||
|         case GDK_KEY_9: | ||||
|             if(info->panel.mode == overlay_mode::urlselect && info->config.quick_url) | ||||
|             { | ||||
|             if (info->panel.mode == overlay_mode::urlselect && info->config.quick_url) { | ||||
|                 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; | ||||
|                 gboolean exalpha = FALSE; | ||||
|                 for(int i = 0; text[i] != '\0'; i++) { | ||||
|                     if(!g_ascii_isdigit(text[i])) {  | ||||
|                 for (unsigned i = 0; text[i] != '\0'; i++) { | ||||
|                     if (!g_ascii_isdigit(text[i])) { | ||||
|                         exalpha = TRUE; | ||||
|                         break; | ||||
|                     } | ||||
|                 } | ||||
|                 if(exalpha) | ||||
|                 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()); | ||||
|                 int url_num = (int)strlen(str_ptr); | ||||
|                 delete str_ptr; | ||||
|                 free(str_ptr); | ||||
|                 int inp_num = (int)strlen(fulltext); | ||||
|                 if(url_num == inp_num) | ||||
|                 { | ||||
|                 if (url_num == inp_num) { | ||||
|                     launch_url(info->config.browser, fulltext, &info->panel); | ||||
|                     ret = TRUE; | ||||
|                 } | ||||
|             } | ||||
|             break; | ||||
| 
 | ||||
|         case GDK_KEY_Tab: | ||||
|             synthesize_keypress(GTK_WIDGET(entry), GDK_KEY_Down); | ||||
|             return TRUE; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Micay
						Daniel Micay