PageRenderTime 45ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/recipes/tsclient/tsclient-0.132/fixes.patch

https://github.com/Martix/Eonos
Patch | 332 lines | 306 code | 26 blank | 0 comment | 0 complexity | b0a9c7a117177b3f3b0d187aa619df68 MD5 | raw file
  1. # tsclient patch
  2. # Copyright (C) 2004, Advanced Micro Devices, Inc. All Rights Reserved
  3. # Released under the GPL license
  4. diff -urN tsclient-0.132/Makefile.am tsclient-0.132.diff/Makefile.am
  5. --- tsclient-0.132/Makefile.am 2003-11-08 16:21:32.000000000 -0700
  6. +++ tsclient-0.132.diff/Makefile.am 2004-08-24 16:53:40.000000000 -0600
  7. @@ -1,6 +1,6 @@
  8. ## Process this file with automake to produce Makefile.in
  9. -SUBDIRS = src applet po
  10. +SUBDIRS = @SDIRS@
  11. appicondir = $(datadir)/pixmaps
  12. appicon_DATA = tsclient.png
  13. diff -urN tsclient-0.132/configure.in tsclient-0.132.diff/configure.in
  14. --- tsclient-0.132/configure.in 2003-11-09 00:09:31.000000000 -0700
  15. +++ tsclient-0.132.diff/configure.in 2004-08-24 16:57:35.000000000 -0600
  16. @@ -12,8 +12,30 @@
  17. AM_PROG_CC_STDC
  18. AC_HEADER_STDC
  19. -pkg_modules="libgnomeui-2.0"
  20. -pkg_modules="libpanelapplet-2.0"
  21. +SDIRS="src"
  22. +
  23. +dnl Once libgnomeui disappears, this is all we need
  24. +pkg_modules="gtk+-2.0 gdk-pixbuf-2.0"
  25. +
  26. +AC_ARG_WITH(applet, [ --without-applet Don't build the panel applet ],
  27. +withapplet=no, withapplet=yes)
  28. +
  29. +echo "With applet: $withapplet"
  30. +
  31. +if test "$withapplet" != "no"; then
  32. + pkg_modules="$pkg_modules libpanelapplet-2.0"
  33. + SDIRS="$SDIRS applet"
  34. +fi
  35. +
  36. +AC_ARG_WITH(ica, [ --without-ica Don't build in support for the ICA client ],
  37. +withica=no, withica=yes)
  38. +
  39. +if test "$withica" != "no"; then
  40. + CFLAGS="$CFLAGS -DENABLE_ICA"
  41. +fi
  42. +
  43. +SDIRS="$SDIRS po"
  44. +
  45. PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
  46. AC_SUBST(PACKAGE_CFLAGS)
  47. AC_SUBST(PACKAGE_LIBS)
  48. @@ -41,6 +63,8 @@
  49. AC_MSG_RESULT(no)
  50. fi
  51. +AC_SUBST(SDIRS)
  52. +
  53. dnl ==========================================================================
  54. AC_OUTPUT([
  55. diff -urN tsclient-0.132/src/connect.c tsclient-0.132.diff/src/connect.c
  56. --- tsclient-0.132/src/connect.c 2003-11-08 19:45:43.000000000 -0700
  57. +++ tsclient-0.132.diff/src/connect.c 2004-08-24 16:57:53.000000000 -0600
  58. @@ -460,6 +460,7 @@
  59. gtk_widget_ref (miProtocol);
  60. if (!g_find_program_in_path ("Xnest")) { gtk_widget_set_sensitive (miProtocol, FALSE); }
  61. +#ifdef ENABLE_ICA
  62. miProtocol = gtk_menu_item_new_with_mnemonic ("ICA");
  63. gtk_container_add (GTK_CONTAINER (mnuProtocol), miProtocol);
  64. gtk_tooltips_set_tip (tooltips, miProtocol, _("ICA protocol is used to connect to Citrix servers."), NULL);
  65. @@ -468,6 +469,7 @@
  66. if (!g_find_program_in_path ("wfica") &&
  67. !g_file_test ("/usr/lib/ICAClient/wfica", G_FILE_TEST_EXISTS) )
  68. { gtk_widget_set_sensitive (miProtocol, FALSE); }
  69. +#endif
  70. gtk_option_menu_set_menu (GTK_OPTION_MENU (optProtocol), mnuProtocol);
  71. diff -urN tsclient-0.132/src/rdpfile.c tsclient-0.132.diff/src/rdpfile.c
  72. --- tsclient-0.132/src/rdpfile.c 2003-11-08 19:41:58.000000000 -0700
  73. +++ tsclient-0.132.diff/src/rdpfile.c 2004-08-24 16:53:40.000000000 -0600
  74. @@ -585,7 +585,7 @@
  75. widget = lookup_widget (main_window, "optSize2");
  76. if (gtk_toggle_button_get_active ((GtkToggleButton *) widget)) {
  77. widget = lookup_widget (main_window, "optSize");
  78. - if ((int) gtk_option_menu_get_history (GTK_OPTION_MENU (widget)) > 0) {
  79. + if ((int) gtk_option_menu_get_history (GTK_OPTION_MENU (widget)) >= 0) {
  80. switch ((int) gtk_option_menu_get_history (GTK_OPTION_MENU (widget))) {
  81. case 0:
  82. rdp->desktopwidth = 640;
  83. diff -urN tsclient-0.132/src/support.c tsclient-0.132.diff/src/support.c
  84. --- tsclient-0.132/src/support.c 2003-11-09 00:12:17.000000000 -0700
  85. +++ tsclient-0.132.diff/src/support.c 2004-08-24 16:57:46.000000000 -0600
  86. @@ -13,7 +13,7 @@
  87. #include <gtk/gtk.h>
  88. #include <gdk/gdk.h>
  89. #include <glib.h>
  90. -#include <libgnomeui/gnome-about.h>
  91. +#include <gtk/gtkdialog.h>
  92. #include <libintl.h>
  93. #define _(x) gettext(x)
  94. @@ -528,7 +528,9 @@
  95. //buffer[strlen(buffer)-2] = '\0';
  96. c_argv[c_argc++] = strdup(buffer);
  97. - } else if (rdp->protocol == 3) {
  98. + }
  99. +#ifdef ENABLE_ICA
  100. + else if (rdp->protocol == 3) {
  101. // ICA/Citrix Connection
  102. if (g_find_program_in_path ("wfica")) {
  103. cmd = "wfica";
  104. @@ -542,21 +544,25 @@
  105. c_argv[c_argc++] = g_strdup (buffer);
  106. if ( rdp->username && strlen (rdp->username) ) {
  107. - sprintf(buffer, "-username %s", (char*)g_strescape(rdp->username, NULL));
  108. - c_argv[c_argc++] = g_strdup (buffer);
  109. + sprintf(buffer, "-username");
  110. + c_argv[c_argc++] = g_strdup (buffer);
  111. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->username, NULL));
  112. }
  113. if ( rdp->password && strlen (rdp->password) ) {
  114. - sprintf(buffer, "-password %s", (char*)g_strescape(rdp->password, NULL));
  115. - c_argv[c_argc++] = g_strdup (buffer);
  116. + sprintf(buffer, "-password");
  117. + c_argv[c_argc++] = g_strdup (buffer);
  118. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->password, NULL));
  119. }
  120. if ( rdp->domain && strlen (rdp->domain) ) {
  121. - sprintf(buffer, "-domain %s", (char*)g_strescape(rdp->domain, NULL));
  122. - c_argv[c_argc++] = g_strdup (buffer);
  123. + sprintf(buffer, "-domain");
  124. + c_argv[c_argc++] = g_strdup (buffer);
  125. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->domain, NULL));
  126. }
  127. if ( rdp->client_hostname && strlen (rdp->client_hostname) ) {
  128. - sprintf(buffer, "-clientname %s", (char*)g_strescape(rdp->client_hostname, NULL));
  129. - c_argv[c_argc++] = g_strdup (buffer);
  130. + sprintf(buffer, "-clientname");
  131. + c_argv[c_argc++] = g_strdup (buffer);
  132. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->client_hostname, NULL));
  133. }
  134. switch (rdp->desktopwidth) {
  135. @@ -624,30 +630,24 @@
  136. }
  137. if (rdp->enable_alternate_shell == 1) {
  138. - if ( rdp->alternate_shell && strlen (rdp->alternate_shell) ) {
  139. - sprintf(buffer, "-program %s", (char*)g_strescape(rdp->alternate_shell, NULL));
  140. - c_argv[c_argc++] = g_strdup (buffer);
  141. - }
  142. -
  143. - if ( rdp->shell_working_directory && strlen (rdp->shell_working_directory) ) {
  144. - sprintf(buffer, "-directory %s", (char*)g_strescape(rdp->shell_working_directory, NULL));
  145. - c_argv[c_argc++] = g_strdup (buffer);
  146. - }
  147. + sprintf(buffer, "-program");
  148. + c_argv[c_argc++] = g_strdup (buffer);
  149. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->alternate_shell, NULL));
  150. }
  151. -
  152. - if (strlen(rdp->proto_file) && g_file_test (rdp->proto_file, G_FILE_TEST_EXISTS)) {
  153. - sprintf(buffer, "-passwd");
  154. - c_argv[c_argc++] = g_strdup (buffer);
  155. - sprintf(buffer, "%s", (char*)g_strescape(rdp->proto_file, NULL));
  156. - c_argv[c_argc++] = g_strdup (buffer);
  157. +
  158. + if ( rdp->shell_working_directory && strlen (rdp->shell_working_directory) ) {
  159. + sprintf(buffer, "-directory");
  160. + c_argv[c_argc++] = g_strdup (buffer);
  161. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->shell_working_directory, NULL));
  162. }
  163. if ( rdp->full_address && strlen (rdp->full_address) ) {
  164. - sprintf(buffer, "-description %s", (char*)g_strescape(rdp->full_address, NULL));
  165. - c_argv[c_argc++] = g_strdup (buffer);
  166. + sprintf(buffer, "-desc");
  167. + c_argv[c_argc++] = g_strdup (buffer);
  168. + c_argv[c_argc++] = g_strdup ((char *)g_strescape(rdp->full_address, NULL));
  169. }
  170. -
  171. - }
  172. + }
  173. +#endif
  174. c_argv[c_argc++] = NULL;
  175. @@ -663,7 +663,10 @@
  176. }
  177. if (std_err && strlen(std_err)) {
  178. g_warning ("\n%s\n", std_err);
  179. - tsc_error_message ((gchar*)std_err);
  180. + /* Note - this is a stupid and irresponsible thing to do -
  181. + Really, this needs to be handled more intellegently
  182. + */
  183. + /* tsc_error_message ((gchar*)std_err); */
  184. }
  185. } else {
  186. if (!g_spawn_async (NULL, (gchar**)c_argv, NULL, G_SPAWN_SEARCH_PATH,
  187. @@ -733,47 +736,82 @@
  188. gtk_widget_show_all (dialog);
  189. }
  190. +static void
  191. +update_label(GtkWidget *label, const gchar *str) {
  192. + GString *string;
  193. +
  194. + gchar *tmp = g_markup_escape_text (str, -1);
  195. +
  196. + string = g_string_new (NULL);
  197. + g_string_append(string, tmp);
  198. + gtk_label_set_markup (GTK_LABEL (label), string->str);
  199. + g_string_free (string, TRUE);
  200. +}
  201. +
  202. +void tsc_about_dialog() {
  203. + GtkWidget *about = NULL;
  204. + GtkWidget *name_label, *comments_label, *copyright_label;
  205. + GtkWidget *logo_image;
  206. + GtkWidget *vbox;
  207. -void tsc_about_dialog ()
  208. -{
  209. - static GtkWidget *about = NULL;
  210. - const gchar *name = _("Terminal Server Client");
  211. - const gchar *version = VERSION;
  212. - const gchar *copyright = "(C) 2003 Erick Woods\n<http://www.gnomepro.com/tsclient/>";
  213. - const gchar *authors[] = { "Erick Woods <erick@gnomepro.com>", NULL };
  214. - const gchar *documenters[] = { NULL };
  215. - const gchar *translator_credits = NULL;
  216. GdkPixbuf *pixbuf = create_pixbuf ("tsclient.png");
  217. - const gchar *comments = \
  218. - "Terminal Server Client is a frontend for \nrdesktop <http://www.rdesktop.org/> \nand vncviewer.\n" \
  219. - "\n" \
  220. - "Terminal Server Client is licensed under the \n" \
  221. - "GNU General Public License (GPL)\n<http://www.gnu.org/licenses/gpl.html>\n" \
  222. - "\n" \
  223. - "Images by: Jakub \"jimmac\" Steiner and others.";
  224. + about = gtk_dialog_new_with_buttons (_("About"),
  225. + NULL,
  226. + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
  227. + GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
  228. + NULL);
  229. - if (about) {
  230. - gtk_window_present (GTK_WINDOW (about));
  231. - return;
  232. - }
  233. + vbox = gtk_vbox_new (FALSE, 8);
  234. + gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
  235. - about = gnome_about_new (
  236. - name,
  237. - version,
  238. - copyright,
  239. - comments,
  240. - authors,
  241. - documenters,
  242. - translator_credits,
  243. - pixbuf);
  244. + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (about)->vbox), vbox, TRUE, TRUE, 0);
  245. - //gtk_window_set_wmclass (GTK_WINDOW (about), "terminal server client", "Terminal Server Client");
  246. - g_signal_connect (G_OBJECT (about), "destroy", G_CALLBACK (gtk_widget_destroyed), &about);
  247. - gtk_widget_show_all (about);
  248. - return;
  249. -}
  250. + logo_image = gtk_image_new ();
  251. + gtk_box_pack_start (GTK_BOX (vbox), logo_image, FALSE, FALSE, 0);
  252. + if (pixbuf)
  253. + gtk_image_set_from_pixbuf (GTK_IMAGE (logo_image), pixbuf);
  254. +
  255. + name_label = gtk_label_new (NULL);
  256. + gtk_label_set_selectable (GTK_LABEL (name_label), TRUE);
  257. + gtk_label_set_justify (GTK_LABEL (name_label), GTK_JUSTIFY_CENTER);
  258. + gtk_box_pack_start (GTK_BOX (vbox), name_label, FALSE, FALSE, 0);
  259. +
  260. + gtk_label_set_markup (GTK_LABEL (name_label), _("Terminal Server Client"));
  261. +
  262. + comments_label = gtk_label_new (NULL);
  263. + gtk_label_set_selectable (GTK_LABEL (comments_label), TRUE);
  264. + gtk_label_set_justify (GTK_LABEL (comments_label), GTK_JUSTIFY_CENTER);
  265. + gtk_label_set_line_wrap (GTK_LABEL (comments_label), TRUE);
  266. + gtk_box_pack_start (GTK_BOX (vbox), comments_label, FALSE, FALSE, 0);
  267. +
  268. + update_label(comments_label, "Terminal Server Client is a frontend for \nrdesktop " \
  269. + "<http://www.rdesktop.org/> \nand vncviewer.\n" \
  270. + "\n" \
  271. + "Terminal Server Client is licensed under the \n" \
  272. + "GNU General Public License (GPL)\n<http://www.gnu.org/licenses/gpl.html>\n" \
  273. + "\n" \
  274. + "Images by: Jakub \"jimmac\" Steiner and others.");
  275. +
  276. + copyright_label = gtk_label_new (NULL);
  277. + gtk_label_set_selectable (GTK_LABEL (copyright_label), TRUE);
  278. + gtk_label_set_justify (GTK_LABEL (copyright_label), GTK_JUSTIFY_CENTER);
  279. + gtk_box_pack_start (GTK_BOX (vbox), copyright_label, FALSE, FALSE, 0);
  280. +
  281. + update_label(copyright_label, "(C) 2003 Erick Woods\n<http://www.gnomepro.com/tsclient/>");
  282. +
  283. + gtk_widget_show_all (vbox);
  284. +
  285. + gtk_window_set_resizable (GTK_WINDOW (about), FALSE);
  286. +
  287. + g_signal_connect_swapped (GTK_OBJECT (about),
  288. + "response",
  289. + G_CALLBACK (gtk_widget_destroy),
  290. + GTK_OBJECT (about));
  291. +
  292. + gtk_widget_show_all (about);
  293. +}
  294. void tsc_quick_pick_activate (GtkMenuItem *menuitem, gpointer user_data)
  295. {
  296. @@ -847,8 +885,10 @@
  297. gtk_widget_set_sensitive ((GtkWidget*) g_object_get_data (G_OBJECT (main_win), "txtProgramPath"), FALSE);
  298. gtk_widget_set_sensitive ((GtkWidget*) g_object_get_data (G_OBJECT (main_win), "txtStartFolder"), FALSE);
  299. break;
  300. +#ifdef ENABLE_ICA
  301. case 3: // ica
  302. break;
  303. +#endif
  304. default:
  305. break;
  306. }