r3027 - software/ui/src
Miriam Ruiz
baby-guest at alioth.debian.org
Wed Jun 20 18:27:13 UTC 2007
Author: baby-guest
Date: 2007-06-20 18:27:13 +0000 (Wed, 20 Jun 2007)
New Revision: 3027
Modified:
software/ui/src/common.h
software/ui/src/games.cpp
software/ui/src/ui.fld
Log:
Added search string
Modified: software/ui/src/common.h
===================================================================
--- software/ui/src/common.h 2007-06-20 18:16:11 UTC (rev 3026)
+++ software/ui/src/common.h 2007-06-20 18:27:13 UTC (rev 3027)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2007 Enrico Zini <enrico at debian.org>
+ * 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 common_ui
#define common_ui
Modified: software/ui/src/games.cpp
===================================================================
--- software/ui/src/games.cpp 2007-06-20 18:16:11 UTC (rev 3026)
+++ software/ui/src/games.cpp 2007-06-20 18:27:13 UTC (rev 3027)
@@ -1,7 +1,8 @@
/*
* debtags - Implement package tags support for Debian
*
- * Copyright (C) 2003--2006 Enrico Zini <enrico at debian.org>
+ * Copyright (C) 2007 Enrico Zini <enrico at debian.org>
+ * 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
@@ -139,7 +140,7 @@
static char *VoidString = "";
-void UpdateUILists(GamesUI& ui)
+static void UpdateUILists(GamesUI& ui)
{
Engine& engine = *ui.engine;
const char* oldType = ReadFlChoice(*ui.TypeSelection);
@@ -190,16 +191,8 @@
}
}
-void CallBackSearchButton(Fl_Button *button, void *data)
+static void CallBackTypeSelection(Fl_Choice* choice, void *data)
{
- GamesUI& ui = *static_cast<GamesUI*>(data);
- printf("CallBackSearchButton\n");
- fflush(stdout);
- UpdateUILists(ui);
-}
-
-void CallBackTypeSelection(Fl_Choice* choice, void *data)
-{
printf("CallBackTypeSelection\n");
fflush(stdout);
GamesUI& ui = *static_cast<GamesUI*>(data);
@@ -208,7 +201,7 @@
UpdateUILists(ui);
}
-void CallBackInterfaceSelection(Fl_Choice* choice, void *data)
+static void CallBackInterfaceSelection(Fl_Choice* choice, void *data)
{
printf("CallBackInterfaceSelection\n");
fflush(stdout);
@@ -218,9 +211,17 @@
UpdateUILists(ui);
}
-void CallBackInstalledButton(Fl_Check_Button*, void *data)
+static void CallBackSearchInput(Fl_Input* input, void *data)
{
+ printf("CallBackSearchInput\n");
+ fflush(stdout);
GamesUI& ui = *static_cast<GamesUI*>(data);
+ UpdateUILists(ui);
+}
+
+static void CallBackAlreadyInstalledButton(Fl_Check_Button*, void *data)
+{
+ GamesUI& ui = *static_cast<GamesUI*>(data);
printf("CallBackInstalledButton\n");
fflush(stdout);
//ui.engine->setInstalledFilter(Engine::ANY);
@@ -228,7 +229,7 @@
UpdateUILists(ui);
}
-void CallBackToBeInstalledButton(Fl_Check_Button*, void *data)
+static void CallBackToBeInstalledButton(Fl_Check_Button*, void *data)
{
GamesUI& ui = *static_cast<GamesUI*>(data);
printf("CallBackToBeInstalledButton\n");
@@ -285,12 +286,16 @@
GamesUI mainui;
mainui.engine = &engine;
Fl_Double_Window *window = mainui.CreateMainWindow();
- mainui.SearchButton->callback((Fl_Callback*)CallBackSearchButton, &mainui);
- mainui.TypeSelection->when(FL_WHEN_RELEASE);
mainui.TypeSelection->callback((Fl_Callback*)CallBackTypeSelection, &mainui);
mainui.TypeSelection->when(FL_WHEN_CHANGED);
mainui.InterfaceSelection->callback((Fl_Callback*)CallBackInterfaceSelection, &mainui);
mainui.InterfaceSelection->when(FL_WHEN_CHANGED);
+ mainui.SearchInput->callback((Fl_Callback*)CallBackSearchInput, &mainui);
+ mainui.SearchInput->when(FL_WHEN_CHANGED);
+ mainui.AlreadyInstalledButton->callback((Fl_Callback*)CallBackAlreadyInstalledButton, &mainui);
+ mainui.AlreadyInstalledButton->when(FL_WHEN_CHANGED);
+ mainui.ToBeInstalledButton->callback((Fl_Callback*)CallBackToBeInstalledButton, &mainui);
+ mainui.ToBeInstalledButton->when(FL_WHEN_CHANGED);
UpdateUILists(mainui);
Modified: software/ui/src/ui.fld
===================================================================
--- software/ui/src/ui.fld 2007-06-20 18:16:11 UTC (rev 3026)
+++ software/ui/src/ui.fld 2007-06-20 18:27:13 UTC (rev 3027)
@@ -13,16 +13,16 @@
Function {CreateMainWindow()} {open
} {
Fl_Window {} {open
- xywh {633 63 385 360} type Double resizable visible
+ xywh {598 111 385 430} type Double resizable visible
} {
Fl_Group {} {open
- xywh {5 14 375 82} box UP_FRAME
+ xywh {5 14 375 139} box UP_FRAME
} {
Fl_Tile {} {open
- xywh {10 15 365 36}
+ xywh {10 15 370 36}
} {
Fl_Check_Button AlreadyInstalledButton {
- label {Already installed} selected
+ label {Already installed}
xywh {14 15 25 36} down_box DOWN_BOX
}
Fl_Check_Button ToBeInstalledButton {
@@ -30,20 +30,20 @@
xywh {195 15 25 36} down_box DOWN_BOX
}
}
+ Fl_Input SearchInput {
+ label Search selected
+ xywh {65 105 300 30}
+ }
}
Fl_Browser ResultsBrowser {
- xywh {5 105 375 220} resizable
+ xywh {5 160 375 265} resizable
}
- Fl_Button SearchButton {
- label Search
- xywh {5 330 375 25}
- }
Fl_Tile {} {open
- xywh {10 60 365 30}
+ xywh {10 60 360 30}
} {
Fl_Choice TypeSelection {
label Type open
- xywh {60 60 125 30} down_box BORDER_BOX when 1
+ xywh {60 60 120 30} down_box BORDER_BOX when 1
} {
MenuItem {} {
label {Any type}
@@ -52,7 +52,7 @@
}
Fl_Choice InterfaceSelection {
label Interface open
- xywh {260 60 115 30} down_box BORDER_BOX
+ xywh {250 60 115 30} down_box BORDER_BOX
} {
MenuItem {} {
label {Any interface}
More information about the Pkg-games-commits
mailing list