gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29918 - gnunet-gtk/src/lib


From: gnunet
Subject: [GNUnet-SVN] r29918 - gnunet-gtk/src/lib
Date: Mon, 7 Oct 2013 11:38:36 +0200

Author: grothoff
Date: 2013-10-07 11:38:36 +0200 (Mon, 07 Oct 2013)
New Revision: 29918

Modified:
   gnunet-gtk/src/lib/about.c
Log:
-add comments for about.c

Modified: gnunet-gtk/src/lib/about.c
===================================================================
--- gnunet-gtk/src/lib/about.c  2013-10-07 09:28:41 UTC (rev 29917)
+++ gnunet-gtk/src/lib/about.c  2013-10-07 09:38:36 UTC (rev 29918)
@@ -26,15 +26,43 @@
  */
 #include "gnunet_gtk.h"
 
+/**
+ * Context for an about dialog.
+ */
 struct AboutDialogContext
 {
+  /**
+   * Gtk builder for access to the widgets.
+   */
   GtkBuilder *builder;
+
+  /**
+   * The main window of the dialog.
+   */
   GtkWidget *ad;
+
+  /**
+   * Credits notebook.
+   */
   GtkWidget *about_credits_notebook;
+
+  /**
+   * License notebook.
+   */
   GtkWidget *about_license_scroller;
+
+  /**
+   * Buffer with the license text.
+   */
   GtkTextBuffer *license_contents;
 };
 
+
+/**
+ * Destroy all resources associated with the about dialog.
+ *
+ * @param ctx the dialog's context
+ */
 static void
 destroy_about_dialog (struct AboutDialogContext *ctx)
 {
@@ -44,10 +72,18 @@
 }
 
 
+/**
+ * Helper function that makes one and only one of the
+ * three areas of the dialog visible.
+ *
+ * @param ctx the dialog context
+ * @param name name of the area to make visible, NULL for default
+ */
 static void
-about_window_show_exclusively (struct AboutDialogContext *ctx, gchar * name)
+about_window_show_exclusively (struct AboutDialogContext *ctx,
+                               const gchar * name)
 {
-  if (name == NULL)
+  if (NULL == name)
   {
     gtk_widget_hide (ctx->about_credits_notebook);
     gtk_widget_hide (ctx->about_license_scroller);
@@ -65,8 +101,16 @@
 }
 
 
+/**
+ * The about window has been realized; load the license file
+ * from our resource directory.
+ *
+ * @param widget unused
+ * @param ctx the dialog context
+ */
 G_MODULE_EXPORT void
-GNUNET_GTK_about_window_realized (GtkWidget * widget, struct 
AboutDialogContext *ctx)
+GNUNET_GTK_about_window_realized (GtkWidget * widget,
+                                  struct AboutDialogContext *ctx)
 {
   gchar *license = NULL;
   const char *path;
@@ -87,15 +131,30 @@
 }
 
 
+/**
+ * The user clicked the "close" button, close the dialog.
+ *
+ * @param widget the button that was clicked
+ * @param ctx our dialog context
+ */
 G_MODULE_EXPORT void
-GNUNET_GTK_about_close_button_clicked (GtkButton * widget, struct 
AboutDialogContext *ctx)
+GNUNET_GTK_about_close_button_clicked (GtkButton * widget,
+                                       struct AboutDialogContext *ctx)
 {
   destroy_about_dialog (ctx);
 }
 
 
+/**
+ * The user pushed the "delete" button, close the dialog.
+ *
+ * @param widget the widget that received the button
+ * @param event the button event
+ * @param ctx our dialog context
+ */
 G_MODULE_EXPORT gboolean
-GNUNET_GTK_about_window_got_delete_event (GtkWidget * widget, GdkEvent * event,
+GNUNET_GTK_about_window_got_delete_event (GtkWidget * widget,
+                                          GdkEvent * event,
                                           struct AboutDialogContext *ctx)
 {
   destroy_about_dialog (ctx);
@@ -103,14 +162,29 @@
 }
 
 
+/**
+ * The user clicked the "credits" button, display the credits.
+ *
+ * @param widget the button that was clicked
+ * @param ctx our dialog context
+ */
 G_MODULE_EXPORT void
-GNUNET_GTK_about_credits_button_clicked (GtkButton * widget, struct 
AboutDialogContext *ctx)
+GNUNET_GTK_about_credits_button_clicked (GtkButton * widget,
+                                         struct AboutDialogContext *ctx)
 {
   about_window_show_exclusively (ctx, "about_credits_notebook");
 }
 
+
+/**
+ * The user clicked the "license" button, display the license.
+ *
+ * @param widget the button that was clicked
+ * @param ctx our dialog context
+ */
 G_MODULE_EXPORT void
-GNUNET_GTK_about_license_button_clicked (GtkButton * widget, struct 
AboutDialogContext *ctx)
+GNUNET_GTK_about_license_button_clicked (GtkButton * widget,
+                                         struct AboutDialogContext *ctx)
 {
   about_window_show_exclusively (ctx, "about_license_scroller");
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]