Re: Treeview (liststore) CSS question
apologies I did resolve my issue , posted as wrong person Resolved my issue, turns out I needed some voodoo with properties $widgetpage{file_scroll}->set('propagate_natural_height','1'); $widgetpage{file_scroll}->set_vexpand(0); On Tue, 19 Mar 2019 at 18:53, wrote: > > Hi Mike, > > Have you tried > > gtk_widget_set_vexpand(tree, FALSE); > > on the treeview? This might work to show a different background color on > the unused space of the treeview. > > I don't know if this is of any help but also remember that you can set > individual row colors in a treeview by having a color column. That way you > can add some logic into what color the row is. Also, a selection color is > easy to set with CSS. > > Eric > > > //gcc -Wall stripe_list1.c -o stripe_list1 `pkg-config --cflags --libs > gtk+-3.0` > > #include > > enum > { >ID, >PROGRAM, >COLOR, >COLUMNS > }; > > int main(int argc, char *argv[]) > { > gtk_init(&argc, &argv); > > GtkWidget *window=gtk_window_new(GTK_WINDOW_TOPLEVEL); > gtk_window_set_title(GTK_WINDOW(window), "Stripes"); > gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); > gtk_window_set_default_size(GTK_WINDOW(window), 300, 300); > gtk_widget_set_name(window, "main_window"); > g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); > > GtkTreeIter iter; > GtkListStore *store=gtk_list_store_new(COLUMNS, G_TYPE_UINT, > G_TYPE_STRING, G_TYPE_STRING); > gtk_list_store_append(store, &iter); > gtk_list_store_set(store, &iter, ID, 0, PROGRAM, "Gedit", COLOR, > "cyan", -1); > gtk_list_store_append(store, &iter); > gtk_list_store_set(store, &iter, ID, 1, PROGRAM, "Gimp", COLOR, > "yellow", -1); > gtk_list_store_append(store, &iter); > gtk_list_store_set(store, &iter, ID, 2, PROGRAM, "Inkscape", COLOR, > "cyan", -1); > gtk_list_store_append(store, &iter); > gtk_list_store_set(store, &iter, ID, 3, PROGRAM, "Firefox", COLOR, > "yellow", -1); > gtk_list_store_append(store, &iter); > gtk_list_store_set(store, &iter, ID, 4, PROGRAM, "Calculator", COLOR, > "cyan", -1); > gtk_list_store_append(store, &iter); > gtk_list_store_set(store, &iter, ID, 5, PROGRAM, "Devhelp", COLOR, > "yellow", -1); > > GtkWidget *tree=gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); > gtk_widget_set_name(tree, "tree_select"); > gtk_widget_set_hexpand(tree, TRUE); > gtk_widget_set_vexpand(tree, FALSE); > > GtkCellRenderer *renderer1=gtk_cell_renderer_text_new(); > g_object_set(renderer1, "editable", FALSE, NULL); > > //Bind the COLOR column to the "cell-background" property. > GtkTreeViewColumn *column1 = > gtk_tree_view_column_new_with_attributes("ID", renderer1, "text", ID, > "cell-background", COLOR, NULL); > gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column1); > GtkTreeViewColumn *column2 = > gtk_tree_view_column_new_with_attributes("Program", renderer1, "text", > PROGRAM, "cell-background", COLOR, NULL); > gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column2); > > GtkWidget *grid=gtk_grid_new(); > gtk_grid_attach(GTK_GRID(grid), tree, 0, 0, 1, 1); > gtk_container_add(GTK_CONTAINER(window), grid); > > GError *css_error=NULL; > gchar css_string[]="#main_window{background: purple;} > #tree_select:selected{background: green;}"; > GtkCssProvider *provider = gtk_css_provider_new(); > GdkDisplay *display = gdk_display_get_default(); > GdkScreen *screen = gdk_display_get_default_screen(display); > gtk_style_context_add_provider_for_screen(screen, > GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); > gtk_css_provider_load_from_data(provider, css_string, -1, &css_error); > if(css_error!=NULL) g_print("CSS loader error %s\n", > css_error->message); > g_object_unref(provider); > > gtk_widget_show_all(window); > gtk_main(); > return 0; > } > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord
On Wed, 20 Mar 2019 at 23:59, David C. Rankin < drankina...@suddenlinkmail.com> wrote: > On 03/18/2019 12:02 PM, Emmanuele Bassi via gtk-app-devel-list wrote: > > Hi all; > > > > as announced in: > > > > > https://mail.gnome.org/archives/gtk-devel-list/2019-March/msg0.html > > > > we have created a Discourse instance available at: > > > > https://discourse.gnome.org > What is the technological hold-up to doing both? Listserves are no cost > simple > implementations that should be able to mirror posts from discourse to the > existing list and vice-versa. This is an increasingly out of date position. Maintaining email servers and mailing lists is getting more and more complicated with every passing year. Sending thousands of emails to thousands of people every single day, and rewriting the envelope to make sure that the email comes from gnome.org, is becoming undistinguishable from spam. While we managed to carve out some exception using the established mechanisms, large ISPs are not really happy about all this stuff. > That would seem to be the way to go until you > have some assurance that discourse will preserve community involvement > instead > of just doing it on hope. > Splitting the community is not a great plan, so it's not going to happen. You can interact with Discourse via email, which is the main reason why we chose it as the platform to replace Mailman. Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord
On Thu, 21 Mar 2019 at 02:28, Matthew A. Postiff via gtk-app-devel-list < gtk-app-devel-list@gnome.org> wrote: > Is it easy in discourse to turn on email, either daily digests or > "live"? Is there an rss feed that I can subscribe to? A quick howto > would be great. > There is a link on how to use email with Discourse in the original email. Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com] ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: ANNOUNCE: Phasing out GTK mailing lists and move to Discord
Is the subject line of this thread a freudian slip? We are definitely moving toward discord, from the complaints! On 03/21/2019 09:33 AM, Emmanuele Bassi via gtk-app-devel-list wrote: > On Thu, 21 Mar 2019 at 02:28, Matthew A. Postiff via gtk-app-devel-list < > gtk-app-devel-list@gnome.org> wrote: > > >> Is it easy in discourse to turn on email, either daily digests or >> "live"? Is there an rss feed that I can subscribe to? A quick howto >> would be great. >> > > There is a link on how to use email with Discourse in the original email. I'm just a lurker here following GTK+ out of personal interest, and the traditional mailing list format fit that perfectly. Discourse not so much. After you mentioned mailing list mode in Discourse, I tried enabling mailing list mode on another discourse board that I occasionally visit. The results were not encouraging, unfortunately. Discourse does not offer any kind of granularity when in mailing list mode; you get everything on every sub forum across the entire Discourse instance. The only way to get granularity is to manually set email notifications on particular topics, or automatic on topics one has participated in. From what I read the Discourse developers acknowledge that the mailing list mode isn't really that great and never will be as there's just not a 1:1 mapping of how Discourse handles things with email. Sadly for me, Discourse has all the same limitations and problems as any other web forum I've used. An awkward interface requiring logging in, a lack of threaded messages (at least I can't see anything like threads in Discourse), and yet another web site to have to visit. Thanks for all your work on GTK+, Mr Bassi. And to all the rest of the GTK+ developers. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list