diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-12-18 01:56:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-12-18 01:56:58 +0000 |
commit | 6434b07ae47a0e441be76fcc990b4d8268b08f18 (patch) | |
tree | 88338dea25df77bd55a5a77e838ceb22ba00e4b2 | |
parent | 9c826f9d3d590481d0338887f38b1a0559c6620a (diff) | |
download | gnunet-gtk-6434b07ae47a0e441be76fcc990b4d8268b08f18.tar.gz gnunet-gtk-6434b07ae47a0e441be76fcc990b4d8268b08f18.zip |
whitespace
-rw-r--r-- | src/common/helper.c | 16 | ||||
-rw-r--r-- | src/common/iterators.c | 2 | ||||
-rw-r--r-- | src/common/logging.c | 2 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c | 16 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 28 | ||||
-rw-r--r-- | src/plugins/fs/meta.c | 6 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 8 |
7 files changed, 39 insertions, 39 deletions
diff --git a/src/common/helper.c b/src/common/helper.c index c8312776..73227bc3 100644 --- a/src/common/helper.c +++ b/src/common/helper.c | |||
@@ -547,18 +547,18 @@ gboolean startGNUnetSetup (gboolean run_wizard) { | |||
547 | #ifdef WITH_LIBGKSU2 | 547 | #ifdef WITH_LIBGKSU2 |
548 | GError *gerror = NULL; | 548 | GError *gerror = NULL; |
549 | if(run_wizard) { | 549 | if(run_wizard) { |
550 | code = gksu_run("gnunet-setup -d wizard-gtk", | 550 | code = gksu_run("gnunet-setup -d wizard-gtk", |
551 | &gerror); | 551 | &gerror); |
552 | } else { | 552 | } else { |
553 | code = gksu_run("gnunet-setup -d", | 553 | code = gksu_run("gnunet-setup -d", |
554 | &gerror); | 554 | &gerror); |
555 | } | 555 | } |
556 | if (code && !gerror) { | 556 | if (code && !gerror) { |
557 | error_message = STRDUP(_("GKSu encountered an unknown error running the configuration tool (gnunet-setup).")); | 557 | error_message = STRDUP(_("GKSu encountered an unknown error running the configuration tool (gnunet-setup).")); |
558 | } else if (code && gerror) { | 558 | } else if (code && gerror) { |
559 | error_message = g_strdup_printf(_("GKSu returned:\n%s"), | 559 | error_message = g_strdup_printf(_("GKSu returned:\n%s"), |
560 | gerror->message); | 560 | gerror->message); |
561 | g_error_free(gerror); | 561 | g_error_free(gerror); |
562 | } else { | 562 | } else { |
563 | error_message = NULL; | 563 | error_message = NULL; |
564 | } | 564 | } |
@@ -574,7 +574,7 @@ gboolean startGNUnetSetup (gboolean run_wizard) { | |||
574 | "mainWindow"); | 574 | "mainWindow"); |
575 | messageDialog = gtk_message_dialog_new(GTK_WINDOW(mainWindow), | 575 | messageDialog = gtk_message_dialog_new(GTK_WINDOW(mainWindow), |
576 | GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, | 576 | GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, |
577 | GTK_MESSAGE_WARNING, | 577 | GTK_MESSAGE_WARNING, |
578 | GTK_BUTTONS_CLOSE, | 578 | GTK_BUTTONS_CLOSE, |
579 | _("Failed to run the configuration tool (gnunet-setup): %s"), | 579 | _("Failed to run the configuration tool (gnunet-setup): %s"), |
580 | error_message); | 580 | error_message); |
diff --git a/src/common/iterators.c b/src/common/iterators.c index b1a54826..b36a6ab9 100644 --- a/src/common/iterators.c +++ b/src/common/iterators.c | |||
@@ -98,7 +98,7 @@ collectAllRows(GtkTreeModel * model, | |||
98 | path); | 98 | path); |
99 | return FALSE; | 99 | return FALSE; |
100 | } | 100 | } |
101 | 101 | ||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Identical to "gtk_tree_model_foreach", | 104 | * Identical to "gtk_tree_model_foreach", |
diff --git a/src/common/logging.c b/src/common/logging.c index aad69f96..08b66f0d 100644 --- a/src/common/logging.c +++ b/src/common/logging.c | |||
@@ -37,7 +37,7 @@ static GtkWidget * infoWindowTextView; | |||
37 | static GladeXML * statusXML; | 37 | static GladeXML * statusXML; |
38 | 38 | ||
39 | static void init() { | 39 | static void init() { |
40 | if (statusXML != NULL) | 40 | if (statusXML != NULL) |
41 | return; | 41 | return; |
42 | statusXML | 42 | statusXML |
43 | = glade_xml_new(getGladeFileName(), | 43 | = glade_xml_new(getGladeFileName(), |
diff --git a/src/plugins/daemon/daemon.c b/src/plugins/daemon/daemon.c index a3d0af10..2068d2dc 100644 --- a/src/plugins/daemon/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -144,7 +144,7 @@ static void * doUpdateMenus(void * arg) { | |||
144 | statsEntryError | 144 | statsEntryError |
145 | = glade_xml_get_widget(getMainXML(), | 145 | = glade_xml_get_widget(getMainXML(), |
146 | "statusPixmapError"); | 146 | "statusPixmapError"); |
147 | chooser | 147 | chooser |
148 | = glade_xml_get_widget(getMainXML(), | 148 | = glade_xml_get_widget(getMainXML(), |
149 | "gnunetdconfigFileChooserButton"); | 149 | "gnunetdconfigFileChooserButton"); |
150 | GC_get_configuration_value_string(cfg, | 150 | GC_get_configuration_value_string(cfg, |
@@ -186,9 +186,9 @@ static void * doUpdateMenus(void * arg) { | |||
186 | } | 186 | } |
187 | FREE(user); | 187 | FREE(user); |
188 | GC_free(dcfg); | 188 | GC_free(dcfg); |
189 | } | 189 | } |
190 | g_free(fn); | 190 | g_free(fn); |
191 | } | 191 | } |
192 | gtk_widget_hide(statsEntryYes); | 192 | gtk_widget_hide(statsEntryYes); |
193 | gtk_widget_set_sensitive(killEntry, FALSE); | 193 | gtk_widget_set_sensitive(killEntry, FALSE); |
194 | if (canStart && isLocal) { | 194 | if (canStart && isLocal) { |
@@ -218,7 +218,7 @@ static void cronCheckDaemon(void * dummy) { | |||
218 | ret = 1; | 218 | ret = 1; |
219 | else | 219 | else |
220 | ret = 0; | 220 | ret = 0; |
221 | gtkSaveCall(&doUpdateMenus, &ret); | 221 | gtkSaveCall(&doUpdateMenus, &ret); |
222 | } | 222 | } |
223 | 223 | ||
224 | 224 | ||
@@ -230,7 +230,7 @@ void on_startDaemon_clicked_daemon(GtkWidget * widget, | |||
230 | GtkWidget * launchEntry; | 230 | GtkWidget * launchEntry; |
231 | GtkWidget * chooser; | 231 | GtkWidget * chooser; |
232 | char * fn; | 232 | char * fn; |
233 | 233 | ||
234 | launchEntry | 234 | launchEntry |
235 | = glade_xml_get_widget(getMainXML(), | 235 | = glade_xml_get_widget(getMainXML(), |
236 | "startDaemon"); | 236 | "startDaemon"); |
@@ -241,14 +241,14 @@ void on_startDaemon_clicked_daemon(GtkWidget * widget, | |||
241 | return; | 241 | return; |
242 | } else { | 242 | } else { |
243 | addLogEntry(_("Launching gnunetd...")); | 243 | addLogEntry(_("Launching gnunetd...")); |
244 | chooser | 244 | chooser |
245 | = glade_xml_get_widget(getMainXML(), | 245 | = glade_xml_get_widget(getMainXML(), |
246 | "gnunetdconfigFileChooserButton"); | 246 | "gnunetdconfigFileChooserButton"); |
247 | fn = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); | 247 | fn = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(chooser)); |
248 | GE_BREAK(ectx, fn != NULL); | 248 | GE_BREAK(ectx, fn != NULL); |
249 | if (SYSERR != os_daemon_start(ectx, | 249 | if (SYSERR != os_daemon_start(ectx, |
250 | cfg, | 250 | cfg, |
251 | fn, | 251 | fn, |
252 | YES)) { | 252 | YES)) { |
253 | addLogEntry(_("Launched gnunetd")); | 253 | addLogEntry(_("Launched gnunetd")); |
254 | } else { | 254 | } else { |
@@ -353,7 +353,7 @@ void init_daemon(struct GE_Context * e, | |||
353 | daemon_config); | 353 | daemon_config); |
354 | } | 354 | } |
355 | FREE(daemon_config); | 355 | FREE(daemon_config); |
356 | 356 | ||
357 | cron = cron_create(ectx); | 357 | cron = cron_create(ectx); |
358 | cron_add_job(cron, | 358 | cron_add_job(cron, |
359 | &cronCheckDaemon, | 359 | &cronCheckDaemon, |
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 2a197853..cadb3f34 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -111,14 +111,14 @@ refreshDirectoryViewFromDisk(DownloadList * list) { | |||
111 | return; | 111 | return; |
112 | 112 | ||
113 | if (0 != stat(list->filename, | 113 | if (0 != stat(list->filename, |
114 | &buf)) | 114 | &buf)) |
115 | return; | 115 | return; |
116 | if (S_ISDIR(buf.st_mode)) { | 116 | if (S_ISDIR(buf.st_mode)) { |
117 | fn = MALLOC(strlen(list->filename) + strlen(GNUNET_DIRECTORY_EXT) + 1); | 117 | fn = MALLOC(strlen(list->filename) + strlen(GNUNET_DIRECTORY_EXT) + 1); |
118 | strcpy(fn, list->filename); | 118 | strcpy(fn, list->filename); |
119 | if (fn[strlen(fn)-1] == '/') | 119 | if (fn[strlen(fn)-1] == '/') |
120 | fn[strlen(fn)-1] = '\0'; | 120 | fn[strlen(fn)-1] = '\0'; |
121 | strcat(fn, GNUNET_DIRECTORY_EXT); | 121 | strcat(fn, GNUNET_DIRECTORY_EXT); |
122 | if (0 != stat(list->filename, | 122 | if (0 != stat(list->filename, |
123 | &buf)) { | 123 | &buf)) { |
124 | FREE(fn); | 124 | FREE(fn); |
@@ -453,10 +453,10 @@ void fs_download_stopped(DownloadList * list) { | |||
453 | valid = gtk_tree_model_iter_children(model, | 453 | valid = gtk_tree_model_iter_children(model, |
454 | &iter, | 454 | &iter, |
455 | &piter); | 455 | &piter); |
456 | while (TRUE == valid) | 456 | while (TRUE == valid) |
457 | valid = gtk_tree_store_remove(GTK_TREE_STORE(model), | 457 | valid = gtk_tree_store_remove(GTK_TREE_STORE(model), |
458 | &iter); | 458 | &iter); |
459 | } | 459 | } |
460 | } | 460 | } |
461 | if (list->searchViewRowReference != NULL) { | 461 | if (list->searchViewRowReference != NULL) { |
462 | gtk_tree_row_reference_free(list->searchViewRowReference); | 462 | gtk_tree_row_reference_free(list->searchViewRowReference); |
@@ -602,7 +602,7 @@ initiateDownload(GtkTreeModel * model, | |||
602 | if (idc_name == NULL) { | 602 | if (idc_name == NULL) { |
603 | #ifdef WINDOWS | 603 | #ifdef WINDOWS |
604 | char * filehash; | 604 | char * filehash; |
605 | 605 | ||
606 | filehash = STRDUP(sdc.uri_name); | 606 | filehash = STRDUP(sdc.uri_name); |
607 | filehash[16] = 0; | 607 | filehash[16] = 0; |
608 | idc_name = STRDUP(filehash); | 608 | idc_name = STRDUP(filehash); |
@@ -612,7 +612,7 @@ initiateDownload(GtkTreeModel * model, | |||
612 | #endif | 612 | #endif |
613 | } | 613 | } |
614 | 614 | ||
615 | /* dname = directory portion of idc_name */ | 615 | /* dname = directory portion of idc_name */ |
616 | cname = idc_name; | 616 | cname = idc_name; |
617 | dname = STRDUP(idc_name); | 617 | dname = STRDUP(idc_name); |
618 | cname = &dname[strlen(dname)-1]; | 618 | cname = &dname[strlen(dname)-1]; |
@@ -684,14 +684,14 @@ initiateDownload(GtkTreeModel * model, | |||
684 | sdc.idc_final_download_destination = MALLOC(strlen(final_download_dir) + 2 + | 684 | sdc.idc_final_download_destination = MALLOC(strlen(final_download_dir) + 2 + |
685 | strlen(idc_name) + strlen(GNUNET_DIRECTORY_EXT) + | 685 | strlen(idc_name) + strlen(GNUNET_DIRECTORY_EXT) + |
686 | strlen(dirPath)); | 686 | strlen(dirPath)); |
687 | strcpy(sdc.idc_final_download_destination, | 687 | strcpy(sdc.idc_final_download_destination, |
688 | final_download_dir); | 688 | final_download_dir); |
689 | if (sdc.idc_final_download_destination[strlen(sdc.idc_final_download_destination)-1] != DIR_SEPARATOR) | 689 | if (sdc.idc_final_download_destination[strlen(sdc.idc_final_download_destination)-1] != DIR_SEPARATOR) |
690 | strcat(sdc.idc_final_download_destination, | 690 | strcat(sdc.idc_final_download_destination, |
691 | DIR_SEPARATOR_STR); | 691 | DIR_SEPARATOR_STR); |
692 | strcat(sdc.idc_final_download_destination, | 692 | strcat(sdc.idc_final_download_destination, |
693 | dirPath); | 693 | dirPath); |
694 | strcat(sdc.idc_final_download_destination, | 694 | strcat(sdc.idc_final_download_destination, |
695 | idc_name); | 695 | idc_name); |
696 | sdc.anonymity = getSpinButtonValue(sdc.searchContext->searchXML, | 696 | sdc.anonymity = getSpinButtonValue(sdc.searchContext->searchXML, |
697 | "downloadAnonymitySpinButton"); | 697 | "downloadAnonymitySpinButton"); |
@@ -777,21 +777,21 @@ void on_statusDownloadURIEntry_editing_done_fs(GtkWidget * entry, | |||
777 | disk_directory_create(ectx, final_download_dir); | 777 | disk_directory_create(ectx, final_download_dir); |
778 | dname = &uris[strlen(ECRS_URI_PREFIX) + strlen(ECRS_FILE_INFIX)]; | 778 | dname = &uris[strlen(ECRS_URI_PREFIX) + strlen(ECRS_FILE_INFIX)]; |
779 | sdc.idc_final_download_destination = MALLOC(strlen(final_download_dir) + strlen(dname) + 2); | 779 | sdc.idc_final_download_destination = MALLOC(strlen(final_download_dir) + strlen(dname) + 2); |
780 | strcpy(sdc.idc_final_download_destination, | 780 | strcpy(sdc.idc_final_download_destination, |
781 | final_download_dir); | 781 | final_download_dir); |
782 | FREE(final_download_dir); | 782 | FREE(final_download_dir); |
783 | if (sdc.idc_final_download_destination[strlen(sdc.idc_final_download_destination)] != DIR_SEPARATOR) | 783 | if (sdc.idc_final_download_destination[strlen(sdc.idc_final_download_destination)] != DIR_SEPARATOR) |
784 | strcat(sdc.idc_final_download_destination, | 784 | strcat(sdc.idc_final_download_destination, |
785 | DIR_SEPARATOR_STR); | 785 | DIR_SEPARATOR_STR); |
786 | strcat(sdc.idc_final_download_destination, | 786 | strcat(sdc.idc_final_download_destination, |
787 | dname); | 787 | dname); |
788 | 788 | ||
789 | addLogEntry(_("Downloading `%s'"), | 789 | addLogEntry(_("Downloading `%s'"), |
790 | uris); | 790 | uris); |
791 | sdc.idc_meta = ECRS_createMetaData(); | 791 | sdc.idc_meta = ECRS_createMetaData(); |
792 | sdc.anonymity = getSpinButtonValue(getMainXML(), | 792 | sdc.anonymity = getSpinButtonValue(getMainXML(), |
793 | "fsstatusAnonymitySpin"); | 793 | "fsstatusAnonymitySpin"); |
794 | sdc.recursive = NO; | 794 | sdc.recursive = NO; |
795 | sdc.searchContext = NULL; | 795 | sdc.searchContext = NULL; |
796 | sdc.parentContext = NULL; | 796 | sdc.parentContext = NULL; |
797 | run_with_save_calls(&init_download_helper, | 797 | run_with_save_calls(&init_download_helper, |
diff --git a/src/plugins/fs/meta.c b/src/plugins/fs/meta.c index e7b28b68..c1665251 100644 --- a/src/plugins/fs/meta.c +++ b/src/plugins/fs/meta.c | |||
@@ -330,7 +330,7 @@ void handleListRemove(GladeXML * xml, | |||
330 | ggc_tree_selection_selected_foreach | 330 | ggc_tree_selection_selected_foreach |
331 | (gtk_tree_view_get_selection(GTK_TREE_VIEW(list)), | 331 | (gtk_tree_view_get_selection(GTK_TREE_VIEW(list)), |
332 | &removeRow, | 332 | &removeRow, |
333 | NULL); | 333 | NULL); |
334 | } | 334 | } |
335 | 335 | ||
336 | #define THUMBSIZE 128 | 336 | #define THUMBSIZE 128 |
@@ -385,7 +385,7 @@ struct ECRS_MetaData * getMetaDataFromList(GladeXML * xml, | |||
385 | return meta; | 385 | return meta; |
386 | height = gdk_pixbuf_get_height(pixbuf); | 386 | height = gdk_pixbuf_get_height(pixbuf); |
387 | width = gdk_pixbuf_get_width(pixbuf); | 387 | width = gdk_pixbuf_get_width(pixbuf); |
388 | if ( (height > THUMBSIZE) || | 388 | if ( (height > THUMBSIZE) || |
389 | (width > THUMBSIZE) ) { | 389 | (width > THUMBSIZE) ) { |
390 | if (height > THUMBSIZE) { | 390 | if (height > THUMBSIZE) { |
391 | width = width * THUMBSIZE / height; | 391 | width = width * THUMBSIZE / height; |
@@ -622,7 +622,7 @@ const char * getEntryLineValue(GladeXML * xml, | |||
622 | const char * widgetName) { | 622 | const char * widgetName) { |
623 | GtkBin * line; | 623 | GtkBin * line; |
624 | GtkEntry * entry; | 624 | GtkEntry * entry; |
625 | 625 | ||
626 | line = GTK_BIN(glade_xml_get_widget(xml, | 626 | line = GTK_BIN(glade_xml_get_widget(xml, |
627 | widgetName)); | 627 | widgetName)); |
628 | entry = GTK_ENTRY(gtk_bin_get_child(line)); | 628 | entry = GTK_ENTRY(gtk_bin_get_child(line)); |
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index 5ab6d75a..6d6ee123 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -142,7 +142,7 @@ fs_upload_started(struct FSUI_UploadList * fsui, | |||
142 | GtkTreePath * path; | 142 | GtkTreePath * path; |
143 | int progress; | 143 | int progress; |
144 | GtkTreeIter par; | 144 | GtkTreeIter par; |
145 | 145 | ||
146 | ret = MALLOC(sizeof(UploadList)); | 146 | ret = MALLOC(sizeof(UploadList)); |
147 | memset(ret, | 147 | memset(ret, |
148 | 0, | 148 | 0, |
@@ -163,7 +163,7 @@ fs_upload_started(struct FSUI_UploadList * fsui, | |||
163 | gtk_tree_store_append(upload_summary, | 163 | gtk_tree_store_append(upload_summary, |
164 | &iter, | 164 | &iter, |
165 | NULL); | 165 | NULL); |
166 | } | 166 | } |
167 | if (total != 0) | 167 | if (total != 0) |
168 | progress = 100 * completed / total; | 168 | progress = 100 * completed / total; |
169 | else | 169 | else |
@@ -329,7 +329,7 @@ typedef struct { | |||
329 | 329 | ||
330 | static void * start_upload_helper(void * cls) { | 330 | static void * start_upload_helper(void * cls) { |
331 | FSUC * fsuc = cls; | 331 | FSUC * fsuc = cls; |
332 | 332 | ||
333 | FSUI_startUpload(ctx, | 333 | FSUI_startUpload(ctx, |
334 | fsuc->filename, | 334 | fsuc->filename, |
335 | (DirectoryScanCallback) &disk_directory_scan, | 335 | (DirectoryScanCallback) &disk_directory_scan, |
@@ -583,7 +583,7 @@ void on_uploadFilenameComboBoxEntry_changed_fs(gpointer dummy2, | |||
583 | filename = getEntryLineValue(getMainXML(), | 583 | filename = getEntryLineValue(getMainXML(), |
584 | "uploadFilenameComboBoxEntry"); | 584 | "uploadFilenameComboBoxEntry"); |
585 | ok = (0 == stat(filename, &buf)); | 585 | ok = (0 == stat(filename, &buf)); |
586 | if (ok) | 586 | if (ok) |
587 | ok = (0 == ACCESS(filename, R_OK)); | 587 | ok = (0 == ACCESS(filename, R_OK)); |
588 | if (ok) { | 588 | if (ok) { |
589 | if (S_ISDIR(buf.st_mode)) { | 589 | if (S_ISDIR(buf.st_mode)) { |