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.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
35 |
|
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
36 |
class OliveHandler: |
37 |
""" Signal handler class for Olive. """ |
|
0.8.15
by Szilveszter Farkas (Phanatic)
2006-07-18 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
38 |
def __init__(self, gladefile, comm): |
0.8.12
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
39 |
self.gladefile = gladefile |
0.8.15
by Szilveszter Farkas (Phanatic)
2006-07-18 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
40 |
self.comm = comm |
41 |
||
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
42 |
self.dialog = OliveDialog(self.gladefile) |
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
43 |
|
44 |
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> |
45 |
|
46 |
def on_about_activate(self, widget): |
|
47 |
self.dialog.about() |
|
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
48 |
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
49 |
def on_menuitem_add_files_activate(self, widget): |
50 |
""" Add file(s)... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
51 |
from add import OliveAdd |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
52 |
add = OliveAdd(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
53 |
add.display() |
54 |
||
0.8.22
by Szilveszter Farkas (Phanatic)
2006-07-31 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
55 |
def on_menuitem_branch_get_activate(self, widget): |
56 |
""" Branch/Get... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
57 |
from branch import OliveBranch |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
58 |
branch = OliveBranch(self.gladefile, self.comm, self.dialog) |
0.8.14
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
59 |
branch.display() |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
60 |
|
0.8.22
by Szilveszter Farkas (Phanatic)
2006-07-31 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
61 |
def on_menuitem_branch_checkout_activate(self, widget): |
62 |
""" Branch/Checkout... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
63 |
from checkout import OliveCheckout |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
64 |
checkout = OliveCheckout(self.gladefile, self.comm, self.dialog) |
0.8.22
by Szilveszter Farkas (Phanatic)
2006-07-31 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
65 |
checkout.display() |
66 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
67 |
def on_menuitem_branch_commit_activate(self, widget): |
68 |
""" Branch/Commit... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
69 |
from commit import OliveCommit |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
70 |
commit = OliveCommit(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
71 |
commit.display() |
72 |
||
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
73 |
def on_menuitem_branch_pull_activate(self, widget): |
74 |
""" Branch/Pull menu handler. """ |
|
75 |
import olive.backend.update as update |
|
76 |
||
77 |
self.comm.set_busy(self.comm.window_main) |
|
78 |
||
79 |
try: |
|
80 |
ret = update.pull(self.comm.get_path()) |
|
81 |
except errors.NotBranchError: |
|
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
82 |
self.dialog.error_dialog(_('Directory is not a branch'), |
83 |
_('You can perform this action only in a branch.')) |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
84 |
except errors.NoLocationKnown: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
85 |
self.dialog.error_dialog(_('Parent location is unknown'), |
86 |
_('Pulling is not possible until there is no parent location.')) |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
87 |
else: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
88 |
self.dialog.info_dialog(_('Pull successful'), |
89 |
_('%d revision(s) pulled.') % ret) |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
90 |
|
91 |
self.comm.set_busy(self.comm.window_main, False) |
|
92 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
93 |
def on_menuitem_branch_push_activate(self, widget): |
94 |
""" Branch/Push... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
95 |
from push import OlivePush |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
96 |
push = OlivePush(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
97 |
push.display() |
98 |
||
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
99 |
def on_menuitem_branch_status_activate(self, widget): |
100 |
""" Branch/Status... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
101 |
from status import OliveStatus |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
102 |
status = OliveStatus(self.gladefile, self.comm, self.dialog) |
0.8.29
by Szilveszter Farkas (Phanatic)
Implemented Status window; some code cleanups. |
103 |
status.display() |
104 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
105 |
def on_menuitem_branch_initialize_activate(self, widget): |
106 |
""" Initialize current directory. """ |
|
107 |
import olive.backend.init as init |
|
108 |
||
109 |
try: |
|
110 |
init.init(self.comm.get_path()) |
|
111 |
except errors.AlreadyBranchError, errmsg: |
|
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
112 |
self.dialog.error_dialog(_('Directory is already a branch'), |
113 |
_('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> |
114 |
except errors.BranchExistsWithoutWorkingTree, errmsg: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
115 |
self.dialog.error_dialog(_('Branch without a working tree'), |
116 |
_('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. |
117 |
except: |
118 |
raise
|
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
119 |
else: |
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
120 |
self.dialog.info_dialog(_('Ininialize successful'), |
121 |
_('Directory successfully initialized.')) |
|
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
122 |
self.comm.refresh_right() |
123 |
||
0.8.37
by Szilveszter Farkas (Phanatic)
Implemented Make directory functionality; some cleanups. |
124 |
def on_menuitem_file_make_directory_activate(self, widget): |
125 |
""" File/Make directory... menu handler. """ |
|
126 |
from mkdir import OliveMkdir |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
127 |
mkdir = OliveMkdir(self.gladefile, self.comm, self.dialog) |
0.8.37
by Szilveszter Farkas (Phanatic)
Implemented Make directory functionality; some cleanups. |
128 |
mkdir.display() |
129 |
||
0.8.38
by Szilveszter Farkas (Phanatic)
Implemented Move functionality; move() backend code refined. |
130 |
def on_menuitem_file_move_activate(self, widget): |
131 |
""" File/Move... menu handler. """ |
|
132 |
from move import OliveMove |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
133 |
move = OliveMove(self.gladefile, self.comm, self.dialog) |
0.8.38
by Szilveszter Farkas (Phanatic)
Implemented Move functionality; move() backend code refined. |
134 |
move.display() |
135 |
||
0.8.40
by Szilveszter Farkas (Phanatic)
Implemented Rename functionality. |
136 |
def on_menuitem_file_rename_activate(self, widget): |
137 |
""" File/Rename... menu handler. """ |
|
138 |
from rename import OliveRename |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
139 |
rename = OliveRename(self.gladefile, self.comm, self.dialog) |
0.8.40
by Szilveszter Farkas (Phanatic)
Implemented Rename functionality. |
140 |
rename.display() |
141 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
142 |
def on_menuitem_remove_file_activate(self, widget): |
143 |
""" Remove (unversion) selected file. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
144 |
from remove import OliveRemove |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
145 |
remove = OliveRemove(self.gladefile, self.comm, self.dialog) |
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
146 |
remove.display() |
147 |
||
0.8.28
by Szilveszter Farkas (Phanatic)
Statistics menu added |
148 |
def on_menuitem_stats_diff_activate(self, widget): |
149 |
""" Statistics/Differences... menu handler. """ |
|
0.8.36
by Szilveszter Farkas (Phanatic)
Implemented pull functionality. |
150 |
from diff import OliveDiff |
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
151 |
diff = OliveDiff(self.gladefile, self.comm, self.dialog) |
0.8.28
by Szilveszter Farkas (Phanatic)
Statistics menu added |
152 |
diff.display() |
153 |
||
0.8.42
by Szilveszter Farkas (Phanatic)
Implemented Informations functionality; some bzrlib API changes handled. |
154 |
def on_menuitem_stats_infos_activate(self, widget): |
155 |
""" Statistics/Informations... menu handler. """ |
|
156 |
from info import OliveInfo |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
157 |
info = OliveInfo(self.gladefile, self.comm, self.dialog) |
0.8.42
by Szilveszter Farkas (Phanatic)
Implemented Informations functionality; some bzrlib API changes handled. |
158 |
info.display() |
159 |
||
0.8.43
by Szilveszter Farkas (Phanatic)
Implemented Log functionality (via bzrk). |
160 |
def on_menuitem_stats_log_activate(self, widget): |
161 |
""" Statistics/Log... menu handler. """ |
|
162 |
from log import OliveLog |
|
0.8.46
by Szilveszter Farkas (Phanatic)
Modified OliveDialog class interface; huge cleanups. |
163 |
log = OliveLog(self.gladefile, self.comm, self.dialog) |
0.8.43
by Szilveszter Farkas (Phanatic)
Implemented Log functionality (via bzrk). |
164 |
log.display() |
165 |
||
0.8.49
by Szilveszter Farkas (Phanatic)
Added View menu; implemented Refresh; some TODO changes. |
166 |
def on_menuitem_view_refresh_activate(self, widget): |
167 |
""" View/Refresh menu handler. """ |
|
168 |
# Refresh the left pane
|
|
169 |
self.comm.refresh_left() |
|
170 |
# Refresh the right pane
|
|
171 |
self.comm.refresh_right() |
|
172 |
||
173 |
def on_menuitem_view_show_hidden_files_activate(self, widget): |
|
174 |
""" View/Show hidden files menu handler. """ |
|
175 |
if widget.get_active(): |
|
176 |
# Show hidden files
|
|
177 |
self.comm.pref.set_preference('dotted_files', True) |
|
178 |
self.comm.pref.refresh() |
|
179 |
self.comm.refresh_right() |
|
180 |
else: |
|
181 |
# Do not show hidden files
|
|
182 |
self.comm.pref.set_preference('dotted_files', False) |
|
183 |
self.comm.pref.refresh() |
|
184 |
self.comm.refresh_right() |
|
185 |
||
0.8.33
by Szilveszter Farkas (Phanatic)
Implemented bookmarking. |
186 |
def on_treeview_left_button_press_event(self, widget, event): |
187 |
""" Occurs when somebody right-clicks in the bookmark list. """ |
|
188 |
if event.button == 3: |
|
189 |
self.menu.left_context_menu().popup(None, None, None, 0, |
|
0.8.41
by Szilveszter Farkas (Phanatic)
Main window preferences (size, position) are stored. |
190 |
event.time) |
0.8.33
by Szilveszter Farkas (Phanatic)
Implemented bookmarking. |
191 |
|
192 |
def on_treeview_left_row_activated(self, treeview, path, view_column): |
|
193 |
""" Occurs when somebody double-clicks or enters an item in the |
|
194 |
bookmark list. """
|
|
195 |
self.comm.set_busy(treeview) |
|
196 |
||
197 |
newdir = self.comm.get_selected_left() |
|
198 |
self.comm.set_path(newdir) |
|
199 |
||
200 |
self.comm.refresh_right() |
|
201 |
||
202 |
self.comm.set_busy(treeview, False) |
|
203 |
||
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
204 |
def on_treeview_right_button_press_event(self, widget, event): |
205 |
""" Occurs when somebody right-clicks in the file list. """ |
|
206 |
if event.button == 3: |
|
0.8.53
by Szilveszter Farkas (Phanatic)
Set sensitivity of menus and toolbuttons. |
207 |
# get the menu items
|
208 |
m_add = self.menu.ui.get_widget('/context_right/add') |
|
209 |
m_remove = self.menu.ui.get_widget('/context_right/remove') |
|
210 |
m_commit = self.menu.ui.get_widget('/context_right/commit') |
|
211 |
m_diff = self.menu.ui.get_widget('/context_right/diff') |
|
212 |
# check if we're in a branch
|
|
213 |
if not is_branch(self.comm.get_path()): |
|
214 |
m_add.set_sensitive(False) |
|
215 |
m_remove.set_sensitive(False) |
|
216 |
m_commit.set_sensitive(False) |
|
217 |
m_diff.set_sensitive(False) |
|
218 |
else: |
|
219 |
m_add.set_sensitive(True) |
|
220 |
m_remove.set_sensitive(True) |
|
221 |
m_commit.set_sensitive(True) |
|
222 |
m_diff.set_sensitive(True) |
|
0.8.24
by Szilveszter Farkas (Phanatic)
Implemented context menu for the file list. |
223 |
self.menu.right_context_menu().popup(None, None, None, 0, |
224 |
event.time) |
|
225 |
||
0.8.18
by Szilveszter Farkas (Phanatic)
2006-07-20 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
226 |
def on_treeview_right_row_activated(self, treeview, path, view_column): |
227 |
""" Occurs when somebody double-clicks or enters an item in the |
|
228 |
file list. """
|
|
229 |
import os.path |
|
230 |
||
0.8.19
by Szilveszter Farkas (Phanatic)
2006-07-21 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
231 |
newdir = self.comm.get_selected_right() |
0.8.18
by Szilveszter Farkas (Phanatic)
2006-07-20 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
232 |
|
233 |
if newdir == '..': |
|
234 |
self.comm.set_path(os.path.split(self.comm.get_path())[0]) |
|
235 |
else: |
|
0.8.54
by Szilveszter Farkas (Phanatic)
Fixed a bug when double-clicking a file. |
236 |
fullpath = self.comm.get_path() + '/' + newdir |
237 |
if os.path.isdir(fullpath): |
|
238 |
# selected item is an existant directory
|
|
239 |
self.comm.set_path(fullpath) |
|
240 |
else: |
|
241 |
if sys.platform == 'win32': |
|
242 |
# open the file with the default application
|
|
243 |
os.startfile(fullpath) |
|
244 |
else: |
|
245 |
# TODO: support other OSes
|
|
246 |
print "DEBUG: double-click on non-Win32 platforms not supported." |
|
0.8.18
by Szilveszter Farkas (Phanatic)
2006-07-20 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
247 |
|
248 |
self.comm.refresh_right() |
|
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
249 |
|
0.8.32
by Szilveszter Farkas (Phanatic)
Implemented OlivePreferences; some wording fixes. |
250 |
def on_window_main_delete_event(self, widget, event=None): |
251 |
""" Do some stuff before exiting. """ |
|
0.8.41
by Szilveszter Farkas (Phanatic)
Main window preferences (size, position) are stored. |
252 |
width, height = self.comm.window_main.get_size() |
253 |
self.comm.pref.set_preference('window_width', width) |
|
254 |
self.comm.pref.set_preference('window_height', height) |
|
255 |
x, y = self.comm.window_main.get_position() |
|
256 |
self.comm.pref.set_preference('window_x', x) |
|
257 |
self.comm.pref.set_preference('window_y', y) |
|
258 |
self.comm.pref.set_preference('paned_position', |
|
259 |
self.comm.hpaned_main.get_position()) |
|
260 |
||
0.8.32
by Szilveszter Farkas (Phanatic)
Implemented OlivePreferences; some wording fixes. |
261 |
self.comm.pref.write() |
262 |
self.comm.window_main.destroy() |
|
263 |
||
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
264 |
def not_implemented(self, widget): |
265 |
""" Display a Not implemented error message. """ |
|
0.8.55
by Szilveszter Farkas (Phanatic)
Gettext support added. |
266 |
self.dialog.error_dialog(_('We feel sorry'), |
267 |
_('This feature is not yet implemented.')) |
|
0.8.13
by Szilveszter Farkas (Phanatic)
2006-07-17 Szilveszter Farkas <Szilveszter.Farkas@gmail.com> |
268 |