Permalink
Browse files

cleaned up build system

  • Loading branch information...
xerxes2 committed Dec 24, 2012
1 parent fb77fb6 commit 7b3c89b01b60b869b1494c96b8ee640f9cc43cd3
@@ -19,7 +19,7 @@ Item {
x: 10
y: 10
smooth: true
source: "panucci_64x64.png"
source: "artwork/panucci_64x64.png"
}
Text {
id: about_name
@@ -38,7 +38,7 @@ Item {
property variant item: modelData
Image {
x: 10
source: modelData.directory ? "folder.png" : "file.png"
source: modelData.directory ? "artwork/folder.png" : "artwork/file.png"
anchors {
verticalCenter: parent.verticalCenter
}
@@ -94,15 +94,15 @@ Item {
id: button_home
x: 0
anchors.bottom: filechooserArea.bottom
image: "home.png"
image: "artwork/home.png"
onClicked: { filechooserView.currentIndex = -1
main.filechooser_callback("open", "~")
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2)
y: button_home.y
image: "left.png"
image: "artwork/left.png"
onClicked: { filechooserView.currentIndex = -1
if (filechooserArea.back != "" && filechooserArea.back != filechooserArea.path) {
filechooserArea.forward = filechooserArea.path
@@ -113,7 +113,7 @@ Item {
AppButton {
x: (config.button_width + config.button_border_width + 2) * 2
y: button_home.y
image: "right.png"
image: "artwork/right.png"
onClicked: { filechooserView.currentIndex = -1
if (filechooserArea.forward != "" && filechooserArea.forward != filechooserArea.path) {
filechooserArea.back = filechooserArea.path
@@ -124,7 +124,7 @@ Item {
AppButton {
x: (config.button_width + config.button_border_width + 2) * 3
y: button_home.y
image: "up.png"
image: "artwork/up.png"
onClicked: { filechooserView.currentIndex = -1
filechooserArea.back = filechooserArea.path
if (filechooserView.currentItem)
@@ -136,15 +136,15 @@ Item {
AppButton {
x: (config.button_width + config.button_border_width + 2) * 4
y: button_home.y
image: "cancel.png"
image: "artwork/cancel.png"
onClicked: { filechooserView.currentIndex = -1
filechooserArea.close()
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2) * 5
y: button_home.y
image: "apply.png"
image: "artwork/apply.png"
onClicked: { filechooserArea.close()
filechooserView.currentIndex = -1
main.filechooser_callback(filechooserArea.action, textinput.text)
View
@@ -97,14 +97,14 @@ Rectangle {
interval: config.dual_delay
running: false
repeat: false
onTriggered: button_back.image = "gtk-goto-first-ltr.png"
onTriggered: button_back.image = "artwork/gtk-goto-first-ltr.png"
}
Timer {
id: timer_forward
interval: config.dual_delay
running: false
repeat: false
onTriggered: button_forward.image = "gtk-goto-last-ltr.png"
onTriggered: button_forward.image = "artwork/gtk-goto-last-ltr.png"
}
Timer {
id: timer_scrolling
@@ -202,8 +202,8 @@ Rectangle {
id: button_back
x: 0
anchors.bottom: root.bottom
image: "media-skip-backward.png"
onReleased: image = "media-skip-backward.png"
image: "artwork/media-skip-backward.png"
onReleased: image = "artwork/media-skip-backward.png"
onPressed: { if (action_dual_action.checked == true)
timer_back.start()
}
@@ -213,13 +213,13 @@ Rectangle {
}
else
action_player_skip_back.trigger()
image = "media-skip-backward.png"
image = "artwork/media-skip-backward.png"
}
}
AppButton {
x: config.button_width + config.button_border_width + 2
y: button_back.y
image: "media-seek-backward.png"
image: "artwork/media-seek-backward.png"
onClicked: action_player_rewind.trigger()
}
AppButton {
@@ -231,15 +231,15 @@ Rectangle {
AppButton {
x: (config.button_width + config.button_border_width + 2) * 3
y: button_back.y
image: "media-seek-forward.png"
image: "artwork/media-seek-forward.png"
onClicked: action_player_forward.trigger()
}
AppButton {
id: button_forward
x: (config.button_width + config.button_border_width + 2) * 4
y: button_back.y
image: "media-skip-forward.png"
onReleased: image = "media-skip-forward.png"
image: "artwork/media-skip-forward.png"
onReleased: image = "artwork/media-skip-forward.png"
onPressed: { if (action_dual_action.checked == true)
timer_forward.start()
}
@@ -249,13 +249,13 @@ Rectangle {
}
else
action_player_skip_forward.trigger()
image = "media-skip-forward.png"
image = "artwork/media-skip-forward.png"
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2) * 5
y: button_back.y
image: "bookmark-new.png"
image: "artwork/bookmark-new.png"
onClicked: main.bookmark_callback()
}
ContextMenu {
View
@@ -52,45 +52,45 @@ Item {
id: button_add
x: 0
anchors.bottom: playlistArea.bottom
image: "add.png"
image: "artwork/add.png"
onClicked: {action_add_media.trigger()}
}
AppButton {
x: (config.button_width + config.button_border_width + 2)
y: button_add.y
image: "remove.png"
image: "artwork/remove.png"
onClicked: { if (playlistView.currentItem)
main.remove_callback(playlistView.currentItem.item.item_id, playlistView.currentItem.item.bookmark_id)
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2) * 2
y: button_add.y
image: "jump-to.png"
image: "artwork/jump-to.png"
onClicked: { if (playlistView.currentItem)
main.jump_to_callback(playlistView.currentItem.item.item_id, playlistView.currentItem.item.bookmark_id)
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2) * 3
y: button_add.y
image: "information.png"
image: "artwork/information.png"
onClicked: { if (playlistView.currentItem)
main.playlist_item_info_callback(playlistView.currentItem.item.item_id)
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2) * 4
y: button_add.y
image: "clear.png"
image: "artwork/clear.png"
onClicked: { action_clear_playlist.trigger()
playlist.items = []
}
}
AppButton {
x: (config.button_width + config.button_border_width + 2) * 5
y: button_add.y
image: "close.png"
image: "artwork/close.png"
onClicked: {playlistArea.close()}
}
}
View
@@ -244,7 +244,7 @@ Item {
anchors { right: settingsArea.right
bottom: settingsArea.bottom
}
image: "apply.png"
image: "artwork/apply.png"
onClicked: { var i=0
for (i=0;i<settingsArea.actions.length;i++) {
if (settingsArea.actions[i].checked != settingsArea.buttons[i].checked)
@@ -56,7 +56,7 @@ Item {
AppButton {
anchors.horizontalCenter: parent.horizontalCenter
y: config.font_size * 7.5
image: "apply.png"
image: "artwork/apply.png"
onClicked: { sleepTimerArea.close()
main.start_timed_shutdown(value.text)
}
View
@@ -37,8 +37,9 @@
sys.exit(1)
DATA_FILES = [
('share/panucci', glob.glob('icons/*.png')),
('share/panucci', glob.glob('data/ui/qml/*')),
('share/panucci/icons', glob.glob('icons/*.png')),
('share/panucci/qml', glob.glob('data/ui/qml/*.qml')),
('share/panucci/qml', glob.glob('data/ui/qml/*.js')),
('share/panucci', ['data/panucci.conf', 'data/default.conf', 'data/theme.conf']),
('share/applications', ['data/panucci.desktop']),
('share/pixmaps', ['data/panucci.png']),
@@ -74,3 +75,15 @@
scripts=SCRIPTS,
data_files=DATA_FILES,
)
if "install" in sys.argv:
_prefix = "/usr"
_rootdir = "/"
for i in sys.argv:
if i.startswith("--prefix"):
_prefix = i[9:]
elif i.startswith("--root"):
_rootdir = i[7:]
if os.path.exists(_rootdir + _prefix + "/share/panucci/qml/artwork"):
os.remove(_rootdir + _prefix + "/share/panucci/qml/artwork")
os.symlink("../icons", _rootdir + _prefix + "/share/panucci/qml/artwork")
@@ -561,9 +561,9 @@ def timer_callback( self ):
def get_play_pause_icon_path(self):
if self.action_player_play.isChecked():
_path = "media-playback-pause.png"
_path = "artwork/media-playback-pause.png"
else:
_path = "media-playback-start.png"
_path = "artwork/media-playback-start.png"
return _path
def get_artist_str(self):
View
@@ -75,10 +75,12 @@ def pretty_filename(filename):
def find_data_file(filename):
bin_dir = os.path.dirname(argv[0])
locations = [
os.path.join(bin_dir, '..', 'share', 'panucci'),
os.path.join(bin_dir, '..', 'share', 'panucci', "qml"),
os.path.join(bin_dir, '..', 'share', 'panucci', "icons"),
os.path.join(bin_dir, '..', 'icons'),
os.path.join(bin_dir, '..', 'data'),
os.path.join(bin_dir, '..', 'data/ui/qml'),
os.path.join(bin_dir, '..', 'share', 'panucci'),
'/opt/panucci',
]

0 comments on commit 7b3c89b

Please sign in to comment.