Merge lp:~bdfhjk/clicompanion/fix-684336 into lp:clicompanion

Proposed by Marek Bardoński
Status: Merged
Approved by: Duane Hinnen
Approved revision: 72
Merged at revision: 71
Proposed branch: lp:~bdfhjk/clicompanion/fix-684336
Merge into: lp:clicompanion
Diff against target: 78 lines (+21/-11)
2 files modified
clicompanionlib/tabs.py (+6/-1)
clicompanionlib/view.py (+15/-10)
To merge this branch: bzr merge lp:~bdfhjk/clicompanion/fix-684336
Reviewer Review Type Date Requested Status
Duane Hinnen Approve
Review via email: mp+54162@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Duane Hinnen (duanedesign) wrote :

Look at the TODO: on line 145 of view.py.
I added that awhile back and thought it might be able to be used to fix this issue.
What do you think?
Do you think either solution has any advantage?
Thank you for your work on this.
Good Job!

review: Needs Information
Revision history for this message
Marek Bardoński (bardonski) wrote :

I look at this for about 2h

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

I look at this for about 2h

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

'''I will check it in two hours

lp:~bdfhjk/clicompanion/fix-684336 updated
72. By bdfhjk

better resolution get

Revision history for this message
Marek Bardoński (bdfhjk) wrote :

Yes.

I used it now.

Revision history for this message
Duane Hinnen (duanedesign) wrote :

Good job, looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'clicompanionlib/tabs.py'
--- clicompanionlib/tabs.py 2011-03-02 12:20:09 +0000
+++ clicompanionlib/tabs.py 2011-03-21 16:58:25 +0000
@@ -26,6 +26,7 @@
2626
27from clicompanionlib.utils import get_user_shell27from clicompanionlib.utils import get_user_shell
28import clicompanionlib.controller28import clicompanionlib.controller
29import view
2930
30CONFIGFILE = os.path.expanduser("~/.config/clicompanion/config")31CONFIGFILE = os.path.expanduser("~/.config/clicompanion/config")
31gcp=0;32gcp=0;
@@ -36,7 +37,11 @@
36 '''37 '''
37 def add_tab(self,widget, notebook):38 def add_tab(self,widget, notebook):
38 _vte = vte.Terminal()39 _vte = vte.Terminal()
39 _vte.set_size_request(700, 220)40 if view.NETBOOKMODE == 1:
41 _vte.set_size_request(700, 120)
42 else:
43 _vte.set_size_request(700, 220)
44
40 _vte.connect ("child-exited", lambda term: gtk.main_quit())45 _vte.connect ("child-exited", lambda term: gtk.main_quit())
41 _vte.fork_command(get_user_shell()) # Get the user's default shell46 _vte.fork_command(get_user_shell()) # Get the user's default shell
42 47
4348
=== modified file 'clicompanionlib/view.py'
--- clicompanionlib/view.py 2011-03-21 12:43:08 +0000
+++ clicompanionlib/view.py 2011-03-21 16:58:25 +0000
@@ -62,11 +62,17 @@
62 ('STRING', 0, 3),62 ('STRING', 0, 3),
63 ]63 ]
64FILTER = 064FILTER = 0
65NETBOOKMODE = 0
6566
6667
67class MainWindow():68class MainWindow():
68 liststore = gtk.ListStore(str, str, str)69 liststore = gtk.ListStore(str, str, str)
6970 screen = gtk.gdk.display_get_default().get_default_screen()
71 screen_size = screen.get_monitor_geometry(0)
72 height = screen.get_height() ## screen height ##
73 global NETBOOKMODE
74 if height < 750:
75 NETBOOKMODE = 1
70 ## open file containing command list and put it in a variable76 ## open file containing command list and put it in a variable
71 def update(self, liststore):77 def update(self, liststore):
72 try:78 try:
@@ -140,13 +146,6 @@
140 ##create the config file146 ##create the config file
141 conf_mod = Config()147 conf_mod = Config()
142 conf_mod.create_config()148 conf_mod.create_config()
143
144
145 #TODO: do we want to do this? Or just keep the height under 600.
146 ##Get user screen size##
147 #screen = gtk.gdk.display_get_default().get_default_screen()
148 #screen_size = screen.get_monitor_geometry(0)
149 #height = screen.get_height() ## screen height ##
150 149
151 ## Create UI widgets150 ## Create UI widgets
152 window = gtk.Window(gtk.WINDOW_TOPLEVEL)151 window = gtk.Window(gtk.WINDOW_TOPLEVEL)
@@ -157,8 +156,14 @@
157 notebook = gtk.Notebook()156 notebook = gtk.Notebook()
158157
159 ## set sizes and borders158 ## set sizes and borders
160 scrolledwindow.set_size_request(700, 220)159
161 window.set_default_size(700, 625)160 global NETBOOKMODE
161 if NETBOOKMODE == 1:
162 scrolledwindow.set_size_request(700, 200)
163 window.set_default_size(700, 500)
164 else:
165 scrolledwindow.set_size_request(700, 220)
166 window.set_default_size(700, 625)
162 window.set_border_width(10)167 window.set_border_width(10)
163 ## Sets the position of the window relative to the screen168 ## Sets the position of the window relative to the screen
164 window.set_position(gtk.WIN_POS_CENTER_ALWAYS)169 window.set_position(gtk.WIN_POS_CENTER_ALWAYS)

Subscribers

People subscribed via source and target branches