GTG

Merge lp:~parinporecha/gtg/calendar_hidden_patch into lp:~gtg/gtg/old-trunk

Proposed by Parin Porecha
Status: Merged
Merged at revision: 1269
Proposed branch: lp:~parinporecha/gtg/calendar_hidden_patch
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 32 lines (+12/-2)
1 file modified
GTG/gtk/editor/calendar.py (+12/-2)
To merge this branch: bzr merge lp:~parinporecha/gtg/calendar_hidden_patch
Reviewer Review Type Date Requested Status
Izidor Matušov Approve
Review via email: mp+141557@code.launchpad.net

Description of the change

This is a patch for the Bug #1032745 ( Hidden part of calendar ) and Bug #1096622 ( Damaged image in the help ).
i have tested it and it works well.
i have used some 'if' statements to correct the bug and i'm not sure if this is the best way.
If you do know a better way, plz suggest ! :)
Also, i have left 2 px on both sides for better aesthetics

To post a comment you must log in.
1269. By Parin Porecha

Modified the calendar_hidden_patch. Also, fixed the Bug #1096622

1270. By Parin Porecha

Modified the calendar_hidden_patch. Also, fixed the Bug #1096622

Revision history for this message
Parin Porecha (parinporecha) wrote :

I have modified the patch and put all the new logic in a single method :)
Also, the Bug #1096622 ( Damaged image in the help ) has been fixed

Revision history for this message
Izidor Matušov (izidor) wrote :

Thank you for patches!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'GTG/gtk/editor/calendar.py'
--- GTG/gtk/editor/calendar.py 2012-12-13 15:44:18 +0000
+++ GTG/gtk/editor/calendar.py 2013-01-08 10:58:21 +0000
@@ -100,13 +100,23 @@
100 # to let PyGTK solve it's bussiness.100 # to let PyGTK solve it's bussiness.
101 self.__calendar.clear_marks()101 self.__calendar.clear_marks()
102102
103 def move_calendar_inside(self, width, height, x, y):
104 """ This method moves the calender inside the screen whenever part of it is displayed outside the screen """
105 screen_width = gtk.gdk.screen_width()
106 if x < width: #To display calendar inside the screen when editor window is outside leftside of the screen
107 self.__window.move(2, y - height)
108 elif x > (screen_width-2): #To display calendar inside the screen when editor window is outside rightside of the screen
109 self.__window.move(screen_width - width - 2, y - height)
110 else:
111 self.__window.move(x - width, y - height)
112
103 def show_at_position(self, x, y):113 def show_at_position(self, x, y):
104 width, height = self.__window.get_size()114 width, height = self.__window.get_size()
105 self.__window.move(x - width, y - height)115 self.move_calendar_inside(width, height, x, y)
106 self.__window.show()116 self.__window.show()
107 ##some window managers ignore move before you show a window. (which117 ##some window managers ignore move before you show a window. (which
108 # ones? question by invernizzi)118 # ones? question by invernizzi)
109 self.__window.move(x - width, y - height)119 self.move_calendar_inside(width, height, x, y)
110 self.__window.grab_add()120 self.__window.grab_add()
111 #We grab the pointer in the calendar121 #We grab the pointer in the calendar
112 gdk.pointer_grab(self.__window.window, True,122 gdk.pointer_grab(self.__window.window, True,
113123
=== modified file 'doc/userdoc/C/figures/quick_tag_entry.png'
114Binary files doc/userdoc/C/figures/quick_tag_entry.png 2012-07-09 15:18:39 +0000 and doc/userdoc/C/figures/quick_tag_entry.png 2013-01-08 10:58:21 +0000 differ124Binary files doc/userdoc/C/figures/quick_tag_entry.png 2012-07-09 15:18:39 +0000 and doc/userdoc/C/figures/quick_tag_entry.png 2013-01-08 10:58:21 +0000 differ

Subscribers

People subscribed via source and target branches

to status/vote changes: