/[aleader]/aleader/editor/docgui.c
ViewVC logotype

Diff of /aleader/editor/docgui.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by jpritikin, Wed Aug 6 16:55:51 2003 UTC revision 1.6 by jpritikin, Wed Aug 13 13:50:48 2003 UTC
# Line 347  _doc_dispose (LeadrDoc *doc) Line 347  _doc_dispose (LeadrDoc *doc)
347  {  {
348    // possibly already removed    // possibly already removed
349    g_ptr_set_try_remove (Whole->documents, doc);    g_ptr_set_try_remove (Whole->documents, doc);
   
   // notify non-primary reference holders  
   app_redael_release_transcript (Whole, doc);  
350  }  }
351    
352  static void  static void
# Line 780  static void Line 777  static void
777  _transcript_revert (DocGui *dg)  _transcript_revert (DocGui *dg)
778  {  {
779    LeadrDoc *old = dg->model;    LeadrDoc *old = dg->model;
780      DocGui *dg = doc_gui_find (old);
781      g_return_if_fail (dg);
782      
783    const gchar *pathname = leadr_doc_get_pathname (old);    const gchar *pathname = leadr_doc_get_pathname (old);
784    
785      // ref_count is marked as private.  If we lose access someday
786      // then we can replace it with our own public ref_count to
787      // mirror the internal GObject ref_count.
788      //
789      if (G_OBJECT (old)->ref_count > 1) {
790        app_message_run (GTK_MESSAGE_ERROR,
791                         APP_BUTTONS_OK,
792                         "One or more exams depend on the document `%s'.\n"
793                         "Revert is not possible until you close these exams.",
794                         pathname);
795        return;
796      }
797    
798    if (app_message_run (GTK_MESSAGE_QUESTION,    if (app_message_run (GTK_MESSAGE_QUESTION,
799                         APP_BUTTONS_YES_NO,                         APP_BUTTONS_YES_NO,
800                         "Are you sure you want to revert to "                         "Are you sure you want to revert to "
# Line 821  _transcript_revert (DocGui *dg) Line 833  _transcript_revert (DocGui *dg)
833      return;      return;
834    }    }
835    
836    app_redael_replace_transcript (Whole, old, fresh); //rename at least XXX    doc_gui_set_model (dg, fresh);
   
837    g_object_unref (fresh);    g_object_unref (fresh);
838  }  }
839    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26