diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-11-12 09:01:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-11-12 09:01:00 +0000 |
commit | 2a25933ffb8fa9a3049ed3b6090346bf8b135abb (patch) | |
tree | 7c01236ce457638037bcf3f0d5c389c3cd4f496e | |
parent | e710202545ccc4788b3f07764e32dbad6e4b36c1 (diff) | |
download | gnunet-gtk-2a25933ffb8fa9a3049ed3b6090346bf8b135abb.tar.gz gnunet-gtk-2a25933ffb8fa9a3049ed3b6090346bf8b135abb.zip |
removing whitespace
-rw-r--r-- | src/common/helper.c | 34 | ||||
-rw-r--r-- | src/core/eggtrayicon.c | 34 | ||||
-rw-r--r-- | src/core/main.c | 6 | ||||
-rw-r--r-- | src/include/gnunetgtk_common.h | 2 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c | 2 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 62 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 8 | ||||
-rw-r--r-- | src/plugins/fs/fs.h | 2 | ||||
-rw-r--r-- | src/plugins/fs/helper.h | 2 | ||||
-rw-r--r-- | src/plugins/fs/meta.c | 10 | ||||
-rw-r--r-- | src/plugins/fs/meta.h | 4 | ||||
-rw-r--r-- | src/plugins/fs/namespace.c | 10 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 38 | ||||
-rw-r--r-- | src/plugins/fs/search.h | 2 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 26 | ||||
-rw-r--r-- | src/plugins/fs/upload.h | 2 | ||||
-rw-r--r-- | src/plugins/stats/functions.c | 6 | ||||
-rw-r--r-- | src/plugins/stats/statistics.c | 6 |
18 files changed, 128 insertions, 128 deletions
diff --git a/src/common/helper.c b/src/common/helper.c index 0f3751d7..90c817b5 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -286,7 +286,7 @@ static void connector(const gchar *handler_name, | |||
286 | if ( (module == NULL) || | 286 | if ( (module == NULL) || |
287 | (TRUE != g_module_symbol(module, | 287 | (TRUE != g_module_symbol(module, |
288 | handler_name, | 288 | handler_name, |
289 | &method)) ) { | 289 | &method)) ) { |
290 | GE_LOG(ectx, | 290 | GE_LOG(ectx, |
291 | GE_WARNING | GE_DEVELOPER | GE_IMMEDIATE, | 291 | GE_WARNING | GE_DEVELOPER | GE_IMMEDIATE, |
292 | _("Failed to find handler for `%s'\n"), | 292 | _("Failed to find handler for `%s'\n"), |
@@ -320,8 +320,8 @@ static void loadPlugin(const char * name) { | |||
320 | lib = os_plugin_load(ectx, | 320 | lib = os_plugin_load(ectx, |
321 | "libgnunetgtkmodule_", | 321 | "libgnunetgtkmodule_", |
322 | name); | 322 | name); |
323 | if (lib == NULL) | 323 | if (lib == NULL) |
324 | return; | 324 | return; |
325 | p = MALLOC(sizeof(Plugin)); | 325 | p = MALLOC(sizeof(Plugin)); |
326 | p->name = STRDUP(name); | 326 | p->name = STRDUP(name); |
327 | p->next = plugin; | 327 | p->next = plugin; |
@@ -357,8 +357,8 @@ static void loadPlugins(const char * names) { | |||
357 | *next = '\0'; /* add 0-termination for pos */ | 357 | *next = '\0'; /* add 0-termination for pos */ |
358 | next++; | 358 | next++; |
359 | } | 359 | } |
360 | if (strlen(pos) > 0) | 360 | if (strlen(pos) > 0) |
361 | loadPlugin(pos); | 361 | loadPlugin(pos); |
362 | } while (next != NULL); | 362 | } while (next != NULL); |
363 | FREE(dup); | 363 | FREE(dup); |
364 | } | 364 | } |
@@ -404,7 +404,7 @@ void initGNUnetGTKCommon(struct GE_Context * e, | |||
404 | gladeFile = STRDUP(filename); | 404 | gladeFile = STRDUP(filename); |
405 | #endif | 405 | #endif |
406 | FREE(filename); | 406 | FREE(filename); |
407 | 407 | ||
408 | mainXML = glade_xml_new(gladeFile, | 408 | mainXML = glade_xml_new(gladeFile, |
409 | "mainWindow", | 409 | "mainWindow", |
410 | PACKAGE_NAME); | 410 | PACKAGE_NAME); |
@@ -540,30 +540,30 @@ void * run_with_save_calls(PThreadMain cb, | |||
540 | * | 540 | * |
541 | */ | 541 | */ |
542 | void gnunetgtk_notify(int type, | 542 | void gnunetgtk_notify(int type, |
543 | const char *message, | 543 | const char *message, |
544 | ...) { | 544 | ...) { |
545 | #ifdef WITH_LIBNOTIFY | 545 | #ifdef WITH_LIBNOTIFY |
546 | static int once; | 546 | static int once; |
547 | char * msg; | 547 | char * msg; |
548 | size_t size; | 548 | size_t size; |
549 | va_list arg; | 549 | va_list arg; |
550 | GtkWidget * root; | 550 | GtkWidget * root; |
551 | NotifyNotification *libnotify; | 551 | NotifyNotification *libnotify; |
552 | NotifyUrgency libnotify_urgency = NOTIFY_URGENCY_NORMAL; | 552 | NotifyUrgency libnotify_urgency = NOTIFY_URGENCY_NORMAL; |
553 | long libnotify_expire_timeout = NOTIFY_EXPIRES_DEFAULT; | 553 | long libnotify_expire_timeout = NOTIFY_EXPIRES_DEFAULT; |
554 | 554 | ||
555 | if (! notify_is_initted()){ | 555 | if (! notify_is_initted()){ |
556 | if (once == 1) | 556 | if (once == 1) |
557 | return; | 557 | return; |
558 | if (! notify_init ("gnunet-gtk")) { | 558 | if (! notify_init ("gnunet-gtk")) { |
559 | once = 1; | 559 | once = 1; |
560 | GE_LOG(ectx, | 560 | GE_LOG(ectx, |
561 | GE_WARNING | GE_BULK | GE_USER | GE_ADMIN, | 561 | GE_WARNING | GE_BULK | GE_USER | GE_ADMIN, |
562 | _("Could not initialize libnotify\n")); | 562 | _("Could not initialize libnotify\n")); |
563 | return; | 563 | return; |
564 | } | 564 | } |
565 | } | 565 | } |
566 | 566 | ||
567 | root = glade_xml_get_widget(getMainXML(),"mainWindow"); | 567 | root = glade_xml_get_widget(getMainXML(),"mainWindow"); |
568 | if (gtk_window_is_active(GTK_WINDOW(root)) == FALSE) { | 568 | if (gtk_window_is_active(GTK_WINDOW(root)) == FALSE) { |
569 | if (type == NOTIFY_LOW) | 569 | if (type == NOTIFY_LOW) |
@@ -611,7 +611,7 @@ char * validate_utf8(char * msg) { | |||
611 | end = NULL; | 611 | end = NULL; |
612 | if (TRUE == g_utf8_validate(msg, | 612 | if (TRUE == g_utf8_validate(msg, |
613 | -1, | 613 | -1, |
614 | &end)) | 614 | &end)) |
615 | return msg; | 615 | return msg; |
616 | /* hope that it is ISO8859-1 */ | 616 | /* hope that it is ISO8859-1 */ |
617 | ret = g_convert_with_fallback(msg, | 617 | ret = g_convert_with_fallback(msg, |
@@ -707,17 +707,17 @@ void ggc_tree_selection_selected_foreach(GtkTreeSelection *selection, | |||
707 | 707 | ||
708 | selected = gtk_tree_selection_get_selected_rows(selection, | 708 | selected = gtk_tree_selection_get_selected_rows(selection, |
709 | &model); | 709 | &model); |
710 | 710 | ||
711 | i = g_list_length(selected); | 711 | i = g_list_length(selected); |
712 | size = 0; | 712 | size = 0; |
713 | refs = NULL; | 713 | refs = NULL; |
714 | GROW(refs, | 714 | GROW(refs, |
715 | size, | 715 | size, |
716 | i); | 716 | i); |
717 | for (i=0;i<size;i++) | 717 | for (i=0;i<size;i++) |
718 | refs[i] = gtk_tree_row_reference_new(model, | 718 | refs[i] = gtk_tree_row_reference_new(model, |
719 | g_list_nth_data(selected, i)); | 719 | g_list_nth_data(selected, i)); |
720 | g_list_foreach(selected, | 720 | g_list_foreach(selected, |
721 | (GFunc) >k_tree_path_free, | 721 | (GFunc) >k_tree_path_free, |
722 | NULL); | 722 | NULL); |
723 | g_list_free(selected); | 723 | g_list_free(selected); |
@@ -726,12 +726,12 @@ void ggc_tree_selection_selected_foreach(GtkTreeSelection *selection, | |||
726 | gtk_tree_row_reference_free(refs[i]); | 726 | gtk_tree_row_reference_free(refs[i]); |
727 | if (TRUE == gtk_tree_model_get_iter(model, | 727 | if (TRUE == gtk_tree_model_get_iter(model, |
728 | &iter, | 728 | &iter, |
729 | path)) | 729 | path)) |
730 | func(model, | 730 | func(model, |
731 | path, | 731 | path, |
732 | &iter, | 732 | &iter, |
733 | data); | 733 | data); |
734 | gtk_tree_path_free(path); | 734 | gtk_tree_path_free(path); |
735 | } | 735 | } |
736 | GROW(refs, | 736 | GROW(refs, |
737 | size, | 737 | size, |
diff --git a/src/core/eggtrayicon.c b/src/core/eggtrayicon.c index d1fc2a66..4807f9c8 100644 --- a/src/core/eggtrayicon.c +++ b/src/core/eggtrayicon.c | |||
@@ -71,7 +71,7 @@ struct _EggTrayIcon | |||
71 | GtkPlug parent_instance; | 71 | GtkPlug parent_instance; |
72 | 72 | ||
73 | guint stamp; | 73 | guint stamp; |
74 | 74 | ||
75 | Atom selection_atom; | 75 | Atom selection_atom; |
76 | Atom manager_atom; | 76 | Atom manager_atom; |
77 | Atom system_tray_opcode_atom; | 77 | Atom system_tray_opcode_atom; |
@@ -107,7 +107,7 @@ GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon); | |||
107 | 107 | ||
108 | static gboolean tray_clicked (GtkWidget *trayContextMenu, GdkEvent *event); | 108 | static gboolean tray_clicked (GtkWidget *trayContextMenu, GdkEvent *event); |
109 | static gboolean on_tray_quit_activate(GtkWidget *widget, GdkEvent *event, gpointer data); | 109 | static gboolean on_tray_quit_activate(GtkWidget *widget, GdkEvent *event, gpointer data); |
110 | 110 | ||
111 | G_END_DECLS | 111 | G_END_DECLS |
112 | 112 | ||
113 | #define SYSTEM_TRAY_REQUEST_DOCK 0 | 113 | #define SYSTEM_TRAY_REQUEST_DOCK 0 |
@@ -121,7 +121,7 @@ enum { | |||
121 | PROP_0, | 121 | PROP_0, |
122 | PROP_ORIENTATION | 122 | PROP_ORIENTATION |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static GtkPlugClass *parent_class = NULL; | 125 | static GtkPlugClass *parent_class = NULL; |
126 | 126 | ||
127 | static void egg_tray_icon_init (EggTrayIcon *icon); | 127 | static void egg_tray_icon_init (EggTrayIcon *icon); |
@@ -198,7 +198,7 @@ egg_tray_icon_init (EggTrayIcon *icon) | |||
198 | { | 198 | { |
199 | icon->stamp = 1; | 199 | icon->stamp = 1; |
200 | icon->orientation = GTK_ORIENTATION_HORIZONTAL; | 200 | icon->orientation = GTK_ORIENTATION_HORIZONTAL; |
201 | 201 | ||
202 | gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK); | 202 | gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK); |
203 | } | 203 | } |
204 | 204 | ||
@@ -320,7 +320,7 @@ egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_ | |||
320 | egg_tray_icon_manager_window_destroyed (icon); | 320 | egg_tray_icon_manager_window_destroyed (icon); |
321 | } | 321 | } |
322 | } | 322 | } |
323 | 323 | ||
324 | return GDK_FILTER_CONTINUE; | 324 | return GDK_FILTER_CONTINUE; |
325 | } | 325 | } |
326 | 326 | ||
@@ -360,7 +360,7 @@ egg_tray_icon_send_manager_message (EggTrayIcon *icon, | |||
360 | { | 360 | { |
361 | XClientMessageEvent ev; | 361 | XClientMessageEvent ev; |
362 | Display *display; | 362 | Display *display; |
363 | 363 | ||
364 | ev.type = ClientMessage; | 364 | ev.type = ClientMessage; |
365 | ev.window = window; | 365 | ev.window = window; |
366 | ev.message_type = icon->system_tray_opcode_atom; | 366 | ev.message_type = icon->system_tray_opcode_atom; |
@@ -395,13 +395,13 @@ egg_tray_icon_update_manager_window (EggTrayIcon *icon, | |||
395 | gboolean dock_if_realized) | 395 | gboolean dock_if_realized) |
396 | { | 396 | { |
397 | Display *xdisplay; | 397 | Display *xdisplay; |
398 | 398 | ||
399 | if (icon->manager_window != None) | 399 | if (icon->manager_window != None) |
400 | return; | 400 | return; |
401 | 401 | ||
402 | xdisplay = getDisplay(GTK_WIDGET (icon)); | 402 | xdisplay = getDisplay(GTK_WIDGET (icon)); |
403 | XGrabServer (xdisplay); | 403 | XGrabServer (xdisplay); |
404 | 404 | ||
405 | icon->manager_window = XGetSelectionOwner (xdisplay, | 405 | icon->manager_window = XGetSelectionOwner (xdisplay, |
406 | icon->selection_atom); | 406 | icon->selection_atom); |
407 | 407 | ||
@@ -411,7 +411,7 @@ egg_tray_icon_update_manager_window (EggTrayIcon *icon, | |||
411 | 411 | ||
412 | XUngrabServer (xdisplay); | 412 | XUngrabServer (xdisplay); |
413 | XFlush (xdisplay); | 413 | XFlush (xdisplay); |
414 | 414 | ||
415 | if (icon->manager_window != None) | 415 | if (icon->manager_window != None) |
416 | { | 416 | { |
417 | GdkWindow *gdkwin; | 417 | GdkWindow *gdkwin; |
@@ -430,7 +430,7 @@ static void | |||
430 | egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon) | 430 | egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon) |
431 | { | 431 | { |
432 | GdkWindow *gdkwin; | 432 | GdkWindow *gdkwin; |
433 | 433 | ||
434 | g_return_if_fail (icon->manager_window != None); | 434 | g_return_if_fail (icon->manager_window != None); |
435 | 435 | ||
436 | gdkwin = getWindow(icon); | 436 | gdkwin = getWindow(icon); |
@@ -467,9 +467,9 @@ egg_tray_icon_realize (GtkWidget *widget) | |||
467 | screen); | 467 | screen); |
468 | 468 | ||
469 | icon->selection_atom = XInternAtom (xdisplay, buffer, False); | 469 | icon->selection_atom = XInternAtom (xdisplay, buffer, False); |
470 | 470 | ||
471 | icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False); | 471 | icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False); |
472 | 472 | ||
473 | icon->system_tray_opcode_atom = XInternAtom (xdisplay, | 473 | icon->system_tray_opcode_atom = XInternAtom (xdisplay, |
474 | "_NET_SYSTEM_TRAY_OPCODE", | 474 | "_NET_SYSTEM_TRAY_OPCODE", |
475 | False); | 475 | False); |
@@ -515,11 +515,11 @@ egg_tray_icon_send_message (EggTrayIcon *icon, | |||
515 | gint len) | 515 | gint len) |
516 | { | 516 | { |
517 | guint stamp; | 517 | guint stamp; |
518 | 518 | ||
519 | g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0); | 519 | g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0); |
520 | g_return_val_if_fail (timeout >= 0, 0); | 520 | g_return_val_if_fail (timeout >= 0, 0); |
521 | g_return_val_if_fail (message != NULL, 0); | 521 | g_return_val_if_fail (message != NULL, 0); |
522 | 522 | ||
523 | if (icon->manager_window == None) | 523 | if (icon->manager_window == None) |
524 | return 0; | 524 | return 0; |
525 | 525 | ||
@@ -527,7 +527,7 @@ egg_tray_icon_send_message (EggTrayIcon *icon, | |||
527 | len = strlen (message); | 527 | len = strlen (message); |
528 | 528 | ||
529 | stamp = icon->stamp++; | 529 | stamp = icon->stamp++; |
530 | 530 | ||
531 | /* Get ready to send the message */ | 531 | /* Get ready to send the message */ |
532 | egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE, | 532 | egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE, |
533 | (Window)gtk_plug_get_id (GTK_PLUG (icon)), | 533 | (Window)gtk_plug_get_id (GTK_PLUG (icon)), |
@@ -574,7 +574,7 @@ egg_tray_icon_cancel_message (EggTrayIcon *icon, | |||
574 | { | 574 | { |
575 | g_return_if_fail (EGG_IS_TRAY_ICON (icon)); | 575 | g_return_if_fail (EGG_IS_TRAY_ICON (icon)); |
576 | g_return_if_fail (id > 0); | 576 | g_return_if_fail (id > 0); |
577 | 577 | ||
578 | egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE, | 578 | egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE, |
579 | (Window)gtk_plug_get_id (GTK_PLUG (icon)), | 579 | (Window)gtk_plug_get_id (GTK_PLUG (icon)), |
580 | id, 0, 0); | 580 | id, 0, 0); |
@@ -627,7 +627,7 @@ static gboolean tray_clicked(GtkWidget *widget, GdkEvent *event) { | |||
627 | } | 627 | } |
628 | 628 | ||
629 | /* Initiate the system tray icon */ | 629 | /* Initiate the system tray icon */ |
630 | void initTrayIcon() { | 630 | void initTrayIcon() { |
631 | static EggTrayIcon *tray_icon; | 631 | static EggTrayIcon *tray_icon; |
632 | static GtkWidget *tray_icon_image; | 632 | static GtkWidget *tray_icon_image; |
633 | static GtkTooltips *tray_icon_tooltip; | 633 | static GtkTooltips *tray_icon_tooltip; |
diff --git a/src/core/main.c b/src/core/main.c index 69cb1117..e327d311 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -46,11 +46,11 @@ static struct CommandLineOption gnunetgtkOptions[] = { | |||
46 | #ifdef WINDOWS | 46 | #ifdef WINDOWS |
47 | { 'd', "debug", NULL, | 47 | { 'd', "debug", NULL, |
48 | gettext_noop("run in debug mode"), | 48 | gettext_noop("run in debug mode"), |
49 | 0, &gnunet_getopt_configure_set_one, &debug_mode }, | 49 | 0, &gnunet_getopt_configure_set_one, &debug_mode }, |
50 | #endif | 50 | #endif |
51 | COMMAND_LINE_OPTION_HELP(gettext_noop("GNUnet GTK user interface.")), /* -h */ | 51 | COMMAND_LINE_OPTION_HELP(gettext_noop("GNUnet GTK user interface.")), /* -h */ |
52 | COMMAND_LINE_OPTION_HOSTNAME, /* -H */ | 52 | COMMAND_LINE_OPTION_HOSTNAME, /* -H */ |
53 | COMMAND_LINE_OPTION_LOGGING, /* -L */ | 53 | COMMAND_LINE_OPTION_LOGGING, /* -L */ |
54 | COMMAND_LINE_OPTION_VERSION(VERSION), /* -v */ | 54 | COMMAND_LINE_OPTION_VERSION(VERSION), /* -v */ |
55 | COMMAND_LINE_OPTION_VERBOSE, | 55 | COMMAND_LINE_OPTION_VERBOSE, |
56 | COMMAND_LINE_OPTION_END, | 56 | COMMAND_LINE_OPTION_END, |
@@ -96,7 +96,7 @@ int main(int argc, | |||
96 | &cfg); | 96 | &cfg); |
97 | if (i == -1) { | 97 | if (i == -1) { |
98 | GNUNET_fini(ectx, cfg); | 98 | GNUNET_fini(ectx, cfg); |
99 | return -1; | 99 | return -1; |
100 | } | 100 | } |
101 | #ifdef WINDOWS | 101 | #ifdef WINDOWS |
102 | if (!debug_mode) | 102 | if (!debug_mode) |
diff --git a/src/include/gnunetgtk_common.h b/src/include/gnunetgtk_common.h index 6f0402b8..e1e3011a 100644 --- a/src/include/gnunetgtk_common.h +++ b/src/include/gnunetgtk_common.h | |||
@@ -111,7 +111,7 @@ void connectGladeWithPlugins(GladeXML * xml); | |||
111 | * Sends a message to libnotify | 111 | * Sends a message to libnotify |
112 | */ | 112 | */ |
113 | void gnunetgtk_notify(int type, | 113 | void gnunetgtk_notify(int type, |
114 | const char * message, | 114 | const char * message, |
115 | ...); | 115 | ...); |
116 | 116 | ||
117 | /** | 117 | /** |
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index 4004f3f4..27b95cfd 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -56,7 +56,7 @@ static void * updateAppModelSafe(void * unused) { | |||
56 | G_TYPE_STRING); | 56 | G_TYPE_STRING); |
57 | apps = NULL; | 57 | apps = NULL; |
58 | sock = client_connection_create(ectx, cfg); | 58 | sock = client_connection_create(ectx, cfg); |
59 | if (sock != NULL) | 59 | if (sock != NULL) |
60 | apps = getConfigurationOptionValue(sock, | 60 | apps = getConfigurationOptionValue(sock, |
61 | "GNUNETD", | 61 | "GNUNETD", |
62 | "APPLICATIONS"); | 62 | "APPLICATIONS"); |
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 19b2f73a..c7ed4d18 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -33,12 +33,12 @@ | |||
33 | /* ****************** FSUI download events ****************** */ | 33 | /* ****************** FSUI download events ****************** */ |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * We are iterating over the contents of a | 36 | * We are iterating over the contents of a |
37 | * directory. Add the list of entries to | 37 | * directory. Add the list of entries to |
38 | * the search page at the position indicated | 38 | * the search page at the position indicated |
39 | * by the download list. | 39 | * by the download list. |
40 | */ | 40 | */ |
41 | static int | 41 | static int |
42 | addFilesToDirectory(const ECRS_FileInfo * fi, | 42 | addFilesToDirectory(const ECRS_FileInfo * fi, |
43 | const HashCode512 * key, | 43 | const HashCode512 * key, |
44 | int isRoot, | 44 | int isRoot, |
@@ -50,7 +50,7 @@ addFilesToDirectory(const ECRS_FileInfo * fi, | |||
50 | GtkTreePath * path; | 50 | GtkTreePath * path; |
51 | GtkTreeModel * model; | 51 | GtkTreeModel * model; |
52 | 52 | ||
53 | if (isRoot == YES) | 53 | if (isRoot == YES) |
54 | return OK; | 54 | return OK; |
55 | if (! gtk_tree_row_reference_valid(list->searchViewRowReference)) | 55 | if (! gtk_tree_row_reference_valid(list->searchViewRowReference)) |
56 | return SYSERR; | 56 | return SYSERR; |
@@ -91,7 +91,7 @@ addFilesToDirectory(const ECRS_FileInfo * fi, | |||
91 | return OK; | 91 | return OK; |
92 | } | 92 | } |
93 | 93 | ||
94 | static void | 94 | static void |
95 | refreshDirectoryViewFromDisk(DownloadList * list) { | 95 | refreshDirectoryViewFromDisk(DownloadList * list) { |
96 | unsigned long long size; | 96 | unsigned long long size; |
97 | char * data; | 97 | char * data; |
@@ -101,18 +101,18 @@ refreshDirectoryViewFromDisk(DownloadList * list) { | |||
101 | if ( (list->is_directory != YES) || | 101 | if ( (list->is_directory != YES) || |
102 | (list->searchList == NULL) || | 102 | (list->searchList == NULL) || |
103 | (list->searchViewRowReference == NULL) || | 103 | (list->searchViewRowReference == NULL) || |
104 | (! gtk_tree_row_reference_valid(list->searchViewRowReference)) ) | 104 | (! gtk_tree_row_reference_valid(list->searchViewRowReference)) ) |
105 | return; | 105 | return; |
106 | 106 | ||
107 | if (OK != disk_file_size(ectx, | 107 | if (OK != disk_file_size(ectx, |
108 | list->filename, | 108 | list->filename, |
109 | &size, | 109 | &size, |
110 | YES)) | 110 | YES)) |
111 | return; | 111 | return; |
112 | fd = disk_file_open(ectx, | 112 | fd = disk_file_open(ectx, |
113 | list->filename, | 113 | list->filename, |
114 | O_RDONLY); | 114 | O_RDONLY); |
115 | if (fd == -1) | 115 | if (fd == -1) |
116 | return; | 116 | return; |
117 | data = MMAP(NULL, | 117 | data = MMAP(NULL, |
118 | size, | 118 | size, |
@@ -168,7 +168,7 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl, | |||
168 | char * uri_name; | 168 | char * uri_name; |
169 | gboolean valid; | 169 | gboolean valid; |
170 | struct ECRS_URI * u; | 170 | struct ECRS_URI * u; |
171 | 171 | ||
172 | /* setup visualization */ | 172 | /* setup visualization */ |
173 | list = MALLOC(sizeof(DownloadList)); | 173 | list = MALLOC(sizeof(DownloadList)); |
174 | memset(list, | 174 | memset(list, |
@@ -201,7 +201,7 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl, | |||
201 | DOWNLOAD_HSIZE, size_h, | 201 | DOWNLOAD_HSIZE, size_h, |
202 | DOWNLOAD_PROGRESS, progress, | 202 | DOWNLOAD_PROGRESS, progress, |
203 | DOWNLOAD_URISTRING, uri_name, | 203 | DOWNLOAD_URISTRING, uri_name, |
204 | DOWNLOAD_INTERNAL, list, | 204 | DOWNLOAD_INTERNAL, list, |
205 | -1); | 205 | -1); |
206 | FREE(uri_name); | 206 | FREE(uri_name); |
207 | FREE(size_h); | 207 | FREE(size_h); |
@@ -221,16 +221,16 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl, | |||
221 | path = gtk_tree_row_reference_get_path(dl_parent->searchViewRowReference); | 221 | path = gtk_tree_row_reference_get_path(dl_parent->searchViewRowReference); |
222 | valid = gtk_tree_model_get_iter(GTK_TREE_MODEL(sl_parent->tree), | 222 | valid = gtk_tree_model_get_iter(GTK_TREE_MODEL(sl_parent->tree), |
223 | &piter, | 223 | &piter, |
224 | path); | 224 | path); |
225 | if (valid == TRUE) | 225 | if (valid == TRUE) |
226 | valid = gtk_tree_model_iter_children(GTK_TREE_MODEL(sl_parent->tree), | 226 | valid = gtk_tree_model_iter_children(GTK_TREE_MODEL(sl_parent->tree), |
227 | &iter, | 227 | &iter, |
228 | &piter); | 228 | &piter); |
229 | } else { | 229 | } else { |
230 | /* must be top-level entry in search */ | 230 | /* must be top-level entry in search */ |
231 | valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(sl_parent->tree), | 231 | valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(sl_parent->tree), |
232 | &iter); | 232 | &iter); |
233 | } | 233 | } |
234 | if (valid == TRUE) { | 234 | if (valid == TRUE) { |
235 | valid = FALSE; | 235 | valid = FALSE; |
236 | /* find matching entry */ | 236 | /* find matching entry */ |
@@ -271,7 +271,7 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl, | |||
271 | list->next = download_head; | 271 | list->next = download_head; |
272 | download_head = list; | 272 | download_head = list; |
273 | if ( (list->is_directory == YES) && | 273 | if ( (list->is_directory == YES) && |
274 | (completed != 0) ) | 274 | (completed != 0) ) |
275 | refreshDirectoryViewFromDisk(list); | 275 | refreshDirectoryViewFromDisk(list); |
276 | return list; | 276 | return list; |
277 | } | 277 | } |
@@ -306,7 +306,7 @@ void fs_download_update(DownloadList * list, | |||
306 | (list->searchList != NULL) && | 306 | (list->searchList != NULL) && |
307 | (list->searchViewRowReference != NULL) ) { | 307 | (list->searchViewRowReference != NULL) ) { |
308 | struct ECRS_MetaData * meta; | 308 | struct ECRS_MetaData * meta; |
309 | 309 | ||
310 | meta = NULL; | 310 | meta = NULL; |
311 | ECRS_listDirectory(ectx, | 311 | ECRS_listDirectory(ectx, |
312 | data, | 312 | data, |
@@ -353,17 +353,17 @@ void fs_download_stopped(DownloadList * list) { | |||
353 | &iter, | 353 | &iter, |
354 | path); | 354 | path); |
355 | gtk_tree_path_free(path); | 355 | gtk_tree_path_free(path); |
356 | gtk_tree_row_reference_free(list->summaryViewRowReference); | 356 | gtk_tree_row_reference_free(list->summaryViewRowReference); |
357 | list->summaryViewRowReference = NULL; | 357 | list->summaryViewRowReference = NULL; |
358 | gtk_tree_store_remove(download_summary, | 358 | gtk_tree_store_remove(download_summary, |
359 | &iter); | 359 | &iter); |
360 | if (list->searchViewRowReference != NULL) { | 360 | if (list->searchViewRowReference != NULL) { |
361 | gtk_tree_row_reference_free(list->searchViewRowReference); | 361 | gtk_tree_row_reference_free(list->searchViewRowReference); |
362 | list->searchViewRowReference = NULL; | 362 | list->searchViewRowReference = NULL; |
363 | } | 363 | } |
364 | FREE(list->filename); | 364 | FREE(list->filename); |
365 | ECRS_freeUri(list->uri); | 365 | ECRS_freeUri(list->uri); |
366 | 366 | ||
367 | if (download_head == list) | 367 | if (download_head == list) |
368 | download_head = list->next; | 368 | download_head = list->next; |
369 | else { | 369 | else { |
@@ -388,7 +388,7 @@ void fs_download_stopped(DownloadList * list) { | |||
388 | * | 388 | * |
389 | * @return OK if no download is pending, SYSERR if | 389 | * @return OK if no download is pending, SYSERR if |
390 | * such a download is already active. | 390 | * such a download is already active. |
391 | */ | 391 | */ |
392 | static int | 392 | static int |
393 | check_pending(const char * filename, | 393 | check_pending(const char * filename, |
394 | GtkTreeIter * parent) { | 394 | GtkTreeIter * parent) { |
@@ -421,7 +421,7 @@ check_pending(const char * filename, | |||
421 | * The user clicked the download button. | 421 | * The user clicked the download button. |
422 | * Start the download of the selected entry. | 422 | * Start the download of the selected entry. |
423 | */ | 423 | */ |
424 | static void | 424 | static void |
425 | initiateDownload(GtkTreeModel * model, | 425 | initiateDownload(GtkTreeModel * model, |
426 | GtkTreePath * path, | 426 | GtkTreePath * path, |
427 | GtkTreeIter * iter, | 427 | GtkTreeIter * iter, |
@@ -485,7 +485,7 @@ initiateDownload(GtkTreeModel * model, | |||
485 | #else | 485 | #else |
486 | idc_name = uri_name; | 486 | idc_name = uri_name; |
487 | #endif | 487 | #endif |
488 | } | 488 | } |
489 | cname = idc_name; | 489 | cname = idc_name; |
490 | oname = idc_name; | 490 | oname = idc_name; |
491 | dname = MALLOC(strlen(idc_name)+1); | 491 | dname = MALLOC(strlen(idc_name)+1); |
@@ -570,12 +570,12 @@ initiateDownload(GtkTreeModel * model, | |||
570 | strcat(idc_final_download_destination, idc_name); | 570 | strcat(idc_final_download_destination, idc_name); |
571 | if ( (idc_final_download_destination[strlen(idc_final_download_destination) - 1] == '/') || | 571 | if ( (idc_final_download_destination[strlen(idc_final_download_destination) - 1] == '/') || |
572 | (idc_final_download_destination[strlen(idc_final_download_destination) - 1] == '\\') ) | 572 | (idc_final_download_destination[strlen(idc_final_download_destination) - 1] == '\\') ) |
573 | idc_final_download_destination[strlen(idc_final_download_destination) - 1] = '\0'; | 573 | idc_final_download_destination[strlen(idc_final_download_destination) - 1] = '\0'; |
574 | /* append ".gnd" if needed (== directory and .gnd not present) */ | 574 | /* append ".gnd" if needed (== directory and .gnd not present) */ |
575 | if ( (idc_mime != NULL) && | 575 | if ( (idc_mime != NULL) && |
576 | (0 == strcmp(idc_mime, GNUNET_DIRECTORY_MIME)) && | 576 | (0 == strcmp(idc_mime, GNUNET_DIRECTORY_MIME)) && |
577 | ( (strlen(idc_final_download_destination) < strlen(GNUNET_DIRECTORY_EXT)) || | 577 | ( (strlen(idc_final_download_destination) < strlen(GNUNET_DIRECTORY_EXT)) || |
578 | (0 != strcmp(&idc_final_download_destination[strlen(idc_final_download_destination) | 578 | (0 != strcmp(&idc_final_download_destination[strlen(idc_final_download_destination) |
579 | - strlen(GNUNET_DIRECTORY_EXT)], | 579 | - strlen(GNUNET_DIRECTORY_EXT)], |
580 | GNUNET_DIRECTORY_EXT)) ) ) | 580 | GNUNET_DIRECTORY_EXT)) ) ) |
581 | strcat(idc_final_download_destination, GNUNET_DIRECTORY_EXT); | 581 | strcat(idc_final_download_destination, GNUNET_DIRECTORY_EXT); |
@@ -626,7 +626,7 @@ void on_downloadButton_clicked_fs(GtkWidget * treeview, | |||
626 | * that is NOT rooted within a search or directory. | 626 | * that is NOT rooted within a search or directory. |
627 | * | 627 | * |
628 | * TODO: | 628 | * TODO: |
629 | * - support for recursive downloads | 629 | * - support for recursive downloads |
630 | * - support for showing directories (if downloaded like this) | 630 | * - support for showing directories (if downloaded like this) |
631 | * - support for user-specified filename | 631 | * - support for user-specified filename |
632 | */ | 632 | */ |
@@ -639,7 +639,7 @@ void on_statusDownloadURIEntry_editing_done_fs(GtkWidget * entry, | |||
639 | char * urid; | 639 | char * urid; |
640 | char * final_download_dir; | 640 | char * final_download_dir; |
641 | const char * dname; | 641 | const char * dname; |
642 | 642 | ||
643 | uris = gtk_entry_get_text(GTK_ENTRY(entry)); | 643 | uris = gtk_entry_get_text(GTK_ENTRY(entry)); |
644 | urid = STRDUP(uris); | 644 | urid = STRDUP(uris); |
645 | gtk_entry_set_text(GTK_ENTRY(entry), | 645 | gtk_entry_set_text(GTK_ENTRY(entry), |
@@ -703,7 +703,7 @@ static void * fsui_callback(void * cls) { | |||
703 | return NULL; | 703 | return NULL; |
704 | } | 704 | } |
705 | 705 | ||
706 | static gboolean | 706 | static gboolean |
707 | clearCompletedDownloadCallback(GtkTreeModel * model, | 707 | clearCompletedDownloadCallback(GtkTreeModel * model, |
708 | GtkTreePath * path, | 708 | GtkTreePath * path, |
709 | GtkTreeIter * iter, | 709 | GtkTreeIter * iter, |
@@ -727,13 +727,13 @@ clearCompletedDownloadCallback(GtkTreeModel * model, | |||
727 | } | 727 | } |
728 | 728 | ||
729 | void on_clearCompletedDownloadsButton_clicked_fs(void * unused, | 729 | void on_clearCompletedDownloadsButton_clicked_fs(void * unused, |
730 | GtkWidget * clearButton) { | 730 | GtkWidget * clearButton) { |
731 | gtk_tree_model_foreach(GTK_TREE_MODEL(download_summary), | 731 | gtk_tree_model_foreach(GTK_TREE_MODEL(download_summary), |
732 | &clearCompletedDownloadCallback, | 732 | &clearCompletedDownloadCallback, |
733 | NULL); | 733 | NULL); |
734 | } | 734 | } |
735 | 735 | ||
736 | static void | 736 | static void |
737 | fsuiCallDownloadCallback(GtkTreeModel * model, | 737 | fsuiCallDownloadCallback(GtkTreeModel * model, |
738 | GtkTreePath * path, | 738 | GtkTreePath * path, |
739 | GtkTreeIter * iter, | 739 | GtkTreeIter * iter, |
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index bd651ecf..0c18fa7b 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -195,7 +195,7 @@ saveEventProcessor(void * cls) { | |||
195 | return ret; | 195 | return ret; |
196 | } | 196 | } |
197 | 197 | ||
198 | static void * | 198 | static void * |
199 | eventProcessor(void * unused, | 199 | eventProcessor(void * unused, |
200 | const FSUI_Event * event) { | 200 | const FSUI_Event * event) { |
201 | return gtkSaveCall(&saveEventProcessor, | 201 | return gtkSaveCall(&saveEventProcessor, |
@@ -204,7 +204,7 @@ eventProcessor(void * unused, | |||
204 | 204 | ||
205 | /** | 205 | /** |
206 | * Setup the summary views (in particular the models | 206 | * Setup the summary views (in particular the models |
207 | * and the renderers). | 207 | * and the renderers). |
208 | */ | 208 | */ |
209 | static void fs_summary_start() { | 209 | static void fs_summary_start() { |
210 | GtkComboBoxEntry * searchCB; | 210 | GtkComboBoxEntry * searchCB; |
@@ -221,7 +221,7 @@ static void fs_summary_start() { | |||
221 | searchCB | 221 | searchCB |
222 | = GTK_COMBO_BOX_ENTRY(glade_xml_get_widget(getMainXML(), | 222 | = GTK_COMBO_BOX_ENTRY(glade_xml_get_widget(getMainXML(), |
223 | "fssearchKeywordComboBoxEntry")); | 223 | "fssearchKeywordComboBoxEntry")); |
224 | 224 | ||
225 | model = gtk_list_store_new(NS_SEARCH_NUM, | 225 | model = gtk_list_store_new(NS_SEARCH_NUM, |
226 | G_TYPE_STRING, /* what we show */ | 226 | G_TYPE_STRING, /* what we show */ |
227 | G_TYPE_STRING, /* EncName of namespace */ | 227 | G_TYPE_STRING, /* EncName of namespace */ |
@@ -314,7 +314,7 @@ static void fs_summary_start() { | |||
314 | renderer, | 314 | renderer, |
315 | "text", DOWNLOAD_HSIZE, | 315 | "text", DOWNLOAD_HSIZE, |
316 | NULL); | 316 | NULL); |
317 | 317 | ||
318 | column = gtk_tree_view_get_column(downloadList, | 318 | column = gtk_tree_view_get_column(downloadList, |
319 | col - 1); | 319 | col - 1); |
320 | gtk_tree_view_column_set_resizable(column, TRUE); | 320 | gtk_tree_view_column_set_resizable(column, TRUE); |
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h index 88a1f59a..e859d12f 100644 --- a/src/plugins/fs/fs.h +++ b/src/plugins/fs/fs.h | |||
@@ -199,7 +199,7 @@ typedef struct SL { | |||
199 | /** | 199 | /** |
200 | * FSUI search handle. | 200 | * FSUI search handle. |
201 | */ | 201 | */ |
202 | struct FSUI_SearchList * fsui_list; | 202 | struct FSUI_SearchList * fsui_list; |
203 | } SearchList; | 203 | } SearchList; |
204 | 204 | ||
205 | 205 | ||
diff --git a/src/plugins/fs/helper.h b/src/plugins/fs/helper.h index d70fc6e2..f91940a8 100644 --- a/src/plugins/fs/helper.h +++ b/src/plugins/fs/helper.h | |||
@@ -36,7 +36,7 @@ | |||
36 | * @returns the created widget to pack into the page header | 36 | * @returns the created widget to pack into the page header |
37 | */ | 37 | */ |
38 | GtkWidget * | 38 | GtkWidget * |
39 | buildSearchTabLabel(GtkWidget *searchPage, | 39 | buildSearchTabLabel(GtkWidget *searchPage, |
40 | const char *title); | 40 | const char *title); |
41 | 41 | ||
42 | 42 | ||
diff --git a/src/plugins/fs/meta.c b/src/plugins/fs/meta.c index 28fa7cb1..d6014697 100644 --- a/src/plugins/fs/meta.c +++ b/src/plugins/fs/meta.c | |||
@@ -172,7 +172,7 @@ void createKeywordListTreeView(GladeXML * xml, | |||
172 | GtkListStore * keymodel; | 172 | GtkListStore * keymodel; |
173 | GtkCellRenderer * renderer; | 173 | GtkCellRenderer * renderer; |
174 | GtkTreeViewColumn * column; | 174 | GtkTreeViewColumn * column; |
175 | 175 | ||
176 | DEBUG_BEGIN(); | 176 | DEBUG_BEGIN(); |
177 | keymodel | 177 | keymodel |
178 | = gtk_list_store_new(1, | 178 | = gtk_list_store_new(1, |
@@ -482,7 +482,7 @@ unsigned int getSpinButtonValue(GladeXML * xml, | |||
482 | 482 | ||
483 | char * getMimeTypeFromMetaData(const struct ECRS_MetaData * meta) { | 483 | char * getMimeTypeFromMetaData(const struct ECRS_MetaData * meta) { |
484 | char * mime; | 484 | char * mime; |
485 | 485 | ||
486 | mime = ECRS_getFromMetaData(meta, | 486 | mime = ECRS_getFromMetaData(meta, |
487 | EXTRACTOR_MIMETYPE); | 487 | EXTRACTOR_MIMETYPE); |
488 | if (mime == NULL) | 488 | if (mime == NULL) |
@@ -507,7 +507,7 @@ char * getFileNameFromMetaData(const struct ECRS_MetaData * meta) { | |||
507 | name = STRDUP(_("no name given")); | 507 | name = STRDUP(_("no name given")); |
508 | } else { | 508 | } else { |
509 | char * dotdot; | 509 | char * dotdot; |
510 | 510 | ||
511 | while (NULL != (dotdot = strstr(name, ".."))) | 511 | while (NULL != (dotdot = strstr(name, ".."))) |
512 | dotdot[0] = dotdot[1] = '_'; | 512 | dotdot[0] = dotdot[1] = '_'; |
513 | } | 513 | } |
@@ -537,7 +537,7 @@ GdkPixbuf * getThumbnailFromMetaData(const struct ECRS_MetaData * meta) { | |||
537 | GdkPixbufLoader * loader; | 537 | GdkPixbufLoader * loader; |
538 | size_t ts; | 538 | size_t ts; |
539 | unsigned char * thumb; | 539 | unsigned char * thumb; |
540 | 540 | ||
541 | thumb = NULL; | 541 | thumb = NULL; |
542 | ts = ECRS_getThumbnailFromMetaData(meta, | 542 | ts = ECRS_getThumbnailFromMetaData(meta, |
543 | &thumb); | 543 | &thumb); |
@@ -560,7 +560,7 @@ GdkPixbuf * getThumbnailFromMetaData(const struct ECRS_MetaData * meta) { | |||
560 | return pixbuf; | 560 | return pixbuf; |
561 | } | 561 | } |
562 | 562 | ||
563 | GtkWidget * | 563 | GtkWidget * |
564 | extractMainWidgetFromWindow(GladeXML * xml, | 564 | extractMainWidgetFromWindow(GladeXML * xml, |
565 | const char * windowName) { | 565 | const char * windowName) { |
566 | GtkContainer * window; | 566 | GtkContainer * window; |
diff --git a/src/plugins/fs/meta.h b/src/plugins/fs/meta.h index 860734e8..f9650b6a 100644 --- a/src/plugins/fs/meta.h +++ b/src/plugins/fs/meta.h | |||
@@ -51,12 +51,12 @@ void handleMetaDataListUpdate(GladeXML * xml, | |||
51 | const char * valueInputLineName, | 51 | const char * valueInputLineName, |
52 | const char * metaDataListName); | 52 | const char * metaDataListName); |
53 | 53 | ||
54 | struct ECRS_MetaData * | 54 | struct ECRS_MetaData * |
55 | getMetaDataFromList(GladeXML * xml, | 55 | getMetaDataFromList(GladeXML * xml, |
56 | const char * name, | 56 | const char * name, |
57 | const char * preview); | 57 | const char * preview); |
58 | 58 | ||
59 | struct ECRS_URI * | 59 | struct ECRS_URI * |
60 | getKeywordURIFromList(GladeXML * xml, | 60 | getKeywordURIFromList(GladeXML * xml, |
61 | const char * name); | 61 | const char * name); |
62 | 62 | ||
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index 57520198..6378ee53 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -227,7 +227,7 @@ static GtkWidget * makeNamespaceFrame(GtkWidget ** treeview, | |||
227 | col - 1), | 227 | col - 1), |
228 | TRUE); | 228 | TRUE); |
229 | 229 | ||
230 | 230 | ||
231 | UNREF(namespaceXML); | 231 | UNREF(namespaceXML); |
232 | DEBUG_END(); | 232 | DEBUG_END(); |
233 | 233 | ||
@@ -270,12 +270,12 @@ static void * updateView(void * cls) { | |||
270 | filename = STRDUP(_("no name given")); | 270 | filename = STRDUP(_("no name given")); |
271 | } else { | 271 | } else { |
272 | char * dotdot; | 272 | char * dotdot; |
273 | 273 | ||
274 | while (NULL != (dotdot = strstr(filename, ".."))) | 274 | while (NULL != (dotdot = strstr(filename, ".."))) |
275 | dotdot[0] = dotdot[1] = '_'; | 275 | dotdot[0] = dotdot[1] = '_'; |
276 | filename = validate_utf8(filename); | 276 | filename = validate_utf8(filename); |
277 | } | 277 | } |
278 | 278 | ||
279 | if (ECRS_isFileUri(fi->uri)) | 279 | if (ECRS_isFileUri(fi->uri)) |
280 | size = ECRS_fileSize(fi->uri); | 280 | size = ECRS_fileSize(fi->uri); |
281 | else | 281 | else |
@@ -308,7 +308,7 @@ static int updateViewSave(const ECRS_FileInfo * fi, | |||
308 | const HashCode512 * key, | 308 | const HashCode512 * key, |
309 | int isRoot, | 309 | int isRoot, |
310 | void * closure) { | 310 | void * closure) { |
311 | gtkSaveCall(&updateView, (void*) fi); | 311 | gtkSaveCall(&updateView, (void*) fi); |
312 | return OK; | 312 | return OK; |
313 | } | 313 | } |
314 | 314 | ||
@@ -388,7 +388,7 @@ static int addNamespaceContentToModel(void * cls, | |||
388 | filename = STRDUP(_("no name given")); | 388 | filename = STRDUP(_("no name given")); |
389 | else { | 389 | else { |
390 | char *dotdot; | 390 | char *dotdot; |
391 | 391 | ||
392 | while (NULL != (dotdot = strstr(filename, ".."))) | 392 | while (NULL != (dotdot = strstr(filename, ".."))) |
393 | dotdot[0] = dotdot[1] = '_'; | 393 | dotdot[0] = dotdot[1] = '_'; |
394 | } | 394 | } |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index 402aa1c1..d2679f5a 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -58,12 +58,12 @@ static void updateSearchSummary(SearchList * searchContext) { | |||
58 | &iter, | 58 | &iter, |
59 | SEARCH_SUMMARY_RESULT_COUNT, searchContext->resultsReceived, | 59 | SEARCH_SUMMARY_RESULT_COUNT, searchContext->resultsReceived, |
60 | -1); | 60 | -1); |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | /* update tab title with the number of results */ | 64 | /* update tab title with the number of results */ |
65 | new_title = | 65 | new_title = |
66 | g_strdup_printf("%s (%u)", | 66 | g_strdup_printf("%s (%u)", |
67 | searchContext->searchString, | 67 | searchContext->searchString, |
68 | searchContext->resultsReceived); | 68 | searchContext->resultsReceived); |
69 | label = GTK_LABEL(glade_xml_get_widget(searchContext->labelXML, | 69 | label = GTK_LABEL(glade_xml_get_widget(searchContext->labelXML, |
@@ -89,7 +89,7 @@ void addEntryToSearchTree(SearchList * searchContext, | |||
89 | 89 | ||
90 | mime = getMimeTypeFromMetaData(info->meta); | 90 | mime = getMimeTypeFromMetaData(info->meta); |
91 | desc = getDescriptionFromMetaData(info->meta); | 91 | desc = getDescriptionFromMetaData(info->meta); |
92 | name = getFileNameFromMetaData(info->meta); | 92 | name = getFileNameFromMetaData(info->meta); |
93 | size = ECRS_isFileUri(info->uri) ? ECRS_fileSize(info->uri) : 0; | 93 | size = ECRS_isFileUri(info->uri) ? ECRS_fileSize(info->uri) : 0; |
94 | pixbuf = getThumbnailFromMetaData(info->meta); | 94 | pixbuf = getThumbnailFromMetaData(info->meta); |
95 | size_h = string_get_fancy_byte_size(size); | 95 | size_h = string_get_fancy_byte_size(size); |
@@ -115,7 +115,7 @@ void addEntryToSearchTree(SearchList * searchContext, | |||
115 | /** | 115 | /** |
116 | * Add the given result to the model (search result | 116 | * Add the given result to the model (search result |
117 | * list). | 117 | * list). |
118 | * | 118 | * |
119 | * @param info the information to add to the model | 119 | * @param info the information to add to the model |
120 | * @param uri the search URI | 120 | * @param uri the search URI |
121 | * @param searchContext identifies the search page | 121 | * @param searchContext identifies the search page |
@@ -129,7 +129,7 @@ void fs_search_result_received(SearchList * searchContext, | |||
129 | model = GTK_TREE_STORE(gtk_tree_view_get_model(searchContext->treeview)); | 129 | model = GTK_TREE_STORE(gtk_tree_view_get_model(searchContext->treeview)); |
130 | gtk_tree_store_append(model, | 130 | gtk_tree_store_append(model, |
131 | &iter, | 131 | &iter, |
132 | NULL); | 132 | NULL); |
133 | addEntryToSearchTree(searchContext, | 133 | addEntryToSearchTree(searchContext, |
134 | NULL, | 134 | NULL, |
135 | info, | 135 | info, |
@@ -142,7 +142,7 @@ void fs_search_result_received(SearchList * searchContext, | |||
142 | * FSUI event: a search was started; create the | 142 | * FSUI event: a search was started; create the |
143 | * tab and add an entry to the summary. | 143 | * tab and add an entry to the summary. |
144 | */ | 144 | */ |
145 | SearchList * | 145 | SearchList * |
146 | fs_search_started(struct FSUI_SearchList * fsui_list, | 146 | fs_search_started(struct FSUI_SearchList * fsui_list, |
147 | const struct ECRS_URI * uri, | 147 | const struct ECRS_URI * uri, |
148 | unsigned int anonymityLevel, | 148 | unsigned int anonymityLevel, |
@@ -186,7 +186,7 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
186 | = STRDUP(dhead); | 186 | = STRDUP(dhead); |
187 | list->uri | 187 | list->uri |
188 | = ECRS_dupUri(uri); | 188 | = ECRS_dupUri(uri); |
189 | list->fsui_list | 189 | list->fsui_list |
190 | = fsui_list; | 190 | = fsui_list; |
191 | list->next | 191 | list->next |
192 | = search_head; | 192 | = search_head; |
@@ -196,7 +196,7 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
196 | "searchResultsFrame", | 196 | "searchResultsFrame", |
197 | PACKAGE_NAME); | 197 | PACKAGE_NAME); |
198 | connectGladeWithPlugins(list->searchXML); | 198 | connectGladeWithPlugins(list->searchXML); |
199 | list->searchpage | 199 | list->searchpage |
200 | = extractMainWidgetFromWindow(list->searchXML, | 200 | = extractMainWidgetFromWindow(list->searchXML, |
201 | "searchResultsFrame"); | 201 | "searchResultsFrame"); |
202 | /* setup tree view and renderers */ | 202 | /* setup tree view and renderers */ |
@@ -263,7 +263,7 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
263 | gtk_tree_view_column_set_clickable(column, TRUE); | 263 | gtk_tree_view_column_set_clickable(column, TRUE); |
264 | gtk_tree_view_column_set_reorderable(column, TRUE); | 264 | gtk_tree_view_column_set_reorderable(column, TRUE); |
265 | gtk_tree_view_column_set_sort_column_id(column, SEARCH_MIME); | 265 | gtk_tree_view_column_set_sort_column_id(column, SEARCH_MIME); |
266 | 266 | ||
267 | renderer = gtk_cell_renderer_text_new(); | 267 | renderer = gtk_cell_renderer_text_new(); |
268 | col = gtk_tree_view_insert_column_with_attributes(list->treeview, | 268 | col = gtk_tree_view_insert_column_with_attributes(list->treeview, |
269 | -1, | 269 | -1, |
@@ -313,14 +313,14 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
313 | = gtk_tree_row_reference_new(GTK_TREE_MODEL(search_summary), | 313 | = gtk_tree_row_reference_new(GTK_TREE_MODEL(search_summary), |
314 | path); | 314 | path); |
315 | gtk_tree_path_free(path); | 315 | gtk_tree_path_free(path); |
316 | 316 | ||
317 | /* load label */ | 317 | /* load label */ |
318 | list->labelXML | 318 | list->labelXML |
319 | = glade_xml_new(getGladeFileName(), | 319 | = glade_xml_new(getGladeFileName(), |
320 | "searchTabLabelWindow", | 320 | "searchTabLabelWindow", |
321 | PACKAGE_NAME); | 321 | PACKAGE_NAME); |
322 | connectGladeWithPlugins(list->labelXML); | 322 | connectGladeWithPlugins(list->labelXML); |
323 | list->tab_label | 323 | list->tab_label |
324 | = extractMainWidgetFromWindow(list->labelXML, | 324 | = extractMainWidgetFromWindow(list->labelXML, |
325 | "searchTabLabelWindow"); | 325 | "searchTabLabelWindow"); |
326 | /* process existing results */ | 326 | /* process existing results */ |
@@ -330,11 +330,11 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
330 | uri); | 330 | uri); |
331 | if (resultCount == 0) /* otherwise already done! */ | 331 | if (resultCount == 0) /* otherwise already done! */ |
332 | updateSearchSummary(list); | 332 | updateSearchSummary(list); |
333 | 333 | ||
334 | /* insert new page into search notebook */ | 334 | /* insert new page into search notebook */ |
335 | notebook | 335 | notebook |
336 | = GTK_NOTEBOOK(glade_xml_get_widget(getMainXML(), | 336 | = GTK_NOTEBOOK(glade_xml_get_widget(getMainXML(), |
337 | "downloadNotebook")); | 337 | "downloadNotebook")); |
338 | pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)); | 338 | pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)); |
339 | gtk_notebook_append_page(notebook, | 339 | gtk_notebook_append_page(notebook, |
340 | list->searchpage, | 340 | list->searchpage, |
@@ -342,7 +342,7 @@ fs_search_started(struct FSUI_SearchList * fsui_list, | |||
342 | gtk_notebook_set_current_page(notebook, | 342 | gtk_notebook_set_current_page(notebook, |
343 | pages); | 343 | pages); |
344 | gtk_widget_show(GTK_WIDGET(notebook)); /* may have been hidden! */ | 344 | gtk_widget_show(GTK_WIDGET(notebook)); /* may have been hidden! */ |
345 | 345 | ||
346 | return list; | 346 | return list; |
347 | } | 347 | } |
348 | 348 | ||
@@ -407,7 +407,7 @@ void fs_search_stopped(SearchList * list) { | |||
407 | search_head = search_head->next; | 407 | search_head = search_head->next; |
408 | } else { | 408 | } else { |
409 | prev = search_head; | 409 | prev = search_head; |
410 | while (prev->next != list) | 410 | while (prev->next != list) |
411 | prev = prev->next; | 411 | prev = prev->next; |
412 | prev->next = list->next; | 412 | prev->next = list->next; |
413 | } | 413 | } |
@@ -435,13 +435,13 @@ void fs_search_stopped(SearchList * list) { | |||
435 | GE_BREAK(ectx, index != -1); | 435 | GE_BREAK(ectx, index != -1); |
436 | gtk_notebook_remove_page(notebook, | 436 | gtk_notebook_remove_page(notebook, |
437 | index); | 437 | index); |
438 | 438 | ||
439 | /* recursively free search model */ | 439 | /* recursively free search model */ |
440 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(list->tree), | 440 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(list->tree), |
441 | &iter)) | 441 | &iter)) |
442 | freeIterSubtree(GTK_TREE_MODEL(list->tree), | 442 | freeIterSubtree(GTK_TREE_MODEL(list->tree), |
443 | &iter); | 443 | &iter); |
444 | 444 | ||
445 | /* destroy entry in summary */ | 445 | /* destroy entry in summary */ |
446 | path = gtk_tree_row_reference_get_path(list->summaryViewRowReference); | 446 | path = gtk_tree_row_reference_get_path(list->summaryViewRowReference); |
447 | gtk_tree_model_get_iter(GTK_TREE_MODEL(search_summary), | 447 | gtk_tree_model_get_iter(GTK_TREE_MODEL(search_summary), |
@@ -611,7 +611,7 @@ static void * fsui_callback(void * cls) { | |||
611 | * search notebook. Note that "searchPage" can thus | 611 | * search notebook. Note that "searchPage" can thus |
612 | * either refer to the main page in the tab or to the | 612 | * either refer to the main page in the tab or to the |
613 | * main entry of the tab label. | 613 | * main entry of the tab label. |
614 | */ | 614 | */ |
615 | void on_closeSearchButton_clicked_fs(GtkWidget * searchPage, | 615 | void on_closeSearchButton_clicked_fs(GtkWidget * searchPage, |
616 | GtkWidget * closeButton) { | 616 | GtkWidget * closeButton) { |
617 | SearchList * list; | 617 | SearchList * list; |
diff --git a/src/plugins/fs/search.h b/src/plugins/fs/search.h index a0e32f1b..4afc1496 100644 --- a/src/plugins/fs/search.h +++ b/src/plugins/fs/search.h | |||
@@ -58,7 +58,7 @@ void fs_search_result_received(SearchList * searchContext, | |||
58 | * | 58 | * |
59 | * @return internal search context | 59 | * @return internal search context |
60 | */ | 60 | */ |
61 | SearchList * | 61 | SearchList * |
62 | fs_search_started(struct FSUI_SearchList * list, | 62 | fs_search_started(struct FSUI_SearchList * list, |
63 | const struct ECRS_URI * uri, | 63 | const struct ECRS_URI * uri, |
64 | unsigned int anonymityLevel, | 64 | unsigned int anonymityLevel, |
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index 329e085d..8c037e5f 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -105,7 +105,7 @@ void fs_upload_stopped(UploadList * list) { | |||
105 | &iter, | 105 | &iter, |
106 | path); | 106 | path); |
107 | gtk_tree_path_free(path); | 107 | gtk_tree_path_free(path); |
108 | gtk_tree_row_reference_free(list->summaryViewRowReference); | 108 | gtk_tree_row_reference_free(list->summaryViewRowReference); |
109 | list->summaryViewRowReference = NULL; | 109 | list->summaryViewRowReference = NULL; |
110 | gtk_tree_store_remove(upload_summary, | 110 | gtk_tree_store_remove(upload_summary, |
111 | &iter); | 111 | &iter); |
@@ -113,7 +113,7 @@ void fs_upload_stopped(UploadList * list) { | |||
113 | if (list->uri != NULL) { | 113 | if (list->uri != NULL) { |
114 | ECRS_freeUri(list->uri); | 114 | ECRS_freeUri(list->uri); |
115 | list->uri = NULL; | 115 | list->uri = NULL; |
116 | } | 116 | } |
117 | if (upload_head == list) | 117 | if (upload_head == list) |
118 | upload_head = list->next; | 118 | upload_head = list->next; |
119 | else { | 119 | else { |
@@ -129,7 +129,7 @@ void fs_upload_stopped(UploadList * list) { | |||
129 | FREE(list); | 129 | FREE(list); |
130 | } | 130 | } |
131 | 131 | ||
132 | UploadList * | 132 | UploadList * |
133 | fs_upload_started(struct FSUI_UploadList * fsui, | 133 | fs_upload_started(struct FSUI_UploadList * fsui, |
134 | UploadList * parent, | 134 | UploadList * parent, |
135 | const char * filename, | 135 | const char * filename, |
@@ -175,7 +175,7 @@ fs_upload_started(struct FSUI_UploadList * fsui, | |||
175 | UPLOAD_FILENAME, filename, | 175 | UPLOAD_FILENAME, filename, |
176 | UPLOAD_PROGRESS, progress, | 176 | UPLOAD_PROGRESS, progress, |
177 | UPLOAD_URISTRING, "", /* FIXME: set if URI != NULL! */ | 177 | UPLOAD_URISTRING, "", /* FIXME: set if URI != NULL! */ |
178 | UPLOAD_INTERNAL, ret, | 178 | UPLOAD_INTERNAL, ret, |
179 | -1); | 179 | -1); |
180 | path = gtk_tree_model_get_path(GTK_TREE_MODEL(upload_summary), | 180 | path = gtk_tree_model_get_path(GTK_TREE_MODEL(upload_summary), |
181 | &iter); | 181 | &iter); |
@@ -325,7 +325,7 @@ void on_fsinsertuploadbutton_clicked_fs(gpointer dummy, | |||
325 | 325 | ||
326 | #ifndef MINGW | 326 | #ifndef MINGW |
327 | 327 | ||
328 | static char * | 328 | static char * |
329 | selectFile(const char * oldfilename) { | 329 | selectFile(const char * oldfilename) { |
330 | GladeXML * uploadXML; | 330 | GladeXML * uploadXML; |
331 | GtkFileChooser * dialog; | 331 | GtkFileChooser * dialog; |
@@ -341,10 +341,10 @@ selectFile(const char * oldfilename) { | |||
341 | gtk_file_chooser_set_filename(dialog, | 341 | gtk_file_chooser_set_filename(dialog, |
342 | oldfilename); | 342 | oldfilename); |
343 | if (getToggleButtonValue(getMainXML(), | 343 | if (getToggleButtonValue(getMainXML(), |
344 | "scopeRecursiveButton")) | 344 | "scopeRecursiveButton")) |
345 | gtk_file_chooser_set_action(dialog, | 345 | gtk_file_chooser_set_action(dialog, |
346 | GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); | 346 | GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); |
347 | if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) | 347 | if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) |
348 | ret = gtk_file_chooser_get_filename(dialog); | 348 | ret = gtk_file_chooser_get_filename(dialog); |
349 | else | 349 | else |
350 | ret = NULL; | 350 | ret = NULL; |
@@ -355,7 +355,7 @@ selectFile(const char * oldfilename) { | |||
355 | 355 | ||
356 | #else /* MINGW */ | 356 | #else /* MINGW */ |
357 | 357 | ||
358 | static char * | 358 | static char * |
359 | selectFile(const char * oldfilename) { | 359 | selectFile(const char * oldfilename) { |
360 | if (getToggleButtonValue(getMainXML(), | 360 | if (getToggleButtonValue(getMainXML(), |
361 | "scopeFileOnlyButton")) | 361 | "scopeFileOnlyButton")) |
@@ -380,7 +380,7 @@ void on_mainFileSharingInsertBrowseButton_clicked_fs(GtkWidget * browseButton, | |||
380 | "uploadFilenameComboBoxEntry"); | 380 | "uploadFilenameComboBoxEntry"); |
381 | entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(uploadLine))); | 381 | entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(uploadLine))); |
382 | oldfilename = gtk_entry_get_text(entry); | 382 | oldfilename = gtk_entry_get_text(entry); |
383 | if (oldfilename == NULL) | 383 | if (oldfilename == NULL) |
384 | oldfilename = getenv("PWD"); | 384 | oldfilename = getenv("PWD"); |
385 | if (oldfilename == NULL) | 385 | if (oldfilename == NULL) |
386 | oldfilename = getenv("HOME"); | 386 | oldfilename = getenv("HOME"); |
@@ -390,7 +390,7 @@ void on_mainFileSharingInsertBrowseButton_clicked_fs(GtkWidget * browseButton, | |||
390 | filename = selectFile(ofn); | 390 | filename = selectFile(ofn); |
391 | FREE(ofn); | 391 | FREE(ofn); |
392 | if (NULL == filename) | 392 | if (NULL == filename) |
393 | return; | 393 | return; |
394 | gtk_entry_set_text(entry, | 394 | gtk_entry_set_text(entry, |
395 | filename); | 395 | filename); |
396 | model = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(uploadLine))); | 396 | model = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(uploadLine))); |
@@ -401,7 +401,7 @@ void on_mainFileSharingInsertBrowseButton_clicked_fs(GtkWidget * browseButton, | |||
401 | 0, | 401 | 0, |
402 | filename, | 402 | filename, |
403 | -1); | 403 | -1); |
404 | free(filename); | 404 | free(filename); |
405 | } | 405 | } |
406 | 406 | ||
407 | /* FIXME: handlers for clear and stop! */ | 407 | /* FIXME: handlers for clear and stop! */ |
@@ -443,13 +443,13 @@ clearCompletedUploadCallback(GtkTreeModel * model, | |||
443 | } | 443 | } |
444 | 444 | ||
445 | void on_clearCompletedUploadsButton_clicked_fs(void * unused, | 445 | void on_clearCompletedUploadsButton_clicked_fs(void * unused, |
446 | GtkWidget * clearButton) { | 446 | GtkWidget * clearButton) { |
447 | gtk_tree_model_foreach(GTK_TREE_MODEL(upload_summary), | 447 | gtk_tree_model_foreach(GTK_TREE_MODEL(upload_summary), |
448 | &clearCompletedUploadCallback, | 448 | &clearCompletedUploadCallback, |
449 | NULL); | 449 | NULL); |
450 | } | 450 | } |
451 | 451 | ||
452 | static void | 452 | static void |
453 | fsuiCallUploadCallback(GtkTreeModel * model, | 453 | fsuiCallUploadCallback(GtkTreeModel * model, |
454 | GtkTreePath * path, | 454 | GtkTreePath * path, |
455 | GtkTreeIter * iter, | 455 | GtkTreeIter * iter, |
diff --git a/src/plugins/fs/upload.h b/src/plugins/fs/upload.h index 38db6ddb..69e2e49d 100644 --- a/src/plugins/fs/upload.h +++ b/src/plugins/fs/upload.h | |||
@@ -42,7 +42,7 @@ void fs_upload_stopped(UploadList * list); | |||
42 | /** | 42 | /** |
43 | * @param uri NULL if upload is not yet finished | 43 | * @param uri NULL if upload is not yet finished |
44 | */ | 44 | */ |
45 | UploadList * | 45 | UploadList * |
46 | fs_upload_started(struct FSUI_UploadList * fsui, | 46 | fs_upload_started(struct FSUI_UploadList * fsui, |
47 | UploadList * parent, | 47 | UploadList * parent, |
48 | const char * filename, | 48 | const char * filename, |
diff --git a/src/plugins/stats/functions.c b/src/plugins/stats/functions.c index 9be3bba7..ffb99733 100644 --- a/src/plugins/stats/functions.c +++ b/src/plugins/stats/functions.c | |||
@@ -333,7 +333,7 @@ static int getEffectivenessStats(const void * closure, | |||
333 | long long lsuccess; | 333 | long long lsuccess; |
334 | long long llocal; | 334 | long long llocal; |
335 | cron_t now; | 335 | cron_t now; |
336 | 336 | ||
337 | now = get_time(); | 337 | now = get_time(); |
338 | if (now < last + 2 * cronMINUTES) { | 338 | if (now < last + 2 * cronMINUTES) { |
339 | data[0][0] = lastdata; | 339 | data[0][0] = lastdata; |
@@ -364,8 +364,8 @@ static int getEffectivenessStats(const void * closure, | |||
364 | data[0][1] = 0.0; | 364 | data[0][1] = 0.0; |
365 | return OK; | 365 | return OK; |
366 | } | 366 | } |
367 | if (total == 0) | 367 | if (total == 0) |
368 | return OK; | 368 | return OK; |
369 | success -= lsuccess; | 369 | success -= lsuccess; |
370 | local -= llocal; | 370 | local -= llocal; |
371 | if (success <= local) | 371 | if (success <= local) |
diff --git a/src/plugins/stats/statistics.c b/src/plugins/stats/statistics.c index a93c9bff..e9375e06 100644 --- a/src/plugins/stats/statistics.c +++ b/src/plugins/stats/statistics.c | |||
@@ -117,8 +117,8 @@ static void load_graph_draw(LoadGraph *g) { | |||
117 | g->disp->allocation.height); | 117 | g->disp->allocation.height); |
118 | 118 | ||
119 | max = 0.26; /* force showing at least the 25% line */ | 119 | max = 0.26; /* force showing at least the 25% line */ |
120 | for (i = 0; i < g->num_points - 1; i++) | 120 | for (i = 0; i < g->num_points - 1; i++) |
121 | for (j=0;j<g->count;j++) | 121 | for (j=0;j<g->count;j++) |
122 | if (g->data[i][j] > max) | 122 | if (g->data[i][j] > max) |
123 | max = g->data[i][j]; | 123 | max = g->data[i][j]; |
124 | max = max * 1.01; /* leave top 1% free */ | 124 | max = max * 1.01; /* leave top 1% free */ |
@@ -130,7 +130,7 @@ static void load_graph_draw(LoadGraph *g) { | |||
130 | for (i = 1; i < 5; i++) { | 130 | for (i = 1; i < 5; i++) { |
131 | gint y1 = g->draw_height + 1 - i * dely; | 131 | gint y1 = g->draw_height + 1 - i * dely; |
132 | if ( (dely < 30) && (i != 4) ) | 132 | if ( (dely < 30) && (i != 4) ) |
133 | continue; /* only print additional | 133 | continue; /* only print additional |
134 | lines if there is enough space! */ | 134 | lines if there is enough space! */ |
135 | if (y1 > 0) { | 135 | if (y1 > 0) { |
136 | const gchar * label[] = { | 136 | const gchar * label[] = { |