Added rollback capplet, compile disabled by default
2001-01-24 Bradford Hovinen <hovinen@ximian.com> Added rollback capplet, compile disabled by default
This commit is contained in:
parent
c294afced9
commit
4f9a20c63e
8 changed files with 1632 additions and 0 deletions
7
capplets/rollback/ChangeLog
Normal file
7
capplets/rollback/ChangeLog
Normal file
|
@ -0,0 +1,7 @@
|
|||
2001-01-18 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* config-manager-dialog.c (do_rollback): Rewrite, add boolean
|
||||
rollback_to_last to signature
|
||||
|
||||
* config-manager-dialog.h: Change base class to CappletWidget
|
||||
|
36
capplets/rollback/Makefile.am
Normal file
36
capplets/rollback/Makefile.am
Normal file
|
@ -0,0 +1,36 @@
|
|||
Applicationsdir = $(datadir)/control-center/Desktop
|
||||
Applications_DATA = \
|
||||
rollback.desktop
|
||||
|
||||
pApplicationsdir = $(datadir)/gnome/apps/Settings/Desktop
|
||||
pApplications_DATA = \
|
||||
rollback.desktop
|
||||
|
||||
Gladedir = $(datadir)/control-center-data
|
||||
Glade_DATA = \
|
||||
rollback.glade
|
||||
|
||||
glade_msgs = \
|
||||
rollback.glade.h
|
||||
|
||||
EXTRA_DIST = $(Applications_DATA) $(Glade_DATA) $(glade_msgs)
|
||||
|
||||
INCLUDES = \
|
||||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||
-DGNOME_ICONDIR=\""${prefix}/share/pixmaps"\" \
|
||||
-DG_LOG_DOMAIN=\"background-properties\" \
|
||||
-DGLADE_DATADIR=\""$(Gladedir)"\" \
|
||||
$(GNOME_INCLUDEDIR) \
|
||||
$(CAPPLET_CFLAGS) \
|
||||
-I$(top_srcdir)/ \
|
||||
-I$(top_srcdir)/intl
|
||||
|
||||
bin_PROGRAMS = rollback-capplet
|
||||
|
||||
rollback_capplet_SOURCES = \
|
||||
config-manager-dialog.c config-manager-dialog.h \
|
||||
rollback-widget.c rollback-widget.h \
|
||||
main.c
|
||||
|
||||
rollback_capplet_LDADD = \
|
||||
$(GNOME_LIBDIR) $(CAPPLET_LIBS)
|
468
capplets/rollback/config-manager-dialog.c
Normal file
468
capplets/rollback/config-manager-dialog.c
Normal file
|
@ -0,0 +1,468 @@
|
|||
/* -*- mode: c; style: linux -*- */
|
||||
|
||||
/* config-manager-dialog.c
|
||||
* Copyright (C) 2000-2001 Ximian, Inc.
|
||||
*
|
||||
* Written by Bradford Hovinen <hovinen@ximian.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <glade/glade.h>
|
||||
|
||||
#include "config-manager-dialog.h"
|
||||
#include "create-location-dialog.h"
|
||||
#include "archive.h"
|
||||
#include "location.h"
|
||||
#include "backend-list.h"
|
||||
#include "location-list.h"
|
||||
|
||||
#define WID(str) (glade_xml_get_widget (dialog->p->config_dialog_data, str))
|
||||
|
||||
enum {
|
||||
ARG_0,
|
||||
ARG_TYPE
|
||||
};
|
||||
|
||||
struct _ConfigManagerDialogPrivate
|
||||
{
|
||||
GladeXML *config_dialog_data;
|
||||
|
||||
CMDialogType type;
|
||||
|
||||
struct tm *date;
|
||||
gboolean rollback_all;
|
||||
gchar *backend_id;
|
||||
|
||||
Archive *archive;
|
||||
BackendList *backend_list;
|
||||
Location *current_location;
|
||||
};
|
||||
|
||||
static GnomeDialogClass *parent_class;
|
||||
|
||||
static void config_manager_dialog_init (ConfigManagerDialog *dialog);
|
||||
static void config_manager_dialog_class_init (ConfigManagerDialogClass *class);
|
||||
|
||||
static void config_manager_dialog_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
static void config_manager_dialog_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
static void config_manager_dialog_finalize (GtkObject *object);
|
||||
|
||||
static void ok_cb (GtkWidget *widget,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void apply_cb (GtkWidget *widget,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void cancel_cb (GtkWidget *widget,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void time_count_changed_cb (GtkSpinButton *button,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void rollback_all_toggled_cb (GtkToggleButton *button,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void rollback_one_toggled_cb (GtkToggleButton *button,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void backend_select_cb (GtkMenuItem *menu_item,
|
||||
ConfigManagerDialog *dialog);
|
||||
|
||||
static void do_rollback (ConfigManagerDialog *dialog,
|
||||
gboolean rollback_to_last);
|
||||
static void reset_time (ConfigManagerDialog *dialog,
|
||||
guint sub_days);
|
||||
static gint populate_backends_cb (BackendList *list,
|
||||
gchar *backend_id,
|
||||
ConfigManagerDialog *dialog);
|
||||
static void populate_backends_list (ConfigManagerDialog *dialog,
|
||||
BackendList *list);
|
||||
|
||||
static void set_backend_controls_sensitive (ConfigManagerDialog *dialog,
|
||||
gboolean s);
|
||||
|
||||
guint
|
||||
config_manager_dialog_get_type (void)
|
||||
{
|
||||
static guint config_manager_dialog_type = 0;
|
||||
|
||||
if (!config_manager_dialog_type) {
|
||||
GtkTypeInfo config_manager_dialog_info = {
|
||||
"ConfigManagerDialog",
|
||||
sizeof (ConfigManagerDialog),
|
||||
sizeof (ConfigManagerDialogClass),
|
||||
(GtkClassInitFunc) config_manager_dialog_class_init,
|
||||
(GtkObjectInitFunc) config_manager_dialog_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL
|
||||
};
|
||||
|
||||
config_manager_dialog_type =
|
||||
gtk_type_unique (gnome_dialog_get_type (),
|
||||
&config_manager_dialog_info);
|
||||
}
|
||||
|
||||
return config_manager_dialog_type;
|
||||
}
|
||||
|
||||
static void
|
||||
config_manager_dialog_init (ConfigManagerDialog *dialog)
|
||||
{
|
||||
static char *buttons[] = {
|
||||
GNOME_STOCK_BUTTON_OK,
|
||||
GNOME_STOCK_BUTTON_APPLY,
|
||||
GNOME_STOCK_BUTTON_CANCEL,
|
||||
NULL
|
||||
};
|
||||
|
||||
gnome_dialog_constructv (GNOME_DIALOG (dialog),
|
||||
_("Rollback and Location Management"),
|
||||
buttons);
|
||||
|
||||
dialog->p = g_new0 (ConfigManagerDialogPrivate, 1);
|
||||
dialog->p->config_dialog_data =
|
||||
glade_xml_new (GLADE_DIR "/rollback.glade",
|
||||
"config_dialog_data");
|
||||
|
||||
gtk_box_pack_start (GTK_BOX
|
||||
(GNOME_DIALOG (dialog)->vbox),
|
||||
WID ("config_dialog_data"), 0, TRUE, TRUE);
|
||||
|
||||
gtk_window_set_policy (GTK_WINDOW (dialog),
|
||||
TRUE, FALSE, TRUE);
|
||||
|
||||
gnome_dialog_button_connect (GNOME_DIALOG (dialog),
|
||||
0, GTK_SIGNAL_FUNC (ok_cb),
|
||||
dialog);
|
||||
gnome_dialog_button_connect (GNOME_DIALOG (dialog),
|
||||
1, GTK_SIGNAL_FUNC (apply_cb),
|
||||
dialog);
|
||||
gnome_dialog_button_connect (GNOME_DIALOG (dialog),
|
||||
2, GTK_SIGNAL_FUNC (cancel_cb),
|
||||
dialog);
|
||||
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"time_count_changed_cb",
|
||||
time_count_changed_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"rollback_all_toggled_cb",
|
||||
rollback_all_toggled_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"rollback_one_toggled_cb",
|
||||
rollback_one_toggled_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"create_cb",
|
||||
create_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"rename_cb",
|
||||
rename_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"destroy_cb",
|
||||
destroy_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"change_location_cb",
|
||||
change_location_cb,
|
||||
dialog);
|
||||
glade_xml_signal_connect_data (dialog->p->config_dialog_data,
|
||||
"edit_location_cb",
|
||||
edit_location_cb,
|
||||
dialog);
|
||||
|
||||
dialog->p->rollback_all = TRUE;
|
||||
dialog->p->date = g_new (struct tm, 1);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (dialog->p->location_list));
|
||||
gtk_container_add (GTK_CONTAINER (WID ("location_tree_location")),
|
||||
GTK_WIDGET (dialog->p->location_list));
|
||||
|
||||
set_backend_controls_sensitive (dialog, FALSE);
|
||||
reset_time (dialog, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
config_manager_dialog_class_init (ConfigManagerDialogClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
|
||||
gtk_object_add_arg_type ("ConfigManagerDialog::type",
|
||||
GTK_TYPE_INT,
|
||||
GTK_ARG_CONSTRUCT_ONLY | GTK_ARG_READWRITE,
|
||||
ARG_TYPE);
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (class);
|
||||
object_class->finalize = config_manager_dialog_finalize;
|
||||
object_class->set_arg = config_manager_dialog_set_arg;
|
||||
object_class->get_arg = config_manager_dialog_get_arg;
|
||||
|
||||
parent_class = GNOME_DIALOG_CLASS
|
||||
(gtk_type_class (gnome_dialog_get_type ()));
|
||||
}
|
||||
|
||||
static void
|
||||
config_manager_dialog_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
ConfigManagerDialog *dialog;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (object));
|
||||
|
||||
dialog = CONFIG_MANAGER_DIALOG (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_TYPE:
|
||||
dialog->p->type = GTK_VALUE_INT (*arg);
|
||||
|
||||
switch (dialog->p->type) {
|
||||
case CM_DIALOG_USER:
|
||||
dialog->p->archive = ARCHIVE (archive_load (FALSE));
|
||||
break;
|
||||
|
||||
case CM_DIALOG_GLOBAL:
|
||||
dialog->p->archive = ARCHIVE (archive_load (TRUE));
|
||||
break;
|
||||
}
|
||||
|
||||
dialog->p->backend_list =
|
||||
archive_get_backend_list (dialog->p->archive);
|
||||
dialog->p->current_location =
|
||||
archive_get_current_location (dialog->p->archive);
|
||||
populate_backends_list (dialog, dialog->p->user_list);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Bad argument set");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
config_manager_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
ConfigManagerDialog *dialog;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (object));
|
||||
|
||||
dialog = CONFIG_MANAGER_DIALOG (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_TYPE:
|
||||
GTK_VALUE_INT (*arg) = dialog->p->type;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Bad argument get");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
config_manager_dialog_finalize (GtkObject *object)
|
||||
{
|
||||
ConfigManagerDialog *dialog;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (object));
|
||||
|
||||
dialog = CONFIG_MANAGER_DIALOG (object);
|
||||
|
||||
if (dialog->p->date != NULL)
|
||||
g_free (dialog->p->date);
|
||||
|
||||
if (dialog->p->type == CM_DIALOG_USER_ONLY ||
|
||||
dialog->p->type == CM_DIALOG_BOTH)
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (dialog->p->current_user));
|
||||
gtk_object_unref (GTK_OBJECT (dialog->p->user_list));
|
||||
gtk_object_unref (GTK_OBJECT (dialog->p->user_archive));
|
||||
}
|
||||
|
||||
if (dialog->p->type == CM_DIALOG_GLOBAL_ONLY ||
|
||||
dialog->p->type == CM_DIALOG_BOTH)
|
||||
{
|
||||
gtk_object_unref (GTK_OBJECT (dialog->p->current_global));
|
||||
gtk_object_unref (GTK_OBJECT (dialog->p->global_list));
|
||||
gtk_object_unref (GTK_OBJECT (dialog->p->global_archive));
|
||||
}
|
||||
|
||||
g_free (dialog->p);
|
||||
|
||||
GTK_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
config_manager_dialog_new (CMDialogType type)
|
||||
{
|
||||
return gtk_widget_new (config_manager_dialog_get_type (),
|
||||
"type", type,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
ok_cb (GtkWidget *widget, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
do_rollback (dialog, FALSE);
|
||||
|
||||
gnome_dialog_close (GNOME_DIALOG (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
apply_cb (GtkWidget *widget, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
do_rollback (dialog, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
cancel_cb (GtkWidget *widget, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
do_rollback (dialog, TRUE);
|
||||
|
||||
gnome_dialog_close (GNOME_DIALOG (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
time_count_changed_cb (GtkSpinButton *button, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
reset_time (dialog, gtk_spin_button_get_value_as_int (button));
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_all_toggled_cb (GtkToggleButton *button, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
if (gtk_toggle_button_get_active (button)) {
|
||||
dialog->p->rollback_all = TRUE;
|
||||
set_backend_controls_sensitive (dialog, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_one_toggled_cb (GtkToggleButton *button, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
if (gtk_toggle_button_get_active (button)) {
|
||||
dialog->p->rollback_all = FALSE;
|
||||
set_backend_controls_sensitive (dialog, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
backend_select_cb (GtkMenuItem *menu_item, ConfigManagerDialog *dialog)
|
||||
{
|
||||
g_return_if_fail (dialog != NULL);
|
||||
g_return_if_fail (IS_CONFIG_MANAGER_DIALOG (dialog));
|
||||
|
||||
dialog->p->backend_id = gtk_object_get_data (GTK_OBJECT (menu_item),
|
||||
"backend-id");
|
||||
}
|
||||
|
||||
static void
|
||||
do_rollback (ConfigManagerDialog *dialog, gboolean rollback_to_last)
|
||||
{
|
||||
if (rollback_to_last) {
|
||||
if (dialog->p->rollback_all)
|
||||
location_rollback_all_to
|
||||
(dialog->p->current_location, NULL, TRUE);
|
||||
else
|
||||
location_rollback_backend_by
|
||||
(dialog->p->current_location, 0,
|
||||
dialog->p->backend_id, TRUE);
|
||||
} else {
|
||||
if (dialog->p->rollback_all)
|
||||
location_rollback_all_to
|
||||
(dialog->p->current_location,
|
||||
dialog->p->date, TRUE);
|
||||
else
|
||||
location_rollback_backend_to
|
||||
(dialog->p->current_location,
|
||||
dialog->p->date,
|
||||
dialog->p->backend_id, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reset_time (ConfigManagerDialog *dialog, guint sub_days)
|
||||
{
|
||||
time_t current_time;
|
||||
|
||||
time (¤t_time);
|
||||
current_time -= sub_days * 24 * 60 * 60;
|
||||
localtime_r (¤t_time, dialog->p->date);
|
||||
}
|
||||
|
||||
static gint
|
||||
populate_backends_cb (BackendList *list, gchar *backend_id,
|
||||
ConfigManagerDialog *dialog)
|
||||
{
|
||||
GtkWidget *menu_item;
|
||||
GtkWidget *menu;
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label (backend_id);
|
||||
gtk_widget_show (menu_item);
|
||||
gtk_object_set_data (GTK_OBJECT (menu_item),
|
||||
"backend-id", backend_id);
|
||||
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
|
||||
GTK_SIGNAL_FUNC (backend_select_cb), dialog);
|
||||
|
||||
menu = gtk_option_menu_get_menu
|
||||
(GTK_OPTION_MENU (WID ("backend_select")));
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
populate_backends_list (ConfigManagerDialog *dialog, BackendList *list)
|
||||
{
|
||||
backend_list_foreach (list, (BackendCB) populate_backends_cb, dialog);
|
||||
|
||||
gtk_option_menu_set_history
|
||||
(GTK_OPTION_MENU (WID ("backend_select")), 0);
|
||||
}
|
||||
|
||||
static void
|
||||
set_backend_controls_sensitive (ConfigManagerDialog *dialog, gboolean s)
|
||||
{
|
||||
gtk_widget_set_sensitive (WID ("backend_select"), s);
|
||||
}
|
64
capplets/rollback/config-manager-dialog.h
Normal file
64
capplets/rollback/config-manager-dialog.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
/* -*- mode: c; style: linux -*- */
|
||||
|
||||
/* config-manager-dialog.h
|
||||
* Copyright (C) 2000-2001 Ximian, Inc.
|
||||
*
|
||||
* Written by Bradford Hovinen <hovinen@ximian.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_MANAGER_DIALOG_H
|
||||
#define __CONFIG_MANAGER_DIALOG_H
|
||||
|
||||
#include <gnome.h>
|
||||
#include <capplet-widget.h>
|
||||
|
||||
BEGIN_GNOME_DECLS
|
||||
|
||||
#define CONFIG_MANAGER_DIALOG(obj) GTK_CHECK_CAST (obj, config_manager_dialog_get_type (), ConfigManagerDialog)
|
||||
#define CONFIG_MANAGER_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, config_manager_dialog_get_type (), ConfigManagerDialogClass)
|
||||
#define IS_CONFIG_MANAGER_DIALOG(obj) GTK_CHECK_TYPE (obj, config_manager_dialog_get_type ())
|
||||
|
||||
typedef struct _ConfigManagerDialog ConfigManagerDialog;
|
||||
typedef struct _ConfigManagerDialogClass ConfigManagerDialogClass;
|
||||
typedef struct _ConfigManagerDialogPrivate ConfigManagerDialogPrivate;
|
||||
|
||||
typedef enum _CMDialogType CMDialogType;
|
||||
|
||||
struct _ConfigManagerDialog
|
||||
{
|
||||
CappletWidget parent;
|
||||
|
||||
ConfigManagerDialogPrivate *p;
|
||||
};
|
||||
|
||||
struct _ConfigManagerDialogClass
|
||||
{
|
||||
CappletWidgetClass gnome_dialog_class;
|
||||
};
|
||||
|
||||
enum _CMDialogType {
|
||||
CM_DIALOG_USER, CM_DIALOG_GLOBAL
|
||||
};
|
||||
|
||||
guint config_manager_dialog_get_type (void);
|
||||
|
||||
GtkWidget *config_manager_dialog_new (CMDialogType type);
|
||||
|
||||
END_GNOME_DECLS
|
||||
|
||||
#endif /* __CONFIG_MANAGER_DIALOG_H */
|
53
capplets/rollback/main.c
Normal file
53
capplets/rollback/main.c
Normal file
|
@ -0,0 +1,53 @@
|
|||
/* -*- mode: c; style: linux -*- */
|
||||
|
||||
/* config-manager.c
|
||||
* Copyright (C) 2000-2001 Ximian, Inc.
|
||||
*
|
||||
* Written by Bradford Hovinen <hovinen@ximian.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gnome.h>
|
||||
#include <glade/glade.h>
|
||||
|
||||
#include "config-manager-dialog.h"
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
gnome_init ("config-manager", VERSION, argc, argv);
|
||||
glade_gnome_init ();
|
||||
|
||||
dialog = config_manager_dialog_new (CM_DIALOG_USER_ONLY);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
|
||||
gtk_main_quit, NULL);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
167
capplets/rollback/rollback-widget.c
Normal file
167
capplets/rollback/rollback-widget.c
Normal file
|
@ -0,0 +1,167 @@
|
|||
/* -*- mode: c; style: linux -*- */
|
||||
|
||||
/* rollback-widget.c
|
||||
* Copyright (C) 2000-2001 Ximian, Inc.
|
||||
*
|
||||
* Written by Bradford Hovinen <hovinen@ximian.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBARCHIVER
|
||||
|
||||
#include "rollback-widget.h"
|
||||
|
||||
enum {
|
||||
ARG_0,
|
||||
ARG_SAMPLE
|
||||
};
|
||||
|
||||
struct _RollbackWidgetPrivate
|
||||
{
|
||||
/* Private data members */
|
||||
};
|
||||
|
||||
static GtkWidgetClass *parent_class;
|
||||
|
||||
static void rollback_widget_init (RollbackWidget *rollback_widget);
|
||||
static void rollback_widget_class_init (RollbackWidgetClass *class);
|
||||
|
||||
static void rollback_widget_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
static void rollback_widget_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
static void rollback_widget_finalize (GtkObject *object);
|
||||
|
||||
guint
|
||||
rollback_widget_get_type (void)
|
||||
{
|
||||
static guint rollback_widget_type = 0;
|
||||
|
||||
if (!rollback_widget_type) {
|
||||
GtkTypeInfo rollback_widget_info = {
|
||||
"RollbackWidget",
|
||||
sizeof (RollbackWidget),
|
||||
sizeof (RollbackWidgetClass),
|
||||
(GtkClassInitFunc) rollback_widget_class_init,
|
||||
(GtkObjectInitFunc) rollback_widget_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL
|
||||
};
|
||||
|
||||
rollback_widget_type =
|
||||
gtk_type_unique (gtk_widget_get_type (),
|
||||
&rollback_widget_info);
|
||||
}
|
||||
|
||||
return rollback_widget_type;
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_widget_init (RollbackWidget *rollback_widget)
|
||||
{
|
||||
rollback_widget->p = g_new0 (RollbackWidgetPrivate, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_widget_class_init (RollbackWidgetClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
|
||||
gtk_object_add_arg_type ("RollbackWidget::sample",
|
||||
GTK_TYPE_POINTER,
|
||||
GTK_ARG_READWRITE,
|
||||
ARG_SAMPLE);
|
||||
|
||||
object_class = GTK_OBJECT_CLASS (class);
|
||||
object_class->finalize = rollback_widget_finalize;
|
||||
object_class->set_arg = rollback_widget_set_arg;
|
||||
object_class->get_arg = rollback_widget_get_arg;
|
||||
|
||||
parent_class = GTK_WIDGET_CLASS
|
||||
(gtk_type_class (gtk_widget_get_type ()));
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_widget_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
RollbackWidget *rollback_widget;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (IS_ROLLBACK_WIDGET (object));
|
||||
|
||||
rollback_widget = ROLLBACK_WIDGET (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_SAMPLE:
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Bad argument set");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_widget_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
RollbackWidget *rollback_widget;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (IS_ROLLBACK_WIDGET (object));
|
||||
|
||||
rollback_widget = ROLLBACK_WIDGET (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_SAMPLE:
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Bad argument get");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
rollback_widget_finalize (GtkObject *object)
|
||||
{
|
||||
RollbackWidget *rollback_widget;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (IS_ROLLBACK_WIDGET (object));
|
||||
|
||||
rollback_widget = ROLLBACK_WIDGET (object);
|
||||
|
||||
g_free (rollback_widget->p);
|
||||
|
||||
GTK_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
GtkObject *
|
||||
rollback_widget_new (void)
|
||||
{
|
||||
return gtk_object_new (rollback_widget_get_type (),
|
||||
NULL);
|
||||
}
|
||||
|
||||
#endif HAVE_LIBARCHIVER
|
61
capplets/rollback/rollback-widget.h
Normal file
61
capplets/rollback/rollback-widget.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/* -*- mode: c; style: linux -*- */
|
||||
|
||||
/* rollback-widget.h
|
||||
* Copyright (C) 2000-2001 Ximian, Inc.
|
||||
*
|
||||
* Written by Bradford Hovinen <hovinen@ximian.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __ROLLBACK_WIDGET_H
|
||||
#define __ROLLBACK_WIDGET_H
|
||||
|
||||
#ifdef HAVE_LIBARCHIVER
|
||||
|
||||
#include <gnome.h>
|
||||
|
||||
BEGIN_GNOME_DECLS
|
||||
|
||||
#define ROLLBACK_WIDGET(obj) GTK_CHECK_CAST (obj, rollback_widget_get_type (), RollbackWidget)
|
||||
#define ROLLBACK_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, rollback_widget_get_type (), RollbackWidgetClass)
|
||||
#define IS_ROLLBACK_WIDGET(obj) GTK_CHECK_TYPE (obj, rollback_widget_get_type ())
|
||||
|
||||
typedef struct _RollbackWidget RollbackWidget;
|
||||
typedef struct _RollbackWidgetClass RollbackWidgetClass;
|
||||
typedef struct _RollbackWidgetPrivate RollbackWidgetPrivate;
|
||||
|
||||
struct _RollbackWidget
|
||||
{
|
||||
GtkWidget parent;
|
||||
|
||||
RollbackWidgetPrivate *p;
|
||||
};
|
||||
|
||||
struct _RollbackWidgetClass
|
||||
{
|
||||
GtkWidgetClass gtk_widget_class;
|
||||
};
|
||||
|
||||
guint rollback_widget_get_type (void);
|
||||
|
||||
GtkObject *rollback_widget_new (void);
|
||||
|
||||
END_GNOME_DECLS
|
||||
|
||||
#endif /* HAVE_LIBARCHIVER */
|
||||
|
||||
#endif /* __ROLLBACK_WIDGET_H */
|
776
capplets/rollback/rollback.glade
Normal file
776
capplets/rollback/rollback.glade
Normal file
|
@ -0,0 +1,776 @@
|
|||
<?xml version="1.0"?>
|
||||
<GTK-Interface>
|
||||
|
||||
<project>
|
||||
<name>Rollback-location-management</name>
|
||||
<program_name>rollback-location-management</program_name>
|
||||
<directory></directory>
|
||||
<source_directory>src</source_directory>
|
||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||
<language>C</language>
|
||||
<gnome_support>True</gnome_support>
|
||||
<gettext_support>True</gettext_support>
|
||||
</project>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>rollback_location_dialog</name>
|
||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>False</allow_shrink>
|
||||
<allow_grow>True</allow_grow>
|
||||
<auto_shrink>False</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>False</hide_on_close>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area1</name>
|
||||
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button1</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button2</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button3</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkNotebook</class>
|
||||
<name>notebook1</name>
|
||||
<can_focus>True</can_focus>
|
||||
<show_tabs>True</show_tabs>
|
||||
<show_border>True</show_border>
|
||||
<tab_pos>GTK_POS_TOP</tab_pos>
|
||||
<scrollable>False</scrollable>
|
||||
<tab_hborder>2</tab_hborder>
|
||||
<tab_vborder>2</tab_vborder>
|
||||
<popup_enable>False</popup_enable>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table1</name>
|
||||
<border_width>5</border_width>
|
||||
<rows>4</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>5</row_spacing>
|
||||
<column_spacing>5</column_spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>rollback_all_toggle</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>rollback_all_toggled_cb</handler>
|
||||
<last_modification_time>Tue, 19 Dec 2000 20:58:48 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Restore all tools</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>restore_type</group>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button4</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>View Logs...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button5</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>Advanced...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>3</top_attach>
|
||||
<bottom_attach>4</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox2</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>2</top_attach>
|
||||
<bottom_attach>3</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>rollback_one_toggle</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>rollback_one_toggled_cb</handler>
|
||||
<last_modification_time>Tue, 19 Dec 2000 20:58:59 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Restore only</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>restore_type</group>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>backend_select</name>
|
||||
<can_focus>True</can_focus>
|
||||
<items></items>
|
||||
<initial_choice>0</initial_choice>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>5</spacing>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label3</name>
|
||||
<label>Restore configuration from</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkSpinButton</class>
|
||||
<name>time_count</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>changed</name>
|
||||
<handler>time_count_changed_cb</handler>
|
||||
<last_modification_time>Tue, 19 Dec 2000 20:15:27 GMT</last_modification_time>
|
||||
</signal>
|
||||
<climb_rate>1</climb_rate>
|
||||
<digits>0</digits>
|
||||
<numeric>False</numeric>
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>0</lower>
|
||||
<upper>1000</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
<page_size>10</page_size>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label4</name>
|
||||
<label>days ago</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<child_name>Notebook:tab</child_name>
|
||||
<name>label1</name>
|
||||
<label>Configuration Restoration</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>location_tree_box</name>
|
||||
<border_width>5</border_width>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>5</spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<name>vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>5</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>create_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>clicked</name>
|
||||
<handler>create_cb</handler>
|
||||
<last_modification_time>Wed, 20 Dec 2000 23:51:41 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Create...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>destroy_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>clicked</name>
|
||||
<handler>destroy_cb</handler>
|
||||
<last_modification_time>Wed, 20 Dec 2000 23:51:56 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Destroy...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>rename_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>clicked</name>
|
||||
<handler>rename_cb</handler>
|
||||
<last_modification_time>Wed, 20 Dec 2000 23:52:13 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Rename...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHSeparator</class>
|
||||
<name>hseparator1</name>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>change_location_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>clicked</name>
|
||||
<handler>change_location_cb</handler>
|
||||
<last_modification_time>Wed, 20 Dec 2000 23:52:33 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Change to this Location</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>edit_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>clicked</name>
|
||||
<handler>edit_location_cb</handler>
|
||||
<last_modification_time>Wed, 20 Dec 2000 23:52:51 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Edit this Location</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkScrolledWindow</class>
|
||||
<name>location_tree_location</name>
|
||||
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
|
||||
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
|
||||
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
|
||||
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>Placeholder</class>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<child_name>Notebook:tab</child_name>
|
||||
<name>label2</name>
|
||||
<label>Location Management</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>rollback_dialog</name>
|
||||
<title>Restore old configuration</title>
|
||||
<type>GTK_WINDOW_TOPLEVEL</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>False</allow_shrink>
|
||||
<allow_grow>False</allow_grow>
|
||||
<auto_shrink>False</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>False</hide_on_close>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox3</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area3</name>
|
||||
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button14</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button15</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>button16</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<name>config_dialog_data</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>5</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox4</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>5</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label10</name>
|
||||
<label>Restore configuration from</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkSpinButton</class>
|
||||
<name>spinbutton1</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>changed</name>
|
||||
<handler>time_count_changed_cb</handler>
|
||||
<last_modification_time>Tue, 19 Dec 2000 20:15:27 GMT</last_modification_time>
|
||||
</signal>
|
||||
<climb_rate>1</climb_rate>
|
||||
<digits>0</digits>
|
||||
<numeric>False</numeric>
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>0</lower>
|
||||
<upper>1000</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
<page_size>10</page_size>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label11</name>
|
||||
<label>days ago</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table2</name>
|
||||
<rows>2</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>5</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>rollback_all_toggle</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>rollback_all_toggled_cb</handler>
|
||||
<last_modification_time>Tue, 19 Dec 2000 20:58:48 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Restore all tools</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>restore_type</group>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>rollback_one_toggle</name>
|
||||
<can_focus>True</can_focus>
|
||||
<signal>
|
||||
<name>toggled</name>
|
||||
<handler>rollback_one_toggled_cb</handler>
|
||||
<last_modification_time>Tue, 19 Dec 2000 20:58:59 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Restore only</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>restore_type</group>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkOptionMenu</class>
|
||||
<name>background_select</name>
|
||||
<can_focus>True</can_focus>
|
||||
<items></items>
|
||||
<initial_choice>0</initial_choice>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>True</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHBox</class>
|
||||
<name>hbox6</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>5</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>view_logs_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>View Logs...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>advanced_button</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>Advanced...</label>
|
||||
<relief>GTK_RELIEF_NORMAL</relief>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
</GTK-Interface>
|
Loading…
Add table
Add a link
Reference in a new issue