diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 653760a69..89c510fd2 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,13 @@ +1998-05-24 Miguel de Icaza + + * glayout.c: Move the New window menu entry from ``Window'' to + ``File''. + + * gwidget.c (x_unfocus_widget): Fix wartning. + + * glayout.c (set_hintbar): Call flush events after setting the + hintbar. + 1998-05-22 Miguel de Icaza * gwidget.c (x_create_input): Disable the use of the GNOME entries diff --git a/gnome/gconf.h b/gnome/gconf.h index 71035dc0d..813362fd1 100644 --- a/gnome/gconf.h +++ b/gnome/gconf.h @@ -34,6 +34,7 @@ #define PORT_DOES_BACKGROUND_EXEC 1 #define PORT_HAS_UPDATE_PANELS 1 #define PORT_HAS_ICON_VIEW 1 +#define PORT_WINPUT_DELETES_MARKED 1 #define PORT_LIST_MODE_NAME "gnome_list_mode" #define PORT_LIST_MODE_DEFAULT "icons" diff --git a/gnome/gdesktop.c b/gnome/gdesktop.c index e7a4fa727..817464e62 100644 --- a/gnome/gdesktop.c +++ b/gnome/gdesktop.c @@ -384,20 +384,32 @@ check_window_id_in_one_panel (gpointer data, gpointer user_data) PanelContainer *pc = (PanelContainer *) data; int id = (int) user_data; WPanel *panel = pc->panel; - GtkCList *clist = GTK_CLIST (panel->list); GdkWindowPrivate *gdk_wp; - gdk_wp = (GdkWindowPrivate *) clist->clist_window; - if (gdk_wp->xwindow == id){ - temp_panel = panel; - return; - } + if (panel->list_type == list_icons){ + GnomeIconList *icon_list = GNOME_ICON_LIST (panel->icons); + + gdk_wp = (GdkWindowPrivate *) GTK_WIDGET (icon_list)->window; - gdk_wp = (GdkWindowPrivate *) GTK_WIDGET (clist)->window; - - if (gdk_wp->xwindow == id){ - temp_panel = panel; - return; + if (gdk_wp->xwindow == id){ + temp_panel = panel; + return; + } + } else { + GtkCList *clist = GTK_CLIST (panel->list); + + gdk_wp = (GdkWindowPrivate *) clist->clist_window; + if (gdk_wp->xwindow == id){ + temp_panel = panel; + return; + } + + gdk_wp = (GdkWindowPrivate *) GTK_WIDGET (clist)->window; + + if (gdk_wp->xwindow == id){ + temp_panel = panel; + return; + } } } diff --git a/gnome/glayout.c b/gnome/glayout.c index 2758c854a..5cc1a3e3a 100644 --- a/gnome/glayout.c +++ b/gnome/glayout.c @@ -177,6 +177,7 @@ void set_hintbar (char *str) { gtk_label_set (GTK_LABEL (current_panel_ptr->panel->status), str); + x_flush_events (); } void @@ -264,6 +265,7 @@ void configure_box (void); GtkCheckMenuItem *gnome_toggle_snap (void); GnomeUIInfo gnome_panel_file_menu [] = { + { GNOME_APP_UI_ITEM, N_("New window"), N_("Opens a new window"), gnome_open_panel }, { GNOME_APP_UI_ITEM, N_("Open Terminal"), N_("Opens a terminal"), gnome_open_terminal }, { GNOME_APP_UI_SEPARATOR }, { GNOME_APP_UI_ITEM, N_("Copy..."), N_("Copy files"), copy_cmd }, @@ -285,7 +287,6 @@ GnomeUIInfo gnome_panel_file_menu [] = { }; GnomeUIInfo gnome_panel_panel_menu [] = { - { GNOME_APP_UI_ITEM, N_("New window"), N_("Opens a new window"), gnome_open_panel }, { GNOME_APP_UI_ITEM, N_("Display mode..."), N_("Set the display mode for the panel"), gnome_listing_cmd }, { GNOME_APP_UI_ITEM, N_("Sort order..."), N_("Changes the sort order of the files"), sort_cmd }, { GNOME_APP_UI_ITEM, N_("Filter..."), N_("Set a filter for the files"), filter_cmd }, diff --git a/gnome/gwidget.c b/gnome/gwidget.c index e2eb17857..d23ca5643 100644 --- a/gnome/gwidget.c +++ b/gnome/gwidget.c @@ -47,8 +47,12 @@ void x_unfocus_widget (Widget_Item *p) { GtkWidget *w = get_gtk_widget (p); + GtkWidget *toplevel = gtk_widget_get_toplevel (w); - gtk_window_set_focus (GTK_WINDOW (gtk_widget_get_toplevel (w)), NULL); + /* Only happens if the widget is not yet added to its container */ + /* I am not yet sure why this happens */ + if (GTK_IS_WINDOW (toplevel)) + gtk_window_set_focus (GTK_WINDOW (gtk_widget_get_toplevel (w)), NULL); } void @@ -256,6 +260,7 @@ entry_release (GtkEditable *entry, GdkEvent *event, WInput *in) in->point = entry->current_pos; in->mark = (entry->current_pos == entry->selection_start_pos) ? entry->selection_end_pos : entry->selection_start_pos; + in->first = 1; } int diff --git a/src/ChangeLog b/src/ChangeLog index 35a34fa86..dd0f95f2e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +1998-05-24 Miguel de Icaza + + * widget.c (port_region_marked_for_delete): New per-port + piece of code: Provides a way for good selection killing. + Sun May 24 02:45:03 1998 Norbert Warmuth * utilunix.c, util.h (errno_dir_not_empty): deleted diff --git a/src/widget.c b/src/widget.c index 3a5548f48..ca2074b8b 100644 --- a/src/widget.c +++ b/src/widget.c @@ -1532,6 +1532,22 @@ is_in_input_map (WInput *in, int c_code) return 0; } +#ifdef PORT_WINPUT_DELETES_MARKED +static void +port_region_marked_for_delete (WInput *in) +{ + kill_region (in); +} +#else +static void +port_region_marked_for_delete (WInput *in) +{ + *in->buffer = 0; + in->point = 0; + in->first = 0; +} +#endif + int handle_char (WInput *in, int c_code) { @@ -1564,9 +1580,7 @@ handle_char (WInput *in, int c_code) if (c_code > 255 || !is_printable (c_code)) return 0; if (in->first){ - *in->buffer = 0; - in->point = 0; - in->first = 0; + port_region_marked_for_delete (in); } free_completions (in); v = insert_char (in, c_code);