Advertisement
Guest User

Faheem - qwerty12

a guest
Sep 5th, 2008
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.02 KB | None | 0 0
  1. Only in osso-xterm-0.14.mh12: Makefile.in
  2. Only in osso-xterm-0.14.mh12: aclocal.m4
  3. Only in osso-xterm-0.14.mh12: compile
  4. Only in osso-xterm-0.14.mh12: config.h.in
  5. Only in osso-xterm-0.14.mh12: configure
  6. Only in osso-xterm-0.14.mh12: depcomp
  7. Only in osso-xterm-0.14.mh12/etc: Makefile.in
  8. Only in osso-xterm-0.14.mh12/icons/24x24: Makefile.in
  9. Only in osso-xterm-0.14.mh12/icons/25x25: Makefile.in
  10. Only in osso-xterm-0.14.mh12/icons/48x48: Makefile.in
  11. Only in osso-xterm-0.14.mh12/icons/64x64: Makefile.in
  12. Only in osso-xterm-0.14.mh12/icons: Makefile.in
  13. Only in osso-xterm-0.14.mh12: install-sh
  14. Only in osso-xterm-0.14.mh12: ltmain.sh
  15. Only in osso-xterm-0.14.mh12: missing
  16. Only in osso-xterm-0.14.mh12/src: Makefile.in
  17. diff -rup osso-xterm-0.14.mh12~/src/terminal-widget.c osso-xterm-0.14.mh12/src/terminal-widget.c
  18. --- osso-xterm-0.14.mh12~/src/terminal-widget.c 2008-02-27 10:22:23.000000000 +0000
  19. +++ osso-xterm-0.14.mh12/src/terminal-widget.c 2008-09-05 15:26:32.000000000 +0100
  20. @@ -1818,7 +1818,7 @@ terminal_widget_ctrlify_notify (GtkToggl
  21. }
  22. }
  23.  
  24. -static void
  25. +void
  26. terminal_widget_send_key(TerminalWidget *widget,
  27. guint keyval,
  28. guint state)
  29. diff -rup osso-xterm-0.14.mh12~/src/terminal-widget.h osso-xterm-0.14.mh12/src/terminal-widget.h
  30. --- osso-xterm-0.14.mh12~/src/terminal-widget.h 2008-02-20 12:29:16.000000000 +0000
  31. +++ osso-xterm-0.14.mh12/src/terminal-widget.h 2008-09-05 15:27:32.000000000 +0100
  32. @@ -138,6 +138,12 @@ void terminal_widget_send_keys(TerminalW
  33. const gchar *key_string);
  34. #endif
  35.  
  36. +void
  37. +terminal_widget_send_key(TerminalWidget *widget,
  38. + guint keyval,
  39. + guint state);
  40. +
  41. +
  42. G_END_DECLS;
  43.  
  44. #endif /* !__TERMINAL_WIDGET_H__ */
  45. diff -rup osso-xterm-0.14.mh12~/src/terminal-window.c osso-xterm-0.14.mh12/src/terminal-window.c
  46. --- osso-xterm-0.14.mh12~/src/terminal-window.c 2008-03-25 16:07:22.000000000 +0000
  47. +++ osso-xterm-0.14.mh12/src/terminal-window.c 2008-09-05 16:01:04.000000000 +0100
  48. @@ -53,11 +53,17 @@
  49. #include <hildon-widgets/hildon-program.h>
  50. #include <hildon-widgets/hildon-defines.h>
  51. #include <hildon-widgets/hildon-banner.h>
  52. +#include <hildon-widgets/hildon-get-password-dialog.h>
  53. +#include <hildon-widgets/hildon-input-mode-hint.h>
  54. #elif HILDON == 1
  55. #include <hildon/hildon-window.h>
  56. #include <hildon/hildon-program.h>
  57. #include <hildon/hildon-defines.h>
  58. #include <hildon/hildon-banner.h>
  59. +#include <hildon/hildon-get-password-dialog.h>
  60. +#include <hildon/hildon-program.h>
  61. +#include <gtk/gtk.h>
  62. +#include <gtk/gtkmain.h>
  63. #endif
  64. #include <gconf/gconf-client.h>
  65. #include <gdk/gdkkeysyms.h>
  66. @@ -66,6 +72,7 @@
  67. #include "terminal-settings.h"
  68. #include "terminal-tab-header.h"
  69. #include "terminal-window.h"
  70. +#include "terminal-widget.h"
  71. #include "terminal-encoding.h"
  72. #include "shortcuts.h"
  73.  
  74. @@ -122,6 +129,8 @@ static void terminal_window_a
  75. TerminalWindow *window);
  76. static void terminal_window_action_ctrl (GtkAction *action,
  77. TerminalWindow *window);
  78. +static void terminal_window_action_enter_passwd (GtkAction *action,
  79. + TerminalWindow *window);
  80. static void terminal_window_action_encoding (GtkAction *action,
  81. TerminalWindow *window);
  82.  
  83. @@ -180,6 +189,7 @@ static GtkActionEntry action_entries[] =
  84. { "reset", NULL, N_ ("Reset"), NULL, NULL, G_CALLBACK (terminal_window_action_reset), },
  85. { "reset-and-clear", NULL, N_ ("Reset and Clear"), NULL, NULL, G_CALLBACK (terminal_window_action_reset_and_clear), },
  86. { "ctrl", NULL, N_ ("Send Ctrl-<some key>"), NULL, NULL, G_CALLBACK (terminal_window_action_ctrl), },
  87. + { "enter-passwd", NULL, N_ ("Enter Password..."), NULL, NULL, G_CALLBACK (terminal_window_action_enter_passwd), },
  88. { "quit", NULL, N_ ("Quit"), NULL, NULL, G_CALLBACK (terminal_window_action_quit), },
  89.  
  90.  
  91. @@ -235,9 +245,17 @@ static GtkToggleActionEntry toggle_actio
  92. static const gchar ui_description[] =
  93. "<ui>"
  94. " <popup name='popup-menu'>"
  95. + " <menuitem action='open-url'/>"
  96. + " <separator/>"
  97. + " <menuitem action='enter-passwd'/>"
  98. + " <separator/>"
  99. " <menuitem action='new-window'/>"
  100. " <separator/>"
  101. + " <menuitem action='copy'/>"
  102. " <menuitem action='paste'/>"
  103. + " <separator/>"
  104. + " <menuitem action='scrollbar'/>"
  105. + " <separator/>"
  106. " </popup>"
  107. "</ui>";
  108.  
  109. @@ -347,11 +365,31 @@ populate_menubar (TerminalWindow *window
  110.  
  111. parent = attach_menu(menubar, actiongroup, accelgroup, "view-menu");
  112. attach_item(parent, actiongroup, accelgroup, "fullscreen");
  113. -
  114. + attach_item(parent, actiongroup, accelgroup, "reverse");
  115. + attach_item(parent, actiongroup, accelgroup, "scrollbar");
  116. subparent = attach_menu(parent, actiongroup, accelgroup, "show-toolbar-menu");
  117. attach_item(subparent, actiongroup, accelgroup, "show-full-screen");
  118. attach_item(subparent, actiongroup, accelgroup, "show-normal-screen");
  119.  
  120. + gtk_menu_shell_append(GTK_MENU_SHELL(parent),
  121. + gtk_separator_menu_item_new());
  122. + parent = attach_menu(parent, actiongroup, accelgroup, "font-menu");
  123. + attach_item(parent, actiongroup, accelgroup, "-8pt");
  124. + attach_item(parent, actiongroup, accelgroup, "-6pt");
  125. + attach_item(parent, actiongroup, accelgroup, "-4pt");
  126. + attach_item(parent, actiongroup, accelgroup, "-2pt");
  127. + attach_item(parent, actiongroup, accelgroup, "+0pt");
  128. + attach_item(parent, actiongroup, accelgroup, "+2pt");
  129. + attach_item(parent, actiongroup, accelgroup, "+4pt");
  130. + attach_item(parent, actiongroup, accelgroup, "+6pt");
  131. + attach_item(parent, actiongroup, accelgroup, "+8pt");
  132. +
  133. + parent = attach_menu(menubar, actiongroup, accelgroup, "terminal-menu");
  134. + attach_item(parent, actiongroup, accelgroup, "reset");
  135. + attach_item(parent, actiongroup, accelgroup, "reset-and-clear");
  136. + attach_item(parent, actiongroup, accelgroup, "ctrl");
  137. + attach_item(parent, actiongroup, accelgroup, "enter-passwd");
  138. +
  139. parent = attach_menu(menubar, actiongroup, accelgroup, "tools-menu");
  140. attach_item(parent, actiongroup, accelgroup, "settings");
  141. attach_item(parent, actiongroup, accelgroup, "encoding");
  142. @@ -779,12 +817,9 @@ terminal_window_context_menu (TerminalWi
  143. TerminalWindow *window)
  144. {
  145.  
  146. -/* Copy & paste didn't work quite well from popup menu and there was only one
  147. - * item left in the menu so it was removed
  148. - */
  149. -#if 0
  150. +
  151. TerminalWidget *terminal;
  152. - // GtkWidget *popup;
  153. + GtkWidget *popup;
  154. gint button = 0;
  155. gint time;
  156.  
  157. @@ -834,7 +869,6 @@ terminal_window_context_menu (TerminalWi
  158. gtk_menu_popup (GTK_MENU (popup), NULL, NULL,
  159. NULL, NULL, button, time);
  160. }
  161. -#endif
  162. }
  163.  
  164. static void
  165. @@ -1185,6 +1219,61 @@ terminal_window_action_encoding (GtkActi
  166. }
  167.  
  168. static void
  169. +terminal_window_action_enter_passwd (GtkAction *action,
  170. + TerminalWindow *window)
  171. +{
  172. + GtkWidget *dialog, *label;
  173. + GtkEntry *pwd_entry;
  174. +
  175. + dialog = gtk_dialog_new_with_buttons("Enter Password",
  176. + GTK_WINDOW(window),
  177. + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
  178. + GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
  179. + GTK_STOCK_OK, GTK_RESPONSE_OK,
  180. + NULL);
  181. +
  182. + gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
  183. +
  184. + label = gtk_label_new("Enter password/text to send...");
  185. + gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), label);
  186. +
  187. + pwd_entry = GTK_ENTRY (gtk_entry_new ());
  188. + gtk_entry_set_visibility (pwd_entry, FALSE);
  189. + gtk_entry_set_activates_default (pwd_entry, TRUE);
  190. + g_object_set(G_OBJECT(pwd_entry->im_context), "hildon_input_mode",
  191. + HILDON_GTK_INPUT_MODE_FULL, NULL);
  192. +
  193. + gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox), GTK_WIDGET(pwd_entry));
  194. +
  195. + gtk_widget_show_all(dialog);
  196. +
  197. + /* It would be nice to activate the text box to keep the input area up,
  198. + but I'm not quite sure how to do that? Neither of these quite work:
  199. +
  200. + gtk_widget_grab_focus(GTK_WIDGET(pwd_entry));
  201. + gtk_widget_activate(GTK_WIDGET(pwd_entry));
  202. + */
  203. +
  204. + if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
  205. + gchar *pwd = (gchar*)gtk_entry_get_text (pwd_entry);
  206. + TerminalWidget *tw = terminal_window_get_active(window);
  207. + int i;
  208. +
  209. + if (tw) {
  210. + for (i=0; pwd[i]; i++) {
  211. + terminal_widget_send_key(tw, pwd[i], 0);
  212. + pwd[i] = 0;
  213. + }
  214. + terminal_widget_send_key(tw, GDK_KP_Enter, 0);
  215. + }
  216. + }
  217. +
  218. + gtk_widget_hide(dialog);
  219. + gtk_widget_destroy(dialog);
  220. +
  221. +}
  222. +
  223. +static void
  224. terminal_window_action_settings (GtkAction *action,
  225. TerminalWindow *window)
  226. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement