[gpapers] 2 new revisions pushed by marcelCo...@gmail.com on 2012-06-26 21:23 GMT

3 views
Skip to first unread message

codesite...@google.com

unread,
Jun 26, 2012, 5:23:35 PM6/26/12
to gpapers...@googlegroups.com
2 new revisions:

Revision: aa2767d857db
Author: Marcel Stimberg <marcel...@gmail.com>
Date: Tue Jun 26 13:17:04 2012
Log: whitespace changes
http://code.google.com/p/gpapers/source/detail?r=aa2767d857db

Revision: 10545e6dc13c
Author: Marcel Stimberg <marcel...@gmail.com>
Date: Tue Jun 26 14:15:25 2012
Log: small UI improvements ("open in web browser" logo, ellipsize in
the mi...
http://code.google.com/p/gpapers/source/detail?r=10545e6dc13c

==============================================================================
Revision: aa2767d857db
Author: Marcel Stimberg <marcel...@gmail.com>
Date: Tue Jun 26 13:17:04 2012
Log: whitespace changes
http://code.google.com/p/gpapers/source/detail?r=aa2767d857db

Modified:
/gpapers/__init__.py

=======================================
--- /gpapers/__init__.py Tue Jun 26 09:10:10 2012
+++ /gpapers/__init__.py Tue Jun 26 13:17:04 2012
@@ -76,7 +76,6 @@
GRAPH_ICON = GdkPixbuf.Pixbuf.new_from_file(os.path.join(BASE_DIR, 'icons',
'drawing.png'))

-
GObject.threads_init()


@@ -153,11 +152,13 @@

main_gui.refresh_middle_pane_search()

+
def row_from_dictionary(info, provider=None):
assert info is not None

return (VirtualPaper(info, provider), )

+
def paper_from_dictionary(paper_info, paper=None):
'''
Adds all information from a `paper_info` dictionary to the given
@@ -214,6 +215,7 @@

return paper

+
def compare_papers(column, row1, row2, user_data):
'''
This function is used to compare two rows for the sorting in the table.
@@ -2457,7 +2459,6 @@
menu.show_all()


-
class SourceEditGUI:
def __init__(self, id):
self.source = Source.objects.get(id=id)
@@ -2518,7 +2519,6 @@
menu.show_all()


-
class ReferenceEditGUI:
def __init__(self, id):
self.reference = Reference.objects.get(id=id)
@@ -2632,7 +2632,6 @@
self.edit_dialog.destroy()


-
class PaperEditGUI:
def __init__(self, id):
self.paper = Paper.objects.get(id=id)
@@ -2896,6 +2895,7 @@
def add_new_author(self, new_author):
self.authors_model.append((new_author.id, new_author.name))

+
def init_db():
import django.core.management.commands.syncdb

django.core.management.commands.syncdb.Command().handle_noargs(interactive=False)
@@ -2919,4 +2919,3 @@
main_gui = MainGUI()
importer.active_threads = main_gui.active_threads
Gtk.main()
-

==============================================================================
Revision: 10545e6dc13c
Author: Marcel Stimberg <marcel...@gmail.com>
Date: Tue Jun 26 14:15:25 2012
Log: small UI improvements ("open in web browser" logo, ellipsize in
the middle), display more info in the paper information pane
http://code.google.com/p/gpapers/source/detail?r=10545e6dc13c

Modified:
/gpapers/__init__.py

=======================================
--- /gpapers/__init__.py Tue Jun 26 13:17:04 2012
+++ /gpapers/__init__.py Tue Jun 26 14:15:25 2012
@@ -116,7 +116,7 @@
#column.connect('clicked', self.sortRows)
for renderer in column.get_cells():
if renderer.__class__.__name__ == 'CellRendererText':
- renderer.set_property('ellipsize', Pango.EllipsizeMode.END)
+ renderer.set_property('ellipsize',
Pango.EllipsizeMode.MIDDLE)


def import_documents_via_filenames(filenames, callback):
@@ -989,7 +989,9 @@

pane.connect('size-allocate', self.resize_paper_information_pane)

- column = Gtk.TreeViewColumn("", Gtk.CellRendererText(), markup=0)
+ renderer = Gtk.CellRendererText()
+ renderer.set_property('yalign', 0.)
+ column = Gtk.TreeViewColumn("", renderer, markup=0)
column.set_min_width(64)
pane.append_column(column)

@@ -998,6 +1000,7 @@
#renderer.set_property('editable', True)
renderer.set_property('wrap-mode', Pango.WrapMode.WORD)
renderer.set_property('wrap-width', 500)
+
column.pack_start(renderer, True)
column.add_attribute(renderer, 'markup', 1)
pane.append_column(column)
@@ -1605,13 +1608,23 @@
if paper.title:
self.paper_information_pane_model.append(('<b>Title:</b>',
paper.title ,))
- if liststore[rows[0]][0].authors:
+ if paper.authors:
author_str = ', '.join([ author.name for author in
paper.get_authors_in_order() ])

self.paper_information_pane_model.append(('<b>Authors:</b>',
author_str,))
-# if liststore[rows[0]][3]:
-#
self.paper_information_pane_model.append(('<b>Journal:</b>',
liststore[rows[0]][3] ,))
+ if paper.source or paper.source_pages:
+ publication_string = ''
+ if paper.source.name:
+ publication_string += '<i>' +
pango_escape(paper.source.name) + '</i>.'
+ if paper.source.issue:
+ publication_string += ' ' +
pango_escape(paper.source.issue) + ':'
+ if paper.source_pages:
+ publication_string += ' ' +
pango_escape(paper.source_pages)
+ if paper.source.publication_date:
+ publication_string += ', ' +
pango_escape(unicode(paper.source.publication_date.year)) + '.'
+ self.paper_information_pane_model.append(('<b>Published
in:</b>',
+
publication_string,))
if paper.doi:
self.paper_information_pane_model.append(('<b>DOI:</b>',

pango_escape(paper.doi) ,))
@@ -1642,7 +1655,9 @@

#self.ui.get_object('paper_information_pane').get_buffer().set_text( '\n'.join(description)
)

if paper.doi or paper.import_url:
- button = Gtk.ToolButton(stock_id=Gtk.STOCK_HOME)
+ icon = Gtk.Image.new_from_icon_name('web-browser',
+
Gtk.IconSize.SMALL_TOOLBAR)
+ button = Gtk.ToolButton.new(icon, None)
button.set_tooltip_text('Open this URL in your browser...')
url = paper.import_url
if not url:
Reply all
Reply to author
Forward
0 new messages