X-Git-Url: http://pileus.org/git/?p=aweather;a=blobdiff_plain;f=src%2Fmain.c;h=b22ae8edd5457fec62a5a9f2a42789bfebcee8a2;hp=7e67975cc5c09d79d36e6b6f463c8da06e077469;hb=1805a31bdfb30d0a507364ca4d04518ca203321b;hpb=9542bd4b91cb7addc517ee20dc36a925e22033c9 diff --git a/src/main.c b/src/main.c index 7e67975..b22ae8e 100644 --- a/src/main.c +++ b/src/main.c @@ -99,12 +99,12 @@ static void setup_mac(AWeatherGui *gui) { #ifdef MAC_INTEGRATION GtkWidget *menu = aweather_gui_get_widget(gui, "main_menu"); - GtkOSXApplication *app = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL); + GtkosxApplication *app = g_object_new(GTKOSX_TYPE_APPLICATION, NULL); gtk_widget_hide(menu); - gtk_osxapplication_set_menu_bar(app, GTK_MENU_SHELL(menu)); - gtk_osxapplication_set_use_quartz_accelerators(app, TRUE); - gtk_osxapplication_ready(app); - //gtk_osxapplication_sync_menubar(app) + gtkosx_application_set_menu_bar(app, GTK_MENU_SHELL(menu)); + gtkosx_application_set_use_quartz_accelerators(app, TRUE); + gtkosx_application_ready(app); + //gtkosx_application_sync_menubar(app) #endif } @@ -144,7 +144,6 @@ int main(int argc, char *argv[]) /* Init */ GError *error = NULL; - gdk_threads_init(); if (!gtk_init_with_args(&argc, &argv, "aweather", entries, NULL, &error)) { g_print("%s\n", error->message); g_error_free(error); @@ -161,7 +160,6 @@ int main(int argc, char *argv[]) log_levels = int2log(opt_debug >= 0 ? opt_debug : debug); /* Set up AWeather */ - gdk_threads_enter(); /* Pre-load some types for gtkbuilder */ GRITS_TYPE_OPENGL; AWEATHER_TYPE_GUI; @@ -200,7 +198,6 @@ int main(int argc, char *argv[]) set_toggle_action(gui, "fullscreen", fullscreen); // Resest widget hiding setup_mac(gui); // done after show_all gtk_main(); - gdk_threads_leave(); - gdk_display_close(gdk_display_get_default()); + //gdk_display_close(gdk_display_get_default()); return 0; }