dialog fixes, replace fork with spawn
svn: r6226
This commit is contained in:
parent
47644bcc15
commit
a312c2af18
@ -1,4 +1,15 @@
|
||||
2006-03-29 Don Allingham <don@gramps-project.org>
|
||||
* src/Editors/_EditPerson.py: Fix imports of EditMediaRef, remove
|
||||
specific edit image from top image window.
|
||||
* src/glade/gramps.glade: remove unused dialogs, replaced by
|
||||
gtk.MessageDialog
|
||||
* src/AddMedia.py: clean up scale_image
|
||||
* src/Utils.py: replace fork() with spawn to prevent Xlib async errors
|
||||
* src/GrampsDisplay.py: replace fork() with spawn to prevent Xlib
|
||||
async errors
|
||||
* src/QuestionDialog.py: Simply some dialogs by using gtk.MessageDialog
|
||||
* src/ImgManip.py: replace fork() with spawn to prevent Xlib async
|
||||
errors
|
||||
* src/ViewManager.py: enable actiongroups if file loaded before
|
||||
the interface is initialized (command line or autoload)
|
||||
* src/SelectObject.py: Provide images in preview
|
||||
|
@ -188,23 +188,20 @@ class AddMediaObject:
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def scale_image(path,size):
|
||||
|
||||
title_msg = _("Cannot display %s") % path
|
||||
detail_msg = _('GRAMPS is not able to display the image file. '
|
||||
'This may be caused by a corrupt file.')
|
||||
|
||||
try:
|
||||
image1 = gtk.gdk.pixbuf_new_from_file(path)
|
||||
except:
|
||||
WarningDialog(_("Cannot display %s") % path,
|
||||
_('GRAMPS is not able to display the image file. '
|
||||
'This may be caused by a corrupt file.'))
|
||||
return gtk.gdk.pixbuf_new_from_file(const.icon)
|
||||
|
||||
width = image1.get_width()
|
||||
height = image1.get_height()
|
||||
|
||||
scale = size / float(max(width,height))
|
||||
try:
|
||||
width = image1.get_width()
|
||||
height = image1.get_height()
|
||||
|
||||
scale = size / float(max(width,height))
|
||||
return image1.scale_simple(int(scale*width), int(scale*height),
|
||||
gtk.gdk.INTERP_BILINEAR)
|
||||
except:
|
||||
WarningDialog(_("Cannot display %s") % path,
|
||||
_('GRAMPS is not able to display the image file. '
|
||||
'This may be caused by a corrupt file.'))
|
||||
WarningDialog(title_msg, detail_msg)
|
||||
return gtk.gdk.pixbuf_new_from_file(const.icon)
|
||||
|
||||
|
@ -36,6 +36,7 @@ from gtk.gdk import ACTION_COPY, BUTTON1_MASK
|
||||
|
||||
from TransUtils import sgettext as _
|
||||
import pickle
|
||||
import os
|
||||
|
||||
try:
|
||||
set()
|
||||
@ -62,6 +63,7 @@ import Utils
|
||||
import ImgManip
|
||||
import Spell
|
||||
import Errors
|
||||
import Mime
|
||||
|
||||
from DdTargets import DdTargets
|
||||
from GrampsWidgets import SimpleButton
|
||||
@ -241,8 +243,10 @@ class ButtonTab(GrampsTab):
|
||||
self.tooltips.set_tip(self.del_btn, self._MSG['del'])
|
||||
|
||||
if share_button:
|
||||
self.share_btn = SimpleButton(gtk.STOCK_INDEX, self.share_button_clicked)
|
||||
self.share_btn = SimpleButton(gtk.STOCK_INDEX, self.share_button_clicked)
|
||||
self.tooltips.set_tip(self.share_btn, self._MSG['share'])
|
||||
else:
|
||||
self.share_btn = None
|
||||
|
||||
vbox = gtk.VBox()
|
||||
vbox.set_spacing(6)
|
||||
@ -335,10 +339,46 @@ class EmbeddedList(ButtonTab):
|
||||
if self._DND_TYPE:
|
||||
self._set_dnd()
|
||||
|
||||
# set up right click option
|
||||
self.tree.connect('button-press-event',self._on_button_press)
|
||||
|
||||
# build the initial data
|
||||
self.rebuild()
|
||||
self.show_all()
|
||||
|
||||
def _on_button_press(self, obj, event):
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
ref = self.get_selected()
|
||||
if ref:
|
||||
self.right_click(obj, event)
|
||||
|
||||
def right_click(self, obj, event):
|
||||
|
||||
if self.share_btn:
|
||||
itemlist = [
|
||||
(True, gtk.STOCK_ADD, self.add_button_clicked),
|
||||
(False,_('Share'), self.edit_button_clicked),
|
||||
(True, gtk.STOCK_EDIT, self.edit_button_clicked),
|
||||
(True, gtk.STOCK_REMOVE, self.del_button_clicked),
|
||||
]
|
||||
else:
|
||||
itemlist = [
|
||||
(True, gtk.STOCK_ADD, self.add_button_clicked),
|
||||
(True, gtk.STOCK_EDIT, self.edit_button_clicked),
|
||||
(True, gtk.STOCK_REMOVE, self.del_button_clicked),
|
||||
]
|
||||
|
||||
menu = gtk.Menu()
|
||||
for (image, title, func) in itemlist:
|
||||
if image:
|
||||
item = gtk.ImageMenuItem(stock_id=title)
|
||||
else:
|
||||
item = gtk.MenuItem(title)
|
||||
item.connect('activate',func)
|
||||
item.show()
|
||||
menu.append(item)
|
||||
menu.popup(None, None, None, event.button, event.time)
|
||||
|
||||
def find_index(self,obj):
|
||||
"""
|
||||
returns the index of the object within the associated data
|
||||
@ -1274,7 +1314,48 @@ class GalleryTab(ButtonTab):
|
||||
"""
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||
self.edit_button_clicked(obj)
|
||||
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
reflist = self.iconlist.get_selected_items()
|
||||
if len(reflist) == 1:
|
||||
ref = self.media_list[reflist[0][0]]
|
||||
self.right_click(ref, event)
|
||||
|
||||
def right_click(self, obj, event):
|
||||
itemlist = [
|
||||
(True, gtk.STOCK_ADD, self.add_button_clicked),
|
||||
(False,_('Share'), self.edit_button_clicked),
|
||||
(True, gtk.STOCK_EDIT, self.edit_button_clicked),
|
||||
(True, gtk.STOCK_REMOVE, self.del_button_clicked),
|
||||
]
|
||||
|
||||
menu = gtk.Menu()
|
||||
|
||||
ref_obj = self.dbstate.db.get_object_from_handle(obj.ref)
|
||||
mime_type = ref_obj.get_mime_type()
|
||||
if mime_type:
|
||||
app = Mime.get_application(mime_type)
|
||||
if app:
|
||||
item = gtk.MenuItem(_('Open with %s') % app[1])
|
||||
item.connect('activate',make_launcher(app[0],
|
||||
ref_obj.get_path()))
|
||||
item.show()
|
||||
menu.append(item)
|
||||
item = gtk.SeparatorMenuItem()
|
||||
item.show()
|
||||
menu.append(item)
|
||||
|
||||
for (image, title, func) in itemlist:
|
||||
if image:
|
||||
item = gtk.ImageMenuItem(stock_id=title)
|
||||
else:
|
||||
item = gtk.MenuItem(title)
|
||||
item.connect('activate',func)
|
||||
item.show()
|
||||
menu.append(item)
|
||||
menu.popup(None, None, None, event.button, event.time)
|
||||
|
||||
|
||||
|
||||
def get_icon_name(self):
|
||||
return 'gramps-media'
|
||||
|
||||
@ -1330,7 +1411,8 @@ class GalleryTab(ButtonTab):
|
||||
for ref in self.media_list:
|
||||
handle = ref.get_reference_handle()
|
||||
obj = self.dbstate.db.get_object_from_handle(handle)
|
||||
pixbuf = ImgManip.get_thumb_from_obj(obj)
|
||||
pixbuf = ImgManip.get_thumbnail_image(obj.get_path(),
|
||||
obj.get_mime_type())
|
||||
self.iconmodel.append(row=[pixbuf,obj.get_description(),ref])
|
||||
self._connect_icon_model()
|
||||
self._set_label()
|
||||
@ -1918,3 +2000,6 @@ class BackRefModel(gtk.ListStore):
|
||||
self.append(row=[dtype,gid,name,handle])
|
||||
yield True
|
||||
yield False
|
||||
|
||||
def make_launcher(prog, path):
|
||||
return lambda x: os.spawnvpe(os.P_NOWAIT, prog, [ prog, path], os.environ)
|
||||
|
@ -273,7 +273,7 @@ class EditPerson(EditPrimary):
|
||||
|
||||
media_list = self.obj.get_media_list()
|
||||
if media_list:
|
||||
from EditMediaRef import EditMediaRef
|
||||
from Editors import EditMediaRef
|
||||
|
||||
media_ref = media_list[0]
|
||||
object_handle = media_ref.get_reference_handle()
|
||||
@ -300,9 +300,6 @@ class EditPerson(EditPrimary):
|
||||
if progname and len(progname) > 1:
|
||||
Utils.add_menuitem(menu,_("Open in %s") % progname[1],
|
||||
photo,self.popup_view_photo)
|
||||
if mtype and mtype.startswith("image"):
|
||||
Utils.add_menuitem(menu,_("Edit with the GIMP"),
|
||||
photo,self.popup_edit_photo)
|
||||
Utils.add_menuitem(menu,_("Edit Object Properties"),photo,
|
||||
self.popup_change_description)
|
||||
menu.popup(None,None,None,event.button,event.time)
|
||||
@ -315,20 +312,10 @@ class EditPerson(EditPrimary):
|
||||
object_handle = ph.get_reference_handle()
|
||||
Utils.view_photo(self.db.get_object_from_handle(object_handle))
|
||||
|
||||
def popup_edit_photo(self, obj):
|
||||
"""Open this picture in a picture editor"""
|
||||
media_list = self.obj.get_media_list()
|
||||
if media_list:
|
||||
ph = media_list[0]
|
||||
object_handle = ph.get_reference_handle()
|
||||
if os.fork() == 0:
|
||||
obj = self.db.get_object_from_handle(object_handle)
|
||||
os.execvp(const.editor,[const.editor, obj.get_path()])
|
||||
|
||||
def popup_change_description(self,obj):
|
||||
media_list = self.obj.get_media_list()
|
||||
if media_list:
|
||||
from EditMediaRef import EditMediaRef
|
||||
from Editors import EditMediaRef
|
||||
|
||||
media_ref = media_list[0]
|
||||
object_handle = media_ref.get_reference_handle()
|
||||
@ -336,7 +323,6 @@ class EditPerson(EditPrimary):
|
||||
EditMediaRef(self.dbstate, self.uistate, self.track,
|
||||
media_obj, media_ref, self.image_callback)
|
||||
|
||||
|
||||
def given_focus_out_event (self, entry, event):
|
||||
if not self.should_guess_gender:
|
||||
return False
|
||||
|
@ -44,8 +44,7 @@ def run_browser(url):
|
||||
for path in search:
|
||||
prog = os.path.join(path,browser)
|
||||
if os.path.isfile(prog):
|
||||
if os.fork() == 0:
|
||||
os.execvp(prog,[prog, url])
|
||||
os.spawnvpe(os.P_NOWAIT, prog, [prog, url], os.environ)
|
||||
return
|
||||
|
||||
|
||||
|
@ -127,9 +127,7 @@ def run_thumbnailer(mtype, frm, to, size=const.thumbScale):
|
||||
|
||||
if cmd and enable:
|
||||
cmdlist = map(lambda x: sublist.get(x,x),cmd.split())
|
||||
if os.fork() == 0:
|
||||
os.execvp(cmdlist[0],cmdlist)
|
||||
os.wait()
|
||||
os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@ -160,59 +160,47 @@ class OptionDialog:
|
||||
def get_response(self):
|
||||
return self.response
|
||||
|
||||
class ErrorDialog:
|
||||
class ErrorDialog(gtk.MessageDialog):
|
||||
def __init__(self,msg1,msg2="",parent=None):
|
||||
|
||||
self.xml = gtk.glade.XML(const.gladeFile,"errdialog","gramps")
|
||||
self.top = self.xml.get_widget('errdialog')
|
||||
self.top.set_icon(ICON)
|
||||
|
||||
label1 = self.xml.get_widget('label1')
|
||||
label2 = self.xml.get_widget('label2')
|
||||
label1.set_text('<span weight="bold" size="larger">%s</span>' % str(msg1))
|
||||
label1.set_use_markup(True)
|
||||
label2.set_text(str(msg2))
|
||||
self.top.show()
|
||||
if parent:
|
||||
self.top.set_transient_for(parent)
|
||||
self.top.run()
|
||||
self.top.destroy()
|
||||
gtk.MessageDialog.__init__(self, parent,
|
||||
flags=gtk.DIALOG_MODAL,
|
||||
type=gtk.MESSAGE_ERROR,
|
||||
buttons=gtk.BUTTONS_CLOSE)
|
||||
self.set_markup('<span weight="bold" size="larger">%s</span>' % msg1)
|
||||
self.format_secondary_text(msg2)
|
||||
self.set_icon(ICON)
|
||||
self.show()
|
||||
self.run()
|
||||
self.destroy()
|
||||
|
||||
class WarningDialog:
|
||||
def __init__(self,msg1,msg2="",parent=None):
|
||||
|
||||
self.xml = gtk.glade.XML(const.gladeFile,"warndialog","gramps")
|
||||
self.top = self.xml.get_widget('warndialog')
|
||||
self.top.set_icon(ICON)
|
||||
|
||||
label1 = self.xml.get_widget('label1')
|
||||
label2 = self.xml.get_widget('label2')
|
||||
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
|
||||
label1.set_use_markup(True)
|
||||
label2.set_text(msg2)
|
||||
self.top.show()
|
||||
if parent:
|
||||
self.top.set_transient_for(parent)
|
||||
self.top.run()
|
||||
self.top.destroy()
|
||||
|
||||
class OkDialog:
|
||||
class WarningDialog(gtk.MessageDialog):
|
||||
def __init__(self,msg1,msg2="",parent=None):
|
||||
|
||||
self.xml = gtk.glade.XML(const.gladeFile,"okdialog","gramps")
|
||||
self.top = self.xml.get_widget('okdialog')
|
||||
self.top.set_icon(ICON)
|
||||
gtk.MessageDialog.__init__(self, parent,
|
||||
flags=gtk.DIALOG_MODAL,
|
||||
type=gtk.MESSAGE_WARNING,
|
||||
buttons=gtk.BUTTONS_CLOSE)
|
||||
self.set_markup('<span weight="bold" size="larger">%s</span>' % msg1)
|
||||
self.format_secondary_text(msg2)
|
||||
self.set_icon(ICON)
|
||||
self.show()
|
||||
self.run()
|
||||
self.destroy()
|
||||
|
||||
label1 = self.xml.get_widget('label1')
|
||||
label2 = self.xml.get_widget('label2')
|
||||
label1.set_text('<span weight="bold" size="larger">%s</span>' % msg1)
|
||||
label1.set_use_markup(True)
|
||||
label2.set_text(msg2)
|
||||
self.top.show()
|
||||
if parent:
|
||||
self.top.set_transient_for(parent)
|
||||
self.top.run()
|
||||
self.top.destroy()
|
||||
class OkDialog(gtk.MessageDialog):
|
||||
def __init__(self,msg1,msg2="",parent=None):
|
||||
|
||||
gtk.MessageDialog.__init__(self, parent,
|
||||
flags=gtk.DIALOG_MODAL,
|
||||
type=gtk.MESSAGE_INFO,
|
||||
buttons=gtk.BUTTONS_CLOSE)
|
||||
self.set_markup('<span weight="bold" size="larger">%s</span>' % msg1)
|
||||
self.format_secondary_text(msg2)
|
||||
self.set_icon(ICON)
|
||||
self.show()
|
||||
self.run()
|
||||
self.destroy()
|
||||
|
||||
class MissingMediaDialog:
|
||||
def __init__(self,msg1,msg2,task1,task2,task3,parent=None):
|
||||
|
@ -596,8 +596,7 @@ def view_photo(photo):
|
||||
args = prog.split()
|
||||
args.append(photo.get_path())
|
||||
|
||||
if os.fork() == 0:
|
||||
os.execvp(args[0],args)
|
||||
os.spawnvpe(os.P_NOWAIT, args[0], args, os.environ)
|
||||
|
||||
def find_file( filename):
|
||||
# try the filename we got
|
||||
|
@ -7491,151 +7491,6 @@ Text Beside Icons</property>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="errdialog">
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="default_width">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="has_separator">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="okbutton1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-5</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">6</property>
|
||||
<property name="ypad">12</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">6</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">expand|shrink|fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-dialog-error</property>
|
||||
<property name="icon_size">6</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="savedialog">
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
@ -8144,294 +7999,6 @@ Text Beside Icons</property>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="warndialog">
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="has_separator">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-7</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table5">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">6</property>
|
||||
<property name="ypad">12</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-dialog-warning</property>
|
||||
<property name="icon_size">6</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">6</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">expand|shrink|fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="okdialog">
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="has_separator">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-5</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table6">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">6</property>
|
||||
<property name="ypad">12</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-dialog-info</property>
|
||||
<property name="icon_size">6</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">6</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">expand|shrink|fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="missmediadialog">
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
|
@ -47,10 +47,12 @@ except ImportError:
|
||||
import gtk.gdk
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
||||
import gobject
|
||||
|
||||
# setup import path
|
||||
|
||||
gobject.threads_init()
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.basename(__file__)))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user