about summary refs log tree commit diff stats
path: root/tests/test_cmd_rooms.h
blob: a9a7af832842e42e1e48ac825b0909c1c1ff478c (plain) (blame)
1
2
3
4
5
6
7
void cmd_rooms_shows_message_when_disconnected(void **state);
void cmd_rooms_shows_message_when_disconnecting(void **state);
void cmd_rooms_shows_message_when_connecting(void **state);
void cmd_rooms_shows_message_when_started(void **state);
void cmd_rooms_shows_message_when_undefined(void **state);
void cmd_rooms_uses_account_default_when_no_arg(void **state);
void cmd_rooms_arg_used_when_passed(void **state);
'/akspecs/ranger/blame/ranger/defaultui.py?id=0b5c4cbe45f18bb9b5cd412b3afbee59ae8d5a7b'>^
9506fb8e ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


                                          
 


                                
                        
                                                                     
                                              

                                 



                                                                         
                                                    




                                                          


                                                  
                         
                                       




                                          
                                   







                                                                                    
                                                
 
from ranger.gui.ui import UI as SuperClass
from ranger.gui.wdisplay import WDisplay
from ranger.gui.wtitlebar import WTitleBar

RATIO = ( 0.15, 0.15, 0.4, 0.3 )

class DefaultUI(SuperClass):
	def setup(self):
		self.titlebar = WTitleBar(self.win, self.colorscheme)
		self.add_widget(self.titlebar)

		self.displays = [
				WDisplay(self.win, self.colorscheme, -2),
				WDisplay(self.win, self.colorscheme, -1),
				WDisplay(self.win, self.colorscheme, 0),
				WDisplay(self.win, self.colorscheme, 1) ]
		self.main_display = self.displays[2]
		self.displays[2].display_infostring = True
		self.displays[2].main_display = True
		for disp in self.displays:
			self.add_widget(disp)
	
	def scroll(self, relative):
		self.main_display.scroll(relative)

	def resize(self):
		SuperClass.resize(self)
		y, x = self.win.getmaxyx()

		leftborder = 0

		i = 0
		for ratio in RATIO:
			wid = int(ratio * x)
			try:
				self.displays[i].setdim(1, leftborder, y-1, wid - 1)
			except KeyError:
				pass
			leftborder += wid
			i += 1

		self.titlebar.setdim(0, 0, 1, x)