~ubuntu-branches/ubuntu/saucy/gimp/saucy-updates

« back to all changes in this revision

Viewing changes to app/display/gimpimagewindow.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-08 13:26:03 UTC
  • mfrom: (1.1.28) (0.4.19 sid)
  • Revision ID: package-import@ubuntu.com-20130308132603-h14fmrgazi3roobr
Tags: 2.8.4-1ubuntu1
* Synchronize with Debian (LP: #1132767). Remaining changes:
  - debian/patches/02_help-message.patch,
    debian/patches/03_gimp.desktop.in.in.patch:
    + Update some strings for Ubuntu
  - debian/control:
    + Update description
  - debian/rules:
    + Set gettext domain and update translation templates
* Dropped changes:
  - CVE-2012-5576.patch: Applied in new version
  - fix-python-multiarch-includes.patch: No longer needed
* debian/patches/link-against-lm.patch:
  - Link against lm to fix underlinking build failure
* debian/control, debian/rules:
  - Run autoreconf for above patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
/* GtkPaned position of the right docks area */
75
75
#define GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS  "right-docks-position"
76
76
 
 
77
/* Whether the window's maximized or not */
 
78
#define GIMP_IMAGE_WINDOW_MAXIMIZED        "maximized"
 
79
 
77
80
 
78
81
enum
79
82
{
589
592
      GIMP_LOG (WM, "Image window '%s' [%p] set fullscreen %s",
590
593
                gtk_window_get_title (GTK_WINDOW (widget)),
591
594
                widget,
592
 
                fullscreen ? "TURE" : "FALSE");
 
595
                fullscreen ? "TRUE" : "FALSE");
593
596
 
594
597
      if (private->menubar)
595
598
        gtk_widget_set_name (private->menubar,
805
808
  if (config->single_window_mode)
806
809
    {
807
810
      GimpSessionInfoAux *aux;
808
 
      char                widthbuf[128];
809
 
  
 
811
      gchar               widthbuf[128];
 
812
 
810
813
      g_snprintf (widthbuf, sizeof (widthbuf), "%d",
811
814
                  gtk_paned_get_position (GTK_PANED (private->left_hpane)));
812
815
      aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_LEFT_DOCKS_WIDTH, widthbuf);
816
819
                  gtk_paned_get_position (GTK_PANED (private->right_hpane)));
817
820
      aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS, widthbuf);
818
821
      aux_info = g_list_append (aux_info, aux);
 
822
 
 
823
      aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_MAXIMIZED,
 
824
                                       gimp_image_window_is_maximized (GIMP_IMAGE_WINDOW (session_managed)) ?
 
825
                                       "yes" : "no");
 
826
      aux_info = g_list_append (aux_info, aux);
819
827
    }
820
828
 
821
829
  return aux_info;
846
854
  gint                    left_docks_width      = -1;
847
855
  gint                    right_docks_pos       = -1;
848
856
  gboolean                wait_with_right_docks = FALSE;
 
857
  gboolean                maximized             = FALSE;
849
858
 
850
859
  g_return_if_fail (GIMP_IS_IMAGE_WINDOW (session_managed));
851
860
 
860
869
        width = &left_docks_width;
861
870
      else if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS))
862
871
        width = &right_docks_pos;
 
872
      else if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_MAXIMIZED))
 
873
        if (! g_ascii_strcasecmp (aux->value, "yes"))
 
874
          maximized = TRUE;
863
875
 
864
876
      if (width)
865
877
        sscanf (aux->value, "%d", width);
899
911
                                  right_docks_pos);
900
912
        }
901
913
    }
 
914
 
 
915
  if (maximized)
 
916
    gtk_window_maximize (GTK_WINDOW (session_managed));
 
917
  else
 
918
    gtk_window_unmaximize (GTK_WINDOW (session_managed));
902
919
}
903
920
 
904
921
 
1165
1182
  return (private->window_state & GDK_WINDOW_STATE_ICONIFIED) != 0;
1166
1183
}
1167
1184
 
 
1185
gboolean
 
1186
gimp_image_window_is_maximized (GimpImageWindow *window)
 
1187
{
 
1188
  GimpImageWindowPrivate *private;
 
1189
 
 
1190
  g_return_val_if_fail (GIMP_IS_IMAGE_WINDOW (window), FALSE);
 
1191
 
 
1192
  private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
 
1193
 
 
1194
  return (private->window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
 
1195
}
 
1196
 
1168
1197
/**
1169
1198
 * gimp_image_window_has_toolbox:
1170
1199
 * @window: