mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
About dialog window now shows up.
Fixes some dependencies problems
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from gi.repository import Gtk
|
||||
|
||||
|
||||
class AboutDialog(Gtk.AboutDialog):
|
||||
class AboutDialog():
|
||||
|
||||
def __new__(cls):
|
||||
def __init__(self):
|
||||
"""Special static method that's automatically called by Python when
|
||||
constructing a new instance of this class.
|
||||
|
||||
@@ -11,19 +11,7 @@ class AboutDialog(Gtk.AboutDialog):
|
||||
"""
|
||||
self.builder = Gtk.Builder()
|
||||
self.builder.add_from_file("data/ui/AboutIvolutionDialog.glade")
|
||||
new_object = builder.get_object("about_ivolution_dialog")
|
||||
new_object.finish_initializing(builder)
|
||||
return new_object
|
||||
|
||||
def finish_initializing(self, builder):
|
||||
"""Called while initializing this instance in __new__
|
||||
|
||||
finish_initalizing should be called after parsing the ui definition
|
||||
and creating a AboutDialog object with it in order
|
||||
to finish initializing the start of the new AboutIvolutionDialog
|
||||
instance.
|
||||
|
||||
Put your initialization code in here and leave __init__ undefined.
|
||||
"""
|
||||
# Get a reference to the builder and set up the signals.
|
||||
print "in"
|
||||
self.window = self.builder.get_object("about_ivolution_dialog")
|
||||
#self.ui = self.builder.get_ui(self)
|
||||
self.window.show()
|
||||
self.builder.connect_signals(self)
|
||||
12
Ivolution.py
12
Ivolution.py
@@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
from gi.repository import Gtk
|
||||
|
||||
from AboutDialog import AboutDialog
|
||||
|
||||
from facemovie import Facemovie_lib
|
||||
from facemovie import FaceParams
|
||||
|
||||
class Ivolution():
|
||||
def __init__(self):
|
||||
|
||||
@@ -15,6 +20,7 @@ class Ivolution():
|
||||
self.builder.connect_signals(self)
|
||||
|
||||
## Defines parameters needed to run the FaceMovie
|
||||
self.root_fo = ""
|
||||
self.in_fo = "" # Input folder, where images are located
|
||||
self.out_fo = "" # Input folder, where the video will be saved
|
||||
self.mode = "crop" # type of video to be created
|
||||
@@ -92,12 +98,12 @@ class Ivolution():
|
||||
def on_menu_about_activate(self, widget, data=None):
|
||||
"""
|
||||
Displays the about box for Ivolution
|
||||
# FIXME : Not working !
|
||||
# FIXME : Can start several contents Windows at the same time
|
||||
"""
|
||||
if self.AboutDialog is not None:
|
||||
about = self.AboutDialog()
|
||||
response = about.run()
|
||||
about.destroy()
|
||||
#response = about.run()
|
||||
#about.destroy()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires about_ivolution_dialog 1.0 -->
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="AboutIvolutionDialog" id="about_ivolution_dialog">
|
||||
<object class="GtkAboutDialog" id="about_ivolution_dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="icon">../media/vitruve.svg</property>
|
||||
|
||||
Reference in New Issue
Block a user