[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1977 - in gnunet-gtk/src: common core include plugins/fs
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1977 - in gnunet-gtk/src: common core include plugins/fs |
Date: |
Sat, 27 Aug 2005 16:18:00 -0700 (PDT) |
Author: grothoff
Date: 2005-08-27 16:17:58 -0700 (Sat, 27 Aug 2005)
New Revision: 1977
Modified:
gnunet-gtk/src/common/helper.c
gnunet-gtk/src/core/main.c
gnunet-gtk/src/include/gnunetgtk_common.h
gnunet-gtk/src/plugins/fs/download.c
gnunet-gtk/src/plugins/fs/upload.c
Log:
minor fixes
Modified: gnunet-gtk/src/common/helper.c
===================================================================
--- gnunet-gtk/src/common/helper.c 2005-08-27 23:07:16 UTC (rev 1976)
+++ gnunet-gtk/src/common/helper.c 2005-08-27 23:17:58 UTC (rev 1977)
@@ -235,10 +235,18 @@
* @param txt the log entry
*
*/
-void addLogEntry(const char * txt) {
- infoMessage(NO, txt);
+void addLogEntry(const char * txt,
+ ...) {
+ va_list args;
+ gchar * note;
+
+ va_start(args, txt);
+ note = g_strdup_vprintf(txt, args);
+ va_end(args);
+ infoMessage(NO, note);
gtkSaveCall(&saveAddLogEntry,
- (void*) txt);
+ (void*) note);
+ g_free(note);
}
/**
Modified: gnunet-gtk/src/core/main.c
===================================================================
--- gnunet-gtk/src/core/main.c 2005-08-27 23:07:16 UTC (rev 1976)
+++ gnunet-gtk/src/core/main.c 2005-08-27 23:17:58 UTC (rev 1977)
@@ -101,6 +101,10 @@
gtk_main_quit();
}
+static void customLog(const char * msg) {
+ addLogEntry("%s", msg);
+}
+
int main(int argc,
char *argv[]) {
GtkWidget * root;
@@ -129,7 +133,7 @@
"mainWindow");
gtk_window_maximize(GTK_WINDOW(root));
gtk_widget_show(root);
- setCustomLogProc(&addLogEntry);
+ setCustomLogProc(&customLog);
/* start the event loop */
gdk_threads_enter();
gtk_main();
Modified: gnunet-gtk/src/include/gnunetgtk_common.h
===================================================================
--- gnunet-gtk/src/include/gnunetgtk_common.h 2005-08-27 23:07:16 UTC (rev
1976)
+++ gnunet-gtk/src/include/gnunetgtk_common.h 2005-08-27 23:17:58 UTC (rev
1977)
@@ -59,7 +59,7 @@
*
* @param txt the log entry
*/
-void addLogEntry(const char * txt);
+void addLogEntry(const char * txt, ...);
/**
* Simple callback function.
Modified: gnunet-gtk/src/plugins/fs/download.c
===================================================================
--- gnunet-gtk/src/plugins/fs/download.c 2005-08-27 23:07:16 UTC (rev
1976)
+++ gnunet-gtk/src/plugins/fs/download.c 2005-08-27 23:17:58 UTC (rev
1977)
@@ -46,10 +46,13 @@
static int addFilesToDirectory
(const ECRS_FileInfo * fi,
const HashCode512 * key,
+ int isRoot,
void * closure) {
struct ECRS_URI * uri = closure;
DownloadList * pos;
+ if (isRoot == YES)
+ return OK;
FSUI_trackURI(fi);
pos = head;
while (pos != NULL) {
@@ -174,7 +177,7 @@
if (name == NULL)
name = filename;
- addLogEntry(_("Downloading..."));
+ addLogEntry(_("Downloading `%s'"), name);
list = MALLOC(sizeof(DownloadList));
list->next = head;
Modified: gnunet-gtk/src/plugins/fs/upload.c
===================================================================
--- gnunet-gtk/src/plugins/fs/upload.c 2005-08-27 23:07:16 UTC (rev 1976)
+++ gnunet-gtk/src/plugins/fs/upload.c 2005-08-27 23:17:58 UTC (rev 1977)
@@ -345,7 +345,7 @@
int doIndex;
int doRec;
- addLogEntry(_("Uploading.."));
+ addLogEntry(_("Uploading `%s'"), filenamerest);
recBut = glade_xml_get_widget(getMainXML(),
"scopeRecursiveButton");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1977 - in gnunet-gtk/src: common core include plugins/fs,
grothoff <=