summaryrefslogtreecommitdiff
path: root/open-terminal
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-08-07 18:04:27 +0300
committermonsta <[email protected]>2017-08-07 18:04:27 +0300
commit5fa187fd69c9a352bae38cbced4120dc942fc7a6 (patch)
tree595fde0e29aaeb23fcdaa8609b6475a22889d542 /open-terminal
parentc538ddf86852c5618512c8be187828de3d5e4fee (diff)
downloadcaja-extensions-5fa187fd69c9a352bae38cbced4120dc942fc7a6.tar.bz2
caja-extensions-5fa187fd69c9a352bae38cbced4120dc942fc7a6.tar.xz
open-terminal: don't use excessive string duplication
make c538ddf86852c5618512c8be187828de3d5e4fee a bit simpler
Diffstat (limited to 'open-terminal')
-rw-r--r--open-terminal/caja-open-terminal.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/open-terminal/caja-open-terminal.c b/open-terminal/caja-open-terminal.c
index 733a90f..449ace6 100644
--- a/open-terminal/caja-open-terminal.c
+++ b/open-terminal/caja-open-terminal.c
@@ -280,7 +280,7 @@ open_terminal_callback (CajaMenuItem *item,
CajaFileInfo *file_info)
{
GdkDisplay *display;
- gchar *display_str;
+ const gchar *display_str;
const gchar *old_display_str;
gchar *uri;
gchar **argv, *terminal_exec;
@@ -339,7 +339,7 @@ open_terminal_callback (CajaMenuItem *item,
screen = g_object_get_data (G_OBJECT (item), "CajaOpenTerminal::screen");
display = gdk_screen_get_display (screen);
if (screen != NULL) {
- display_str = g_strdup (gdk_display_get_name (display));
+ display_str = gdk_display_get_name (display);
g_setenv ("DISPLAY", display_str, TRUE);
}
@@ -415,7 +415,6 @@ open_terminal_callback (CajaMenuItem *item,
g_strfreev (argv);
g_free (terminal_exec);
g_free (working_directory);
- g_free (display_str);
}
static CajaMenuItem *