Re: [evolution-patches] Re: [calendar + gal] #57914 - possible to delete built-in views
- From: Radek Doulík <rodo novell com>
- To: JP Rosevear <jpr novell com>
- Cc: Rodrigo Moya <rodrigo novell com>, Evolution Patches <evolution-patches lists ximian com>, JP Rosevear <jpr ximian com>
- Subject: Re: [evolution-patches] Re: [calendar + gal] #57914 - possible to delete built-in views
- Date: Thu, 22 Jul 2004 14:36:00 +0200
On Tue, 2004-07-13 at 21:44 +0200, Radek Doulík wrote:
On Tue, 2004-07-13 at 13:31 -0400, JP Rosevear wrote:
On Tue, 2004-07-13 at 18:05 +0200, Rodrigo Moya wrote:
> On Tue, 2004-07-13 at 17:06 +0200, Radek Doulík wrote:
> > Attached patches add built-in property to GalView.
> >
> > The calendar part sets built-in property for 5 built-in views
> > accessible by buttons on the calendar toolbar.
> >
> > The gal part introduces built-in property and uses it in Define Views
> > dialog, where Delete button is deactivated for built-in views.
> >
> if the gal part is ok, then the calendar part looks ok
Would it be easier to put the property in the galview.xml so it doesn't
have to happen programmatically?
okie, I will take a look at it and add it if possible.
attached is a lot simplified patch, which uses built_in flag in collection view item. no calendar changes necessary anymore.
R.
Index: menus/gal-define-views-dialog.c
===================================================================
RCS file: /cvs/gnome/gal/gal/menus/gal-define-views-dialog.c,v
retrieving revision 1.27
diff -u -p -r1.27 gal-define-views-dialog.c
--- menus/gal-define-views-dialog.c 10 Jun 2004 11:11:12 -0000 1.27
+++ menus/gal-define-views-dialog.c 22 Jul 2004 12:25:30 -0000
@@ -207,6 +207,24 @@ gdvd_connect_signal(GalDefineViewsDialog
}
static void
+etable_selection_change_forall_cb (int row, GalDefineViewsDialog *dialog)
+{
+ if (row != -1) {
+ GalViewCollectionItem *item = gal_view_collection_get_view_item (dialog->collection, row);
+
+ if (item)
+ gtk_widget_set_sensitive (glade_xml_get_widget (dialog->gui, "button-delete"),
+ !item->built_in);
+ }
+}
+
+static void
+etable_selection_change (ETable *etable, GalDefineViewsDialog *dialog)
+{
+ e_table_selected_row_foreach (etable, (EForeachFunc) etable_selection_change_forall_cb, dialog);
+}
+
+static void
gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
{
GladeXML *gui;
@@ -247,6 +265,9 @@ gal_define_views_dialog_init (GalDefineV
g_object_set(dialog->model,
"collection", dialog->collection,
NULL);
+ g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (etable)),
+ "selection_change",
+ G_CALLBACK (etable_selection_change), dialog);
gtk_widget_show_all (etable);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]