diff --git a/.gitignore b/.gitignore index 408e9a2..cc7f89d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.user *~ Makefile +*.autosave diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e1fa8d..3db64e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,6 @@ INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS} ${GOBJECT2_INCLUDE_DIRS} ${GTK3_INCLU LINK_DIRECTORIES (${GLIB2_LIBRARY_DIRS} ${GOBJECT2_LIBRARY_DIRS} ${GTK3_LIBRARY_DIRS}) add_definitions(${GLIB2_CFLAGS_OTHER} ${GOBJECT2_CFLAGS_OTHER} ${GTK3_CFLAGS_OTHER}) -aux_source_directory(. SRC_LIST) +aux_source_directory(./src SRC_LIST) add_executable(${PROJECT_NAME} ${SRC_LIST}) target_link_libraries(${PROJECT_NAME} ${GTK3_LIBRARIES} ${PC_LIBSOUP_LIBRARIES}) diff --git a/glade/mainWindow.glade b/glade/mainWindow.glade new file mode 100644 index 0000000..1307fe2 --- /dev/null +++ b/glade/mainWindow.glade @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + Test text for debugging. + + + + False + + + + True + True + 2 + 2 + 2 + 2 + True + + + True + False + 2 + 2 + 2 + 2 + vertical + 4 + + + True + True + edit-find-symbolic + False + False + searchEntryCompletion + + + False + True + 0 + + + + + True + False + 4 + + + True + True + 9 + 00.00.0000 + + + True + True + 0 + + + + + True + False + to + + + False + True + 1 + + + + + True + True + 9 + 00.00.0000 + + + True + True + 2 + + + + + False + True + 1 + + + + + False + True + + + + + True + True + 2 + 2 + 2 + 2 + vertical + True + + + True + True + entryListStore + + + + + + False + True + + + + + 640 + 480 + True + True + False + word + entryTextBuffer + + + True + True + + + + + True + True + + + + + + + True + False + MDiary + No workspace opened. + True + + + True + False + 4 + + + Choose workspace + True + True + True + + + False + True + 0 + + + + + + + + diff --git a/main.c b/main.c deleted file mode 100644 index f37d40b..0000000 --- a/main.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -int main(int argc, char *argv[]) -{ - GtkWidget *mainWindow; - - gtk_init(&argc, &argv); - mainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_widget_show(mainWindow); - g_signal_connect (G_OBJECT (mainWindow), "destroy", - G_CALLBACK (gtk_main_quit), NULL); - gtk_main(); - return 0; -} diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..3c1b0f2 --- /dev/null +++ b/src/main.c @@ -0,0 +1,18 @@ +#include +#include + +#include "mainwindow.h" + +int main(int argc, char *argv[]) +{ + struct mainWindow *mainWindow; + + gtk_init(&argc, &argv); + + mainWindow = mainWindow_new(); + gtk_widget_show(mainWindow->mainWindow); + + gtk_main(); + + return 0; +} diff --git a/src/mainwindow.c b/src/mainwindow.c new file mode 100644 index 0000000..e84ca84 --- /dev/null +++ b/src/mainwindow.c @@ -0,0 +1,23 @@ +#include "mainwindow.h" + +struct mainWindow *mainWindow_new() +{ + GtkBuilder *builder; + struct mainWindow *mainWindow; + + builder = gtk_builder_new_from_file("glade/mainWindow.glade"); + + mainWindow = malloc(sizeof(struct mainWindow)); + mainWindow->mainWindow = GTK_WIDGET(gtk_builder_get_object(builder, "mainWindow")); + mainWindow->buttonChooseWorkspace = GTK_WIDGET(gtk_builder_get_object(builder, "buttonChooseWorkspace")); + mainWindow->searchEntry = GTK_WIDGET(gtk_builder_get_object(builder, "searchEntry")); + mainWindow->dateStart = GTK_WIDGET(gtk_builder_get_object(builder, "dateStart")); + mainWindow->dateEnd = GTK_WIDGET(gtk_builder_get_object(builder, "dateEnd")); + mainWindow->entryText = GTK_WIDGET(gtk_builder_get_object(builder, "entryText")); + + gtk_builder_connect_signals(builder, NULL); + + g_object_unref(G_OBJECT(builder)); + + return mainWindow; +} diff --git a/src/mainwindow.h b/src/mainwindow.h new file mode 100644 index 0000000..d655c55 --- /dev/null +++ b/src/mainwindow.h @@ -0,0 +1,18 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include + +struct mainWindow { + GtkWidget *mainWindow; + GtkWidget *buttonChooseWorkspace; + GtkWidget *searchEntry; + GtkWidget *dateStart; + GtkWidget *dateEnd; + GtkWidget *entryText; +}; + +struct mainWindow *mainWindow_new(); + +#endif // MAINWINDOW_H