Commit c7382d0d authored by Elliot Lee's avatar Elliot Lee Committed by Elliot Lee

Translate strings.



1999-12-16  Elliot Lee  <sopwith@redhat.com>

	* components/help/hyperbola-nav-tree.c: Translate strings.

	* components/history/ntl-history-view.c: Bug fixes, use API
 	function for setting meta-view label.

	* libnautilus/ntl-meta-view-client.[ch]:
 	s/meta_view_set_label/meta_view_client_set_label/

	* src/ntl-uri-map.c: Use history view instead of help view as the
 	default meta view for now.

	* src/ntl-window.c: As per the comment that was removed from
 	ntl-window.c, gnome_app_install_menu_hints() needs to be called
 	_after_ statusbar creation

	* src/file-manager/fm-directory-view.c: Add more debugging assertions
	and messages.
parent 4587bbee
1999-12-16 Elliot Lee <sopwith@redhat.com>
* components/help/hyperbola-nav-tree.c: Translate strings.
* components/history/ntl-history-view.c: Bug fixes, use API
function for setting meta-view label.
* libnautilus/ntl-meta-view-client.[ch]:
s/meta_view_set_label/meta_view_client_set_label/
* src/ntl-uri-map.c: Use history view instead of help view as the
default meta view for now.
* src/ntl-window.c: As per the comment that was removed from
ntl-window.c, gnome_app_install_menu_hints() needs to be called
_after_ statusbar creation
* src/file-manager/fm-directory-view.c: Add more debugging assertions
and messages.
1999-12-15 John Sullivan <sullivan@eazel.com>
* src/ntl-window.c: (nautilus_window_constructed): Added beginnings
......
......@@ -76,7 +76,7 @@ hyperbola_navigation_tree_new(void)
gtk_signal_connect(GTK_OBJECT(view->vc), "notify_location_change", hyperbola_navigation_tree_notify_location_change,
view);
nautilus_meta_view_set_label(NAUTILUS_META_VIEW_CLIENT(view->vc), "Help Contents");
nautilus_meta_view_client_set_label(NAUTILUS_META_VIEW_CLIENT(view->vc), _("Help Contents"));
view->ctree = gtk_ctree_new_with_titles(1, 0, (gchar **)titles);
gtk_clist_freeze(GTK_CLIST(view->ctree));
......
......@@ -28,8 +28,10 @@ hyperbola_navigation_history_notify_location_change (NautilusViewClient *view,
char *uri;
int i;
/* If we are moving 'forward' in history, must either just select a new row that is farther ahead in history,
or delete all the history ahead of this point */
/* If we are moving 'forward' in history, must either just
select a new row that is farther ahead in history, or delete
all the history ahead of this point */
gtk_clist_get_text(clist, hview->last_row - 1, 1, &uri);
if(!strcmp(uri, loci->requested_uri))
{
......@@ -92,13 +94,13 @@ static GnomeObject * make_obj(GnomeGenericFactory *Factory, const char *goad_id,
{
GtkWidget *client, *clist, *wtmp;
GnomeObject *ctl;
GnomePropertyBag *bag;
char *col_titles[1];
HistoryView *hview;
g_return_val_if_fail(!strcmp(goad_id, "ntl_history_view"), NULL);
hview = g_new0(HistoryView, 1);
hview->last_row = -1;
client = gtk_widget_new(nautilus_meta_view_client_get_type(), NULL);
ctl = nautilus_view_client_get_gnome_object(NAUTILUS_VIEW_CLIENT(client));
......@@ -110,20 +112,21 @@ static GnomeObject * make_obj(GnomeGenericFactory *Factory, const char *goad_id,
gtk_clist_columns_autosize(GTK_CLIST(clist));
wtmp = gtk_scrolled_window_new(gtk_clist_get_hadjustment(GTK_CLIST(clist)),
gtk_clist_get_vadjustment(GTK_CLIST(clist)));
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(wtmp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(wtmp),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(client), wtmp);
gtk_container_add(GTK_CONTAINER(wtmp), clist);
gtk_widget_show_all(client);
/* handle events */
gtk_signal_connect(GTK_OBJECT(client), "notify_location_change", hyperbola_navigation_history_notify_location_change, clist);
gtk_signal_connect(GTK_OBJECT(clist), "select_row", hyperbola_navigation_history_select_row, client);
gtk_signal_connect(GTK_OBJECT(client), "notify_location_change", hyperbola_navigation_history_notify_location_change, hview);
gtk_signal_connect(GTK_OBJECT(clist), "select_row", hyperbola_navigation_history_select_row, hview);
/* set description */
bag = gnome_control_get_property_bag(GNOME_CONTROL(ctl));
gnome_property_bag_add(bag, "description", "string", _("History"), _("History"), _("Description"),
GNOME_PROPERTY_READ_ONLY);
nautilus_meta_view_client_set_label(NAUTILUS_META_VIEW_CLIENT(client),
_("History"));
hview->view = (NautilusViewClient *)client;
hview->clist = (GtkCList *)clist;
......@@ -144,7 +147,7 @@ int main(int argc, char *argv[])
factory = gnome_generic_factory_new_multi("ntl_history_view_factory", make_obj, NULL);
gtk_main();
bonobo_main();
return 0;
}
......@@ -28,8 +28,10 @@ hyperbola_navigation_history_notify_location_change (NautilusViewClient *view,
char *uri;
int i;
/* If we are moving 'forward' in history, must either just select a new row that is farther ahead in history,
or delete all the history ahead of this point */
/* If we are moving 'forward' in history, must either just
select a new row that is farther ahead in history, or delete
all the history ahead of this point */
gtk_clist_get_text(clist, hview->last_row - 1, 1, &uri);
if(!strcmp(uri, loci->requested_uri))
{
......@@ -92,13 +94,13 @@ static GnomeObject * make_obj(GnomeGenericFactory *Factory, const char *goad_id,
{
GtkWidget *client, *clist, *wtmp;
GnomeObject *ctl;
GnomePropertyBag *bag;
char *col_titles[1];
HistoryView *hview;
g_return_val_if_fail(!strcmp(goad_id, "ntl_history_view"), NULL);
hview = g_new0(HistoryView, 1);
hview->last_row = -1;
client = gtk_widget_new(nautilus_meta_view_client_get_type(), NULL);
ctl = nautilus_view_client_get_gnome_object(NAUTILUS_VIEW_CLIENT(client));
......@@ -110,20 +112,21 @@ static GnomeObject * make_obj(GnomeGenericFactory *Factory, const char *goad_id,
gtk_clist_columns_autosize(GTK_CLIST(clist));
wtmp = gtk_scrolled_window_new(gtk_clist_get_hadjustment(GTK_CLIST(clist)),
gtk_clist_get_vadjustment(GTK_CLIST(clist)));
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(wtmp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(wtmp),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(client), wtmp);
gtk_container_add(GTK_CONTAINER(wtmp), clist);
gtk_widget_show_all(client);
/* handle events */
gtk_signal_connect(GTK_OBJECT(client), "notify_location_change", hyperbola_navigation_history_notify_location_change, clist);
gtk_signal_connect(GTK_OBJECT(clist), "select_row", hyperbola_navigation_history_select_row, client);
gtk_signal_connect(GTK_OBJECT(client), "notify_location_change", hyperbola_navigation_history_notify_location_change, hview);
gtk_signal_connect(GTK_OBJECT(clist), "select_row", hyperbola_navigation_history_select_row, hview);
/* set description */
bag = gnome_control_get_property_bag(GNOME_CONTROL(ctl));
gnome_property_bag_add(bag, "description", "string", _("History"), _("History"), _("Description"),
GNOME_PROPERTY_READ_ONLY);
nautilus_meta_view_client_set_label(NAUTILUS_META_VIEW_CLIENT(client),
_("History"));
hview->view = (NautilusViewClient *)client;
hview->clist = (GtkCList *)clist;
......@@ -144,7 +147,7 @@ int main(int argc, char *argv[])
factory = gnome_generic_factory_new_multi("ntl_history_view_factory", make_obj, NULL);
gtk_main();
bonobo_main();
return 0;
}
......@@ -104,7 +104,7 @@ nautilus_meta_view_client_class_init (NautilusMetaViewClientClass *klass)
}
void
nautilus_meta_view_set_label(NautilusMetaViewClient *mvc, const char *label)
nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc, const char *label)
{
GnomeObject *ctl;
GnomePropertyBag *bag;
......
......@@ -47,7 +47,7 @@ struct _NautilusMetaViewClient {
};
GtkType nautilus_meta_view_client_get_type (void);
void nautilus_meta_view_set_label(NautilusMetaViewClient *mvc,
const char *label);
void nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc,
const char *label);
#endif
......@@ -104,7 +104,7 @@ nautilus_meta_view_client_class_init (NautilusMetaViewClientClass *klass)
}
void
nautilus_meta_view_set_label(NautilusMetaViewClient *mvc, const char *label)
nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc, const char *label)
{
GnomeObject *ctl;
GnomePropertyBag *bag;
......
......@@ -47,7 +47,7 @@ struct _NautilusMetaViewClient {
};
GtkType nautilus_meta_view_client_get_type (void);
void nautilus_meta_view_set_label(NautilusMetaViewClient *mvc,
const char *label);
void nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc,
const char *label);
#endif
......@@ -104,7 +104,7 @@ nautilus_meta_view_client_class_init (NautilusMetaViewClientClass *klass)
}
void
nautilus_meta_view_set_label(NautilusMetaViewClient *mvc, const char *label)
nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc, const char *label)
{
GnomeObject *ctl;
GnomePropertyBag *bag;
......
......@@ -47,7 +47,7 @@ struct _NautilusMetaViewClient {
};
GtkType nautilus_meta_view_client_get_type (void);
void nautilus_meta_view_set_label(NautilusMetaViewClient *mvc,
const char *label);
void nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc,
const char *label);
#endif
......@@ -104,7 +104,7 @@ nautilus_meta_view_client_class_init (NautilusMetaViewClientClass *klass)
}
void
nautilus_meta_view_set_label(NautilusMetaViewClient *mvc, const char *label)
nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc, const char *label)
{
GnomeObject *ctl;
GnomePropertyBag *bag;
......
......@@ -47,7 +47,7 @@ struct _NautilusMetaViewClient {
};
GtkType nautilus_meta_view_client_get_type (void);
void nautilus_meta_view_set_label(NautilusMetaViewClient *mvc,
const char *label);
void nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc,
const char *label);
#endif
......@@ -104,7 +104,7 @@ nautilus_meta_view_client_class_init (NautilusMetaViewClientClass *klass)
}
void
nautilus_meta_view_set_label(NautilusMetaViewClient *mvc, const char *label)
nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc, const char *label)
{
GnomeObject *ctl;
GnomePropertyBag *bag;
......
......@@ -47,7 +47,7 @@ struct _NautilusMetaViewClient {
};
GtkType nautilus_meta_view_client_get_type (void);
void nautilus_meta_view_set_label(NautilusMetaViewClient *mvc,
const char *label);
void nautilus_meta_view_client_set_label(NautilusMetaViewClient *mvc,
const char *label);
#endif
......@@ -35,10 +35,10 @@
#include "fm-icon-cache.h"
#include "fm-public-api.h"
#define FM_DEBUG(x)
#define FM_DEBUG(x) g_message x
#define DISPLAY_TIMEOUT_INTERVAL 500
#define ENTRIES_PER_CB 1
static NautilusViewClientClass *parent_class = NULL;
......@@ -592,6 +592,7 @@ stop_load (FMDirectoryView *view)
view->current_position = GNOME_VFS_DIRECTORY_LIST_POSITION_NONE;
view->entries_to_display = 0;
view->directory_list = NULL;
}
......@@ -635,6 +636,8 @@ display_pending_entries (FMDirectoryView *view)
(view->current_position);
}
g_assert(i == view->entries_to_display);
if (flist != NULL)
gtk_clist_thaw (GTK_CLIST (flist));
......@@ -723,14 +726,17 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
{
FMDirectoryView *view;
g_assert(entries_read <= ENTRIES_PER_CB);
FM_DEBUG (("Entering function, %d entries read: %s",
entries_read, gnome_vfs_result_to_string (result)));
view = FM_DIRECTORY_VIEW (callback_data);
g_assert(!view->directory_list || view->directory_list == list);
if (view->directory_list == NULL) {
if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF) {
/* gtk_signal_emit (GTK_OBJECT (view), signals[OPEN_DONE]); */
setup_base_uri (view);
......@@ -757,11 +763,17 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
}
if (view->current_position == GNOME_VFS_DIRECTORY_LIST_POSITION_NONE
&& list)
&& list) {
view->current_position
= gnome_vfs_directory_list_get_position (list);
= gnome_vfs_directory_list_get_first_position (list);
g_message("Reset current position, length now %d",
g_list_length(view->current_position));
}
view->entries_to_display += entries_read;
g_message("%d new entries makes %d total (%d real total)\n",
entries_read, view->entries_to_display,
g_list_length(view->current_position));
if (result == GNOME_VFS_ERROR_EOF) {
display_pending_entries (view);
......@@ -899,7 +911,7 @@ fm_directory_view_load_uri (FMDirectoryView *view,
(GNOME_VFS_DIRECTORY_FILTER_NOSELFDIR /* filter_options */
| GNOME_VFS_DIRECTORY_FILTER_NOPARENTDIR),
NULL, /* filter_pattern */
1, /* items_per_notification */
ENTRIES_PER_CB, /* items_per_notification */
directory_load_cb, /* callback */
view); /* callback_data */
......
......@@ -96,7 +96,7 @@ nautilus_navinfo_new(NautilusNavigationInfo *navinfo,
}
navinfo->meta_iids = g_slist_append(navinfo->meta_iids, "hyperbola_navigation_tree");
navinfo->meta_iids = g_slist_append(navinfo->meta_iids, "ntl_history_view");
return navinfo;
}
......
......@@ -328,7 +328,6 @@ nautilus_window_constructed(NautilusWindow *window)
menubar = GTK_MENU_BAR(gtk_menu_bar_new());
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
gnome_app_set_menus(GNOME_APP(window), menubar);
gnome_app_install_menu_hints(app, main_menu);
// set up toolbar
......@@ -380,10 +379,14 @@ nautilus_window_constructed(NautilusWindow *window)
gnome_app_set_statusbar(app, (statusbar = gtk_statusbar_new()));
window->statusbar_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(statusbar), "IhateGtkStatusbar");
gnome_app_install_menu_hints(app, main_menu); /* This has to go here
after the statusbar
creation */
// set up window contents and policy
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
gtk_window_set_default_size(GTK_WINDOW(window), 650, 400);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
......
......@@ -328,7 +328,6 @@ nautilus_window_constructed(NautilusWindow *window)
menubar = GTK_MENU_BAR(gtk_menu_bar_new());
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
gnome_app_set_menus(GNOME_APP(window), menubar);
gnome_app_install_menu_hints(app, main_menu);
// set up toolbar
......@@ -380,10 +379,14 @@ nautilus_window_constructed(NautilusWindow *window)
gnome_app_set_statusbar(app, (statusbar = gtk_statusbar_new()));
window->statusbar_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(statusbar), "IhateGtkStatusbar");
gnome_app_install_menu_hints(app, main_menu); /* This has to go here
after the statusbar
creation */
// set up window contents and policy
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
gtk_window_set_default_size(GTK_WINDOW(window), 650, 400);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
......
......@@ -328,7 +328,6 @@ nautilus_window_constructed(NautilusWindow *window)
menubar = GTK_MENU_BAR(gtk_menu_bar_new());
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
gnome_app_set_menus(GNOME_APP(window), menubar);
gnome_app_install_menu_hints(app, main_menu);
// set up toolbar
......@@ -380,10 +379,14 @@ nautilus_window_constructed(NautilusWindow *window)
gnome_app_set_statusbar(app, (statusbar = gtk_statusbar_new()));
window->statusbar_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(statusbar), "IhateGtkStatusbar");
gnome_app_install_menu_hints(app, main_menu); /* This has to go here
after the statusbar
creation */
// set up window contents and policy
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
gtk_window_set_default_size(GTK_WINDOW(window), 650, 400);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
......
......@@ -328,7 +328,6 @@ nautilus_window_constructed(NautilusWindow *window)
menubar = GTK_MENU_BAR(gtk_menu_bar_new());
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
gnome_app_set_menus(GNOME_APP(window), menubar);
gnome_app_install_menu_hints(app, main_menu);
// set up toolbar
......@@ -380,10 +379,14 @@ nautilus_window_constructed(NautilusWindow *window)
gnome_app_set_statusbar(app, (statusbar = gtk_statusbar_new()));
window->statusbar_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(statusbar), "IhateGtkStatusbar");
gnome_app_install_menu_hints(app, main_menu); /* This has to go here
after the statusbar
creation */
// set up window contents and policy
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
gtk_window_set_default_size(GTK_WINDOW(window), 650, 400);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
......
......@@ -96,7 +96,7 @@ nautilus_navinfo_new(NautilusNavigationInfo *navinfo,
}
navinfo->meta_iids = g_slist_append(navinfo->meta_iids, "hyperbola_navigation_tree");
navinfo->meta_iids = g_slist_append(navinfo->meta_iids, "ntl_history_view");
return navinfo;
}
......
......@@ -328,7 +328,6 @@ nautilus_window_constructed(NautilusWindow *window)
menubar = GTK_MENU_BAR(gtk_menu_bar_new());
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
gnome_app_set_menus(GNOME_APP(window), menubar);
gnome_app_install_menu_hints(app, main_menu);
// set up toolbar
......@@ -380,10 +379,14 @@ nautilus_window_constructed(NautilusWindow *window)
gnome_app_set_statusbar(app, (statusbar = gtk_statusbar_new()));
window->statusbar_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(statusbar), "IhateGtkStatusbar");
gnome_app_install_menu_hints(app, main_menu); /* This has to go here
after the statusbar
creation */
// set up window contents and policy
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
gtk_window_set_default_size(GTK_WINDOW(window), 650, 400);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
......
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