rendered paste bodydiff -ruN real-gaim-1.3.1/src/gaim-remote.c gaim-1.3.1/src/gaim-remote.c
--- real-gaim-1.3.1/src/gaim-remote.c 2004-08-15 12:17:29.000000000 -0400
+++ gaim-1.3.1/src/gaim-remote.c 2005-06-20 11:09:43.000000000 -0400
@@ -110,6 +110,8 @@
" uri Handle AIM: URI\n"
" away Popup the away dialog with the default message\n"
" back Remove the away dialog\n"
+ " show Show Gaim\n"
+ " hide Hide Gaim\n"
" quit Close running copy of Gaim\n\n"
" OPTIONS:\n"
" -h, --help [command] Show help for command\n"), name);
@@ -238,7 +240,12 @@
else if (!strcmp(command, "quit")) {
message(_("\nClose running copy of Gaim\n"), 1);
}
-
+ else if (!strcmp(command, "show")) {
+ message(_("\nShow running copy of Gaim\n"), 1);
+ }
+ else if (!strcmp(command, "hide")) {
+ message(_("\nHide running copy of Gaim\n"), 1);
+ }
else if (!strcmp(command, "away")) {
message(_("\nMark all accounts as \"away\" with the default message.\n"), 1);
}
@@ -279,7 +286,18 @@
else
return send_generic_command(CUI_TYPE_USER, CUI_USER_AWAY);
}
-
+ else if (!strcmp(opts.command, "show")) {
+ if(opts.help)
+ show_longhelp(argv[0], "show");
+ else
+ return send_generic_command(CUI_TYPE_REMOTE, CUI_REMOTE_SHOW_GUI);
+ }
+ else if (!strcmp(opts.command, "hide")) {
+ if(opts.help)
+ show_longhelp(argv[0], "hide");
+ else
+ return send_generic_command(CUI_TYPE_REMOTE, CUI_REMOTE_HIDE_GUI);
+ }
else if (!strcmp(opts.command, "back")) {
if (opts.help)
show_longhelp(argv[0], "back");
diff -ruN real-gaim-1.3.1/plugins/gaim-remote/remote.c gaim-1.3.1/plugins/gaim-remote/remote.c
--- real-gaim-1.3.1/plugins/gaim-remote/remote.c 2005-02-21 09:30:36.000000000 -0500
+++ gaim-1.3.1/plugins/gaim-remote/remote.c 2005-06-20 11:17:39.000000000 -0400
@@ -506,6 +506,15 @@
g_free(send);
/* report error */
break;
+ case CUI_REMOTE_SHOW_GUI:
+#if _WIN32
+ wgaim_systray_maximize(gtkblist->window);
+#endif
+ gaim_blist_set_visible(TRUE);
+ break;
+ case CUI_REMOTE_HIDE_GUI:
+ gaim_blist_set_visible(FALSE);
+ break;
default:
gaim_debug(GAIM_DEBUG_WARNING, "cui",
"Unhandled remote subtype %d\n", subtype);
diff -ruN real-gaim-1.3.1/plugins/gaim-remote/remote.h gaim-1.3.1/plugins/gaim-remote/remote.h
--- real-gaim-1.3.1/plugins/gaim-remote/remote.h 2004-07-27 20:29:52.000000000 -0400
+++ gaim-1.3.1/plugins/gaim-remote/remote.h 2005-06-20 11:08:25.000000000 -0400
@@ -96,6 +96,9 @@
#define CUI_REMOTE_ADD_BUDDY 8 /* Adds buddy to list */
#define CUI_REMOTE_REMOVE_BUDDY 9 /* Removes buddy from list */
#define CUI_REMOTE_JOIN_CHAT 10 /* Joins a chat. */
+#define CUI_REMOTE_SHOW_GUI 11 /* Shows the GUI if docked. */
+#define CUI_REMOTE_HIDE_GUI 12 /* Hides it. */
/* What else?? */
-
+ /* Guess what else?? ~comex */
+
#endif /* _GAIM_REMOTE_H_ */