[Openvas-commits] r2897 - in trunk/openvas-client: . nessus/prefs_dialog

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 25 11:52:03 CET 2009


Author: felix
Date: 2009-03-25 11:52:02 +0100 (Wed, 25 Mar 2009)
New Revision: 2897

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/prefs_dialog/listnotebook.c
Log:
Cosmetis in listnotebook modoule.

* nessus/listnotebook.c: K&R style replacement, minor reformatting.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-03-25 10:45:59 UTC (rev 2896)
+++ trunk/openvas-client/ChangeLog	2009-03-25 10:52:02 UTC (rev 2897)
@@ -1,5 +1,11 @@
 2009-03-25  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
+	Cosmetis in listnotebook modoule.
+
+	* nessus/listnotebook.c: K&R style replacement, minor reformatting.
+	
+2009-03-25  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
 	Fixed bug related to removal of severity_overrides from the list.
 
 	* src/gui/severityfiltermngr_dlg.c (severityfiltermanager_dialog): Fixed

Modified: trunk/openvas-client/nessus/prefs_dialog/listnotebook.c
===================================================================
--- trunk/openvas-client/nessus/prefs_dialog/listnotebook.c	2009-03-25 10:45:59 UTC (rev 2896)
+++ trunk/openvas-client/nessus/prefs_dialog/listnotebook.c	2009-03-25 10:52:02 UTC (rev 2897)
@@ -57,12 +57,9 @@
  * to the new selection in the tree view
  */
 static gboolean
-selection_func(selection, model, path, path_currently_selected, userdata)
-  GtkTreeSelection *selection;
-  GtkTreeModel *model;
-  GtkTreePath *path;
-  gboolean path_currently_selected;
-  gpointer userdata;
+selection_func (GtkTreeSelection *selection, GtkTreeModel *model,
+                GtkTreePath *path, gboolean path_currently_selected,
+                gpointer userdata)
 {
   if (!path_currently_selected) {
     GtkTreeIter iter;
@@ -82,11 +79,8 @@
  * @brief Change the selection of the list to match the notebook's current page
  */
 static void
-notebook_page_switched(notebook, page, page_num, user_data)
-  GtkNotebook *notebook;
-  GtkNotebookPage *page;
-  guint page_num;
-  gpointer user_data;
+notebook_page_switched (GtkNotebook *notebook, GtkNotebookPage *page,
+                        guint page_num, gpointer user_data)
 {
   GtkTreeView *list = GTK_TREE_VIEW(user_data);
   GtkTreeModel *model = gtk_tree_view_get_model(list);
@@ -204,8 +198,8 @@
   gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
   gtk_tree_selection_set_select_function(selection, selection_func, notebook,
       NULL);
-  g_signal_connect(G_OBJECT(notebook), "switch-page", notebook_page_switched,
-      list);
+  g_signal_connect (G_OBJECT(notebook), "switch-page", notebook_page_switched,
+                    list);
 
   /* Add the notebook, tree view and store as data to the box so that we
    * can easily access them later */
@@ -268,11 +262,8 @@
  * @param stock_id     Name of the icon to use or NULL.
  */
 void
-listnotebook_add_page(listnotebook, page, title, stock_id)
-  GtkWidget *listnotebook;
-  GtkWidget *page;
-  const char *title;
-  const char *stock_id;
+listnotebook_add_page (GtkWidget *listnotebook, GtkWidget *page,
+                       const char *title, const char *stock_id)
 {
   GtkWidget *notebook = g_object_get_data(G_OBJECT(listnotebook), "notebook");
   GtkListStore *store = g_object_get_data(G_OBJECT(listnotebook), "liststore");
@@ -281,15 +272,15 @@
   GdkPixbuf *icon = NULL;
 
   if (stock_id != NULL)
-    icon = gtk_widget_render_icon(notebook, stock_id,
-	GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
+    icon = gtk_widget_render_icon (notebook, stock_id,
+                                   GTK_ICON_SIZE_LARGE_TOOLBAR, NULL);
 
   gtk_widget_show(page);
   gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, NULL);
 
   gtk_list_store_append(store, &iter);
-  gtk_list_store_set(store, &iter, COL_ICON, icon,
-      COL_PAGENAME, title, COL_PAGENUM, pagenum, -1);
+  gtk_list_store_set (store, &iter, COL_ICON, icon,
+                      COL_PAGENAME, title, COL_PAGENUM, pagenum, -1);
   
   if (icon != NULL)
     g_object_unref(G_OBJECT(icon));
@@ -370,11 +361,9 @@
  *                 listed first).
  */
 void
-listnotebook_select_page(listnotebook, page_num)
-  GtkWidget*listnotebook;
-  int page_num;
+listnotebook_select_page (GtkWidget*listnotebook, int page_num)
 {
-  GtkTreeView *list =  g_object_get_data(G_OBJECT(listnotebook), "treeview");
+  GtkTreeView *list   = g_object_get_data(G_OBJECT(listnotebook), "treeview");
   GtkTreeModel *model = gtk_tree_view_get_model(list);
   GtkTreeIter iter;
 



More information about the Openvas-commits mailing list