Commit 3965707a authored by Ramiro Estrugo's avatar Ramiro Estrugo

Added a place to put cut-n-paste code. Cut-n-pasted the e-paned widget

* Makefile.am:
* components/hardware/Makefile.am:
* components/help/Makefile.am:
* components/history/Makefile.am:
* components/html/Makefile.am:
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/music/Makefile.am:
* components/notes/Makefile.am:
* components/rpmview/Makefile.am:
* components/sample/Makefile.am:
* components/services/startup/nautilus-view/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/trilobite/sample/nautilus-view/Makefile.am:
* components/websearch/Makefile.am:
* configure.in:
* cut-n-paste-code/.cvsignore:
* cut-n-paste-code/Makefile.am:
* cut-n-paste-code/README:
* cut-n-paste-code/widgets/.cvsignore:
* cut-n-paste-code/widgets/Makefile.am:
* cut-n-paste-code/widgets/e-paned/.cvsignore:
* cut-n-paste-code/widgets/e-paned/Makefile.am:
* cut-n-paste-code/widgets/e-paned/e-hpaned.c: (e_hpaned_get_type),
(e_hpaned_class_init), (e_hpaned_init), (e_hpaned_new),
(e_hpaned_size_request), (e_hpaned_size_allocate), (e_hpaned_draw),
(e_hpaned_xor_line), (e_hpaned_button_press),
(e_hpaned_button_release), (e_hpaned_motion),
(e_hpaned_handle_shown):
* cut-n-paste-code/widgets/e-paned/e-hpaned.h:
* cut-n-paste-code/widgets/e-paned/e-paned.c: (e_paned_get_type),
(e_paned_class_init), (e_paned_child_type), (e_paned_init),
(e_paned_set_arg), (e_paned_get_arg), (e_paned_realize),
(e_paned_map), (e_paned_unmap), (e_paned_unrealize),
(e_paned_expose), (e_paned_add1), (e_paned_add2), (e_paned_pack1),
(e_paned_pack2), (e_paned_add), (e_paned_remove), (e_paned_forall),
(e_paned_get_position), (e_paned_set_position),
(e_paned_set_handle_size), (e_paned_compute_position),
(e_paned_handle_shown), (e_paned_quantized_size):
* cut-n-paste-code/widgets/e-paned/e-paned.h:
* cut-n-paste-code/widgets/e-paned/e-vpaned.c: (e_vpaned_get_type),
(e_vpaned_class_init), (e_vpaned_init), (e_vpaned_new),
(e_vpaned_size_request), (e_vpaned_size_allocate), (e_vpaned_draw),
(e_vpaned_xor_line), (e_vpaned_button_press),
(e_vpaned_button_release), (e_vpaned_motion),
(e_vpaned_handle_shown):
* cut-n-paste-code/widgets/e-paned/e-vpaned.h:
* helper-utilities/authenticate/Makefile.am:
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/README:
* libnautilus/README:
* src/Makefile.am:
* test/Makefile.am:
Added a place to put cut-n-paste code.  Cut-n-pasted the e-paned
widget from evolution.  Yes, and evil thing to do.  Send me mail
with alternative solutions.

Also added README files for libnautilus and
libnautilus-extenstions to clarify thieir public vs internal
state.

* src/nautilus-window.c: (nautilus_window_constructed),
(nautilus_window_real_set_content_view):
Use the new NautilusHorizontalSplitter widget instead of
the gtk one.
parent 820bc51e
......@@ -5,6 +5,7 @@ lib_LTLIBRARIES=libnautilus-extensions.la
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/cut-n-paste-code \
$(GNOME_CFLAGS) \
$(BONOBO_CFLAGS) \
$(OAF_CFLAGS) \
......@@ -18,6 +19,9 @@ INCLUDES = \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
$(NULL)
# $(top_builddir)/libnautilus/libnautilus.la
# $(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la
libnautilus_extensions_la_LDFLAGS=\
$(GNOME_LIBS) \
$(OAF_LIBS) \
......@@ -27,7 +31,7 @@ libnautilus_extensions_la_LDFLAGS=\
$(VFS_LIBS) \
$(XML_LIBS) \
$(LIBPNG) \
$(top_src_dir)/libnautilus/.libs/libnautilus.so
$(NULL)
libnautilus_extensionsincludedir=$(includedir)/libnautilus-extensions
......@@ -59,6 +63,7 @@ libnautilus_extensions_la_SOURCES = \
nautilus-gnome-extensions.c \
nautilus-graphic-effects.c \
nautilus-gtk-extensions.c \
nautilus-horizontal-splitter.c \
nautilus-icon-canvas-item.c \
nautilus-icon-container.c \
nautilus-icon-dnd.c \
......@@ -135,6 +140,7 @@ noinst_HEADERS = \
nautilus-graphic-effects.h \
nautilus-gtk-extensions.h \
nautilus-gtk-macros.h \
nautilus-horizontal-splitter.h \
nautilus-icon-canvas-item.h \
nautilus-icon-container.h \
nautilus-icon-dnd.h \
......@@ -170,8 +176,8 @@ noinst_HEADERS = \
nautilus-string.h \
nautilus-text-caption.h \
nautilus-undo-context.h \
nautilus-undo-signal-handlers.h \
nautilus-undo-manager.h \
nautilus-undo-signal-handlers.h \
nautilus-user-level-manager.h \
nautilus-view-identifier.h \
nautilus-xml-extensions.h \
......
......@@ -5,6 +5,7 @@ lib_LTLIBRARIES=libnautilus-extensions.la
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/cut-n-paste-code \
$(GNOME_CFLAGS) \
$(BONOBO_CFLAGS) \
$(OAF_CFLAGS) \
......@@ -18,6 +19,9 @@ INCLUDES = \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
$(NULL)
# $(top_builddir)/libnautilus/libnautilus.la
# $(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la
libnautilus_extensions_la_LDFLAGS=\
$(GNOME_LIBS) \
$(OAF_LIBS) \
......@@ -27,7 +31,7 @@ libnautilus_extensions_la_LDFLAGS=\
$(VFS_LIBS) \
$(XML_LIBS) \
$(LIBPNG) \
$(top_src_dir)/libnautilus/.libs/libnautilus.so
$(NULL)
libnautilus_extensionsincludedir=$(includedir)/libnautilus-extensions
......@@ -59,6 +63,7 @@ libnautilus_extensions_la_SOURCES = \
nautilus-gnome-extensions.c \
nautilus-graphic-effects.c \
nautilus-gtk-extensions.c \
nautilus-horizontal-splitter.c \
nautilus-icon-canvas-item.c \
nautilus-icon-container.c \
nautilus-icon-dnd.c \
......@@ -135,6 +140,7 @@ noinst_HEADERS = \
nautilus-graphic-effects.h \
nautilus-gtk-extensions.h \
nautilus-gtk-macros.h \
nautilus-horizontal-splitter.h \
nautilus-icon-canvas-item.h \
nautilus-icon-container.h \
nautilus-icon-dnd.h \
......@@ -170,8 +176,8 @@ noinst_HEADERS = \
nautilus-string.h \
nautilus-text-caption.h \
nautilus-undo-context.h \
nautilus-undo-signal-handlers.h \
nautilus-undo-manager.h \
nautilus-undo-signal-handlers.h \
nautilus-user-level-manager.h \
nautilus-view-identifier.h \
nautilus-xml-extensions.h \
......
......@@ -53,6 +53,7 @@
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus/nautilus-undo.h>
#include "nautilus-zoom-control.h"
#include <ctype.h>
......@@ -318,14 +319,14 @@ nautilus_window_constructed (NautilusWindow *window)
/* FIXME bugzilla.eazel.com 1244: Hard-wired size here? */
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
window->content_hbox = gtk_hpaned_new ();
window->content_hbox = nautilus_horizontal_splitter_new ();
/* FIXME bugzilla.eazel.com 1245: No constant for the default? */
/* FIXME bugzilla.eazel.com 1245: Saved in pixels instead of in %? */
/* FIXME bugzilla.eazel.com 1245: No reality check on the value? */
/* FIXME bugzilla.eazel.com 1245: get_enum? why not get_integer? */
sidebar_width = nautilus_preferences_get_enum (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH, 148);
gtk_paned_set_position (GTK_PANED (window->content_hbox), sidebar_width);
e_paned_set_position (E_PANED (window->content_hbox), sidebar_width);
}
gnome_app_set_contents (app, window->content_hbox);
......@@ -346,7 +347,7 @@ nautilus_window_constructed (NautilusWindow *window)
* for the desktop window.
*/
if (!NAUTILUS_IS_DESKTOP_WINDOW (window)) {
gtk_paned_pack1 (GTK_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
e_paned_pack1 (E_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
}
gtk_widget_show_all (window->content_hbox);
......@@ -1170,13 +1171,13 @@ nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame
* We should use inheritance instead of these special cases
* for the desktop window.
*/
if (!GTK_IS_PANED (window->content_hbox)) {
if (!E_IS_PANED (window->content_hbox)) {
gtk_container_add (GTK_CONTAINER (window->content_hbox),
GTK_WIDGET (new_view));
} else {
gtk_paned_pack2 (GTK_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
e_paned_pack2 (E_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
}
}
......
......@@ -53,6 +53,7 @@
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus/nautilus-undo.h>
#include "nautilus-zoom-control.h"
#include <ctype.h>
......@@ -318,14 +319,14 @@ nautilus_window_constructed (NautilusWindow *window)
/* FIXME bugzilla.eazel.com 1244: Hard-wired size here? */
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
window->content_hbox = gtk_hpaned_new ();
window->content_hbox = nautilus_horizontal_splitter_new ();
/* FIXME bugzilla.eazel.com 1245: No constant for the default? */
/* FIXME bugzilla.eazel.com 1245: Saved in pixels instead of in %? */
/* FIXME bugzilla.eazel.com 1245: No reality check on the value? */
/* FIXME bugzilla.eazel.com 1245: get_enum? why not get_integer? */
sidebar_width = nautilus_preferences_get_enum (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH, 148);
gtk_paned_set_position (GTK_PANED (window->content_hbox), sidebar_width);
e_paned_set_position (E_PANED (window->content_hbox), sidebar_width);
}
gnome_app_set_contents (app, window->content_hbox);
......@@ -346,7 +347,7 @@ nautilus_window_constructed (NautilusWindow *window)
* for the desktop window.
*/
if (!NAUTILUS_IS_DESKTOP_WINDOW (window)) {
gtk_paned_pack1 (GTK_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
e_paned_pack1 (E_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
}
gtk_widget_show_all (window->content_hbox);
......@@ -1170,13 +1171,13 @@ nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame
* We should use inheritance instead of these special cases
* for the desktop window.
*/
if (!GTK_IS_PANED (window->content_hbox)) {
if (!E_IS_PANED (window->content_hbox)) {
gtk_container_add (GTK_CONTAINER (window->content_hbox),
GTK_WIDGET (new_view));
} else {
gtk_paned_pack2 (GTK_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
e_paned_pack2 (E_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
}
}
......
......@@ -53,6 +53,7 @@
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus/nautilus-undo.h>
#include "nautilus-zoom-control.h"
#include <ctype.h>
......@@ -318,14 +319,14 @@ nautilus_window_constructed (NautilusWindow *window)
/* FIXME bugzilla.eazel.com 1244: Hard-wired size here? */
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
window->content_hbox = gtk_hpaned_new ();
window->content_hbox = nautilus_horizontal_splitter_new ();
/* FIXME bugzilla.eazel.com 1245: No constant for the default? */
/* FIXME bugzilla.eazel.com 1245: Saved in pixels instead of in %? */
/* FIXME bugzilla.eazel.com 1245: No reality check on the value? */
/* FIXME bugzilla.eazel.com 1245: get_enum? why not get_integer? */
sidebar_width = nautilus_preferences_get_enum (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH, 148);
gtk_paned_set_position (GTK_PANED (window->content_hbox), sidebar_width);
e_paned_set_position (E_PANED (window->content_hbox), sidebar_width);
}
gnome_app_set_contents (app, window->content_hbox);
......@@ -346,7 +347,7 @@ nautilus_window_constructed (NautilusWindow *window)
* for the desktop window.
*/
if (!NAUTILUS_IS_DESKTOP_WINDOW (window)) {
gtk_paned_pack1 (GTK_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
e_paned_pack1 (E_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
}
gtk_widget_show_all (window->content_hbox);
......@@ -1170,13 +1171,13 @@ nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame
* We should use inheritance instead of these special cases
* for the desktop window.
*/
if (!GTK_IS_PANED (window->content_hbox)) {
if (!E_IS_PANED (window->content_hbox)) {
gtk_container_add (GTK_CONTAINER (window->content_hbox),
GTK_WIDGET (new_view));
} else {
gtk_paned_pack2 (GTK_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
e_paned_pack2 (E_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
}
}
......
......@@ -53,6 +53,7 @@
#include <libnautilus-extensions/nautilus-string.h>
#include <libnautilus-extensions/nautilus-mini-icon.h>
#include <libnautilus-extensions/nautilus-generous-bin.h>
#include <libnautilus-extensions/nautilus-horizontal-splitter.h>
#include <libnautilus/nautilus-undo.h>
#include "nautilus-zoom-control.h"
#include <ctype.h>
......@@ -318,14 +319,14 @@ nautilus_window_constructed (NautilusWindow *window)
/* FIXME bugzilla.eazel.com 1244: Hard-wired size here? */
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
window->content_hbox = gtk_hpaned_new ();
window->content_hbox = nautilus_horizontal_splitter_new ();
/* FIXME bugzilla.eazel.com 1245: No constant for the default? */
/* FIXME bugzilla.eazel.com 1245: Saved in pixels instead of in %? */
/* FIXME bugzilla.eazel.com 1245: No reality check on the value? */
/* FIXME bugzilla.eazel.com 1245: get_enum? why not get_integer? */
sidebar_width = nautilus_preferences_get_enum (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH, 148);
gtk_paned_set_position (GTK_PANED (window->content_hbox), sidebar_width);
e_paned_set_position (E_PANED (window->content_hbox), sidebar_width);
}
gnome_app_set_contents (app, window->content_hbox);
......@@ -346,7 +347,7 @@ nautilus_window_constructed (NautilusWindow *window)
* for the desktop window.
*/
if (!NAUTILUS_IS_DESKTOP_WINDOW (window)) {
gtk_paned_pack1 (GTK_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
e_paned_pack1 (E_PANED(window->content_hbox), temp_frame, FALSE, FALSE);
}
gtk_widget_show_all (window->content_hbox);
......@@ -1170,13 +1171,13 @@ nautilus_window_real_set_content_view (NautilusWindow *window, NautilusViewFrame
* We should use inheritance instead of these special cases
* for the desktop window.
*/
if (!GTK_IS_PANED (window->content_hbox)) {
if (!E_IS_PANED (window->content_hbox)) {
gtk_container_add (GTK_CONTAINER (window->content_hbox),
GTK_WIDGET (new_view));
} else {
gtk_paned_pack2 (GTK_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
e_paned_pack2 (E_PANED (window->content_hbox),
GTK_WIDGET (new_view),
TRUE, FALSE);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment