[26710] in Source-Commits
Re: /svn/athena r25697 - in trunk/athena/bin/bugme: . debian
daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Mon Aug 6 15:36:25 2012
Date: Mon, 6 Aug 2012 15:36:21 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201208041545.q74FjhTc007209@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1208061536180.22690@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
ACK.
-Ben
On Sat, 4 Aug 2012, Jonathan D Reed wrote:
> Author: jdreed
> Date: 2012-08-04 11:45:43 -0400 (Sat, 04 Aug 2012)
> New Revision: 25697
>
> Modified:
> trunk/athena/bin/bugme/bugme
> trunk/athena/bin/bugme/debian/changelog
> Log:
> In bugme:
> * Support the --corner option (for limited definitions of "corner")
> (Trac: #1199)
>
>
> Modified: trunk/athena/bin/bugme/bugme
> ===================================================================
> --- trunk/athena/bin/bugme/bugme 2012-08-04 03:32:02 UTC (rev 25696)
> +++ trunk/athena/bin/bugme/bugme 2012-08-04 15:45:43 UTC (rev 25697)
> @@ -28,6 +28,8 @@
> self.killTime = 180
> # (foreground, background)
> self.colors = ('black', 'white')
> + defaultScreen = gtk.gdk.screen_get_default()
> + self.monitorGeometry = defaultScreen.get_monitor_geometry(defaultScreen.get_primary_monitor())
> try:
> self.xml = gtk.glade.XML(options.gladeFile)
> except:
> @@ -46,8 +48,13 @@
> self.elapsed_label.set_markup("<span font_desc=\"50\">00:00</span>")
> self.timer = gobject.timeout_add(1000, self.updateTimer)
> self.xml.signal_autoconnect(self)
> - # 26 px should allow room for top panel
> - self.timerWindow.move(0,26)
> + if (options.corner == "NW"):
> + # 26 px should allow room for top panel
> + self.timerWindow.move(0,26)
> + elif (options.corner == "SE"):
> + self.timerWindow.set_gravity(gtk.gdk.GRAVITY_SOUTH_EAST)
> + width, height = self.timerWindow.get_size()
> + self.timerWindow.move(self.monitorGeometry.x + (self.monitorGeometry.width - width), self.monitorGeometry.y + (self.monitorGeometry.height - height))
> self.timerWindow.show_all()
> self.nextWarn = self.startTime + (self.timeLimit - self.firstWarn)
> self.timeExpired = False
> @@ -136,7 +143,15 @@
> dest="gladeFile",
> default="/usr/share/bugme/bugme.glade",
> help="Specify an alternate Glade file for debugging")
> + #TODO: --geometry
> + parser.add_option("--corner", action="store", type="string",
> + dest="corner",
> + default="NW",
> + help="Specify a corner for the timer")
> (options, args) = parser.parse_args()
> + if options.corner not in ("SE", "NW"):
> + print "Sorry, I don't know about the %s corner of the screen" % (options.corner)
> + sys.exit(255)
> if not os.access(options.gladeFile, os.R_OK):
> print 'error: Unable to read glade file "' + gladeFile + '"'
> sys.exit(255)
>
> Modified: trunk/athena/bin/bugme/debian/changelog
> ===================================================================
> --- trunk/athena/bin/bugme/debian/changelog 2012-08-04 03:32:02 UTC (rev 25696)
> +++ trunk/athena/bin/bugme/debian/changelog 2012-08-04 15:45:43 UTC (rev 25697)
> @@ -1,3 +1,10 @@
> +debathena-bugme (10.0.5-0debathena1) unstable; urgency=low
> +
> + * Support the --corner option (for limited definitions of "corner")
> + (Trac: #1199)
> +
> + -- Jonathan Reed <jdreed@mit.edu> Sat, 04 Aug 2012 11:45:05 -0400
> +
> debathena-bugme (10.0.4-0debathena2) unstable; urgency=low
>
> * Bump debian/compat to 6
>
>