diff options
-rw-r--r-- | muse2/ChangeLog | 1 | ||||
-rw-r--r-- | muse2/muse/widgets/filedialog.cpp | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index daa83841..0bd63d4f 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -12,6 +12,7 @@ TODO: Qt4 does not support file preview in file dialogs yet. The relevant code (wallpaper preview) is disabled. Now we either have to implement an image previewer, or forget about this feature. (Orcan) + - Only try to use theme icons in file dialogs if Qt >= 4.6 (Orcan) 14.11.2010 - renamed deicsonze2 files and classes with '2' suffixes - Applied patch by Orcan to convert populateAddSynth(). (Tim) diff --git a/muse2/muse/widgets/filedialog.cpp b/muse2/muse/widgets/filedialog.cpp index 61737a71..e28c491f 100644 --- a/muse2/muse/widgets/filedialog.cpp +++ b/muse2/muse/widgets/filedialog.cpp @@ -169,10 +169,18 @@ MFileDialog::MFileDialog(const QString& dir, showButtons = true; spl->insertWidget(0,&buttons); + + // Qt >= 4.6 allows us to select icons from the theme +#if QT_VERSION >= 0x040600 buttons.globalButton->setIcon(QIcon::fromTheme("folder", QIcon(":/icons/global.xpm"))); buttons.userButton->setIcon(QIcon::fromTheme("user-home", QIcon(":/icons/user.xpm"))); buttons.projectButton->setIcon(QIcon::fromTheme("folder-sound", QIcon(":/icons/project.xpm"))); - +#else + buttons.globalButton->setIcon(QIcon(":/icons/global.xpm")); + buttons.userButton->setIcon(QIcon(":/icons/user.xpm")); + buttons.projectButton->setIcon(QIcon(":/icons/project.xpm")); +#endif + connect(buttons.globalButton, SIGNAL(toggled(bool)), this, SLOT(globalToggled(bool))); connect(buttons.userButton, SIGNAL(toggled(bool)), this, SLOT(userToggled(bool))); connect(buttons.projectButton, SIGNAL(toggled(bool)), this, SLOT(projectToggled(bool))); |