#include "gtkicontheme.h"
#include "gtkimagemenuitem.h"
#include "gtkmain.h"
-#include "gtkalias.h"
/**
* SECTION:filesystem
* @short_description: Functions for working with GIO
+ * @Title: Filesystem utilities
*
* The functions and objects described here make working with GTK+ and
- * GIO more convenient. #GtkMountOperation is needed when mounting volumes
- * and gtk_show_uri() is a convenient way to launch applications for URIs.
- * Another object that is worth mentioning in this context is
- * #GdkAppLaunchContext, which provides visual feedback when lauching
- * applications.
- */
-
-/**
- * GtkMountOperation:
+ * GIO more convenient.
*
- * #GtkMountOperation is an implementation of #GMountOperation that
- * can be used with GIO functions for mounting volumes such as
+ * #GtkMountOperation is needed when mounting volumes:
+ * It is an implementation of #GMountOperation that can be used with
+ * GIO functions for mounting volumes such as
* g_file_mount_enclosing_volume(), g_file_mount_mountable(),
- * g_volume_mount(), g_mount_unmount() and others.
+ * g_volume_mount(), g_mount_unmount_with_operation() and others.
*
* When necessary, #GtkMountOperation shows dialogs to ask for
* passwords, questions or show processes blocking unmount.
+ *
+ * gtk_show_uri() is a convenient way to launch applications for URIs.
+ *
+ * Another object that is worth mentioning in this context is
+ * #GdkAppLaunchContext, which provides visual feedback when lauching
+ * applications.
*/
static void gtk_mount_operation_finalize (GObject *object);
GtkWidget *hbox, *main_vbox, *vbox, *icon;
GtkWidget *table;
GtkWidget *message_label;
+ GtkWidget *content_area, *action_area;
gboolean can_anonymous;
guint rows;
const gchar *secondary;
priv->dialog = dialog;
+ content_area = gtk_dialog_get_content_area (dialog);
+ action_area = gtk_dialog_get_action_area (dialog);
+
/* Set the dialog up with HIG properties */
- gtk_dialog_set_has_separator (dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
- gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
- gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+ gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
+ gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
+ gtk_box_set_spacing (GTK_BOX (action_area), 6);
gtk_window_set_resizable (window, FALSE);
gtk_window_set_title (window, "");
-1);
/* Build contents */
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
- main_vbox = gtk_vbox_new (FALSE, 18);
+ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 18);
gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0);
secondary = strstr (message, "\n");
FALSE, FALSE, 0);
}
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
can_anonymous = flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
GtkWidget *choice;
GSList *group;
- anon_box = gtk_vbox_new (FALSE, 6);
+ anon_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), anon_box,
FALSE, FALSE, 0);
GSList *group;
GPasswordSave password_save;
- remember_box = gtk_vbox_new (FALSE, 6);
+ remember_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), remember_box,
FALSE, FALSE, 0);
&pixbuf);
if (name == NULL)
- name = g_strdup_printf (_("Unknown Application (pid %d)"), pid);
+ name = g_strdup_printf (_("Unknown Application (PID %d)"), pid);
if (command_line == NULL)
command_line = g_strdup ("");
if (priv->parent_window != NULL)
gtk_window_set_transient_for (GTK_WINDOW (dialog), priv->parent_window);
gtk_window_set_title (GTK_WINDOW (dialog), "");
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
/**
* gtk_mount_operation_new:
- * @parent: transient parent of the window, or %NULL
+ * @parent: (allow-none): transient parent of the window, or %NULL
*
* Creates a new #GtkMountOperation
*
/**
* gtk_mount_operation_set_parent:
* @op: a #GtkMountOperation
- * @parent: transient parent of the window, or %NULL
+ * @parent: (allow-none): transient parent of the window, or %NULL
*
* Sets the transient parent for windows shown by the
* #GtkMountOperation.
*
* Gets the transient parent used by the #GtkMountOperation
*
- * Returns: the transient parent for windows shown by @op
+ * Returns: (transfer none): the transient parent for windows shown by @op
*
* Since: 2.14
*/
* gtk_mount_operation_get_screen:
* @op: a #GtkMountOperation
*
- * Gets the screen on which windows of the #GtkMountOperation
+ * Gets the screen on which windows of the #GtkMountOperation
* will be shown.
*
- * Returns: the screen on which windows of @op are shown
+ * Returns: (transfer none): the screen on which windows of @op are shown
*
* Since: 2.14
*/
else
return gdk_screen_get_default ();
}
-
-#define __GTK_MOUNT_OPERATION_C__
-#include "gtkaliasdef.c"