X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fmain%2Fsrc%2Fgtkdirsel.c;h=138d97507e9c99613358f7b716c6f3961e786362;hb=0c56e138e63986d8a8c0d7fc3e2c7230a020289e;hp=92a8ab9751cd4b18a22e0614ab4e942c3f19dfa2;hpb=a7e6e8284bcc732f7db90354f8e3282b1d8b4629;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/gtkdirsel.c b/ltt/branches/poly/lttv/modules/gui/main/src/gtkdirsel.c index 92a8ab97..138d9750 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/gtkdirsel.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/gtkdirsel.c @@ -1,3 +1,20 @@ +/* This file is part of the Linux Trace Toolkit viewer + * Copyright (C) 2003-2004 XangXiu Yang + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. + */ #include "config.h" @@ -32,7 +49,7 @@ #include "gdk/gdkkeysyms.h" #include -#include +#include #define _(A) A #define WANT_HPANED 1 @@ -2142,6 +2159,7 @@ gtk_dir_selection_populate (GtkDirSelection *fs, g_free (escaped); gtk_label_set_text_with_mnemonic (GTK_LABEL (fs->selection_text), sel_text); + gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), cmpl_reference_position (cmpl_state)); g_free (sel_text); } @@ -2460,7 +2478,8 @@ gtk_dir_selection_dir_changed (GtkTreeSelection *selection, if (index != -1) { - gchar * err, str[256]; + const gchar * err; + gchar str[256]; err = gtk_label_get_text (GTK_LABEL (fs->selection_text)); err += 11; //pass over "Selection: " sprintf(str,"%s\0",err); @@ -4039,7 +4058,7 @@ cmpl_strerror (gint err) return g_strerror (err); } -gchar * gtk_dir_selection_get_dir (GtkDirSelection *filesel) +const gchar * gtk_dir_selection_get_dir (GtkDirSelection *filesel) { return gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry)); }