* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkwidget.h"
+/**
+ * SECTION:gtkprintsettings
+ * @Short_description: Stores print settings
+ * @Title: GtkPrintSettings
+ *
+ * A GtkPrintSettings object represents the settings of a print dialog in
+ * a system-independent way. The main use for this object is that once
+ * you've printed you can get a settings object that represents the settings
+ * the user chose, and the next time you print you can pass that object in so
+ * that the user doesn't have to re-set all his settings.
+ *
+ * Its also possible to enumerate the settings so that you can easily save
+ * the settings for the next time your app runs, or even store them in a
+ * document. The predefined keys try to use shared values as much as possible
+ * so that moving such a document between systems still works.
+ *
+ * <!-- TODO example of getting, storing and setting settings -->
+ *
+ * Printing support was added in GTK+ 2.10.
+ */
+
+
typedef struct _GtkPrintSettingsClass GtkPrintSettingsClass;
#define GTK_IS_PRINT_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PRINT_SETTINGS))
struct _GtkPrintSettings
{
GObject parent_instance;
-
+
GHashTable *hash;
};
*
* Since: 2.10
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_print_settings_get (GtkPrintSettings *settings,
const gchar *key)
{
*
* Since: 2.10
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_print_settings_get_printer (GtkPrintSettings *settings)
{
return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PRINTER);
gboolean
gtk_print_settings_get_collate (GtkPrintSettings *settings)
{
- return gtk_print_settings_get_bool (settings,
- GTK_PRINT_SETTINGS_COLLATE);
+ return gtk_print_settings_get_bool_with_default (settings,
+ GTK_PRINT_SETTINGS_COLLATE,
+ TRUE);
}
/**
*
* Since: 2.10
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_print_settings_get_default_source (GtkPrintSettings *settings)
{
return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_DEFAULT_SOURCE);
*
* Since: 2.10
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_print_settings_get_media_type (GtkPrintSettings *settings)
{
return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_MEDIA_TYPE);
*
* Since: 2.10
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_print_settings_get_dither (GtkPrintSettings *settings)
{
return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_DITHER);
*
* Since: 2.10
*/
-G_CONST_RETURN gchar *
+const gchar *
gtk_print_settings_get_output_bin (GtkPrintSettings *settings)
{
return gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_BIN);
gchar *value;
value = g_key_file_get_string (key_file,
- KEYFILE_GROUP_NAME,
+ group_name,
keys[i],
NULL);
if (!value)