Commit ef2dc9ef authored by Darin Adler's avatar Darin Adler
Browse files

Fixed a typo that was causing the history view to fail.

	* components/history/ntl-history-view.c
	(hyperbola_navigation_history_notify_location_change):
	Fixed a typo that was causing the history view to fail.

	* components/music/nautilus-music-view.c
	(nautilus_music_view_initialize_class),
	(nautilus_music_view_initialize), (setup_title_font),
	(nautilus_music_view_realize):
	Changed to use new nautilus_gtk_widget_set_font_by_name
	and got rid of the old realize hack.

	* components/rpmview/nautilus-rpm-view.c
	(nautilus_rpm_view_initialize):
	Added a FIXME about how it's bad to hard-wire a font.

	* components/services/startup/nautilus-service-startup-view.c
	(setup_title_font), (setup_form_title),
	(nautilus_service_startup_view_initialize),
	(nautilus_service_startup_view_realize),
	(nautilus_service_startup_view_load_uri):
	Changed to use new nautilus_gtk_widget_set_font_by_name
	and got rid of the old realize hack.

	* libnautilus-extensions/nautilus-gtk-extensions.h:
	* libnautilus-extensions/nautilus-gtk-extensions.c
	(nautilus_gtk_style_set_font): Made public.
	(nautilus_gtk_widget_set_font): Added comments and checks on
	the parameters.

	* libnautilus-extensions/nautilus-icon-container.c (relayout),
	(idle_handler), (nautilus_icon_container_move_icon),
	(world_width_changed), (end_stretching), (button_release_event),
	(handle_icon_button_press), (nautilus_icon_container_add_auto),
	(nautilus_icon_container_remove),
	(nautilus_icon_container_set_auto_layout):
	Some tweaks for auto-layout mode. Made it work better with
	stretching by not laying out the currently-stretched icon,
	simplified the code a bit, and made it relayout when an icon
	is removed.

	* src/file-manager/fm-directory-view.c (compute_menu_item_info),
	(fm_directory_view_real_merge_menus):
	Got rid of the "..." from "Delete...". On Macintosh, at least,
	the "..." is only used when the dialog is something that adds
	parameters to the command, not when it's just a confirmation.

	* src/nautilus-index-title.c (update_font),
	(nautilus_index_title_update_label),
	(nautilus_index_title_update_info):
	Changed to use new nautilus_gtk_widget_set_font and
	nautilus_gtk_widget_set_font_by_name.

	* src/ntl-index-panel.c (nautilus_index_panel_remove_meta_view):
	Made the index panel do *slightly* better when a meta view
	fails to load.

	* components/help/hyperbola-main.c (main):
	Fixed a warning.
parent e04de292
2000-04-20 Darin Adler <darin@eazel.com>
* components/history/ntl-history-view.c
(hyperbola_navigation_history_notify_location_change):
Fixed a typo that was causing the history view to fail.
* components/music/nautilus-music-view.c
(nautilus_music_view_initialize_class),
(nautilus_music_view_initialize), (setup_title_font),
(nautilus_music_view_realize):
Changed to use new nautilus_gtk_widget_set_font_by_name
and got rid of the old realize hack.
* components/rpmview/nautilus-rpm-view.c
(nautilus_rpm_view_initialize):
Added a FIXME about how it's bad to hard-wire a font.
* components/services/startup/nautilus-service-startup-view.c
(setup_title_font), (setup_form_title),
(nautilus_service_startup_view_initialize),
(nautilus_service_startup_view_realize),
(nautilus_service_startup_view_load_uri):
Changed to use new nautilus_gtk_widget_set_font_by_name
and got rid of the old realize hack.
* libnautilus-extensions/nautilus-gtk-extensions.h:
* libnautilus-extensions/nautilus-gtk-extensions.c
(nautilus_gtk_style_set_font): Made public.
(nautilus_gtk_widget_set_font): Added comments and checks on
the parameters.
* libnautilus-extensions/nautilus-icon-container.c (relayout),
(idle_handler), (nautilus_icon_container_move_icon),
(world_width_changed), (end_stretching), (button_release_event),
(handle_icon_button_press), (nautilus_icon_container_add_auto),
(nautilus_icon_container_remove),
(nautilus_icon_container_set_auto_layout):
Some tweaks for auto-layout mode. Made it work better with
stretching by not laying out the currently-stretched icon,
simplified the code a bit, and made it relayout when an icon
is removed.
* src/file-manager/fm-directory-view.c (compute_menu_item_info),
(fm_directory_view_real_merge_menus):
Got rid of the "..." from "Delete...". On Macintosh, at least,
the "..." is only used when the dialog is something that adds
parameters to the command, not when it's just a confirmation.
* src/nautilus-index-title.c (update_font),
(nautilus_index_title_update_label),
(nautilus_index_title_update_info):
Changed to use new nautilus_gtk_widget_set_font and
nautilus_gtk_widget_set_font_by_name.
* src/ntl-index-panel.c (nautilus_index_panel_remove_meta_view):
Made the index panel do *slightly* better when a meta view
fails to load.
* components/help/hyperbola-main.c (main):
Fixed a warning.
2000-04-20 Maciej Stachowiak <mjs@eazel.com>
* configure.in: Add back tests erroneously removed in the last
......@@ -7,9 +68,12 @@
* libnautilus-extensions/nautilus-directory.c:
(nautilus_directory_notify_files_moved):
Darin helped me finish implementing the missing parts of the call, including
updating the reference to the new directory object, updating the
file info structure to match the file's new location.
a b c d e f a b c d e f a b c d e f a b c d e f a b c d e f a b cd
d d e f a b c d e f a b c d e f
Darin helped me finish implementing the missing parts of the call,
including updating the reference to the new directory object,
updating the file info structure to match the file's new location.
Fixed a silly bug in an if statement.
* libnautilus-extensions/nautilus-file-changes-queue.c:
......@@ -39,23 +103,23 @@
* libnautilus-extensions/nautilus-directory.c:
(nautilus_directory_notify_files_added):
Work on making new files show up during copy. This is a simple version
using sync gnome_vfs_get_file_info calls, we'll need a version that
uses a new async get_file_info call that takes a list of URIs and
produces a list of file info structs.
Work on making new files show up during copy. This is a simple
version using sync gnome_vfs_get_file_info calls, we'll need a
version that uses a new async get_file_info call that takes a list
of URIs and produces a list of file info structs.
* libnautilus-extensions/nautilus-directory.c:
* libnautilus-extensions/nautilus-file.c:
* libnautilus-extensions/nautilus-file.h:
(update_file_info_in_list_if_needed), (dequeue_pending_idle_callback),
(nautilus_file_update):
Made dequeue_pending_idle_callback deal with getting duplicate
Made dequeue_pending_idle_callback deal with getting duplicate
file info structures or file info structures for files we already
know about. This also fixes 395.
* libnautilus-extensions/nautilus-file-changes-queue.c
Added some better comments and removed a fixme that didn't really need
fixing.
Added some better comments and removed a fixme that didn't really
need fixing.
2000-04-19 John Sullivan <sullivan@eazel.com>
......
......@@ -44,11 +44,11 @@ make_obj(BonoboGenericFactory *Factory, const char *goad_id, void *closure)
return retval;
}
int main(int argc, char *argv[])
int
main(int argc, char *argv[])
{
BonoboGenericFactory *factory;
CORBA_ORB orb;
CORBA_Environment ev;
gnome_init_with_popt_table("hyperbola", VERSION,
argc, argv,
......
......@@ -119,7 +119,7 @@ hyperbola_navigation_history_notify_location_change (NautilusViewFrame *view,
* keeping a parallel mechanism here. That will get us the right
* short name for different locations.
*/
gnome_vfs_uri_new (loci->requested_uri);
vfs_uri = gnome_vfs_uri_new (loci->requested_uri);
if (vfs_uri == NULL) {
short_name = g_strdup (loci->requested_uri);
} else {
......
......@@ -119,7 +119,7 @@ hyperbola_navigation_history_notify_location_change (NautilusViewFrame *view,
* keeping a parallel mechanism here. That will get us the right
* short name for different locations.
*/
gnome_vfs_uri_new (loci->requested_uri);
vfs_uri = gnome_vfs_uri_new (loci->requested_uri);
if (vfs_uri == NULL) {
short_name = g_strdup (loci->requested_uri);
} else {
......
......@@ -37,6 +37,7 @@
#include <libnautilus-extensions/nautilus-file.h>
#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-glib-extensions.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-string.h>
......@@ -91,8 +92,6 @@ static void nautilus_music_view_drag_data_received (GtkWidget
static void nautilus_music_view_initialize_class (NautilusMusicViewClass *klass);
static void nautilus_music_view_initialize (NautilusMusicView *view);
static void nautilus_music_view_destroy (GtkObject *object);
static void nautilus_music_view_realize (GtkWidget *widget);
static void setup_title_font (NautilusMusicView *music_view);
static void music_view_notify_location_change_callback (NautilusContentViewFrame *view,
Nautilus_NavigationInfo *navinfo,
NautilusMusicView *music_view);
......@@ -113,7 +112,6 @@ nautilus_music_view_initialize_class (NautilusMusicViewClass *klass)
widget_class = GTK_WIDGET_CLASS (klass);
object_class->destroy = nautilus_music_view_destroy;
widget_class->realize = nautilus_music_view_realize;
widget_class->drag_data_received = nautilus_music_view_drag_data_received;
}
......@@ -144,6 +142,9 @@ nautilus_music_view_initialize (NautilusMusicView *music_view)
/* allocate a widget for the album title */
music_view->details->album_title = gtk_label_new ("Album Title");
/* FIXME: don't use hardwired font like this */
nautilus_gtk_widget_set_font_by_name (music_view->details->album_title,
"-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*"); ;
gtk_box_pack_start (GTK_BOX (music_view->details->album_container), music_view->details->album_title, 0, 0, 0);
gtk_widget_show (music_view->details->album_title);
......@@ -231,32 +232,6 @@ nautilus_music_view_get_view_frame (NautilusMusicView *music_view)
return music_view->details->view_frame;
}
/* utility routine to set up the font for the album title, called after we're realized */
static void
setup_title_font(NautilusMusicView *music_view)
{
GtkStyle *temp_style;
temp_style = gtk_style_new();
gtk_widget_realize (music_view->details->album_title);
temp_style->font = gdk_font_load ("-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*"); ;
gtk_widget_set_style (music_view->details->album_title,
gtk_style_attach (temp_style, music_view->details->album_title->window));
}
/* set up fonts, colors, etc after we're realized */
void
nautilus_music_view_realize (GtkWidget *widget)
{
NautilusMusicView *music_view;
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget));
music_view = NAUTILUS_MUSIC_VIEW (widget);
setup_title_font (music_view);
}
/* here are some utility routines for reading ID3 tags from mp3 files */
/* initialize a songinfo structure */
......
......@@ -176,6 +176,7 @@ nautilus_rpm_view_initialize (NautilusRPMView *rpm_view)
/* allocate the name field */
rpm_view->details->package_title = gtk_label_new ("Package Title");
/* FIXME: don't use hardwired font like this */
nautilus_gtk_widget_set_font_by_name (rpm_view->details->package_title,
"-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*");
gtk_box_pack_start (GTK_BOX (temp_title_box), rpm_view->details->package_title, 0, 0, 0);
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* Copyright (C) 2000 Eazel, Inc
*
......@@ -35,6 +36,7 @@
#include <gnome-xml/tree.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-background.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
#include <libnautilus-extensions/nautilus-glib-extensions.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
......@@ -44,8 +46,8 @@
#include <stdio.h>
struct _NautilusServicesContentViewDetails {
gchar *uri;
gchar *auth_token;
char *uri;
char *auth_token;
NautilusContentViewFrame *view_frame;
GtkWidget *form;
......@@ -65,7 +67,6 @@ struct _NautilusServicesContentViewDetails {
static void nautilus_service_startup_view_initialize_class (NautilusServicesContentViewClass *klass);
static void nautilus_service_startup_view_initialize (NautilusServicesContentView *view);
static void nautilus_service_startup_view_destroy (GtkObject *object);
static void nautilus_service_startup_view_realize (GtkWidget *widget);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusServicesContentView, nautilus_service_startup_view,
GTK_TYPE_EVENT_BOX)
......@@ -78,7 +79,7 @@ static gboolean is_location(char *document_str, const char *place_str);
/* utility routine to go to another uri */
static void
go_to_uri(NautilusServicesContentView* view, gchar *uri)
go_to_uri(NautilusServicesContentView* view, char *uri)
{
Nautilus_NavigationRequestInfo nri;
memset(&nri, 0, sizeof(nri));
......@@ -92,7 +93,7 @@ config_button_cb (GtkWidget *button, char *data)
{
xmlDocPtr packages_file = create_configuration_metafile();
if (packages_file != NULL) {
gchar *temp_str = g_strdup_printf("%s/configuration.xml", g_get_home_dir());
char *temp_str = g_strdup_printf("%s/configuration.xml", g_get_home_dir());
xmlSaveFile(temp_str, packages_file);
xmlFreeDoc(packages_file);
g_free(temp_str);
......@@ -103,9 +104,9 @@ config_button_cb (GtkWidget *button, char *data)
static void
entry_changed_cb (GtkWidget *entry, NautilusServicesContentView *view)
{
gchar *email = gtk_entry_get_text(GTK_ENTRY(view->details->account_name));
gchar *password = gtk_entry_get_text(GTK_ENTRY(view->details->account_password));
gchar *confirm = gtk_entry_get_text(GTK_ENTRY(view->details->confirm_password));
char *email = gtk_entry_get_text(GTK_ENTRY(view->details->account_name));
char *password = gtk_entry_get_text(GTK_ENTRY(view->details->account_password));
char *confirm = gtk_entry_get_text(GTK_ENTRY(view->details->confirm_password));
gboolean button_enabled = email && strlen(email) && password && strlen(password) && confirm && strlen(confirm);
gtk_widget_set_sensitive(view->details->register_button, button_enabled);
......@@ -115,10 +116,10 @@ entry_changed_cb (GtkWidget *entry, NautilusServicesContentView *view)
it will optionally work asynchronously. Return NULL if we get an error */
static ghttp_request *
make_http_post_request(gchar *uri, gchar *post_body, gchar *auth_token)
make_http_post_request(char *uri, char *post_body, char *auth_token)
{
ghttp_request *request = NULL;
gchar *proxy = g_getenv("http_proxy");
char *proxy = g_getenv("http_proxy");
request = ghttp_request_new();
......@@ -165,7 +166,7 @@ make_http_post_request(gchar *uri, gchar *post_body, gchar *auth_token)
/* utility to force updating to happen */
static void
update_now()
update_now (void)
{
while (gtk_events_pending())
gtk_main_iteration();
......@@ -173,7 +174,7 @@ update_now()
/* utility routine to show an error message */
static void
show_feedback(NautilusServicesContentView *view, gchar* error_message)
show_feedback(NautilusServicesContentView *view, char* error_message)
{
gtk_label_set_text(GTK_LABEL(view->details->feedback_text), error_message);
gtk_widget_show(view->details->feedback_text);
......@@ -189,9 +190,9 @@ static void
gather_config_button_cb (GtkWidget *button, NautilusServicesContentView *view)
{
FILE* config_file;
gchar buffer[256], host_name[512];
gchar *config_file_name, *config_string, *uri, *response_str, *cookie_str;
gchar *encoded_token, *encoded_host_name;
char buffer[256], host_name[512];
char *config_file_name, *config_string, *uri, *response_str, *cookie_str;
char *encoded_token, *encoded_host_name;
GString* config_data;
xmlDocPtr config_doc;
ghttp_request *request;
......@@ -271,11 +272,11 @@ static void
register_button_cb (GtkWidget *button, NautilusServicesContentView *view)
{
ghttp_request *request;
gchar *response_str, *body, *uri;
gchar *encoded_email, *encoded_password;
gchar *email = gtk_entry_get_text(GTK_ENTRY(view->details->account_name));
gchar *password = gtk_entry_get_text(GTK_ENTRY(view->details->account_password));
gchar *confirm = gtk_entry_get_text(GTK_ENTRY(view->details->confirm_password));
char *response_str, *body, *uri;
char *encoded_email, *encoded_password;
char *email = gtk_entry_get_text(GTK_ENTRY(view->details->account_name));
char *password = gtk_entry_get_text(GTK_ENTRY(view->details->account_password));
char *confirm = gtk_entry_get_text(GTK_ENTRY(view->details->confirm_password));
gboolean registered_ok = FALSE;
/* see if the email address is valid; if not, display an error */
......@@ -325,17 +326,17 @@ register_button_cb (GtkWidget *button, NautilusServicesContentView *view)
}
else {
/* check for a cookie that indicates success */
const gchar* cookie = ghttp_get_header(request, "Set-Cookie");
const char* cookie = ghttp_get_header(request, "Set-Cookie");
/* we found the cookie, so save it in the services file */
gchar* token_start = strstr(cookie, "token=");
char* token_start = strstr(cookie, "token=");
if (token_start) {
gchar *temp_str = strdup(token_start + strlen("token="));
gchar *token_end = strchr(temp_str, ';');
char *temp_str = strdup(token_start + strlen("token="));
char *token_end = strchr(temp_str, ';');
if (token_end) {
xmlDoc *service_doc;
xmlNode *service_node;
gchar *temp_filename;
char *temp_filename;
*token_end = '\0';
......@@ -371,9 +372,9 @@ register_button_cb (GtkWidget *button, NautilusServicesContentView *view)
go_to_uri(view, "eazel:config?signup");
}
/* FIXME: this routine should be someone else, and should take user preferences into account */
static gchar*
get_home_uri()
/* FIXME: this routine should be somewhere else, and should take user preferences into account */
static char*
get_home_uri (void)
{
return g_strdup_printf("file://%s", g_get_home_dir ());
}
......@@ -382,7 +383,7 @@ get_home_uri()
static void
register_later_cb (GtkWidget *button, NautilusServicesContentView *view)
{
gchar* home_path = get_home_uri();
char* home_path = get_home_uri();
go_to_uri(view, home_path);
g_free(home_path);
}
......@@ -424,27 +425,12 @@ static void setup_test_form(NautilusServicesContentView *view)
gtk_widget_show (config_button);
}
/* utility routine to set up the font for the title, called after we're realized */
static void
setup_title_font(NautilusServicesContentView *view)
{
GtkStyle *temp_style;
if (view->details->form_title->window == NULL)
return;
temp_style = gtk_style_new();
temp_style->font = gdk_font_load ("-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*"); ;
gtk_widget_set_style (view->details->form_title,
gtk_style_attach (temp_style, view->details->form_title->window));
}
/* shared utility to allocate a title for a form */
static void setup_form_title(NautilusServicesContentView *view, const gchar* title_text)
static void setup_form_title(NautilusServicesContentView *view, const char* title_text)
{
GtkWidget *temp_widget;
gchar *file_name;
char *file_name;
GtkWidget *temp_container = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start (GTK_BOX(view->details->form), temp_container, 0, 0, 4);
......@@ -457,7 +443,10 @@ static void setup_form_title(NautilusServicesContentView *view, const gchar* tit
g_free (file_name);
view->details->form_title = gtk_label_new (title_text);
gtk_box_pack_start(GTK_BOX(temp_container), view->details->form_title, 0, 0, 8);
/* FIXME: don't use hardwired font like this */
nautilus_gtk_widget_set_font_by_name (view->details->form_title,
"-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*"); ;
gtk_box_pack_start (GTK_BOX (temp_container), view->details->form_title, 0, 0, 8);
gtk_widget_show (view->details->form_title);
}
......@@ -465,7 +454,7 @@ static void setup_form_title(NautilusServicesContentView *view, const gchar* tit
static void setup_signup_form(NautilusServicesContentView *view)
{
gchar *message, *file_name;
char *message, *file_name;
GtkTable *table;
GtkWidget *temp_widget;
GtkWidget *temp_box, *config_button, *config_label;
......@@ -579,7 +568,7 @@ static void setup_signup_form(NautilusServicesContentView *view)
static void setup_config_form(NautilusServicesContentView *view)
{
gchar *message, *file_name;
char *message, *file_name;
GtkWidget *temp_widget;
GtkWidget *temp_box, *config_button, *config_label;
......@@ -661,7 +650,7 @@ static void setup_config_form(NautilusServicesContentView *view)
static void setup_overview_form(NautilusServicesContentView *view)
{
gchar *message;
char *message;
GtkWidget *temp_widget;
/* allocate a vbox as the container */
......@@ -723,7 +712,6 @@ nautilus_service_startup_view_initialize_class (NautilusServicesContentViewClass
parent_class = gtk_type_class (gtk_event_box_get_type ());
object_class->destroy = nautilus_service_startup_view_destroy;
widget_class->realize = nautilus_service_startup_view_realize;
}
static void
......@@ -763,19 +751,6 @@ nautilus_service_startup_view_destroy (GtkObject *object)
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
}
/* set up fonts, colors, etc after we're realized */
void
nautilus_service_startup_view_realize(GtkWidget *widget)
{
NautilusServicesContentView *view;
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, realize, (widget));
view = NAUTILUS_SERVICE_STARTUP_VIEW (widget);
setup_title_font (view);
}
/* Component embedding support */
NautilusContentViewFrame *
nautilus_service_startup_view_get_view_frame (NautilusServicesContentView *view)
......@@ -792,9 +767,9 @@ static gboolean is_location(char *document_str, const char *place_str)
/* URI handling */
void
nautilus_service_startup_view_load_uri (NautilusServicesContentView *view,
const gchar *uri)
const char *uri)
{
gchar *document_name;
char *document_name;
/* dispose of the old uri and copy the new one */
g_free (view->details->uri);
......@@ -820,8 +795,6 @@ nautilus_service_startup_view_load_uri (NautilusServicesContentView *view,
setup_summary_form(view);
else
setup_test_form(view); /* eventually, this should be setup_bad_location_form */
setup_title_font(view);
}
static void
......
......@@ -421,21 +421,39 @@ nautilus_gtk_object_list_free (GList *list)
g_list_free (list);
}
/* utilities for setting the font associated with a widget */
static void
/**
* nautilus_gtk_style_set_font
*
* Sets the font in a style object, managing the ref. counts.
* @style: The style to change.
* @font: The new font.
**/
void
nautilus_gtk_style_set_font (GtkStyle *style, GdkFont *font)
{
g_return_if_fail (style != NULL);
g_return_if_fail (font != NULL);
gdk_font_ref (font);
gdk_font_unref (style->font);
style->font = font;
}
/**
* nautilus_gtk_widget_set_font
*
* Sets the font for a widget's style, managing the style objects.
* @widget: The widget.
* @font: The font.
**/
void
nautilus_gtk_widget_set_font (GtkWidget *widget, GdkFont *font)
{
GtkStyle *new_style;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (font != NULL);
new_style = gtk_style_copy (gtk_widget_get_style (widget));
nautilus_gtk_style_set_font (new_style, font);
......@@ -444,11 +462,19 @@ nautilus_gtk_widget_set_font (GtkWidget *widget, GdkFont *font)
gtk_style_unref (new_style);
}
/**
* nautilus_gtk_widget_set_font_by_name
*
* Sets the font for a widget, managing the font and style objects.
* @widget: The widget
**/
void
nautilus_gtk_widget_set_font_by_name (GtkWidget *widget, const char *font_name)
{
GdkFont *font;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (font_name != NULL);
font = gdk_font_load (font_name);
nautilus_gtk_widget_set_font (widget, font);
......
......@@ -29,58 +29,60 @@
#include <gtk/gtkmenu.h>
#include <gtk/gtkwindow.h>
#include <gtk/gtktypeutils.h>
#include <gtk/gtkobject.h>
#define nautilus_gtk_marshal_NONE__BOXED_BOXED gtk_marshal_NONE__POINTER_POINTER
#define nautilus_gtk_marshal_STRING__POINTER nautilus_gtk_marshal_POINTER__POINTER
#define nautilus_gtk_marshal_STRING__POINTER_POINTER nautilus_gtk_marshal_POINTER__POINTER_POINTER
#define nautilus_gtk_marshal_STRING__POINTER_STRING nautilus_gtk_marshal_POINTER__POINTER_POINTER
#define nautilus_gtk_marshal_STRING__POINTER_POINTER_POINTER nautilus_gtk_marshal_POINTER__POINTER_POINTER_POINTER
#define nautilus_gtk_marshal_STRING__POINTER_POINTER_STRING nautilus_gtk_marshal_POINTER__POINTER_POINTER_POINTER
#define nautilus_gtk_marshal_INT__POINTER_STRING nautilus_gtk_marshal_INT__POINTER_POINTER
#define NAUTILUS_DEFAULT_POPUP_MENU_DISPLACEMENT 2
/* signals */
guint nautilus_gtk_signal_connect_free_data (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
gpointer data);
guint nautilus_gtk_signal_connect_free_data (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
gpointer data);
/* list of GtkObject */
void nautilus_gtk_object_list_ref (GList *list);
void nautilus_gtk_object_list_unref (GList *list);
void nautilus_gtk_object_list_free (GList *list);
void nautilus_gtk_object_list_ref (GList *list);
void nautilus_gtk_object_list_unref (GList *list);
void nautilus_gtk_object_list_free (GList *list);
/* GtkWidget */
gboolean nautilus_point_in_allocation (const GtkAllocation *allocation,
int x,
int y);
void nautilus_gtk_widget_set_font (GtkWidget *widget,
GdkFont *font);
void nautilus_gtk_widget_set_font_by_name (GtkWidget *widget,
const char *font_name);
gboolean nautilus_point_in_widget (GtkWidget *widget,
int x,
int y);