Merge lp:~parthpanchl/gtg/fix-calendar into lp:~gtg/gtg/old-trunk
- fix-calendar
- Merge into old-trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 1372 | ||||||||
Proposed branch: | lp:~parthpanchl/gtg/fix-calendar | ||||||||
Merge into: | lp:~gtg/gtg/old-trunk | ||||||||
Diff against target: |
467 lines (+181/-119) 8 files modified
CHANGELOG (+2/-0) GTG/gtk/browser/browser.py (+49/-6) GTG/gtk/browser/taskbrowser.ui (+20/-10) GTG/gtk/editor/__init__.py (+1/-0) GTG/gtk/editor/calendar.py (+10/-7) GTG/gtk/editor/calendar.ui (+96/-0) GTG/gtk/editor/editor.py (+3/-1) GTG/gtk/editor/taskeditor.ui (+0/-95) |
||||||||
To merge this branch: | bzr merge lp:~parthpanchl/gtg/fix-calendar | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nimit Shah | Pending | ||
Review via email: mp+211215@code.launchpad.net |
Commit message
Fixes Bug #931904 & Bug #1289284
Description of the change
Fixes Bug #931904 & Bug #1289284
- Adds "Pick a date" option to set start/due date in task browser's context menu to set date from calendar window
- Removes 'Now' option from 'Set due date' context menu in task browser
- Detaches calendar ui from taskeditor.ui
- Updates calendar ui to be consistent with parent window
Nimit Shah (nimit-svnit) wrote : | # |
- 1366. By Parth Panchal
-
Updated UI of task browser's context menu
- 1367. By Parth Panchal
-
Resolves conflicts
Parth Panchal (parthpanchl) wrote : | # |
Nimit,
I imagined the same UI that you're suggesting but then thought that the popular choices like today, tomorrow, next week or next month could be easily understood by the users from calendar. So to reduce the average clicks to change the start/due date, I chose that UI.
Now, I've pushed the desired changes.
- 1368. By Parth Panchal
-
Fixes calendar pop up bug
- 1369. By Parth Panchal
-
Removes 'Now' from 'Set due date' context menu in Task Browser
Preview Diff
1 | === modified file 'CHANGELOG' | |||
2 | --- CHANGELOG 2014-03-20 18:38:10 +0000 | |||
3 | +++ CHANGELOG 2014-03-23 12:58:31 +0000 | |||
4 | @@ -28,6 +28,8 @@ | |||
5 | 28 | * Moving to Sphinx for documentation and improving the scripts, by Izidor Matušov | 28 | * Moving to Sphinx for documentation and improving the scripts, by Izidor Matušov |
6 | 29 | * Fixing the error getting thrown on drag-drop of text in taskeditor, by Sagar Ghuge | 29 | * Fixing the error getting thrown on drag-drop of text in taskeditor, by Sagar Ghuge |
7 | 30 | * Fixes #1 : Searching for something and then clicking on any place in the tag sidebar doesn't clear the quick-add bar text, by Parth Panchal | 30 | * Fixes #1 : Searching for something and then clicking on any place in the tag sidebar doesn't clear the quick-add bar text, by Parth Panchal |
8 | 31 | * Fix for bug #931904 : Scheduling many task, by Parth Panchal | ||
9 | 32 | * Fix for bug #1289284 : Date gets dragged from calendar widget when its date is already set, by Parth Panchal | ||
10 | 31 | 33 | ||
11 | 32 | 2013-11-24 Getting Things GNOME! 0.3.1 | 34 | 2013-11-24 Getting Things GNOME! 0.3.1 |
12 | 33 | * Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin | 35 | * Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin |
13 | 34 | 36 | ||
14 | === modified file 'GTG/gtk/browser/browser.py' | |||
15 | --- GTG/gtk/browser/browser.py 2014-03-20 18:38:10 +0000 | |||
16 | +++ GTG/gtk/browser/browser.py 2014-03-23 12:58:31 +0000 | |||
17 | @@ -39,6 +39,7 @@ | |||
18 | 39 | from GTG.gtk.browser.modifytags_dialog import ModifyTagsDialog | 39 | from GTG.gtk.browser.modifytags_dialog import ModifyTagsDialog |
19 | 40 | from GTG.gtk.browser.tag_context_menu import TagContextMenu | 40 | from GTG.gtk.browser.tag_context_menu import TagContextMenu |
20 | 41 | from GTG.gtk.browser.treeview_factory import TreeviewFactory | 41 | from GTG.gtk.browser.treeview_factory import TreeviewFactory |
21 | 42 | from GTG.gtk.editor.calendar import GTGCalendar | ||
22 | 42 | from GTG.tools.dates import Date | 43 | from GTG.tools.dates import Date |
23 | 43 | from GTG.tools.logger import Log | 44 | from GTG.tools.logger import Log |
24 | 44 | 45 | ||
25 | @@ -180,12 +181,15 @@ | |||
26 | 180 | 181 | ||
27 | 181 | def _init_ui_widget(self): | 182 | def _init_ui_widget(self): |
28 | 182 | """ Sets the main pane with the tree with active tasks and | 183 | """ Sets the main pane with the tree with active tasks and |
30 | 183 | create ModifyTagsDialog """ | 184 | create ModifyTagsDialog & Calendar """ |
31 | 184 | # The Active tasks treeview | 185 | # The Active tasks treeview |
32 | 185 | self.main_pane.add(self.vtree_panes['active']) | 186 | self.main_pane.add(self.vtree_panes['active']) |
33 | 186 | 187 | ||
34 | 187 | tag_completion = TagCompletion(self.req.get_tag_tree()) | 188 | tag_completion = TagCompletion(self.req.get_tag_tree()) |
35 | 188 | self.modifytags_dialog = ModifyTagsDialog(tag_completion, self.req) | 189 | self.modifytags_dialog = ModifyTagsDialog(tag_completion, self.req) |
36 | 190 | self.calendar = GTGCalendar() | ||
37 | 191 | self.calendar.set_transient_for(self.window) | ||
38 | 192 | self.calendar.connect("date-changed", self.on_date_changed) | ||
39 | 189 | 193 | ||
40 | 190 | def init_tags_sidebar(self): | 194 | def init_tags_sidebar(self): |
41 | 191 | """ | 195 | """ |
42 | @@ -276,6 +280,8 @@ | |||
43 | 276 | self.on_start_for_next_month, | 280 | self.on_start_for_next_month, |
44 | 277 | "on_start_for_next_year": | 281 | "on_start_for_next_year": |
45 | 278 | self.on_start_for_next_year, | 282 | self.on_start_for_next_year, |
46 | 283 | "on_start_for_specific_date": | ||
47 | 284 | self.on_start_for_specific_date, | ||
48 | 279 | "on_start_clear": | 285 | "on_start_clear": |
49 | 280 | self.on_start_clear, | 286 | self.on_start_clear, |
50 | 281 | "on_set_due_today": | 287 | "on_set_due_today": |
51 | @@ -288,12 +294,12 @@ | |||
52 | 288 | self.on_set_due_next_month, | 294 | self.on_set_due_next_month, |
53 | 289 | "on_set_due_next_year": | 295 | "on_set_due_next_year": |
54 | 290 | self.on_set_due_next_year, | 296 | self.on_set_due_next_year, |
55 | 291 | "on_set_due_now": | ||
56 | 292 | self.on_set_due_now, | ||
57 | 293 | "on_set_due_soon": | 297 | "on_set_due_soon": |
58 | 294 | self.on_set_due_soon, | 298 | self.on_set_due_soon, |
59 | 295 | "on_set_due_someday": | 299 | "on_set_due_someday": |
60 | 296 | self.on_set_due_someday, | 300 | self.on_set_due_someday, |
61 | 301 | "on_set_due_for_specific_date": | ||
62 | 302 | self.on_set_due_for_specific_date, | ||
63 | 297 | "on_set_due_clear": | 303 | "on_set_due_clear": |
64 | 298 | self.on_set_due_clear, | 304 | self.on_set_due_clear, |
65 | 299 | "on_dismiss_task": | 305 | "on_dismiss_task": |
66 | @@ -1095,9 +1101,6 @@ | |||
67 | 1095 | def on_set_due_next_year(self, widget): | 1101 | def on_set_due_next_year(self, widget): |
68 | 1096 | self.update_due_date(widget, "next year") | 1102 | self.update_due_date(widget, "next year") |
69 | 1097 | 1103 | ||
70 | 1098 | def on_set_due_now(self, widget): | ||
71 | 1099 | self.update_due_date(widget, "now") | ||
72 | 1100 | |||
73 | 1101 | def on_set_due_soon(self, widget): | 1104 | def on_set_due_soon(self, widget): |
74 | 1102 | self.update_due_date(widget, "soon") | 1105 | self.update_due_date(widget, "soon") |
75 | 1103 | 1106 | ||
76 | @@ -1107,6 +1110,46 @@ | |||
77 | 1107 | def on_set_due_clear(self, widget): | 1110 | def on_set_due_clear(self, widget): |
78 | 1108 | self.update_due_date(widget, None) | 1111 | self.update_due_date(widget, None) |
79 | 1109 | 1112 | ||
80 | 1113 | def on_start_for_specific_date(self, widget): | ||
81 | 1114 | """ Display Calendar to set start date of selected tasks """ | ||
82 | 1115 | self.calendar.set_title("Set Start Date") | ||
83 | 1116 | # Get task from task name | ||
84 | 1117 | task = self.req.get_task(self.get_selected_tasks()[0]) | ||
85 | 1118 | date = task.get_start_date() | ||
86 | 1119 | self.calendar.set_date(date, GTGCalendar.DATE_KIND_START) | ||
87 | 1120 | # Shows the calendar just above the mouse on widget's line of symmetry | ||
88 | 1121 | rect = widget.get_allocation() | ||
89 | 1122 | result, x, y = widget.get_window().get_origin() | ||
90 | 1123 | self.calendar.show_at_position(x + rect.x + rect.width, | ||
91 | 1124 | y + rect.y) | ||
92 | 1125 | |||
93 | 1126 | def on_set_due_for_specific_date(self, widget): | ||
94 | 1127 | """ Display Calendar to set due date of selected tasks """ | ||
95 | 1128 | self.calendar.set_title("Set Due Date") | ||
96 | 1129 | # Get task from task name | ||
97 | 1130 | task = self.req.get_task(self.get_selected_tasks()[0]) | ||
98 | 1131 | if not task.get_due_date(): | ||
99 | 1132 | date = task.get_start_date() | ||
100 | 1133 | else: | ||
101 | 1134 | date = task.get_due_date() | ||
102 | 1135 | self.calendar.set_date(date, GTGCalendar.DATE_KIND_DUE) | ||
103 | 1136 | # Shows the calendar just above the mouse on widget's line of symmetry | ||
104 | 1137 | rect = widget.get_allocation() | ||
105 | 1138 | result, x, y = widget.get_window().get_origin() | ||
106 | 1139 | self.calendar.show_at_position(x + rect.x + rect.width, | ||
107 | 1140 | y + rect.y) | ||
108 | 1141 | |||
109 | 1142 | def on_date_changed(self, calendar): | ||
110 | 1143 | # Get tasks' list from task names' list | ||
111 | 1144 | tasks = [self.req.get_task(task) for task in self.get_selected_tasks()] | ||
112 | 1145 | date, date_kind = calendar.get_selected_date() | ||
113 | 1146 | if date_kind == GTGCalendar.DATE_KIND_DUE: | ||
114 | 1147 | for task in tasks: | ||
115 | 1148 | task.set_due_date(date) | ||
116 | 1149 | elif date_kind == GTGCalendar.DATE_KIND_START: | ||
117 | 1150 | for task in tasks: | ||
118 | 1151 | task.set_start_date(date) | ||
119 | 1152 | |||
120 | 1110 | def on_modify_tags(self, widget): | 1153 | def on_modify_tags(self, widget): |
121 | 1111 | """ Run Modify Tags dialog on selected tasks """ | 1154 | """ Run Modify Tags dialog on selected tasks """ |
122 | 1112 | tasks = self.get_selected_tasks() | 1155 | tasks = self.get_selected_tasks() |
123 | 1113 | 1156 | ||
124 | === modified file 'GTG/gtk/browser/taskbrowser.ui' | |||
125 | --- GTG/gtk/browser/taskbrowser.ui 2013-11-25 02:37:46 +0000 | |||
126 | +++ GTG/gtk/browser/taskbrowser.ui 2014-03-23 12:58:31 +0000 | |||
127 | @@ -1059,6 +1059,16 @@ | |||
128 | 1059 | </object> | 1059 | </object> |
129 | 1060 | </child> | 1060 | </child> |
130 | 1061 | <child> | 1061 | <child> |
131 | 1062 | <object class="GtkImageMenuItem" id="tcm_start_for_specific_date"> | ||
132 | 1063 | <property name="label" translatable="yes">Pick a date...</property> | ||
133 | 1064 | <property name="visible">True</property> | ||
134 | 1065 | <property name="can_focus">False</property> | ||
135 | 1066 | <property name="use_underline">True</property> | ||
136 | 1067 | <property name="use_stock">False</property> | ||
137 | 1068 | <signal name="activate" handler="on_start_for_specific_date" swapped="no"/> | ||
138 | 1069 | </object> | ||
139 | 1070 | </child> | ||
140 | 1071 | <child> | ||
141 | 1062 | <object class="GtkSeparatorMenuItem" id="menuitem1"> | 1072 | <object class="GtkSeparatorMenuItem" id="menuitem1"> |
142 | 1063 | <property name="visible">True</property> | 1073 | <property name="visible">True</property> |
143 | 1064 | <property name="can_focus">False</property> | 1074 | <property name="can_focus">False</property> |
144 | @@ -1140,22 +1150,22 @@ | |||
145 | 1140 | </object> | 1150 | </object> |
146 | 1141 | </child> | 1151 | </child> |
147 | 1142 | <child> | 1152 | <child> |
148 | 1153 | <object class="GtkImageMenuItem" id="tcm_due_specific_date"> | ||
149 | 1154 | <property name="label" translatable="yes">Pick a date...</property> | ||
150 | 1155 | <property name="visible">True</property> | ||
151 | 1156 | <property name="can_focus">False</property> | ||
152 | 1157 | <property name="use_underline">True</property> | ||
153 | 1158 | <property name="use_stock">False</property> | ||
154 | 1159 | <signal name="activate" handler="on_set_due_for_specific_date" swapped="no"/> | ||
155 | 1160 | </object> | ||
156 | 1161 | </child> | ||
157 | 1162 | <child> | ||
158 | 1143 | <object class="GtkSeparatorMenuItem" id="menuitem2"> | 1163 | <object class="GtkSeparatorMenuItem" id="menuitem2"> |
159 | 1144 | <property name="visible">True</property> | 1164 | <property name="visible">True</property> |
160 | 1145 | <property name="can_focus">False</property> | 1165 | <property name="can_focus">False</property> |
161 | 1146 | </object> | 1166 | </object> |
162 | 1147 | </child> | 1167 | </child> |
163 | 1148 | <child> | 1168 | <child> |
164 | 1149 | <object class="GtkImageMenuItem" id="tcm_due_now"> | ||
165 | 1150 | <property name="label" translatable="yes">_Now</property> | ||
166 | 1151 | <property name="visible">True</property> | ||
167 | 1152 | <property name="can_focus">False</property> | ||
168 | 1153 | <property name="use_underline">True</property> | ||
169 | 1154 | <property name="use_stock">False</property> | ||
170 | 1155 | <signal name="activate" handler="on_set_due_now" swapped="no"/> | ||
171 | 1156 | </object> | ||
172 | 1157 | </child> | ||
173 | 1158 | <child> | ||
174 | 1159 | <object class="GtkImageMenuItem" id="tcm_due_soon"> | 1169 | <object class="GtkImageMenuItem" id="tcm_due_soon"> |
175 | 1160 | <property name="label" translatable="yes">_Soon</property> | 1170 | <property name="label" translatable="yes">_Soon</property> |
176 | 1161 | <property name="visible">True</property> | 1171 | <property name="visible">True</property> |
177 | 1162 | 1172 | ||
178 | === modified file 'GTG/gtk/editor/__init__.py' | |||
179 | --- GTG/gtk/editor/__init__.py 2013-11-25 02:37:46 +0000 | |||
180 | +++ GTG/gtk/editor/__init__.py 2014-03-23 12:58:31 +0000 | |||
181 | @@ -27,6 +27,7 @@ | |||
182 | 27 | class GnomeConfig: | 27 | class GnomeConfig: |
183 | 28 | current_rep = os.path.dirname(os.path.abspath(__file__)) | 28 | current_rep = os.path.dirname(os.path.abspath(__file__)) |
184 | 29 | EDITOR_UI_FILE = os.path.join(current_rep, "taskeditor.ui") | 29 | EDITOR_UI_FILE = os.path.join(current_rep, "taskeditor.ui") |
185 | 30 | CALENDAR_UI_FILE = os.path.join(current_rep, "calendar.ui") | ||
186 | 30 | 31 | ||
187 | 31 | MARK_DONE = _("Mark as Done") | 32 | MARK_DONE = _("Mark as Done") |
188 | 32 | MARK_UNDONE = _("Mark as not Done") | 33 | MARK_UNDONE = _("Mark as not Done") |
189 | 33 | 34 | ||
190 | === modified file 'GTG/gtk/editor/calendar.py' | |||
191 | --- GTG/gtk/editor/calendar.py 2014-03-09 12:59:59 +0000 | |||
192 | +++ GTG/gtk/editor/calendar.py 2014-03-23 12:58:31 +0000 | |||
193 | @@ -19,8 +19,9 @@ | |||
194 | 19 | 19 | ||
195 | 20 | import datetime | 20 | import datetime |
196 | 21 | 21 | ||
198 | 22 | from gi.repository import GObject, Gdk | 22 | from gi.repository import GObject, Gdk, Gtk |
199 | 23 | 23 | ||
200 | 24 | from GTG.gtk.editor import GnomeConfig | ||
201 | 24 | from GTG.tools.dates import Date | 25 | from GTG.tools.dates import Date |
202 | 25 | 26 | ||
203 | 26 | 27 | ||
204 | @@ -39,9 +40,10 @@ | |||
205 | 39 | 40 | ||
206 | 40 | __gsignals__ = {'date-changed': __signal_type__, } | 41 | __gsignals__ = {'date-changed': __signal_type__, } |
207 | 41 | 42 | ||
209 | 42 | def __init__(self, Gtk_builder): | 43 | def __init__(self): |
210 | 43 | super(GTGCalendar, self).__init__() | 44 | super(GTGCalendar, self).__init__() |
212 | 44 | self.__builder = Gtk_builder | 45 | self.__builder = Gtk.Builder() |
213 | 46 | self.__builder.add_from_file(GnomeConfig.CALENDAR_UI_FILE) | ||
214 | 45 | self.__date_kind = None | 47 | self.__date_kind = None |
215 | 46 | self.__date = Date.no_date() | 48 | self.__date = Date.no_date() |
216 | 47 | self.__init_gtk__() | 49 | self.__init_gtk__() |
217 | @@ -117,9 +119,6 @@ | |||
218 | 117 | width, height = self.__window.get_size() | 119 | width, height = self.__window.get_size() |
219 | 118 | self.move_calendar_inside(width, height, x, y) | 120 | self.move_calendar_inside(width, height, x, y) |
220 | 119 | self.__window.show() | 121 | self.__window.show() |
221 | 120 | # some window managers ignore move before you show a window. (which | ||
222 | 121 | # ones? question by invernizzi) | ||
223 | 122 | self.move_calendar_inside(width, height, x, y) | ||
224 | 123 | self.__window.grab_add() | 122 | self.__window.grab_add() |
225 | 124 | 123 | ||
226 | 125 | #We grab the pointer in the calendar | 124 | #We grab the pointer in the calendar |
227 | @@ -140,7 +139,10 @@ | |||
228 | 140 | 0, | 139 | 0, |
229 | 141 | ) | 140 | ) |
230 | 142 | 141 | ||
232 | 143 | self.__window.connect('button-press-event', self.__focus_out) | 142 | if self.get_decorated(): |
233 | 143 | self.__window.connect("delete-event", self.close_calendar) | ||
234 | 144 | else: | ||
235 | 145 | self.__window.connect('button-press-event', self.__focus_out) | ||
236 | 144 | self.__sigid = self.__calendar.connect("day-selected", | 146 | self.__sigid = self.__calendar.connect("day-selected", |
237 | 145 | self.__day_selected, | 147 | self.__day_selected, |
238 | 146 | "RealDate",) | 148 | "RealDate",) |
239 | @@ -172,6 +174,7 @@ | |||
240 | 172 | if self.__sigid_month is not None: | 174 | if self.__sigid_month is not None: |
241 | 173 | self.__calendar.disconnect(self.__sigid_month) | 175 | self.__calendar.disconnect(self.__sigid_month) |
242 | 174 | self.__sigid_month = None | 176 | self.__sigid_month = None |
243 | 177 | return True | ||
244 | 175 | 178 | ||
245 | 176 | def __day_selected(self, widget, date_type): | 179 | def __day_selected(self, widget, date_type): |
246 | 177 | if date_type == "RealDate": | 180 | if date_type == "RealDate": |
247 | 178 | 181 | ||
248 | === added file 'GTG/gtk/editor/calendar.ui' | |||
249 | --- GTG/gtk/editor/calendar.ui 1970-01-01 00:00:00 +0000 | |||
250 | +++ GTG/gtk/editor/calendar.ui 2014-03-23 12:58:31 +0000 | |||
251 | @@ -0,0 +1,96 @@ | |||
252 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
253 | 2 | <interface> | ||
254 | 3 | <!-- interface-requires gtk+ 3.0 --> | ||
255 | 4 | <object class="GtkWindow" id="calendar"> | ||
256 | 5 | <property name="can_focus">False</property> | ||
257 | 6 | <property name="events">GDK_STRUCTURE_MASK | GDK_PROXIMITY_OUT_MASK</property> | ||
258 | 7 | <property name="resizable">False</property> | ||
259 | 8 | <property name="modal">True</property> | ||
260 | 9 | <property name="destroy_with_parent">True</property> | ||
261 | 10 | <property name="skip_taskbar_hint">True</property> | ||
262 | 11 | <property name="skip_pager_hint">True</property> | ||
263 | 12 | <child> | ||
264 | 13 | <object class="GtkBox" id="vbox5"> | ||
265 | 14 | <property name="visible">True</property> | ||
266 | 15 | <property name="can_focus">False</property> | ||
267 | 16 | <property name="orientation">vertical</property> | ||
268 | 17 | <child> | ||
269 | 18 | <object class="GtkCalendar" id="calendar1"> | ||
270 | 19 | <property name="visible">True</property> | ||
271 | 20 | <property name="can_focus">True</property> | ||
272 | 21 | </object> | ||
273 | 22 | <packing> | ||
274 | 23 | <property name="expand">False</property> | ||
275 | 24 | <property name="fill">True</property> | ||
276 | 25 | <property name="position">0</property> | ||
277 | 26 | </packing> | ||
278 | 27 | </child> | ||
279 | 28 | <child> | ||
280 | 29 | <object class="GtkBox" id="fuzzydate_btns"> | ||
281 | 30 | <property name="visible">True</property> | ||
282 | 31 | <property name="can_focus">False</property> | ||
283 | 32 | <property name="homogeneous">True</property> | ||
284 | 33 | <child> | ||
285 | 34 | <object class="GtkButton" id="button_now"> | ||
286 | 35 | <property name="label" translatable="yes">Now</property> | ||
287 | 36 | <property name="visible">True</property> | ||
288 | 37 | <property name="can_focus">True</property> | ||
289 | 38 | <property name="receives_default">True</property> | ||
290 | 39 | </object> | ||
291 | 40 | <packing> | ||
292 | 41 | <property name="expand">False</property> | ||
293 | 42 | <property name="fill">True</property> | ||
294 | 43 | <property name="position">0</property> | ||
295 | 44 | </packing> | ||
296 | 45 | </child> | ||
297 | 46 | <child> | ||
298 | 47 | <object class="GtkButton" id="button_soon"> | ||
299 | 48 | <property name="label" translatable="yes">Soon</property> | ||
300 | 49 | <property name="visible">True</property> | ||
301 | 50 | <property name="can_focus">True</property> | ||
302 | 51 | <property name="receives_default">True</property> | ||
303 | 52 | </object> | ||
304 | 53 | <packing> | ||
305 | 54 | <property name="expand">False</property> | ||
306 | 55 | <property name="fill">True</property> | ||
307 | 56 | <property name="position">1</property> | ||
308 | 57 | </packing> | ||
309 | 58 | </child> | ||
310 | 59 | <child> | ||
311 | 60 | <object class="GtkButton" id="button_someday"> | ||
312 | 61 | <property name="label" translatable="yes">Someday</property> | ||
313 | 62 | <property name="visible">True</property> | ||
314 | 63 | <property name="can_focus">True</property> | ||
315 | 64 | <property name="receives_default">True</property> | ||
316 | 65 | </object> | ||
317 | 66 | <packing> | ||
318 | 67 | <property name="expand">False</property> | ||
319 | 68 | <property name="fill">True</property> | ||
320 | 69 | <property name="position">2</property> | ||
321 | 70 | </packing> | ||
322 | 71 | </child> | ||
323 | 72 | </object> | ||
324 | 73 | <packing> | ||
325 | 74 | <property name="expand">False</property> | ||
326 | 75 | <property name="fill">True</property> | ||
327 | 76 | <property name="position">1</property> | ||
328 | 77 | </packing> | ||
329 | 78 | </child> | ||
330 | 79 | <child> | ||
331 | 80 | <object class="GtkButton" id="button_clear"> | ||
332 | 81 | <property name="label">gtk-clear</property> | ||
333 | 82 | <property name="visible">True</property> | ||
334 | 83 | <property name="can_focus">True</property> | ||
335 | 84 | <property name="receives_default">True</property> | ||
336 | 85 | <property name="use_stock">True</property> | ||
337 | 86 | </object> | ||
338 | 87 | <packing> | ||
339 | 88 | <property name="expand">False</property> | ||
340 | 89 | <property name="fill">False</property> | ||
341 | 90 | <property name="position">2</property> | ||
342 | 91 | </packing> | ||
343 | 92 | </child> | ||
344 | 93 | </object> | ||
345 | 94 | </child> | ||
346 | 95 | </object> | ||
347 | 96 | </interface> | ||
348 | 0 | \ No newline at end of file | 97 | \ No newline at end of file |
349 | 1 | 98 | ||
350 | === modified file 'GTG/gtk/editor/editor.py' | |||
351 | --- GTG/gtk/editor/editor.py 2014-03-11 01:37:13 +0000 | |||
352 | +++ GTG/gtk/editor/editor.py 2014-03-23 12:58:31 +0000 | |||
353 | @@ -119,7 +119,9 @@ | |||
354 | 119 | if conf_font_value != "": | 119 | if conf_font_value != "": |
355 | 120 | self.textview.override_font(Pango.FontDescription(conf_font_value)) | 120 | self.textview.override_font(Pango.FontDescription(conf_font_value)) |
356 | 121 | # Voila! it's done | 121 | # Voila! it's done |
358 | 122 | self.calendar = GTGCalendar(self.builder) | 122 | self.calendar = GTGCalendar() |
359 | 123 | self.calendar.set_transient_for(self.window) | ||
360 | 124 | self.calendar.set_decorated(False) | ||
361 | 123 | self.duedate_widget = self.builder.get_object("duedate_entry") | 125 | self.duedate_widget = self.builder.get_object("duedate_entry") |
362 | 124 | self.startdate_widget = self.builder.get_object("startdate_entry") | 126 | self.startdate_widget = self.builder.get_object("startdate_entry") |
363 | 125 | self.closeddate_widget = self.builder.get_object("closeddate_entry") | 127 | self.closeddate_widget = self.builder.get_object("closeddate_entry") |
364 | 126 | 128 | ||
365 | === modified file 'GTG/gtk/editor/taskeditor.ui' | |||
366 | --- GTG/gtk/editor/taskeditor.ui 2014-03-05 19:25:18 +0000 | |||
367 | +++ GTG/gtk/editor/taskeditor.ui 2014-03-23 12:58:31 +0000 | |||
368 | @@ -403,99 +403,4 @@ | |||
369 | 403 | </object> | 403 | </object> |
370 | 404 | </child> | 404 | </child> |
371 | 405 | </object> | 405 | </object> |
372 | 406 | <object class="GtkWindow" id="calendar"> | ||
373 | 407 | <property name="can_focus">False</property> | ||
374 | 408 | <property name="events">GDK_STRUCTURE_MASK | GDK_PROXIMITY_OUT_MASK</property> | ||
375 | 409 | <property name="type">popup</property> | ||
376 | 410 | <property name="resizable">False</property> | ||
377 | 411 | <property name="modal">True</property> | ||
378 | 412 | <property name="destroy_with_parent">True</property> | ||
379 | 413 | <property name="type_hint">dropdown-menu</property> | ||
380 | 414 | <property name="skip_taskbar_hint">True</property> | ||
381 | 415 | <property name="skip_pager_hint">True</property> | ||
382 | 416 | <property name="transient_for">TaskEditor</property> | ||
383 | 417 | <child> | ||
384 | 418 | <object class="GtkBox" id="vbox5"> | ||
385 | 419 | <property name="visible">True</property> | ||
386 | 420 | <property name="can_focus">False</property> | ||
387 | 421 | <property name="orientation">vertical</property> | ||
388 | 422 | <child> | ||
389 | 423 | <object class="GtkCalendar" id="calendar1"> | ||
390 | 424 | <property name="visible">True</property> | ||
391 | 425 | <property name="can_focus">True</property> | ||
392 | 426 | </object> | ||
393 | 427 | <packing> | ||
394 | 428 | <property name="expand">False</property> | ||
395 | 429 | <property name="fill">True</property> | ||
396 | 430 | <property name="position">0</property> | ||
397 | 431 | </packing> | ||
398 | 432 | </child> | ||
399 | 433 | <child> | ||
400 | 434 | <object class="GtkBox" id="fuzzydate_btns"> | ||
401 | 435 | <property name="visible">True</property> | ||
402 | 436 | <property name="can_focus">False</property> | ||
403 | 437 | <property name="homogeneous">True</property> | ||
404 | 438 | <child> | ||
405 | 439 | <object class="GtkButton" id="button_now"> | ||
406 | 440 | <property name="label" translatable="yes">Now</property> | ||
407 | 441 | <property name="visible">True</property> | ||
408 | 442 | <property name="can_focus">True</property> | ||
409 | 443 | <property name="receives_default">True</property> | ||
410 | 444 | </object> | ||
411 | 445 | <packing> | ||
412 | 446 | <property name="expand">False</property> | ||
413 | 447 | <property name="fill">True</property> | ||
414 | 448 | <property name="position">0</property> | ||
415 | 449 | </packing> | ||
416 | 450 | </child> | ||
417 | 451 | <child> | ||
418 | 452 | <object class="GtkButton" id="button_soon"> | ||
419 | 453 | <property name="label" translatable="yes">Soon</property> | ||
420 | 454 | <property name="visible">True</property> | ||
421 | 455 | <property name="can_focus">True</property> | ||
422 | 456 | <property name="receives_default">True</property> | ||
423 | 457 | </object> | ||
424 | 458 | <packing> | ||
425 | 459 | <property name="expand">False</property> | ||
426 | 460 | <property name="fill">True</property> | ||
427 | 461 | <property name="position">1</property> | ||
428 | 462 | </packing> | ||
429 | 463 | </child> | ||
430 | 464 | <child> | ||
431 | 465 | <object class="GtkButton" id="button_someday"> | ||
432 | 466 | <property name="label" translatable="yes">Someday</property> | ||
433 | 467 | <property name="visible">True</property> | ||
434 | 468 | <property name="can_focus">True</property> | ||
435 | 469 | <property name="receives_default">True</property> | ||
436 | 470 | </object> | ||
437 | 471 | <packing> | ||
438 | 472 | <property name="expand">False</property> | ||
439 | 473 | <property name="fill">True</property> | ||
440 | 474 | <property name="position">2</property> | ||
441 | 475 | </packing> | ||
442 | 476 | </child> | ||
443 | 477 | </object> | ||
444 | 478 | <packing> | ||
445 | 479 | <property name="expand">False</property> | ||
446 | 480 | <property name="fill">True</property> | ||
447 | 481 | <property name="position">1</property> | ||
448 | 482 | </packing> | ||
449 | 483 | </child> | ||
450 | 484 | <child> | ||
451 | 485 | <object class="GtkButton" id="button_clear"> | ||
452 | 486 | <property name="label">gtk-clear</property> | ||
453 | 487 | <property name="visible">True</property> | ||
454 | 488 | <property name="can_focus">True</property> | ||
455 | 489 | <property name="receives_default">True</property> | ||
456 | 490 | <property name="use_stock">True</property> | ||
457 | 491 | </object> | ||
458 | 492 | <packing> | ||
459 | 493 | <property name="expand">False</property> | ||
460 | 494 | <property name="fill">False</property> | ||
461 | 495 | <property name="position">2</property> | ||
462 | 496 | </packing> | ||
463 | 497 | </child> | ||
464 | 498 | </object> | ||
465 | 499 | </child> | ||
466 | 500 | </object> | ||
467 | 501 | </interface> | 406 | </interface> |
Hi Parth,
The branch fixes the problems but I want you to modify the UI a bit. There should be a quicker way to set dates to popular choices like today,tomorrow,next week or next month.
For this, you can create sub menu where you can give option for this and for a specific one say "Pick a date..."