[gnome-builder/wip/slaf/beautifier: 12/15] beautifier plugin: better naming of config file storage
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/slaf/beautifier: 12/15] beautifier plugin: better naming of config file storage
- Date: Mon, 5 Dec 2016 00:02:01 +0000 (UTC)
commit db91d7fe5ad6de0ee7057db5027c4a41a0ba7f24
Author: Sebastien Lafargue <slafargue gnome org>
Date: Sun Dec 4 20:29:34 2016 +0100
beautifier plugin: better naming of config file storage
plugins/beautifier/gb-beautifier-config.c | 12 ++++++------
plugins/beautifier/gb-beautifier-config.h | 2 +-
plugins/beautifier/gb-beautifier-process.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/beautifier/gb-beautifier-config.c b/plugins/beautifier/gb-beautifier-config.c
index 760b5d4..dc54eba 100644
--- a/plugins/beautifier/gb-beautifier-config.c
+++ b/plugins/beautifier/gb-beautifier-config.c
@@ -29,7 +29,7 @@ config_entry_clear_func (gpointer data)
g_assert (entry != NULL);
- g_object_unref (entry->file);
+ g_object_unref (entry->config_file);
g_free (entry->name);
g_free (entry->lang_id);
@@ -65,7 +65,7 @@ gb_beautifier_config_check_duplicates (GbBeautifierWorkbenchAddin *self,
GbBeautifierConfigEntry *entry = &g_array_index (entries, GbBeautifierConfigEntry, i);
/* Check for a NULL element at the array end */
- if (entry->file == NULL)
+ if (entry->config_file == NULL)
break;
if (0 == g_strcmp0 (entry->lang_id, lang_id) &&
@@ -138,7 +138,7 @@ add_entries_from_config_ini_file (GbBeautifierWorkbenchAddin *self,
g_autofree gchar *display_name = NULL;
g_autofree gchar *command = NULL;
g_autofree gchar *command_pattern = NULL;
- g_autoptr(GFile) file = NULL;
+ g_autoptr(GFile) config_file = NULL;
g_autofree gchar *config_path = NULL;
g_auto(GStrv) strv = NULL;
gint argc;
@@ -199,11 +199,11 @@ add_entries_from_config_ini_file (GbBeautifierWorkbenchAddin *self,
}
config_path = g_build_filename (base_path, real_lang_id, profile, NULL);
- file = g_file_new_for_path (config_path);
- if (g_file_query_exists (file, NULL))
+ config_file = g_file_new_for_path (config_path);
+ if (g_file_query_exists (config_file, NULL))
{
entry.name = g_steal_pointer (&display_name);
- entry.file = g_steal_pointer (&file);
+ entry.config_file = g_steal_pointer (&config_file);
entry.lang_id = g_strdup (lang_id);
if (0 == g_strcmp0 (default_profile, profile))
diff --git a/plugins/beautifier/gb-beautifier-config.h b/plugins/beautifier/gb-beautifier-config.h
index f0f284a..4d01c67 100644
--- a/plugins/beautifier/gb-beautifier-config.h
+++ b/plugins/beautifier/gb-beautifier-config.h
@@ -34,7 +34,7 @@ typedef enum
typedef struct
{
gchar *lang_id;
- GFile *file;
+ GFile *config_file;
gchar *name;
GbBeautifierConfigCommand command;
GPtrArray *command_args;
diff --git a/plugins/beautifier/gb-beautifier-process.c b/plugins/beautifier/gb-beautifier-process.c
index 697efc6..0771059 100644
--- a/plugins/beautifier/gb-beautifier-process.c
+++ b/plugins/beautifier/gb-beautifier-process.c
@@ -403,7 +403,7 @@ gb_beautifier_process_launch_async (GbBeautifierWorkbenchAddin *self,
state->begin_mark = gtk_text_buffer_create_mark (buffer, NULL, begin, TRUE);
state->end_mark = gtk_text_buffer_create_mark (buffer, NULL, end, FALSE);
state->command = entry->command;
- state->config_file = g_file_dup (entry->file);
+ state->config_file = g_file_dup (entry->config_file);
state->lang_id = g_strdup (lang_id);
if (entry->command_args != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]