Commit 790227ce authored by Elliot Lee's avatar Elliot Lee
Browse files

Misc updates.



Misc updates.
parent e827b17e
Elliot Lee <sopwith@redhat.com>
This is not a good place to look for functionality
-- Elliot
......@@ -50,7 +50,29 @@
current usage situations, what about gnome_metadata.
> Doesn't use gnome-vfs
4. My conclusions
4. Misc suggestions
"One thing I like in windows is how you can select a file, and it views it on the side as
a preview (for picture files and html files)". (Easy to implement.)
5. Nautilus scenarios
irc://irc.gnome.org/#gnome
Shows xchat as the content view, and a list of 'Recently Displayed URLs' as a
meta view.
ghelp:
Displays the help intro page as the content view, and the table of contents,
help search, and help index as meta views.
file://localhost/
Displays icon list of files as content view, and directory tree and file
properties as meta views.
http://www.gnome.org/
Displays the web page as the content view, and web search and what's related
as meta views.
mailto:sopwith@gnome.org
Displays mail composer as content view, and address book as meta view.
6. My conclusions
gnomad is very focused on the user interface, and looks promising for producing a good
user experience.
......
......@@ -164,6 +164,12 @@ nautilus_window_set_status(NautilusWindow *window, const char *txt)
window->statusbar_clear_id = 0;
}
static void
gtk_option_menu_do_resize(GtkWidget *widget, GtkAllocation *size_alloc, GtkWidget *optmenu)
{
gtk_widget_set_usize(optmenu, size_alloc->width, -1);
}
static void
nautilus_window_constructed(NautilusWindow *window)
{
......@@ -172,16 +178,9 @@ nautilus_window_constructed(NautilusWindow *window)
GNOMEUIINFO_END
};
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_MENU_CLOSE_ITEM(nautilus_window_close, NULL),
GNOMEUIINFO_SUBTREE_STOCK(N_("_Actions"), dummy_menu, GNOME_STOCK_MENU_JUMP_TO),
GNOMEUIINFO_END
};
#if 0
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_SUBTREE("Main", ops_menu),
GNOMEUIINFO_END
};
#endif
GtkWidget *menu_hbox, *menubar, *wtmp, *statusbar;
GtkAccelGroup *ag;
......@@ -192,10 +191,25 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_add_accel_group(GTK_WINDOW(app), ag);
menu_hbox = gtk_hbox_new(FALSE, GNOME_PAD);
menubar = gtk_menu_bar_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), menubar, TRUE, TRUE, GNOME_PAD_BIG);
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
window->option_cvtype = gtk_option_menu_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), window->option_cvtype, TRUE, TRUE, GNOME_PAD_BIG);
gtk_widget_show(window->option_cvtype);
window->menu_cvtype = gtk_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(window->option_cvtype), window->menu_cvtype);
gtk_signal_connect_while_alive(GTK_OBJECT(window->menu_cvtype), "size_allocate",
GTK_SIGNAL_FUNC(gtk_option_menu_do_resize), window->option_cvtype,
GTK_OBJECT(window->option_cvtype));
wtmp = gtk_menu_item_new_with_label(_("View as blank space"));
gtk_container_add(GTK_CONTAINER(window->menu_cvtype), wtmp);
gtk_widget_show(wtmp);
gtk_option_menu_set_history(GTK_OPTION_MENU(window->option_cvtype), 0);
gtk_widget_queue_resize(window->menu_cvtype);
/* A hacked-up version of gnome_app_set_menu() */
{
GtkWidget *dock_item;
......@@ -383,7 +397,7 @@ nautilus_window_new(const char *app_id)
static void
nautilus_window_close (GtkWidget *widget,
GtkWidget *window)
GtkWidget *window)
{
gtk_widget_destroy(window);
}
......@@ -687,15 +701,13 @@ nautilus_window_set_initial_state(NautilusWindow *window)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window,
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(),
"main_window", window, NULL))
);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(),
"main_window", window, NULL))
);
nautilus_window_set_content_view(window, view);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view);
gtk_widget_size_request(GTK_WIDGET(window), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->content_hbox), &sreq);
......
......@@ -57,9 +57,11 @@ struct _NautilusWindow {
GnomeApp parent_object;
GtkWidget *content_view;
GSList *meta_views;
GtkWidget *meta_notebook, *content_hbox, *btn_back, *btn_fwd;
GtkWidget *option_cvtype, *menu_cvtype;
NautilusLocationReference current_uri, actual_current_uri;
char *current_content_type;
......
......@@ -164,6 +164,12 @@ nautilus_window_set_status(NautilusWindow *window, const char *txt)
window->statusbar_clear_id = 0;
}
static void
gtk_option_menu_do_resize(GtkWidget *widget, GtkAllocation *size_alloc, GtkWidget *optmenu)
{
gtk_widget_set_usize(optmenu, size_alloc->width, -1);
}
static void
nautilus_window_constructed(NautilusWindow *window)
{
......@@ -172,16 +178,9 @@ nautilus_window_constructed(NautilusWindow *window)
GNOMEUIINFO_END
};
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_MENU_CLOSE_ITEM(nautilus_window_close, NULL),
GNOMEUIINFO_SUBTREE_STOCK(N_("_Actions"), dummy_menu, GNOME_STOCK_MENU_JUMP_TO),
GNOMEUIINFO_END
};
#if 0
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_SUBTREE("Main", ops_menu),
GNOMEUIINFO_END
};
#endif
GtkWidget *menu_hbox, *menubar, *wtmp, *statusbar;
GtkAccelGroup *ag;
......@@ -192,10 +191,25 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_add_accel_group(GTK_WINDOW(app), ag);
menu_hbox = gtk_hbox_new(FALSE, GNOME_PAD);
menubar = gtk_menu_bar_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), menubar, TRUE, TRUE, GNOME_PAD_BIG);
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
window->option_cvtype = gtk_option_menu_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), window->option_cvtype, TRUE, TRUE, GNOME_PAD_BIG);
gtk_widget_show(window->option_cvtype);
window->menu_cvtype = gtk_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(window->option_cvtype), window->menu_cvtype);
gtk_signal_connect_while_alive(GTK_OBJECT(window->menu_cvtype), "size_allocate",
GTK_SIGNAL_FUNC(gtk_option_menu_do_resize), window->option_cvtype,
GTK_OBJECT(window->option_cvtype));
wtmp = gtk_menu_item_new_with_label(_("View as blank space"));
gtk_container_add(GTK_CONTAINER(window->menu_cvtype), wtmp);
gtk_widget_show(wtmp);
gtk_option_menu_set_history(GTK_OPTION_MENU(window->option_cvtype), 0);
gtk_widget_queue_resize(window->menu_cvtype);
/* A hacked-up version of gnome_app_set_menu() */
{
GtkWidget *dock_item;
......@@ -383,7 +397,7 @@ nautilus_window_new(const char *app_id)
static void
nautilus_window_close (GtkWidget *widget,
GtkWidget *window)
GtkWidget *window)
{
gtk_widget_destroy(window);
}
......@@ -687,15 +701,13 @@ nautilus_window_set_initial_state(NautilusWindow *window)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window,
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(),
"main_window", window, NULL))
);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(),
"main_window", window, NULL))
);
nautilus_window_set_content_view(window, view);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view);
gtk_widget_size_request(GTK_WIDGET(window), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->content_hbox), &sreq);
......
......@@ -57,9 +57,11 @@ struct _NautilusWindow {
GnomeApp parent_object;
GtkWidget *content_view;
GSList *meta_views;
GtkWidget *meta_notebook, *content_hbox, *btn_back, *btn_fwd;
GtkWidget *option_cvtype, *menu_cvtype;
NautilusLocationReference current_uri, actual_current_uri;
char *current_content_type;
......
......@@ -164,6 +164,12 @@ nautilus_window_set_status(NautilusWindow *window, const char *txt)
window->statusbar_clear_id = 0;
}
static void
gtk_option_menu_do_resize(GtkWidget *widget, GtkAllocation *size_alloc, GtkWidget *optmenu)
{
gtk_widget_set_usize(optmenu, size_alloc->width, -1);
}
static void
nautilus_window_constructed(NautilusWindow *window)
{
......@@ -172,16 +178,9 @@ nautilus_window_constructed(NautilusWindow *window)
GNOMEUIINFO_END
};
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_MENU_CLOSE_ITEM(nautilus_window_close, NULL),
GNOMEUIINFO_SUBTREE_STOCK(N_("_Actions"), dummy_menu, GNOME_STOCK_MENU_JUMP_TO),
GNOMEUIINFO_END
};
#if 0
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_SUBTREE("Main", ops_menu),
GNOMEUIINFO_END
};
#endif
GtkWidget *menu_hbox, *menubar, *wtmp, *statusbar;
GtkAccelGroup *ag;
......@@ -192,10 +191,25 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_add_accel_group(GTK_WINDOW(app), ag);
menu_hbox = gtk_hbox_new(FALSE, GNOME_PAD);
menubar = gtk_menu_bar_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), menubar, TRUE, TRUE, GNOME_PAD_BIG);
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
window->option_cvtype = gtk_option_menu_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), window->option_cvtype, TRUE, TRUE, GNOME_PAD_BIG);
gtk_widget_show(window->option_cvtype);
window->menu_cvtype = gtk_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(window->option_cvtype), window->menu_cvtype);
gtk_signal_connect_while_alive(GTK_OBJECT(window->menu_cvtype), "size_allocate",
GTK_SIGNAL_FUNC(gtk_option_menu_do_resize), window->option_cvtype,
GTK_OBJECT(window->option_cvtype));
wtmp = gtk_menu_item_new_with_label(_("View as blank space"));
gtk_container_add(GTK_CONTAINER(window->menu_cvtype), wtmp);
gtk_widget_show(wtmp);
gtk_option_menu_set_history(GTK_OPTION_MENU(window->option_cvtype), 0);
gtk_widget_queue_resize(window->menu_cvtype);
/* A hacked-up version of gnome_app_set_menu() */
{
GtkWidget *dock_item;
......@@ -383,7 +397,7 @@ nautilus_window_new(const char *app_id)
static void
nautilus_window_close (GtkWidget *widget,
GtkWidget *window)
GtkWidget *window)
{
gtk_widget_destroy(window);
}
......@@ -687,15 +701,13 @@ nautilus_window_set_initial_state(NautilusWindow *window)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window,
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(),
"main_window", window, NULL))
);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(),
"main_window", window, NULL))
);
nautilus_window_set_content_view(window, view);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view);
gtk_widget_size_request(GTK_WIDGET(window), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->content_hbox), &sreq);
......
......@@ -57,9 +57,11 @@ struct _NautilusWindow {
GnomeApp parent_object;
GtkWidget *content_view;
GSList *meta_views;
GtkWidget *meta_notebook, *content_hbox, *btn_back, *btn_fwd;
GtkWidget *option_cvtype, *menu_cvtype;
NautilusLocationReference current_uri, actual_current_uri;
char *current_content_type;
......
......@@ -164,6 +164,12 @@ nautilus_window_set_status(NautilusWindow *window, const char *txt)
window->statusbar_clear_id = 0;
}
static void
gtk_option_menu_do_resize(GtkWidget *widget, GtkAllocation *size_alloc, GtkWidget *optmenu)
{
gtk_widget_set_usize(optmenu, size_alloc->width, -1);
}
static void
nautilus_window_constructed(NautilusWindow *window)
{
......@@ -172,16 +178,9 @@ nautilus_window_constructed(NautilusWindow *window)
GNOMEUIINFO_END
};
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_MENU_CLOSE_ITEM(nautilus_window_close, NULL),
GNOMEUIINFO_SUBTREE_STOCK(N_("_Actions"), dummy_menu, GNOME_STOCK_MENU_JUMP_TO),
GNOMEUIINFO_END
};
#if 0
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_SUBTREE("Main", ops_menu),
GNOMEUIINFO_END
};
#endif
GtkWidget *menu_hbox, *menubar, *wtmp, *statusbar;
GtkAccelGroup *ag;
......@@ -192,10 +191,25 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_add_accel_group(GTK_WINDOW(app), ag);
menu_hbox = gtk_hbox_new(FALSE, GNOME_PAD);
menubar = gtk_menu_bar_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), menubar, TRUE, TRUE, GNOME_PAD_BIG);
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
window->option_cvtype = gtk_option_menu_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), window->option_cvtype, TRUE, TRUE, GNOME_PAD_BIG);
gtk_widget_show(window->option_cvtype);
window->menu_cvtype = gtk_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(window->option_cvtype), window->menu_cvtype);
gtk_signal_connect_while_alive(GTK_OBJECT(window->menu_cvtype), "size_allocate",
GTK_SIGNAL_FUNC(gtk_option_menu_do_resize), window->option_cvtype,
GTK_OBJECT(window->option_cvtype));
wtmp = gtk_menu_item_new_with_label(_("View as blank space"));
gtk_container_add(GTK_CONTAINER(window->menu_cvtype), wtmp);
gtk_widget_show(wtmp);
gtk_option_menu_set_history(GTK_OPTION_MENU(window->option_cvtype), 0);
gtk_widget_queue_resize(window->menu_cvtype);
/* A hacked-up version of gnome_app_set_menu() */
{
GtkWidget *dock_item;
......@@ -383,7 +397,7 @@ nautilus_window_new(const char *app_id)
static void
nautilus_window_close (GtkWidget *widget,
GtkWidget *window)
GtkWidget *window)
{
gtk_widget_destroy(window);
}
......@@ -687,15 +701,13 @@ nautilus_window_set_initial_state(NautilusWindow *window)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window,
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(),
"main_window", window, NULL))
);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(),
"main_window", window, NULL))
);
nautilus_window_set_content_view(window, view);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view);
gtk_widget_size_request(GTK_WIDGET(window), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->content_hbox), &sreq);
......
......@@ -57,9 +57,11 @@ struct _NautilusWindow {
GnomeApp parent_object;
GtkWidget *content_view;
GSList *meta_views;
GtkWidget *meta_notebook, *content_hbox, *btn_back, *btn_fwd;
GtkWidget *option_cvtype, *menu_cvtype;
NautilusLocationReference current_uri, actual_current_uri;
char *current_content_type;
......
......@@ -164,6 +164,12 @@ nautilus_window_set_status(NautilusWindow *window, const char *txt)
window->statusbar_clear_id = 0;
}
static void
gtk_option_menu_do_resize(GtkWidget *widget, GtkAllocation *size_alloc, GtkWidget *optmenu)
{
gtk_widget_set_usize(optmenu, size_alloc->width, -1);
}
static void
nautilus_window_constructed(NautilusWindow *window)
{
......@@ -172,16 +178,9 @@ nautilus_window_constructed(NautilusWindow *window)
GNOMEUIINFO_END
};
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_MENU_CLOSE_ITEM(nautilus_window_close, NULL),
GNOMEUIINFO_SUBTREE_STOCK(N_("_Actions"), dummy_menu, GNOME_STOCK_MENU_JUMP_TO),
GNOMEUIINFO_END
};
#if 0
GnomeUIInfo main_menu[] = {
GNOMEUIINFO_SUBTREE("Main", ops_menu),
GNOMEUIINFO_END
};
#endif
GtkWidget *menu_hbox, *menubar, *wtmp, *statusbar;
GtkAccelGroup *ag;
......@@ -192,10 +191,25 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_add_accel_group(GTK_WINDOW(app), ag);
menu_hbox = gtk_hbox_new(FALSE, GNOME_PAD);
menubar = gtk_menu_bar_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), menubar, TRUE, TRUE, GNOME_PAD_BIG);
gnome_app_fill_menu_with_data(GTK_MENU_SHELL(menubar), main_menu, ag, TRUE, 0, window);
window->option_cvtype = gtk_option_menu_new();
gtk_box_pack_end(GTK_BOX(menu_hbox), window->option_cvtype, TRUE, TRUE, GNOME_PAD_BIG);
gtk_widget_show(window->option_cvtype);
window->menu_cvtype = gtk_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(window->option_cvtype), window->menu_cvtype);
gtk_signal_connect_while_alive(GTK_OBJECT(window->menu_cvtype), "size_allocate",
GTK_SIGNAL_FUNC(gtk_option_menu_do_resize), window->option_cvtype,
GTK_OBJECT(window->option_cvtype));
wtmp = gtk_menu_item_new_with_label(_("View as blank space"));
gtk_container_add(GTK_CONTAINER(window->menu_cvtype), wtmp);
gtk_widget_show(wtmp);
gtk_option_menu_set_history(GTK_OPTION_MENU(window->option_cvtype), 0);
gtk_widget_queue_resize(window->menu_cvtype);
/* A hacked-up version of gnome_app_set_menu() */
{
GtkWidget *dock_item;
......@@ -383,7 +397,7 @@ nautilus_window_new(const char *app_id)
static void
nautilus_window_close (GtkWidget *widget,
GtkWidget *window)
GtkWidget *window)
{
gtk_widget_destroy(window);
}
......@@ -687,15 +701,13 @@ nautilus_window_set_initial_state(NautilusWindow *window)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window,
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(),
"main_window", window, NULL))
);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(),
"main_window", window, NULL))
);
nautilus_window_set_content_view(window, view);
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL));
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view);
gtk_widget_size_request(GTK_WIDGET(window), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->content_hbox), &sreq);
......
......@@ -57,9 +57,11 @@ struct _NautilusWindow {
GnomeApp parent_object;
GtkWidget *content_view;
GSList *meta_views;
GtkWidget *meta_notebook, *content_hbox, *btn_back, *btn_fwd;
GtkWidget *option_cvtype, *menu_cvtype;
NautilusLocationReference current_uri, actual_current_uri;
char *current_content_type;
......
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