diff options
author | Laurent Napias <[email protected]> | 2019-06-29 11:57:35 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-07-04 15:07:12 +0200 |
commit | 61b94ba9a4953aba56764dac7e0f8751aaa11571 (patch) | |
tree | c9097e01f74035b305fd47190a7f0d1bb1eb188e /mate-dictionary/libgdict | |
parent | 34505eb50fb6f3b49c8ef08d59bcef4f6f27f6cf (diff) | |
download | mate-utils-61b94ba9a4953aba56764dac7e0f8751aaa11571.tar.bz2 mate-utils-61b94ba9a4953aba56764dac7e0f8751aaa11571.tar.xz |
Remove trailing whitespaces
Diffstat (limited to 'mate-dictionary/libgdict')
-rw-r--r-- | mate-dictionary/libgdict/gdict-context-private.h | 10 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-database-chooser.c | 44 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-database-chooser.h | 2 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-source-chooser.c | 8 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-strategy-chooser.c | 42 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-strategy-chooser.h | 4 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-utils.c | 24 | ||||
-rw-r--r-- | mate-dictionary/libgdict/gdict-utils.h | 2 |
8 files changed, 68 insertions, 68 deletions
diff --git a/mate-dictionary/libgdict/gdict-context-private.h b/mate-dictionary/libgdict/gdict-context-private.h index 30b52c72..023fe273 100644 --- a/mate-dictionary/libgdict/gdict-context-private.h +++ b/mate-dictionary/libgdict/gdict-context-private.h @@ -62,7 +62,7 @@ struct _GdictDatabase { gchar *name; gchar *full_name; - + guint ref_count; }; @@ -70,7 +70,7 @@ struct _GdictStrategy { gchar *name; gchar *description; - + guint ref_count; }; @@ -78,19 +78,19 @@ struct _GdictMatch { gchar *database; gchar *word; - + guint ref_count; }; struct _GdictDefinition { gint total; - + gchar *word; gchar *database_name; gchar *database_full; gchar *definition; - + guint ref_count; }; diff --git a/mate-dictionary/libgdict/gdict-database-chooser.c b/mate-dictionary/libgdict/gdict-database-chooser.c index 8ccc8201..1c9b3740 100644 --- a/mate-dictionary/libgdict/gdict-database-chooser.c +++ b/mate-dictionary/libgdict/gdict-database-chooser.c @@ -59,7 +59,7 @@ struct _GdictDatabaseChooserPrivate GtkWidget *clear_button; GtkWidget *refresh_button; GtkWidget *buttons_box; - + GdictContext *context; gint results; @@ -94,7 +94,7 @@ enum enum { PROP_0, - + PROP_CONTEXT, PROP_COUNT }; @@ -119,25 +119,25 @@ set_gdict_context (GdictDatabaseChooser *chooser, GdictContext *context) { GdictDatabaseChooserPrivate *priv; - + g_assert (GDICT_IS_DATABASE_CHOOSER (chooser)); priv = chooser->priv; - + if (priv->context) { if (priv->start_id) { GDICT_NOTE (CHOOSER, "Removing old context handlers"); - + g_signal_handler_disconnect (priv->context, priv->start_id); g_signal_handler_disconnect (priv->context, priv->match_id); g_signal_handler_disconnect (priv->context, priv->end_id); - + priv->start_id = 0; priv->end_id = 0; priv->match_id = 0; } - + if (priv->error_id) { g_signal_handler_disconnect (priv->context, priv->error_id); @@ -146,7 +146,7 @@ set_gdict_context (GdictDatabaseChooser *chooser, } GDICT_NOTE (CHOOSER, "Removing old context"); - + g_object_unref (G_OBJECT (priv->context)); priv->context = NULL; @@ -164,7 +164,7 @@ set_gdict_context (GdictDatabaseChooser *chooser, } GDICT_NOTE (CHOOSER, "Setting new context"); - + priv->context = g_object_ref (context); priv->results = 0; } @@ -176,7 +176,7 @@ gdict_database_chooser_finalize (GObject *gobject) GdictDatabaseChooserPrivate *priv = chooser->priv; g_free (priv->current_db); - + G_OBJECT_CLASS (gdict_database_chooser_parent_class)->finalize (gobject); } @@ -210,7 +210,7 @@ gdict_database_chooser_set_property (GObject *gobject, GParamSpec *pspec) { GdictDatabaseChooser *chooser = GDICT_DATABASE_CHOOSER (gobject); - + switch (prop_id) { case PROP_CONTEXT: @@ -229,7 +229,7 @@ gdict_database_chooser_get_property (GObject *gobject, GParamSpec *pspec) { GdictDatabaseChooser *chooser = GDICT_DATABASE_CHOOSER (gobject); - + switch (prop_id) { case PROP_CONTEXT: @@ -400,7 +400,7 @@ static void gdict_database_chooser_class_init (GdictDatabaseChooserClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - + gobject_class->finalize = gdict_database_chooser_finalize; gobject_class->dispose = gdict_database_chooser_dispose; gobject_class->set_property = gdict_database_chooser_set_property; @@ -535,7 +535,7 @@ GtkWidget * gdict_database_chooser_new_with_context (GdictContext *context) { g_return_val_if_fail (GDICT_IS_CONTEXT (context), NULL); - + return g_object_new (GDICT_TYPE_DATABASE_CHOOSER, "context", context, NULL); @@ -555,7 +555,7 @@ GdictContext * gdict_database_chooser_get_context (GdictDatabaseChooser *chooser) { g_return_val_if_fail (GDICT_IS_DATABASE_CHOOSER (chooser), NULL); - + return chooser->priv->context; } @@ -668,14 +668,14 @@ gdict_database_chooser_has_database (GdictDatabaseChooser *chooser, gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &iter, DB_COLUMN_NAME, &db_name, -1); - + if (strcmp (db_name, database) == 0) { g_free (db_name); retval = TRUE; break; } - + g_free (db_name); } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->store), &iter)); @@ -754,7 +754,7 @@ database_found_cb (GdictContext *context, GDICT_NOTE (CHOOSER, "DATABASE: `%s' (`%s')", name, full_name); - + gtk_list_store_append (priv->store, &iter); gtk_list_store_set (priv->store, &iter, DB_COLUMN_TYPE, DATABASE_NAME, @@ -793,7 +793,7 @@ gdict_database_chooser_refresh (GdictDatabaseChooser *chooser) { GdictDatabaseChooserPrivate *priv; GError *db_error; - + g_return_if_fail (GDICT_IS_DATABASE_CHOOSER (chooser)); priv = chooser->priv; @@ -879,7 +879,7 @@ typedef struct { gchar *db_name; GdictDatabaseChooser *chooser; - + guint found : 1; guint do_select : 1; guint do_activate : 1; @@ -1090,7 +1090,7 @@ gdict_database_chooser_get_current_database (GdictDatabaseChooser *chooser) gchar *retval = NULL; g_return_val_if_fail (GDICT_IS_DATABASE_CHOOSER (chooser), NULL); - + priv = chooser->priv; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); @@ -1098,7 +1098,7 @@ gdict_database_chooser_get_current_database (GdictDatabaseChooser *chooser) return NULL; gtk_tree_model_get (model, &iter, DB_COLUMN_NAME, &retval, -1); - + g_free (priv->current_db); priv->current_db = g_strdup (retval); diff --git a/mate-dictionary/libgdict/gdict-database-chooser.h b/mate-dictionary/libgdict/gdict-database-chooser.h index c1d7316f..d5139942 100644 --- a/mate-dictionary/libgdict/gdict-database-chooser.h +++ b/mate-dictionary/libgdict/gdict-database-chooser.h @@ -45,7 +45,7 @@ struct _GdictDatabaseChooser { /*< private >*/ GtkBox parent_instance; - + GdictDatabaseChooserPrivate *priv; }; diff --git a/mate-dictionary/libgdict/gdict-source-chooser.c b/mate-dictionary/libgdict/gdict-source-chooser.c index 1579cc19..dd4f1f59 100644 --- a/mate-dictionary/libgdict/gdict-source-chooser.c +++ b/mate-dictionary/libgdict/gdict-source-chooser.c @@ -465,7 +465,7 @@ gdict_source_chooser_set_loader (GdictSourceChooser *chooser, /** * gdict_source_chooser_get_loader: * @chooser: a #GdictSourceChooser - * + * * Retrieves the #GdictSourceLoader used by @chooser. * * Return value: a #GdictSourceLoader or %NULL is none is set @@ -484,7 +484,7 @@ typedef struct { gchar *source_name; GdictSourceChooser *chooser; - + guint found : 1; guint do_select : 1; guint do_activate : 1; @@ -706,7 +706,7 @@ gdict_source_chooser_get_current_source (GdictSourceChooser *chooser) gchar *retval = NULL; g_return_val_if_fail (GDICT_IS_SOURCE_CHOOSER (chooser), NULL); - + priv = chooser->priv; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); @@ -714,7 +714,7 @@ gdict_source_chooser_get_current_source (GdictSourceChooser *chooser) return NULL; gtk_tree_model_get (model, &iter, SOURCE_NAME, &retval, -1); - + g_free (priv->current_source); priv->current_source = g_strdup (retval); diff --git a/mate-dictionary/libgdict/gdict-strategy-chooser.c b/mate-dictionary/libgdict/gdict-strategy-chooser.c index a3a28112..56d1de4c 100644 --- a/mate-dictionary/libgdict/gdict-strategy-chooser.c +++ b/mate-dictionary/libgdict/gdict-strategy-chooser.c @@ -53,7 +53,7 @@ struct _GdictStrategyChooserPrivate GtkWidget *clear_button; GtkWidget *refresh_button; GtkWidget *buttons_box; - + GdictContext *context; gint results; @@ -88,7 +88,7 @@ enum enum { PROP_0, - + PROP_CONTEXT, PROP_COUNT }; @@ -112,25 +112,25 @@ set_gdict_context (GdictStrategyChooser *chooser, GdictContext *context) { GdictStrategyChooserPrivate *priv; - + g_assert (GDICT_IS_STRATEGY_CHOOSER (chooser)); priv = chooser->priv; - + if (priv->context) { if (priv->start_id) { GDICT_NOTE (CHOOSER, "Removing old context handlers"); - + g_signal_handler_disconnect (priv->context, priv->start_id); g_signal_handler_disconnect (priv->context, priv->match_id); g_signal_handler_disconnect (priv->context, priv->end_id); - + priv->start_id = 0; priv->end_id = 0; priv->match_id = 0; } - + if (priv->error_id) { g_signal_handler_disconnect (priv->context, priv->error_id); @@ -139,9 +139,9 @@ set_gdict_context (GdictStrategyChooser *chooser, } GDICT_NOTE (CHOOSER, "Removing old context"); - + g_object_unref (G_OBJECT (priv->context)); - + priv->context = NULL; priv->results = -1; } @@ -157,7 +157,7 @@ set_gdict_context (GdictStrategyChooser *chooser, } GDICT_NOTE (CHOOSER, "Setting new context"); - + priv->context = g_object_ref (context); priv->results = 0; } @@ -203,7 +203,7 @@ gdict_strategy_chooser_set_property (GObject *gobject, GParamSpec *pspec) { GdictStrategyChooser *chooser = GDICT_STRATEGY_CHOOSER (gobject); - + switch (prop_id) { case PROP_CONTEXT: @@ -222,7 +222,7 @@ gdict_strategy_chooser_get_property (GObject *gobject, GParamSpec *pspec) { GdictStrategyChooser *chooser = GDICT_STRATEGY_CHOOSER (gobject); - + switch (prop_id) { case PROP_CONTEXT: @@ -379,13 +379,13 @@ static void gdict_strategy_chooser_class_init (GdictStrategyChooserClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - + gobject_class->finalize = gdict_strategy_chooser_finalize; gobject_class->dispose = gdict_strategy_chooser_dispose; gobject_class->set_property = gdict_strategy_chooser_set_property; gobject_class->get_property = gdict_strategy_chooser_get_property; gobject_class->constructor = gdict_strategy_chooser_constructor; - + /** * GdictStrategyChooser:context: * @@ -477,7 +477,7 @@ GtkWidget * gdict_strategy_chooser_new_with_context (GdictContext *context) { g_return_val_if_fail (GDICT_IS_CONTEXT (context), NULL); - + return g_object_new (GDICT_TYPE_STRATEGY_CHOOSER, "context", context, NULL); @@ -497,7 +497,7 @@ GdictContext * gdict_strategy_chooser_get_context (GdictStrategyChooser *chooser) { g_return_val_if_fail (GDICT_IS_STRATEGY_CHOOSER (chooser), NULL); - + return chooser->priv->context; } @@ -611,7 +611,7 @@ gdict_strategy_chooser_has_strategy (GdictStrategyChooser *chooser, gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &iter, STRAT_COLUMN_NAME, &strat_name, -1); - + if (strcmp (strat_name, strategy) == 0) { retval = TRUE; @@ -735,7 +735,7 @@ gdict_strategy_chooser_refresh (GdictStrategyChooser *chooser) { GdictStrategyChooserPrivate *priv; GError *db_error; - + g_return_if_fail (GDICT_IS_STRATEGY_CHOOSER (chooser)); priv = chooser->priv; @@ -821,7 +821,7 @@ typedef struct { gchar *strat_name; GdictStrategyChooser *chooser; - + guint found : 1; guint do_select : 1; guint do_activate : 1; @@ -1035,7 +1035,7 @@ gdict_strategy_chooser_get_current_strategy (GdictStrategyChooser *chooser) gchar *retval = NULL; g_return_val_if_fail (GDICT_IS_STRATEGY_CHOOSER (chooser), NULL); - + priv = chooser->priv; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview)); @@ -1043,7 +1043,7 @@ gdict_strategy_chooser_get_current_strategy (GdictStrategyChooser *chooser) return NULL; gtk_tree_model_get (model, &iter, STRAT_COLUMN_NAME, &retval, -1); - + g_free (priv->current_strat); priv->current_strat = g_strdup (retval); diff --git a/mate-dictionary/libgdict/gdict-strategy-chooser.h b/mate-dictionary/libgdict/gdict-strategy-chooser.h index 522a9b44..a491227d 100644 --- a/mate-dictionary/libgdict/gdict-strategy-chooser.h +++ b/mate-dictionary/libgdict/gdict-strategy-chooser.h @@ -44,7 +44,7 @@ typedef struct _GdictStrategyChooserClass GdictStrategyChooserClass; struct _GdictStrategyChooser { GtkBox parent_instance; - + GdictStrategyChooserPrivate *priv; }; @@ -55,7 +55,7 @@ struct _GdictStrategyChooserClass void (*strategy_activated) (GdictStrategyChooser *chooser, const gchar *name, const gchar *description); - + void (*_gdict_padding1) (void); void (*_gdict_padding2) (void); void (*_gdict_padding3) (void); diff --git a/mate-dictionary/libgdict/gdict-utils.c b/mate-dictionary/libgdict/gdict-utils.c index c6f70781..2a463f74 100644 --- a/mate-dictionary/libgdict/gdict-utils.c +++ b/mate-dictionary/libgdict/gdict-utils.c @@ -158,7 +158,7 @@ gdict_get_option_group (void) _("Show GDict Options"), NULL, NULL); - + g_option_group_set_parse_hooks (group, pre_parse_hook, post_parse_hook); g_option_group_add_entries (group, gdict_args); g_option_group_set_translation_domain (group, GETTEXT_PACKAGE); @@ -188,7 +188,7 @@ gdict_debug_init (gint *argc, option_context = g_option_context_new (NULL); g_option_context_set_ignore_unknown_options (option_context, TRUE); - g_option_context_set_help_enabled (option_context, FALSE); + g_option_context_set_help_enabled (option_context, FALSE); gdict_group = gdict_get_option_group (); g_option_context_set_main_group (option_context, gdict_group); @@ -237,7 +237,7 @@ _gdict_has_ipv6 (void) if (s != -1) { close(s); - + return TRUE; } #endif @@ -252,23 +252,23 @@ show_error_dialog (GtkWindow *parent, const gchar *detail) { GtkWidget *dialog; - + dialog = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", message); gtk_window_set_title (GTK_WINDOW (dialog), ""); - + if (detail) gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", detail); - + if (parent && gtk_window_get_group (parent)) gtk_window_group_add_window (gtk_window_get_group (parent), GTK_WINDOW (dialog)); - + gtk_dialog_run (GTK_DIALOG (dialog)); - + gtk_widget_destroy (dialog); } @@ -277,7 +277,7 @@ static GtkWindow * get_toplevel_window (GtkWidget *widget) { GtkWidget *toplevel; - + toplevel = gtk_widget_get_toplevel (widget); if (!gtk_widget_is_toplevel (toplevel)) return NULL; @@ -302,7 +302,7 @@ _gdict_show_error_dialog (GtkWidget *widget, { g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (title != NULL); - + show_error_dialog (get_toplevel_window (widget), title, detail); } @@ -326,8 +326,8 @@ _gdict_show_gerror_dialog (GtkWidget *widget, g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (title != NULL); g_return_if_fail (error != NULL); - + show_error_dialog (get_toplevel_window (widget), title, error->message); - + g_error_free (error); } diff --git a/mate-dictionary/libgdict/gdict-utils.h b/mate-dictionary/libgdict/gdict-utils.h index c7076e4d..c1ff6ab1 100644 --- a/mate-dictionary/libgdict/gdict-utils.h +++ b/mate-dictionary/libgdict/gdict-utils.h @@ -40,7 +40,7 @@ typedef enum { /* Status codes as defined by RFC 2229 */ typedef enum { GDICT_STATUS_INVALID = 0, - + GDICT_STATUS_N_DATABASES_PRESENT = 110, GDICT_STATUS_N_STRATEGIES_PRESENT = 111, GDICT_STATUS_DATABASE_INFO = 112, |