Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fvbe.git;a=commitdiff;h=327586924b8d16f90263c299ba7c0645200baf4e

commit 327586924b8d16f90263c299ba7c0645200baf4e
Author: James Buren <[email protected]>
Date:   Sun Apr 7 03:41:55 2013 -0500

add module for informing user about details such as
our binary byte units

diff --git a/Makefile b/Makefile
index eac9418..643a0eb 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ endif

CFLAGS  += $(shell pkg-config --cflags pacman blkid)
LDFLAGS += $(shell pkg-config --libs pacman blkid)
-SOURCES += src/main.c src/utility.c src/block.c src/locale.c src/layout.c 
src/greeter.c src/partition.c src/raid.c src/format.c src/preconfig.c 
src/install.c src/postconfig.c src/finale.c src/grubconfig.c src/hostconfig.c 
src/rootconfig.c src/userconfig.c src/timeconfig.c src/modeconfig.c 
src/langconfig.c src/kbconfig.c
+SOURCES += src/main.c src/utility.c src/block.c src/locale.c src/layout.c 
src/greeter.c src/partition.c src/raid.c src/format.c src/preconfig.c 
src/install.c src/postconfig.c src/finale.c src/grubconfig.c src/hostconfig.c 
src/rootconfig.c src/userconfig.c src/timeconfig.c src/modeconfig.c 
src/langconfig.c src/kbconfig.c src/information.c
OBJECTS := $(patsubst %.c,%.o,$(SOURCES))

all:
diff --git a/src/information.c b/src/information.c
new file mode 100644
index 0000000..cbcca71
--- /dev/null
+++ b/src/information.c
@@ -0,0 +1,39 @@
+// fwsetup - flexible installer for Frugalware
+// Copyright (C) 2013 James Buren
+//
+// 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA.
+
+#include "local.h"
+
+static bool information_run(void)
+{
+  if(!ui_dialog_yesno(INFO_TITLE,INFO_TEXT,false))
+    return true;
+
+  ui_window_text(INFO_BYTES_TITLE,INFO_BYTES_TEXT);
+
+  return true;
+}
+
+static void information_reset(void)
+{
+}
+
+struct module information_module =
+{
+  information_run,
+  information_reset,
+  __FILE__
+};
diff --git a/src/local.h b/src/local.h
index 7615333..682f640 100644
--- a/src/local.h
+++ b/src/local.h
@@ -259,6 +259,7 @@ extern struct global *g;
extern struct module locale_module;
extern struct module layout_module;
extern struct module greeter_module;
+extern struct module information_module;
extern struct module partition_module;
extern struct module raid_module;
extern struct module format_module;
diff --git a/src/main.c b/src/main.c
index c1ab5d8..e5526f5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -124,6 +124,7 @@ struct module *modules[] =
&locale_module,
&layout_module,
&greeter_module,
+  &information_module,
&partition_module,
&raid_module,
&format_module,
diff --git a/src/text.h b/src/text.h
index 0a907ac..ffda58d 100644
--- a/src/text.h
+++ b/src/text.h
@@ -37,6 +37,10 @@
#define LAYOUT_TITLE _("Keyboard Layout Setup")
#define LAYOUT_TEXT _("Select a keyboard layout from the list below.\nThis also 
configures your X11 keyboard layout.\n")
#define GREETER_TEXT _("Welcome to the Frugalware Linux installer.\nWe have 
worked hard to provide this distribution to the public.\nWe hope to provide you 
with an enjoyable experience.\n")
+#define INFO_TITLE _("First Time User Information")
+#define INFO_TEXT _("Is this your first time using our installer?\nIf so, 
please select 'Yes' for important information.\n")
+#define INFO_BYTES_TITLE _("Byte Unit Sizes")
+#define INFO_BYTES_TEXT _("You may be familiar with byte units that end in M, 
MB, MiB, or such.\nMost of them lack a universal definition of their exact 
size.\nSo, for the purposes of this program, we only use binary byte 
units.\nBelow is a list of all the binary byte unit suffixes we use.\n\nBiB = 
1\nKiB = 1024\nMiB = 1024 * 1024\nGiB = 1024 * 1024 * 1024\nTiB = 1024 * 1024 * 
1024 * 1024\n")
#define PARTITION_TITLE _("Partition Setup")
#define PARTITION_TEXT _("Select a disk device to setup a new partition 
table.\nSelect a partition to modify its parameters.\nSelect a disk device's 
free space to setup a new partition.\nSelect a disk device's deletion entry to 
delete the last partition.\n")
#define PARTITION_DIALOG_NEW_TABLE_TITLE _("New Partition Table")
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to