diff options
author | Christian Grothoff <christian@grothoff.org> | 2005-05-25 11:45:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2005-05-25 11:45:30 +0000 |
commit | 4a8cc85eabaea49b1b97c24d3fb6ab49d677ab85 (patch) | |
tree | ab74c7327e60ea8a41b2c7b75b22a16632ffb41d | |
parent | 679dbfe5ceabbabdf75b3d928ea987159f9673d6 (diff) | |
download | gnunet-gtk-4a8cc85eabaea49b1b97c24d3fb6ab49d677ab85.tar.gz gnunet-gtk-4a8cc85eabaea49b1b97c24d3fb6ab49d677ab85.zip |
update
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Makefile.am | 18 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | po/ChangeLog | 6 | ||||
-rw-r--r-- | po/POTFILES | 17 | ||||
-rw-r--r-- | po/POTFILES.in | 18 | ||||
-rw-r--r-- | src/Makefile.am | 22 | ||||
-rw-r--r-- | src/main.c | 76 |
8 files changed, 110 insertions, 57 deletions
@@ -1,3 +1,9 @@ | |||
1 | 1 | ||
2 | Mon May 23 11:06:02 EST 2005 | 2 | Mon May 23 11:06:02 EST 2005 |
3 | Started serious coding on glade-based gnunet-gtk. | 3 | Started serious coding on glade-based gnunet-gtk. |
4 | |||
5 | 2005/5/24 6:45:33 EST | ||
6 | update files from .glade file | ||
7 | |||
8 | 2005/5/24 16:35:41 EST | ||
9 | update files from .glade file | ||
diff --git a/Makefile.am b/Makefile.am index cd76a40c..64175e86 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -7,22 +7,22 @@ EXTRA_DIST = \ | |||
7 | gnunet-gtk.glade | 7 | gnunet-gtk.glade |
8 | 8 | ||
9 | install-data-local: | 9 | install-data-local: |
10 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) | ||
11 | $(INSTALL_DATA) gnunet-gtk.glade $(DESTDIR)$(pkgdatadir) | ||
10 | @$(NORMAL_INSTALL) | 12 | @$(NORMAL_INSTALL) |
11 | if test -d $(srcdir)/pixmaps; then \ | 13 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir); \ |
12 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \ | 14 | for pixmap in $(srcdir)/pixmaps/*; do \ |
13 | for pixmap in $(srcdir)/pixmaps/*; do \ | 15 | if test -f $$pixmap; then \ |
14 | if test -f $$pixmap; then \ | 16 | $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir); \ |
15 | $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \ | 17 | fi \ |
16 | fi \ | 18 | done |
17 | done \ | ||
18 | fi | ||
19 | 19 | ||
20 | dist-hook: | 20 | dist-hook: |
21 | if test -d pixmaps; then \ | 21 | if test -d pixmaps; then \ |
22 | mkdir $(distdir)/pixmaps; \ | 22 | mkdir $(distdir)/pixmaps; \ |
23 | for pixmap in pixmaps/*; do \ | 23 | for pixmap in pixmaps/*; do \ |
24 | if test -f $$pixmap; then \ | 24 | if test -f $$pixmap; then \ |
25 | cp -p $$pixmap $(distdir)/pixmaps; \ | 25 | cp -p $$pixmap $(distdir); \ |
26 | fi \ | 26 | fi \ |
27 | done \ | 27 | done \ |
28 | fi | 28 | fi |
diff --git a/configure.ac b/configure.ac index 3d9015a8..294d0e1a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -176,7 +176,9 @@ AC_CHECK_LIB(gnunetgetoption_api,getConfigurationOptionValue,, | |||
176 | AC_CHECK_LIB(gnunetstats_api,requestStatistics,, | 176 | AC_CHECK_LIB(gnunetstats_api,requestStatistics,, |
177 | AC_MSG_ERROR([gnunet-gtk requires stats])) | 177 | AC_MSG_ERROR([gnunet-gtk requires stats])) |
178 | 178 | ||
179 | 179 | PKG_CHECK_MODULES(GNUNETGTK, libglade-2.0) # libgnomeui-2.0 >= 1.110.0 | |
180 | AC_SUBST(GNUNETGTK_CFLAGS) | ||
181 | AC_SUBST(GNUNETGTK_LIBS) | ||
180 | 182 | ||
181 | # Set PACKAGE_LOCALE_DIR in config.h. | 183 | # Set PACKAGE_LOCALE_DIR in config.h. |
182 | if test "x${prefix}" = "xNONE"; then | 184 | if test "x${prefix}" = "xNONE"; then |
diff --git a/po/ChangeLog b/po/ChangeLog index 9cc23dc0..18156c7b 100644 --- a/po/ChangeLog +++ b/po/ChangeLog | |||
@@ -2,3 +2,9 @@ | |||
2 | 2 | ||
3 | * Makefile.in.in: Upgrade to gettext-0.14.4. | 3 | * Makefile.in.in: Upgrade to gettext-0.14.4. |
4 | 4 | ||
5 | |||
6 | 2005/5/24 6:45:33 EST | ||
7 | update files from .glade file | ||
8 | |||
9 | 2005/5/24 16:35:41 EST | ||
10 | update files from .glade file | ||
diff --git a/po/POTFILES b/po/POTFILES index 2f8e0482..335a1577 100644 --- a/po/POTFILES +++ b/po/POTFILES | |||
@@ -1,4 +1,13 @@ | |||
1 | ../src/main.c \ | 1 | .././src/gnunet-gtk.cc \ |
2 | ../src/interface.c \ | 2 | .././src/mainWindow_glade.cc \ |
3 | ../src/callbacks.c \ | 3 | .././src/mainWindow.cc \ |
4 | ../src/support.c | 4 | .././src/metaDataDialog_glade.cc \ |
5 | .././src/metaDataDialog.cc \ | ||
6 | .././src/metaDisplayDialog_glade.cc \ | ||
7 | .././src/metaDisplayDialog.cc \ | ||
8 | .././src/searchResultsFrame_glade.cc \ | ||
9 | .././src/searchResultsFrame.cc \ | ||
10 | .././src/namespaceContentFrame_glade.cc \ | ||
11 | .././src/namespaceContentFrame.cc \ | ||
12 | .././src/chatFrame_glade.cc \ | ||
13 | .././src/chatFrame.cc | ||
diff --git a/po/POTFILES.in b/po/POTFILES.in index ab2d29e6..066de614 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -1,6 +1,14 @@ | |||
1 | # List of source files containing translatable strings. | 1 | # List of source files containing translatable strings. |
2 | 2 | ./src/gnunet-gtk.cc | |
3 | src/main.c | 3 | ./src/mainWindow_glade.cc |
4 | src/interface.c | 4 | ./src/mainWindow.cc |
5 | src/callbacks.c | 5 | ./src/metaDataDialog_glade.cc |
6 | src/support.c | 6 | ./src/metaDataDialog.cc |
7 | ./src/metaDisplayDialog_glade.cc | ||
8 | ./src/metaDisplayDialog.cc | ||
9 | ./src/searchResultsFrame_glade.cc | ||
10 | ./src/searchResultsFrame.cc | ||
11 | ./src/namespaceContentFrame_glade.cc | ||
12 | ./src/namespaceContentFrame.cc | ||
13 | ./src/chatFrame_glade.cc | ||
14 | ./src/chatFrame.cc | ||
diff --git a/src/Makefile.am b/src/Makefile.am index bbec783b..bd993c58 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -1,16 +1,20 @@ | |||
1 | ## Process this file with automake to produce Makefile.in | ||
2 | |||
3 | INCLUDES = \ | 1 | INCLUDES = \ |
4 | -I$(top_srcdir)/intl \ | 2 | -I$(top_srcdir)/intl \ |
5 | @GTK_CFLAGS@ | 3 | @GTK_CFLAGS@ \ |
4 | @GNUNETGTK_CFLAGS@ | ||
6 | 5 | ||
7 | bin_PROGRAMS = gnunet-gtk | 6 | bin_PROGRAMS = gnunet-gtk |
8 | 7 | ||
8 | AM_CFLAGS = \ | ||
9 | -DGLADE_FILE="\"$(DESTDIR)$(pkgdatadir)/gnunet-gtk.glade\"" | ||
10 | |||
9 | gnunet_gtk_SOURCES = \ | 11 | gnunet_gtk_SOURCES = \ |
10 | main.c gettext.h \ | 12 | main.c main.h gettext.h |
11 | support.c support.h \ | ||
12 | interface.c interface.h \ | ||
13 | callbacks.c callbacks.h | ||
14 | 13 | ||
15 | gnunet_gtk_LDADD = @GTK_LIBS@ $(INTLLIBS) | 14 | gnunet_gtk_LDADD = \ |
15 | @GTK_LIBS@ \ | ||
16 | @GNUNETGTK_LIBS@ \ | ||
17 | $(INTLLIBS) | ||
16 | 18 | ||
19 | gnunet_gtk_LDFLAGS = \ | ||
20 | -export-dynamic | ||
@@ -18,28 +18,39 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifdef HAVE_CONFIG_H | 21 | /** |
22 | # include <config.h> | 22 | * @file src/main.c |
23 | #endif | 23 | * @brief Main function of gnunet-gtk |
24 | * @author Christian Grothoff | ||
25 | */ | ||
24 | 26 | ||
27 | #include "config.h" | ||
25 | #include "gettext.h" | 28 | #include "gettext.h" |
26 | 29 | ||
27 | #include <gtk/gtk.h> | 30 | #include <gtk/gtk.h> |
31 | #include <glade/glade.h> | ||
28 | 32 | ||
29 | #include <GNUnet/gnunet_util.h> | 33 | #include <GNUnet/gnunet_util.h> |
30 | #include <GNUnet/gnunet_ecrs_lib.h> | 34 | #include <GNUnet/gnunet_ecrs_lib.h> |
35 | #include <GNUnet/gnunet_fsui_lib.h> | ||
31 | 36 | ||
32 | #include "interface.h" | 37 | #include "main.h" |
33 | #include "support.h" | ||
34 | |||
35 | 38 | ||
39 | /** | ||
40 | * FSUI event handler. | ||
41 | */ | ||
42 | static void eventProcessor(void * cls, | ||
43 | const FSUI_Event * event) { | ||
44 | printf("FSUI event received!\n"); | ||
45 | } | ||
36 | 46 | ||
37 | /** | 47 | /** |
38 | * Prints the usage information for this command if the user errs. | 48 | * Prints the usage information for this command if the user errs. |
39 | * Aborts the program. | ||
40 | */ | 49 | */ |
41 | static void printhelp() { | 50 | static void printhelp() { |
42 | static Help help[] = { | 51 | static Help help[] = { |
52 | { 'a', "anonymity", "LEVEL", | ||
53 | gettext_noop("set the desired LEVEL of receiver-anonymity") }, | ||
43 | HELP_CONFIG, | 54 | HELP_CONFIG, |
44 | HELP_HELP, | 55 | HELP_HELP, |
45 | HELP_HOSTNAME, | 56 | HELP_HOSTNAME, |
@@ -82,7 +93,7 @@ static int parseOptions(int argc, | |||
82 | printhelp(); | 93 | printhelp(); |
83 | return SYSERR; | 94 | return SYSERR; |
84 | case 'v': | 95 | case 'v': |
85 | printf("GNUnet v%s, gnunet-gtk v%s\n", | 96 | printf("GNUnet v%s, gnunet-gkt v%s\n", |
86 | VERSION, | 97 | VERSION, |
87 | AFS_VERSION); | 98 | AFS_VERSION); |
88 | return SYSERR; | 99 | return SYSERR; |
@@ -97,30 +108,37 @@ static int parseOptions(int argc, | |||
97 | return OK; | 108 | return OK; |
98 | } | 109 | } |
99 | 110 | ||
111 | GladeXML * mainXML; | ||
112 | struct FSUI_Context * ctx; | ||
100 | 113 | ||
101 | int | 114 | int main(int argc, |
102 | main (int argc, char *argv[]) | 115 | char *argv[]) { |
103 | { | 116 | |
104 | GtkWidget * mainWindow; | ||
105 | GtkWidget * metaDataDialog; | ||
106 | GtkWidget * metaDisplayDialog; | ||
107 | |||
108 | #ifdef ENABLE_NLS | ||
109 | bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); | ||
110 | bind_textdomain_codeset (PACKAGE, "UTF-8"); | ||
111 | textdomain (PACKAGE); | ||
112 | #endif | ||
113 | |||
114 | gtk_set_locale (); | ||
115 | gtk_init(&argc, &argv); | 117 | gtk_init(&argc, &argv); |
116 | if (SYSERR == initUtil(argc, argv, &parseOptions)) | 118 | if (SYSERR == initUtil(argc, |
117 | return 0; /* parse error, --help, etc. */ | 119 | argv, |
120 | &parseOptions)) | ||
121 | return 0; | ||
122 | |||
123 | /* load the interface */ | ||
124 | mainXML = glade_xml_new(GLADE_FILE, | ||
125 | "mainWindow", | ||
126 | NULL); | ||
127 | /* connect the signals in the interface */ | ||
128 | glade_xml_signal_autoconnect(mainXML); | ||
129 | |||
130 | /* FSUI initialization here! */ | ||
131 | ctx = FSUI_start("gnunet-gtk", | ||
132 | YES, | ||
133 | &eventProcessor, | ||
134 | NULL); | ||
135 | |||
136 | /* start the event loop */ | ||
137 | gtk_main(); | ||
138 | FSUI_stop(ctx); | ||
139 | doneUtil(); | ||
118 | 140 | ||
119 | add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps"); | ||
120 | |||
121 | mainWindow = create_mainWindow (); | ||
122 | gtk_widget_show (mainWindow); | ||
123 | gtk_main (); | ||
124 | return 0; | 141 | return 0; |
125 | } | 142 | } |
126 | 143 | ||
144 | /* ************* end of main.c ************ */ | ||