Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-10-20 09:17:42 +0300
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-11-04 17:07:13 +0300
commit68e713d61077eec562f9819e26788ef7b22d9e77 (patch)
treece0ac92c02587dff45c2fe2093cdd743b4942aee /plugins
parentbededc4647fa624a2127583a4403486d446ddf50 (diff)
x2go_plugin.c: Remove typedef of DialogData for better code-readability; Update docstrings.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/x2go/x2go_plugin.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c
index 531e27363..640a98faa 100644
--- a/plugins/x2go/x2go_plugin.c
+++ b/plugins/x2go/x2go_plugin.c
@@ -74,7 +74,7 @@
g_object_set_data_full(G_OBJECT(gp), "dialog-data", ddata, g_free);
#define GET_DIALOG_DATA(gp) \
- (DialogData*) g_object_get_data(G_OBJECT(gp), "dialog-data");
+ (struct _DialogData*) g_object_get_data(G_OBJECT(gp), "dialog-data");
#define REMMINA_PLUGIN_INFO(fmt, ...) \
rm_plugin_service->_remmina_info("[%s] " fmt, \
@@ -172,38 +172,31 @@ str2int_errno str2int(gint *out, gchar *s, gint base)
* which will be executed on the dialogs 'response' signal.
* The callback function is obliged to destroy the dialog widget.
*
- * The `DialogData` structure contains all info needed to open a
- * GTK dialog with rmplugin_x2go_open_dialog() \n
+ * The `DialogData` structure contains all info needed to open a GTK dialog with
+ * rmplugin_x2go_open_dialog()
*
* Quick example of a callback function: \n
- * static void rmplugin_x2go_test_callback(RemminaProtocolWidget *gp, gint response_id, \n
- * GtkDialog *self) { \n
+ * static gboolean rmplugin_x2go_test_callback(RemminaProtocolWidget *gp, gint response_id, \n
+ * GtkDialog *self) { \n
* REMMINA_PLUGIN_DEBUG("response: %i", response_id); \n
* if (response_id == GTK_RESPONSE_OK) { \n
* REMMINA_PLUGIN_DEBUG("OK!"); \n
* } \n
* gtk_widget_destroy(self); \n
+ * return G_SOURCE_REMOVE; \n
* }
*
*/
-struct _DialogData {
- /** see GtkWindow */
- GtkWindow* parent;
- /** see GtkDialogFlags */
- GtkDialogFlags flags;
- /** see GtkMessageType */
- GtkMessageType type;
- /** see GtkButtonsType */
- GtkButtonsType buttons;
- /** Title of the Dialog */
- gchar* title;
- /** Message of the Dialog */
- gchar* message;
- /** Calls this function if
- * the user pressed a button. */
- GCallback callbackfunc;
+struct _DialogData
+{
+ GtkWindow *parent;
+ GtkDialogFlags flags;
+ GtkMessageType type;
+ GtkButtonsType buttons;
+ gchar *title;
+ gchar *message;
+ GCallback callbackfunc;
};
-typedef struct _DialogData DialogData;
/**
* @param gp getting DialogData via dialog-data saved in gp.
@@ -216,7 +209,7 @@ static gboolean rmplugin_x2go_open_dialog(RemminaProtocolWidget *gp)
{
REMMINA_PLUGIN_DEBUG("Function entry.");
- DialogData *ddata = GET_DIALOG_DATA(gp);
+ struct _DialogData* ddata = GET_DIALOG_DATA(gp);
if (ddata) {
// Can't check type, flags or buttons
@@ -464,7 +457,7 @@ static void rmplugin_x2go_pyhoca_cli_exited(GPid pid,
REMMINA_PLUGIN_CRITICAL("%s", _("PyHoca-CLI exited unexpectedly. "
"This connection will now be closed."));
- DialogData *ddata = g_new0(DialogData, 1);
+ struct _DialogData *ddata = g_new0(struct _DialogData, 1);
SET_DIALOG_DATA(gp, ddata);
ddata->parent = NULL;
ddata->flags = GTK_DIALOG_MODAL;