Coding style
This commit is contained in:
parent
ce137185ad
commit
31eb9fd406
@ -22,7 +22,7 @@ int main(int argc, char *argv[])
|
|||||||
gtk_widget_show(mainWindow->mainWindow);
|
gtk_widget_show(mainWindow->mainWindow);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
|
|
||||||
mdiary_save_settings(settings_path, settings); //
|
mdiary_save_settings(settings_path, settings);
|
||||||
mdiary_settings_free(settings);
|
mdiary_settings_free(settings);
|
||||||
g_free(settings_path);
|
g_free(settings_path);
|
||||||
|
|
||||||
|
@ -779,7 +779,8 @@ void mainWindow_otherWorkspaceClicked(GtkWidget *widget, gpointer user_data)
|
|||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
gint res;
|
gint res;
|
||||||
|
|
||||||
dialog = gtk_file_chooser_dialog_new("Choose Workspace", GTK_WINDOW(mainWindow->mainWindow), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
|
dialog = gtk_file_chooser_dialog_new("Choose Workspace", GTK_WINDOW(mainWindow->mainWindow),
|
||||||
|
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
|
||||||
"Cancel", GTK_RESPONSE_CANCEL,
|
"Cancel", GTK_RESPONSE_CANCEL,
|
||||||
"Select", GTK_RESPONSE_ACCEPT,
|
"Select", GTK_RESPONSE_ACCEPT,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -230,9 +230,8 @@ static gchar *mdiary_get_line_from_string(gchar **str_ptr)
|
|||||||
str = *str_ptr;
|
str = *str_ptr;
|
||||||
start = str;
|
start = str;
|
||||||
|
|
||||||
while (*str != '\n' && *str != '\0') {
|
while (*str != '\n' && *str != '\0')
|
||||||
str++;
|
str++;
|
||||||
}
|
|
||||||
|
|
||||||
*str = '\0';
|
*str = '\0';
|
||||||
*str_ptr = ++str;
|
*str_ptr = ++str;
|
||||||
@ -599,7 +598,8 @@ void mdiary_add_entry_to_store(GtkListStore *entryListStore,
|
|||||||
* @param data
|
* @param data
|
||||||
* @return FALSE
|
* @return FALSE
|
||||||
*/
|
*/
|
||||||
gboolean mdiary_free_entry_elements(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) {
|
gboolean mdiary_free_entry_elements(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
|
||||||
|
{
|
||||||
gpointer ptr;
|
gpointer ptr;
|
||||||
|
|
||||||
gtk_tree_model_get(model, iter, COL_TAGLIST, &ptr, -1);
|
gtk_tree_model_get(model, iter, COL_TAGLIST, &ptr, -1);
|
||||||
|
@ -36,9 +36,8 @@ gboolean mdiary_load_settings(gchar *filename, struct mdiary_settings *settings)
|
|||||||
}
|
}
|
||||||
dstream = g_data_input_stream_new(G_INPUT_STREAM(stream));
|
dstream = g_data_input_stream_new(G_INPUT_STREAM(stream));
|
||||||
|
|
||||||
while (line = g_data_input_stream_read_line(G_DATA_INPUT_STREAM(dstream), NULL, NULL, NULL)) {
|
while (line = g_data_input_stream_read_line(G_DATA_INPUT_STREAM(dstream), NULL, NULL, NULL))
|
||||||
mdiary_settings_parse_line(line, settings);
|
mdiary_settings_parse_line(line, settings);
|
||||||
}
|
|
||||||
|
|
||||||
g_input_stream_close(G_INPUT_STREAM(dstream), NULL, NULL);
|
g_input_stream_close(G_INPUT_STREAM(dstream), NULL, NULL);
|
||||||
g_input_stream_close(G_INPUT_STREAM(stream), NULL, NULL);
|
g_input_stream_close(G_INPUT_STREAM(stream), NULL, NULL);
|
||||||
|
@ -15,4 +15,4 @@ gboolean mdiary_save_settings(gchar *filename, struct mdiary_settings *settings)
|
|||||||
struct mdiary_settings *mdiary_settings_new(struct mainWindow *mainWindow);
|
struct mdiary_settings *mdiary_settings_new(struct mainWindow *mainWindow);
|
||||||
void mdiary_settings_free(struct mdiary_settings *settings);
|
void mdiary_settings_free(struct mdiary_settings *settings);
|
||||||
|
|
||||||
#endif // SETTINGS_H
|
#endif /* SETTINGS_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user