diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/calendar-setup.glade | 920 | ||||
-rw-r--r-- | calendar/gui/dialogs/meeting-page.etspec | 21 | ||||
-rw-r--r-- | calendar/gui/dialogs/new-calendar.glade | 239 | ||||
-rw-r--r-- | calendar/gui/dialogs/new-task-list.glade | 193 | ||||
-rw-r--r-- | calendar/gui/dialogs/url-editor-dialog.c | 394 | ||||
-rw-r--r-- | calendar/gui/dialogs/url-editor-dialog.glade | 551 | ||||
-rw-r--r-- | calendar/gui/dialogs/url-editor-dialog.h | 69 | ||||
-rw-r--r-- | calendar/gui/e-pub-utils.c | 361 | ||||
-rw-r--r-- | calendar/gui/e-pub-utils.h | 62 | ||||
-rw-r--r-- | calendar/gui/gnome-calendar-conduit.png | bin | 3000 -> 0 bytes |
10 files changed, 0 insertions, 2810 deletions
diff --git a/calendar/gui/dialogs/calendar-setup.glade b/calendar/gui/dialogs/calendar-setup.glade deleted file mode 100644 index 75631fe1fc..0000000000 --- a/calendar/gui/dialogs/calendar-setup.glade +++ /dev/null @@ -1,920 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> -<requires lib="gnome"/> - -<widget class="GtkWindow" id="add-calendar-window"> - <property name="title" translatable="yes">Add Calendar</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="default_width">320</property> - <property name="default_height">240</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkTable" id="settings-table"> - <property name="visible">True</property> - <property name="n_rows">5</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkEntry" id="name-entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="uri-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_URL:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="refresh-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Refresh:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="refresh-hbox"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkSpinButton" id="refresh-spin"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">30 0 100 1 10 10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="refresh-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu3"> - - <child> - <widget class="GtkMenuItem" id="minutes1"> - <property name="visible">True</property> - <property name="label" translatable="yes">minutes</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_minutes1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="hours1"> - <property name="visible">True</property> - <property name="label" translatable="yes">hours</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_hours1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="days1"> - <property name="visible">True</property> - <property name="label" translatable="yes">days</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_days1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="weeks1"> - <property name="visible">True</property> - <property name="label" translatable="yes">weeks</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_weeks1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label35"> - <property name="visible">True</property> - <property name="label" translatable="yes">C_olor:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">source-color</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="uri-hbox"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkEntry" id="uri-entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="group-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - - <child> - <widget class="GtkMenu" id="menu1"> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="group-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Type:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">group-optionmenu</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="name-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Name:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">name-entry</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkColorButton" id="source-color"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="use_alpha">False</property> - <property name="title" translatable="yes">Pick a color</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHButtonBox" id="hbuttonbox1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <property name="spacing">10</property> - - <child> - <widget class="GtkButton" id="cancel-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="add-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="stock">gtk-add</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Add Calendar</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> -</widget> - -<widget class="GtkWindow" id="add-task-list-window"> - <property name="title" translatable="yes">Add Task List</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="default_width">320</property> - <property name="default_height">240</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - - <child> - <widget class="GtkVBox" id="vbox87"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkTable" id="settings-table"> - <property name="visible">True</property> - <property name="n_rows">5</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkEntry" id="name-entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="uri-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_URL:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="refresh-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Refresh:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label593"> - <property name="visible">True</property> - <property name="label" translatable="yes">C_olor:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">source-color</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkColorButton" id="source-color"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="use_alpha">False</property> - <property name="title" translatable="yes">Pick a color</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="uri-hbox"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkEntry" id="uri-entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="group-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - - <child> - <widget class="GtkMenu" id="menu5"> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label594"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Type:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">group-optionmenu</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label595"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Name:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">name-entry</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkAlignment" id="refresh-hbox"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox130"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkSpinButton" id="refresh-spin"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">30 0 100 1 10 10</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="refresh-optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child> - <widget class="GtkMenu" id="menu6"> - - <child> - <widget class="GtkMenuItem" id="menuitem7"> - <property name="visible">True</property> - <property name="label" translatable="yes">minutes</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_minutes1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem8"> - <property name="visible">True</property> - <property name="label" translatable="yes">hours</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_hours1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem9"> - <property name="visible">True</property> - <property name="label" translatable="yes">days</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_days1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="menuitem10"> - <property name="visible">True</property> - <property name="label" translatable="yes">weeks</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_weeks1_activate" last_modification_time="Tue, 17 Feb 2004 17:39:35 GMT"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHButtonBox" id="hbuttonbox22"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <property name="spacing">10</property> - - <child> - <widget class="GtkButton" id="cancel-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="add-button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - - <child> - <widget class="GtkAlignment" id="alignment48"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox129"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image12"> - <property name="visible">True</property> - <property name="stock">gtk-add</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="add-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Add Task List</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/calendar/gui/dialogs/meeting-page.etspec b/calendar/gui/dialogs/meeting-page.etspec deleted file mode 100644 index a52c874cd2..0000000000 --- a/calendar/gui/dialogs/meeting-page.etspec +++ /dev/null @@ -1,21 +0,0 @@ -<ETableSpecification click-to-add="true" click-to-add-end="true" _click-to-add-message="Click here to add an attendee" draw-grid="true"> - <ETableColumn model_col= "0" _title="Attendee" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="collate"/> - <ETableColumn model_col= "1" _title="Member" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="collate"/> - <ETableColumn model_col= "2" _title="Type" expansion="1.0" minimum_width="10" resizable="true" cell="typeedit" compare="collate"/> - <ETableColumn model_col= "3" _title="Role" expansion="1.0" minimum_width="10" resizable="true" cell="roleedit" compare="collate"/> - <ETableColumn model_col= "4" _title="RSVP" expansion="1.0" minimum_width="10" resizable="true" cell="rsvpedit" compare="collate"/> - <ETableColumn model_col= "5" _title="Delegated To" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="collate"/> - <ETableColumn model_col= "6" _title="Delegated From" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="collate"/> - <ETableColumn model_col= "7" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="statusedit" compare="collate"/> - <ETableColumn model_col= "8" _title="Common Name" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="collate"/> - <ETableColumn model_col= "9" _title="Language" expansion="2.0" minimum_width="10" resizable="true" cell="string" compare="collate"/> - - <ETableState> - <column source="0"/> - <column source="2"/> - <column source="3"/> - <column source="4"/> - <column source="7"/> - <grouping></grouping> - </ETableState> -</ETableSpecification> diff --git a/calendar/gui/dialogs/new-calendar.glade b/calendar/gui/dialogs/new-calendar.glade deleted file mode 100644 index 264d115d06..0000000000 --- a/calendar/gui/dialogs/new-calendar.glade +++ /dev/null @@ -1,239 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> - -<widget class="GtkDialog" id="new-calendar-dialog"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="title" translatable="yes">Add New Calendar</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_CENTER</property> - <property name="modal">False</property> - <property name="resizable">False</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancelbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="okbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-5</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Calendar Group</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="calendar-group"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="calendar-name"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_padding">6</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Calendar options</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_padding">6</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Calendar Name</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="calendar-source-label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Calendar Location</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="calendar-location"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_padding">6</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">4</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/calendar/gui/dialogs/new-task-list.glade b/calendar/gui/dialogs/new-task-list.glade deleted file mode 100644 index c827868a6d..0000000000 --- a/calendar/gui/dialogs/new-task-list.glade +++ /dev/null @@ -1,193 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> -<requires lib="gnome"/> - -<widget class="GtkDialog" id="new-task-list-dialog"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="title" translatable="yes">Add New Task List</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_CENTER</property> - <property name="modal">False</property> - <property name="resizable">False</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">True</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancelbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="okbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-5</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">3</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> - - <child> - <widget class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Task List Group</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="task-list-group"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="task-list-name"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_padding">6</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Task List Options</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_padding">6</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Task List Name</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_padding">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">4</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/calendar/gui/dialogs/url-editor-dialog.c b/calendar/gui/dialogs/url-editor-dialog.c deleted file mode 100644 index 32f78a5a3f..0000000000 --- a/calendar/gui/dialogs/url-editor-dialog.c +++ /dev/null @@ -1,394 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Gary Ekker <gekker@novell.com> - * - * Copyright 2004 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -/* - * UrlEditorDialog - a GtkObject which handles a libglade-loaded dialog - * to edit the calendar preference settings. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - - -#include "cal-prefs-dialog.h" -#include "url-editor-dialog.h" - -#include <gtk/gtk.h> -#include <gtk/gtksignal.h> -#include <gtk/gtkoptionmenu.h> -#include <gtk/gtktogglebutton.h> -#include <libgnomeui/gnome-color-picker.h> -#include <libedataserverui/e-passwords.h> -#include <glade/glade.h> -#include <e-util/e-dialog-widgets.h> -#include <e-util/e-icon-factory.h> -#include <e-util/e-util-private.h> -#include <misc/e-dateedit.h> -#include <stdlib.h> -#include <string.h> - -static gboolean get_widgets (UrlDialogData *data); -static void init_widgets (UrlDialogData *data); - -static void url_editor_dialog_fb_url_changed (GtkEntry *url_entry, void *data); -static void url_editor_dialog_fb_daily_toggled (GtkWidget *button, void *data); -static void url_editor_dialog_fb_url_activated (GtkEntry *url_entry, void *data); -static void url_editor_dialog_fb_ok_enable (GtkWidget *widget, void *data); - -/** - * url_editor_dialog_new: - * - * Creates a new #UrlEditorDialog. - * - * Return value: a new #UrlEditorDialog. - **/ -gboolean -url_editor_dialog_new (DialogData *dialog_data, EPublishUri *uri) -{ - int b; - char *gladefile; - UrlDialogData *url_dlg_data = g_new0 (UrlDialogData, 1); - - gladefile = g_build_filename (EVOLUTION_GLADEDIR, - "url-editor-dialog.glade", - NULL); - url_dlg_data->xml = glade_xml_new (gladefile, NULL, NULL); - g_free (gladefile); - - if (!url_dlg_data->xml) { - g_message ("url_editor_dialog_construct(): Could not load the Glade XML file!"); - return FALSE; - } - - if (!get_widgets (url_dlg_data)) { - g_message ("url_editor_dialog_construct(): Could not find all widgets in the XML file!"); - return FALSE; - } - - url_dlg_data->url_dialog = (GtkWidget *) dialog_data; - url_dlg_data->url_data = uri; - - init_widgets (url_dlg_data); - - if (uri->location && uri->username) { - if (strlen(uri->location) != 0) { - gtk_entry_set_text (url_dlg_data->url_entry, - uri->location); - } - if (strlen(uri->username) != 0) { - gtk_entry_set_text (url_dlg_data->username_entry, - uri->username); - } - } - - uri->password = e_passwords_get_password ("Calendar", url_dlg_data->url_data->location); - - if (uri->password) { - if (strlen(uri->password) != 0) { - gtk_entry_set_text (url_dlg_data->password_entry, - uri->password); - - e_dialog_toggle_set (url_dlg_data->remember_pw, TRUE); - } else { - e_dialog_toggle_set (url_dlg_data->remember_pw, FALSE); - } - } - - switch (uri->publish_freq) { - case URI_PUBLISH_DAILY: - e_dialog_radio_set (url_dlg_data->daily, - URI_PUBLISH_DAILY, - pub_frequency_type_map); - break; - case URI_PUBLISH_WEEKLY: - e_dialog_radio_set (url_dlg_data->daily, - URI_PUBLISH_WEEKLY, - pub_frequency_type_map); - break; - case URI_PUBLISH_USER: - default: - e_dialog_radio_set (url_dlg_data->daily, - URI_PUBLISH_USER, - pub_frequency_type_map); - } - - dialog_data->url_editor=TRUE; - dialog_data->url_editor_dlg = (GtkWidget *) url_dlg_data; - gtk_widget_set_sensitive ((GtkWidget *) url_dlg_data->ok, FALSE); - - b = gtk_dialog_run ((GtkDialog *) url_dlg_data->url_editor); - - if (b == GTK_RESPONSE_OK) { - if ((GtkEntry *) url_dlg_data->url_entry) { - url_editor_dialog_fb_url_activated (url_dlg_data->url_entry, url_dlg_data); - url_dlg_data->url_data->username = g_strdup (gtk_entry_get_text ((GtkEntry *) url_dlg_data->username_entry)); - url_dlg_data->url_data->password = g_strdup (gtk_entry_get_text ((GtkEntry *) url_dlg_data->password_entry)); - if (e_dialog_toggle_get (url_dlg_data->remember_pw)) { - e_passwords_add_password (url_dlg_data->url_data->location, url_dlg_data->url_data->password); - e_passwords_remember_password ("Calendar", url_dlg_data->url_data->location); - } else { - e_passwords_forget_password ("Calendar", url_dlg_data->url_data->location); - } - } - } - - gtk_widget_destroy (url_dlg_data->url_editor); - g_object_unref (url_dlg_data->xml); - g_free (url_dlg_data); - url_dlg_data = NULL; - - return FALSE; -} - -static gboolean -get_widgets (UrlDialogData *data) -{ -#define GW(name) glade_xml_get_widget (data->xml, name) - - data->url_editor = GW ("url_editor"); - data->calendar_list_label = GW ("calendar_list_label"); - data->url_dialog = GW ("fb_dialog"); - data->url_entry = GTK_ENTRY (GW ("url_entry")); - data->daily = GW ("daily"); - data->weekly = GW ("weekly"); - data->user_publish = GW ("user_publish"); - data->scrolled_window = GW ("scrolled_window"); - data->username_entry = GTK_ENTRY (GW ("username_entry")); - data->password_entry = GTK_ENTRY (GW ("password_entry")); - data->remember_pw = GW ("remember_pw"); - data->cancel = GW ("cancel"); - data->ok = GW ("ok"); - -#undef GW - - return (data ->url_editor - && data->calendar_list_label - && data->url_entry - && data->daily - && data->weekly - && data->user_publish - && data->scrolled_window - && data->username_entry - && data->password_entry - && data->remember_pw - && data->cancel - && data->ok); -} - -static void -selection_changed_callback (ESourceSelector *selector, - void *data) -{ - UrlDialogData *url_dlg_data = (UrlDialogData *) data; - GSList *selection = e_source_selector_get_selection (selector); - - if (selection != NULL) { - GSList *p, *l = NULL; - - for (p = selection; p != NULL; p = p->next) { - ESource *source = E_SOURCE(p->data); - gchar* source_uid = g_strdup(e_source_peek_uid(source)); - - l = g_slist_append (l, source_uid); - } - url_dlg_data->url_data->calendars = l; - } - - e_source_selector_free_selection (selection); - gtk_widget_set_sensitive ((GtkWidget *) url_dlg_data->ok, TRUE); -} - -/* Connects any necessary signal handlers. */ -static void -init_widgets (UrlDialogData *url_dlg_data) -{ - GtkWidget *selector; - ESourceList *source_list; - GConfClient *gconf_client; - GList *icon_list; - GSList *p; - - gtk_widget_ensure_style (url_dlg_data->url_editor); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (url_dlg_data->url_editor)->vbox), 0); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (url_dlg_data->url_editor)->action_area), 12); - - g_signal_connect (url_dlg_data->url_entry, "changed", - G_CALLBACK (url_editor_dialog_fb_url_changed), - url_dlg_data); - - g_signal_connect (url_dlg_data->username_entry, "changed", - G_CALLBACK (url_editor_dialog_fb_ok_enable), - url_dlg_data); - - g_signal_connect (url_dlg_data->password_entry, "changed", - G_CALLBACK (url_editor_dialog_fb_ok_enable), - url_dlg_data); - - g_signal_connect (url_dlg_data->remember_pw, "toggled", - G_CALLBACK (url_editor_dialog_fb_ok_enable), - url_dlg_data); - - g_signal_connect (url_dlg_data->url_entry, "activate", - G_CALLBACK (url_editor_dialog_fb_url_activated), - url_dlg_data); - - g_signal_connect (url_dlg_data->daily, "toggled", - G_CALLBACK (url_editor_dialog_fb_daily_toggled), - url_dlg_data); - - g_signal_connect (url_dlg_data->weekly, "toggled", - G_CALLBACK (url_editor_dialog_fb_daily_toggled), - url_dlg_data); - - g_signal_connect (url_dlg_data->user_publish, "toggled", - G_CALLBACK (url_editor_dialog_fb_daily_toggled), - url_dlg_data); - - - if (url_dlg_data->url_data->calendars) { - ESource *source; - - gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/calendar/sources"); - selector = e_source_selector_new (source_list); - - p = url_dlg_data->url_data->calendars; - for (; p != NULL; p = p->next) { - gchar *source_uid; - - source_uid = g_strdup (p->data); - source = e_source_list_peek_source_by_uid (source_list, source_uid); - e_source_selector_select_source ((ESourceSelector *)selector, source); - g_free (source_uid); - } - } else { - gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/calendar/sources"); - selector = e_source_selector_new (source_list); - } - e_source_selector_show_selection ((ESourceSelector *) selector, TRUE); - g_signal_connect (selector, "selection_changed", - G_CALLBACK (selection_changed_callback), - url_dlg_data); - - gtk_label_set_mnemonic_widget (GTK_LABEL (url_dlg_data->calendar_list_label), - selector); - gtk_widget_show (selector); - gtk_container_add (GTK_CONTAINER (url_dlg_data->scrolled_window), - selector); - - icon_list = e_icon_factory_get_icon_list ("stock_calendar"); - if (icon_list) { - gtk_window_set_icon_list (GTK_WINDOW (url_dlg_data->url_editor), icon_list); - g_list_foreach (icon_list, (GFunc) g_object_unref, NULL); - g_list_free (icon_list); - } - - gtk_widget_show (url_dlg_data->scrolled_window); - - g_object_unref (gconf_client); -} - -static void -url_editor_dialog_fb_daily_toggled (GtkWidget *button, - void *data) -{ - UrlDialogData *url_dlg_data = (UrlDialogData *) data; - enum publish_frequency frequency; - - frequency = e_dialog_radio_get (url_dlg_data->daily, - pub_frequency_type_map); - url_dlg_data->url_data->publish_freq = frequency; - gtk_widget_set_sensitive ((GtkWidget *) url_dlg_data->ok, TRUE); -} - -static gboolean -is_valid_url (const gchar *url) -{ - const gchar *p = url; - - if (strlen (url) == 0) { - return FALSE; - } - while (*p) { - if ((*p == '\\') || (*p == ' ')) { - return FALSE; - } - p++; - } - return TRUE; -} - -static void -url_editor_dialog_fb_url_activated (GtkEntry *url_entry, void *data) -{ - UrlDialogData *url_dlg_data = (UrlDialogData *) data; - - url_dlg_data->url_data->location = g_strdup (gtk_entry_get_text ((GtkEntry *) url_entry)); -} - -static void -url_editor_dialog_fb_url_changed (GtkEntry *url_entry, void *data) -{ - UrlDialogData *url_dlg_data = (UrlDialogData *) data; - DialogData *url_dialog = (DialogData *) url_dlg_data->url_dialog; - - const gchar *entry_contents; - GtkListStore *model; - GtkTreeIter iter; - gboolean valid; - - model = (GtkListStore *) gtk_tree_view_get_model (url_dialog->url_list); - - entry_contents = gtk_entry_get_text ((GtkEntry *) url_entry); - if (!is_valid_url (entry_contents)) { - gtk_widget_set_sensitive ((GtkWidget *) url_dlg_data->ok, FALSE); - return; - } - /* duplicate check */ - valid = gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter); - while (valid) { - gchar *url_name; - gtk_tree_model_get ((GtkTreeModel *) model, &iter, - URL_LIST_LOCATION_COLUMN, &url_name, - -1); - - if (!g_ascii_strcasecmp (url_name, entry_contents)) { - gtk_widget_set_sensitive ((GtkWidget *) url_dlg_data->ok, FALSE); - return; - } - valid = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter); - } - /* valid and unique */ - gtk_widget_set_sensitive (GTK_WIDGET (url_dlg_data->ok), TRUE); - gtk_widget_grab_default (GTK_WIDGET (url_dlg_data->ok)); - gtk_entry_set_activates_default ((GtkEntry*) url_dlg_data->url_entry, - TRUE); -} - -static void url_editor_dialog_fb_ok_enable (GtkWidget *widget, void *data) { - UrlDialogData *url_dlg_data = (UrlDialogData *) data; - - gtk_widget_set_sensitive (GTK_WIDGET (url_dlg_data->ok), TRUE); -} diff --git a/calendar/gui/dialogs/url-editor-dialog.glade b/calendar/gui/dialogs/url-editor-dialog.glade deleted file mode 100644 index b260d10067..0000000000 --- a/calendar/gui/dialogs/url-editor-dialog.glade +++ /dev/null @@ -1,551 +0,0 @@ -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> - -<glade-interface> -<requires lib="gnome"/> - -<widget class="GtkDialog" id="url_editor"> - <property name="visible">True</property> - <property name="title" translatable="yes">Free/Busy Publishing Settings</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <property name="modal">False</property> - <property name="default_width">380</property> - <property name="default_height">508</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="decorated">True</property> - <property name="skip_taskbar_hint">False</property> - <property name="skip_pager_hint">False</property> - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> - <property name="has_separator">False</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancel"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="ok"> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="response_id">-5</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox13"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label26"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Publishing _Location</b></property> - <property name="use_underline">True</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">url_entry</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox9"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label18"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="url_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label25"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Publishing Frequency</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox10"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label29"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox12"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkRadioButton" id="daily"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Daily</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="weekly"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Weekly</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">daily</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="user_publish"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Manual</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">daily</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="calendar_list_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Free/Busy C_alendars</b></property> - <property name="use_underline">True</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox11"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label30"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkScrolledWindow" id="scrolled_window"> - <property name="height_request">150</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="shadow_type">GTK_SHADOW_IN</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label27"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Authentication</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox12"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label31"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - - <child> - <widget class="GtkLabel" id="label13"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Username:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">username_entry</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label14"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Password:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">password_entry</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="username_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="password_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">False</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="remember_pw"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Remember password</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - -</glade-interface> diff --git a/calendar/gui/dialogs/url-editor-dialog.h b/calendar/gui/dialogs/url-editor-dialog.h deleted file mode 100644 index 2ec3c61fd1..0000000000 --- a/calendar/gui/dialogs/url-editor-dialog.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Gary Ekker <gekker@novell.com> - * - * Copyright 2004, Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - * USA - */ - -/* - * UrlEditorDialog - a GtkObject which handles a libglade-loaded dialog - * to edit the calendar preference settings. - */ - -#ifndef _URL_EDITOR_DIALOG_H_ -#define _URL_EDITOR_DIALOG_H_ - -G_BEGIN_DECLS - -#include <gtk/gtk.h> -#include <glade/glade.h> - -#include "cal-prefs-dialog.h" -#include <libedataserverui/e-source-selector.h> - -struct _UrlDialogData { - /* Glade XML data */ - GladeXML *xml; - GtkWidget *url_editor; - GtkWidget *url_dialog; - - GtkEntry *url_entry; - GtkWidget *daily; - GtkWidget *weekly; - GtkWidget *user_publish; - - GtkWidget *calendar_list_label; - GtkWidget *scrolled_window; - - GtkEntry *username_entry; - GtkEntry *password_entry; - GtkWidget *remember_pw; - - GtkWidget *cancel; - GtkWidget *ok; - EPublishUri *url_data; -}; -typedef struct _UrlDialogData UrlDialogData; - -gboolean -url_editor_dialog_new (DialogData *dialog_data, EPublishUri *pub_uri); - -G_END_DECLS - -#endif /* _URL_EDITOR_DIALOG_H_ */ diff --git a/calendar/gui/e-pub-utils.c b/calendar/gui/e-pub-utils.c deleted file mode 100644 index 6133713ba2..0000000000 --- a/calendar/gui/e-pub-utils.c +++ /dev/null @@ -1,361 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* Evolution calendar Free/Busy utilities and types - * - * Copyright (C) 2004 Ximian, Inc. - * - * Author: Gary Ekker <gekker@novell.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include <string.h> -#include <glib.h> -#include <gconf/gconf.h> -#include <gconf/gconf-client.h> -#include <libedataserver/e-source.h> -#include <libedataserver/e-source-list.h> -#include <libedataserverui/e-passwords.h> -#include <libecal/e-cal-time-util.h> -#include <glib/gi18n.h> -#include "calendar-config.h" -#include "common/authentication.h" -#include "itip-utils.h" -#include "e-pub-utils.h" - -static gboolean updated_last_pub_time = FALSE; - -void -e_pub_uri_from_xml (EPublishUri *uri, const gchar *xml) -{ - xmlDocPtr doc; - xmlNodePtr root, p; - xmlChar *location, *enabled, *frequency; - xmlChar *username, *publish_time; - GSList *l = NULL; - - uri->location = NULL; - doc = xmlParseDoc ((char *)xml); - if (doc == NULL) { - uri->location = NULL; - return; - } - - root = doc->children; - if (strcmp (root->name, "uri") != 0) { - return; - } - location = xmlGetProp (root, "location"); - enabled = xmlGetProp (root, "enabled"); - frequency = xmlGetProp (root, "frequency"); - username = xmlGetProp (root, "username"); - publish_time = xmlGetProp (root, "publish_time"); - - if (location != NULL) - uri->location = g_strdup (location); - if (enabled != NULL) - uri->enabled = atoi (enabled); - if (frequency != NULL) - uri->publish_freq = atoi (frequency); - if (username != NULL) - uri->username = g_strdup (username); - if (publish_time != NULL) - uri->last_pub_time = g_strdup (publish_time); - - uri->password = g_strdup (""); - - for (p = root->children; p != NULL; p = p->next) { - xmlChar *uid = xmlGetProp (p, "uid"); - - l = g_slist_append (l, uid); - } - uri->calendars = l; - - xmlFree(location); - xmlFree(enabled); - xmlFreeDoc(doc); - return; -} - -gchar * -e_pub_uri_to_xml (EPublishUri *uri) -{ - xmlDocPtr doc; - xmlNodePtr root; - gchar *enabled, *frequency; - GSList *cals = NULL; - xmlChar *xml_buffer; - char *returned_buffer; - int xml_buffer_size; - - g_return_val_if_fail (uri != NULL, NULL); - g_return_val_if_fail (uri->location != NULL, NULL); - - doc = xmlNewDoc ("1.0"); - - root = xmlNewDocNode (doc, NULL, "uri", NULL); - enabled = g_strdup_printf ("%d", uri->enabled); - frequency = g_strdup_printf ("%d", uri->publish_freq); - xmlSetProp (root, "location", uri->location); - xmlSetProp (root, "enabled", enabled); - xmlSetProp (root, "frequency", frequency); - xmlSetProp (root, "username", uri->username); - xmlSetProp (root, "publish_time", uri->last_pub_time); - - for (cals = uri->calendars; cals != NULL; cals = cals->next) { - xmlNodePtr node; - - node = xmlNewChild (root, NULL, "source", NULL); - xmlSetProp (node, "uid", cals->data); - } - xmlDocSetRootElement (doc, root); - - xmlDocDumpMemory (doc, &xml_buffer, &xml_buffer_size); - xmlFreeDoc (doc); - - returned_buffer = g_malloc (xml_buffer_size + 1); - memcpy (returned_buffer, xml_buffer, xml_buffer_size); - returned_buffer [xml_buffer_size] = '\0'; - xmlFree (xml_buffer); - g_free (enabled); - - return returned_buffer; -} - -static gboolean -is_publish_time (EPublishUri *uri) { - icaltimezone *utc; - struct icaltimetype current_itt; - - utc = icaltimezone_get_utc_timezone (); - current_itt = icaltime_current_time_with_zone (utc); - - if (!uri->last_pub_time ||(strlen (uri->last_pub_time)== 0)) { - uri->last_pub_time = g_strdup (icaltime_as_ical_string (current_itt)); - return TRUE; - - } else { - struct icaltimetype adjust_itt = icaltime_from_string (uri->last_pub_time); - - switch (uri->publish_freq) { - case URI_PUBLISH_DAILY: - icaltime_adjust (&adjust_itt, 1, 0, 0, 0); - if (icaltime_compare_date_only (adjust_itt, current_itt ) < 0) { - uri->last_pub_time = g_strdup (icaltime_as_ical_string (current_itt)); - return TRUE; - } - break; - case URI_PUBLISH_WEEKLY: - icaltime_adjust (&adjust_itt, 7, 0, 0, 0); - if (icaltime_compare_date_only (adjust_itt, current_itt ) < 0) { - uri->last_pub_time = g_strdup (icaltime_as_ical_string (current_itt)); - return TRUE; - } - break; - } - } - - return FALSE; -} - -/* FIXME we need to add a timeout function to check if the next publishing time is reached. - If the freqency is daily and evolution runs continuously for more than one day, the freebusy - will only be published for the first day */ -void -e_pub_publish (gboolean publish) { - icaltimezone *utc; - time_t start = time (NULL), end; - GSList *uri_config_list, *l, *uri_list = NULL; - ESourceList *source_list; - GConfClient *gconf_client; - gboolean published = FALSE; - - gconf_client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/calendar/sources"); - g_object_unref (gconf_client); - - utc = icaltimezone_get_utc_timezone (); - start = time_day_begin_with_zone (start, utc); - end = time_add_week_with_zone (start, 6, utc); - - uri_config_list = calendar_config_get_free_busy (); - - for (l = uri_config_list; l != NULL; l = l->next) { - GSList *p = NULL, *q; - EPublishUri *uri; - ECalComponent *clone = NULL; - gboolean cloned = FALSE; - ECal *client = NULL; - char *prompt; - gboolean remember = FALSE; - gchar *password; - - gchar *xml = (gchar *)l->data; - - uri = g_new0 (EPublishUri, 1); - e_pub_uri_from_xml (uri, xml); - - /*FIXME this is just a hack to avoid publishing again and again - we need to make the last publish time a seperate key */ - if (updated_last_pub_time) { - updated_last_pub_time = FALSE; - return; - } - - /* TODO: make sure we're online */ - /* skip this url if it isn't enabled or if it is manual */ - if (!uri->enabled) { - uri_config_list = g_slist_next (uri_config_list); - continue; - } - - if (!publish) { - /* a g_idle publish, make sure we are not set to user only */ - if (uri->publish_freq == URI_PUBLISH_USER) { - uri_config_list = g_slist_next (uri_config_list); - continue; - } - - /* If not is it time to publish again? */ - publish = is_publish_time (uri); - - } - - /* User published or config change */ - if (publish) { - /* We still need to set the last_pub_time */ - uri->last_pub_time = 0; - is_publish_time (uri); - q = NULL; - for (p = uri->calendars; p != NULL; p = p->next) { - - GList *comp_list = NULL; - gchar *source_uid; - ESource * source; - char *email = NULL; - GError *error = NULL; - GList *users = NULL; - - source_uid = g_strdup (p->data); - source = e_source_list_peek_source_by_uid (source_list, source_uid); - - if (source) - client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT); - - if (!client) { - g_warning (G_STRLOC ": Could not publish Free/Busy: Calendar backend no longer exists"); - g_free (source_uid); - g_free (p->data); - q = g_slist_append (q, p); - - continue; - } - - if (!e_cal_open (client, TRUE, &error)) { - g_warning ("Could not open the calendar %s \n", error->message); - g_error_free (error); - error = NULL; - - g_object_unref (client); - client = NULL; - g_free (source_uid); - continue; - } - - if (e_cal_get_cal_address (client, &email, &error)) { - if (email && *email) - users = g_list_append (users, email); - } else { - g_warning ("Could not get the email: %s \n", error->message); - g_error_free (error); - error = NULL; - } - - if (e_cal_get_free_busy ((ECal *) client, users, - start, end, - &comp_list, &error)) { - GList *list; - - for (list = comp_list; list; list = list->next) { - ECalComponent *comp = E_CAL_COMPONENT (list->data); - - cloned = itip_publish_begin (comp, (ECal *) client, cloned, &clone); - g_object_unref (comp); - } - g_list_free (comp_list); - } else { - g_warning ("Could not get the free busy information %s \n", error->message); - g_error_free (error); - error = NULL; - } - - if (users) - g_list_free (users); - - g_free (email); - g_object_unref (client); - client = NULL; - g_free (source_uid); - } - } - - for(p = q; p!=NULL; p = p->next) { - uri->calendars = g_slist_delete_link (uri->calendars, p->data); - } - g_slist_free (q); - - /* add password to the uri */ - password = e_passwords_get_password ("Calendar", - (gchar *)uri->location); - - if (!password) { - prompt = g_strdup_printf (_("Enter the password for %s"), (gchar *)uri->location); - password = e_passwords_ask_password (_("Enter password"), - "Calendar", (gchar *)uri->location, - prompt, - E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE, - &remember, NULL); - - g_free (prompt); - - if (!password) { - g_slist_free (p); - continue; - } - } - - g_slist_free (p); - - if (cloned && clone) - published = itip_publish_comp ((ECal *) client, - uri->location, - uri->username, - password, &clone); - - xml = e_pub_uri_to_xml (uri); - if (xml != NULL) { - uri_list = g_slist_append (uri_list, xml); - } - g_free (uri); - } - - if (published) { - /* Update gconf so we have the last_pub_time */ - calendar_config_set_free_busy (uri_list); - updated_last_pub_time = TRUE; - } - - g_slist_free (uri_config_list); - g_slist_free (uri_list); -} diff --git a/calendar/gui/e-pub-utils.h b/calendar/gui/e-pub-utils.h deleted file mode 100644 index 98e36d8758..0000000000 --- a/calendar/gui/e-pub-utils.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* Evolution calendar Free/Busy utilities and types - * - * Copyright (C) 2004 Ximian, Inc. - * - * Author: Gary Ekker <gekker@novell.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef E_CAL_FB_UTIL_H -#define E_CAL_FB_UTIL_H - -#include <glib.h> -#include <libxml/tree.h> - -G_BEGIN_DECLS - -enum publish_frequency{ - URI_PUBLISH_DAILY, - URI_PUBLISH_WEEKLY, - URI_PUBLISH_USER -}; - -static const int pub_frequency_type_map[] = { - URI_PUBLISH_DAILY, - URI_PUBLISH_WEEKLY, - URI_PUBLISH_USER, - -1 -}; - -struct _EPublishUri { - gint enabled; - gchar *location; - gint publish_freq; - gchar *username; - gchar *password; - GSList *calendars; - gchar *last_pub_time; -}; - -typedef struct _EPublishUri EPublishUri; - -void e_pub_uri_from_xml (EPublishUri *uri, const gchar *xml); -gchar *e_pub_uri_to_xml (EPublishUri *uri); -void e_pub_publish (gboolean publish) ; - -G_END_DECLS - -#endif diff --git a/calendar/gui/gnome-calendar-conduit.png b/calendar/gui/gnome-calendar-conduit.png Binary files differdeleted file mode 100644 index e867ba90b2..0000000000 --- a/calendar/gui/gnome-calendar-conduit.png +++ /dev/null |