r3162 - in software/ui: data/screenshots src

Miriam Ruiz baby-guest at alioth.debian.org
Sat Jun 30 19:48:40 UTC 2007


Author: baby-guest
Date: 2007-06-30 19:48:40 +0000 (Sat, 30 Jun 2007)
New Revision: 3162

Added:
   software/ui/data/screenshots/balazar.png
   software/ui/data/screenshots/pachi.png
   software/ui/data/screenshots/sauerbraten.png
Modified:
   software/ui/src/pkgbrowser.cpp
   software/ui/src/ui.fld
Log:
Infrastructure to write textual information about a package.
More screenshots.



Added: software/ui/data/screenshots/balazar.png
===================================================================
(Binary files differ)


Property changes on: software/ui/data/screenshots/balazar.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: software/ui/data/screenshots/pachi.png
===================================================================
(Binary files differ)


Property changes on: software/ui/data/screenshots/pachi.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: software/ui/data/screenshots/sauerbraten.png
===================================================================
(Binary files differ)


Property changes on: software/ui/data/screenshots/sauerbraten.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: software/ui/src/pkgbrowser.cpp
===================================================================
--- software/ui/src/pkgbrowser.cpp	2007-06-30 18:22:49 UTC (rev 3161)
+++ software/ui/src/pkgbrowser.cpp	2007-06-30 19:48:40 UTC (rev 3162)
@@ -78,6 +78,14 @@
 		while (highest_parent->parent()) highest_parent = highest_parent->parent();
 		GamesUI *ui = highest_parent ? (GamesUI*)(highest_parent->user_data()) : NULL;
 		if (ui && img) ui->Screenshot(img);
+		if (ui)
+		{
+			Fl_Text_Buffer *buffer = ui->InfoBuffer();
+			char *txt = new char[1024];
+			snprintf(txt, 1024, "Package: %s", (const char *)data);
+			buffer->text(txt);
+			//delete txt;
+		}
 		fflush(stdout);
 	}
 }

Modified: software/ui/src/ui.fld
===================================================================
--- software/ui/src/ui.fld	2007-06-30 18:22:49 UTC (rev 3161)
+++ software/ui/src/ui.fld	2007-06-30 19:48:40 UTC (rev 3162)
@@ -14,15 +14,19 @@
 class GamesUI {open
 } {
   Function {GamesUI()} {open
-  } {}
+  } {
+    code {InfoTextBuffer = new Fl_Text_Buffer;} {}
+  }
   Function {~GamesUI()} {open
   } {
     code {if (ScreenshotWidget->image() == NULL) {
     Fl_Image *i=ScreenshotWidget->image();
     ScreenshotWidget->image(NULL);
     delete i;
-  }} {}
   }
+if (InfoTextBuffer)
+  delete InfoTextBuffer;} {}
+  }
   Function {Screenshot(Fl_Image *img)} {open return_type void
   } {
     code {Fl_Image *i=ScreenshotWidget->image();
@@ -34,6 +38,13 @@
   }
   ScreenshotWidget->redraw();} {}
   }
+  Function {InfoBuffer()} {open return_type {Fl_Text_Buffer *}
+  } {
+    code {if (!InfoText->buffer()) 
+  InfoText->buffer(InfoTextBuffer);
+return InfoTextBuffer;} {selected
+    }
+  }
   Function {CreateMainWindow()} {open
   } {
     Fl_Window {} {open
@@ -88,10 +99,10 @@
       Fl_Group {} {open
         xywh {385 15 325 415}
       } {
-        Fl_Button ScreenshotWidget {selected
+        Fl_Button ScreenshotWidget {
           xywh {385 15 320 240} box FLAT_BOX
         }
-        Fl_Text_Display PackageText {
+        Fl_Text_Display InfoText {
           xywh {385 260 320 165} resizable
         }
       }
@@ -99,4 +110,5 @@
   }
   decl {Engine *engine;} {public
   }
+  decl {Fl_Text_Buffer *InfoTextBuffer;} {}
 } 




More information about the Pkg-games-commits mailing list