1999-08-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdialogs.c (file_mask_dialog): Sigh, disabled background operations, since they are completely hosed. Re-aligned the widgets in the dialog.
Этот коммит содержится в:
родитель
d8e892cb48
Коммит
c314133465
@ -1,3 +1,9 @@
|
|||||||
|
1999-08-10 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gdialogs.c (file_mask_dialog): Sigh, disabled background
|
||||||
|
operations, since they are completely hosed. Re-aligned the
|
||||||
|
widgets in the dialog.
|
||||||
|
|
||||||
1999-08-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1999-08-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gscreen.c (editing_icon_list): New function to figure out
|
* gscreen.c (editing_icon_list): New function to figure out
|
||||||
|
@ -88,12 +88,13 @@ trim_file_name (FileOpContextUI *ui, gchar *path, gint length, gint cur_length)
|
|||||||
/* we guess a starting point */
|
/* we guess a starting point */
|
||||||
if (gdk_string_width (ui->op_source_label->style->font, path + len) < length) {
|
if (gdk_string_width (ui->op_source_label->style->font, path + len) < length) {
|
||||||
while (gdk_string_width (ui->op_source_label->style->font, path + len) < length)
|
while (gdk_string_width (ui->op_source_label->style->font, path + len) < length)
|
||||||
len --;
|
len--;
|
||||||
len++;
|
len++;
|
||||||
} else {
|
} else {
|
||||||
while (gdk_string_width (ui->op_source_label->style->font, path + len) > length)
|
while (gdk_string_width (ui->op_source_label->style->font, path + len) > length)
|
||||||
len ++;
|
len++;
|
||||||
}
|
}
|
||||||
|
|
||||||
path_copy = g_strdup_printf ("...%s", path + len);
|
path_copy = g_strdup_printf ("...%s", path + len);
|
||||||
return path_copy;
|
return path_copy;
|
||||||
}
|
}
|
||||||
@ -549,7 +550,6 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
GtkWidget *notebook;
|
GtkWidget *notebook;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *vbox, *label;
|
GtkWidget *vbox, *label;
|
||||||
GtkWidget *alignment;
|
|
||||||
GtkWidget *fentry;
|
GtkWidget *fentry;
|
||||||
GtkWidget *cbox;
|
GtkWidget *cbox;
|
||||||
GtkWidget *icon;
|
GtkWidget *icon;
|
||||||
@ -573,30 +573,45 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
|
|
||||||
gtk_window_set_position (GTK_WINDOW (fmd_win), GTK_WIN_POS_MOUSE);
|
gtk_window_set_position (GTK_WINDOW (fmd_win), GTK_WIN_POS_MOUSE);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, GNOME_PAD);
|
|
||||||
notebook = gtk_notebook_new ();
|
notebook = gtk_notebook_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (fmd_win)->vbox),
|
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (fmd_win)->vbox),
|
||||||
notebook, FALSE, FALSE, 0);
|
notebook, FALSE, FALSE, 0);
|
||||||
/*FIXME: I wan't a bigger, badder, better Icon here... */
|
|
||||||
icon = gnome_stock_pixmap_widget (hbox, GNOME_STOCK_PIXMAP_HELP);
|
hbox = gtk_hbox_new (FALSE, GNOME_PAD);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
|
|
||||||
vbox = gtk_vbox_new (FALSE, GNOME_PAD);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
|
|
||||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||||
hbox,
|
hbox,
|
||||||
gtk_label_new (_("Destination")));
|
gtk_label_new (_("Destination")));
|
||||||
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
|
||||||
|
/* FIXME: I want a bigger, badder, better Icon here... */
|
||||||
|
icon = gnome_stock_pixmap_widget (hbox, GNOME_STOCK_PIXMAP_HELP);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
vbox = gtk_vbox_new (FALSE, GNOME_PAD);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD);
|
||||||
|
|
||||||
label = gtk_label_new (text);
|
label = gtk_label_new (text);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), label);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
fentry = gnome_file_entry_new ("gmc-copy-file", _("Find Destination Folder"));
|
fentry = gnome_file_entry_new ("gmc-copy-file", _("Find Destination Folder"));
|
||||||
gnome_file_entry_set_directory (GNOME_FILE_ENTRY (fentry), TRUE);
|
gnome_file_entry_set_directory (GNOME_FILE_ENTRY (fentry), TRUE);
|
||||||
gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fentry))),
|
gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (fentry))),
|
||||||
def_text);
|
def_text);
|
||||||
gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (fentry), def_text);
|
gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (fentry), def_text);
|
||||||
|
gnome_file_entry_set_modal (GNOME_FILE_ENTRY (fentry), TRUE);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), fentry, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
/* Background operations are completely hosed, so we olympically disable
|
||||||
|
* them. How's that for foolproof bugfixing.
|
||||||
|
*/
|
||||||
|
|
||||||
|
*do_background = FALSE;
|
||||||
|
#if 0
|
||||||
cbox = gtk_check_button_new_with_label (_("Copy as a background process"));
|
cbox = gtk_check_button_new_with_label (_("Copy as a background process"));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbox), *do_background);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbox), *do_background);
|
||||||
gtk_signal_connect (GTK_OBJECT (cbox), "toggled", (GtkSignalFunc) fmd_check_box_callback, do_background);
|
gtk_signal_connect (GTK_OBJECT (cbox), "toggled",
|
||||||
|
(GtkSignalFunc) fmd_check_box_callback, do_background);
|
||||||
#if 0
|
#if 0
|
||||||
gnome_widget_add_help (cbox, "Selecting this will run the copying in the background. "
|
gnome_widget_add_help (cbox, "Selecting this will run the copying in the background. "
|
||||||
"This is useful for transfers over networks that might take a long "
|
"This is useful for transfers over networks that might take a long "
|
||||||
@ -604,10 +619,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
#endif
|
#endif
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), cbox, FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), cbox, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), fentry, FALSE, FALSE, 0);
|
#endif
|
||||||
gnome_file_entry_set_modal(GNOME_FILE_ENTRY (fentry),TRUE);
|
|
||||||
|
|
||||||
gtk_box_pack_end (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
/* Advanced Options */
|
/* Advanced Options */
|
||||||
hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
|
hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
|
||||||
@ -644,7 +656,8 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
gtk_signal_connect (GTK_OBJECT (cbox), "toggled",
|
gtk_signal_connect (GTK_OBJECT (cbox), "toggled",
|
||||||
(GtkSignalFunc) fmd_check_box_callback, &ctx->op_preserve);
|
(GtkSignalFunc) fmd_check_box_callback, &ctx->op_preserve);
|
||||||
#if 0
|
#if 0
|
||||||
gnome_widget_add_help (cbox, _("Preserves the permissions and the UID/GID if possible"));
|
gnome_widget_add_help (cbox,
|
||||||
|
_("Preserves the permissions and the UID/GID if possible"));
|
||||||
#endif
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), cbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), cbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
@ -653,9 +666,11 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
cbox = gtk_check_button_new_with_label (_("Recursively copy subdirectories."));
|
cbox = gtk_check_button_new_with_label (_("Recursively copy subdirectories."));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbox), ctx->dive_into_subdirs);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbox), ctx->dive_into_subdirs);
|
||||||
gtk_signal_connect (GTK_OBJECT (cbox), "toggled",
|
gtk_signal_connect (GTK_OBJECT (cbox), "toggled",
|
||||||
(GtkSignalFunc) fmd_check_box_callback, &ctx->dive_into_subdirs);
|
(GtkSignalFunc) fmd_check_box_callback,
|
||||||
|
&ctx->dive_into_subdirs);
|
||||||
#if 0
|
#if 0
|
||||||
gnome_widget_add_help (cbox, _("If set, this will copy the directories recursively"));
|
gnome_widget_add_help (cbox,
|
||||||
|
_("If set, this will copy the directories recursively"));
|
||||||
#endif
|
#endif
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), cbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), cbox, FALSE, FALSE, 0);
|
||||||
}
|
}
|
||||||
@ -676,7 +691,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
if (run == -1)
|
if (run == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dest_dir = gnome_file_entry_get_full_path(GNOME_FILE_ENTRY (fentry), FALSE);
|
dest_dir = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (fentry), FALSE);
|
||||||
gtk_widget_destroy (fmd_win);
|
gtk_widget_destroy (fmd_win);
|
||||||
easy_patterns = 1;
|
easy_patterns = 1;
|
||||||
if (!dest_dir || !*dest_dir)
|
if (!dest_dir || !*dest_dir)
|
||||||
@ -735,12 +750,13 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
else
|
else
|
||||||
ctx->dest_mask++;
|
ctx->dest_mask++;
|
||||||
orig_mask = ctx->dest_mask;
|
orig_mask = ctx->dest_mask;
|
||||||
if (!*ctx->dest_mask || (!ctx->dive_into_subdirs && !is_wildcarded (ctx->dest_mask) &&
|
if (!*ctx->dest_mask
|
||||||
(!only_one || (!mc_stat (dest_dir, &buf)
|
|| (!ctx->dive_into_subdirs && !is_wildcarded (ctx->dest_mask)
|
||||||
&& S_ISDIR (buf.st_mode)))) ||
|
&& (!only_one || (!mc_stat (dest_dir, &buf)
|
||||||
(ctx->dive_into_subdirs && ((!only_one && !is_wildcarded (ctx->dest_mask)) ||
|
&& S_ISDIR (buf.st_mode))))
|
||||||
(only_one && !mc_stat (dest_dir, &buf)
|
|| (ctx->dive_into_subdirs && ((!only_one && !is_wildcarded (ctx->dest_mask))
|
||||||
&& S_ISDIR (buf.st_mode)))))
|
|| (only_one && !mc_stat (dest_dir, &buf)
|
||||||
|
&& S_ISDIR (buf.st_mode)))))
|
||||||
ctx->dest_mask = g_strdup ("*");
|
ctx->dest_mask = g_strdup ("*");
|
||||||
else {
|
else {
|
||||||
ctx->dest_mask = g_strdup (ctx->dest_mask);
|
ctx->dest_mask = g_strdup (ctx->dest_mask);
|
||||||
@ -764,7 +780,8 @@ file_delete_query_recursive (FileOpContext *ctx, enum OperationMode mode, gchar
|
|||||||
gboolean rest_same;
|
gboolean rest_same;
|
||||||
|
|
||||||
if (ctx->recursive_result < RECURSIVE_ALWAYS) {
|
if (ctx->recursive_result < RECURSIVE_ALWAYS) {
|
||||||
msg = g_strdup_printf(_("%s\n\nDirectory not empty. Delete it recursively?"), name_trunc (s, 80));
|
msg = g_strdup_printf (_("%s\n\nDirectory not empty. Delete it recursively?"),
|
||||||
|
name_trunc (s, 80));
|
||||||
dialog = gnome_message_box_new (msg,
|
dialog = gnome_message_box_new (msg,
|
||||||
GNOME_MESSAGE_BOX_QUESTION,
|
GNOME_MESSAGE_BOX_QUESTION,
|
||||||
GNOME_STOCK_BUTTON_YES,
|
GNOME_STOCK_BUTTON_YES,
|
||||||
@ -883,19 +900,22 @@ file_op_context_create_ui (FileOpContext *ctx, FileOperation op, int with_eta)
|
|||||||
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), hbox);
|
gtk_container_add (GTK_CONTAINER (alignment), hbox);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_from_string)), FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_from_string)),
|
||||||
|
FALSE, FALSE, 0);
|
||||||
ui->op_source_label = gtk_label_new ("");
|
ui->op_source_label = gtk_label_new ("");
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0);
|
||||||
gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL);
|
gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD);
|
gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox),
|
||||||
|
GNOME_PAD);
|
||||||
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),
|
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),
|
||||||
alignment, FALSE, FALSE, 0);
|
alignment, FALSE, FALSE, 0);
|
||||||
|
|
||||||
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), hbox);
|
gtk_container_add (GTK_CONTAINER (alignment), hbox);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_to_string)), FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_to_string)),
|
||||||
|
FALSE, FALSE, 0);
|
||||||
ui->op_target_label = gtk_label_new ("");
|
ui->op_target_label = gtk_label_new ("");
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), ui->op_target_label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), ui->op_target_label, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),
|
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),
|
||||||
@ -905,15 +925,18 @@ file_op_context_create_ui (FileOpContext *ctx, FileOperation op, int with_eta)
|
|||||||
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), hbox);
|
gtk_container_add (GTK_CONTAINER (alignment), hbox);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_deleting_string)), FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_deleting_string)),
|
||||||
|
FALSE, FALSE, 0);
|
||||||
ui->op_source_label = gtk_label_new ("");
|
ui->op_source_label = gtk_label_new ("");
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0);
|
||||||
gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL);
|
gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD);
|
gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox),
|
||||||
|
GNOME_PAD);
|
||||||
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),
|
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),
|
||||||
alignment, FALSE, FALSE, 0);
|
alignment, FALSE, FALSE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
alignment = gtk_alignment_new (0.0, 0.5, 0, 0);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_hbox_new (FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("File ")), FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("File ")), FALSE, FALSE, 0);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user