Example #1
0
/*! \brief Update the list and status of <B>toplevel</B>'s pages.
 *  \par Function Description
 *  Updates the list and status of <B>toplevel</B>\'s pages if the page
 *  manager dialog is opened.
 *
 *  \param [in] w_current  The GSCHEM_TOPLEVEL object to update.
 */
void x_pagesel_update (GSCHEM_TOPLEVEL *w_current)
{
    if (w_current->pswindow) {
        g_assert (IS_PAGESEL (w_current->pswindow));
        pagesel_update (PAGESEL (w_current->pswindow));
    }
}
Example #2
0
/*! \todo Finish function documentation!!!
 *  \brief
 *  \par Function Description
 *
 */
void pagesel_update (Pagesel *pagesel)
{
    GtkTreeModel *model;
    TOPLEVEL *toplevel;
    PAGE *p_current;
    GList *iter;

    g_assert (IS_PAGESEL (pagesel));

    g_return_if_fail (GSCHEM_DIALOG (pagesel)->w_current);

    toplevel = GSCHEM_DIALOG (pagesel)->w_current->toplevel;
    model    = gtk_tree_view_get_model (pagesel->treeview);

    /* wipe out every thing in the store */
    gtk_tree_store_clear (GTK_TREE_STORE (model));
    /* now rebuild */
    for ( iter = geda_list_get_glist( toplevel->pages );
            iter != NULL;
            iter = g_list_next( iter ) ) {

        p_current = (PAGE *)iter->data;
        /* find every page that is not a hierarchy-down of another page */
        if (p_current->up < 0 ||
                s_page_search_by_page_id (toplevel->pages,
                                          p_current->up) == NULL) {
            add_page (model, NULL, toplevel->pages, p_current);
        }
    }

    /* select the current page in the treeview */
    select_page (pagesel->treeview, NULL, toplevel->page_current);
}
Example #3
0
/*! \brief Close the page manager dialog.
 *  \par Function Description
 *  Closes the page manager dialog associated with <B>toplevel</B>.
 *
 *  \param [in] w_current  The GSCHEM_TOPLEVEL object to close page manager for.
 */
void x_pagesel_close (GSCHEM_TOPLEVEL *w_current)
{
    if (w_current->pswindow) {
        g_assert (IS_PAGESEL (w_current->pswindow));
        gtk_widget_destroy (w_current->pswindow);
        w_current->pswindow = NULL;
    }

}
Example #4
0
/*! \brief Close the page manager dialog.
 *  \par Function Description
 *  Closes the page manager dialog associated with <B>toplevel</B>.
 *
 *  \param [in] w_current  The GschemToplevel object to close page manager for.
 */
void x_pagesel_close (GschemToplevel *w_current)
{
  if (w_current->pswindow) {
    g_assert (IS_PAGESEL (w_current->pswindow));
    gtk_widget_destroy (w_current->pswindow);
    w_current->pswindow = NULL;
  }
  
}
Example #5
0
/*! \brief Update the list and status of <B>toplevel</B>'s pages.
 *  \par Function Description
 *  Updates the list and status of <B>toplevel</B>\'s pages if the page
 *  manager dialog is opened.
 *
 *  \param [in] w_current  The GschemToplevel object to update.
 */
void x_pagesel_update (GschemToplevel *w_current)
{
  if (w_current->pswindow) {
    g_assert (IS_PAGESEL (w_current->pswindow));
    pagesel_update (PAGESEL (w_current->pswindow));
  }

  PAGE *page = gschem_page_view_get_page (gschem_toplevel_get_current_page_view (w_current));
  if (page == NULL) {
    return;
  }

  i_set_filename (w_current, s_page_get_filename (page),
                  page->CHANGED ? "* " : "");
}