1
1

1999-03-19 Jonathan Blandford <jrb@redhat.com>

* gcmd.c (dentry_apply_callback): new function.
	(gnome_new_launcher): We can now create new

1999-03-19  Jonathan Blandford  <jrb@redhat.com>

	* file.c (panel_operate): Ugly hack for GNOME.  We only treat the
	copy as if it were many files, and skip the only_one branch.
Этот коммит содержится в:
Jonathan Blandford 1999-03-19 17:13:33 +00:00
родитель c30a2e3bcc
Коммит 0a28a308b3
8 изменённых файлов: 77 добавлений и 13 удалений

Просмотреть файл

@ -1,3 +1,8 @@
1999-03-19 Jonathan Blandford <jrb@redhat.com>
* gcmd.c (dentry_apply_callback): new function.
(gnome_new_launcher): We can now create new
1999-03-19 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gpopup2.c (create_mime_actions): Free full_name, just once, not

Просмотреть файл

@ -22,6 +22,7 @@
#include "gcmd.h"
#include "dialog.h"
#include "layout.h"
#include "gdesktop.h"
#include "../vfs/vfs.h"
enum {
@ -753,4 +754,56 @@ gnome_mkdir_cmd (GtkWidget *widget, WPanel *panel)
{
mkdir_cmd (panel);
}
static void
dentry_apply_callback(GtkWidget *widget, int page, gpointer data)
{
GnomeDesktopEntry *dentry;
gchar *desktop_directory;
if (page != -1)
return;
g_return_if_fail(data!=NULL);
g_return_if_fail(GNOME_IS_DENTRY_EDIT(data));
dentry = gnome_dentry_get_dentry(GNOME_DENTRY_EDIT(data));
if (getenv ("GNOME_DESKTOP_DIR") != NULL)
desktop_directory = g_strconcat (getenv ("GNOME_DESKTOP_DIR"),
"/",
dentry->name, ".desktop",
NULL);
else
desktop_directory = g_strconcat (gnome_user_home_dir, "/",
DESKTOP_DIR_NAME, "/",
dentry->name, ".desktop",
NULL);
dentry->location = desktop_directory;
gnome_desktop_entry_save(dentry);
gnome_desktop_entry_free(dentry);
gnome_config_sync ();
desktop_reload_icons (FALSE, 0, 0);
}
void
gnome_new_launcher (GtkWidget *widget, WPanel *panel)
{
GtkWidget *dialog;
GtkObject *dentry;
dialog = gnome_property_box_new ();
gtk_window_set_title(GTK_WINDOW(dialog), _("Desktop entry properties"));
gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, FALSE, TRUE);
dentry = gnome_dentry_edit_new_notebook(GTK_NOTEBOOK(GNOME_PROPERTY_BOX(dialog)->notebook));
gtk_signal_connect_object(GTK_OBJECT(dentry), "changed",
GTK_SIGNAL_FUNC(gnome_property_box_changed),
GTK_OBJECT(dialog));
gtk_signal_connect(GTK_OBJECT(dialog), "apply",
GTK_SIGNAL_FUNC(dentry_apply_callback),
dentry);
gtk_widget_show(dialog);
}

Просмотреть файл

@ -22,6 +22,7 @@ void gnome_external_panelize (GtkWidget *widget, WPanel *panel);
void gnome_open_files (GtkWidget *widget, WPanel *panel);
void gnome_run_new (GtkWidget *widget, GnomeDesktopEntry *gde);
void gnome_mkdir_cmd (GtkWidget *widget, WPanel *panel);
void gnome_new_launcher (GtkWidget *widget, WPanel *panel);
void gnome_reverse_selection_cmd_panel (WPanel *panel);
#endif /* __GCMD_H */

Просмотреть файл

@ -32,8 +32,6 @@
#include "../vfs/vfs.h"
#include "main.h"
/* Name of the user's desktop directory (i.e. ~/desktop) */
#define DESKTOP_DIR_NAME ".gnome-desktop"
struct layout_slot {
@ -2400,6 +2398,7 @@ static GnomeUIInfo gnome_panel_new_menu [] = {
GNOMEUIINFO_ITEM_NONE(N_("_Terminal"), N_("Launch a new terminal in the current directory"), gnome_open_terminal),
/* If this ever changes, make sure you update create_new_menu accordingly. */
GNOMEUIINFO_ITEM_NONE( N_("_Directory..."), N_("Creates a new directory"), gnome_mkdir_cmd ),
GNOMEUIINFO_ITEM_NONE( N_("_Launcher..."), N_("Creates a new launcher"), gnome_new_launcher ),
GNOMEUIINFO_END
};

Просмотреть файл

@ -18,6 +18,9 @@
#define DESKTOP_SNAP_X 80
#define DESKTOP_SNAP_Y 80
/* Name of the user's desktop directory (i.e. ~/desktop) */
#define DESKTOP_DIR_NAME ".gnome-desktop"
/* Configuration options for the desktop */

Просмотреть файл

@ -242,12 +242,9 @@ file_progress_show (FileOpContext *ctx, long done, long total)
if (total > 0) {
perc = (double) done / (double) total;
snprintf (count, 9, "%d%%", (gint) (100.0 * perc));
snprintf (count, 9, "%3d%% ", (gint) (100.0 * perc));
gtk_label_set_text (GTK_LABEL (ui->file_label), count);
gtk_progress_bar_update (GTK_PROGRESS_BAR (ui->byte_prog), perc);
} else
gtk_progress_bar_update (GTK_PROGRESS_BAR (ui->byte_prog), 0.0);
}
while (gtk_events_pending ())
gtk_main_iteration ();
return FILE_CONT;
@ -270,7 +267,7 @@ file_progress_show_count (FileOpContext *ctx, long done, long total)
if (ui->aborting)
return FILE_ABORT;
snprintf (count, 13, "%d/%d", done, total);
snprintf (count, 13, "%d/%d ", done, total);
gtk_label_set_text (GTK_LABEL (ui->count_label), count);
while (gtk_events_pending ())
gtk_main_iteration ();
@ -893,10 +890,10 @@ file_op_context_create_ui (FileOpContext *ctx, FileOperation op, int with_eta)
ui->count_label = GTK_OBJECT (gtk_label_new (""));
gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ui->count_label), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(" is ")), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("is ")), FALSE, FALSE, 0);
ui->file_label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), ui->file_label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(" Done.")), FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("done.")), FALSE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (alignment), hbox);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox),

Просмотреть файл

@ -1,3 +1,7 @@
1999-03-19 Jonathan Blandford <jrb@redhat.com>
* file.c (panel_operate): Ugly hack for GNOME. We only treat the
copy as if it were many files, and skip the only_one branch.
1999-03-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
* utilunix.c (close_error_pipe): Inform parent of the return value

Просмотреть файл

@ -765,7 +765,7 @@ copy_file_file (FileOpContext *ctx, char *src_path, char *dst_path, int ask_over
}
file_progress_set_stalled_label (ctx, stalled_msg);
file_progress_show_bytes (ctx, *progress_bytes + n_read_total, ctx->progress_bytes);
return_status = file_progress_show (ctx, n_read_total, file_size);
mc_refresh ();
if (return_status != FILE_CONT)
@ -1942,6 +1942,7 @@ panel_operate (void *source_panel, FileOperation operation, char *thedefault, in
file_op_context_create_ui (ctx, operation, 1);
/* This code is only called by the tree and panel code */
#ifndef HAVE_GNOME
if (only_one){
/* We now have ETA in all cases */
@ -2002,7 +2003,7 @@ panel_operate (void *source_panel, FileOperation operation, char *thedefault, in
unmark_files (panel);
} else {
/* Many files */
#endif
/* Check destination for copy or move operation */
if (operation != OP_DELETE){
retry_many_dst_stat:
@ -2107,8 +2108,9 @@ panel_operate (void *source_panel, FileOperation operation, char *thedefault, in
mc_refresh ();
} /* Loop for every file */
#ifndef HAVE_GNOME
} /* Many files */
#endif
clean_up:
/* Clean up */