From 82a87a7a41f1960cf6ffdc8cf1b172691638f15f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 18 Nov 2013 00:09:55 +0100 Subject: Adopt a new loading icon. It seems fixing some problems :) --- src/data/CMakeLists.txt | 2 +- src/data/loading.gif | Bin 0 -> 847 bytes src/data/loading.mng | Bin 3332 -> 0 bytes src/tabwindow/tabwidget.cpp | 10 +++++++--- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 src/data/loading.gif delete mode 100644 src/data/loading.mng diff --git a/src/data/CMakeLists.txt b/src/data/CMakeLists.txt index ea7d05c7..1b6f2ca8 100644 --- a/src/data/CMakeLists.txt +++ b/src/data/CMakeLists.txt @@ -6,7 +6,7 @@ INSTALL( category.png button.png busywidget.gif - loading.mng + loading.gif webkit-icon.png autoscroll.png background.png diff --git a/src/data/loading.gif b/src/data/loading.gif new file mode 100644 index 00000000..c1545eb0 Binary files /dev/null and b/src/data/loading.gif differ diff --git a/src/data/loading.mng b/src/data/loading.mng deleted file mode 100644 index 0e490c4b..00000000 Binary files a/src/data/loading.mng and /dev/null differ diff --git a/src/tabwindow/tabwidget.cpp b/src/tabwindow/tabwidget.cpp index 0942e216..a322e2fe 100644 --- a/src/tabwindow/tabwidget.cpp +++ b/src/tabwindow/tabwidget.cpp @@ -547,7 +547,7 @@ void TabWidget::tabLoadStarted() if (!label->movie()) { - static QString loadingGitPath = KStandardDirs::locate("appdata" , "pics/loading.mng"); + static QString loadingGitPath = KStandardDirs::locate("appdata" , "pics/loading.gif"); QMovie *movie = new QMovie(loadingGitPath, QByteArray(), label); movie->setSpeed(50); @@ -559,7 +559,9 @@ void TabWidget::tabLoadStarted() tabBar()->setTabButton(index, QTabBar::LeftSide, label); if (!tabBar()->tabData(index).toBool()) + { tabBar()->setTabText(index, i18n("Loading...")); + } else { tabBar()->tabButton(index, QTabBar::RightSide)->hide(); // NOTE: not really good this, but..."Repetita iuvant"!!! @@ -910,8 +912,9 @@ int TabWidget::addTab(QWidget *page, const QIcon &icon, const QString &label) int TabWidget::insertTab(int index, QWidget *page, const QString &label) { - if (! ReKonfig::openNewTabsNextToCurrent()) + if (!ReKonfig::openNewTabsNextToCurrent()) index = -1; + setUpdatesEnabled(false); int i = KTabWidget::insertTab(index, page, label); setUpdatesEnabled(true); @@ -922,8 +925,9 @@ int TabWidget::insertTab(int index, QWidget *page, const QString &label) int TabWidget::insertTab(int index, QWidget *page, const QIcon &icon, const QString &label) { - if (! ReKonfig::openNewTabsNextToCurrent()) + if (!ReKonfig::openNewTabsNextToCurrent()) index = -1; + setUpdatesEnabled(false); int i = KTabWidget::insertTab(index, page, icon, label); setUpdatesEnabled(true); -- cgit v1.2.1