Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Only in osso-xterm-0.14.mh12: Makefile.in
- Only in osso-xterm-0.14.mh12: aclocal.m4
- Only in osso-xterm-0.14.mh12: compile
- Only in osso-xterm-0.14.mh12: config.h.in
- Only in osso-xterm-0.14.mh12: configure
- Only in osso-xterm-0.14.mh12: depcomp
- Only in osso-xterm-0.14.mh12/etc: Makefile.in
- Only in osso-xterm-0.14.mh12/icons/24x24: Makefile.in
- Only in osso-xterm-0.14.mh12/icons/25x25: Makefile.in
- Only in osso-xterm-0.14.mh12/icons/48x48: Makefile.in
- Only in osso-xterm-0.14.mh12/icons/64x64: Makefile.in
- Only in osso-xterm-0.14.mh12/icons: Makefile.in
- Only in osso-xterm-0.14.mh12: install-sh
- Only in osso-xterm-0.14.mh12: ltmain.sh
- Only in osso-xterm-0.14.mh12: missing
- Only in osso-xterm-0.14.mh12/src: Makefile.in
- diff -rup osso-xterm-0.14.mh12~/src/terminal-widget.c osso-xterm-0.14.mh12/src/terminal-widget.c
- --- osso-xterm-0.14.mh12~/src/terminal-widget.c 2008-02-27 10:22:23.000000000 +0000
- +++ osso-xterm-0.14.mh12/src/terminal-widget.c 2008-09-05 15:26:32.000000000 +0100
- @@ -1818,7 +1818,7 @@ terminal_widget_ctrlify_notify (GtkToggl
- }
- }
- -static void
- +void
- terminal_widget_send_key(TerminalWidget *widget,
- guint keyval,
- guint state)
- diff -rup osso-xterm-0.14.mh12~/src/terminal-widget.h osso-xterm-0.14.mh12/src/terminal-widget.h
- --- osso-xterm-0.14.mh12~/src/terminal-widget.h 2008-02-20 12:29:16.000000000 +0000
- +++ osso-xterm-0.14.mh12/src/terminal-widget.h 2008-09-05 15:27:32.000000000 +0100
- @@ -138,6 +138,12 @@ void terminal_widget_send_keys(TerminalW
- const gchar *key_string);
- #endif
- +void
- +terminal_widget_send_key(TerminalWidget *widget,
- + guint keyval,
- + guint state);
- +
- +
- G_END_DECLS;
- #endif /* !__TERMINAL_WIDGET_H__ */
- diff -rup osso-xterm-0.14.mh12~/src/terminal-window.c osso-xterm-0.14.mh12/src/terminal-window.c
- --- osso-xterm-0.14.mh12~/src/terminal-window.c 2008-03-25 16:07:22.000000000 +0000
- +++ osso-xterm-0.14.mh12/src/terminal-window.c 2008-09-05 16:01:04.000000000 +0100
- @@ -53,11 +53,17 @@
- #include <hildon-widgets/hildon-program.h>
- #include <hildon-widgets/hildon-defines.h>
- #include <hildon-widgets/hildon-banner.h>
- +#include <hildon-widgets/hildon-get-password-dialog.h>
- +#include <hildon-widgets/hildon-input-mode-hint.h>
- #elif HILDON == 1
- #include <hildon/hildon-window.h>
- #include <hildon/hildon-program.h>
- #include <hildon/hildon-defines.h>
- #include <hildon/hildon-banner.h>
- +#include <hildon/hildon-get-password-dialog.h>
- +#include <hildon/hildon-program.h>
- +#include <gtk/gtk.h>
- +#include <gtk/gtkmain.h>
- #endif
- #include <gconf/gconf-client.h>
- #include <gdk/gdkkeysyms.h>
- @@ -66,6 +72,7 @@
- #include "terminal-settings.h"
- #include "terminal-tab-header.h"
- #include "terminal-window.h"
- +#include "terminal-widget.h"
- #include "terminal-encoding.h"
- #include "shortcuts.h"
- @@ -122,6 +129,8 @@ static void terminal_window_a
- TerminalWindow *window);
- static void terminal_window_action_ctrl (GtkAction *action,
- TerminalWindow *window);
- +static void terminal_window_action_enter_passwd (GtkAction *action,
- + TerminalWindow *window);
- static void terminal_window_action_encoding (GtkAction *action,
- TerminalWindow *window);
- @@ -180,6 +189,7 @@ static GtkActionEntry action_entries[] =
- { "reset", NULL, N_ ("Reset"), NULL, NULL, G_CALLBACK (terminal_window_action_reset), },
- { "reset-and-clear", NULL, N_ ("Reset and Clear"), NULL, NULL, G_CALLBACK (terminal_window_action_reset_and_clear), },
- { "ctrl", NULL, N_ ("Send Ctrl-<some key>"), NULL, NULL, G_CALLBACK (terminal_window_action_ctrl), },
- + { "enter-passwd", NULL, N_ ("Enter Password..."), NULL, NULL, G_CALLBACK (terminal_window_action_enter_passwd), },
- { "quit", NULL, N_ ("Quit"), NULL, NULL, G_CALLBACK (terminal_window_action_quit), },
- @@ -235,9 +245,17 @@ static GtkToggleActionEntry toggle_actio
- static const gchar ui_description[] =
- "<ui>"
- " <popup name='popup-menu'>"
- + " <menuitem action='open-url'/>"
- + " <separator/>"
- + " <menuitem action='enter-passwd'/>"
- + " <separator/>"
- " <menuitem action='new-window'/>"
- " <separator/>"
- + " <menuitem action='copy'/>"
- " <menuitem action='paste'/>"
- + " <separator/>"
- + " <menuitem action='scrollbar'/>"
- + " <separator/>"
- " </popup>"
- "</ui>";
- @@ -347,11 +365,31 @@ populate_menubar (TerminalWindow *window
- parent = attach_menu(menubar, actiongroup, accelgroup, "view-menu");
- attach_item(parent, actiongroup, accelgroup, "fullscreen");
- -
- + attach_item(parent, actiongroup, accelgroup, "reverse");
- + attach_item(parent, actiongroup, accelgroup, "scrollbar");
- subparent = attach_menu(parent, actiongroup, accelgroup, "show-toolbar-menu");
- attach_item(subparent, actiongroup, accelgroup, "show-full-screen");
- attach_item(subparent, actiongroup, accelgroup, "show-normal-screen");
- + gtk_menu_shell_append(GTK_MENU_SHELL(parent),
- + gtk_separator_menu_item_new());
- + parent = attach_menu(parent, actiongroup, accelgroup, "font-menu");
- + attach_item(parent, actiongroup, accelgroup, "-8pt");
- + attach_item(parent, actiongroup, accelgroup, "-6pt");
- + attach_item(parent, actiongroup, accelgroup, "-4pt");
- + attach_item(parent, actiongroup, accelgroup, "-2pt");
- + attach_item(parent, actiongroup, accelgroup, "+0pt");
- + attach_item(parent, actiongroup, accelgroup, "+2pt");
- + attach_item(parent, actiongroup, accelgroup, "+4pt");
- + attach_item(parent, actiongroup, accelgroup, "+6pt");
- + attach_item(parent, actiongroup, accelgroup, "+8pt");
- +
- + parent = attach_menu(menubar, actiongroup, accelgroup, "terminal-menu");
- + attach_item(parent, actiongroup, accelgroup, "reset");
- + attach_item(parent, actiongroup, accelgroup, "reset-and-clear");
- + attach_item(parent, actiongroup, accelgroup, "ctrl");
- + attach_item(parent, actiongroup, accelgroup, "enter-passwd");
- +
- parent = attach_menu(menubar, actiongroup, accelgroup, "tools-menu");
- attach_item(parent, actiongroup, accelgroup, "settings");
- attach_item(parent, actiongroup, accelgroup, "encoding");
- @@ -779,12 +817,9 @@ terminal_window_context_menu (TerminalWi
- TerminalWindow *window)
- {
- -/* Copy & paste didn't work quite well from popup menu and there was only one
- - * item left in the menu so it was removed
- - */
- -#if 0
- +
- TerminalWidget *terminal;
- - // GtkWidget *popup;
- + GtkWidget *popup;
- gint button = 0;
- gint time;
- @@ -834,7 +869,6 @@ terminal_window_context_menu (TerminalWi
- gtk_menu_popup (GTK_MENU (popup), NULL, NULL,
- NULL, NULL, button, time);
- }
- -#endif
- }
- static void
- @@ -1185,6 +1219,61 @@ terminal_window_action_encoding (GtkActi
- }
- static void
- +terminal_window_action_enter_passwd (GtkAction *action,
- + TerminalWindow *window)
- +{
- + GtkWidget *dialog, *label;
- + GtkEntry *pwd_entry;
- +
- + dialog = gtk_dialog_new_with_buttons("Enter Password",
- + GTK_WINDOW(window),
- + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- + GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- + GTK_STOCK_OK, GTK_RESPONSE_OK,
- + NULL);
- +
- + gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
- +
- + label = gtk_label_new("Enter password/text to send...");
- + gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), label);
- +
- + pwd_entry = GTK_ENTRY (gtk_entry_new ());
- + gtk_entry_set_visibility (pwd_entry, FALSE);
- + gtk_entry_set_activates_default (pwd_entry, TRUE);
- + g_object_set(G_OBJECT(pwd_entry->im_context), "hildon_input_mode",
- + HILDON_GTK_INPUT_MODE_FULL, NULL);
- +
- + gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), GTK_WIDGET(pwd_entry));
- +
- + gtk_widget_show_all(dialog);
- +
- + /* It would be nice to activate the text box to keep the input area up,
- + but I'm not quite sure how to do that? Neither of these quite work:
- +
- + gtk_widget_grab_focus(GTK_WIDGET(pwd_entry));
- + gtk_widget_activate(GTK_WIDGET(pwd_entry));
- + */
- +
- + if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
- + gchar *pwd = (gchar*)gtk_entry_get_text (pwd_entry);
- + TerminalWidget *tw = terminal_window_get_active(window);
- + int i;
- +
- + if (tw) {
- + for (i=0; pwd[i]; i++) {
- + terminal_widget_send_key(tw, pwd[i], 0);
- + pwd[i] = 0;
- + }
- + terminal_widget_send_key(tw, GDK_KP_Enter, 0);
- + }
- + }
- +
- + gtk_widget_hide(dialog);
- + gtk_widget_destroy(dialog);
- +
- +}
- +
- +static void
- terminal_window_action_settings (GtkAction *action,
- TerminalWindow *window)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement