add --xloc and --yloc options for specifying where to start windows at
This commit is contained in:
parent
2990e5856d
commit
f94ad0126a
|
@ -102,6 +102,12 @@ class HUD_main(object):
|
||||||
|
|
||||||
# a main window
|
# a main window
|
||||||
self.main_window = gtk.Window()
|
self.main_window = gtk.Window()
|
||||||
|
if options.xloc is not None or options.yloc is not None:
|
||||||
|
if options.xloc is None:
|
||||||
|
options.xloc = 0
|
||||||
|
if options.yloc is None:
|
||||||
|
options.yloc = 0
|
||||||
|
self.main_window.move(options.xloc,options.yloc)
|
||||||
self.main_window.connect("client_moved", self.client_moved)
|
self.main_window.connect("client_moved", self.client_moved)
|
||||||
self.main_window.connect("client_resized", self.client_resized)
|
self.main_window.connect("client_resized", self.client_resized)
|
||||||
self.main_window.connect("client_destroyed", self.client_destroyed)
|
self.main_window.connect("client_destroyed", self.client_destroyed)
|
||||||
|
|
|
@ -59,6 +59,10 @@ def fpdb_options():
|
||||||
help=_("File to be split is a PokerStars or Full Tilt Poker archive file"))
|
help=_("File to be split is a PokerStars or Full Tilt Poker archive file"))
|
||||||
parser.add_option("-n", "--numhands", dest="hands", default="100", type="int",
|
parser.add_option("-n", "--numhands", dest="hands", default="100", type="int",
|
||||||
help=_("How many hands do you want saved to each file. Default is 100"))
|
help=_("How many hands do you want saved to each file. Default is 100"))
|
||||||
|
parser.add_option("--xloc", dest="xloc", default=None, type="int",
|
||||||
|
help=_("X location to open window"))
|
||||||
|
parser.add_option("--yloc", dest="yloc", default=None, type="int",
|
||||||
|
help=_("Y location to open Window"))
|
||||||
|
|
||||||
|
|
||||||
(options, argv) = parser.parse_args()
|
(options, argv) = parser.parse_args()
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#You should have received a copy of the GNU Affero General Public License
|
#You should have received a copy of the GNU Affero General Public License
|
||||||
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
#along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
#In the "official" distribution you can find the license in agpl-3.0.txt.
|
||||||
|
|
||||||
import L10n
|
import L10n
|
||||||
_ = L10n.get_translation()
|
_ = L10n.get_translation()
|
||||||
|
|
||||||
|
@ -1097,6 +1096,13 @@ You can find the full license texts in agpl-3.0.txt, gpl-2.0.txt, gpl-3.0.txt an
|
||||||
|
|
||||||
self.visible = False
|
self.visible = False
|
||||||
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||||
|
if options.xloc is not None or options.yloc is not None:
|
||||||
|
if options.xloc is None:
|
||||||
|
options.xloc = 0
|
||||||
|
if options.yloc is None:
|
||||||
|
options.yloc = 0
|
||||||
|
self.window.move(options.xloc,options.yloc)
|
||||||
|
|
||||||
self.window.connect("delete_event", self.delete_event)
|
self.window.connect("delete_event", self.delete_event)
|
||||||
self.window.connect("destroy", self.destroy)
|
self.window.connect("destroy", self.destroy)
|
||||||
self.window.set_title("Free Poker DB - v%s" % (VERSION, ))
|
self.window.set_title("Free Poker DB - v%s" % (VERSION, ))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user