This is really a HEAD merge, I want GLE to work ;)
-Yosh Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org> * gtk/gtkfilesel.h: GtkType and macro fixups * gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern for the file selection widget to try a completion on (set the initial filter). Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org> * gtk/gtkmain.c: implement idle functions via GHook. this gives a slight speed improvement and lessens code duplication.
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
Thu Oct 22 02:29:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.h: GtkType and macro fixups
|
||||
* gtk/gtkfilesel.c (gtk_file_selection_complete): set a pattern
|
||||
for the file selection widget to try a completion on (set the
|
||||
initial filter).
|
||||
|
||||
Wed Oct 14 14:34:04 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmain.c: implement idle functions via GHook. this gives a
|
||||
slight speed improvement and lessens code duplication.
|
||||
|
||||
Thu Oct 22 02:27:30 PDT 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gdk/gdkrgb.c: use glib endian stuff
|
||||
|
||||
@@ -322,10 +322,10 @@ static GtkWindowClass *parent_class = NULL;
|
||||
/* Saves errno when something cmpl does fails. */
|
||||
static gint cmpl_errno;
|
||||
|
||||
guint
|
||||
GtkType
|
||||
gtk_file_selection_get_type (void)
|
||||
{
|
||||
static guint file_selection_type = 0;
|
||||
static GtkType file_selection_type = 0;
|
||||
|
||||
if (!file_selection_type)
|
||||
{
|
||||
@@ -341,7 +341,7 @@ gtk_file_selection_get_type (void)
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
file_selection_type = gtk_type_unique (gtk_window_get_type (), &filesel_info);
|
||||
file_selection_type = gtk_type_unique (GTK_TYPE_WINDOW, &filesel_info);
|
||||
}
|
||||
|
||||
return file_selection_type;
|
||||
@@ -354,7 +354,7 @@ gtk_file_selection_class_init (GtkFileSelectionClass *class)
|
||||
|
||||
object_class = (GtkObjectClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_window_get_type ());
|
||||
parent_class = gtk_type_class (GTK_TYPE_WINDOW);
|
||||
|
||||
object_class->destroy = gtk_file_selection_destroy;
|
||||
}
|
||||
@@ -497,7 +497,7 @@ gtk_file_selection_new (const gchar *title)
|
||||
{
|
||||
GtkFileSelection *filesel;
|
||||
|
||||
filesel = gtk_type_new (gtk_file_selection_get_type ());
|
||||
filesel = gtk_type_new (GTK_TYPE_FILE_SELECTION);
|
||||
gtk_window_set_title (GTK_WINDOW (filesel), title);
|
||||
|
||||
return GTK_WIDGET (filesel);
|
||||
@@ -627,6 +627,19 @@ gtk_file_selection_get_filename (GtkFileSelection *filesel)
|
||||
return nothing;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_file_selection_complete (GtkFileSelection *filesel,
|
||||
const gchar *pattern)
|
||||
{
|
||||
g_return_if_fail (filesel != NULL);
|
||||
g_return_if_fail (GTK_IS_FILE_SELECTION (filesel));
|
||||
g_return_if_fail (pattern != NULL);
|
||||
|
||||
if (filesel->selection_entry)
|
||||
gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), pattern);
|
||||
gtk_file_selection_populate (filesel, (gchar*) pattern, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_selection_destroy (GtkObject *object)
|
||||
{
|
||||
@@ -1696,7 +1709,7 @@ cmpl_completion_matches (gchar* text_to_complete,
|
||||
|
||||
prune_memory_usage(cmpl_state);
|
||||
|
||||
g_assert(text_to_complete);
|
||||
g_assert (text_to_complete != NULL);
|
||||
|
||||
cmpl_state->user_completion_index = -1;
|
||||
cmpl_state->last_completion_text = text_to_complete;
|
||||
@@ -1706,14 +1719,14 @@ cmpl_completion_matches (gchar* text_to_complete,
|
||||
cmpl_state->updated_text[0] = 0;
|
||||
cmpl_state->re_complete = FALSE;
|
||||
|
||||
first_slash = strchr(text_to_complete, '/');
|
||||
first_slash = strchr (text_to_complete, '/');
|
||||
|
||||
if(text_to_complete[0] == '~' && !first_slash)
|
||||
if (text_to_complete[0] == '~' && !first_slash)
|
||||
{
|
||||
/* Text starts with ~ and there is no slash, show all the
|
||||
* home directory completions.
|
||||
*/
|
||||
poss = attempt_homedir_completion(text_to_complete, cmpl_state);
|
||||
poss = attempt_homedir_completion (text_to_complete, cmpl_state);
|
||||
|
||||
update_cmpl(poss, cmpl_state);
|
||||
|
||||
@@ -1721,13 +1734,13 @@ cmpl_completion_matches (gchar* text_to_complete,
|
||||
}
|
||||
|
||||
cmpl_state->reference_dir =
|
||||
open_ref_dir(text_to_complete, remaining_text, cmpl_state);
|
||||
open_ref_dir (text_to_complete, remaining_text, cmpl_state);
|
||||
|
||||
if(!cmpl_state->reference_dir)
|
||||
return NULL;
|
||||
|
||||
cmpl_state->completion_dir =
|
||||
find_completion_dir(*remaining_text, remaining_text, cmpl_state);
|
||||
find_completion_dir (*remaining_text, remaining_text, cmpl_state);
|
||||
|
||||
cmpl_state->last_valid_char = *remaining_text - text_to_complete;
|
||||
|
||||
|
||||
@@ -29,9 +29,11 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GTK_FILE_SELECTION(obj) GTK_CHECK_CAST (obj, gtk_file_selection_get_type (), GtkFileSelection)
|
||||
#define GTK_FILE_SELECTION_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_file_selection_get_type (), GtkFileSelectionClass)
|
||||
#define GTK_IS_FILE_SELECTION(obj) GTK_CHECK_TYPE (obj, gtk_file_selection_get_type ())
|
||||
#define GTK_TYPE_FILE_SELECTION (gtk_file_selection_get_type ())
|
||||
#define GTK_FILE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FILE_SELECTION, GtkFileSelection))
|
||||
#define GTK_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
|
||||
#define GTK_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FILE_SELECTION))
|
||||
#define GTK_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_SELECTION))
|
||||
|
||||
|
||||
typedef struct _GtkFileSelection GtkFileSelection;
|
||||
@@ -72,11 +74,13 @@ struct _GtkFileSelectionClass
|
||||
};
|
||||
|
||||
|
||||
guint gtk_file_selection_get_type (void);
|
||||
GtkWidget* gtk_file_selection_new (const gchar *title);
|
||||
void gtk_file_selection_set_filename (GtkFileSelection *filesel,
|
||||
const gchar *filename);
|
||||
gchar* gtk_file_selection_get_filename (GtkFileSelection *filesel);
|
||||
GtkType gtk_file_selection_get_type (void);
|
||||
GtkWidget* gtk_file_selection_new (const gchar *title);
|
||||
void gtk_file_selection_set_filename (GtkFileSelection *filesel,
|
||||
const gchar *filename);
|
||||
gchar* gtk_file_selection_get_filename (GtkFileSelection *filesel);
|
||||
void gtk_file_selection_complete (GtkFileSelection *filesel,
|
||||
const gchar *pattern);
|
||||
void gtk_file_selection_show_fileop_buttons (GtkFileSelection *filesel);
|
||||
void gtk_file_selection_hide_fileop_buttons (GtkFileSelection *filesel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user