summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--callbacks.c10
-rw-r--r--conf.c4
-rw-r--r--conf.h1
-rw-r--r--config-example4
-rw-r--r--web/index.html9
5 files changed, 25 insertions, 3 deletions
diff --git a/callbacks.c b/callbacks.c
index 51f82d8b..bafaa7c8 100644
--- a/callbacks.c
+++ b/callbacks.c
@@ -44,6 +44,7 @@
#include "progress.h"
#include "volume.h"
#include "session.h"
+#include "conf.h"
#include "plugins.h"
@@ -1145,9 +1146,12 @@ on_mainwin_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
-// messagepump_push (M_TERMINATE, 0, 0, 0);
-
- gtk_widget_hide (widget);
+ if (conf_close_send_to_tray) {
+ gtk_widget_hide (widget);
+ }
+ else {
+ messagepump_push (M_TERMINATE, 0, 0, 0);
+ }
return TRUE;
}
diff --git a/conf.c b/conf.c
index bd28f2ec..ff841c98 100644
--- a/conf.c
+++ b/conf.c
@@ -26,6 +26,7 @@ int conf_src_quality = 1;
char conf_hvsc_path[1024] = "";
int conf_hvsc_enable = 0;
char conf_blacklist_plugins[1024]; // plugins listed in this option will not be loaded
+int conf_close_send_to_tray = 0;
int
conf_load (void) {
@@ -89,6 +90,9 @@ conf_load (void) {
strncpy (conf_blacklist_plugins, value, sizeof (conf_blacklist_plugins));
conf_blacklist_plugins[sizeof (conf_blacklist_plugins)-1] = 0;
}
+ else if (!strcasecmp (str, "close_send_to_tray")) {
+ conf_close_send_to_tray = atoi (value);
+ }
else {
fprintf (stderr, "error in config file line %d\n", line);
}
diff --git a/conf.h b/conf.h
index b393e46b..39f41e3f 100644
--- a/conf.h
+++ b/conf.h
@@ -24,6 +24,7 @@ extern int conf_src_quality;
extern char conf_hvsc_path[1024];
extern int conf_hvsc_enable;
extern char conf_blacklist_plugins[1024];
+extern int conf_close_send_to_tray;
int
conf_load (void);
diff --git a/config-example b/config-example
index 04549e21..7a5bf47e 100644
--- a/config-example
+++ b/config-example
@@ -25,6 +25,10 @@ samplerate 48000
# http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=9772&view=findpost&p=98252
src_quality 2
+# default behaviour of close(X) button is to close player
+# this option allows to minimize to tray instead
+#close_send_to_tray 1
+
# those next 2 are disabled by default, cause most people probably don't have HVSC
# in case you don't know what HVSC is - keep disabled
#hvsc_path /home/waker/hvsc/C64Music/DOCUMENTS/Songlengths.txt
diff --git a/web/index.html b/web/index.html
index 5f3ee46d..afad6bca 100644
--- a/web/index.html
+++ b/web/index.html
@@ -149,4 +149,13 @@ implemented basic session management, window size/position, volume, playmode are
<hr/>
<p><a href="http://sourceforge.net/">Project Web Hosted by<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=272657&amp;type=3" alt="SourceForge.net"/></a></p>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-3180744-2");
+pageTracker._trackPageview();
+} catch(err) {}</script>
</body>