Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-terminal/ChangeLog,v
retrieving revision 1.438
diff -u -r1.438 ChangeLog
--- ChangeLog	1 Dec 2004 04:13:25 -0000	1.438
+++ ChangeLog	7 Jan 2005 10:53:55 -0000
@@ -1,3 +1,8 @@
+2005-01-07  SudhakarNaidu Sudhakar YogeswaraRao Divakar<go4sudhakar@yahoo.com>
+            
+         * /src/terminal-window.c(terminal_window_init)
+         * Add a toolbar with two buttons and add newterminal and newtab functions
+            bugnumber #138020
 2004-12-01  Mariano Suárez-Alvarez <mariano@gnome.org>
 
 	* configure.in: Post release bump: Version 2.9.3
Index: src/terminal-window.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-window.c,v
retrieving revision 1.105
diff -u -r1.105 terminal-window.c
--- src/terminal-window.c	23 Nov 2004 05:36:26 -0000	1.105
+++ src/terminal-window.c	7 Jan 2005 10:55:06 -0000
@@ -38,6 +38,11 @@
 {  
   GtkWidget *main_vbox;
   GtkWidget *menubar;
+  GtkWidget *toolbar;
+  GtkWidget *box;
+  GtkWidget *iconw,*iconwt;
+  GtkWidget *terminal_button;
+  GtkWidget *tab_button;
   GtkWidget *notebook;
   GtkWidget *file_menuitem;
   GtkWidget *edit_menuitem;
@@ -84,10 +89,10 @@
   guint fullscreen : 1;
 };
 
-enum {
-  dummy, /* remove this when you add more signals */
+/*enum {
+  dummy, * remove this when you add more signals 
   LAST_SIGNAL
-};
+};*/
 
 static GConfClient *client = NULL;
 static guint notify;
@@ -101,6 +106,7 @@
                                               GdkEvent *event,
                                               gpointer data);
 
+
 static void       screen_set_scrollbar (TerminalScreen *screen,
                                         GtkWidget      *scrollbar);
 static void       screen_set_hbox      (TerminalScreen *screen,
@@ -766,6 +772,55 @@
 
   gtk_clipboard_request_text (window->priv->clipboard, (GtkClipboardTextReceivedFunc) update_edit_menu, window);
 }
+static void newterminal(GtkWidget *tool,TerminalWindow *window)
+{
+  
+  TerminalProfile *profile;
+  profile = g_object_new (TERMINAL_TYPE_PROFILE, NULL);
+  g_assert (profile);
+  if (!terminal_profile_get_forgotten (profile))
+    {
+      char *name;
+      const char *dir;
+      
+      name = "Default";
+      dir = terminal_screen_get_working_dir (window->priv->active_term);
+
+      terminal_app_new_terminal (terminal_app_get (),
+                                 profile,
+                                 NULL,
+                                 FALSE, FALSE, FALSE,
+                                 NULL, NULL, NULL, dir, NULL, 1.0,
+                                 NULL, name, -1);
+
+      g_free (name);
+    }
+
+ } 
+ 
+static void newtab(GtkWidget *tool,TerminalWindow *window)
+{
+  
+  TerminalProfile *profile;
+  
+  profile = g_object_new (TERMINAL_TYPE_PROFILE, NULL);
+ 
+  g_assert (profile);
+
+  if (!terminal_profile_get_forgotten (profile))
+    {
+      const char *dir;
+
+      dir = terminal_screen_get_working_dir (window->priv->active_term);
+
+      terminal_app_new_terminal (terminal_app_get (),
+                                 profile,
+                                 window,
+                                 FALSE, FALSE, FALSE,
+                                 NULL, NULL, NULL, dir, NULL, 1.0,
+                                 NULL, NULL, -1);
+    }
+ } 
 
 static void
 terminal_window_init (TerminalWindow *window)
@@ -787,9 +842,11 @@
   window->priv->terms = NULL;
   window->priv->active_term = NULL;
   window->priv->menubar = gtk_menu_bar_new ();
+  window->priv->toolbar=gtk_toolbar_new();
   window->priv->menubar_visible = FALSE;
   
   window->priv->main_vbox = gtk_vbox_new (FALSE, 0);
+  window->priv->box=gtk_vbox_new(FALSE,0);
   window->priv->notebook = gtk_notebook_new ();
   
   window->priv->old_char_width = -1;
@@ -833,6 +890,28 @@
   gtk_box_pack_start (GTK_BOX (window->priv->main_vbox),
 		      window->priv->menubar,
 		      FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(window->priv->box), window->priv->toolbar, FALSE, FALSE, 0);
+   
+   gtk_box_pack_start(GTK_BOX(window->priv->main_vbox),window->priv->box,FALSE, FALSE, 0);
+  window->priv->iconw = gtk_image_new_from_file ("/usr/share/pixmaps/gnome-term-linux.png");
+    gtk_toolbar_set_icon_size(window->priv->toolbar,GTK_ICON_SIZE_BUTTON);
+    window->priv->terminal_button = 
+    gtk_toolbar_append_item ( GTK_TOOLBAR (window->priv->toolbar), /* our toolbar */
+                              "New Terminal",               /* button label */
+                              "Open new terminal",     /* this button's tooltip */
+                              "Private",             /* tooltip private info */
+                            window->priv->iconw,                 /* icon widget */
+                            GTK_SIGNAL_FUNC(newterminal), /* a signal */
+                             window);
+  window->priv->iconwt = gtk_image_new_from_file ("/usr/share/pixmaps/gnome-term-night.png");
+window->priv->tab_button = 
+    gtk_toolbar_append_item ( GTK_TOOLBAR (window->priv->toolbar), /* our toolbar */
+                              "New Tab",               /* button label */
+                              "Open new tab",     /* this button's tooltip */
+                              "Private",             /* tooltip private info */
+                            window->priv->iconwt,                 /* icon widget */
+                            GTK_SIGNAL_FUNC(newtab), /* a signal */
+                             window);
 
   gtk_box_pack_end (GTK_BOX (window->priv->main_vbox),
                     window->priv->notebook,
@@ -1053,7 +1132,10 @@
 
   reset_menubar_labels (window);
   
+  
   gtk_widget_show_all (window->priv->main_vbox);
+  gtk_widget_show(window->priv->box);
+  gtk_widget_show(window->priv->toolbar);
 }
 
 static void
@@ -1109,6 +1191,8 @@
   
   /* to handle multiple destroy, FIXME some fields are missing */
   window->priv->menubar = NULL;
+  window->priv->toolbar=NULL;
+  window->priv->box=NULL;
   window->priv->notebook = NULL;
   window->priv->main_vbox = NULL;
   window->priv->copy_menuitem = NULL;
@@ -1181,7 +1265,7 @@
       /* Now, set the _NET_WM_USER_TIME for the new window to the timestamp
        * that caused the window to be launched.
        */
-      if (sn_launchee_context_get_id_has_timestamp (context))
+     /* if (sn_launchee_context_get_id_has_timestamp (context))
         {
           gulong timestamp;
 
@@ -1193,7 +1277,7 @@
           g_warning ("Launched by a non-compliant or obsolete startup "
                      "notification launcher.  Focus-stealing-prevention "
                      "may fail.\n");
-        }
+        }*/
     }
   
   GTK_WIDGET_CLASS (parent_class)->show (widget);
@@ -2741,7 +2825,7 @@
   gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about), copyright);
   gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about), authors);
   gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about), _("translator-credits"));
-  gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG (about), "gnome-terminal");
+ /* gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG (about), "gnome-terminal");*/
 
   gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (window));
   gtk_window_set_destroy_with_parent (GTK_WINDOW (about), TRUE);
