Esempio n. 1
0
static void gtkui_stats_detach(GtkWidget *child)
{
   stats_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title(GTK_WINDOW (stats_window), "Statistics");
   gtk_container_set_border_width(GTK_CONTAINER (stats_window), 10);
   g_signal_connect (G_OBJECT (stats_window), "delete_event", G_CALLBACK (gtkui_stop_stats), NULL);

   /* make <ctrl>d shortcut turn the window back into a tab */
   gtkui_page_attach_shortcut(stats_window, gtkui_stats_attach);
   
   gtk_container_add(GTK_CONTAINER (stats_window), child);

   gtk_window_present(GTK_WINDOW (stats_window));
}
Esempio n. 2
0
static void gtkui_plugins_detach(GtkWidget *child)
{
   plugins_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title(GTK_WINDOW (plugins_window), "Select a plugin...");
   gtk_window_set_default_size(GTK_WINDOW (plugins_window), 400, 300);
   g_signal_connect (G_OBJECT (plugins_window), "delete_event", G_CALLBACK (gtkui_plug_destroy), NULL);

   /* make <ctrl>d shortcut turn the window back into a tab */
   gtkui_page_attach_shortcut(plugins_window, gtkui_plugins_attach);

   gtk_container_add(GTK_CONTAINER (plugins_window), child);

   gtk_window_present(GTK_WINDOW (plugins_window));
}
/* callback for detaching the tab */
void gtkui_connections_detach(GtkWidget *child)
{
   conns_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title(GTK_WINDOW (conns_window), "Live connections");
   gtk_window_set_default_size(GTK_WINDOW (conns_window), 500, 250);
   g_signal_connect(G_OBJECT(conns_window), "delete_event", G_CALLBACK(gtkui_kill_connections), NULL);

   /* make <ctrl>d shortcut turn the window back into a tab */
   gtkui_page_attach_shortcut(conns_window, gtkui_connections_attach);

   gtk_container_add(GTK_CONTAINER (conns_window), child);

   gtk_window_present(GTK_WINDOW (conns_window));
}
/* detach connection data tab */
static void gtkui_connection_data_detach(GtkWidget *child)
{
   data_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_window_set_title(GTK_WINDOW (data_window), "Connection data");
   gtk_window_set_default_size(GTK_WINDOW (data_window), 600, 400);
   gtk_container_set_border_width(GTK_CONTAINER (data_window), 5);
   g_signal_connect(G_OBJECT(data_window), "delete_event", G_CALLBACK(gtkui_destroy_conndata), NULL);

   /* make <ctrl>d shortcut turn the window back into a tab */
   gtkui_page_attach_shortcut(data_window, gtkui_connection_data_attach);

   gtk_container_add(GTK_CONTAINER(data_window), child);

   gtk_window_present(GTK_WINDOW (data_window));
}