~jibel/synaptic/bugs.309906.385739.403165

« back to all changes in this revision

Viewing changes to gtk/rgdebinstallprogress.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-12-23 15:30:54 UTC
  • Revision ID: james.westby@ubuntu.com-20091223153054-ogudo4qhhqwucuoq
Tags: 0.63ubuntu2
* po/pt_BR.po:
  - Updated pt_BR.po, thanks to Sergio Cipolla (closes: #561853)
* po/sk.po:
  - Updated sk.po, thanks to helix84 (closes: #559283)
* common/rpackageview.{cc,h}:
  - remember search history accross package transactions
* make the origin filter more fine grained

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
   char buf[512];
261
261
   char *cmd = g_strdup_printf("/usr/bin/diff -u %s %s", orig_file.c_str(), new_file.c_str());
262
262
   FILE *f = popen(cmd,"r");
263
 
   while(fgets(buf,512,f) != NULL) {
 
263
   while(fgets(buf,sizeof(buf),f) != NULL) {
264
264
      diff += utf8(buf);
265
265
   }
266
266
   pclose(f);
267
267
   g_free(cmd);
268
268
 
269
269
   // set into buffer
270
 
   GtkTextBuffer *text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(glade_xml_get_widget(xml,"textview_diff")));
 
270
   GtkWidget *text_view = glade_xml_get_widget(xml,"textview_diff");
 
271
   gtk_widget_modify_font(text_view, pango_font_description_from_string("monospace"));
 
272
   GtkTextBuffer *text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view));
271
273
   gtk_text_buffer_set_text(text_buffer,diff.c_str(),-1);
272
274
 
273
275
   int res = dia.run(NULL,true);