Changed to GtkApplication
This commit is contained in:
parent
2c4f0c273a
commit
faa06072f3
15
src/main.c
15
src/main.c
@ -5,14 +5,12 @@
|
|||||||
#include "mdiary.h"
|
#include "mdiary.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
static void activate(GApplication *app, gpointer user_data)
|
||||||
{
|
{
|
||||||
struct mainWindow *mainWindow;
|
struct mainWindow *mainWindow;
|
||||||
struct mdiary_settings *settings;
|
struct mdiary_settings *settings;
|
||||||
gchar *settings_path;
|
gchar *settings_path;
|
||||||
|
|
||||||
gtk_init(&argc, &argv);
|
|
||||||
|
|
||||||
mainWindow = mainWindow_new();
|
mainWindow = mainWindow_new();
|
||||||
|
|
||||||
settings_path = g_strdup_printf("%s/.mdiary.conf", g_get_home_dir());
|
settings_path = g_strdup_printf("%s/.mdiary.conf", g_get_home_dir());
|
||||||
@ -28,3 +26,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
GtkApplication *app;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
app = gtk_application_new("net.notsyncing.mdiary", G_APPLICATION_FLAGS_NONE);
|
||||||
|
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
|
||||||
|
status = g_application_run(G_APPLICATION(app), argc, argv);
|
||||||
|
g_object_unref(app);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user