...
 
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 gedit 3.0.3
=========== ===========
......
General Information 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. editor for the GNOME environment.
gedit is part of GNOME and uses the latest GTK+ and GNOME libraries. gedit is part of GNOME and uses the latest GTK+ and GNOME libraries.
...@@ -71,8 +71,8 @@ plugins support. ...@@ -71,8 +71,8 @@ plugins support.
Simple install procedure: Simple install procedure:
% gzip -cd gedit-3.0.3.tar.gz | tar xvf - # unpack the sources % gzip -cd gedit-3.0.6.tar.gz | tar xvf - # unpack the sources
% cd gedit-3.0.3 # change to the toplevel directory % cd gedit-3.0.6 # change to the toplevel directory
% ./configure # run the `configure' script % ./configure # run the `configure' script
% make # build gedit % make # build gedit
[ Become root if necessary ] [ Become root if necessary ]
......
...@@ -4,7 +4,7 @@ AC_PREREQ(2.63.2) ...@@ -4,7 +4,7 @@ AC_PREREQ(2.63.2)
m4_define(gedit_major_version, 3) m4_define(gedit_major_version, 3)
m4_define(gedit_minor_version, 0) 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) 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/]) 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 ================================================================ ...@@ -167,9 +167,6 @@ dnl ================================================================
IT_PROG_INTLTOOL([0.40.0]) IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
AC_SUBST([GETTEXT_PACKAGE], [gedit]) AC_SUBST([GETTEXT_PACKAGE], [gedit])
AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME], [Define to the gettext package name.]) AC_DEFINE([GETTEXT_PACKAGE],[PACKAGE_TARNAME], [Define to the gettext package name.])
......
...@@ -675,8 +675,6 @@ gedit_app_create_window_real (GeditApp *app, ...@@ -675,8 +675,6 @@ gedit_app_create_window_real (GeditApp *app,
{ {
GeditWindow *window; GeditWindow *window;
gedit_debug (DEBUG_APP);
/* /*
* We need to be careful here, there is a race condition: * We need to be careful here, there is a race condition:
* when another gedit is launched it checks active_window, * when another gedit is launched it checks active_window,
...@@ -766,6 +764,8 @@ gedit_app_create_window (GeditApp *app, ...@@ -766,6 +764,8 @@ gedit_app_create_window (GeditApp *app,
{ {
GeditWindow *window; GeditWindow *window;
gedit_debug (DEBUG_APP);
window = gedit_app_create_window_real (app, TRUE, NULL); window = gedit_app_create_window_real (app, TRUE, NULL);
if (screen != NULL) if (screen != NULL)
...@@ -784,6 +784,8 @@ _gedit_app_restore_window (GeditApp *app, ...@@ -784,6 +784,8 @@ _gedit_app_restore_window (GeditApp *app,
{ {
GeditWindow *window; GeditWindow *window;
gedit_debug (DEBUG_APP);
window = gedit_app_create_window_real (app, FALSE, role); window = gedit_app_create_window_real (app, FALSE, role);
return window; return window;
...@@ -897,7 +899,8 @@ is_in_viewport (GeditWindow *window, ...@@ -897,7 +899,8 @@ is_in_viewport (GeditWindow *window,
* equal parts called viewports. This function retrives the #GeditWindow in * equal parts called viewports. This function retrives the #GeditWindow in
* the given viewport of the given workspace. * 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 * GeditWindow *
_gedit_app_get_window_in_viewport (GeditApp *app, _gedit_app_get_window_in_viewport (GeditApp *app,
...@@ -929,8 +932,7 @@ _gedit_app_get_window_in_viewport (GeditApp *app, ...@@ -929,8 +932,7 @@ _gedit_app_get_window_in_viewport (GeditApp *app,
return window; return window;
} }
/* no window on this workspace... create a new one */ return NULL;
return gedit_app_create_window (app, screen);
} }
/** /**
......
...@@ -24,11 +24,12 @@ ...@@ -24,11 +24,12 @@
#include <errno.h> #include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include "gedit-utils.h" #include "gedit-debug.h"
#include "gedit-command-line.h"
#include "gedit-window.h"
#include "gedit-app.h" #include "gedit-app.h"
#include "gedit-command-line.h"
#include "gedit-commands.h" #include "gedit-commands.h"
#include "gedit-window.h"
#include "gedit-utils.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
...@@ -250,6 +251,8 @@ activate_service (GeditDBus *dbus, ...@@ -250,6 +251,8 @@ activate_service (GeditDBus *dbus,
GDBusConnection *conn; GDBusConnection *conn;
GVariant *ret; GVariant *ret;
gedit_debug (DEBUG_DBUS);
conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (conn == NULL) if (conn == NULL)
...@@ -485,6 +488,8 @@ on_open_proxy_signal (GDBusProxy *proxy, ...@@ -485,6 +488,8 @@ on_open_proxy_signal (GDBusProxy *proxy,
GVariant *parameters, GVariant *parameters,
GeditDBus *dbus) GeditDBus *dbus)
{ {
gedit_debug (DEBUG_DBUS);
if (g_strcmp0 (signal_name, "WaitDone") == 0) if (g_strcmp0 (signal_name, "WaitDone") == 0)
{ {
guint wait_id; guint wait_id;
...@@ -716,6 +721,8 @@ handle_slave (GeditDBus *dbus) ...@@ -716,6 +721,8 @@ handle_slave (GeditDBus *dbus)
GDBusProxyFlags flags; GDBusProxyFlags flags;
GeditCommandLine *command_line; GeditCommandLine *command_line;
gedit_debug (DEBUG_DBUS);
conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
if (conn == NULL) if (conn == NULL)
...@@ -754,6 +761,8 @@ handle_slave (GeditDBus *dbus) ...@@ -754,6 +761,8 @@ handle_slave (GeditDBus *dbus)
static GeditDBusResult static GeditDBusResult
handle_master (GeditDBus *dbus) handle_master (GeditDBus *dbus)
{ {
gedit_debug (DEBUG_DBUS);
/* let the main gedit thing do its thing */ /* let the main gedit thing do its thing */
if (g_getenv ("DBUS_STARTER_ADDRESS")) if (g_getenv ("DBUS_STARTER_ADDRESS"))
{ {
...@@ -821,8 +830,7 @@ display_open_if_needed (const gchar *name) ...@@ -821,8 +830,7 @@ display_open_if_needed (const gchar *name)
static GeditWindow * static GeditWindow *
window_from_display_arguments (gboolean new_window, window_from_display_arguments (gboolean new_window,
DisplayParameters *dparams, DisplayParameters *dparams)
gboolean create)
{ {
GdkScreen *screen = NULL; GdkScreen *screen = NULL;
GeditApp *app; GeditApp *app;
...@@ -861,18 +869,16 @@ window_from_display_arguments (gboolean new_window, ...@@ -861,18 +869,16 @@ window_from_display_arguments (gboolean new_window,
ret = gedit_app_get_active_window (app); ret = gedit_app_get_active_window (app);
} }
if (!ret && create) if (!ret)
{ {
ret = gedit_app_create_window (app, screen); ret = gedit_app_create_window (app, screen);
gedit_window_create_tab (ret, TRUE);
} }
return ret; return ret;
} }
static gboolean static gboolean
is_empty_window (GeditWindow *window, is_empty_window (GeditWindow *window)
gboolean check_untouched)
{ {
GList *views; GList *views;
gboolean ret = FALSE; gboolean ret = FALSE;
...@@ -883,7 +889,20 @@ is_empty_window (GeditWindow *window, ...@@ -883,7 +889,20 @@ is_empty_window (GeditWindow *window,
{ {
ret = TRUE; 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); GeditView *view = GEDIT_VIEW (views->data);
GeditDocument *doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view))); GeditDocument *doc = GEDIT_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)));
...@@ -910,6 +929,8 @@ set_interaction_time_and_present (GeditWindow *window, ...@@ -910,6 +929,8 @@ set_interaction_time_and_present (GeditWindow *window,
* has been realized otherwise it will not work. lame. * has been realized otherwise it will not work. lame.
*/ */
gedit_debug (DEBUG_DBUS);
if (!gtk_widget_get_realized (GTK_WIDGET (window))) if (!gtk_widget_get_realized (GTK_WIDGET (window)))
{ {
gtk_widget_realize (GTK_WIDGET (window)); gtk_widget_realize (GTK_WIDGET (window));
...@@ -952,7 +973,7 @@ wait_handler_dbus (GObject *object, ...@@ -952,7 +973,7 @@ wait_handler_dbus (GObject *object,
g_object_unref (conn); g_object_unref (conn);
if (data->window && object != G_OBJECT (data->window) && 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 */ /* Close the window */
gtk_widget_destroy (GTK_WIDGET (data->window)); gtk_widget_destroy (GTK_WIDGET (data->window));
...@@ -1303,7 +1324,6 @@ handle_open_fds (GeditDBus *dbus, ...@@ -1303,7 +1324,6 @@ handle_open_fds (GeditDBus *dbus,
g_slist_free (tabs); g_slist_free (tabs);
return g_slist_concat (loaded, g_slist_reverse (ret)); return g_slist_concat (loaded, g_slist_reverse (ret));
} }
static void static void
...@@ -1329,6 +1349,8 @@ dbus_handle_open (GeditDBus *dbus, ...@@ -1329,6 +1349,8 @@ dbus_handle_open (GeditDBus *dbus,
GeditWindow *window; GeditWindow *window;
GSList *loaded_documents = NULL; GSList *loaded_documents = NULL;
gboolean empty_window; gboolean empty_window;
gboolean untouched_window;
gboolean jump_to;
WaitData *data; WaitData *data;
guint32 wait_id = 0; guint32 wait_id = 0;
...@@ -1357,8 +1379,7 @@ dbus_handle_open (GeditDBus *dbus, ...@@ -1357,8 +1379,7 @@ dbus_handle_open (GeditDBus *dbus,
NULL); NULL);
window = window_from_display_arguments (new_window, window = window_from_display_arguments (new_window,
&display_parameters, &display_parameters);
TRUE);
g_free (display_parameters.display_name); g_free (display_parameters.display_name);
...@@ -1381,7 +1402,8 @@ dbus_handle_open (GeditDBus *dbus, ...@@ -1381,7 +1402,8 @@ dbus_handle_open (GeditDBus *dbus,
g_free (charset_encoding); 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, extract_optional_parameters (options_hash,
"line_position", &open_parameters.line_position, "line_position", &open_parameters.line_position,
...@@ -1412,18 +1434,37 @@ dbus_handle_open (GeditDBus *dbus, ...@@ -1412,18 +1434,37 @@ dbus_handle_open (GeditDBus *dbus,
"startup_time", &startup_time, "startup_time", &startup_time,
NULL); 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; jump_to = FALSE;
} }
set_interaction_time_and_present (window, startup_time);
if (!wait)
{
handle_open_pipe (dbus, handle_open_pipe (dbus,
pipe_path, pipe_path,
window, window,
...@@ -1433,30 +1474,19 @@ dbus_handle_open (GeditDBus *dbus, ...@@ -1433,30 +1474,19 @@ dbus_handle_open (GeditDBus *dbus,
} }
else else
{ {
gboolean jump_to = loaded_documents == NULL;
gboolean has_pipe; gboolean has_pipe;
data = g_slice_new (WaitData); data = g_slice_new (WaitData);
data->dbus = dbus; data->dbus = dbus;
data->window = window; data->window = window;
data->close_window = empty_window; data->close_window = (empty_window || untouched_window);
data->wait_id = ++dbus->priv->next_wait_id; data->wait_id = ++dbus->priv->next_wait_id;
data->num_handlers = 0; data->num_handlers = 0;
/* for the return value */ /* for the return value */
wait_id = data->wait_id; 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, has_pipe = handle_open_pipe (dbus,
pipe_path, pipe_path,
window, window,
...@@ -1466,7 +1496,7 @@ dbus_handle_open (GeditDBus *dbus, ...@@ -1466,7 +1496,7 @@ dbus_handle_open (GeditDBus *dbus,
/* Install wait handler on the window if there were no documents /* Install wait handler on the window if there were no documents
opened */ opened */
if (loaded_documents == NULL && !has_pipe) if ((loaded_documents == NULL) && !has_pipe)
{ {
/* Add wait handler on the window */ /* Add wait handler on the window */
install_wait_handler (dbus, install_wait_handler (dbus,
...@@ -1511,6 +1541,10 @@ dbus_command_line_method_call_cb (GDBusConnection *connection, ...@@ -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 (object_path, "/org/gnome/gedit") == 0);
g_return_if_fail (g_strcmp0 (interface_name, "org.gnome.gedit.CommandLine") == 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) if (g_strcmp0 (method_name, "Open") == 0)
{ {
dbus_handle_open (user_data, parameters, invocation); dbus_handle_open (user_data, parameters, invocation);
...@@ -1519,6 +1553,7 @@ dbus_command_line_method_call_cb (GDBusConnection *connection, ...@@ -1519,6 +1553,7 @@ dbus_command_line_method_call_cb (GDBusConnection *connection,
{ {
g_warning ("Unsupported method called on gedit service: %s", method_name); g_warning ("Unsupported method called on gedit service: %s", method_name);
} }
}
} }
static const gchar introspection_xml[] = static const gchar introspection_xml[] =
...@@ -1566,6 +1601,8 @@ bus_acquired_cb (GDBusConnection *connection, ...@@ -1566,6 +1601,8 @@ bus_acquired_cb (GDBusConnection *connection,
const gchar *name, const gchar *name,
GeditDBus *dbus) GeditDBus *dbus)
{ {
gedit_debug (DEBUG_DBUS);
if (connection == NULL) if (connection == NULL)
{ {
g_warning ("Failed to acquire dbus connection"); g_warning ("Failed to acquire dbus connection");
...@@ -1587,6 +1624,8 @@ name_acquired_cb (GDBusConnection *connection, ...@@ -1587,6 +1624,8 @@ name_acquired_cb (GDBusConnection *connection,
const gchar *name, const gchar *name,
GeditDBus *dbus) GeditDBus *dbus)
{ {
gedit_debug (DEBUG_DBUS);
dbus->priv->result = GEDIT_DBUS_RESULT_SUCCESS; dbus->priv->result = GEDIT_DBUS_RESULT_SUCCESS;
g_main_loop_quit (dbus->priv->main_loop); g_main_loop_quit (dbus->priv->main_loop);
} }
...@@ -1596,6 +1635,8 @@ name_lost_cb (GDBusConnection *connection, ...@@ -1596,6 +1635,8 @@ name_lost_cb (GDBusConnection *connection,
const gchar *name, const gchar *name,
GeditDBus *dbus) GeditDBus *dbus)
{ {
gedit_debug (DEBUG_DBUS);
dbus->priv->result = GEDIT_DBUS_RESULT_FAILED; dbus->priv->result = GEDIT_DBUS_RESULT_FAILED;
g_main_loop_quit (dbus->priv->main_loop); g_main_loop_quit (dbus->priv->main_loop);
} }
...@@ -1607,6 +1648,8 @@ gedit_dbus_run (GeditDBus *dbus) ...@@ -1607,6 +1648,8 @@ gedit_dbus_run (GeditDBus *dbus)
g_return_val_if_fail (GEDIT_IS_DBUS (dbus), GEDIT_DBUS_RESULT_PROCEED); g_return_val_if_fail (GEDIT_IS_DBUS (dbus), GEDIT_DBUS_RESULT_PROCEED);
gedit_debug (DEBUG_DBUS);
command_line = gedit_command_line_get_default (); command_line = gedit_command_line_get_default ();
if (gedit_command_line_get_standalone (command_line)) if (gedit_command_line_get_standalone (command_line))
...@@ -1636,6 +1679,8 @@ gedit_dbus_run (GeditDBus *dbus) ...@@ -1636,6 +1679,8 @@ gedit_dbus_run (GeditDBus *dbus)
dbus, dbus,
NULL); NULL);
gedit_debug_message (DEBUG_DBUS, "Own name org.gnome.gedit\n");
dbus->priv->main_loop = g_main_loop_new (NULL, FALSE); dbus->priv->main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (dbus->priv->main_loop); g_main_loop_run (dbus->priv->main_loop);
g_main_loop_unref (dbus->priv->main_loop); g_main_loop_unref (dbus->priv->main_loop);
......
...@@ -88,7 +88,8 @@ gedit_debug_init (void) ...@@ -88,7 +88,8 @@ gedit_debug_init (void)
debug = debug | GEDIT_DEBUG_SAVER; debug = debug | GEDIT_DEBUG_SAVER;
if (g_getenv ("GEDIT_DEBUG_PANEL") != NULL) if (g_getenv ("GEDIT_DEBUG_PANEL") != NULL)
debug = debug | GEDIT_DEBUG_PANEL; debug = debug | GEDIT_DEBUG_PANEL;
if (g_getenv ("GEDIT_DEBUG_DBUS") != NULL)
debug = debug | GEDIT_DEBUG_DBUS;
out: out:
#ifdef ENABLE_PROFILING #ifdef ENABLE_PROFILING
......
...@@ -57,7 +57,8 @@ typedef enum { ...@@ -57,7 +57,8 @@ typedef enum {
GEDIT_DEBUG_WINDOW = 1 << 12, GEDIT_DEBUG_WINDOW = 1 << 12,
GEDIT_DEBUG_LOADER = 1 << 13, GEDIT_DEBUG_LOADER = 1 << 13,
GEDIT_DEBUG_SAVER = 1 << 14, GEDIT_DEBUG_SAVER = 1 << 14,
GEDIT_DEBUG_PANEL = 1 << 15 GEDIT_DEBUG_PANEL = 1 << 15,
GEDIT_DEBUG_DBUS = 1 << 16
} GeditDebugSection; } GeditDebugSection;
...@@ -78,6 +79,7 @@ typedef enum { ...@@ -78,6 +79,7 @@ typedef enum {
#define DEBUG_LOADER GEDIT_DEBUG_LOADER, __FILE__, __LINE__, G_STRFUNC #define DEBUG_LOADER GEDIT_DEBUG_LOADER, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_SAVER GEDIT_DEBUG_SAVER, __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_PANEL GEDIT_DEBUG_PANEL, __FILE__, __LINE__, G_STRFUNC
#define DEBUG_DBUS GEDIT_DEBUG_DBUS, __FILE__, __LINE__, G_STRFUNC
void gedit_debug_init (void); void gedit_debug_init (void);
......
...@@ -622,14 +622,22 @@ gedit_notebook_remove_tab (GeditNotebook *nb, ...@@ -622,14 +622,22 @@ gedit_notebook_remove_tab (GeditNotebook *nb,
void void
gedit_notebook_remove_all_tabs (GeditNotebook *nb) gedit_notebook_remove_all_tabs (GeditNotebook *nb)
{ {
GList *tabs, *t;
g_return_if_fail (GEDIT_IS_NOTEBOOK (nb)); g_return_if_fail (GEDIT_IS_NOTEBOOK (nb));
g_list_free (nb->priv->focused_pages); g_list_free (nb->priv->focused_pages);
nb->priv->focused_pages = NULL; nb->priv->focused_pages = NULL;
gtk_container_foreach (GTK_CONTAINER (nb), /* Remove tabs in reverse order since it is faster
(GtkCallback)remove_tab, * due to how gtknotebook works */
nb); 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 static void
......
...@@ -1237,8 +1237,6 @@ init_search_entry (GeditViewFrame *frame) ...@@ -1237,8 +1237,6 @@ init_search_entry (GeditViewFrame *frame)
guint old_find_flags = 0; guint old_find_flags = 0;
gint sel_len = 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_text = gedit_document_get_search_text (GEDIT_DOCUMENT (buffer),
&old_find_flags); &old_find_flags);
...@@ -1260,6 +1258,7 @@ init_search_entry (GeditViewFrame *frame) ...@@ -1260,6 +1258,7 @@ init_search_entry (GeditViewFrame *frame)
} }
else if (old_find_text != NULL) else if (old_find_text != NULL)
{ {
g_free (frame->priv->old_search_text);
frame->priv->old_search_text = old_find_text; frame->priv->old_search_text = old_find_text;
add_search_completion_entry (old_find_text); add_search_completion_entry (old_find_text);
g_signal_handler_block (frame->priv->search_entry, g_signal_handler_block (frame->priv->search_entry,
...@@ -1433,6 +1432,7 @@ gedit_view_frame_init (GeditViewFrame *frame) ...@@ -1433,6 +1432,7 @@ gedit_view_frame_init (GeditViewFrame *frame)
frame); frame);
frame->priv->view = gedit_view_new (doc); frame->priv->view = gedit_view_new (doc);
gtk_widget_set_vexpand (frame->priv->view, TRUE);
gtk_widget_show (frame->priv->view); gtk_widget_show (frame->priv->view);
g_object_unref (doc); g_object_unref (doc);
......
...@@ -4358,8 +4358,9 @@ process_create_tab (GeditWindow *window, ...@@ -4358,8 +4358,9 @@ process_create_tab (GeditWindow *window,
return NULL; 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), gedit_notebook_add_tab (GEDIT_NOTEBOOK (notebook),
tab, tab,
-1, -1,
...@@ -4392,6 +4393,8 @@ gedit_window_create_tab (GeditWindow *window, ...@@ -4392,6 +4393,8 @@ gedit_window_create_tab (GeditWindow *window,
g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL); g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
gedit_debug (DEBUG_WINDOW);
notebook = _gedit_window_get_notebook (window); notebook = _gedit_window_get_notebook (window);
tab = GEDIT_TAB (_gedit_tab_new ()); tab = GEDIT_TAB (_gedit_tab_new ());
gtk_widget_show (GTK_WIDGET (tab)); gtk_widget_show (GTK_WIDGET (tab));
...@@ -4431,6 +4434,8 @@ gedit_window_create_tab_from_location (GeditWindow *window, ...@@ -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 (GEDIT_IS_WINDOW (window), NULL);
g_return_val_if_fail (G_IS_FILE (location), NULL); g_return_val_if_fail (G_IS_FILE (location), NULL);
gedit_debug (DEBUG_WINDOW);
notebook = _gedit_window_get_notebook (window); notebook = _gedit_window_get_notebook (window);
tab = _gedit_tab_new_from_location (location, tab = _gedit_tab_new_from_location (location,
encoding, encoding,
...@@ -4463,6 +4468,8 @@ gedit_window_create_tab_from_stream (GeditWindow *window, ...@@ -4463,6 +4468,8 @@ gedit_window_create_tab_from_stream (GeditWindow *window,
GtkWidget *notebook; GtkWidget *notebook;
GtkWidget *tab; GtkWidget *tab;
gedit_debug (DEBUG_WINDOW);
g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL); g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
g_return_val_if_fail (G_IS_INPUT_STREAM (stream), NULL); g_return_val_if_fail (G_IS_INPUT_STREAM (stream), NULL);
......
...@@ -177,7 +177,7 @@ gedit_theatrics_stage_init (GeditTheatricsStage *stage) ...@@ -177,7 +177,7 @@ gedit_theatrics_stage_init (GeditTheatricsStage *stage)
g_direct_equal); g_direct_equal);
} }
static void static gboolean
iterate_actors (gpointer key, iterate_actors (gpointer key,
gpointer value, gpointer value,
GeditTheatricsStage *stage) GeditTheatricsStage *stage)
...@@ -188,10 +188,7 @@ iterate_actors (gpointer key, ...@@ -188,10 +188,7 @@ iterate_actors (gpointer key,
g_signal_emit (G_OBJECT (stage), signals[ACTOR_STEP], 0, actor); g_signal_emit (G_OBJECT (stage), signals[ACTOR_STEP], 0, actor);
if (gedit_theatrics_actor_get_expired (actor)) return gedit_theatrics_actor_get_expired (actor);
{
g_hash_table_remove (stage->priv->actors, key);
}
} }
static gboolean static gboolean
...@@ -203,8 +200,8 @@ on_timeout (GeditTheatricsStage *stage) ...@@ -203,8 +200,8 @@ on_timeout (GeditTheatricsStage *stage)
return FALSE; return FALSE;
} }
g_hash_table_foreach (stage->priv->actors, g_hash_table_foreach_remove (stage->priv->actors,
(GHFunc)iterate_actors, (GHRFunc)iterate_actors,
stage); stage);
g_signal_emit (G_OBJECT (stage), signals[ITERATION], 0); g_signal_emit (G_OBJECT (stage), signals[ITERATION], 0);
......
This diff is collapsed.
This diff is collapsed.
# Hungarian translation of gedit help # Hungarian translation of gedit help
# Mate Ory <orymate at gmail dot com>, 2007, 2008. # Mate Ory <orymate at gmail dot com>, 2007, 2008.
# Gabor Kelemen <kelemeng at gnome dot hu>, 2007, 2008, 2009, 2010, 2011. # Gabor Kelemen <kelemeng at gnome dot hu>, 2007, 2008, 2009, 2010, 2011.
# Balázs Úr <urbalazs at gmail dot com>, 2013.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gedit_help master\n" "Project-Id-Version: gedit_help master\n"
"POT-Creation-Date: 2011-04-19 21:51+0000\n" "POT-Creation-Date: 2012-01-06 18:44+0000\n"
"PO-Revision-Date: 2011-04-21 22:40+0200\n" "PO-Revision-Date: 2013-09-26 21:38+0200\n"
"Last-Translator: Gabor Kelemen <kelemeng at gnome dot hu>\n" "Last-Translator: Balázs Úr <urbalazs at gmail dot com>\n"
"Language-Team: Hungarian <gnome at fsf dot hu>\n" "Language-Team: Hungarian <gnome at fsf dot hu>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\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" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: hu\n"
#. When image changes, this message will be marked fuzzy or untranslated for you. #. 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. #. It doesn't matter what you translate it to: it's not used at all.
#: C/index.page:22(None) #: C/index.page:22(None)
msgid "@@image: 'figures/gedit-icon.png'; md5=a7174de2671462e1ac4f80a82ad09184" 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) #: C/index.page:7(title) C/index.page:8(title)
msgid "gedit Text Editor" msgid "gedit Text Editor"
...@@ -129,8 +132,10 @@ msgstr "Nyomtatás a gedittel" ...@@ -129,8 +132,10 @@ msgstr "Nyomtatás a gedittel"
#. It doesn't matter what you translate it to: it's not used at all. #. 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-view-open-files-in-sidepane.page:25(None)
#: C/gedit-open-files-from-sidepane.page:51(None) #: C/gedit-open-files-from-sidepane.page:51(None)
msgid "@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57" msgid ""
msgstr "@@image: 'figures/gedit-side-pane2.png'; md5=e7a12a43adc9c9cb8c992ad22a815a57" "@@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-view-open-files-in-sidepane.page:14(name)
#: C/gedit-undo-recent-action.page:14(name) C/gedit-tabs.page:15(name) #: C/gedit-undo-recent-action.page:14(name) C/gedit-tabs.page:15(name)
...@@ -811,7 +816,8 @@ msgstr "Szöveg keresése" ...@@ -811,7 +816,8 @@ msgstr "Szöveg keresése"
msgid "" msgid ""
"The Find tool can help you find specific sequences of text within in your " "The Find tool can help you find specific sequences of text within in your "
"file." "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) #: C/gedit-search.page:23(title)
msgid "Finding text" msgid "Finding text"
...@@ -829,11 +835,11 @@ msgstr "" ...@@ -829,11 +835,11 @@ msgstr ""
"nyomja meg a <keyseq><key>Ctrl</key><key>F</key></keyseq> kombinációt. Ez a " "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." "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>." 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>." 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 "" msgid ""
"As you type, <app>gedit</app> will begin highlighting the portions of text " "As you type, <app>gedit</app> will begin highlighting the portions of text "
"that match what you have entered." "that match what you have entered."
...@@ -841,23 +847,41 @@ msgstr "" ...@@ -841,23 +847,41 @@ msgstr ""
"Gépelés közben a <app>gedit</app> megkezdi a beírt szövegre illeszkedő " "Gépelés közben a <app>gedit</app> megkezdi a beírt szövegre illeszkedő "
"szövegdarabok kiemelését." "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 "" msgid ""
"Use the <gui>up</gui> or <gui>down</gui> facing arrows next to the " "Click on 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 " "<gui>search window</gui>"
"<keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq>) to scroll up "
"or down through the highlighted text."
msgstr "" msgstr ""
"Használja a <gui>keresés ablak</gui> melletti <gui>fel</gui> vagy <gui>le</" "Kattintson a <gui>keresőablak</gui> mellett <gui>fel</gui> vagy <gui>le</"
"gui> mutató nyilakat (vagy a <keyseq><key>Ctrl</key><key>G</key></keyseq> és " "gui> mutató nyilakra."
"<keyseq><key>Ctrl</key><key>Shift</key><key>G</key></keyseq> kombinációkat) "
"a kiemelt szövegben való fel vagy le mozgáshoz."
#: 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>." 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 "" msgid ""
"The text that you've searched for will remain highlighted by gedit, even " "The text that you've searched for will remain highlighted by gedit, even "
"after you have completed your search. To remove the highlight, click " "after you have completed your search. To remove the highlight, click "
...@@ -1166,11 +1190,14 @@ msgstr "" ...@@ -1166,11 +1190,14 @@ msgstr ""
#. When image changes, this message will be marked fuzzy or untranslated for you. #. 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. #. It doesn't matter what you translate it to: it's not used at all.
#: C/gedit-plugins-tag-list.page:33(None) #: C/gedit-plugins-tag-list.page:33(None)
msgid "@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c" msgid ""
msgstr "@@image: 'figures/gedit-side-pane3.png'; md5=4b800d370193ac0ed8db9eb33b86e11c" "@@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) #: 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 "" msgstr ""
"Címkék, karakterláncok és speciális karakterek automatikus beszúrása a " "Címkék, karakterláncok és speciális karakterek automatikus beszúrása a "
"dokumentumba" "dokumentumba"
...@@ -1255,7 +1282,8 @@ msgstr "" ...@@ -1255,7 +1282,8 @@ msgstr ""
msgid "" msgid ""
"Select the desired tag type from the drop-down menu at the top of the side " "Select the desired tag type from the drop-down menu at the top of the side "
"pane." "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) #: C/gedit-plugins-tag-list.page:46(p)
msgid "Scroll through the list to find the desired tag or character." 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." ...@@ -1269,7 +1297,8 @@ msgstr "Kattintson duplán a címkén az elemlistában."
msgid "" msgid ""
"The tag or special character you've chosen will then be displayed in your " "The tag or special character you've chosen will then be displayed in your "
"document." "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) #: C/gedit-plugins-tag-list.page:54(title)
msgid "Tag List Tips" msgid "Tag List Tips"
...@@ -1309,7 +1338,8 @@ msgid "Sort text into alphabetical order" ...@@ -1309,7 +1338,8 @@ msgid "Sort text into alphabetical order"
msgstr "Szöveg betűrendbe rendezése" msgstr "Szöveg betűrendbe rendezése"
#: C/gedit-plugins-sort.page:20(p) #: 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." msgstr "A Rendezés bővítmény a kijelölt sorokat betűrendbe teszi."
#: C/gedit-plugins-sort.page:22(p) #: C/gedit-plugins-sort.page:22(p)
...@@ -1353,7 +1383,8 @@ msgstr "" ...@@ -1353,7 +1383,8 @@ msgstr ""
"kiválasztását." "kiválasztását."
#: C/gedit-plugins-sort.page:30(p) #: 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 "" msgstr ""
"A <em>Fordított sorrend</em> beállítás a szöveget fordított betűrendbe " "A <em>Fordított sorrend</em> beállítás a szöveget fordított betűrendbe "
"rendezi." "rendezi."
...@@ -1386,7 +1417,8 @@ msgstr "A rendezés végrehajtásához nyomja meg a <gui>Rendezés</gui> gombot. ...@@ -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) #: C/gedit-plugins-snippets.page:15(title)
msgid "Use snippets to quickly insert often-used pieces of text" 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 #. TODO: write documentation for gedit snippets
#: C/gedit-plugins-snippets.page:19(p) #: C/gedit-plugins-snippets.page:19(p)
...@@ -1752,8 +1784,10 @@ msgstr "" ...@@ -1752,8 +1784,10 @@ msgstr ""
#. It doesn't matter what you translate it to: it's not used at all. #. 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-plugins-file-browser.page:31(None)
#: C/gedit-open-files-from-sidepane.page:36(None) #: C/gedit-open-files-from-sidepane.page:36(None)
msgid "@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53" msgid ""
msgstr "@@image: 'figures/gedit-side-pane1.png'; md5=ac9c80cb0552d63b593c71f23be69b53" "@@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) #: C/gedit-plugins-file-browser.page:18(title)
msgid "Use the side pane to browse and open files" msgid "Use the side pane to browse and open files"
...@@ -2046,11 +2080,14 @@ msgstr "" ...@@ -2046,11 +2080,14 @@ msgstr ""
"hozzáférést. A legutóbb használt fájlok eléréséhez:" "hozzáférést. A legutóbb használt fájlok eléréséhez:"
#: C/gedit-open-recent.page:18(p) #: C/gedit-open-recent.page:18(p)
msgid "Click the downward-facing arrow to the right of the <gui>Open</gui> button." msgid ""
msgstr "Kattintson a lefelé mutató nyílra a <gui>Megnyitás</gui> gomb jobb oldalán." "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) #: 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." msgstr "A <app>gedit</app> megjeleníti a legutóbb használt öt fájlt."
#: C/gedit-open-recent.page:20(p) #: C/gedit-open-recent.page:20(p)
...@@ -2436,8 +2473,10 @@ msgid "su -" ...@@ -2436,8 +2473,10 @@ msgid "su -"
msgstr "su -" msgstr "su -"
#: C/gedit-edit-as-root.page:24(p) #: C/gedit-edit-as-root.page:24(p)
msgid "You would then launch <app>gedit</app> using the <cmd>gedit</cmd> command." msgid ""
msgstr "Ezután a <app>gedit</app> a <cmd>gedit</cmd> parancs kiadásával indítható el." "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) #: C/gedit-edit-as-root.page:26(p)
msgid "" msgid ""
...@@ -2562,3 +2601,13 @@ msgstr "" ...@@ -2562,3 +2601,13 @@ msgstr ""
"Kelemen Gábor <kelemeng at gnome dot hu>, 2007., 2008.\n" "Kelemen Gábor <kelemeng at gnome dot hu>, 2007., 2008.\n"
"Őry Máté <orymate at gmail dot com>, 2007., 2008." "Ő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): ...@@ -101,7 +101,7 @@ class Capture(GObject.Object):
fcntl.fcntl(self.pipe.stdout.fileno(), fcntl.F_SETFL, flags) fcntl.fcntl(self.pipe.stdout.fileno(), fcntl.F_SETFL, flags)
GObject.io_add_watch(self.pipe.stdout, GObject.io_add_watch(self.pipe.stdout,
GObject.IOCondition.IN | GObject.IOCondition.HUP, GObject.IO_IN | GObject.IO_HUP,
self.on_output) self.on_output)
if self.flags & self.CAPTURE_STDERR: if self.flags & self.CAPTURE_STDERR:
...@@ -110,7 +110,7 @@ class Capture(GObject.Object): ...@@ -110,7 +110,7 @@ class Capture(GObject.Object):
fcntl.fcntl(self.pipe.stderr.fileno(), fcntl.F_SETFL, flags) fcntl.fcntl(self.pipe.stderr.fileno(), fcntl.F_SETFL, flags)
GObject.io_add_watch(self.pipe.stderr, GObject.io_add_watch(self.pipe.stderr,
GObject.IOCondition.IN | GObject.IOCondition.HUP, GObject.IO_IN | GObject.IO_HUP,
self.on_output) self.on_output)
# IO # IO
......
...@@ -72,7 +72,7 @@ class AbsoluteFileLookupProvider(FileLookupProvider): ...@@ -72,7 +72,7 @@ class AbsoluteFileLookupProvider(FileLookupProvider):
def lookup(self, path): def lookup(self, path):
if os.path.isabs(path) and os.path.isfile(path): if os.path.isabs(path) and os.path.isfile(path):
return gio.File(path) return Gio.file_new_for_path(path)
else: else:
return None return None
...@@ -92,7 +92,7 @@ class CwdFileLookupProvider(FileLookupProvider): ...@@ -92,7 +92,7 @@ class CwdFileLookupProvider(FileLookupProvider):
real_path = os.path.join(cwd, path) real_path = os.path.join(cwd, path)
if os.path.isfile(real_path): if os.path.isfile(real_path):
return gio.File(real_path) return Gio.file_new_for_path(real_path)
else: else:
return None return None
...@@ -109,14 +109,14 @@ class OpenDocumentRelPathFileLookupProvider(FileLookupProvider): ...@@ -109,14 +109,14 @@ class OpenDocumentRelPathFileLookupProvider(FileLookupProvider):
if path.startswith('/'): if path.startswith('/'):
return None return None
for doc in Gedit.app_get_default().get_documents(): for doc in Gedit.App.get_default().get_documents():
if doc.is_local(): if doc.is_local():
location = doc.get_location() location = doc.get_location()
if location: if location:
rel_path = location.get_parent().get_path() rel_path = location.get_parent().get_path()
joined_path = os.path.join(rel_path, path) joined_path = os.path.join(rel_path, path)
if os.path.isfile(joined_path): if os.path.isfile(joined_path):
return gio.File(joined_path) return Gio.file_new_for_path(joined_path)
return None return None
...@@ -134,7 +134,7 @@ class OpenDocumentFileLookupProvider(FileLookupProvider): ...@@ -134,7 +134,7 @@ class OpenDocumentFileLookupProvider(FileLookupProvider):
if path.startswith('/'): if path.startswith('/'):
return None return None
for doc in Gedit.app_get_default().get_documents(): for doc in Gedit.App.get_default().get_documents():
if doc.is_local(): if doc.is_local():
location = doc.get_location() location = doc.get_location()
if location and location.get_uri().endswith(path): if location and location.get_uri().endswith(path):
......
...@@ -222,7 +222,7 @@ class MultipleDocumentsSaver: ...@@ -222,7 +222,7 @@ class MultipleDocumentsSaver:
for doc in docs: for doc in docs:
signals[doc] = doc.connect('saving', self.on_document_saving) 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]) doc.disconnect(signals[doc])
def on_document_saving(self, doc, size, total_size): def on_document_saving(self, doc, size, total_size):
......
...@@ -46,14 +46,31 @@ class LanguagesPopup(Gtk.Window): ...@@ -46,14 +46,31 @@ class LanguagesPopup(Gtk.Window):
self.grab_add() self.grab_add()
Gdk.keyboard_grab(self.window, False, 0L) self.keyboard = None
Gdk.pointer_grab(self.window, False, Gdk.BUTTON_PRESS_MASK | device_manager = Gdk.Display.get_device_manager(self.get_window().get_display())
Gdk.BUTTON_RELEASE_MASK | for device in device_manager.list_devices(Gdk.DeviceType.MASTER):
Gdk.POINTER_MOTION_MASK | if device.get_source() == Gdk.InputSource.KEYBOARD:
Gdk.ENTER_NOTIFY_MASK | self.keyboard = device
Gdk.LEAVE_NOTIFY_MASK | break
Gdk.PROXIMITY_IN_MASK |
Gdk.PROXIMITY_OUT_MASK, None, None, 0L) 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,)) self.view.get_selection().select_path((0,))
...@@ -66,7 +83,7 @@ class LanguagesPopup(Gtk.Window): ...@@ -66,7 +83,7 @@ class LanguagesPopup(Gtk.Window):
self.sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) self.sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
self.sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) 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.show()
self.view.set_headers_visible(False) self.view.set_headers_visible(False)
...@@ -75,16 +92,16 @@ class LanguagesPopup(Gtk.Window): ...@@ -75,16 +92,16 @@ class LanguagesPopup(Gtk.Window):
renderer = Gtk.CellRendererToggle() renderer = Gtk.CellRendererToggle()
column.pack_start(renderer, False) 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.connect('toggled', self.on_language_toggled)
renderer = Gtk.CellRendererText() renderer = Gtk.CellRendererText()
column.pack_start(renderer, True) 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.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) self.sw.add(self.view)
...@@ -93,7 +110,7 @@ class LanguagesPopup(Gtk.Window): ...@@ -93,7 +110,7 @@ class LanguagesPopup(Gtk.Window):
def enabled_languages(self, model, path, piter, ret): def enabled_languages(self, model, path, piter, ret):
enabled = model.get_value(piter, self.COLUMN_ENABLED) enabled = model.get_value(piter, self.COLUMN_ENABLED)
if path == (0,) and enabled: if path.get_indices()[0] == 0 and enabled:
return True return True
if enabled: if enabled:
...@@ -107,13 +124,14 @@ class LanguagesPopup(Gtk.Window): ...@@ -107,13 +124,14 @@ class LanguagesPopup(Gtk.Window):
self.model.foreach(self.enabled_languages, ret) self.model.foreach(self.enabled_languages, ret)
return 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) val = model.get_value(piter, self.COLUMN_NAME)
return val == '-' return val == '-'
def init_languages(self, languages): def init_languages(self, languages):
manager = GtkSource.LanguageManager() 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([_('All languages'), None, not languages])
self.model.append(['-', None, False]) self.model.append(['-', None, False])
...@@ -124,7 +142,7 @@ class LanguagesPopup(Gtk.Window): ...@@ -124,7 +142,7 @@ class LanguagesPopup(Gtk.Window):
self.model.append([lang.get_name(), lang.get_id(), lang.get_id() in languages]) self.model.append([lang.get_name(), lang.get_id(), lang.get_id() in languages])
def correct_all(self, model, path, piter, enabled): def correct_all(self, model, path, piter, enabled):
if path == (0,): if path.get_indices()[0] == 0:
return False return False
model.set_value(piter, self.COLUMN_ENABLED, enabled) model.set_value(piter, self.COLUMN_ENABLED, enabled)
...@@ -141,7 +159,7 @@ class LanguagesPopup(Gtk.Window): ...@@ -141,7 +159,7 @@ class LanguagesPopup(Gtk.Window):
self.model.set_value(self.model.get_iter_first(), self.COLUMN_ENABLED, False) self.model.set_value(self.model.get_iter_first(), self.COLUMN_ENABLED, False)
def do_key_press_event(self, event): def do_key_press_event(self, event):
if event.keyval == Gtk.keysyms.Escape: if event.keyval == Gdk.KEY_Escape:
self.destroy() self.destroy()
return True return True
else: else:
...@@ -154,19 +172,20 @@ class LanguagesPopup(Gtk.Window): ...@@ -154,19 +172,20 @@ class LanguagesPopup(Gtk.Window):
def in_window(self, event, window=None): def in_window(self, event, window=None):
if not window: if not window:
window = self.window window = self.get_window()
geometry = window.get_geometry() geometry = window.get_geometry()
origin = window.get_origin() origin = window.get_origin()
return event.x_root >= origin[0] and \ return event.x_root >= origin[1] and \
event.x_root <= origin[0] + geometry[2] and \ event.x_root <= origin[1] + geometry[2] and \
event.y_root >= origin[1] and \ event.y_root >= origin[2] and \
event.y_root <= origin[1] + geometry[3] event.y_root <= origin[2] + geometry[3]
def do_destroy(self): def do_destroy(self):
Gdk.keyboard_ungrab(0L) if self.keyboard:
Gdk.pointer_ungrab(0L) self.keyboard.ungrab(0L)
self.pointer.ungrab(0L)
return Gtk.Window.do_destroy(self) return Gtk.Window.do_destroy(self)
...@@ -175,8 +194,8 @@ class LanguagesPopup(Gtk.Window): ...@@ -175,8 +194,8 @@ class LanguagesPopup(Gtk.Window):
to = window.get_origin() to = window.get_origin()
event.window = window event.window = window
event.x += fr[0] - to[0] event.x += fr[1] - to[1]
event.y += fr[1] - to[1] event.y += fr[2] - to[2]
def resolve_widgets(self, root): def resolve_widgets(self, root):
res = [root] res = [root]
...@@ -202,7 +221,7 @@ class LanguagesPopup(Gtk.Window): ...@@ -202,7 +221,7 @@ class LanguagesPopup(Gtk.Window):
orig = [event.x, event.y] orig = [event.x, event.y]
for widget in allwidgets: for widget in allwidgets:
windows = self.resolve_windows(widget.window) windows = self.resolve_windows(widget.get_window())
windows.reverse() windows.reverse()
for window in windows: for window in windows:
...@@ -871,7 +890,7 @@ class Manager: ...@@ -871,7 +890,7 @@ class Manager:
for row in self._tool_rows[tool]: for row in self._tool_rows[tool]:
path = row.get_path() path = row.get_path()
if path[0] == parent[0]: if path.get_indices()[0] == parent.get_indices()[0]:
return True return True
return False return False
...@@ -884,7 +903,7 @@ class Manager: ...@@ -884,7 +903,7 @@ class Manager:
ret = None ret = None
if node: 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 # Update languages, make sure to inhibit selection change stuff
self.view.get_selection().handler_block(self.selection_changed_id) self.view.get_selection().handler_block(self.selection_changed_id)
...@@ -942,8 +961,8 @@ class Manager: ...@@ -942,8 +961,8 @@ class Manager:
popup = LanguagesPopup(self.current_node.languages) popup = LanguagesPopup(self.current_node.languages)
popup.set_transient_for(self.dialog) popup.set_transient_for(self.dialog)
origin = button.window.get_origin() origin = button.get_window().get_origin()
popup.move(origin[0], origin[1] - popup.allocation.height) popup.move(origin[1], origin[2] - popup.get_allocation().height)
popup.connect('destroy', self.update_languages) popup.connect('destroy', self.update_languages)
......
...@@ -163,6 +163,7 @@ class WindowActivatable(GObject.Object, Gedit.WindowActivatable): ...@@ -163,6 +163,7 @@ class WindowActivatable(GObject.Object, Gedit.WindowActivatable):
GObject.Object.__init__(self) GObject.Object.__init__(self)
self._manager = None self._manager = None
self._manager_default_size = None self._manager_default_size = None
self.menu = None
def do_activate(self): def do_activate(self):
self._library = ToolLibrary() self._library = ToolLibrary()
...@@ -215,6 +216,7 @@ class WindowActivatable(GObject.Object, Gedit.WindowActivatable): ...@@ -215,6 +216,7 @@ class WindowActivatable(GObject.Object, Gedit.WindowActivatable):
image) image)
def do_update_state(self): def do_update_state(self):
if self.menu is not None:
self.menu.filter(self.window.get_active_document()) self.menu.filter(self.window.get_active_document())
self.window.get_ui_manager().ensure_update() self.window.get_ui_manager().ensure_update()
......
...@@ -611,7 +611,7 @@ add_popup_ui (GeditFileBrowserPlugin *plugin) ...@@ -611,7 +611,7 @@ add_popup_ui (GeditFileBrowserPlugin *plugin)
gtk_action_group_add_actions (action_group, gtk_action_group_add_actions (action_group,
extra_single_selection_actions, extra_single_selection_actions,
G_N_ELEMENTS (extra_single_selection_actions), G_N_ELEMENTS (extra_single_selection_actions),
priv->window); plugin);
gtk_ui_manager_insert_action_group (manager, action_group, 0); gtk_ui_manager_insert_action_group (manager, action_group, 0);
priv->single_selection_action_group = action_group; priv->single_selection_action_group = action_group;
......
...@@ -92,7 +92,7 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable): ...@@ -92,7 +92,7 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
# File browser root directory # File browser root directory
bus = self.window.get_message_bus() bus = self.window.get_message_bus()
try: if bus.is_registered('/plugins/filebrowser', 'get_root'):
msg = bus.send_sync('/plugins/filebrowser', 'get_root') msg = bus.send_sync('/plugins/filebrowser', 'get_root')
if msg: if msg:
...@@ -101,9 +101,6 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable): ...@@ -101,9 +101,6 @@ class QuickOpenPlugin(GObject.Object, Gedit.WindowActivatable):
if gfile and gfile.is_native(): if gfile and gfile.is_native():
paths.append(gfile) paths.append(gfile)
except StandardError as e:
print e
# Recent documents # Recent documents
paths.append(RecentDocumentsDirectory()) paths.append(RecentDocumentsDirectory())
......
...@@ -858,7 +858,7 @@ class Document(GObject.Object, Gedit.ViewActivatable, Signals): ...@@ -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) 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): 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 return
if not self.view.get_editable(): if not self.view.get_editable():
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import os import os
import errno
import tempfile import tempfile
import sys import sys
import shutil import shutil
...@@ -39,7 +40,7 @@ class Importer: ...@@ -39,7 +40,7 @@ class Importer:
filename = os.path.join(userdir, root + '_' + str(i) + ext) filename = os.path.join(userdir, root + '_' + str(i) + ext)
i += 1 i += 1
return filename return (userdir, filename)
def import_file(self, filename): def import_file(self, filename):
if not os.path.exists(filename): if not os.path.exists(filename):
...@@ -49,7 +50,14 @@ class Importer: ...@@ -49,7 +50,14 @@ class Importer:
return _('File "%s" is not a valid snippets file') % filename return _('File "%s" is not a valid snippets file') % filename
# Find destination for file to copy to # 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 # Copy file
shutil.copy(filename, dest) shutil.copy(filename, dest)
......
...@@ -851,7 +851,7 @@ class Manager(Gtk.Dialog, Gtk.Buildable): ...@@ -851,7 +851,7 @@ class Manager(Gtk.Dialog, Gtk.Buildable):