GsGraph * gs_window_get_graph (GsWindow *window) { g_return_val_if_fail (GS_IS_WINDOW (window), NULL); return GS_GRAPH (window->priv->graph); }
static void gs_window_build_ui (GsWindow *window) { GtkWidget *menubar; g_return_if_fail (GS_IS_WINDOW (window)); window->priv->box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), window->priv->box); gtk_widget_show (window->priv->box); window->priv->ui_manager = gtk_ui_manager_new (); window->priv->ui_actions = gtk_action_group_new ("MenuActions"); gtk_action_group_add_actions (window->priv->ui_actions, action_entries, G_N_ELEMENTS (action_entries), window); gtk_action_group_add_toggle_actions (window->priv->ui_actions, toggle_action_entries, G_N_ELEMENTS (toggle_action_entries), window); gtk_ui_manager_insert_action_group (window->priv->ui_manager, window->priv->ui_actions, 0); if (!gtk_ui_manager_add_ui_from_string (window->priv->ui_manager, UI_DEFINITION, -1, NULL)) { g_assert ("No se pudo cargar la UI"); } menubar = gtk_ui_manager_get_widget (window->priv->ui_manager, "/MainMenu"); g_assert (GTK_IS_WIDGET (menubar)); gtk_box_pack_start (GTK_BOX (window->priv->box), menubar, FALSE, FALSE, 0); gtk_widget_show (menubar); gtk_window_add_accel_group (GTK_WINDOW (window), gtk_ui_manager_get_accel_group (window->priv->ui_manager)); window->priv->graph = gs_graph_new (); gtk_widget_show (window->priv->graph); window->priv->hpaned = gtk_hpaned_new (); gtk_paned_pack1 (GTK_PANED (window->priv->hpaned), window->priv->graph, TRUE, FALSE); window->priv->plot_list_panel = gs_plot_list_panel_new (GS_WINDOW (window)); gtk_paned_pack2 (GTK_PANED (window->priv->hpaned), window->priv->plot_list_panel, TRUE, FALSE); gtk_widget_show (window->priv->plot_list_panel); gtk_widget_show (window->priv->hpaned); gtk_box_pack_start (GTK_BOX (window->priv->box), window->priv->hpaned, TRUE, TRUE, 0); window->priv->statusbar = gtk_statusbar_new (); gtk_box_pack_end (GTK_BOX (window->priv->box), window->priv->statusbar, FALSE, FALSE, 0); gtk_widget_show (window->priv->statusbar); }
static void window_show_cb (GSWindow *window, GSManager *manager) { g_return_if_fail (manager != NULL); g_return_if_fail (GS_IS_MANAGER (manager)); g_return_if_fail (window != NULL); g_return_if_fail (GS_IS_WINDOW (window)); gs_debug ("Handling window show"); manager_show_window (manager, window); }