From 43931af4646ab8cc57f476cefab67e88a1c86cca Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Mon, 30 Nov 1998 16:59:23 +0000 Subject: [PATCH] Sync from laptop to desktop - Federico --- gnome/ChangeLog | 7 +++++++ gnome/gdnd.c | 1 - gnome/gpopup.c | 6 ++++-- gnome/gscreen.c | 33 +++++++++++++++++---------------- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 28772bb24..4f720d462 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,10 @@ +1998-11-29 Federico Mena Quintero + + * gscreen.c (display_mini_info): Use g_strdup_printf() to make it + i18n-ize nicely. + (panel_create_filter): Use _(), not N_(). + (x_create_panel): Likewise. + 1998-11-29 Miguel de Icaza * gscreen.c (x_create_panel): Add panel view. Put the views diff --git a/gnome/gdnd.c b/gnome/gdnd.c index 1ef287c7d..d06838f3b 100644 --- a/gnome/gdnd.c +++ b/gnome/gdnd.c @@ -70,7 +70,6 @@ find_panel_owning_window (GdkDragContext *context) { GList *list; WPanel *panel; - GdkWindowPrivate *wp, *lwp; GtkWidget *source_widget; source_widget = gtk_drag_get_source_widget (context); diff --git a/gnome/gpopup.c b/gnome/gpopup.c index cf16e1773..3a9e67354 100644 --- a/gnome/gpopup.c +++ b/gnome/gpopup.c @@ -136,9 +136,11 @@ popup_open (GtkWidget *widget, gpointer data) g_assert (pfi->panel != NULL); do_panel_cd (pfi->panel, pfi->filename, cd_exact); + } else if (is_exe (s.st_mode)) { + /* FIXME: execute */ + } else { + /* FIXME: get default program and launch it with this file */ } - - /* FIXME: add other cases */ } static void diff --git a/gnome/gscreen.c b/gnome/gscreen.c index f4a8f1a15..9ae260e85 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -1368,7 +1368,7 @@ panel_widget_motion (GtkWidget *widget, GdkEventMotion *event, WPanel *panel) list = gtk_target_list_new (drag_types, ELEMENTS (drag_types)); /* Control+Shift = LINK */ - if ((event->state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK)) == (GDK_SHIFT_MASK|GDK_CONTROL_MASK)) + if ((event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) action = GDK_ACTION_LINK; else if (event->state & (GDK_SHIFT_MASK)) action = GDK_ACTION_MOVE; @@ -1886,22 +1886,23 @@ display_mini_info (WPanel *panel) { GtkLabel *label = GTK_LABEL (panel->ministatus); - if (panel->searching){ - char *str = copy_strings (N_("Search: "), panel->search_buffer, NULL); - - gtk_label_set (label, str); - free (str); + if (panel->searching) { + char *buf; + + buf = g_strdup_printf (_("Search: %s"), panel->search_buffer); + gtk_label_set (label, buf); + g_free (buf); return; } if (panel->marked){ - char buffer [120]; - - sprintf (buffer, N_(" %s bytes in %d file%s"), - size_trunc_sep (panel->total), panel->marked, - panel->marked == 1 ? "" : "s"); - - gtk_label_set (label, buffer); + char *buf; + + buf = g_strdup_printf ((panel->marked == 1) ? _("%s bytes in %d file") : _("%s bytes in %d files"), + size_trunc_sep (panel->total), + panel->marked); + gtk_label_set (label, buf); + g_free (buf); return; } @@ -1921,7 +1922,7 @@ display_mini_info (WPanel *panel) gtk_label_set (label, str); free (str); } else - gtk_label_set (label, N_("")); + gtk_label_set (label, _("")); return; } @@ -1972,7 +1973,7 @@ panel_create_filter (Dlg_head *h, WPanel *panel, void **filter_w) gtk_box_pack_start (GTK_BOX (ihbox), arrow, TRUE, TRUE, 0); gtk_widget_show (arrow); - label = gtk_label_new (N_("Filter")); + label = gtk_label_new (_("Filter")); gtk_box_pack_start (GTK_BOX (ihbox), label, TRUE, TRUE, 0); gtk_widget_show (label); @@ -2120,7 +2121,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel) back_p = gnome_stock_pixmap_widget_new (panel->xwindow, GNOME_STOCK_MENU_BACK); fwd_p = gnome_stock_pixmap_widget_new (panel->xwindow, GNOME_STOCK_MENU_FORWARD); - panel->up_b = gtk_button_new_with_label ("up"); + panel->up_b = gtk_button_new_with_label (_("Up")); panel->back_b = gtk_button_new (); panel->fwd_b = gtk_button_new (); gtk_container_add (GTK_CONTAINER (panel->back_b), back_p);