Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Trying to add progress indicator
  • Loading branch information
Chris Triantafillis committed Jul 1, 2012
1 parent baeb9b8 commit c92e14b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
26 changes: 16 additions & 10 deletions data/ui/AboutMangarDialog.ui
@@ -1,8 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires about_mangar_dialog 1.0 -->
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires about_mangar_dialog 1.0 -->
<object class="AboutMangarDialog" id="about_mangar_dialog">
<property translatable="yes" name="license"># Copyright (C) 2012 Chris Triantafillis &lt;christriant1995@gmail.com&gt;
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="icon">../media/mangar.svg</property>
<property name="type_hint">normal</property>
<property name="program_name">MangaR</property>
<property name="version">0.1-public3</property>
<property name="copyright" translatable="yes">Copyright (C) 2012 Chris Triantafillis &lt;christriant1995@gmail.com&gt;</property>
<property name="website">http://clepto.github.com/MangaR/</property>
<property name="website_label" translatable="yes">MangaR webpage</property>
<property name="license" translatable="yes"># Copyright (C) 2012 Chris Triantafillis &lt;christriant1995@gmail.com&gt;
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
Expand All @@ -14,15 +24,11 @@
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
</property><property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="icon">../media/mangar.svg</property>
<property name="type_hint">normal</property>
<property name="program_name">MangaR</property>
<property name="version">0.1-public3</property>
<property name="copyright" translatable="yes">Copyright (C) 2012 Chris Triantafillis &lt;christriant1995@gmail.com&gt;</property>
</property>
<property name="authors">Copyright (C) 2012 Chris Triantafillis &lt;christriant1995@gmail.com&gt;</property>
<property name="documenters">Chris Triantafillis</property>
<property name="translator_credits" translatable="yes">Chris Triantafillis</property>
<property name="artists">Γιώργος Καλιοντζής &lt;panoritis@gmail.com&gt;</property>
<property name="logo">../media/mangar.svg</property>
<property name="wrap_license">True</property>
<property name="license_type">gpl-3-0</property>
Expand Down Expand Up @@ -51,4 +57,4 @@
</object>
</child>
</object>
</interface>
</interface>
4 changes: 3 additions & 1 deletion data/ui/MangarWindow.ui
Expand Up @@ -405,8 +405,10 @@
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<child>
<object class="GtkSpinner" id="spinner">
<object class="GtkLabel" id="waitlabel">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Please wait</property>
<property name="width_chars">12</property>
</object>
</child>
</object>
Expand Down
12 changes: 10 additions & 2 deletions mangar/MangarWindow.py
Expand Up @@ -29,7 +29,7 @@
from mangar.AboutMangarDialog import AboutMangarDialog
from mangar.PreferencesMangarDialog import PreferencesMangarDialog


import time
import urllib2
import os
import tempfile
Expand Down Expand Up @@ -72,12 +72,18 @@ def finish_initializing(self, builder): # pylint: disable=E1002
# Code for other initialization actions should be added here.

def my_on_mangatreeview_cursor_changed(self, widget, user_param=None):
waitlabel = self.builder.get_object("waitlabel")
waitlabel.show()
manga = self.get_selected_manga(0)
url = self.get_manga_url(manga)
episode = self.get_last_episode(url)
self.set_episodes_to_treeview(manga, episode)

waitlabel.hide()

def my_on_episodetreeview_row_activated(self, widget, path, user_param=None):
waitlabel = self.builder.get_object("waitlabel")
waitlabel.show()
time.sleep(2)
manga = self.get_selected_manga(0)
manga_url = self.get_manga_url(manga)
episode_number = self.get_selected_episode()
Expand Down Expand Up @@ -106,6 +112,8 @@ def my_on_episodetreeview_row_activated(self, widget, path, user_param=None):
self.ui.mangaimage.set_from_file(self.images[0])
scrolledwindow = self.builder.get_object("imagescrolledwindow")
scrolledwindow.set_property("min-content-width", 900)
time.sleep(1)
waitlabel.hide()

def my_on_previousbutton_clicked(self, button, user_param=None):
page = self.ui.pagescellrenderer.get_property("text")
Expand Down

0 comments on commit c92e14b

Please sign in to comment.