...
 
Commits (39)
===========
gedit 3.0.6
===========
New Features and Fixes
======================
- Performance fixes (Paolo Borelli)
- Misc bugfixes
New and updated translations
============================
- de (Christian Kirbach)
- sr@latin (Miroslav Nikolić)
- sr (Мирослав Николић)
===========
gedit 3.0.5
===========
New Features and Fixes
======================
- Fix single instance logic (Paolo Borelli)
- Misc bugfixes
New and updated translations
============================
- el (Kostas Papadimas)
- fr (Bruno Brouard)
===========
gedit 3.0.4
===========
New Features and Fixes
======================
- Misc bugfixes
New and updated translations
============================
- ca@valencia (Gil Forcada)
===========
gedit 3.0.3
===========
......
General Information
===================
This is version 3.0.3 of gedit. gedit is a small and lightweight UTF-8 text
This is version 3.0.6 of gedit. gedit is a small and lightweight UTF-8 text
editor for the GNOME environment.
gedit is part of GNOME and uses the latest GTK+ and GNOME libraries.
......@@ -71,8 +71,8 @@ plugins support.
Simple install procedure:
% gzip -cd gedit-3.0.3.tar.gz | tar xvf - # unpack the sources
% cd gedit-3.0.3 # change to the toplevel directory
% gzip -cd gedit-3.0.6.tar.gz | tar xvf - # unpack the sources
% cd gedit-3.0.6 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build gedit
[ Become root if necessary ]
......
......@@ -4,7 +4,7 @@ AC_PREREQ(2.63.2)
m4_define(gedit_major_version, 3)
m4_define(gedit_minor_version, 0)
m4_define(gedit_micro_version, 3)
m4_define(gedit_micro_version, 6)
m4_define(gedit_version, gedit_major_version.gedit_minor_version.gedit_micro_version)
AC_INIT([gedit],[gedit_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=gedit],[gedit],[http://projects.gnome.org/gedit/])
......@@ -167,9 +167,6 @@ dnl ================================================================
IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
AC_SUBST([GETTEXT_PACKAGE], [gedit])
AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME], [Define to the gettext package name.])
......
......@@ -675,8 +675,6 @@ gedit_app_create_window_real (GeditApp *app,
{
GeditWindow *window;
gedit_debug (DEBUG_APP);
/*
* We need to be careful here, there is a race condition:
* when another gedit is launched it checks active_window,
......@@ -766,6 +764,8 @@ gedit_app_create_window (GeditApp *app,
{
GeditWindow *window;
gedit_debug (DEBUG_APP);
window = gedit_app_create_window_real (app, TRUE, NULL);
if (screen != NULL)
......@@ -784,6 +784,8 @@ _gedit_app_restore_window (GeditApp *app,
{
GeditWindow *window;
gedit_debug (DEBUG_APP);
window = gedit_app_create_window_real (app, FALSE, role);
return window;
......@@ -897,7 +899,8 @@ is_in_viewport (GeditWindow *window,
* equal parts called viewports. This function retrives the #GeditWindow in
* the given viewport of the given workspace.
*
* Return value: the #GeditWindow in the given viewport of the given workspace.
* Return value: the #GeditWindow in the given viewport of the given workspace
* or %NULL% if no window is found.
*/
GeditWindow *
_gedit_app_get_window_in_viewport (GeditApp *app,
......@@ -929,8 +932,7 @@ _gedit_app_get_window_in_viewport (GeditApp *app,
return window;
}
/* no window on this workspace... create a new one */
return gedit_app_create_window (app, screen);
return NULL;
}
/**
......
......@@ -24,11 +24,12 @@
#include <errno.h>
#include <stdlib.h>
#include <gdk/gdk.h>
#include "gedit-utils.h"
#include "gedit-command-line.h"
#include "gedit-window.h"
#include "gedit-debug.h"
#include "gedit-app.h"
#include "gedit-command-line.h"
#include "gedit-commands.h"
#include "gedit-window.h"
#include "gedit-utils.h"
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
......@@ -250,6 +251,8 @@ activate_service (GeditDBus *dbus,
GDBusConnection *conn;
GVariant *ret;
gedit_debug (DEBUG_DBUS);
conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (conn == NULL)
......@@ -485,6 +488,8 @@ on_open_proxy_signal (GDBusProxy *proxy,
GVariant *parameters,
GeditDBus *dbus)
{
gedit_debug (DEBUG_DBUS);
if (g_strcmp0 (signal_name, "WaitDone") == 0)
{
guint wait_id;
......@@ -716,6 +721,8 @@ handle_slave (GeditDBus *dbus)
GDBusProxyFlags flags;
GeditCommandLine *command_line;
gedit_debug (DEBUG_DBUS);
conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (conn == NULL)
......@@ -754,6 +761,8 @@ handle_slave (GeditDBus *dbus)
static GeditDBusResult
handle_master (GeditDBus *dbus)
{
gedit_debug (DEBUG_DBUS);
/* let the main gedit thing do its thing */
if (g_getenv ("DBUS_STARTER_ADDRESS"))
{
......@@ -821,8 +830,7 @@ display_open_if_needed (const gchar *name)
static GeditWindow *
window_from_display_arguments (gboolean new_window,
DisplayParameters *dparams,
gboolean create)
DisplayParameters *dparams)
{
GdkScreen *screen = NULL;
GeditApp *app;
......@@ -861,18 +869,16 @@ window_from_display_arguments (gboolean new_window,
ret = gedit_app_get_active_window (app);
}
if (!ret && create)
if (!ret)
{
ret = gedit_app_create_window (app, screen);
gedit_window_create_tab (ret, TRUE);
}
return ret;
}
static gboolean
is_empty_window (GeditWindow *window,
gboolean check_untouched)
is_empty_window (GeditWindow *window)
{
GList *views;
gboolean ret = FALSE;
......@@ -883,7 +889,20 @@ is_empty_window (GeditWindow *window,
{
ret = TRUE;
}
else if (check_untouched && views->next == NULL)
g_list_free (views);
return ret;
}
static gboolean
is_untouched_window (GeditWindow *window)
{
GList *views;
gboolean ret = FALSE;
views = gedit_window_get_views (window);
if (views != NULL && views->next == NULL)
{
GeditView *view = GEDIT_VIEW (views->data);
GeditDocument *doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
......@@ -910,6 +929,8 @@ set_interaction_time_and_present (GeditWindow *window,
* has been realized otherwise it will not work. lame.
*/
gedit_debug (DEBUG_DBUS);
if (!gtk_widget_get_realized (GTK_WIDGET (window)))
{
gtk_widget_realize (GTK_WIDGET (window));
......@@ -952,7 +973,7 @@ wait_handler_dbus (GObject *object,
g_object_unref (conn);
if (data->window && object != G_OBJECT (data->window) &&
data->close_window && is_empty_window (data->window, FALSE))
data->close_window && is_empty_window (data->window))
{
/* Close the window */
gtk_widget_destroy (GTK_WIDGET (data->window));
......@@ -1303,7 +1324,6 @@ handle_open_fds (GeditDBus *dbus,
g_slist_free (tabs);
return g_slist_concat (loaded, g_slist_reverse (ret));
}
static void
......@@ -1329,6 +1349,8 @@ dbus_handle_open (GeditDBus *dbus,
GeditWindow *window;
GSList *loaded_documents = NULL;
gboolean empty_window;
gboolean untouched_window;
gboolean jump_to;
WaitData *data;
guint32 wait_id = 0;
......@@ -1357,8 +1379,7 @@ dbus_handle_open (GeditDBus *dbus,
NULL);
window = window_from_display_arguments (new_window,
&display_parameters,
TRUE);
&display_parameters);
g_free (display_parameters.display_name);
......@@ -1381,7 +1402,8 @@ dbus_handle_open (GeditDBus *dbus,
g_free (charset_encoding);
empty_window = is_empty_window (window, TRUE);
empty_window = is_empty_window (window);
untouched_window = is_untouched_window (window);
extract_optional_parameters (options_hash,
"line_position", &open_parameters.line_position,
......@@ -1412,18 +1434,37 @@ dbus_handle_open (GeditDBus *dbus,
"startup_time", &startup_time,
NULL);
set_interaction_time_and_present (window, startup_time);
if (new_document)
{
GeditTab *tab;
if (!wait)
tab = gedit_window_create_tab (window, TRUE);
/* when forcing a new doc, it should be the active tab */
jump_to = FALSE;
loaded_documents = g_slist_append (loaded_documents,
gedit_tab_get_document (tab));
}
else if (loaded_documents == NULL)
{
gboolean jump_to = loaded_documents == NULL;
GeditTab *tab;
if (new_document)
tab = gedit_window_create_tab (window, TRUE);
jump_to = TRUE;
loaded_documents = g_slist_append (loaded_documents,
gedit_tab_get_document (tab));
}
else
{
gedit_window_create_tab (window, jump_to);
jump_to = FALSE;
}
set_interaction_time_and_present (window, startup_time);
if (!wait)
{
handle_open_pipe (dbus,
pipe_path,
window,
......@@ -1433,30 +1474,19 @@ dbus_handle_open (GeditDBus *dbus,
}
else
{
gboolean jump_to = loaded_documents == NULL;
gboolean has_pipe;
data = g_slice_new (WaitData);
data->dbus = dbus;
data->window = window;
data->close_window = empty_window;
data->close_window = (empty_window || untouched_window);
data->wait_id = ++dbus->priv->next_wait_id;
data->num_handlers = 0;
/* for the return value */
wait_id = data->wait_id;
if (new_document)
{
GeditTab *tab;
tab = gedit_window_create_tab (window, jump_to);
jump_to = FALSE;
loaded_documents = g_slist_append (loaded_documents,
gedit_tab_get_document (tab));
}
has_pipe = handle_open_pipe (dbus,
pipe_path,
window,
......@@ -1466,7 +1496,7 @@ dbus_handle_open (GeditDBus *dbus,
/* Install wait handler on the window if there were no documents
opened */
if (loaded_documents == NULL && !has_pipe)
if ((loaded_documents == NULL) && !has_pipe)
{
/* Add wait handler on the window */
install_wait_handler (dbus,
......@@ -1511,6 +1541,10 @@ dbus_command_line_method_call_cb (GDBusConnection *connection,
g_return_if_fail (g_strcmp0 (object_path, "/org/gnome/gedit") == 0);
g_return_if_fail (g_strcmp0 (interface_name, "org.gnome.gedit.CommandLine") == 0);
if (method_name != NULL)
{
gedit_debug_message (DEBUG_DBUS, "method: %s\n", method_name);
if (g_strcmp0 (method_name, "Open") == 0)
{
dbus_handle_open (user_data, parameters, invocation);
......@@ -1519,6 +1553,7 @@ dbus_command_line_method_call_cb (GDBusConnection *connection,
{
g_warning ("Unsupported method called on gedit service: %s", method_name);
}
}
}
static const gchar introspection_xml[] =
......@@ -1566,6 +1601,8 @@ bus_acquired_cb (GDBusConnection *connection,
const gchar *name,
GeditDBus *dbus)
{
gedit_debug (DEBUG_DBUS);
if (connection == NULL)
{
g_warning ("Failed to acquire dbus connection");
......@@ -1587,6 +1624,8 @@ name_acquired_cb (GDBusConnection *connection,
const gchar *name,
GeditDBus *dbus)
{
gedit_debug (DEBUG_DBUS);
dbus->priv->result = GEDIT_DBUS_RESULT_SUCCESS;
g_main_loop_quit (dbus->priv->main_loop);
}
......@@ -1596,6 +1635,8 @@ name_lost_cb (GDBusConnection *connection,
const gchar *name,
GeditDBus *dbus)
{
gedit_debug (DEBUG_DBUS);
dbus->priv->result = GEDIT_DBUS_RESULT_FAILED;
g_main_loop_quit (dbus->priv->main_loop);
}
......@@ -1607,6 +1648,8 @@ gedit_dbus_run (GeditDBus *dbus)
g_return_val_if_fail (GEDIT_IS_DBUS (dbus), GEDIT_DBUS_RESULT_PROCEED);
gedit_debug (DEBUG_DBUS);
command_line = gedit_command_line_get_default ();
if (gedit_command_line_get_standalone (command_line))
......@@ -1636,6 +1679,8 @@ gedit_dbus_run (GeditDBus *dbus)
dbus,
NULL);
gedit_debug_message (DEBUG_DBUS, "Own name org.gnome.gedit\n");
dbus->priv->main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (dbus->priv->main_loop);
g_main_loop_unref (dbus->priv->main_loop);
......
......@@ -88,7 +88,8 @@ gedit_debug_init (void)
debug = debug | GEDIT_DEBUG_SAVER;
if (g_getenv ("GEDIT_DEBUG_PANEL") != NULL)
debug = debug | GEDIT_DEBUG_PANEL;
if (g_getenv ("GEDIT_DEBUG_DBUS") != NULL)
debug = debug | GEDIT_DEBUG_DBUS;
out:
#ifdef ENABLE_PROFILING
......
......@@ -57,7 +57,8 @@ typedef enum {
GEDIT_DEBUG_WINDOW = 1 << 12,
GEDIT_DEBUG_LOADER = 1 << 13,
GEDIT_DEBUG_SAVER = 1 << 14,
GEDIT_DEBUG_PANEL = 1 << 15
GEDIT_DEBUG_PANEL = 1 << 15,
GEDIT_DEBUG_DBUS = 1 << 16
} GeditDebugSection;
......@@ -78,6 +79,7 @@ typedef enum {
#define DEBUG_LOADER GEDIT_DEBUG_LOADER, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_SAVER GEDIT_DEBUG_SAVER, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_PANEL GEDIT_DEBUG_PANEL, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_DBUS GEDIT_DEBUG_DBUS, __FILE__, __LINE__, G_STRFUNC
void gedit_debug_init (void);
......
......@@ -622,14 +622,22 @@ gedit_notebook_remove_tab (GeditNotebook *nb,
void
gedit_notebook_remove_all_tabs (GeditNotebook *nb)
{
GList *tabs, *t;
g_return_if_fail (GEDIT_IS_NOTEBOOK (nb));
g_list_free (nb->priv->focused_pages);
nb->priv->focused_pages = NULL;
gtk_container_foreach (GTK_CONTAINER (nb),
(GtkCallback)remove_tab,
nb);
/* Remove tabs in reverse order since it is faster
* due to how gtknotebook works */
tabs = gtk_container_get_children (GTK_CONTAINER (nb));
for (t = g_list_last (tabs); t != NULL; t = t->prev)
{
gtk_container_remove (GTK_CONTAINER (nb), GTK_WIDGET (t->data));
}
g_list_free (tabs);
}
static void
......
......@@ -1237,8 +1237,6 @@ init_search_entry (GeditViewFrame *frame)
guint old_find_flags = 0;
gint sel_len = 0;
g_free (frame->priv->old_search_text);
old_find_text = gedit_document_get_search_text (GEDIT_DOCUMENT (buffer),
&old_find_flags);
......@@ -1260,6 +1258,7 @@ init_search_entry (GeditViewFrame *frame)
}
else if (old_find_text != NULL)
{
g_free (frame->priv->old_search_text);
frame->priv->old_search_text = old_find_text;
add_search_completion_entry (old_find_text);
g_signal_handler_block (frame->priv->search_entry,
......@@ -1433,6 +1432,7 @@ gedit_view_frame_init (GeditViewFrame *frame)
frame);
frame->priv->view = gedit_view_new (doc);
gtk_widget_set_vexpand (frame->priv->view, TRUE);
gtk_widget_show (frame->priv->view);
g_object_unref (doc);
......
......@@ -4358,8 +4358,9 @@ process_create_tab (GeditWindow *window,
return NULL;
}
gtk_widget_show (GTK_WIDGET (tab));
gedit_debug (DEBUG_WINDOW);
gtk_widget_show (GTK_WIDGET (tab));
gedit_notebook_add_tab (GEDIT_NOTEBOOK (notebook),
tab,
-1,
......@@ -4392,6 +4393,8 @@ gedit_window_create_tab (GeditWindow *window,
g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
gedit_debug (DEBUG_WINDOW);
notebook = _gedit_window_get_notebook (window);
tab = GEDIT_TAB (_gedit_tab_new ());
gtk_widget_show (GTK_WIDGET (tab));
......@@ -4431,6 +4434,8 @@ gedit_window_create_tab_from_location (GeditWindow *window,
g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
g_return_val_if_fail (G_IS_FILE (location), NULL);
gedit_debug (DEBUG_WINDOW);
notebook = _gedit_window_get_notebook (window);
tab = _gedit_tab_new_from_location (location,
encoding,
......@@ -4463,6 +4468,8 @@ gedit_window_create_tab_from_stream (GeditWindow *window,
GtkWidget *notebook;
GtkWidget *tab;
gedit_debug (DEBUG_WINDOW);
g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
g_return_val_if_fail (G_IS_INPUT_STREAM (stream), NULL);
......
......@@ -177,7 +177,7 @@ gedit_theatrics_stage_init (GeditTheatricsStage *stage)
g_direct_equal);
}
static void
static gboolean
iterate_actors (gpointer key,
gpointer value,
GeditTheatricsStage *stage)
......@@ -188,10 +188,7 @@ iterate_actors (gpointer key,
g_signal_emit (G_OBJECT (stage), signals[ACTOR_STEP], 0, actor);
if (gedit_theatrics_actor_get_expired (actor))
{
g_hash_table_remove (stage->priv->actors, key);
}
return gedit_theatrics_actor_get_expired (actor);
}
static gboolean
......@@ -203,8 +200,8 @@ on_timeout (GeditTheatricsStage *stage)
return FALSE;
}
g_hash_table_foreach (stage->priv->actors,
(GHFunc)iterate_actors,
g_hash_table_foreach_remove (stage->priv->actors,
(GHRFunc)iterate_actors,
stage);
g_signal_emit (G_OBJECT (stage), signals[ITERATION], 0);
......
This diff is collapsed.
This diff is collapsed.
# Hungarian translation of gedit help
# Mate Ory <orymate at gmail dot com>, 2007, 2008.
# Gabor Kelemen <kelemeng at gnome dot hu>, 2007, 2008, 2009, 2010, 2011.
# Balázs Úr <urbalazs at gmail dot com>, 2013.
msgid ""
msgstr ""
"Project-Id-Version: gedit_help master\n"
"POT-Creation-Date: 2011-04-19 21:51+0000\n"
"PO-Revision-Date: 2011-04-21 22:40+0200\n"
"Last-Translator: Gabor Kelemen <kelemeng at gnome dot hu>\n"
"POT-Creation-Date: 2012-01-06 18:44+0000\n"
"PO-Revision-Date: 2013-09-26 21:38+0200\n"
"Last-Translator: Balázs Úr <urbalazs at gmail dot com>\n"
"Language-Team: Hungarian <gnome at fsf dot hu>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"X-Generator: Lokalize 1.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: hu\n"
#. When image changes, this message will be marked fuzzy or untranslated for you.
#. It doesn't matter what you translate it to: it's not used at all.
#: C/index.page:22(None)
msgid "@@image: 'figures/gedit-icon.png'; md5=a7174de2671462e1ac4f80a82ad09184"
msgstr "@@image: 'figures/gedit-icon.png'; md5=a7174de2671462e1ac4f80a82ad09184"
msgstr ""
"@@image: 'figures/gedit-icon.png'; md5=a7174de2671462e1ac4f80a82ad09184"
#: C/index.page:7(title) C/index.page:8(title)
msgid "gedit Text Editor"
......@@ -129,8 +132,10 @@ msgstr "Nyomtatás a gedittel"
#. It doesn't matter what you translate it to: it's not used at all.
#: C/gedit-view-open-files-in-sidepane.page:25(None)
#: C/gedit-open-files-from-sidepane.page:51(None)
msgid "@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57"
msgstr "@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57"
msgid ""
"@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57"
msgstr ""
"@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57"
#: C/gedit-view-open-files-in-sidepane.page:14(name)
#: C/gedit-undo-recent-action.page:14(name) C/gedit-tabs.page:15(name)
......@@ -811,7 +816,8 @@ msgstr "Szöveg keresése"
msgid ""
"The Find tool can help you find specific sequences of text within in your "
"file."
msgstr "A Keresés eszköz segítségével megadott szövegdarabokat kereshet a fájlban."
msgstr ""
"A Keresés eszköz segítségével megadott szövegdarabokat kereshet a fájlban."
#: C/gedit-search.page:23(title)
msgid "Finding text"
......@@ -829,11 +835,11 @@ msgstr ""
"nyomja meg a <keyseq><key>Ctrl</key><key>F</key></keyseq> kombinációt. Ez a "
"kurzort a <gui>keresés ablak</gui> elejére viszi."
#: C/gedit-search.page:25(p)
#: C/gedit-search.page:27(p)
msgid "Type the text you wish to search for in the <gui>search window</gui>."
msgstr "Írja be a keresendő szöveget a <gui>keresés ablakba</gui>."
#: C/gedit-search.page:26(p)
#: C/gedit-search.page:28(p)
msgid ""
"As you type, <app>gedit</app> will begin highlighting the portions of text "
"that match what you have entered."
......@@ -841,23 +847,41 @@ msgstr ""
"Gépelés közben a <app>gedit</app> megkezdi a beírt szövegre illeszkedő "
"szövegdarabok kiemelését."
#: C/gedit-search.page:27(p)
#: C/gedit-search.page:30(p)
msgid "To scroll through the search results, do any of the following:"
msgstr "A találatok közti lépkedéshez tegye a következők egyikét:"
#: C/gedit-search.page:31(p)
msgid ""
"Use the <gui>up</gui> or <gui>down</gui> facing arrows next to the "
"<gui>search window</gui> (or <keyseq><key>Ctrl</key><key>G</key></keyseq> or "
"<keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq>) to scroll up "
"or down through the highlighted text."
"Click on the <gui>up</gui> or <gui>down</gui> facing arrows next to the "
"<gui>search window</gui>"
msgstr ""
"Használja a <gui>keresés ablak</gui> melletti <gui>fel</gui> vagy <gui>le</"
"gui> mutató nyilakat (vagy a <keyseq><key>Ctrl</key><key>G</key></keyseq> és "
"<keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq> kombinációkat) "
"a kiemelt szövegben való fel vagy le mozgáshoz."
"Kattintson a <gui>keresőablak</gui> mellett <gui>fel</gui> vagy <gui>le</"
"gui> mutató nyilakra."
#: C/gedit-search.page:30(p)
#: C/gedit-search.page:33(p)
msgid ""
"Press the <key>up arrow</key> or <key>down arrow</key> keys on your keyboard"
msgstr "Nyomja meg a <key>fel nyíl</key> vagy <key>le nyíl</key> billentyűt"
#: C/gedit-search.page:34(p)
#| msgid ""
#| "To switch between open tabs while in fullscreen mode, press either "
#| "<keyseq><key>Ctrl</key><key>Alt</key><key>PgUp</key></keyseq> or "
#| "<keyseq><key>Ctrl</key><key>Alt</key><key>PgDn</key></keyseq>."
msgid ""
"Press <keyseq><key>Ctrl</key><key>G</key></keyseq> or <keyseq><key>Ctrl</"
"key><key> Shift</key><key>G</key></keyseq>."
msgstr ""
"Nyomja meg a <keyseq><key>Ctrl</key><key>G</key></keyseq> vagy a <keyseq><key>"
"Ctrl</key><key> Shift</key><key>G</key></keyseq> kombinációt."
#: C/gedit-search.page:38(p)
msgid "To close the <gui>search window</gui>, press <key>Esc</key>."
msgstr "A <gui>keresőablak</gui> bezárásához nyomja meg az <key>Esc</key> billentyűt."
msgstr ""
"A <gui>keresőablak</gui> bezárásához nyomja meg az <key>Esc</key> billentyűt."
#: C/gedit-search.page:33(p)
#: C/gedit-search.page:41(p)
msgid ""
"The text that you've searched for will remain highlighted by gedit, even "
"after you have completed your search. To remove the highlight, click "
......@@ -1166,11 +1190,14 @@ msgstr ""
#. When image changes, this message will be marked fuzzy or untranslated for you.
#. It doesn't matter what you translate it to: it's not used at all.
#: C/gedit-plugins-tag-list.page:33(None)
msgid "@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c"
msgstr "@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c"
msgid ""
"@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c"
msgstr ""
"@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c"
#: C/gedit-plugins-tag-list.page:18(title)
msgid "Automatically insert tags, strings and special characters into a document"
msgid ""
"Automatically insert tags, strings and special characters into a document"
msgstr ""
"Címkék, karakterláncok és speciális karakterek automatikus beszúrása a "
"dokumentumba"
......@@ -1255,7 +1282,8 @@ msgstr ""
msgid ""
"Select the desired tag type from the drop-down menu at the top of the side "
"pane."
msgstr "Válassza ki a kívánt címketípust a legördülő menüből az oldalsáv tetején."
msgstr ""
"Válassza ki a kívánt címketípust a legördülő menüből az oldalsáv tetején."
#: C/gedit-plugins-tag-list.page:46(p)
msgid "Scroll through the list to find the desired tag or character."
......@@ -1269,7 +1297,8 @@ msgstr "Kattintson duplán a címkén az elemlistában."
msgid ""
"The tag or special character you've chosen will then be displayed in your "
"document."
msgstr "A kiválasztott címke vagy speciális karakter megjelenik a dokumentumban."
msgstr ""
"A kiválasztott címke vagy speciális karakter megjelenik a dokumentumban."
#: C/gedit-plugins-tag-list.page:54(title)
msgid "Tag List Tips"
......@@ -1309,7 +1338,8 @@ msgid "Sort text into alphabetical order"
msgstr "Szöveg betűrendbe rendezése"
#: C/gedit-plugins-sort.page:20(p)
msgid "The Sort plugin arranges selected lines of text into alphabetical order."
msgid ""
"The Sort plugin arranges selected lines of text into alphabetical order."
msgstr "A Rendezés bővítmény a kijelölt sorokat betűrendbe teszi."
#: C/gedit-plugins-sort.page:22(p)
......@@ -1353,7 +1383,8 @@ msgstr ""
"kiválasztását."
#: C/gedit-plugins-sort.page:30(p)
msgid "<em>Reverse order</em> will arrange the text in reverse alphabetical order."
msgid ""
"<em>Reverse order</em> will arrange the text in reverse alphabetical order."
msgstr ""
"A <em>Fordított sorrend</em> beállítás a szöveget fordított betűrendbe "
"rendezi."
......@@ -1386,7 +1417,8 @@ msgstr "A rendezés végrehajtásához nyomja meg a <gui>Rendezés</gui> gombot.
#: C/gedit-plugins-snippets.page:15(title)
msgid "Use snippets to quickly insert often-used pieces of text"
msgstr "Töredékek használata gyakran használt szövegdarabok gyakori beszúrására"
msgstr ""
"Töredékek használata gyakran használt szövegdarabok gyakori beszúrására"
#. TODO: write documentation for gedit snippets
#: C/gedit-plugins-snippets.page:19(p)
......@@ -1752,8 +1784,10 @@ msgstr ""
#. It doesn't matter what you translate it to: it's not used at all.
#: C/gedit-plugins-file-browser.page:31(None)
#: C/gedit-open-files-from-sidepane.page:36(None)
msgid "@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53"
msgstr "@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53"
msgid ""
"@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53"
msgstr ""
"@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53"
#: C/gedit-plugins-file-browser.page:18(title)
msgid "Use the side pane to browse and open files"
......@@ -2046,11 +2080,14 @@ msgstr ""
"hozzáférést. A legutóbb használt fájlok eléréséhez:"
#: C/gedit-open-recent.page:18(p)
msgid "Click the downward-facing arrow to the right of the <gui>Open</gui> button."
msgstr "Kattintson a lefelé mutató nyílra a <gui>Megnyitás</gui> gomb jobb oldalán."
msgid ""
"Click the downward-facing arrow to the right of the <gui>Open</gui> button."
msgstr ""
"Kattintson a lefelé mutató nyílra a <gui>Megnyitás</gui> gomb jobb oldalán."
#: C/gedit-open-recent.page:19(p)
msgid "<app>gedit</app> will display a list of the five most-recently used files."
msgid ""
"<app>gedit</app> will display a list of the five most-recently used files."
msgstr "A <app>gedit</app> megjeleníti a legutóbb használt öt fájlt."
#: C/gedit-open-recent.page:20(p)
......@@ -2436,8 +2473,10 @@ msgid "su -"
msgstr "su -"
#: C/gedit-edit-as-root.page:24(p)
msgid "You would then launch <app>gedit</app> using the <cmd>gedit</cmd> command."
msgstr "Ezután a <app>gedit</app> a <cmd>gedit</cmd> parancs kiadásával indítható el."
msgid ""
"You would then launch <app>gedit</app> using the <cmd>gedit</cmd> command."
msgstr ""
"Ezután a <app>gedit</app> a <cmd>gedit</cmd> parancs kiadásával indítható el."
#: C/gedit-edit-as-root.page:26(p)
msgid ""
......@@ -2562,3 +2601,13 @@ msgstr ""
"Kelemen Gábor <kelemeng at gnome dot hu>, 2007., 2008.\n"
"Őry Máté <orymate at gmail dot com>, 2007., 2008."
#~ msgid ""
#~ "Use the <gui>up</gui> or <gui>down</gui> facing arrows next to the "
#~ "<gui>search window</gui> (or <keyseq><key>Ctrl</key><key>G</key></keyseq> "
#~ "or <keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq>) to "
#~ "scroll up or down through the highlighted text."
#~ msgstr ""
#~ "Használja a <gui>keresés ablak</gui> melletti <gui>fel</gui> vagy "
#~ "<gui>le</gui> mutató nyilakat (vagy a <keyseq><key>Ctrl</key><key>G</"
#~ "key></keyseq> és <keyseq><key>Ctrl</key><key>Shift</key><key>G</key></"
#~ "keyseq> kombinációkat) a kiemelt szövegben való fel vagy le mozgáshoz."
......@@ -101,7 +101,7 @@ class Capture(GObject.Object):
fcntl.fcntl(self.pipe.stdout.fileno(), fcntl.F_SETFL, flags)
GObject.io_add_watch(self.pipe.stdout,
GObject.IOCondition.IN | GObject.IOCondition.HUP,
GObject.IO_IN | GObject.IO_HUP,
self.on_output)
if self.flags & self.CAPTURE_STDERR:
......@@ -110,7 +110,7 @@ class Capture(GObject.Object):
fcntl.fcntl(self.pipe.stderr.fileno(), fcntl.F_SETFL, flags)
GObject.io_add_watch(self.pipe.stderr,
GObject.IOCondition.IN | GObject.IOCondition.HUP,
GObject.IO_IN | GObject.IO_HUP,
self.on_output)
# IO
......
......@@ -72,7 +72,7 @@ class AbsoluteFileLookupProvider(FileLookupProvider):
def lookup(self, path):
if os.path.isabs(path) and os.path.isfile(path):
return gio.File(path)
return Gio.file_new_for_path(path)
else:
return None
......@@ -92,7 +92,7 @@ class CwdFileLookupProvider(FileLookupProvider):
real_path = os.path.join(cwd, path)
if os.path.isfile(real_path):
return gio.File(real_path)
return Gio.file_new_for_path(real_path)
else:
return None
......@@ -109,14 +109,14 @@ class OpenDocumentRelPathFileLookupProvider(FileLookupProvider):
if path.startswith('/'):
return None
for doc in Gedit.app_get_default().get_documents():
for doc in Gedit.App.get_default().get_documents():
if doc.is_local():
location = doc.get_location()
if location:
rel_path = location.get_parent().get_path()
joined_path = os.path.join(rel_path, path)
if os.path.isfile(joined_path):
return gio.File(joined_path)
return Gio.file_new_for_path(joined_path)
return None
......@@ -134,7 +134,7 @@ class OpenDocumentFileLookupProvider(FileLookupProvider):
if path.startswith('/'):
return None
for doc in Gedit.app_get_default().get_documents():
for doc in Gedit.App.get_default().get_documents():
if doc.is_local():
location = doc.get_location()
if location and location.get_uri().endswith(path):
......
......@@ -222,7 +222,7 @@ class MultipleDocumentsSaver:
for doc in docs:
signals[doc] = doc.connect('saving', self.on_document_saving)
Gedit.commands.save_document(window, doc)
Gedit.commands_save_document(window, doc)
doc.disconnect(signals[doc])
def on_document_saving(self, doc, size, total_size):
......
......@@ -46,14 +46,31 @@ class LanguagesPopup(Gtk.Window):
self.grab_add()
Gdk.keyboard_grab(self.window, False, 0L)
Gdk.pointer_grab(self.window, False, Gdk.BUTTON_PRESS_MASK |
Gdk.BUTTON_RELEASE_MASK |
Gdk.POINTER_MOTION_MASK |
Gdk.ENTER_NOTIFY_MASK |
Gdk.LEAVE_NOTIFY_MASK |
Gdk.PROXIMITY_IN_MASK |
Gdk.PROXIMITY_OUT_MASK, None, None, 0L)
self.keyboard = None
device_manager = Gdk.Display.get_device_manager(self.get_window().get_display())
for device in device_manager.list_devices(Gdk.DeviceType.MASTER):
if device.get_source() == Gdk.InputSource.KEYBOARD:
self.keyboard = device
break
self.pointer = device_manager.get_client_pointer()
if self.keyboard is not None:
self.keyboard.grab(self.get_window(),
Gdk.GrabOwnership.WINDOW, False,
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.KEY_RELEASE_MASK,
None, 0L)
self.pointer.grab(self.get_window(),
Gdk.GrabOwnership.WINDOW, False,
Gdk.EventMask.BUTTON_PRESS_MASK |
Gdk.EventMask.BUTTON_RELEASE_MASK |
Gdk.EventMask.POINTER_MOTION_MASK |
Gdk.EventMask.ENTER_NOTIFY_MASK |
Gdk.EventMask.LEAVE_NOTIFY_MASK |
Gdk.EventMask.PROXIMITY_IN_MASK |
Gdk.EventMask.PROXIMITY_OUT_MASK,
None, 0L)
self.view.get_selection().select_path((0,))
......@@ -66,7 +83,7 @@ class LanguagesPopup(Gtk.Window):
self.sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
self.sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
self.view = Gtk.TreeView(self.model)
self.view = Gtk.TreeView(model=self.model)
self.view.show()
self.view.set_headers_visible(False)
......@@ -75,16 +92,16 @@ class LanguagesPopup(Gtk.Window):
renderer = Gtk.CellRendererToggle()
column.pack_start(renderer, False)
column.set_attributes(renderer, active=self.COLUMN_ENABLED)
column.add_attribute(renderer, 'active', self.COLUMN_ENABLED)
renderer.connect('toggled', self.on_language_toggled)
renderer = Gtk.CellRendererText()
column.pack_start(renderer, True)
column.set_attributes(renderer, text=self.COLUMN_NAME)
column.add_attribute(renderer, 'text', self.COLUMN_NAME)
self.view.append_column(column)
self.view.set_row_separator_func(self.on_separator)
self.view.set_row_separator_func(self.on_separator, None)
self.sw.add(self.view)
......@@ -93,7 +110,7 @@ class LanguagesPopup(Gtk.Window):
def enabled_languages(self, model, path, piter, ret):
enabled = model.get_value(piter, self.COLUMN_ENABLED)
if path == (0,) and enabled:
if path.get_indices()[0] == 0 and enabled:
return True
if enabled:
......@@ -107,13 +124,14 @@ class LanguagesPopup(Gtk.Window):
self.model.foreach(self.enabled_languages, ret)
return ret
def on_separator(self, model, piter):
def on_separator(self, model, piter, user_data=None):
val = model.get_value(piter, self.COLUMN_NAME)
return val == '-'
def init_languages(self, languages):
manager = GtkSource.LanguageManager()
langs = gedit.language_manager_list_languages_sorted(manager, True)
langs = [manager.get_language(x) for x in manager.get_language_ids()]
langs.sort(key=lambda x: x.get_name())
self.model.append([_('All languages'), None, not languages])
self.model.append(['-', None, False])
......@@ -124,7 +142,7 @@ class LanguagesPopup(Gtk.Window):
self.model.append([lang.get_name(), lang.get_id(), lang.get_id() in languages])
def correct_all(self, model, path, piter, enabled):
if path == (0,):
if path.get_indices()[0] == 0:
return False
model.set_value(piter, self.COLUMN_ENABLED, enabled)
......@@ -141,7 +159,7 @@ class LanguagesPopup(Gtk.Window):
self.model.set_value(self.model.get_iter_first(), self.COLUMN_ENABLED, False)
def do_key_press_event(self, event):
if event.keyval == Gtk.keysyms.Escape:
if event.keyval == Gdk.KEY_Escape:
self.destroy()
return True
else:
......@@ -154,19 +172,20 @@ class LanguagesPopup(Gtk.Window):
def in_window(self, event, window=None):
if not window:
window = self.window
window = self.get_window()
geometry = window.get_geometry()
origin = window.get_origin()
return event.x_root >= origin[0] and \
event.x_root <= origin[0] + geometry[2] and \
event.y_root >= origin[1] and \
event.y_root <= origin[1] + geometry[3]
return event.x_root >= origin[1] and \
event.x_root <= origin[1] + geometry[2] and \
event.y_root >= origin[2] and \
event.y_root <= origin[2] + geometry[3]
def do_destroy(self):
Gdk.keyboard_ungrab(0L)
Gdk.pointer_ungrab(0L)
if self.keyboard:
self.keyboard.ungrab(0L)
self.pointer.ungrab(0L)
return Gtk.Window.do_destroy(self)
......@@ -175,8 +194,8 @@ class LanguagesPopup(Gtk.Window):
to = window.get_origin()
event.window = window
event.x += fr[0] - to[0]
event.y += fr[1] - to[1]
event.x += fr[1] - to[1]
event.y += fr[2] - to[2]
def resolve_widgets(self, root):
res = [root]
......@@ -202,7 +221,7 @@ class LanguagesPopup(Gtk.Window):
orig = [event.x, event.y]
for widget in allwidgets:
windows = self.resolve_windows(widget.window)
windows = self.resolve_windows(widget.get_window())
windows.reverse()
for window in windows:
......@@ -871,7 +890,7 @@ class Manager:
for row in self._tool_rows[tool]:
path = row.get_path()
if path[0] == parent[0]:
if path.get_indices()[0] == parent.get_indices()[0]:
return True
return False
......@@ -884,7 +903,7 @@ class Manager:
ret = None
if node:
ref = Gtk.TreeRowReference(self.model, self.model.get_path(piter))
ref = Gtk.TreeRowReference.new(self.model, self.model.get_path(piter))
# Update languages, make sure to inhibit selection change stuff
self.view.get_selection().handler_block(self.selection_changed_id)
......@@ -942,8 +961,8 @@ class Manager:
popup = LanguagesPopup(self.current_node.languages)
popup.set_transient_for(self.dialog)
origin = button.window.get_origin()
popup.move(origin[0], origin[1] - popup.allocation.height)
origin = button.get_window().get_origin()
popup.move(origin[1], origin[2] - popup.get_allocation().height)
popup.connect('destroy', self.update_languages)
......
......@@ -163,6 +163,7 @@ class WindowActivatable(GObject.Object, Gedit.WindowActivatable):
GObject.Object.__init__(self)
self._manager = None
self._manager_default_size = None
self.menu = None
def do_activate(self):
self._library = ToolLibrary()
......@@ -215,6 +216,7 @@ class WindowActivatable(GObject.Object, Gedit.WindowActivatable):
image)
def do_update_state(self):
if self.menu is not None:
self.menu.filter(self.window.get_active_document())
self.window.get_ui_manager().ensure_update()
......
......@@ -611,7 +611,7 @@ add_popup_ui (GeditFileBrowserPlugin *plugin)
gtk_action_group_add_actions (action_group,
extra_single_selection_actions,
G_N_ELEMENTS (extra_single_selection_actions),
priv->window);
plugin);
gtk_ui_manager_insert_action_group (manager, action_group, 0);
priv->single_selection_action_group = action_group;
......
......@@ -92,7 +92,7 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
# File browser root directory
bus = self.window.get_message_bus()
try:
if bus.is_registered('/plugins/filebrowser', 'get_root'):
msg = bus.send_sync('/plugins/filebrowser', 'get_root')
if msg:
......@@ -101,9 +101,6 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
if gfile and gfile.is_native():
paths.append(gfile)
except StandardError as e:
print e
# Recent documents
paths.append(RecentDocumentsDirectory())
......
......@@ -858,7 +858,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals):
return not (x < rect.x or x > rect.x + rect.width or y < rect.y or y > rect.y + rect.height)
def on_drag_data_received(self, view, context, x, y, data, info, timestamp):
if not (Gtk.targets_include_uri(context.targets) and data.data and self.in_bounds(x, y)):
if not (Gtk.targets_include_uri(context.list_targets()) and data.data and self.in_bounds(x, y)):
return
if not self.view.get_editable():
......
......@@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import os
import errno
import tempfile
import sys
import shutil
......@@ -39,7 +40,7 @@ class Importer:
filename = os.path.join(userdir, root + '_' + str(i) + ext)
i += 1
return filename
return (userdir, filename)
def import_file(self, filename):
if not os.path.exists(filename):
......@@ -49,7 +50,14 @@ class Importer:
return _('File "%s" is not a valid snippets file') % filename
# Find destination for file to copy to
dest = self.import_destination(filename)
destdir, dest = self.import_destination(filename)
# Make sure dir exists
try:
os.makedirs(destdir)
except OSError, e:
if e.errno != errno.EEXIST:
raise
# Copy file
shutil.copy(filename, dest)
......
......@@ -851,7 +851,7 @@ class Manager(Gtk.Dialog, Gtk.Buildable):
if len(export_snippets) == 0 and show_dialogs:
message = _('There are no snippets selected to be exported')
message_dialog(self.get_toplevel(), Gtk.MessageType.INFORMATION, message)
message_dialog(self.get_toplevel(), Gtk.MessageType.QUESTION, message)
return False
if not filename:
......@@ -921,7 +921,7 @@ class Manager(Gtk.Dialog, Gtk.Buildable):
dlg.destroy()
message = _('There are no snippets selected to be exported')
message_dialog(self.get_toplevel(), Gtk.MessageType.INFORMATION, message)
message_dialog(self.get_toplevel(), Gtk.MessageType.QUESTION, message)
return
dlg.add_filter(self.file_filter(_('All supported archives'), ('*.gz','*.bz2','*.tar')))
......
......@@ -48,6 +48,8 @@
#define GEDIT_METADATA_ATTRIBUTE_SPELL_ENABLED "metadata::gedit-spell-enabled"
#endif
#define GEDIT_AUTOMATIC_SPELL_VIEW "GeditAutomaticSpellView"
#define MENU_PATH "/MenuBar/ToolsMenu/ToolsOps_1"
#define GEDIT_SPELL_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
......@@ -870,11 +872,14 @@ spell_cb (GtkAction *action,
static void
set_auto_spell (GeditWindow *window,
GeditDocument *doc,
GeditView *view,
gboolean active)
{
GeditAutomaticSpellChecker *autospell;
GeditSpellChecker *spell;
GeditDocument *doc;
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
spell = get_spell_checker_from_document (doc);
g_return_if_fail (spell != NULL);
......@@ -885,13 +890,8 @@ set_auto_spell (GeditWindow *window,
{
if (autospell == NULL)
{
GeditView *active_view;
active_view = gedit_window_get_active_view (window);
g_return_if_fail (active_view != NULL);
autospell = gedit_automatic_spell_checker_new (doc, spell);
gedit_automatic_spell_checker_attach_view (autospell, active_view);
gedit_automatic_spell_checker_attach_view (autospell, view);
gedit_automatic_spell_checker_recheck_all (autospell);
}
}
......@@ -906,8 +906,8 @@ static void
auto_spell_cb (GtkAction *action,
GeditWindow *window)
{
GeditDocument *doc;
GeditView *view;
gboolean active;
gedit_debug (DEBUG_PLUGINS);
......@@ -916,43 +916,44 @@ auto_spell_cb (GtkAction *action,
gedit_debug_message (DEBUG_PLUGINS, active ? "Auto Spell activated" : "Auto Spell deactivated");
doc = gedit_window_get_active_document (window);
if (doc == NULL)
view = gedit_window_get_active_view (window);
if (view == NULL)
return;
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
gedit_document_set_metadata (doc,
GEDIT_METADATA_ATTRIBUTE_SPELL_ENABLED,
active ? "1" : NULL, NULL);
set_auto_spell (window, doc, active);
set_auto_spell (window, view, active);
}
static void
update_ui (GeditSpellPlugin *plugin)
{
GeditSpellPluginPrivate *priv;
GeditDocument *doc;
GeditView *view;
gboolean autospell;
GtkAction *action;
gedit_debug (DEBUG_PLUGINS);
priv = plugin->priv;
doc = gedit_window_get_active_document (priv->window);
view = gedit_window_get_active_view (priv->window);
autospell = (doc != NULL &&
gedit_automatic_spell_checker_get_from_document (doc) != NULL);
if (doc != NULL)
if (view != NULL)
{
GeditDocument *doc;
GeditTab *tab;
GeditTabState state;
gboolean autospell;
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
tab = gedit_window_get_active_tab (priv->window);
state = gedit_tab_get_state (tab);
autospell = (doc != NULL &&
gedit_automatic_spell_checker_get_from_document (doc) != NULL);
/* If the document is loading we can't get the metadata so we
endup with an useless speller */
......@@ -963,7 +964,7 @@ update_ui (GeditSpellPlugin *plugin)
g_signal_handlers_block_by_func (action, auto_spell_cb,
priv->window);
set_auto_spell (priv->window, doc, autospell);
set_auto_spell (priv->window, view, autospell);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
autospell);
g_signal_handlers_unblock_by_func (action, auto_spell_cb,
......@@ -978,13 +979,15 @@ update_ui (GeditSpellPlugin *plugin)
static void
set_auto_spell_from_metadata (GeditWindow *window,
GeditDocument *doc,
GeditView *view,
GtkActionGroup *action_group)
{
gboolean active = FALSE;
gchar *active_str;
GeditDocument *doc;
GeditDocument *active_doc;
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
active_str = gedit_document_get_metadata (doc,
GEDIT_METADATA_ATTRIBUTE_SPELL_ENABLED);
......@@ -995,7 +998,7 @@ set_auto_spell_from_metadata (GeditWindow *window,
g_free (active_str);
}
set_auto_spell (window, doc, active);
set_auto_spell (window, view, active);
/* In case that the doc is the active one we mark the spell action */
active_doc = gedit_window_get_active_document (window);
......@@ -1024,6 +1027,7 @@ on_document_loaded (GeditDocument *doc,
if (error == NULL)
{
GeditSpellChecker *spell;
GeditView *view;
spell = GEDIT_SPELL_CHECKER (g_object_get_qdata (G_OBJECT (doc),
spell_checker_id));
......@@ -1032,7 +1036,9 @@ on_document_loaded (GeditDocument *doc,
set_language_from_metadata (spell, doc);
}
set_auto_spell_from_metadata (plugin->priv->window, doc,
view = GEDIT_VIEW (g_object_get_data (G_OBJECT (doc), GEDIT_AUTOMATIC_SPELL_VIEW));
set_auto_spell_from_metadata (plugin->priv->window, view,
plugin->priv->action_group);
}
}
......@@ -1077,9 +1083,15 @@ tab_added_cb (GeditWindow *window,
GeditTab *tab,
GeditSpellPlugin *plugin)
{
GeditView *view;
GeditDocument *doc;
doc = gedit_tab_get_document (tab);
view = gedit_tab_get_view (tab);
doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
/* we need to pass the view with the document as there is no way to
attach the view to the automatic spell checker. */
g_object_set_data (G_OBJECT (doc), GEDIT_AUTOMATIC_SPELL_VIEW, view);
g_signal_connect (doc, "loaded",
G_CALLBACK (on_document_loaded),
......@@ -1098,6 +1110,7 @@ tab_removed_cb (GeditWindow *window,
GeditDocument *doc;
doc = gedit_tab_get_document (tab);
g_object_set_data (G_OBJECT (doc), GEDIT_AUTOMATIC_SPELL_VIEW, NULL);
g_signal_handlers_disconnect_by_func (doc, on_document_loaded, plugin);
g_signal_handlers_disconnect_by_func (doc, on_document_saved, plugin);
......@@ -1108,7 +1121,7 @@ gedit_spell_plugin_activate (GeditWindowActivatable *activatable)
{
GeditSpellPluginPrivate *priv;
GtkUIManager *manager;
GList *docs, *l;
GList *views, *l;
gedit_debug (DEBUG_PLUGINS);
......@@ -1162,21 +1175,13 @@ gedit_spell_plugin_activate (GeditWindowActivatable *activatable)
update_ui (GEDIT_SPELL_PLUGIN (activatable));
docs = gedit_window_get_documents (priv->window);
for (l = docs; l != NULL; l = g_list_next (l))
views = gedit_window_get_views (priv->window);
for (l = views; l != NULL; l = g_list_next (l))
{
GeditDocument *doc = GEDIT_DOCUMENT (l->data);
GeditView *view = GEDIT_VIEW (l->data);
set_auto_spell_from_metadata (priv->window, doc,
set_auto_spell_from_metadata (priv->window, view,
priv->action_group);
g_signal_handlers_disconnect_by_func (doc,
on_document_loaded,
activatable);
g_signal_handlers_disconnect_by_func (doc,
on_document_saved,
activatable);
}
priv->tab_added_id =
......
#
# gedit translations
ug
# please keep this list sorted alphabetically
af
am
......@@ -62,6 +61,7 @@ ml
mn
mr
ms
my
nb
nds
ne
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.