9795: remember the last location of windows [export assistant]

This commit is contained in:
Paul Franklin 2016-12-13 11:40:00 -08:00
parent 03128a0728
commit 1b6d84353c
2 changed files with 22 additions and 13 deletions

View File

@ -122,7 +122,7 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
#set_window is present in both parent classes #set_window is present in both parent classes
ManagedWindow.set_window(self, self, None, ManagedWindow.set_window(self, self, None,
self.top_title, isWindow=True) self.top_title, isWindow=True)
self.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) self.setup_configs('interface.exportassistant', 760, 500)
#set up callback method for the export plugins #set up callback method for the export plugins
self.callback = self.pulse_progressbar self.callback = self.pulse_progressbar
@ -172,7 +172,6 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
image.set_from_file(SPLASH) image.set_from_file(SPLASH)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.set_size_request(600, -1) # wide enough it won't have to expand
box.pack_start(image, False, False, 5) box.pack_start(image, False, False, 5)
box.pack_start(label, False, False, 5) box.pack_start(label, False, False, 5)
@ -234,7 +233,7 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
def create_page_options(self): def create_page_options(self):
# as we do not know yet what to show, we create an empty page # as we do not know yet what to show, we create an empty page
page = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) page = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
page.set_border_width(12) page.set_border_width(0)
page.set_spacing(12) page.set_spacing(12)
page.show_all() page.show_all()
@ -531,7 +530,11 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) :
def close(self, *obj) : def close(self, *obj) :
#clean up ManagedWindow menu, then destroy window, bring forward parent #clean up ManagedWindow menu, then destroy window, bring forward parent
real_width, real_height = self.get_size() # "destroy" changes them
real_x_pos, real_y_pos = self.get_position() # "destroy" changes them
Gtk.Assistant.destroy(self) Gtk.Assistant.destroy(self)
self.move(real_x_pos, real_y_pos) # "close" calls self._save_position()
self.resize(real_width, real_height) # "close" calls self._save_size()
ManagedWindow.close(self,*obj) ManagedWindow.close(self,*obj)
def get_intro_text(self): def get_intro_text(self):

View File

@ -275,12 +275,14 @@ class WriterOptionBox:
button.set_size_request(107, -1) button.set_size_request(107, -1)
button.connect("clicked", self.show_preview_data) button.connect("clicked", self.show_preview_data)
button.proxy_name = proxy_name button.proxy_name = proxy_name
colon = _(':') # translators: needed for French, ignore otherwise
if proxy_name == "person": if proxy_name == "person":
# Frame Person: # Frame Person:
self.filter_obj = Gtk.ComboBox() self.filter_obj = Gtk.ComboBox()
label = Gtk.Label(label=_('_Person Filter') + ": ") label = Gtk.Label(label=_('_Person Filter') + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
label.set_use_underline(True) label.set_use_underline(True)
label.set_mnemonic_widget(self.filter_obj) label.set_mnemonic_widget(self.filter_obj)
box = Gtk.Box() box = Gtk.Box()
@ -295,9 +297,10 @@ class WriterOptionBox:
# Frame Note: # Frame Note:
# Objects for choosing a Note filter: # Objects for choosing a Note filter:
self.filter_note = Gtk.ComboBox() self.filter_note = Gtk.ComboBox()
label_note = Gtk.Label(label=_('_Note Filter') + ": ") label_note = Gtk.Label(label=_('_Note Filter') + colon)
label_note.set_halign(Gtk.Align.START) label_note.set_halign(Gtk.Align.START)
label_note.set_size_request(150, -1) label_note.set_size_request(120, -1)
label_note.set_padding(5, 0)
label_note.set_use_underline(True) label_note.set_use_underline(True)
label_note.set_mnemonic_widget(self.filter_note) label_note.set_mnemonic_widget(self.filter_note)
box = Gtk.Box() box = Gtk.Box()
@ -310,18 +313,20 @@ class WriterOptionBox:
button.set_tooltip_text(_("Click to see preview after note filter")) button.set_tooltip_text(_("Click to see preview after note filter"))
elif proxy_name == "privacy": elif proxy_name == "privacy":
# Frame 3: # Frame 3:
label = Gtk.Label(label=_("Privacy Filter") + ":") label = Gtk.Label(label=_("Privacy Filter") + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
box = Gtk.Box() box = Gtk.Box()
box.pack_start(label, False, True, 0) box.pack_start(label, False, True, 0)
box.add(self.private_check) box.add(self.private_check)
button.set_tooltip_text(_("Click to see preview after privacy filter")) button.set_tooltip_text(_("Click to see preview after privacy filter"))
elif proxy_name == "living": elif proxy_name == "living":
# Frame 4: # Frame 4:
label = Gtk.Label(label=_("Living Filter") + ":") label = Gtk.Label(label=_("Living Filter") + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
box = Gtk.Box() box = Gtk.Box()
box.pack_start(label, False, True, 0) box.pack_start(label, False, True, 0)
self.restrict_option = Gtk.ComboBox() self.restrict_option = Gtk.ComboBox()
@ -330,9 +335,10 @@ class WriterOptionBox:
elif proxy_name == "reference": elif proxy_name == "reference":
# Frame 5: # Frame 5:
self.reference_filter = Gtk.ComboBox() self.reference_filter = Gtk.ComboBox()
label = Gtk.Label(label=_('Reference Filter') + ": ") label = Gtk.Label(label=_('Reference Filter') + colon)
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_size_request(150, -1) label.set_size_request(120, -1)
label.set_padding(5, 0)
box = Gtk.Box() box = Gtk.Box()
box.pack_start(label, False, True, 0) box.pack_start(label, False, True, 0)
box.pack_start(self.reference_filter, True, True, 0) box.pack_start(self.reference_filter, True, True, 0)