mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
Correctly do the rename ui op merging
2002-09-30 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-icon-container.c: (nautilus_icon_container_start_renaming_selected_item): * src/file-manager/fm-icon-view.c: (renaming_icon_callback): Correctly do the rename ui op merging
This commit is contained in:
parent
7ba2110153
commit
a747db4137
3 changed files with 22 additions and 10 deletions
|
@ -1,3 +1,10 @@
|
|||
2002-09-30 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* libnautilus-private/nautilus-icon-container.c:
|
||||
(nautilus_icon_container_start_renaming_selected_item):
|
||||
* src/file-manager/fm-icon-view.c: (renaming_icon_callback):
|
||||
Correctly do the rename ui op merging
|
||||
|
||||
2002-09-30 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* libnautilus-private/nautilus-icon-canvas-item.c (compute_text_rectangle):
|
||||
|
|
|
@ -5018,12 +5018,20 @@ nautilus_icon_container_start_renaming_selected_item (NautilusIconContainer *con
|
|||
}
|
||||
|
||||
icon_rect = nautilus_icon_canvas_item_get_icon_rectangle (icon->item);
|
||||
|
||||
eel_canvas_w2c_d (EEL_CANVAS_ITEM (icon->item)->canvas,
|
||||
icon_rect.x0,
|
||||
icon_rect.y0,
|
||||
&icon_rect.x0,
|
||||
&icon_rect.y0);
|
||||
eel_canvas_w2c_d (EEL_CANVAS_ITEM (icon->item)->canvas,
|
||||
icon_rect.x1,
|
||||
icon_rect.y1,
|
||||
&icon_rect.x1,
|
||||
&icon_rect.y1);
|
||||
|
||||
width = nautilus_icon_canvas_item_get_max_text_width (icon->item);
|
||||
|
||||
/* FIXME: Dividing the width by pixels_per_unit makes everything work
|
||||
* here, but I don't understand why. Need to look into this. */
|
||||
x = eel_round((icon_rect.x0 + icon_rect.x1) / 2) - (eel_round (width / EEL_CANVAS_ITEM (icon->item)->canvas->pixels_per_unit / 2));
|
||||
|
||||
x = eel_round((icon_rect.x0 + icon_rect.x1) / 2) - (eel_round (width / 2));
|
||||
|
||||
gtk_widget_show (details->rename_widget);
|
||||
gtk_layout_move (GTK_LAYOUT (container),
|
||||
|
@ -5035,12 +5043,9 @@ nautilus_icon_container_start_renaming_selected_item (NautilusIconContainer *con
|
|||
editable_text);
|
||||
gtk_widget_grab_focus (details->rename_widget);
|
||||
|
||||
#if 0
|
||||
/* ALEX: TODO: handle this with EelEditableLabel */
|
||||
g_signal_emit (container,
|
||||
signals[RENAMING_ICON], 0,
|
||||
gnome_icon_text_item_get_editable (details->rename_widget));
|
||||
#endif
|
||||
GTK_EDITABLE (details->rename_widget));
|
||||
|
||||
nautilus_icon_container_update_icon (container, icon);
|
||||
|
||||
|
|
|
@ -1741,7 +1741,7 @@ renaming_icon_callback (NautilusIconContainer *container,
|
|||
nautilus_clipboard_set_up_editable_in_control
|
||||
(GTK_EDITABLE (widget),
|
||||
fm_directory_view_get_bonobo_control (directory_view),
|
||||
TRUE);
|
||||
FALSE);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue