nautilus/libnautilus-private/nautilus-horizontal-splitter.c

333 lines
9.5 KiB
C
Raw Normal View History

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-horizontal-splitter.c - A horizontal splitter with a semi gradient look
Copyright (C) 1999, 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: Ramiro Estrugo <ramiro@eazel.com>
*/
#include <config.h>
#include "nautilus-horizontal-splitter.h"
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
#include "nautilus-gtk-macros.h"
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
struct NautilusHorizontalSplitterDetails {
gboolean down;
double down_position;
guint32 down_time;
int saved_size;
};
/* Bar width currently hardcoded to 7 */
#define BAR_WIDTH 7
#define CLOSED_THRESHOLD 4
#define NOMINAL_SIZE 148
#define SPLITTER_CLICK_SLOP 3
#define SPLITTER_CLICK_TIMEOUT 1500
/* NautilusHorizontalSplitterClass methods */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
static void nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *horizontal_splitter_class);
static void nautilus_horizontal_splitter_initialize (NautilusHorizontalSplitter *horizontal_splitter);
static gboolean nautilus_horizontal_splitter_button_press (GtkWidget *widget,
GdkEventButton *event);
static gboolean nautilus_horizontal_splitter_button_release (GtkWidget *widget,
GdkEventButton *event);
/* GtkObjectClass methods */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
static void nautilus_horizontal_splitter_destroy (GtkObject *object);
/* GtkWidgetClass methods */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
static void nautilus_horizontal_splitter_draw (GtkWidget *widget,
GdkRectangle *area);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusHorizontalSplitter,
nautilus_horizontal_splitter,
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
E_TYPE_HPANED)
/* GtkObjectClass methods */
static void
nautilus_horizontal_splitter_initialize_class (NautilusHorizontalSplitterClass *horizontal_splitter_class)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
object_class = GTK_OBJECT_CLASS (horizontal_splitter_class);
widget_class = GTK_WIDGET_CLASS (horizontal_splitter_class);
/* GtkObjectClass */
object_class->destroy = nautilus_horizontal_splitter_destroy;
/* GtkWidgetClass */
widget_class->draw = nautilus_horizontal_splitter_draw;
widget_class->button_press_event = nautilus_horizontal_splitter_button_press;
widget_class->button_release_event = nautilus_horizontal_splitter_button_release;
}
static void
nautilus_horizontal_splitter_initialize (NautilusHorizontalSplitter *horizontal_splitter)
{
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
horizontal_splitter->details = g_new0 (NautilusHorizontalSplitterDetails, 1);
e_paned_set_handle_size (E_PANED (horizontal_splitter), BAR_WIDTH);
}
/* GtkObjectClass methods */
static void
nautilus_horizontal_splitter_destroy(GtkObject *object)
{
NautilusHorizontalSplitter *horizontal_splitter;
horizontal_splitter = NAUTILUS_HORIZONTAL_SPLITTER (object);
g_free (horizontal_splitter->details);
/* Chain */
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
}
static void
draw_resize_bar (GtkWidget *widget,
GdkWindow *window,
const GdkRectangle *area)
{
GtkStyle *style;
GdkGC *gcs[BAR_WIDTH];
guint i;
g_assert (widget != NULL);
g_assert (window != NULL);
g_assert (area != NULL);
g_assert (area->width == BAR_WIDTH);
style = widget->style;
g_assert (style != NULL);
gcs[0] = style->fg_gc[GTK_STATE_NORMAL];
gcs[1] = style->fg_gc[GTK_STATE_SELECTED];
gcs[2] = style->light_gc[GTK_STATE_ACTIVE];
gcs[3] = style->bg_gc[GTK_STATE_NORMAL];
gcs[4] = style->mid_gc[GTK_STATE_ACTIVE];
gcs[5] = style->dark_gc[GTK_STATE_NORMAL];
gcs[6] = style->fg_gc[GTK_STATE_NORMAL];
for (i = 0; i < BAR_WIDTH; i++)
{
gdk_draw_line (window,
gcs[i],
area->x + i,
area->y,
area->x + i,
area->y + area->height - 1);
}
}
/* Number of ridges in the thumb currently hardcoded to 8 */
#define NUM_RIDGES 8
/* These control the layout of the ridges */
#define RIDGE_HEIGHT 2
#define RIDGE_EDGE_OFFSET 2
#define BETWEEN_RIDGE_OFFSET 1
static void
draw_resize_bar_thumb (GtkWidget *widget,
GdkWindow *window,
const GdkRectangle *area)
{
EPaned *paned;
GtkStyle *style;
GdkGC *light_gc;
GdkGC *dark_gc;
guint total_thumb_height;
g_assert (widget != NULL);
g_assert (window != NULL);
g_assert (area != NULL);
g_assert (area->width == BAR_WIDTH);
style = widget->style;
g_assert (style != NULL);
paned = E_PANED (widget);
light_gc = style->light_gc[GTK_STATE_ACTIVE];
dark_gc = style->dark_gc[GTK_STATE_NORMAL];
total_thumb_height = (NUM_RIDGES * RIDGE_HEIGHT) + ((NUM_RIDGES - 1) * BETWEEN_RIDGE_OFFSET);
/* Make sure the thumb aint bigger than the handle */
if (total_thumb_height > paned->handle_height)
{
total_thumb_height = paned->handle_height;
}
/* Draw the thumb only if we have enough space for at least one ridge */
if (total_thumb_height > RIDGE_HEIGHT)
{
gint y = paned->handle_ypos + (paned->handle_height - total_thumb_height) / 2;
guint i;
for (i = 0; i < NUM_RIDGES; i++)
{
gint x1 = area->x + RIDGE_EDGE_OFFSET;
gint x2 = area->x + BAR_WIDTH - RIDGE_EDGE_OFFSET;
gdk_draw_line (window,
dark_gc,
x1,
y,
x2,
y);
y += BETWEEN_RIDGE_OFFSET;
gdk_draw_line (window,
light_gc,
x1,
y,
x2,
y);
y += RIDGE_HEIGHT;
}
}
}
/* GtkWidgetClass methods */
static void
nautilus_horizontal_splitter_draw (GtkWidget *widget,
GdkRectangle *area)
{
EPaned *paned;
GdkRectangle handle_area, child_area;
guint16 border_width;
g_return_if_fail (widget != NULL);
g_return_if_fail (E_IS_PANED (widget));
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget)) {
paned = E_PANED (widget);
border_width = GTK_CONTAINER (paned)->border_width;
gdk_window_clear_area (widget->window,
area->x, area->y, area->width,
area->height);
if (e_paned_handle_shown(paned)) {
handle_area.x = paned->handle_xpos;
handle_area.y = paned->handle_ypos;
handle_area.width = paned->handle_size;
handle_area.height = paned->handle_height;
if (gdk_rectangle_intersect (&handle_area, area, &child_area)) {
child_area.x -= paned->handle_xpos;
child_area.y -= paned->handle_ypos;
/* Simply things by always drawing the full width of the bar. */
child_area.x = 0;
child_area.width = BAR_WIDTH;
draw_resize_bar (widget, paned->handle, &child_area);
draw_resize_bar_thumb (widget, paned->handle, &child_area);
}
}
/* Redraw the children
*/
if (paned->child1 && gtk_widget_intersect (paned->child1, area, &child_area)) {
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
gtk_widget_draw (paned->child1, &child_area);
}
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
if (paned->child2 && gtk_widget_intersect (paned->child2, area, &child_area)) {
gtk_widget_draw (paned->child2, &child_area);
}
}
}
/* routine to toggle the open/closed state of the splitter */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
static void
toggle_splitter_position (NautilusHorizontalSplitter *splitter)
{
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
int position;
position = e_paned_get_position (E_PANED (splitter));
if (position >= CLOSED_THRESHOLD) {
splitter->details->saved_size = position;
position = 0;
} else {
position = splitter->details->saved_size;
if (splitter->details->saved_size < CLOSED_THRESHOLD) {
position = NOMINAL_SIZE;
}
}
e_paned_set_position (E_PANED (splitter), position);
}
/* NautilusHorizontalSplitter public methods */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
GtkWidget *
nautilus_horizontal_splitter_new (void)
{
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
return GTK_WIDGET (gtk_type_new (nautilus_horizontal_splitter_get_type ()));
}
/* handle mouse downs by remembering the position and the time */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
static gboolean
nautilus_horizontal_splitter_button_press (GtkWidget *widget, GdkEventButton *event)
{
NautilusHorizontalSplitter *splitter;
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
splitter = NAUTILUS_HORIZONTAL_SPLITTER (widget);
if (event->window != E_PANED (widget)->handle) {
splitter->details->down = FALSE;
} else {
splitter->details->down = TRUE;
splitter->details->down_position = event->x;
splitter->details->down_time = event->time;
}
return NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, button_press_event, (widget, event));
}
/* handle mouse ups by seeing if it was a tap and toggling the open state accordingly */
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
static gboolean
nautilus_horizontal_splitter_button_release (GtkWidget *widget, GdkEventButton *event)
{
NautilusHorizontalSplitter *splitter;
int delta, delta_time;
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
splitter = NAUTILUS_HORIZONTAL_SPLITTER (widget);
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
if (event->window == E_PANED (widget)->handle
&& splitter->details->down) {
delta = abs (event->x - splitter->details->down_position);
delta_time = abs (splitter->details->down_time - event->time);
if (delta < SPLITTER_CLICK_SLOP && delta_time < SPLITTER_CLICK_TIMEOUT) {
toggle_splitter_position(splitter);
}
}
Ignore some additional generated files. * components/services/install/command-line/.cvsignore: * components/services/install/lib/.cvsignore: Ignore some additional generated files. * libnautilus-extensions/nautilus-gnome-extensions.h: * libnautilus-extensions/nautilus-gnome-extensions.c: Moved stock dialog functions to nautilus-stock-dialogs.[ch]. (nautilus_gnome_canvas_item_request_update_deep), (nautilus_gnome_canvas_request_update_all), (nautilus_gnome_canvas_set_scroll_region), (nautilus_gnome_canvas_set_scroll_region_left_justify): Added a bunch of functions that were previously private inside NautilusIconContainer. * libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (nautilus_gtk_adjustment_set_value), (nautilus_gtk_adjustment_clamp_value): Added functions that treat the value range in a GtkAdjustment the same way scroll bars do, taking the page size into account. * libnautilus-extensions/nautilus-horizontal-splitter.h: * libnautilus-extensions/nautilus-horizontal-splitter.c: (nautilus_horizontal_splitter_initialize), (toggle_splitter_position), (nautilus_horizontal_splitter_button_press), (nautilus_horizontal_splitter_button_release): Fixed logic so that splitter will only open or close if you both click and release within the splitter itself. * libnautilus-extensions/nautilus-icon-private.h: * libnautilus-extensions/nautilus-icon-container.c: (icon_toggle_selected): Move icons to front when they are selected. (set_scroll_region): Moved workaround that sets scroll region to be large enough to fill the widget allocation into a function in nautilus-gnome-extensions.h. In the process, I fixed the problem where it would do the job wrong when the view was zoomed. (lay_down_icons), (relayout), (reload_icon_positions): Started work on sharing code between automatic layout of the entire container and layout of new icons as the arrive. (nautilus_icon_container_clear), (nautilus_icon_container_add): Got started on the mechanism for laying out new icons as they arrive in bunches instead of one at a time. * libnautilus-extensions/nautilus-icon-dnd.c: * libnautilus-extensions/nautilus-program-chooser.c: * libnautilus-extensions/nautilus-program-choosing.c: * src/file-manager/dfos-xfer.c: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-error-reporting.c: * src/nautilus-application.c: * src/nautilus-location-bar.c: * src/nautilus-property-browser.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-menus.c: Added includes to source files that use the stock dialogs. * libnautilus-extensions/nautilus-stock-dialogs.h: * libnautilus-extensions/nautilus-stock-dialogs.c: (nautilus_timed_wait_stop), (convert_varargs_to_name_array), (nautilus_simple_dialog), (turn_on_line_wrap_flag), (turn_on_line_wrap_flag_callback), (show_ok_box), (show_yes_no_box), (nautilus_info_dialog), (nautilus_info_dialog_parented), (nautilus_warning_dialog), (nautilus_warning_dialog_parented), (nautilus_error_dialog), (nautilus_error_dialog_parented), (nautilus_yes_no_dialog), (nautilus_yes_no_dialog_parented): Moved all the stock dialog code in here. * src/nautilus-sidebar-title.c: (update_icon): Only display the icon when it's ready, instead of showing generic document icon before that time. (update_title), (update_more_info), (update_emblems), (update_notes): Added FIXMEs about doing the same with other info. (nautilus_sidebar_title_button_press_event): Added a FIXME to the half-baked code in here.
2000-06-26 18:01:44 +00:00
splitter->details->down = FALSE;
return NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, button_release_event, (widget, event));
}