Compare commits
No commits in common. "86c141db7f6b2cd309f5251bb078fa1ee4f1820c" and "c6331711bd2ec49aeba09927eba9cadc2ab58de5" have entirely different histories.
86c141db7f
...
c6331711bd
@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(mdiary)
|
||||
#set(CMAKE_BUILD_TYPE Release)
|
||||
set(CMAKE_C_FLAGS "-Wall")
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
|
||||
|
@ -20,6 +20,7 @@ static void quit_cb(GSimpleAction *action, GVariant *parameter, gpointer user_da
|
||||
static void settings_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
|
||||
{
|
||||
struct mainWindow *mainWindow = *((struct mainWindow **) user_data);
|
||||
struct mainWindow *a = user_data;
|
||||
|
||||
mainWindow_settings_show(mainWindow);
|
||||
}
|
||||
@ -90,6 +91,4 @@ int main(int argc, char *argv[])
|
||||
|
||||
status = g_application_run(G_APPLICATION(app), argc, argv);
|
||||
g_object_unref(app);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ void mainWindow_add_recent_workspace(struct mainWindow *mainWindow, gchar *path,
|
||||
GRegex *regex;
|
||||
GMatchInfo *match_info;
|
||||
gchar *temp;
|
||||
gboolean del_iter = FALSE;
|
||||
|
||||
regex = g_regex_new("(.*)\\/(.*)", G_REGEX_RAW, 0, NULL);
|
||||
if (g_regex_match(regex, path, 0, &match_info) &&
|
||||
@ -200,6 +201,7 @@ void mainWindow_add_recent_workspace(struct mainWindow *mainWindow, gchar *path,
|
||||
static void mainWindow_configure_workspaceTreeView(struct mainWindow *mainWindow)
|
||||
{
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *col;
|
||||
|
||||
mainWindow->workspaceListStore = gtk_list_store_new(WSCOL_COUNT,
|
||||
G_TYPE_STRING,
|
||||
@ -286,9 +288,11 @@ static void mainWindow_configure_treeView(struct mainWindow *mainWindow)
|
||||
|
||||
static void mainWindow_configure_entry_completion(struct mainWindow *mainWindow)
|
||||
{
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeSortable *sortable;
|
||||
GtkTreeModelSort *sorted;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
mainWindow->completionListStore = gtk_list_store_new(1, G_TYPE_STRING);
|
||||
sorted = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model(
|
||||
@ -299,6 +303,8 @@ static void mainWindow_configure_entry_completion(struct mainWindow *mainWindow)
|
||||
|
||||
sortable = GTK_TREE_SORTABLE(sorted);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new();
|
||||
|
||||
gtk_entry_completion_set_model(mainWindow->searchEntryCompletion, model);
|
||||
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);
|
||||
stream = g_file_read(file, NULL, &err);
|
||||
if (err != NULL) {
|
||||
g_print("PARSER: %s: %s\n", filename, err->message);
|
||||
g_print("PARSER: %s\n", filename, err->message);
|
||||
g_error_free(err);
|
||||
return;
|
||||
}
|
||||
@ -460,7 +460,7 @@ struct mdiary_scanner *mdiary_scanner_new(gboolean gpg_enabled)
|
||||
return mdiary_scanner;
|
||||
}
|
||||
|
||||
void mdiary_scanner_free(struct mdiary_scanner *mdiary_scanner)
|
||||
void *mdiary_scanner_free(struct mdiary_scanner *mdiary_scanner)
|
||||
{
|
||||
free(mdiary_scanner);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ struct mdiary_scanner {
|
||||
};
|
||||
|
||||
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,
|
||||
gchar *base_dir,
|
||||
GtkListStore *entryListStore, GtkListStore *autoCompletion);
|
||||
|
@ -56,8 +56,6 @@ gboolean mdiary_load_settings(gchar *filename, struct mdiary_settings *settings)
|
||||
mainWindow_switch_workspace(settings->mainWindow, temp, FALSE);
|
||||
g_free(temp);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean mdiary_save_settings(gchar *filename, struct mdiary_settings *settings)
|
||||
@ -98,8 +96,6 @@ gboolean mdiary_save_settings(gchar *filename, struct mdiary_settings *settings)
|
||||
g_output_stream_close(G_OUTPUT_STREAM(stream), NULL, NULL);
|
||||
g_object_unref(stream);
|
||||
g_object_unref(file);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
struct mdiary_settings *mdiary_settings_new(struct mainWindow *mainWindow)
|
||||
|
Loading…
Reference in New Issue
Block a user