diff --git a/gnoemoe/widgets/gm-app-view.c b/gnoemoe/widgets/gm-app-view.c index fa3ec72..6f538bf 100644 --- a/gnoemoe/widgets/gm-app-view.c +++ b/gnoemoe/widgets/gm-app-view.c @@ -1116,10 +1116,10 @@ on_gm_app_view_accel_switch_page(GtkAccelGroup * accelgroup, GObject * arg1, void on_gm_app_view_accel_switch_edit(GtkAccelGroup * accelgroup, GObject * arg1, guint arg2, GdkModifierType arg3, AccelInfo *info) { - GmWorld *world = gm_app_view_active_world(info->view); + GmWorldView *view = gm_app_view_active_world_view(info->view); - if (world) { - gtk_notebook_set_current_page(info->view->priv->notebook, info->num); + if (view) { + gtk_notebook_set_current_page(GTK_NOTEBOOK(view), info->num); } } diff --git a/gnoemoe/widgets/gm-editor-view.c b/gnoemoe/widgets/gm-editor-view.c index bfca6b5..a690b1f 100644 --- a/gnoemoe/widgets/gm-editor-view.c +++ b/gnoemoe/widgets/gm-editor-view.c @@ -42,7 +42,6 @@ struct _GmEditorViewPrivate { }; static GtkSourceLanguage *language = NULL; -static GtkSourceLanguagesManager *language_manager = NULL; /* Signals */ @@ -111,13 +110,17 @@ gm_editor_view_finalize(GObject *object) { void gm_editor_view_init_language() { - if (language_manager == NULL) { - language_manager = gtk_source_languages_manager_new(); - language = gtk_source_languages_manager_get_language_from_mime_type( - language_manager, "text/x-moo"); + GtkSourceLanguagesManager *manager; + + if (language == NULL) { + manager = gtk_source_languages_manager_new(); + language = g_object_ref(gtk_source_languages_manager_get_language_from_mime_type( + manager, "text/x-moo")); gtk_source_language_set_style_scheme(language, gm_source_style_scheme_get_default()); + + g_object_unref(manager); } } @@ -245,6 +248,8 @@ gm_editor_view_message_area_style_set(GtkWidget *widget, GtkStyle *prev, return; } + widget = view->priv->message_area; + tooltips = gtk_tooltips_new(); g_object_ref(G_OBJECT(tooltips)); gtk_object_sink(GTK_OBJECT(tooltips)); @@ -631,7 +636,7 @@ on_gm_editor_view_changed(GtkTextBuffer *buffer, if (gm_options_get_int(gm_app_options(gm_app_instance()), "auto_check_syntax")) { - view->priv->timeout_handler = g_timeout_add(500, + view->priv->timeout_handler = g_timeout_add(1000, (GSourceFunc)gm_editor_view_timeout, view); } } diff --git a/gnoemoe/widgets/gm-world-input-view.c b/gnoemoe/widgets/gm-world-input-view.c index 5229183..2071ea5 100644 --- a/gnoemoe/widgets/gm-world-input-view.c +++ b/gnoemoe/widgets/gm-world-input-view.c @@ -221,6 +221,7 @@ gm_world_input_view_key_press_event(GtkWidget *widget, GdkEventKey *event) { // Set textview text to an empty string gm_world_input_view_set_text(view, "", 0); + on_gm_world_input_view_changed(buf, view); g_free(text); result = TRUE; } diff --git a/gnoemoe/widgets/gm-world-view.c b/gnoemoe/widgets/gm-world-view.c index 30d5d4d..7c2b8f1 100644 --- a/gnoemoe/widgets/gm-world-view.c +++ b/gnoemoe/widgets/gm-world-view.c @@ -840,17 +840,17 @@ on_gm_world_view_world_error(GmWorld *world, gchar *text, gint code, switch (code) { case GM_NET_ERROR_CONNECTING: - line = g_strdup_printf(_("# Connect failed: %s"), text); + line = g_strdup_printf(_("Connect failed: %s"), text); break; case GM_NET_ERROR_DISCONNECTED: - line = g_strdup_printf(_("# Connection lost... (%s)"), text); + line = g_strdup_printf(_("Connection lost... (%s)"), text); break; default: - line = g_strdup_printf(_("# Error: %s"), text); + line = g_strdup_printf(_("Error: %s"), text); break; } - gm_world_writeln(world, line); + gm_world_status(world, line); g_free(line); } @@ -862,32 +862,32 @@ on_gm_world_view_world_state_changing(GmWorld *world, guint state, switch (state) { case GM_NET_STATE_TRY_ADDRESS: - line = g_strdup_printf(_("# Trying %s port %s"), + line = g_strdup_printf(_("Trying %s port %s"), gm_world_current_host(world), gm_world_current_port(world)); break; case GM_NET_STATE_CONNECTING: - line = g_strdup_printf(_("# Connecting to %s port %s"), + line = g_strdup_printf(_("Connecting to %s port %s"), gm_world_current_host(world), gm_world_current_port(world)); break; case GM_NET_STATE_CONNECTED: - line = g_strdup(_("# Connected")); + line = g_strdup(_("Connected")); break; case GM_NET_STATE_DISCONNECTED: if (pstate == GM_NET_STATE_CONNECTED || pstate == GM_NET_STATE_DISCONNECTING) { - line = g_strdup(_("# Disconnected")); + line = g_strdup(_("Disconnected")); } gm_world_view_update_status(view, NULL); break; case GM_NET_STATE_DISCONNECTING: - line = g_strdup(_("# Disconnecting")); + line = g_strdup(_("Disconnecting")); break; default: break; } if (line) { - gm_world_writeln(world, line); + gm_world_status(world, line); g_free(line); } }