[Pkg-gourmet-changes] gourmet/src/lib GourmetRecipeManager.py,
1.1.1.1, 1.2 __init__.py, 1.1.1.1, 1.2 check_encodings.py,
1.1.1.1, 1.2 dialog_extras.py, 1.1.1.1, 1.2 keyEditor.py,
1.1.1.1, 1.2 reccard.py, 1.1.1.1, 1.2 timeEntry.py, 1.1.1.1,
1.2 version.py, 1.1.1.1, 1.2
seanius at haydn.debian.org
seanius at haydn.debian.org
Mon Sep 12 19:36:21 UTC 2005
Update of /cvsroot/pkg-gourmet/gourmet/src/lib
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv11478/src/lib
Modified Files:
GourmetRecipeManager.py __init__.py check_encodings.py
dialog_extras.py keyEditor.py reccard.py timeEntry.py
version.py
Log Message:
new upstream release
Index: GourmetRecipeManager.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/GourmetRecipeManager.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- GourmetRecipeManager.py 5 Sep 2005 00:19:39 -0000 1.1.1.1
+++ GourmetRecipeManager.py 12 Sep 2005 19:36:17 -0000 1.2
@@ -87,6 +87,7 @@
# a thread lock for import/export threads
self.lock = gt.get_lock()
self._threads = []
+ self.threads = 0
self.selected = True
# widgets that should be sensitive only when a row is selected
self.act_on_row_widgets = [self.glade.get_widget('rlViewRecButton'),
Index: check_encodings.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/check_encodings.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- check_encodings.py 5 Sep 2005 00:19:36 -0000 1.1.1.1
+++ check_encodings.py 12 Sep 2005 19:36:17 -0000 1.2
@@ -82,6 +82,10 @@
return gf.lines
class EncodingDialog (de.optionDialog):
+ """Create a dialog to allow user to select correct encoding for an input file."""
+
+ context_lines = 2
+
def __init__ (self, default=None, label=_("Select encoding"),
sublabel=_("Cannot determine proper encoding. Please select the correct encoding from the following list."),
expander_label=_("See _file with encoding"),
@@ -98,10 +102,12 @@
self.setup_buffers()
de.optionDialog.__init__(self, default=default,label=label, sublabel=sublabel,
options=options, expander=expander)
+ self.set_default_size(700,500)
self.optionMenu.connect('activate',self.change_encoding)
self.change_encoding()
self.created = False
-
+ self.expander.set_expanded(True)
+
def setup_motion_buttons (self):
self.hbb = gtk.HButtonBox()
self.fb = gtk.Button('Next Difference')
@@ -123,6 +129,7 @@
def create_expander (self):
self.evb = gtk.VBox()
self.sw = gtk.ScrolledWindow()
+ self.sw.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
self.tv = gtk.TextView()
self.tv.set_editable(False)
self.buffer = self.tv.get_buffer()
@@ -170,20 +177,40 @@
print 'moving to %s'%dkeys[self.current_error]
self.tv.scroll_to_mark(mark,0)
-
-
def set_buffer_text (self, buffer, text):
- for n,l in enumerate(text.split('\n')):
- if n in self.diff_lines.keys():
- start = 0
- diffs = self.diff_lines[n]
- for sdiff,ediff in diffs:
- buffer.insert_with_tags(buffer.get_end_iter(),l[start:sdiff],*self.line_highlight_tags)
- buffer.insert_with_tags(buffer.get_end_iter(),l[sdiff:ediff],*self.highlight_tags)
- start = ediff
- buffer.insert_with_tags(buffer.get_end_iter(),l[start:]+'\n',*self.line_highlight_tags)
- else:
- buffer.insert_with_tags(buffer.get_end_iter(),l+'\n')
+ lines = text.split('\n')
+ totl = len(lines)
+ shown = []
+ for line,diffs in self.diff_lines.items():
+ if line in shown: continue
+ start_at = line - self.context_lines
+ if start_at < 0: start_at = 0
+ end_at = line + self.context_lines
+ if end_at >= totl: end_at = totl-1
+ if start_at != 0:
+ buffer.insert_with_tags(buffer.get_end_iter(),
+ '\n...\n',
+ )
+ for n in range(start_at,end_at):
+ if n in shown:
+ continue
+ shown.append(n)
+ l = lines[n]
+ if n==line:
+ start = 0
+ for sdiff,ediff in diffs:
+ buffer.insert_with_tags(buffer.get_end_iter(),
+ l[start:sdiff],
+ *self.line_highlight_tags)
+ buffer.insert_with_tags(buffer.get_end_iter(),
+ l[sdiff:ediff],
+ *self.highlight_tags)
+ start = ediff
+ buffer.insert_with_tags(buffer.get_end_iter(),
+ l[start:],
+ *self.line_highlight_tags)
+ else:
+ buffer.insert_with_tags(buffer.get_end_iter(),l)
def diff_texts (self):
"""Look at our differently encoded buffers for characters where they differ."""
Index: dialog_extras.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/dialog_extras.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- dialog_extras.py 5 Sep 2005 00:19:38 -0000 1.1.1.1
+++ dialog_extras.py 12 Sep 2005 19:36:17 -0000 1.2
@@ -220,7 +220,7 @@
self.elabel.set_line_wrap(True)
self.elabel.set_selectable(True)
self.elabel.set_alignment(0,0)
- self.hbox.add(self.label)
+ self.hbox.add(self.elabel)
self.elabel.show()
self.elabel.set_padding(H_PADDING,Y_PADDING)
self.entry = gtk.Entry()
@@ -410,7 +410,7 @@
value_label="Value", default=True, label=None,
apply_func=None, parent=None, dont_ask_cb=None,
dont_ask_custom_text=None):
- """Options is a tuple of lists where each list is ['option', VALUE], handed to OptionTable
+ """Options is a list of lists where each list is ['option', VALUE], handed to OptionTable
VALUE can be any of the following:
a string (will be editable)
@@ -482,10 +482,15 @@
self.ret = self.table.options
self.hide()
gtk.main_quit()
-
+
def cancelcb (self, *args):
self.hide()
self.ret=None
+ if not self.apply_func:
+ self.hide()
+ gtk.main_quit()
+ else:
+ self.hide()
class booleanDialog (messageDialog):
def __init__ (self, title="", default=True, label=_("Do you really want to do this"),
Index: keyEditor.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/keyEditor.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- keyEditor.py 5 Sep 2005 00:19:39 -0000 1.1.1.1
+++ keyEditor.py 12 Sep 2005 19:36:18 -0000 1.2
@@ -230,7 +230,7 @@
self.changeItem(key,item,new_key=new_key)
self.change_children(key, new_key, iter)
self.treeModel.set_value(iter, self.KEY_COL, new_key)
-
+
def changeKeyEntryChangedCB (self, *args):
if self.changeKeyEntry.get_text():
self.changeKeyButton.set_sensitive(True)
Index: reccard.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/reccard.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- reccard.py 5 Sep 2005 00:19:40 -0000 1.1.1.1
+++ reccard.py 12 Sep 2005 19:36:18 -0000 1.2
@@ -1687,10 +1687,12 @@
self.shopBox = self.glade.get_widget('ieShopCat')
self.optCheck = self.glade.get_widget('ieOptional')
self.togWidget = self.glade.get_widget('ieTogButton')
+ self.quickEntry = self.glade.get_widget('quickIngredientEntry')
def setup_signals (self):
self.glade.signal_connect('ieAdd', self.add)
self.glade.signal_connect('ieNew', self.new)
+ self.glade.signal_connect('addQuickIngredient',self.quick_add)
#self.glade.signal_connect('ieDel', self.delete_cb)
if hasattr(self,'ingBox') and self.ingBox:
self.ingBox.connect('focus_out_event',self.setKey)
@@ -1836,6 +1838,11 @@
self.optCheck.set_active(False)
self.amountBox.grab_focus()
+ def quick_add (self, *args):
+ txt = self.quickEntry.get_text()
+ self.rc.add_ingredient_from_line(txt)
+ self.quickEntry.set_text('')
+
def add (self, *args):
debug("add (self, *args):",5)
d = {}
Index: timeEntry.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/timeEntry.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- timeEntry.py 5 Sep 2005 00:19:41 -0000 1.1.1.1
+++ timeEntry.py 12 Sep 2005 19:36:18 -0000 1.2
@@ -69,7 +69,7 @@
self.combo.entry.connect(signal, handler)
-gobject.type_register(TimeEntry)
+if gtk.pygtk_version[1] < 8: gobject.type_register(TimeEntry)
def makeTimeEntry ():
te=TimeEntry()
Index: version.py
===================================================================
RCS file: /cvsroot/pkg-gourmet/gourmet/src/lib/version.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- version.py 5 Sep 2005 00:19:41 -0000 1.1.1.1
+++ version.py 12 Sep 2005 19:36:18 -0000 1.2
@@ -9,7 +9,7 @@
from gettext import gettext as _
appname = _("Gourmet Recipe Manager")
copyright = _("Copyright (c) 2004,2005 Thomas M. Hinkle. GNU GPL")
-version = "0.8.5.11"
+version = "0.8.5.12"
# repeated in setup.cfg
description = _("Gourmet Recipe Manager is an application to store, organize and search recipes. Gourmet also makes it easy to create shopping lists from recipes. Gourmet imports recipes from a number of sources, including MealMaster and MasterCook archives and several popular websites. Gourmet can export recipes as text, MealMaster files, HTML web pages, and a custom XML format for exchange with other Gourmet users. Gourmet supports linking images with recipes.")
authors = ["Thomas M. Hinkle <Thomas_Hinkle at alumni.brown.edu>",
More information about the Pkg-gourmet-changes
mailing list