]> git.sur5r.net Git - minitube/commitdiff
Region action in status bar
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 3 Aug 2015 12:29:23 +0000 (14:29 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 3 Aug 2015 12:29:23 +0000 (14:29 +0200)
src/standardfeedsview.cpp

index 7f62c32a80e0da868935aeb9e3b0432842eba698..94a53145609447c35616bc2fde7c35ba6a63f145 100644 (file)
@@ -73,9 +73,9 @@ void StandardFeedsView::load() {
         addVideoSourceWidget(feed);
 
     YTRegion region = YTRegions::currentRegion();
-    QToolButton *regionButton = MainWindow::instance()->getRegionButton();
-    regionButton->setText(region.name);
-    regionButton->setIcon(YTRegions::iconForRegionId(region.id));
+    QAction *regionAction = MainWindow::instance()->getRegionAction();
+    regionAction->setText(region.name);
+    regionAction->setIcon(YTRegions::iconForRegionId(region.id));
 }
 
 void StandardFeedsView::layoutCategories(const QList<YTCategory> &categories) {
@@ -131,12 +131,12 @@ void StandardFeedsView::appear() {
         load();
     }
     QAction *regionAction = MainWindow::instance()->getRegionAction();
-    regionAction->setVisible(true);
+    MainWindow::instance()->showActionInStatusBar(regionAction, true);
 }
 
 void StandardFeedsView::disappear() {
     QAction *regionAction = MainWindow::instance()->getRegionAction();
-    regionAction->setVisible(false);
+    MainWindow::instance()->showActionInStatusBar(regionAction, false);
 }
 
 void StandardFeedsView::selectWorldwideRegion() {
@@ -151,6 +151,5 @@ void StandardFeedsView::selectLocalRegion() {
 
 void StandardFeedsView::paintEvent(QPaintEvent *event) {
     QWidget::paintEvent(event);
-    // PainterUtils::topShadow(this);
 }