コード例 #1
0
ファイル: pydia-display.c プロジェクト: GNOME/dia
static PyObject *
PyDiaDisplay_Close(PyDiaDisplay *self, PyObject *args)
{
    if (!PyArg_ParseTuple(args, ":Display.close"))
	return NULL;
    ddisplay_close(self->disp);
    Py_INCREF(Py_None);
    return Py_None;
}
コード例 #2
0
ファイル: interface.c プロジェクト: jbohren-forks/dia
/**
 * @param button The notebook close button.
 * @param user_data Container widget (e.g. VBox).
 */
void
close_notebook_page_callback (GtkButton *button,
                              gpointer   user_data)
{
  GtkBox      *page     = user_data;
  DDisplay    *ddisp    = g_object_get_data (G_OBJECT (page), "DDisplay");

  /* When the page widget is destroyed it removes itself from the notebook */
  ddisplay_close (ddisp);
}