~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Select hovered track if nothing is selected on right click over queue etc.
[disorder]
/
disobedience
/
disobedience.c
diff --git
a/disobedience/disobedience.c
b/disobedience/disobedience.c
index
e8bbc40
..
b9866f7
100644
(file)
--- a/
disobedience/disobedience.c
+++ b/
disobedience/disobedience.c
@@
-96,6
+96,8
@@
int rtp_supported;
/** @brief True if RTP play is enabled */
int rtp_is_running;
/** @brief True if RTP play is enabled */
int rtp_is_running;
+static void check_rtp_address(void);
+
/* Window creation --------------------------------------------------------- */
/* Note that all the client operations kicked off from here will only complete
/* Window creation --------------------------------------------------------- */
/* Note that all the client operations kicked off from here will only complete
@@
-116,11
+118,16
@@
static gboolean delete_event(GtkWidget attribute((unused)) *widget,
*
* Updates the menu settings to correspond to the new page.
*/
*
* Updates the menu settings to correspond to the new page.
*/
-static void tab_switched(GtkNotebook
attribute((unused))
*notebook,
+static void tab_switched(GtkNotebook *notebook,
GtkNotebookPage attribute((unused)) *page,
guint page_num,
gpointer attribute((unused)) user_data) {
menu_update(page_num);
GtkNotebookPage attribute((unused)) *page,
guint page_num,
gpointer attribute((unused)) user_data) {
menu_update(page_num);
+ GtkWidget *const tab = gtk_notebook_get_nth_page(notebook, page_num);
+ const struct tabtype *const t = g_object_get_data(G_OBJECT(tab), "type");
+ if(!t) return; /* TODO */
+ if(t->selected)
+ t->selected();
}
/** @brief Create the report box */
}
/** @brief Create the report box */
@@
-321,6
+328,8
@@
static gboolean periodic_slow(gpointer attribute((unused)) data) {
config->username, "rights",
0);
}
config->username, "rights",
0);
}
+ /* Recheck RTP status too */
+ check_rtp_address();
return TRUE; /* don't remove me */
}
return TRUE; /* don't remove me */
}
@@
-445,7
+454,6
@@
void logged_in(void) {
rtp_supported = 0;
event_raise("logged-in", 0);
/* Force the periodic checks */
rtp_supported = 0;
event_raise("logged-in", 0);
/* Force the periodic checks */
- check_rtp_address();
periodic_slow(0);
periodic_fast(0);
}
periodic_slow(0);
periodic_fast(0);
}
@@
-505,7
+513,6
@@
int main(int argc, char **argv) {
/* Start monitoring the log */
disorder_eclient_log(logclient, &log_callbacks, 0);
/* Initiate all the checks */
/* Start monitoring the log */
disorder_eclient_log(logclient, &log_callbacks, 0);
/* Initiate all the checks */
- check_rtp_address();
periodic_slow(0);
periodic_fast(0);
suppress_actions = 0;
periodic_slow(0);
periodic_fast(0);
suppress_actions = 0;