[Xfce4-commits] <xfce-utils:master> Revert "No need to select the text manually."
Jérôme Guelfucci
noreply at xfce.org
Fri Dec 24 01:00:02 CET 2010
Updating branch refs/heads/master
to 007074086095a177485123ccd090dabed1889aeb (commit)
from 5adbefb41d5b384584dce9deae41f06bb904b98f (commit)
commit 007074086095a177485123ccd090dabed1889aeb
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Fri Dec 24 00:58:57 2010 +0100
Revert "No need to select the text manually."
This reverts commit 5adbefb41d5b384584dce9deae41f06bb904b98f.
xfrun/xfrun-dbus.c | 1 +
xfrun/xfrun-dialog.c | 7 +++++++
xfrun/xfrun-dialog.h | 2 ++
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/xfrun/xfrun-dbus.c b/xfrun/xfrun-dbus.c
index 783c1a1..06ee12d 100644
--- a/xfrun/xfrun-dbus.c
+++ b/xfrun/xfrun-dbus.c
@@ -184,6 +184,7 @@ xfrun_handle_dbus_message(DBusConnection *connection,
/* this handles setting the dialog to the right screen */
xfce_gtk_window_center_on_active_screen(GTK_WINDOW(dialog));
+ xfrun_dialog_select_text(XFRUN_DIALOG(dialog));
gtk_widget_show(dialog);
reply = dbus_message_new_method_return(message);
diff --git a/xfrun/xfrun-dialog.c b/xfrun/xfrun-dialog.c
index 8dbcdcb..5e2f334 100644
--- a/xfrun/xfrun-dialog.c
+++ b/xfrun/xfrun-dialog.c
@@ -702,3 +702,10 @@ xfrun_dialog_set_environment(XfrunDialog *dialog,
g_strfreev(dialog->priv->envp);
dialog->priv->envp = g_strdupv(envp);
}
+
+void
+xfrun_dialog_select_text(XfrunDialog *dialog)
+{
+ gtk_editable_select_region(GTK_EDITABLE(XFRUN_DIALOG(dialog)->priv->entry),
+ 0, -1);
+}
diff --git a/xfrun/xfrun-dialog.h b/xfrun/xfrun-dialog.h
index 549e666..bfb4fa4 100644
--- a/xfrun/xfrun-dialog.h
+++ b/xfrun/xfrun-dialog.h
@@ -65,6 +65,8 @@ void xfrun_dialog_set_working_directory (XfrunDialog *dialog,
void xfrun_dialog_set_environment (XfrunDialog *dialog,
gchar **envp);
+void xfrun_dialog_select_text (XfrunDialog *dialog);
+
G_CONST_RETURN gchar *xfrun_dialog_get_working_directory
(XfrunDialog *dialog);
More information about the Xfce4-commits
mailing list