ソースを参照

Fix indentation.

Signed-off-by: Bradley Smith <[email protected]>
Bradley Smith 15 年 前
コミット
94526c0fe7
4 ファイル変更47 行追加45 行削除
  1. 2 0
      ChangeLog
  2. 8 8
      src/mssh-window.c
  3. 19 19
      src/mssh-window.h
  4. 18 18
      src/mssh.c

+ 2 - 0
ChangeLog

@@ -1,5 +1,7 @@
 2009-08-02  Bradley Smith  <[email protected]>
 
+	Fix indentation.
+
 	Fix segfault with odd number of servers. Span last server in this case.
 
 	Initial commit.

+ 8 - 8
src/mssh-window.c

@@ -14,7 +14,7 @@ static void mssh_window_destroy(GtkWidget *widget, gpointer data)
 
 GtkWidget* mssh_window_new(void)
 {
-    return g_object_new(MSSH_TYPE_WINDOW, NULL);
+	return g_object_new(MSSH_TYPE_WINDOW, NULL);
 }
 
 gboolean key_press(GtkWidget *widget, GdkEventKey *event,
@@ -80,8 +80,8 @@ static void mssh_window_init(MSSHWindow* window)
 
 	gtk_menu_shell_append(GTK_MENU_SHELL(window->file_menu),
 		window->file_quit);
-    g_signal_connect(G_OBJECT(window->file_quit), "activate",
-        G_CALLBACK(mssh_window_destroy), NULL);
+	g_signal_connect(G_OBJECT(window->file_quit), "activate",
+		G_CALLBACK(mssh_window_destroy), NULL);
 	gtk_widget_add_accelerator(window->file_quit, "activate", accel_group,
 		GDK_W, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
 	gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
@@ -99,10 +99,10 @@ static void mssh_window_init(MSSHWindow* window)
 	gtk_box_pack_start(GTK_BOX(window->vbox), window->entry,
 		FALSE, TRUE, 2);
 
-    gtk_container_add(GTK_CONTAINER(window), window->vbox);
+	gtk_container_add(GTK_CONTAINER(window), window->vbox);
 
-    gtk_widget_set_size_request(GTK_WIDGET(window), 1024, 768);
-    gtk_window_set_title(GTK_WINDOW(window), "MSSH");
+	gtk_widget_set_size_request(GTK_WIDGET(window), 1024, 768);
+	gtk_window_set_title(GTK_WINDOW(window), "MSSH");
 }
 
 void mssh_window_new_session(MSSHWindow* window, char **env,
@@ -118,7 +118,7 @@ void mssh_window_new_session(MSSHWindow* window, char **env,
 
 	args[0] = strdup("ssh");
 
-    window->table = gtk_table_new(rows, 2, TRUE);
+	window->table = gtk_table_new(rows, 2, TRUE);
 	gtk_box_pack_start(GTK_BOX(window->vbox), window->table,
 		TRUE, TRUE, 0);
 
@@ -131,7 +131,7 @@ void mssh_window_new_session(MSSHWindow* window, char **env,
 			{
 				args[1] = window->servers[k];
 				window->terms[k] = vte_terminal_new();
-			    g_signal_connect(G_OBJECT(window->terms[k]),
+				g_signal_connect(G_OBJECT(window->terms[k]),
 					"child-exited", G_CALLBACK(vte_child_exited), window);
 				vte_terminal_fork_command(VTE_TERMINAL(window->terms[k]),
 					"ssh", args, window->env, NULL, FALSE, FALSE,

+ 19 - 19
src/mssh-window.h

@@ -6,28 +6,28 @@
 
 G_BEGIN_DECLS
 
-#define MSSH_TYPE_WINDOW            mssh_window_get_type()
-#define MSSH_WINDOW(obj)            G_TYPE_CHECK_INSTANCE_CAST(obj,\
-    MSSH_TYPE_WINDOW, MSSHWindow)
-#define MSSH_WINDOW_CLASS(klass)    G_TYPE_CHECK_CLASS_CAST(klass,\
-    MSSH_WINDOW_TYPE, MSSHWindowClass)
-#define IS_MSSH_WINDOW(obj)         G_TYPE_CHECK_INSTANCE_TYPE(obj,\
-    MSSH_TYPE_WINDOW)
+#define MSSH_TYPE_WINDOW			mssh_window_get_type()
+#define MSSH_WINDOW(obj)			G_TYPE_CHECK_INSTANCE_CAST(obj,\
+	MSSH_TYPE_WINDOW, MSSHWindow)
+#define MSSH_WINDOW_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST(klass,\
+	MSSH_WINDOW_TYPE, MSSHWindowClass)
+#define IS_MSSH_WINDOW(obj)			G_TYPE_CHECK_INSTANCE_TYPE(obj,\
+	MSSH_TYPE_WINDOW)
 #define IS_MSSH_WINDOW_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE(klass,\
-    MSSH_TYPE_WINDOW)
+	MSSH_TYPE_WINDOW)
 
 typedef struct
 {
-    GtkWindow widget;
-    GtkWidget *vbox;
-    GtkWidget *entry;
-    GtkWidget *table;
-    GtkWidget *menu_bar;
-    GtkWidget *server_menu;
-    GtkWidget *file_menu;
-    GtkWidget *server_item;
-    GtkWidget *file_item;
-    GtkWidget *file_quit;
+	GtkWindow widget;
+	GtkWidget *vbox;
+	GtkWidget *entry;
+	GtkWidget *table;
+	GtkWidget *menu_bar;
+	GtkWidget *server_menu;
+	GtkWidget *file_menu;
+	GtkWidget *server_item;
+	GtkWidget *file_item;
+	GtkWidget *file_quit;
 	char **env;
 	char **servers;
 	int num_servers;
@@ -37,7 +37,7 @@ typedef struct
 
 typedef struct
 {
-    GtkWindowClass parent_class;
+	GtkWindowClass parent_class;
 } MSSHWindowClass;
 
 GType mssh_window_get_type(void) G_GNUC_CONST;

+ 18 - 18
src/mssh.c

@@ -13,8 +13,8 @@
 
 static void on_mssh_destroy(GtkWidget *widget, gpointer data)
 {
-    gtk_widget_hide(widget);
-    gtk_main_quit();
+	gtk_widget_hide(widget);
+	gtk_main_quit();
 }
 
 void usage(const char *argv0)
@@ -33,27 +33,27 @@ void usage(const char *argv0)
 
 int main(int argc, char* argv[], char* env[])
 {
-    GtkWidget* window;
+	GtkWidget* window;
 	int c, option_index = 0;
 	int i, nhosts = 0;
 	char **hosts = NULL;
 
 	static struct option long_options[] =
-    {
-    	{"help",	no_argument,	0, 'h'},
-    	{"version",	no_argument,	0, 'V'},
-        {0, 0, 0, 0}
-    };
+	{
+		{"help",	no_argument,	0, 'h'},
+		{"version",	no_argument,	0, 'V'},
+		{0, 0, 0, 0}
+	};
 
 	for(;;)
 	{
 		c = getopt_long(argc, argv, "hV", long_options, &option_index);
 
 		if(c == -1)
-        	break;
+			break;
 
-        switch(c)
-        {
+		switch(c)
+		{
 		case 'h':
 			usage(argv[0]);
 			break;
@@ -109,22 +109,22 @@ int main(int argc, char* argv[], char* env[])
 		usage(argv[0]);
 	}
 
-    gtk_init(&argc, &argv);
+	gtk_init(&argc, &argv);
 
-    window = GTK_WIDGET(mssh_window_new());
+	window = GTK_WIDGET(mssh_window_new());
 
-    g_signal_connect(G_OBJECT(window), "destroy",
-        G_CALLBACK(on_mssh_destroy), NULL);
+	g_signal_connect(G_OBJECT(window), "destroy",
+		G_CALLBACK(on_mssh_destroy), NULL);
 
 	mssh_window_new_session(MSSH_WINDOW(window), env, nhosts, hosts);
 
-    gtk_widget_show_all(window);
-    gtk_main();
+	gtk_widget_show_all(window);
+	gtk_main();
 
 	for(i = 0; i < nhosts; i++)
 		free(hosts[i]);
 
 	free(hosts);
 
-    return 0;
+	return 0;
 }