+static void main_minimode(const char attribute((unused)) *event,
+ void attribute((unused)) *evendata,
+ void attribute((unused)) *callbackdata) {
+ if(full_mode == main_current_fullmode)
+ return;
+ if(full_mode) {
+ /* Remove queue from display */
+ g_object_ref(queue);
+ gtk_container_remove(GTK_CONTAINER(notebook_box), queue);
+ /* Add queue to notebook */
+ gtk_notebook_prepend_page(GTK_NOTEBOOK(tabs), queue,
+ gtk_label_new("Queue"));
+ g_object_unref(queue);
+ /* Add notebook to display */
+ gtk_container_add(GTK_CONTAINER(notebook_box), tabs);
+ g_object_unref(tabs);
+ /* Show the queue (bit confusing otherwise!) */
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(tabs), 0);
+ } else {
+ /* Remove notebook from display */
+ g_object_ref(tabs);
+ gtk_container_remove(GTK_CONTAINER(notebook_box), tabs);
+ /* Remove queue from notebook */
+ g_object_ref(queue);
+ gtk_container_remove(GTK_CONTAINER(tabs), queue);
+ /* Add queue to display */
+ gtk_container_add(GTK_CONTAINER(notebook_box), queue);
+ g_object_unref(queue);
+ }
+ main_current_fullmode = full_mode;
+}
+