Merge lp:~yuvipanda/dreampie/trunk into lp:dreampie

Proposed by Yuvi Panda
Status: Merged
Merged at revision: 121
Proposed branch: lp:~yuvipanda/dreampie/trunk
Merge into: lp:dreampie
Diff against target: 91 lines (+31/-6)
4 files modified
dreampielib/gui/__init__.py (+14/-6)
dreampielib/gui/config.py (+1/-0)
dreampielib/gui/config_dialog.py (+4/-0)
share/dreampie/dreampie.glade (+12/-0)
To merge this branch: bzr merge lp:~yuvipanda/dreampie/trunk
Reviewer Review Type Date Requested Status
Noam Yorav-Raphael Approve
Review via email: mp+19820@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Yuvi Panda (yuvipanda) wrote :
Revision history for this message
Noam Yorav-Raphael (noamraph) wrote :

Thanks for the patch! It looks really good. I fixed it in revision 121.
(I haven't really merged this because from the flow of inputs during the past two days I forgot about your patch and re-implemented it. I'm sorry! Please file other patches that way - I merged two other patches that way and it was really nice.)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dreampielib/gui/__init__.py'
2--- dreampielib/gui/__init__.py 2010-02-19 11:26:51 +0000
3+++ dreampielib/gui/__init__.py 2010-02-21 18:43:14 +0000
4@@ -1,3 +1,4 @@
5+
6 # Copyright 2010 Noam Yorav-Raphael
7 #
8 # This file is part of DreamPie.
9@@ -854,12 +855,19 @@
10 self.quit()
11
12 def quit(self):
13- msg = gtk.MessageDialog(self.window_main, gtk.DIALOG_MODAL,
14- gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO,
15- _("Are you sure you want to quit?"))
16- response = msg.run()
17- msg.destroy()
18- if response == gtk.RESPONSE_YES:
19+ confirmed = False
20+ if self.config.get_bool('silent-exit'):
21+ confirmed = True
22+ else:
23+ msg = gtk.MessageDialog(self.window_main, gtk.DIALOG_MODAL,
24+ gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO,
25+ _("Are you sure you want to quit?"))
26+ response = msg.run()
27+ msg.destroy()
28+ if response == gtk.RESPONSE_YES:
29+ confirmed = True
30+
31+ if confirmed:
32 self.is_terminating = True
33 self.window_main.destroy()
34 self.subp.kill()
35
36=== modified file 'dreampielib/gui/config.py'
37--- dreampielib/gui/config.py 2010-02-16 09:37:27 +0000
38+++ dreampielib/gui/config.py 2010-02-21 18:43:14 +0000
39@@ -34,6 +34,7 @@
40 reshist-size = 30
41 autofold = True
42 autofold-numlines = 30
43+silent-exit = False
44 viewer = ''
45 init-code = ''
46
47
48=== modified file 'dreampielib/gui/config_dialog.py'
49--- dreampielib/gui/config_dialog.py 2010-02-14 07:50:13 +0000
50+++ dreampielib/gui/config_dialog.py 2010-02-21 18:43:14 +0000
51@@ -59,6 +59,8 @@
52 self.leave_code_chk.props.active = config.get_bool('leave-code')
53
54 self.hide_defs_chk.props.active = config.get_bool('hide-defs')
55+
56+ self.silent_exit_chk.props.active = config.get_bool('silent-exit')
57
58 self.themes = dict((name, tags.get_theme(config, name))
59 for name in tags.get_theme_names(config))
60@@ -117,6 +119,8 @@
61 config.set_bool('leave-code', self.leave_code_chk.props.active)
62
63 config.set_bool('hide-defs', self.hide_defs_chk.props.active)
64+
65+ config.set_bool('silent-exit', self.silent_exit_chk.props.active)
66
67 sb = self.sourcebuffer
68 init_code = sb.get_text(sb.get_start_iter(),
69
70=== modified file 'share/dreampie/dreampie.glade'
71--- share/dreampie/dreampie.glade 2010-02-19 11:26:51 +0000
72+++ share/dreampie/dreampie.glade 2010-02-21 18:43:14 +0000
73@@ -1111,6 +1111,18 @@
74 <property name="position">1</property>
75 </packing>
76 </child>
77+ <child>
78+ <widget class="GtkCheckButton" id="silent_exit_chk">
79+ <property name="label" translatable="yes">Exit without confirmation</property>
80+ <property name="visible">True</property>
81+ <property name="can_focus">True</property>
82+ <property name="receives_default">False</property>
83+ <property name="draw_indicator">True</property>
84+ </widget>
85+ <packing>
86+ <property name="position">2</property>
87+ </packing>
88+ </child>
89 </widget>
90 </child>
91 <child>

Subscribers

People subscribed via source and target branches

to all changes: