r3032 - software/ui/src

Miriam Ruiz baby-guest at alioth.debian.org
Wed Jun 20 18:51:50 UTC 2007


Author: baby-guest
Date: 2007-06-20 18:51:50 +0000 (Wed, 20 Jun 2007)
New Revision: 3032

Added:
   software/ui/src/pkgbrowser.cpp
   software/ui/src/pkgbrowser.h
Modified:
   software/ui/src/games.cpp
   software/ui/src/ui.fld
Log:
Added Package Browser



Modified: software/ui/src/games.cpp
===================================================================
--- software/ui/src/games.cpp	2007-06-20 18:48:43 UTC (rev 3031)
+++ software/ui/src/games.cpp	2007-06-20 18:51:50 UTC (rev 3032)
@@ -226,9 +226,9 @@
 
 static void CallBackAlreadyInstalledButton(Fl_Check_Button*, void *data)
 {
-	GamesUI& ui = *static_cast<GamesUI*>(data);
 	printf("CallBackInstalledButton\n");
 	fflush(stdout);
+	GamesUI& ui = *static_cast<GamesUI*>(data);
 	//ui.engine->setInstalledFilter(Engine::ANY);
 	ui.engine->setInstalledFilter(Engine::INSTALLED);
 	UpdateUILists(ui);
@@ -236,14 +236,21 @@
 
 static void CallBackToBeInstalledButton(Fl_Check_Button*, void *data)
 {
-	GamesUI& ui = *static_cast<GamesUI*>(data);
 	printf("CallBackToBeInstalledButton\n");
 	fflush(stdout);
+	GamesUI& ui = *static_cast<GamesUI*>(data);
 	//ui.engine->setInstalledFilter(Engine::ANY);
 	ui.engine->setInstalledFilter(Engine::NOTINSTALLED);
 	UpdateUILists(ui);
 }
 
+static void OnResultsBrowserClick(Fl_Browser*, void *data)
+{
+	printf("OnResultsBrowserClick\n");
+	fflush(stdout);
+//	GamesUI& ui = *static_cast<GamesUI*>(data);
+}
+
 int main(int argc, const char* argv[])
 {
 #ifdef USE_GETTEXT

Added: software/ui/src/pkgbrowser.cpp
===================================================================
--- software/ui/src/pkgbrowser.cpp	                        (rev 0)
+++ software/ui/src/pkgbrowser.cpp	2007-06-20 18:51:50 UTC (rev 3032)
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2007  Miriam Ruiz <little_miry at yahoo.es>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "pkgbrowser.h"
+
+PackageBrowser::PackageBrowser(int x, int y, int w, int h, const char *l)
+	: Fl_Browser(x, y, w, h, l)
+{
+}
+
+

Added: software/ui/src/pkgbrowser.h
===================================================================
--- software/ui/src/pkgbrowser.h	                        (rev 0)
+++ software/ui/src/pkgbrowser.h	2007-06-20 18:51:50 UTC (rev 3032)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2007  Miriam Ruiz <little_miry at yahoo.es>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef pkgbrowser_h
+#define pkgbrowser_h
+
+#include <FL/Fl.H>
+#include <FL/Fl_Browser.H>
+
+class PackageBrowser : public Fl_Browser
+{
+public:
+	PackageBrowser(int x, int y, int w, int h, const char *l = NULL);
+};
+
+#endif

Modified: software/ui/src/ui.fld
===================================================================
--- software/ui/src/ui.fld	2007-06-20 18:48:43 UTC (rev 3031)
+++ software/ui/src/ui.fld	2007-06-20 18:51:50 UTC (rev 3032)
@@ -8,6 +8,9 @@
 decl {class Engine;} {public
 } 
 
+decl {\#include "pkgbrowser.h"} {public
+} 
+
 class GamesUI {open
 } {
   Function {CreateMainWindow()} {open
@@ -31,12 +34,13 @@
           }
         }
         Fl_Input SearchInput {
-          label Search selected
+          label Search
           xywh {65 105 300 30}
         }
       }
-      Fl_Browser ResultsBrowser {
-        xywh {5 160 375 265} resizable
+      Fl_Browser ResultsBrowser {selected
+        xywh {5 160 375 265} type Select resizable
+        class PackageBrowser
       }
       Fl_Tile {} {open
         xywh {10 60 360 30}




More information about the Pkg-games-commits mailing list