bzr branch
http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
1 |
# Copyright (C) 2006 by Szilveszter Farkas (Phanatic) <szilveszter.farkas@gmail.com>
|
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
2 |
#
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
3 |
# This program is free software; you can redistribute it and/or modify
|
4 |
# it under the terms of the GNU General Public License as published by
|
|
5 |
# the Free Software Foundation; either version 2 of the License, or
|
|
6 |
# (at your option) any later version.
|
|
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
7 |
#
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
8 |
# This program is distributed in the hope that it will be useful,
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11 |
# GNU General Public License for more details.
|
|
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
12 |
#
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
13 |
# You should have received a copy of the GNU General Public License
|
14 |
# along with this program; if not, write to the Free Software
|
|
15 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
16 |
||
17 |
import sys |
|
18 |
||
19 |
try: |
|
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
20 |
import pygtk |
21 |
pygtk.require("2.0") |
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
22 |
except: |
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
23 |
pass
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
24 |
try: |
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
25 |
import gtk |
26 |
import gtk.glade |
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
27 |
except: |
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
28 |
sys.exit(1) |
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
29 |
|
0.8.53
by Szilveszter Farkas (Phanatic)
Set sensitivity of menus and toolbuttons. |
30 |
from olive.backend.info import is_branch |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
31 |
import olive.backend.errors as errors |
32 |
||
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
33 |
from dialog import OliveDialog |
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
34 |
from menu import OliveMenu |
0.8.72
by Szilveszter Farkas (Phanatic)
Merge from Richard Ferguson's development branch. |
35 |
from launch import launch |
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
36 |
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
37 |
class OliveHandler: |
38 |
""" Signal handler class for Olive. """ |
|
0.8.15
by Szilveszter Farkas (Phanatic)
2006-07-18 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
39 |
def __init__(self, gladefile, comm): |
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
40 |
self.gladefile = gladefile |
0.8.15
by Szilveszter Farkas (Phanatic)
2006-07-18 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
41 |
self.comm = comm |
42 |
||
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
43 |
self.dialog = OliveDialog(self.gladefile) |
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
44 |
|
45 |
self.menu = OliveMenu(self.gladefile, self.comm, self.dialog) |
|
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
46 |
|
47 |
def on_about_activate(self, widget): |
|
48 |
self.dialog.about() |
|
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
49 |
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
50 |
def on_menuitem_add_files_activate(self, widget): |
51 |
""" Add file(s)... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
52 |
from add import OliveAdd |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
53 |
add = OliveAdd(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
54 |
add.display() |
55 |
||
0.8.22
by Szilveszter Farkas (Phanatic)
2006-07-31 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
56 |
def on_menuitem_branch_get_activate(self, widget): |
57 |
""" Branch/Get... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
58 |
from branch import OliveBranch |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
59 |
branch = OliveBranch(self.gladefile, self.comm, self.dialog) |
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
60 |
branch.display() |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
61 |
|
0.8.22
by Szilveszter Farkas (Phanatic)
2006-07-31 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
62 |
def on_menuitem_branch_checkout_activate(self, widget): |
63 |
""" Branch/Checkout... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
64 |
from checkout import OliveCheckout |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
65 |
checkout = OliveCheckout(self.gladefile, self.comm, self.dialog) |
0.8.22
by Szilveszter Farkas (Phanatic)
2006-07-31 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
66 |
checkout.display() |
67 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
68 |
def on_menuitem_branch_commit_activate(self, widget): |
69 |
""" Branch/Commit... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
70 |
from commit import OliveCommit |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
71 |
commit = OliveCommit(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
72 |
commit.display() |
73 |
||
0.8.66
by Szilveszter Farkas (Phanatic)
Implemented Missing revisions functionality. |
74 |
def on_menuitem_branch_missing_revisions_activate(self, widget): |
75 |
""" Branch/Missing revisions menu handler. """ |
|
76 |
import olive.backend.update as update |
|
77 |
||
78 |
self.comm.set_busy(self.comm.window_main) |
|
79 |
||
80 |
try: |
|
81 |
ret = update.missing(self.comm.get_path()) |
|
82 |
except errors.NotBranchError: |
|
83 |
self.dialog.error_dialog(_('Directory is not a branch'), |
|
84 |
_('You can perform this action only in a branch.')) |
|
85 |
except errors.ConnectionError: |
|
86 |
self.dialog.error_dialog(_('Connection error'), |
|
87 |
_('Cannot connect to remote location.\nPlease try again later.')) |
|
88 |
except errors.NoLocationKnown: |
|
89 |
self.dialog.error_dialog(_('Parent location is unknown'), |
|
90 |
_('Cannot determine missing revisions if no parent location is known.')) |
|
91 |
else: |
|
92 |
if ret > 0: |
|
93 |
self.dialog.info_dialog(_('There are missing revisions'), |
|
94 |
_('%d revision(s) missing.') % ret) |
|
95 |
else: |
|
96 |
self.dialog.info_dialog(_('Local branch up to date'), |
|
97 |
_('There are no missing revisions.')) |
|
98 |
||
99 |
self.comm.set_busy(self.comm.window_main, False) |
|
100 |
||
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
101 |
def on_menuitem_branch_pull_activate(self, widget): |
102 |
""" Branch/Pull menu handler. """ |
|
103 |
import olive.backend.update as update |
|
104 |
||
105 |
self.comm.set_busy(self.comm.window_main) |
|
106 |
||
107 |
try: |
|
108 |
ret = update.pull(self.comm.get_path()) |
|
109 |
except errors.NotBranchError: |
|
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
110 |
self.dialog.error_dialog(_('Directory is not a branch'), |
111 |
_('You can perform this action only in a branch.')) |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
112 |
except errors.NoLocationKnown: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
113 |
self.dialog.error_dialog(_('Parent location is unknown'), |
114 |
_('Pulling is not possible until there is no parent location.')) |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
115 |
else: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
116 |
self.dialog.info_dialog(_('Pull successful'), |
117 |
_('%d revision(s) pulled.') % ret) |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
118 |
|
119 |
self.comm.set_busy(self.comm.window_main, False) |
|
120 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
121 |
def on_menuitem_branch_push_activate(self, widget): |
122 |
""" Branch/Push... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
123 |
from push import OlivePush |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
124 |
push = OlivePush(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
125 |
push.display() |
126 |
||
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
127 |
def on_menuitem_branch_status_activate(self, widget): |
128 |
""" Branch/Status... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
129 |
from status import OliveStatus |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
130 |
status = OliveStatus(self.gladefile, self.comm, self.dialog) |
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
131 |
status.display() |
132 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
133 |
def on_menuitem_branch_initialize_activate(self, widget): |
134 |
""" Initialize current directory. """ |
|
135 |
import olive.backend.init as init |
|
136 |
||
137 |
try: |
|
138 |
init.init(self.comm.get_path()) |
|
139 |
except errors.AlreadyBranchError, errmsg: |
|
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
140 |
self.dialog.error_dialog(_('Directory is already a branch'), |
141 |
_('The current directory (%s) is already a branch.\nYou can start using it, or initialize another directory.') % errmsg) |
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
142 |
except errors.BranchExistsWithoutWorkingTree, errmsg: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
143 |
self.dialog.error_dialog(_('Branch without a working tree'), |
144 |
_('The current directory (%s)\nis a branch without a working tree.') % errmsg) |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
145 |
except: |
146 |
raise
|
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
147 |
else: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
148 |
self.dialog.info_dialog(_('Ininialize successful'), |
149 |
_('Directory successfully initialized.')) |
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
150 |
self.comm.refresh_right() |
151 |
||
0.8.37
by Szilveszter Farkas (Phanatic)
Implemented Make directory functionality; some cleanups. |
152 |
def on_menuitem_file_make_directory_activate(self, widget): |
153 |
""" File/Make directory... menu handler. """ |
|
154 |
from mkdir import OliveMkdir |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
155 |
mkdir = OliveMkdir(self.gladefile, self.comm, self.dialog) |
0.8.37
by Szilveszter Farkas (Phanatic)
Implemented Make directory functionality; some cleanups. |
156 |
mkdir.display() |
157 |
||
0.8.38
by Szilveszter Farkas (Phanatic)
Implemented Move functionality; move() backend code refined. |
158 |
def on_menuitem_file_move_activate(self, widget): |
159 |
""" File/Move... menu handler. """ |
|
160 |
from move import OliveMove |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
161 |
move = OliveMove(self.gladefile, self.comm, self.dialog) |
0.8.38
by Szilveszter Farkas (Phanatic)
Implemented Move functionality; move() backend code refined. |
162 |
move.display() |
163 |
||
0.8.40
by Szilveszter Farkas (Phanatic)
Implemented Rename functionality. |
164 |
def on_menuitem_file_rename_activate(self, widget): |
165 |
""" File/Rename... menu handler. """ |
|
166 |
from rename import OliveRename |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
167 |
rename = OliveRename(self.gladefile, self.comm, self.dialog) |
0.8.40
by Szilveszter Farkas (Phanatic)
Implemented Rename functionality. |
168 |
rename.display() |
169 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
170 |
def on_menuitem_remove_file_activate(self, widget): |
171 |
""" Remove (unversion) selected file. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
172 |
from remove import OliveRemove |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
173 |
remove = OliveRemove(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
174 |
remove.display() |
175 |
||
0.8.28
by Szilveszter Farkas (Phanatic)
Statistics menu added |
176 |
def on_menuitem_stats_diff_activate(self, widget): |
177 |
""" Statistics/Differences... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
178 |
from diff import OliveDiff |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
179 |
diff = OliveDiff(self.gladefile, self.comm, self.dialog) |
0.8.28
by Szilveszter Farkas (Phanatic)
Statistics menu added |
180 |
diff.display() |
181 |
||
0.8.42
by Szilveszter Farkas (Phanatic)
Implemented Informations functionality; some bzrlib API changes handled. |
182 |
def on_menuitem_stats_infos_activate(self, widget): |
183 |
""" Statistics/Informations... menu handler. """ |
|
184 |
from info import OliveInfo |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
185 |
info = OliveInfo(self.gladefile, self.comm, self.dialog) |
0.8.42
by Szilveszter Farkas (Phanatic)
Implemented Informations functionality; some bzrlib API changes handled. |
186 |
info.display() |
187 |
||
0.8.43
by Szilveszter Farkas (Phanatic)
Implemented Log functionality (via bzrk). |
188 |
def on_menuitem_stats_log_activate(self, widget): |
189 |
""" Statistics/Log... menu handler. """ |
|
190 |
from log import OliveLog |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
191 |
log = OliveLog(self.gladefile, self.comm, self.dialog) |
0.8.43
by Szilveszter Farkas (Phanatic)
Implemented Log functionality (via bzrk). |
192 |
log.display() |
193 |
||
0.8.49
by Szilveszter Farkas (Phanatic)
Added View menu; implemented Refresh; some TODO changes. |
194 |
def on_menuitem_view_refresh_activate(self, widget): |
195 |
""" View/Refresh menu handler. """ |
|
196 |
# Refresh the left pane
|
|
197 |
self.comm.refresh_left() |
|
198 |
# Refresh the right pane
|
|
199 |
self.comm.refresh_right() |
|
200 |
||
201 |
def on_menuitem_view_show_hidden_files_activate(self, widget): |
|
202 |
""" View/Show hidden files menu handler. """ |
|
203 |
if widget.get_active(): |
|
204 |
# Show hidden files
|
|
205 |
self.comm.pref.set_preference('dotted_files', True) |
|
206 |
self.comm.pref.refresh() |
|
207 |
self.comm.refresh_right() |
|
208 |
else: |
|
209 |
# Do not show hidden files
|
|
210 |
self.comm.pref.set_preference('dotted_files', False) |
|
211 |
self.comm.pref.refresh() |
|
212 |
self.comm.refresh_right() |
|
213 |
||
0.8.33
by Szilveszter Farkas (Phanatic)
Implemented bookmarking. |
214 |
def on_treeview_left_button_press_event(self, widget, event): |
215 |
""" Occurs when somebody right-clicks in the bookmark list. """ |
|
216 |
if event.button == 3: |
|
0.8.72
by Szilveszter Farkas (Phanatic)
Merge from Richard Ferguson's development branch. |
217 |
# Don't show context with nothing selected
|
218 |
if self.comm.get_selected_left() == None: |
|
219 |
return
|
|
220 |
||
0.8.33
by Szilveszter Farkas (Phanatic)
Implemented bookmarking. |
221 |
self.menu.left_context_menu().popup(None, None, None, 0, |
0.8.41
by Szilveszter Farkas (Phanatic)
Main window preferences (size, position) are stored. |
222 |
event.time) |
0.8.33
by Szilveszter Farkas (Phanatic)
Implemented bookmarking. |
223 |
|
224 |
def on_treeview_left_row_activated(self, treeview, path, view_column): |
|
225 |
""" Occurs when somebody double-clicks or enters an item in the |
|
226 |
bookmark list. """
|
|
0.8.72
by Szilveszter Farkas (Phanatic)
Merge from Richard Ferguson's development branch. |
227 |
|
228 |
newdir = self.comm.get_selected_left() |
|
229 |
if newdir == None: |
|
230 |
return
|
|
231 |
||
0.8.33
by Szilveszter Farkas (Phanatic)
Implemented bookmarking. |
232 |
self.comm.set_busy(treeview) |
233 |
self.comm.set_path(newdir) |
|
234 |
self.comm.refresh_right() |
|
235 |
self.comm.set_busy(treeview, False) |
|
236 |
||
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
237 |
def on_treeview_right_button_press_event(self, widget, event): |
238 |
""" Occurs when somebody right-clicks in the file list. """ |
|
239 |
if event.button == 3: |
|
0.8.53
by Szilveszter Farkas (Phanatic)
Set sensitivity of menus and toolbuttons. |
240 |
# get the menu items
|
241 |
m_add = self.menu.ui.get_widget('/context_right/add') |
|
242 |
m_remove = self.menu.ui.get_widget('/context_right/remove') |
|
243 |
m_commit = self.menu.ui.get_widget('/context_right/commit') |
|
244 |
m_diff = self.menu.ui.get_widget('/context_right/diff') |
|
245 |
# check if we're in a branch
|
|
246 |
if not is_branch(self.comm.get_path()): |
|
247 |
m_add.set_sensitive(False) |
|
248 |
m_remove.set_sensitive(False) |
|
249 |
m_commit.set_sensitive(False) |
|
250 |
m_diff.set_sensitive(False) |
|
251 |
else: |
|
252 |
m_add.set_sensitive(True) |
|
253 |
m_remove.set_sensitive(True) |
|
254 |
m_commit.set_sensitive(True) |
|
255 |
m_diff.set_sensitive(True) |
|
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
256 |
self.menu.right_context_menu().popup(None, None, None, 0, |
257 |
event.time) |
|
258 |
||
0.8.18
by Szilveszter Farkas (Phanatic)
2006-07-20 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
259 |
def on_treeview_right_row_activated(self, treeview, path, view_column): |
260 |
""" Occurs when somebody double-clicks or enters an item in the |
|
261 |
file list. """
|
|
262 |
import os.path |
|
263 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
264 |
newdir = self.comm.get_selected_right() |
0.8.18
by Szilveszter Farkas (Phanatic)
2006-07-20 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
265 |
|
266 |
if newdir == '..': |
|
267 |
self.comm.set_path(os.path.split(self.comm.get_path())[0]) |
|
268 |
else: |
|
0.8.72
by Szilveszter Farkas (Phanatic)
Merge from Richard Ferguson's development branch. |
269 |
fullpath = self.comm.get_path() + os.sep + newdir |
0.8.54
by Szilveszter Farkas (Phanatic)
Fixed a bug when double-clicking a file. |
270 |
if os.path.isdir(fullpath): |
271 |
# selected item is an existant directory
|
|
272 |
self.comm.set_path(fullpath) |
|
273 |
else: |
|
0.8.72
by Szilveszter Farkas (Phanatic)
Merge from Richard Ferguson's development branch. |
274 |
launch(fullpath) |
0.8.18
by Szilveszter Farkas (Phanatic)
2006-07-20 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
275 |
|
276 |
self.comm.refresh_right() |
|
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
277 |
|
0.8.32
by Szilveszter Farkas (Phanatic)
Implemented OlivePreferences; some wording fixes. |
278 |
def on_window_main_delete_event(self, widget, event=None): |
279 |
""" Do some stuff before exiting. """ |
|
0.8.41
by Szilveszter Farkas (Phanatic)
Main window preferences (size, position) are stored. |
280 |
width, height = self.comm.window_main.get_size() |
281 |
self.comm.pref.set_preference('window_width', width) |
|
282 |
self.comm.pref.set_preference('window_height', height) |
|
283 |
x, y = self.comm.window_main.get_position() |
|
284 |
self.comm.pref.set_preference('window_x', x) |
|
285 |
self.comm.pref.set_preference('window_y', y) |
|
286 |
self.comm.pref.set_preference('paned_position', |
|
287 |
self.comm.hpaned_main.get_position()) |
|
288 |
||
0.8.32
by Szilveszter Farkas (Phanatic)
Implemented OlivePreferences; some wording fixes. |
289 |
self.comm.pref.write() |
290 |
self.comm.window_main.destroy() |
|
291 |
||
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
292 |
def not_implemented(self, widget): |
293 |
""" Display a Not implemented error message. """ |
|
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
294 |
self.dialog.error_dialog(_('We feel sorry'), |
295 |
_('This feature is not yet implemented.')) |
|
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
296 |