[mythtv] [PATCH] mythbrowser using custom screen settings

Craig Rindy developstuff at qwest.net
Sun Nov 23 16:07:24 EST 2003


The mythbrowser plugin was placing its window at 0,0 in X; it may have also been cutting off some of the page.  I'm missing way too much of the desktop on my screen (haven't looked deep enough into how to get into my Mitsubishi HD monitor's service menu), so I hacked mythbrowser to display in the same area as mythtv (Setup->Appearance->ScreenSettings).  It isn't the cleanest solution, but it works for me, so I thought I'd share it in case anyone else would like to use mythbrowser with custom x,y,w,h.  Please note that this will make mythbrowser disregard any width or height specified on the command line.  If the maintainer doesn't mind the way I got the screen settings, I can submit a proper patch which respects the command line options (and maybe adds command-line X/Y placement options), but I didn't want to go through the trouble if I'm doing this first part all wrong.  I'm sorry, I'm new to kde/qt (and libmyth for that matter).
-------------- next part --------------
Index: mythbrowser/tabview.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythbrowser/mythbrowser/tabview.cpp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tabview.cpp
--- mythbrowser/tabview.cpp	29 Oct 2003 16:04:52 -0000	1.1.1.1
+++ mythbrowser/tabview.cpp	1 Nov 2003 20:59:33 -0000
@@ -40,8 +40,14 @@
 TabView::TabView(QSqlDatabase *db, QStringList urls,
          int zoom, int width, int height, WFlags flags)
 {
+    // dummy values for GetScreenSettings
+    float wmult = 0, hmult = 0;
+
     menuIsOpen = false;
 
+    Init();
+    gContext->GetScreenSettings(width, wmult, height, hmult);
+
     myDb = db;
     mytab = new QTabWidget(this);
     mytab->setGeometry(0,0,width,height);



More information about the mythtv-dev mailing list