Yasumichi Akahoshi
yasum****@users*****
2005年 4月 9日 (土) 11:48:53 JST
Index: cxplorer/src/cxplorer-window.c diff -u cxplorer/src/cxplorer-window.c:1.7 cxplorer/src/cxplorer-window.c:1.8 --- cxplorer/src/cxplorer-window.c:1.7 Sat Apr 9 02:58:19 2005 +++ cxplorer/src/cxplorer-window.c Sat Apr 9 11:48:52 2005 @@ -71,6 +71,7 @@ gpointer user_data); static void cxplorer_window_on_dir_double_clicked (CxpRightPane * right_pane, gpointer user_data); +static void cxplorer_window_new_win_action (GtkWidget *widget, gpointer user_data); /** * Actions @@ -80,7 +81,7 @@ /* File menu */ {"FileMenuAction", NULL, N_("_File"), NULL, NULL, NULL}, {"NewMenuAction", NULL, N_("_New"), NULL, NULL, NULL}, - {"NewWinAction", NULL, N_("_Window"), NULL, NULL, NULL}, + {"NewWinAction", NULL, N_("_Window"), NULL, NULL, G_CALLBACK(cxplorer_window_new_win_action)}, {"NewFileAction", "gtk-new", N_("_File..."), NULL, NULL, NULL}, {"NewDirAction", NULL, N_("_Directory..."), NULL, NULL, NULL}, {"DeleteAction", "gtk-delete", N_("_Delete"), NULL, NULL, NULL}, @@ -308,6 +309,19 @@ g_free (fullpath); } +/** + * This function is called back when user click "File->New->Window". + * @param menuitem [in] Pointer to menu item "File->New->Window" + * @param user_data [in] Pointer to data which is defined by user. + * @todo Error handling + */ +static void cxplorer_window_new_win_action (GtkWidget *widget, gpointer user_data) +{ + gchar *prgname = g_get_prgname(); + + g_spawn_command_line_async (prgname, NULL); +} + static void cxplorer_window_on_dir_double_clicked (CxpRightPane * right_pane, gpointer user_data) {