/*! \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)); } }
/*! \brief Handler for the notify::gschem-toplevel signal of GschemDialog * * \par Function Description * * When the gschem-toplevel property is set on the parent GschemDialog, * we should update the pagesel dialog. * * \param [in] gobject the object which received the signal. * \param [in] arg1 the GParamSpec of the property which changed * \param [in] user_data user data set when the signal handler was connected. */ static void notify_gschem_toplevel_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data) { Pagesel *pagesel = PAGESEL( gobject ); pagesel_update( pagesel ); }
/*! \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 ? "* " : ""); }
/*! \brief Callback for page manager response. * \par Function Description * Handles response <B>arg1</B> of the page manager dialog <B>dialog</B>. * * \param [in] dialog GtkDialog that issues callback. * \param [in] arg1 Response argument of page manager dialog. * \param [in] user_data Pointer to relevant GSCHEM_TOPLEVEL structure. */ static void x_pagesel_callback_response (GtkDialog *dialog, gint arg1, gpointer user_data) { GSCHEM_TOPLEVEL *w_current = (GSCHEM_TOPLEVEL*)user_data; switch (arg1) { case PAGESEL_RESPONSE_UPDATE: pagesel_update (PAGESEL (dialog)); break; case GTK_RESPONSE_DELETE_EVENT: case PAGESEL_RESPONSE_CLOSE: g_assert (GTK_WIDGET (dialog) == w_current->pswindow); gtk_widget_destroy (GTK_WIDGET (dialog)); w_current->pswindow = NULL; break; default: g_assert_not_reached (); } }