Corrected various warnings
This commit is contained in:
parent
cd6e54735d
commit
86c141db7f
@ -20,7 +20,6 @@ static void quit_cb(GSimpleAction *action, GVariant *parameter, gpointer user_da
|
|||||||
static void settings_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
static void settings_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct mainWindow *mainWindow = *((struct mainWindow **) user_data);
|
struct mainWindow *mainWindow = *((struct mainWindow **) user_data);
|
||||||
struct mainWindow *a = user_data;
|
|
||||||
|
|
||||||
mainWindow_settings_show(mainWindow);
|
mainWindow_settings_show(mainWindow);
|
||||||
}
|
}
|
||||||
@ -91,4 +90,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
status = g_application_run(G_APPLICATION(app), argc, argv);
|
status = g_application_run(G_APPLICATION(app), argc, argv);
|
||||||
g_object_unref(app);
|
g_object_unref(app);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,6 @@ void mainWindow_add_recent_workspace(struct mainWindow *mainWindow, gchar *path,
|
|||||||
GRegex *regex;
|
GRegex *regex;
|
||||||
GMatchInfo *match_info;
|
GMatchInfo *match_info;
|
||||||
gchar *temp;
|
gchar *temp;
|
||||||
gboolean del_iter = FALSE;
|
|
||||||
|
|
||||||
regex = g_regex_new("(.*)\\/(.*)", G_REGEX_RAW, 0, NULL);
|
regex = g_regex_new("(.*)\\/(.*)", G_REGEX_RAW, 0, NULL);
|
||||||
if (g_regex_match(regex, path, 0, &match_info) &&
|
if (g_regex_match(regex, path, 0, &match_info) &&
|
||||||
@ -201,7 +200,6 @@ void mainWindow_add_recent_workspace(struct mainWindow *mainWindow, gchar *path,
|
|||||||
static void mainWindow_configure_workspaceTreeView(struct mainWindow *mainWindow)
|
static void mainWindow_configure_workspaceTreeView(struct mainWindow *mainWindow)
|
||||||
{
|
{
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
GtkTreeViewColumn *col;
|
|
||||||
|
|
||||||
mainWindow->workspaceListStore = gtk_list_store_new(WSCOL_COUNT,
|
mainWindow->workspaceListStore = gtk_list_store_new(WSCOL_COUNT,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
@ -288,11 +286,9 @@ static void mainWindow_configure_treeView(struct mainWindow *mainWindow)
|
|||||||
|
|
||||||
static void mainWindow_configure_entry_completion(struct mainWindow *mainWindow)
|
static void mainWindow_configure_entry_completion(struct mainWindow *mainWindow)
|
||||||
{
|
{
|
||||||
GtkCellRenderer *renderer;
|
|
||||||
GtkTreeSortable *sortable;
|
GtkTreeSortable *sortable;
|
||||||
GtkTreeModelSort *sorted;
|
GtkTreeModelSort *sorted;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
|
||||||
|
|
||||||
mainWindow->completionListStore = gtk_list_store_new(1, G_TYPE_STRING);
|
mainWindow->completionListStore = gtk_list_store_new(1, G_TYPE_STRING);
|
||||||
sorted = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model(
|
sorted = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model(
|
||||||
@ -303,8 +299,6 @@ static void mainWindow_configure_entry_completion(struct mainWindow *mainWindow)
|
|||||||
|
|
||||||
sortable = GTK_TREE_SORTABLE(sorted);
|
sortable = GTK_TREE_SORTABLE(sorted);
|
||||||
|
|
||||||
renderer = gtk_cell_renderer_text_new();
|
|
||||||
|
|
||||||
gtk_entry_completion_set_model(mainWindow->searchEntryCompletion, model);
|
gtk_entry_completion_set_model(mainWindow->searchEntryCompletion, model);
|
||||||
gtk_entry_completion_set_text_column(mainWindow->searchEntryCompletion, 0);
|
gtk_entry_completion_set_text_column(mainWindow->searchEntryCompletion, 0);
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ static void mdiary_add_file_to_store(struct mdiary_scanner *mdiary_scanner,
|
|||||||
file = g_file_new_for_path(filename);
|
file = g_file_new_for_path(filename);
|
||||||
stream = g_file_read(file, NULL, &err);
|
stream = g_file_read(file, NULL, &err);
|
||||||
if (err != NULL) {
|
if (err != NULL) {
|
||||||
g_print("PARSER: %s\n", filename, err->message);
|
g_print("PARSER: %s: %s\n", filename, err->message);
|
||||||
g_error_free(err);
|
g_error_free(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ struct mdiary_scanner *mdiary_scanner_new(gboolean gpg_enabled)
|
|||||||
return mdiary_scanner;
|
return mdiary_scanner;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *mdiary_scanner_free(struct mdiary_scanner *mdiary_scanner)
|
void mdiary_scanner_free(struct mdiary_scanner *mdiary_scanner)
|
||||||
{
|
{
|
||||||
free(mdiary_scanner);
|
free(mdiary_scanner);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ struct mdiary_scanner {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct mdiary_scanner *mdiary_scanner_new(gboolean gpg_enabled);
|
struct mdiary_scanner *mdiary_scanner_new(gboolean gpg_enabled);
|
||||||
void *mdiary_scanner_free(struct mdiary_scanner *mdiary_scanner);
|
void mdiary_scanner_free(struct mdiary_scanner *mdiary_scanner);
|
||||||
gint mdiary_scan_to_store(struct mdiary_scanner *mdiary_scanner,
|
gint mdiary_scan_to_store(struct mdiary_scanner *mdiary_scanner,
|
||||||
gchar *base_dir,
|
gchar *base_dir,
|
||||||
GtkListStore *entryListStore, GtkListStore *autoCompletion);
|
GtkListStore *entryListStore, GtkListStore *autoCompletion);
|
||||||
|
@ -56,6 +56,8 @@ gboolean mdiary_load_settings(gchar *filename, struct mdiary_settings *settings)
|
|||||||
mainWindow_switch_workspace(settings->mainWindow, temp, FALSE);
|
mainWindow_switch_workspace(settings->mainWindow, temp, FALSE);
|
||||||
g_free(temp);
|
g_free(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean mdiary_save_settings(gchar *filename, struct mdiary_settings *settings)
|
gboolean mdiary_save_settings(gchar *filename, struct mdiary_settings *settings)
|
||||||
@ -96,6 +98,8 @@ gboolean mdiary_save_settings(gchar *filename, struct mdiary_settings *settings)
|
|||||||
g_output_stream_close(G_OUTPUT_STREAM(stream), NULL, NULL);
|
g_output_stream_close(G_OUTPUT_STREAM(stream), NULL, NULL);
|
||||||
g_object_unref(stream);
|
g_object_unref(stream);
|
||||||
g_object_unref(file);
|
g_object_unref(file);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mdiary_settings *mdiary_settings_new(struct mainWindow *mainWindow)
|
struct mdiary_settings *mdiary_settings_new(struct mainWindow *mainWindow)
|
||||||
|
Loading…
Reference in New Issue
Block a user