move selection code out of callbacks section
This commit is contained in:
		
							parent
							
								
									9d8cfcef84
								
							
						
					
					
						commit
						fd08745d2b
					
				
							
								
								
									
										12
									
								
								termite.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								termite.c
									
									
									
									
									
								
							| @ -73,12 +73,6 @@ void launch_browser(char *url) { | |||||||
|     g_spawn_async(NULL, browser_cmd, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); |     g_spawn_async(NULL, browser_cmd, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* {{{ CALLBACKS */ |  | ||||||
| void window_title_cb(VteTerminal *vte, GtkWindow *window) { |  | ||||||
|     const char * const t = vte_terminal_get_window_title(vte); |  | ||||||
|     gtk_window_set_title(window, t ? t : "termite"); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| static void update_selection(VteTerminal *vte, const select_info *select) { | static void update_selection(VteTerminal *vte, const select_info *select) { | ||||||
|     if (select->mode == SELECT_ON) { |     if (select->mode == SELECT_ON) { | ||||||
|         // a hack to use the selection as a cursor until a real one is implemented
 |         // a hack to use the selection as a cursor until a real one is implemented
 | ||||||
| @ -189,6 +183,12 @@ static void move_to_row_start(VteTerminal *vte, select_info *select, long row) { | |||||||
|     update_selection(vte, select); |     update_selection(vte, select); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /* {{{ CALLBACKS */ | ||||||
|  | void window_title_cb(VteTerminal *vte, GtkWindow *window) { | ||||||
|  |     const char * const t = vte_terminal_get_window_title(vte); | ||||||
|  |     gtk_window_set_title(window, t ? t : "termite"); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, search_panel_info *info) { | gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, search_panel_info *info) { | ||||||
|     const guint modifiers = event->state & gtk_accelerator_get_default_mod_mask(); |     const guint modifiers = event->state & gtk_accelerator_get_default_mod_mask(); | ||||||
|     gboolean dynamic_title = FALSE, urgent_on_bell = FALSE, clickable_url = FALSE; |     gboolean dynamic_title = FALSE, urgent_on_bell = FALSE, clickable_url = FALSE; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Micay
						Daniel Micay