diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-06-12 06:02:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-06-12 06:02:06 +0000 |
commit | 8fbe77f9fabfc1818c3368e14cd1e114401d5966 (patch) | |
tree | 2ddb04a805c4b32fe48a75c6ebaef1ad46606447 | |
parent | 2a42039e87aaaaae624977344aa5e67323cbe88e (diff) | |
download | gnunet-gtk-8fbe77f9fabfc1818c3368e14cd1e114401d5966.tar.gz gnunet-gtk-8fbe77f9fabfc1818c3368e14cd1e114401d5966.zip |
indent
-rw-r--r-- | po/Makefile.in | 2 | ||||
-rw-r--r-- | src/core/main.c | 22 | ||||
-rw-r--r-- | src/plugins/fs/download.c | 34 | ||||
-rw-r--r-- | src/plugins/fs/fs.c | 4 | ||||
-rw-r--r-- | src/plugins/fs/search.c | 7 | ||||
-rw-r--r-- | src/plugins/fs/status.c | 13 | ||||
-rw-r--r-- | src/plugins/fs/upload.c | 5 |
7 files changed, 44 insertions, 43 deletions
diff --git a/po/Makefile.in b/po/Makefile.in index baba3cb0..d47ce275 100644 --- a/po/Makefile.in +++ b/po/Makefile.in | |||
@@ -11,7 +11,7 @@ | |||
11 | # Origin: gettext-0.13 | 11 | # Origin: gettext-0.13 |
12 | 12 | ||
13 | PACKAGE = gnunet-gtk | 13 | PACKAGE = gnunet-gtk |
14 | VERSION = 0.8.0pre1 | 14 | VERSION = 0.8.0 |
15 | 15 | ||
16 | SHELL = /bin/sh | 16 | SHELL = /bin/sh |
17 | 17 | ||
diff --git a/src/core/main.c b/src/core/main.c index 27353922..c6c7e05c 100644 --- a/src/core/main.c +++ b/src/core/main.c | |||
@@ -77,19 +77,19 @@ customLog (const char *msg) | |||
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | static void | 79 | static void |
80 | setIconSearchPath() | 80 | setIconSearchPath () |
81 | { | 81 | { |
82 | char *dataDir; | 82 | char *dataDir; |
83 | char *buf; | 83 | char *buf; |
84 | 84 | ||
85 | dataDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); | 85 | dataDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR); |
86 | buf = GNUNET_malloc(strlen(dataDir) + strlen("../gnunet-gtk/icons/") + 2); | 86 | buf = |
87 | strcpy(buf, dataDir); | 87 | GNUNET_malloc (strlen (dataDir) + strlen ("../gnunet-gtk/icons/") + 2); |
88 | strcat(buf, "../gnunet-gtk/icons/"); | 88 | strcpy (buf, dataDir); |
89 | gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), | 89 | strcat (buf, "../gnunet-gtk/icons/"); |
90 | buf); | 90 | gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), buf); |
91 | GNUNET_free(buf); | 91 | GNUNET_free (buf); |
92 | GNUNET_free(dataDir); | 92 | GNUNET_free (dataDir); |
93 | } | 93 | } |
94 | 94 | ||
95 | int | 95 | int |
@@ -134,7 +134,7 @@ main (int argc, char *const *argv) | |||
134 | bind_textdomain_codeset ("GNUnet", "UTF-8"); | 134 | bind_textdomain_codeset ("GNUnet", "UTF-8"); |
135 | bind_textdomain_codeset ("gnunet-gtk", "UTF-8"); | 135 | bind_textdomain_codeset ("gnunet-gtk", "UTF-8"); |
136 | #endif | 136 | #endif |
137 | setIconSearchPath(); | 137 | setIconSearchPath (); |
138 | GNUNET_GTK_initialize_common_library (cfg, &GNUNET_GTK_main_quit); | 138 | GNUNET_GTK_initialize_common_library (cfg, &GNUNET_GTK_main_quit); |
139 | /* configure GTK logging */ | 139 | /* configure GTK logging */ |
140 | GNUNET_GC_get_configuration_value_string (cfg, | 140 | GNUNET_GC_get_configuration_value_string (cfg, |
@@ -152,7 +152,7 @@ main (int argc, char *const *argv) | |||
152 | my_ctx = GNUNET_GTK_create_gtk_logger (mask); | 152 | my_ctx = GNUNET_GTK_create_gtk_logger (mask); |
153 | GNUNET_GE_setDefaultContext (my_ctx); | 153 | GNUNET_GE_setDefaultContext (my_ctx); |
154 | root = | 154 | root = |
155 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); | 155 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "mainWindow"); |
156 | gtk_window_maximize (GTK_WINDOW (root)); | 156 | gtk_window_maximize (GTK_WINDOW (root)); |
157 | gtk_widget_show (root); | 157 | gtk_widget_show (root); |
158 | gtk_window_present (GTK_WINDOW (root)); | 158 | gtk_window_present (GTK_WINDOW (root)); |
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 8d2e0b20..3121e627 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -288,11 +288,10 @@ fs_download_started (struct GNUNET_FSUI_DownloadList *fsui_dl, | |||
288 | gtk_tree_store_set (sl_parent->tree, | 288 | gtk_tree_store_set (sl_parent->tree, |
289 | &iter, SEARCH_STATUS, | 289 | &iter, SEARCH_STATUS, |
290 | getStatusName | 290 | getStatusName |
291 | (GNUNET_URITRACK_DOWNLOAD_STARTED), | 291 | (GNUNET_URITRACK_DOWNLOAD_STARTED), |
292 | SEARCH_STATUS_LOGO, | 292 | SEARCH_STATUS_LOGO, |
293 | getStatusLogo | 293 | getStatusLogo |
294 | (GNUNET_URITRACK_DOWNLOAD_STARTED), | 294 | (GNUNET_URITRACK_DOWNLOAD_STARTED), -1); |
295 | -1); | ||
296 | break; | 295 | break; |
297 | } | 296 | } |
298 | valid = gtk_tree_model_iter_next (model, &iter); | 297 | valid = gtk_tree_model_iter_next (model, &iter); |
@@ -448,8 +447,7 @@ fs_download_stopped (DownloadList * list) | |||
448 | GNUNET_free (list->filename); | 447 | GNUNET_free (list->filename); |
449 | GNUNET_ECRS_uri_destroy (list->uri); | 448 | GNUNET_ECRS_uri_destroy (list->uri); |
450 | 449 | ||
451 | if ( (list->searchList != NULL) && | 450 | if ((list->searchList != NULL) && (list->searchViewRowReference != NULL)) |
452 | (list->searchViewRowReference != NULL) ) | ||
453 | { | 451 | { |
454 | path = gtk_tree_row_reference_get_path (list->searchViewRowReference); | 452 | path = gtk_tree_row_reference_get_path (list->searchViewRowReference); |
455 | if (path == NULL) | 453 | if (path == NULL) |
@@ -461,13 +459,14 @@ fs_download_stopped (DownloadList * list) | |||
461 | model = GTK_TREE_MODEL (list->searchList->tree); | 459 | model = GTK_TREE_MODEL (list->searchList->tree); |
462 | gtk_tree_model_get_iter (model, &iter, path); | 460 | gtk_tree_model_get_iter (model, &iter, path); |
463 | gtk_tree_path_free (path); | 461 | gtk_tree_path_free (path); |
464 | gtk_tree_store_set (list->searchList->tree, | 462 | gtk_tree_store_set (list->searchList->tree, |
465 | &iter, | 463 | &iter, |
466 | SEARCH_STATUS, | 464 | SEARCH_STATUS, |
467 | getStatusName (GNUNET_URITRACK_DOWNLOAD_ABORTED), | 465 | getStatusName |
468 | SEARCH_STATUS_LOGO, | 466 | (GNUNET_URITRACK_DOWNLOAD_ABORTED), |
469 | getStatusLogo (GNUNET_URITRACK_DOWNLOAD_ABORTED), | 467 | SEARCH_STATUS_LOGO, |
470 | -1); | 468 | getStatusLogo |
469 | (GNUNET_URITRACK_DOWNLOAD_ABORTED), -1); | ||
471 | } | 470 | } |
472 | } | 471 | } |
473 | if (list->searchViewRowReference != NULL) | 472 | if (list->searchViewRowReference != NULL) |
@@ -767,8 +766,7 @@ on_downloadButton_clicked_fs (GtkWidget * treeview, | |||
767 | */ | 766 | */ |
768 | gboolean | 767 | gboolean |
769 | on_searchResults_button_press_fs (GtkWidget * treeview, | 768 | on_searchResults_button_press_fs (GtkWidget * treeview, |
770 | GdkEventButton * event, | 769 | GdkEventButton * event, gpointer data) |
771 | gpointer data) | ||
772 | { | 770 | { |
773 | if (event->type == GDK_2BUTTON_PRESS) | 771 | if (event->type == GDK_2BUTTON_PRESS) |
774 | on_downloadButton_clicked_fs (treeview, NULL); | 772 | on_downloadButton_clicked_fs (treeview, NULL); |
@@ -886,8 +884,7 @@ clearCompletedDownloadCallback (GtkTreeModel * model, | |||
886 | } | 884 | } |
887 | 885 | ||
888 | void | 886 | void |
889 | on_clearCompletedDownloads_clicked_fs (void *unused, | 887 | on_clearCompletedDownloads_clicked_fs (void *unused, GtkWidget * clearButton) |
890 | GtkWidget * clearButton) | ||
891 | { | 888 | { |
892 | GNUNET_GTK_tree_model_foreach (GTK_TREE_MODEL (download_summary), | 889 | GNUNET_GTK_tree_model_foreach (GTK_TREE_MODEL (download_summary), |
893 | &clearCompletedDownloadCallback, NULL); | 890 | &clearCompletedDownloadCallback, NULL); |
@@ -956,9 +953,10 @@ on_activeDownloadsList_button_press_fs (GtkWidget * treeview, | |||
956 | GNUNET_GTK_connect_glade_with_plugins (contextMenuXML); | 953 | GNUNET_GTK_connect_glade_with_plugins (contextMenuXML); |
957 | menu = glade_xml_get_widget (contextMenuXML, "downloadsContextMenu"); | 954 | menu = glade_xml_get_widget (contextMenuXML, "downloadsContextMenu"); |
958 | if (event_button->button == 3) | 955 | if (event_button->button == 3) |
959 | gtk_menu_popup (GTK_MENU(menu), | 956 | gtk_menu_popup (GTK_MENU (menu), |
960 | NULL, NULL, NULL, NULL, | 957 | NULL, NULL, NULL, NULL, |
961 | event_button->button, event_button->time); | 958 | event_button->button, event_button->time); |
962 | return FALSE; | 959 | return FALSE; |
963 | } | 960 | } |
961 | |||
964 | /* end of download.c */ | 962 | /* end of download.c */ |
diff --git a/src/plugins/fs/fs.c b/src/plugins/fs/fs.c index 8118b96a..9614aded 100644 --- a/src/plugins/fs/fs.c +++ b/src/plugins/fs/fs.c | |||
@@ -330,7 +330,7 @@ on_download_summary_selection_changed (gpointer signal, gpointer cls) | |||
330 | } | 330 | } |
331 | 331 | ||
332 | int | 332 | int |
333 | on_upload_copy_uri_activate_fs (void *dummy1, GtkWidget *dummy2) | 333 | on_upload_copy_uri_activate_fs (void *dummy1, GtkWidget * dummy2) |
334 | { | 334 | { |
335 | GtkWidget *uploadsList = | 335 | GtkWidget *uploadsList = |
336 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | 336 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), |
@@ -342,7 +342,7 @@ on_upload_copy_uri_activate_fs (void *dummy1, GtkWidget *dummy2) | |||
342 | GtkClipboard *clip; | 342 | GtkClipboard *clip; |
343 | 343 | ||
344 | path = NULL; | 344 | path = NULL; |
345 | if (FALSE == gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(uploadsList), | 345 | if (FALSE == gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (uploadsList), |
346 | last_x, | 346 | last_x, |
347 | last_y, | 347 | last_y, |
348 | &path, NULL, NULL, NULL)) | 348 | &path, NULL, NULL, NULL)) |
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index 19cea88a..e282bf1e 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -250,7 +250,7 @@ addEntryToSearchTree (SearchList * searchContext, | |||
250 | SEARCH_PIXBUF, pixbuf, SEARCH_URI, | 250 | SEARCH_PIXBUF, pixbuf, SEARCH_URI, |
251 | GNUNET_ECRS_uri_duplicate (info->uri), SEARCH_META, | 251 | GNUNET_ECRS_uri_duplicate (info->uri), SEARCH_META, |
252 | GNUNET_meta_data_duplicate (info->meta), | 252 | GNUNET_meta_data_duplicate (info->meta), |
253 | SEARCH_INTERNAL,searchContext, | 253 | SEARCH_INTERNAL, searchContext, |
254 | SEARCH_INTERNAL_PARENT, downloadParent, | 254 | SEARCH_INTERNAL_PARENT, downloadParent, |
255 | SEARCH_STATUS, getStatusName (state), | 255 | SEARCH_STATUS, getStatusName (state), |
256 | SEARCH_STATUS_LOGO, statusLogo, | 256 | SEARCH_STATUS_LOGO, statusLogo, |
@@ -760,7 +760,8 @@ fs_search_started (struct GNUNET_FSUI_SearchList * fsui_list, | |||
760 | -1, | 760 | -1, |
761 | _("Status"), | 761 | _("Status"), |
762 | renderer, | 762 | renderer, |
763 | "pixbuf", SEARCH_STATUS_LOGO, | 763 | "pixbuf", |
764 | SEARCH_STATUS_LOGO, | ||
764 | NULL); | 765 | NULL); |
765 | column = gtk_tree_view_get_column (list->treeview, col - 1); | 766 | column = gtk_tree_view_get_column (list->treeview, col - 1); |
766 | gtk_tree_view_column_set_resizable (column, TRUE); | 767 | gtk_tree_view_column_set_resizable (column, TRUE); |
@@ -1004,7 +1005,7 @@ fs_search_stopped (SearchList * list) | |||
1004 | GNUNET_GE_BREAK (ectx, index != -1); | 1005 | GNUNET_GE_BREAK (ectx, index != -1); |
1005 | gtk_notebook_remove_page (notebook, index); | 1006 | gtk_notebook_remove_page (notebook, index); |
1006 | if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->tree), &iter)) | 1007 | if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->tree), &iter)) |
1007 | freeIterSubtree (GTK_TREE_MODEL (list->tree), &iter); | 1008 | freeIterSubtree (GTK_TREE_MODEL (list->tree), &iter); |
1008 | /* free list state itself */ | 1009 | /* free list state itself */ |
1009 | UNREF (list->searchXML); | 1010 | UNREF (list->searchXML); |
1010 | UNREF (list->labelXML); | 1011 | UNREF (list->labelXML); |
diff --git a/src/plugins/fs/status.c b/src/plugins/fs/status.c index f8cf9370..a191794e 100644 --- a/src/plugins/fs/status.c +++ b/src/plugins/fs/status.c | |||
@@ -80,22 +80,25 @@ getStatusLogo (enum GNUNET_URITRACK_STATE state) | |||
80 | { | 80 | { |
81 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) | 81 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) |
82 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), | 82 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), |
83 | GTK_STOCK_ADD, 16, 0, (GError **)NULL); | 83 | GTK_STOCK_ADD, 16, 0, (GError **) NULL); |
84 | if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED)) | 84 | if (state & (GNUNET_URITRACK_INSERTED || GNUNET_URITRACK_INDEXED)) |
85 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), | 85 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), |
86 | GTK_STOCK_ADD, 16, 0, (GError **)NULL); | 86 | GTK_STOCK_ADD, 16, 0, (GError **) NULL); |
87 | if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) && | 87 | if ((state & GNUNET_URITRACK_DOWNLOAD_STARTED) && |
88 | (0 == (state & | 88 | (0 == (state & |
89 | (GNUNET_URITRACK_DOWNLOAD_COMPLETED | | 89 | (GNUNET_URITRACK_DOWNLOAD_COMPLETED | |
90 | GNUNET_URITRACK_DOWNLOAD_ABORTED)))) | 90 | GNUNET_URITRACK_DOWNLOAD_ABORTED)))) |
91 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), | 91 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), |
92 | GTK_STOCK_GO_DOWN, 16, 0, (GError **)NULL); | 92 | GTK_STOCK_GO_DOWN, 16, 0, |
93 | (GError **) NULL); | ||
93 | if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED) | 94 | if (state & GNUNET_URITRACK_DOWNLOAD_COMPLETED) |
94 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), | 95 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), |
95 | GTK_STOCK_APPLY, 16, 0, (GError **)NULL); | 96 | GTK_STOCK_APPLY, 16, 0, |
97 | (GError **) NULL); | ||
96 | if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED) | 98 | if (state & GNUNET_URITRACK_DOWNLOAD_ABORTED) |
97 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), | 99 | return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), |
98 | GTK_STOCK_CANCEL, 16, 0, (GError **)NULL); | 100 | GTK_STOCK_CANCEL, 16, 0, |
101 | (GError **) NULL); | ||
99 | return NULL; | 102 | return NULL; |
100 | } | 103 | } |
101 | 104 | ||
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index 861055ab..a9103db9 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -659,8 +659,7 @@ on_uploadFilenameComboBoxEntry_changed_fs (gpointer dummy2, | |||
659 | } | 659 | } |
660 | 660 | ||
661 | void | 661 | void |
662 | on_clearCompletedUploads_clicked_fs (void *unused, | 662 | on_clearCompletedUploads_clicked_fs (void *unused, GtkWidget * clearButton) |
663 | GtkWidget * clearButton) | ||
664 | { | 663 | { |
665 | GNUNET_GTK_tree_model_foreach (GTK_TREE_MODEL (upload_summary), | 664 | GNUNET_GTK_tree_model_foreach (GTK_TREE_MODEL (upload_summary), |
666 | &clearCompletedUploadCallback, NULL); | 665 | &clearCompletedUploadCallback, NULL); |
@@ -712,7 +711,7 @@ on_activeUploadsList_button_press_fs (GtkWidget * treeview, | |||
712 | GNUNET_GTK_connect_glade_with_plugins (contextMenuXML); | 711 | GNUNET_GTK_connect_glade_with_plugins (contextMenuXML); |
713 | menu = glade_xml_get_widget (contextMenuXML, "uploadsContextMenu"); | 712 | menu = glade_xml_get_widget (contextMenuXML, "uploadsContextMenu"); |
714 | if (event_button->button == 3) | 713 | if (event_button->button == 3) |
715 | gtk_menu_popup (GTK_MENU(menu), | 714 | gtk_menu_popup (GTK_MENU (menu), |
716 | NULL, NULL, NULL, NULL, | 715 | NULL, NULL, NULL, NULL, |
717 | event_button->button, event_button->time); | 716 | event_button->button, event_button->time); |
718 | return FALSE; | 717 | return FALSE; |