Exemple #1
0
static void
gtk_mount_operation_class_init (GtkMountOperationClass *klass)
{
    GObjectClass         *object_class = G_OBJECT_CLASS (klass);
    GMountOperationClass *mount_op_class;

    g_type_class_add_private (klass, sizeof (GtkMountOperationPrivate));

    object_class->finalize     = gtk_mount_operation_finalize;
    object_class->get_property = gtk_mount_operation_get_property;
    object_class->set_property = gtk_mount_operation_set_property;

    mount_op_class = G_MOUNT_OPERATION_CLASS (klass);
    mount_op_class->ask_password = gtk_mount_operation_ask_password;
    mount_op_class->ask_question = gtk_mount_operation_ask_question;

    g_object_class_install_property (object_class,
                                     PROP_PARENT,
                                     g_param_spec_object ("parent",
                                             P_("Parent"),
                                             P_("The parent window"),
                                             GTK_TYPE_WINDOW,
                                             GTK_PARAM_READWRITE));

    g_object_class_install_property (object_class,
                                     PROP_IS_SHOWING,
                                     g_param_spec_boolean ("is-showing",
                                             P_("Is Showing"),
                                             P_("Are we showing a dialog"),
                                             FALSE,
                                             GTK_PARAM_READABLE));

    g_object_class_install_property (object_class,
                                     PROP_SCREEN,
                                     g_param_spec_object ("screen",
                                             P_("Screen"),
                                             P_("The screen where this window will be displayed."),
                                             GDK_TYPE_SCREEN,
                                             GTK_PARAM_READWRITE));

}
static void
shell_mount_operation_class_init (ShellMountOperationClass *klass)
{
  GMountOperationClass *mclass;
  GObjectClass *oclass;

  mclass = G_MOUNT_OPERATION_CLASS (klass);
  mclass->show_processes = shell_mount_operation_show_processes;
  mclass->ask_question = shell_mount_operation_ask_question;
  mclass->ask_password = shell_mount_operation_ask_password;

  oclass = G_OBJECT_CLASS (klass);
  oclass->finalize = shell_mount_operation_finalize;

  signals[SHOW_PROCESSES_2] =
    g_signal_new ("show-processes-2",
                  G_TYPE_FROM_CLASS (klass),
                  G_SIGNAL_RUN_LAST,
                  0, NULL, NULL, NULL,
                  G_TYPE_NONE, 0);
}