~ubuntu-branches/ubuntu/maverick/xfce4-terminal/maverick

« back to all changes in this revision

Viewing changes to terminal/terminal-app.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2009-03-07 18:25:16 UTC
  • mfrom: (1.1.13 upstream) (6.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20090307182516-m1ufxagwnyd2fzqt
Tags: 0.2.10-1ubuntu1
* Merge Xfce 4.6 final from Debian experimental, remaining Ubuntu changes
   (FFe granted, see LP: #339246):
   - debian/patches/xubuntu-change-desktop-category.patch: place terminal
     under Accessories, not System.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: terminal-app.c 26424 2007-12-02 14:13:52Z benny $ */
 
1
/* $Id$ */
2
2
/*-
3
 
 * Copyright (c) 2004-2007 os-cillation e.K.
 
3
 * Copyright (c) 2004-2008 os-cillation e.K.
4
4
 *
5
5
 * Written by Benedikt Meurer <benny@xfce.org>.
6
6
 *
54
54
                                                                 gboolean            fullscreen,
55
55
                                                                 TerminalVisibility  menubar,
56
56
                                                                 TerminalVisibility  borders,
57
 
                                                                 TerminalVisibility  toolbars);
 
57
                                                                 TerminalVisibility  toolbars,
 
58
                                                                 gboolean            maximize);
58
59
static void               terminal_app_new_window               (TerminalWindow     *window,
59
60
                                                                 const gchar        *working_directory,
60
61
                                                                 TerminalApp        *app);
61
62
static void               terminal_app_new_window_with_terminal (TerminalWindow     *window,
62
63
                                                                 TerminalScreen     *terminal,
 
64
                                                                 gint                x,
 
65
                                                                 gint                y,
63
66
                                                                 TerminalApp        *app);
64
67
static void               terminal_app_window_destroyed         (GtkWidget          *window,
65
68
                                                                 TerminalApp        *app);
191
194
                            gboolean           fullscreen,
192
195
                            TerminalVisibility menubar,
193
196
                            TerminalVisibility borders,
194
 
                            TerminalVisibility toolbars)
 
197
                            TerminalVisibility toolbars,
 
198
                            gboolean           maximize)
195
199
{
196
200
  GtkWidget *window;
197
201
 
198
 
  window = terminal_window_new (fullscreen, menubar, borders, toolbars);
 
202
  window = terminal_window_new (fullscreen, menubar, borders, toolbars, maximize);
199
203
  g_signal_connect (G_OBJECT (window), "destroy",
200
204
                    G_CALLBACK (terminal_app_window_destroyed), app);
201
205
  g_signal_connect (G_OBJECT (window), "new-window",
253
257
static void
254
258
terminal_app_new_window_with_terminal (TerminalWindow *existing,
255
259
                                       TerminalScreen *terminal,
 
260
                                       gint            x,
 
261
                                       gint            y,
256
262
                                       TerminalApp    *app)
257
263
{
258
264
  GtkWidget *window;
259
265
  GdkScreen *screen;
 
266
  
 
267
  _terminal_return_if_fail (TERMINAL_IS_WINDOW (existing));
 
268
  _terminal_return_if_fail (TERMINAL_IS_SCREEN (terminal));
 
269
  _terminal_return_if_fail (TERMINAL_IS_APP (app));
260
270
 
261
271
  window = terminal_app_create_window (app, FALSE,
262
272
                                       TERMINAL_VISIBILITY_DEFAULT,
263
273
                                       TERMINAL_VISIBILITY_DEFAULT,
264
 
                                       TERMINAL_VISIBILITY_DEFAULT);
 
274
                                       TERMINAL_VISIBILITY_DEFAULT,
 
275
                                       FALSE);
 
276
 
 
277
  /* set new window position */
 
278
  if (x > -1 && y > -1)
 
279
    gtk_window_move (GTK_WINDOW (window), x, y);
265
280
 
266
281
  /* place the new window on the same screen as
267
282
   * the existing window.
347
362
terminal_app_find_screen (const gchar *display_name)
348
363
{
349
364
  const gchar *other_name;
350
 
#if GTK_CHECK_VERSION(2,10,0)
351
365
  GdkColormap *colormap;
352
 
#endif
353
366
  GdkDisplay  *display = NULL;
354
367
  GdkScreen   *screen = NULL;
355
368
  GSList      *displays;
410
423
      g_object_ref (G_OBJECT (screen));
411
424
    }
412
425
 
413
 
#if GTK_CHECK_VERSION(2,10,0)
414
426
  /* check if we already checked this screen */
415
427
  if (g_object_get_data (G_OBJECT (screen), "terminal-checked-screen") == NULL)
416
428
    {
427
439
      /* mark this screen as handled */
428
440
      g_object_set_data (G_OBJECT (screen), I_("terminal-checked-screen"), GINT_TO_POINTER (1));
429
441
    }
430
 
#endif
431
442
 
432
443
  return screen;
433
444
}
504
515
                                       attr->fullscreen,
505
516
                                       attr->menubar,
506
517
                                       attr->borders,
507
 
                                       attr->toolbars);
 
518
                                       attr->toolbars,
 
519
                                       attr->maximize);
508
520
 
509
521
  if (attr->role != NULL)
510
522
    gtk_window_set_role (GTK_WINDOW (window), attr->role);