summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2004-01-28 21:46:02 +0000
committerHans Breuer <hans@src.gnome.org>2004-01-28 21:46:02 +0000
commit2d19ee19beb706f9d341584c5557fdc6098700b6 (patch)
treecd18a85c7c3908ca26b33fdded92047f3a5d76f7 /gtk
parentf8b6fce69f0b8c6d1370a04c9d88c88e7fd942a0 (diff)
downloadgtk+-2d19ee19beb706f9d341584c5557fdc6098700b6.tar.gz
new GTK_STOCK_NETWORK ... gtk/gtkstock.[hc] : ... define ...
2004-01-28 Hans Breuer <hans@breuer.org> * gtk/stock-icons/stock_network_(16|24).png : new GTK_STOCK_NETWORK ... gtk/gtkstock.[hc] : ... define ... gtk/gtkiconfactory.c : ... register ... gtk/stock-icons/Makefile.am gtk/stock-icons/makefile.msc : ... compile ... * gtk/gtkfilesystemwin32.c : ... and use. Also adapt to recent IFace changes. * gtk/gtk.def : added a bunch of new exported symbols * tests/testfilechooser.c (no_backup_files_filter) : don't crash on filter_info->display_name being NULL * tests/testgtk.c : make testgtk --bench=all work again
Diffstat (limited to 'gtk')
-rwxr-xr-xgtk/gtk.def51
-rw-r--r--gtk/gtkfilesystemwin32.c77
-rw-r--r--gtk/gtkiconfactory.c4
-rw-r--r--gtk/gtkstock.c1
-rw-r--r--gtk/gtkstock.h1
-rw-r--r--gtk/stock-icons/Makefile.am4
-rw-r--r--gtk/stock-icons/makefile.msc6
-rw-r--r--gtk/stock-icons/stock_network_16.pngbin0 -> 594 bytes
-rw-r--r--gtk/stock-icons/stock_network_24.pngbin0 -> 934 bytes
9 files changed, 79 insertions, 65 deletions
diff --git a/gtk/gtk.def b/gtk/gtk.def
index 1b3874f347..027cb5994a 100755
--- a/gtk/gtk.def
+++ b/gtk/gtk.def
@@ -1,5 +1,6 @@
EXPORTS
gtk_accel_flags_get_type
+ gtk_accel_group_activate
gtk_accel_group_connect
gtk_accel_group_connect_by_path
gtk_accel_group_disconnect
@@ -28,9 +29,11 @@ EXPORTS
gtk_accel_map_load
gtk_accel_map_load_fd
gtk_accel_map_load_scanner
+ gtk_accel_map_lock_path
gtk_accel_map_lookup_entry
gtk_accel_map_save
gtk_accel_map_save_fd
+ gtk_accel_map_unlock_path
gtk_accelerator_get_default_mod_mask
gtk_accelerator_name
gtk_accelerator_parse
@@ -49,8 +52,11 @@ EXPORTS
gtk_action_disconnect_proxy
gtk_action_get_name
gtk_action_get_proxies
+ gtk_action_get_sensitive
gtk_action_get_type
+ gtk_action_get_visible
gtk_action_group_add_action
+ gtk_action_group_add_action_with_accel
gtk_action_group_add_actions
gtk_action_group_add_actions_full
gtk_action_group_add_radio_actions
@@ -59,12 +65,19 @@ EXPORTS
gtk_action_group_add_toggle_actions_full
gtk_action_group_get_action
gtk_action_group_get_name
+ gtk_action_group_get_sensitive
gtk_action_group_get_type
+ gtk_action_group_get_visible
gtk_action_group_list_actions
gtk_action_group_new
gtk_action_group_remove_action
+ gtk_action_group_set_sensitive
gtk_action_group_set_translate_func
gtk_action_group_set_translation_domain
+ gtk_action_group_set_visible
+ gtk_action_is_sensitive
+ gtk_action_is_visible
+ gtk_action_new
gtk_action_set_accel_group
gtk_action_set_accel_path
gtk_action_unblock_activate_from
@@ -132,6 +145,7 @@ EXPORTS
gtk_button_box_style_get_type
gtk_button_clicked
gtk_button_enter
+ gtk_button_get_alignment
gtk_button_get_focus_on_click
gtk_button_get_label
gtk_button_get_relief
@@ -145,6 +159,7 @@ EXPORTS
gtk_button_new_with_mnemonic
gtk_button_pressed
gtk_button_released
+ gtk_button_set_alignment
gtk_button_set_focus_on_click
gtk_button_set_label
gtk_button_set_relief
@@ -175,9 +190,11 @@ EXPORTS
gtk_cell_layout_get_type
gtk_cell_layout_pack_end
gtk_cell_layout_pack_start
+ gtk_cell_layout_reorder
gtk_cell_layout_set_attributes
gtk_cell_layout_set_cell_data_func
gtk_cell_renderer_activate
+ gtk_cell_renderer_editing_canceled
gtk_cell_renderer_get_fixed_size
gtk_cell_renderer_get_size
gtk_cell_renderer_get_type
@@ -199,6 +216,7 @@ EXPORTS
gtk_cell_renderer_toggle_set_radio
gtk_cell_type_get_type
gtk_cell_view_get_displayed_row
+ gtk_cell_view_get_size_of_row
gtk_cell_view_get_type
gtk_cell_view_menu_item_get_type
gtk_cell_view_menu_item_new
@@ -239,11 +257,13 @@ EXPORTS
gtk_clipboard_get_owner
gtk_clipboard_get_type
gtk_clipboard_request_contents
+ gtk_clipboard_request_targets
gtk_clipboard_request_text
gtk_clipboard_set_text
gtk_clipboard_set_with_data
gtk_clipboard_set_with_owner
gtk_clipboard_wait_for_contents
+ gtk_clipboard_wait_for_targets
gtk_clipboard_wait_for_text
gtk_clipboard_wait_is_text_available
gtk_clist_append
@@ -360,6 +380,8 @@ EXPORTS
gtk_combo_box_entry_get_text_column
gtk_combo_box_entry_get_type
gtk_combo_box_entry_new
+ gtk_combo_box_entry_new_with_model
+ gtk_combo_box_entry_set_text_column
gtk_combo_box_get_active
gtk_combo_box_get_active_iter
gtk_combo_box_get_model
@@ -367,17 +389,18 @@ EXPORTS
gtk_combo_box_insert_text
gtk_combo_box_new
gtk_combo_box_new_text
+ gtk_combo_box_new_with_model
gtk_combo_box_prepend_text
+ gtk_combo_box_remove_text
gtk_combo_box_set_active
gtk_combo_box_set_active_iter
gtk_combo_box_set_column_span_column
+ gtk_combo_box_set_model
gtk_combo_box_set_row_span_column
gtk_combo_box_set_wrap_width
gtk_combo_disable_activate
gtk_combo_get_type
gtk_combo_new
- gtk_combo_box_entry_new_with_model
- gtk_combo_box_new_with_model
gtk_combo_set_case_sensitive
gtk_combo_set_item_string
gtk_combo_set_popdown_strings
@@ -640,6 +663,7 @@ EXPORTS
gtk_expander_get_label_widget
gtk_expander_get_spacing
gtk_expander_get_type
+ gtk_expander_get_use_markup
gtk_expander_get_use_underline
gtk_expander_new
gtk_expander_new_with_mnemonic
@@ -647,6 +671,7 @@ EXPORTS
gtk_expander_set_label
gtk_expander_set_label_widget
gtk_expander_set_spacing
+ gtk_expander_set_use_markup
gtk_expander_set_use_underline
gtk_expander_style_get_type
gtk_false
@@ -753,16 +778,23 @@ EXPORTS
gtk_file_system_filename_to_path
gtk_file_system_get_folder
gtk_file_system_get_parent
- gtk_file_system_get_root_info
gtk_file_system_get_type
+ gtk_file_system_get_volume_for_path
gtk_file_system_list_bookmarks
- gtk_file_system_list_roots
+ gtk_file_system_list_volumes
gtk_file_system_make_path
gtk_file_system_parse
gtk_file_system_path_to_filename
gtk_file_system_path_to_uri
gtk_file_system_remove_bookmark
+ gtk_file_system_render_icon
gtk_file_system_uri_to_path
+ gtk_file_system_volume_free
+ gtk_file_system_volume_get_base_path
+ gtk_file_system_volume_get_display_name
+ gtk_file_system_volume_get_is_mounted
+ gtk_file_system_volume_mount
+ gtk_file_system_volume_render_icon
gtk_file_system_win32_get_type
gtk_file_system_win32_new
gtk_fixed_get_has_window
@@ -1210,6 +1242,7 @@ EXPORTS
gtk_menu_set_title
gtk_menu_shell_activate_item
gtk_menu_shell_append
+ gtk_menu_shell_cancel
gtk_menu_shell_deactivate
gtk_menu_shell_deselect
gtk_menu_shell_get_type
@@ -1220,6 +1253,7 @@ EXPORTS
gtk_message_dialog_get_type
gtk_message_dialog_new
gtk_message_dialog_new_with_markup
+ gtk_message_dialog_set_markup
gtk_message_type_get_type
gtk_metric_type_get_type
gtk_micro_version
@@ -1332,6 +1366,8 @@ EXPORTS
gtk_paned_add1
gtk_paned_add2
gtk_paned_compute_position
+ gtk_paned_get_child1
+ gtk_paned_get_child2
gtk_paned_get_position
gtk_paned_get_type
gtk_paned_pack1
@@ -1407,6 +1443,7 @@ EXPORTS
gtk_radio_action_get_current_value
gtk_radio_action_get_group
gtk_radio_action_get_type
+ gtk_radio_action_new
gtk_radio_action_set_group
gtk_radio_button_get_group
gtk_radio_button_get_type
@@ -2365,6 +2402,7 @@ EXPORTS
gtk_ui_manager_get_action
gtk_ui_manager_get_action_groups
gtk_ui_manager_get_add_tearoffs
+ gtk_ui_manager_get_toplevels
gtk_ui_manager_get_type
gtk_ui_manager_get_ui
gtk_ui_manager_get_widget
@@ -2406,6 +2444,7 @@ EXPORTS
gtk_widget_activate
gtk_widget_add_accelerator
gtk_widget_add_events
+ gtk_widget_can_activate_accel
gtk_widget_child_focus
gtk_widget_child_notify
gtk_widget_class_find_style_property
@@ -2540,6 +2579,7 @@ EXPORTS
gtk_window_begin_resize_drag
gtk_window_deiconify
gtk_window_fullscreen
+ gtk_window_get_accept_focus
gtk_window_get_decorated
gtk_window_get_default_icon_list
gtk_window_get_default_size
@@ -2568,8 +2608,8 @@ EXPORTS
gtk_window_group_new
gtk_window_group_remove_window
gtk_window_has_toplevel_focus
- gtk_window_is_active
gtk_window_iconify
+ gtk_window_is_active
gtk_window_list_toplevels
gtk_window_maximize
gtk_window_mnemonic_activate
@@ -2583,6 +2623,7 @@ EXPORTS
gtk_window_remove_mnemonic
gtk_window_reshow_with_initial_size
gtk_window_resize
+ gtk_window_set_accept_focus
gtk_window_set_auto_startup_notification
gtk_window_set_decorated
gtk_window_set_default
diff --git a/gtk/gtkfilesystemwin32.c b/gtk/gtkfilesystemwin32.c
index 416cbd8eac..3ead85faae 100644
--- a/gtk/gtkfilesystemwin32.c
+++ b/gtk/gtkfilesystemwin32.c
@@ -89,11 +89,9 @@ static void gtk_file_system_win32_init (GtkFileSystemWin32
static void gtk_file_system_win32_finalize (GObject *object);
static GSList * gtk_file_system_win32_list_volumes (GtkFileSystem *file_system);
-static GSList * gtk_file_system_win32_list_roots (GtkFileSystem *file_system);
-static GtkFileInfo * gtk_file_system_win32_get_root_info (GtkFileSystem *file_system,
- const GtkFilePath *path,
- GtkFileInfoType types,
- GError **error);
+static GtkFileSystemVolume *gtk_file_system_win32_get_volume_for_path (GtkFileSystem *file_system,
+ const GtkFilePath *path);
+
static GtkFileFolder *gtk_file_system_win32_get_folder (GtkFileSystem *file_system,
const GtkFilePath *path,
GtkFileInfoType types,
@@ -251,9 +249,8 @@ static void
gtk_file_system_win32_iface_init (GtkFileSystemIface *iface)
{
iface->list_volumes = gtk_file_system_win32_list_volumes;
- iface->list_roots = gtk_file_system_win32_list_roots;
+ iface->get_volume_for_path = gtk_file_system_win32_get_volume_for_path;
iface->get_folder = gtk_file_system_win32_get_folder;
- iface->get_root_info = gtk_file_system_win32_get_root_info;
iface->create_folder = gtk_file_system_win32_create_folder;
iface->volume_free = gtk_file_system_win32_volume_free;
iface->volume_get_base_path = gtk_file_system_win32_volume_get_base_path;
@@ -318,62 +315,21 @@ gtk_file_system_win32_list_volumes (GtkFileSystem *file_system)
return list;
}
-/* to be removed */
-static GSList *
-gtk_file_system_win32_list_roots (GtkFileSystem *file_system)
+static GtkFileSystemVolume *
+gtk_file_system_win32_get_volume_for_path (GtkFileSystem *file_system,
+ const GtkFilePath *path)
{
- GSList *volumes, *v;
- GSList *list = NULL;
+ GtkFileSystemVolume *vol = g_new0 (GtkFileSystemVolume, 1);
+ gchar* p = g_strndup (path, 3);
- volumes = gtk_file_system_win32_list_volumes (file_system);
+ g_return_val_if_fail (p != NULL, NULL);
- for (v = volumes; v; v = v->next)
- {
- GtkFileSystemVolume *vol = v->data;
+ /*FIXME: gtk_file_path_compare() is case sensitive, we are not*/
+ p[0] = toupper (p[0]);
+ vol->drive = p;
+ vol->is_mounted = (p[0] != 'a' && p[0] != 'b');
- if (vol->is_mounted)
- list = g_slist_append (list, g_strndup (vol->drive, 2));
- }
-
- return list;
-}
-
-static GtkFileInfo *
-gtk_file_system_win32_get_root_info (GtkFileSystem *file_system,
- const GtkFilePath *path,
- GtkFileInfoType types,
- GError **error)
-{
- /* needed _with_ the trailing backslash */
- gchar *filename = g_strconcat(gtk_file_path_get_string (path), "\\", NULL);
- GtkFileInfo *info;
- DWORD dt = GetDriveType (filename);
-
- info = filename_get_info (filename, types, error);
-
- /* additional info */
- if (GTK_FILE_INFO_DISPLAY_NAME & types)
- {
- gchar display_name[80];
-
- if (GetVolumeInformation (filename,
- display_name, sizeof(display_name),
- NULL, /* serial number */
- NULL, /* max. component length */
- NULL, /* fs flags */
- NULL, 0)) /* fs type like FAT, NTFS */
- {
- gchar* real_display_name = g_strconcat (display_name, " (", filename, ")", NULL);
-
- gtk_file_info_set_display_name (info, real_display_name);
- g_free (real_display_name);
- }
- else
- gtk_file_info_set_display_name (info, filename);
- }
-
- g_free (filename);
- return info;
+ return vol;
}
static GtkFileFolder *
@@ -499,7 +455,8 @@ gtk_file_system_win32_volume_render_icon (GtkFileSystem *file_system,
icon_set = gtk_style_lookup_icon_set (widget->style, GTK_STOCK_CDROM);
break;
case DRIVE_REMOTE :
- /*FIXME: need a network stock icon*/
+ icon_set = gtk_style_lookup_icon_set (widget->style, GTK_STOCK_NETWORK);
+ break;
case DRIVE_FIXED :
icon_set = gtk_style_lookup_icon_set (widget->style, GTK_STOCK_HARDDISK);
break;
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index 240ade234e..4d1565b4dd 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -562,6 +562,10 @@ get_default_icons (GtkIconFactory *factory)
16, stock_missing_image_16,
24, stock_missing_image_24);
+ add_icon2 (factory, GTK_STOCK_NETWORK,
+ 16, stock_network_16,
+ 24, stock_network_24);
+
add_icon2 (factory, GTK_STOCK_NEW,
16, stock_new_16,
24, stock_new_24);
diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c
index 7b00641f67..c832d63273 100644
--- a/gtk/gtkstock.c
+++ b/gtk/gtkstock.c
@@ -307,6 +307,7 @@ static const GtkStockItem builtin_items [] =
{ GTK_STOCK_JUSTIFY_FILL, N_("_Fill"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_JUSTIFY_LEFT, N_("_Left"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_JUSTIFY_RIGHT, N_("_Right"), 0, 0, GETTEXT_PACKAGE },
+ { GTK_STOCK_NETWORK, N_("_Network"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_NEW, N_("_New"), GDK_CONTROL_MASK, 'n', GETTEXT_PACKAGE },
{ GTK_STOCK_NO, N_("_No"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_OK, N_("_OK"), 0, 0, GETTEXT_PACKAGE },
diff --git a/gtk/gtkstock.h b/gtk/gtkstock.h
index 575818c9be..37be20d2e8 100644
--- a/gtk/gtkstock.h
+++ b/gtk/gtkstock.h
@@ -109,6 +109,7 @@ void gtk_stock_item_free (GtkStockItem *item);
#define GTK_STOCK_JUSTIFY_LEFT "gtk-justify-left"
#define GTK_STOCK_JUSTIFY_RIGHT "gtk-justify-right"
#define GTK_STOCK_MISSING_IMAGE "gtk-missing-image"
+#define GTK_STOCK_NETWORK "gtk-network"
#define GTK_STOCK_NEW "gtk-new"
#define GTK_STOCK_NO "gtk-no"
#define GTK_STOCK_OK "gtk-ok"
diff --git a/gtk/stock-icons/Makefile.am b/gtk/stock-icons/Makefile.am
index 5e6dcf01fd..9939ff4e34 100644
--- a/gtk/stock-icons/Makefile.am
+++ b/gtk/stock-icons/Makefile.am
@@ -60,6 +60,8 @@ IMAGES = \
stock_last_24.png \
stock_left_arrow_16.png \
stock_left_arrow_24.png \
+ stock_network_16.png \
+ stock_network_24.png \
stock_new_16.png \
stock_new_24.png \
stock_no_20.png \
@@ -202,6 +204,8 @@ VARIABLES3 = \
stock_left_arrow_24 $(srcdir)/stock_left_arrow_24.png \
stock_missing_image_16 $(srcdir)/stock_broken_image_16.png \
stock_missing_image_24 $(srcdir)/stock_broken_image_24.png \
+ stock_network_16 $(srcdir)/stock_network_16.png \
+ stock_network_24 $(srcdir)/stock_network_24.png \
stock_new_16 $(srcdir)/stock_new_16.png \
stock_new_24 $(srcdir)/stock_new_24.png \
stock_no_20 $(srcdir)/stock_no_20.png \
diff --git a/gtk/stock-icons/makefile.msc b/gtk/stock-icons/makefile.msc
index 2a0c8f79da..284da86eaa 100644
--- a/gtk/stock-icons/makefile.msc
+++ b/gtk/stock-icons/makefile.msc
@@ -64,6 +64,8 @@ VARIABLES = \
stock_last_24 stock_last_24.png \
stock_left_arrow_16 stock_left_arrow_16.png \
stock_left_arrow_24 stock_left_arrow_24.png \
+ stock_network_16 stock_network_16.png \
+ stock_network_24 stock_network_24.png \
stock_new_16 stock_new_16.png \
stock_new_24 stock_new_24.png \
stock_no_20 stock_no_20.png \
@@ -112,12 +114,16 @@ VARIABLES = \
stock_stop_24 stock_stop_24.png \
stock_text_bold_16 stock_text_bold_16.png \
stock_text_bold_24 stock_text_bold_24.png \
+ stock_text_indent_16 stock_text_indent_16.png \
+ stock_text_indent_24 stock_text_indent_24.png \
stock_text_italic_16 stock_text_italic_16.png \
stock_text_italic_24 stock_text_italic_24.png \
stock_text_strikethrough_16 stock_text_strikethrough_16.png \
stock_text_strikethrough_24 stock_text_strikethrough_24.png \
stock_text_underline_16 stock_text_underline_16.png \
stock_text_underline_24 stock_text_underline_24.png \
+ stock_text_unindent_16 stock_text_unindent_16.png \
+ stock_text_unindent_24 stock_text_unindent_24.png \
stock_top_16 stock_top_16.png \
stock_top_24 stock_top_24.png \
stock_trash_16 stock_trash_16.png \
diff --git a/gtk/stock-icons/stock_network_16.png b/gtk/stock-icons/stock_network_16.png
new file mode 100644
index 0000000000..ee7a294efa
--- /dev/null
+++ b/gtk/stock-icons/stock_network_16.png
Binary files differ
diff --git a/gtk/stock-icons/stock_network_24.png b/gtk/stock-icons/stock_network_24.png
new file mode 100644
index 0000000000..c925994789
--- /dev/null
+++ b/gtk/stock-icons/stock_network_24.png
Binary files differ