Deprecated function ed icons on button

2014-10-06 Thread arkkimede
Hi,
I'm starting to learn GTK+ and I'm using beginner tutorial found on GTK web
site.
(I'm working on linux debian testing amd64 with Xfce)
The actual version of GTK is 3.x and the tutorial is related to 2.x
This means that some time there are some deprecated function that have to
be substituted with the new ones.
Some time the task is easy like

gtk_vbox_new(FALSE, 0) ==> gtk_box_new(GTK_ORIENTATION_VERTICAL, 0)

some time not so easy.

One of these case is  gtk_image_menu_item_new_from_stock(GTK_STOK_NEW,NULL)
The new version is
gtk_menu_item_new_with_label or
gtk_menu_item_new_with_mnemonic.

I made the new version, the compiler do not print any message but the final
result is that the icon
disappear.

Googling I found that this is the new philosophy of GTK and to see the
icons I have to made some settings in my environment.

Somewhere I found that I have to put in ~/.config/gtk-3.0/settings.ini
some like
[Settings]
gtk-menu-images=1
gtk-button-images=1

Running the GTK program I do not see any icons!

Could you help me to find a solution, please?

Thanks in Advance
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


The "effect" of carriage return in GtkTextView

2018-03-13 Thread arkkimede
HI!
I written an application GTK3 on Ubuntu 16.04 that essentially, by mean a
GUI generates an input file used to feed an executable.

This executable print out messages that inform the user about the status of
the run.
At the moment I'm able to catch this messages and redirect them on a
GtkTextView.

This executable produces messages like:

Evaluated point n 1 of 1000
Evaluated point n 2 of 1000

etc.

On a simple xtem, using instruction like:

printf("Evaluated point n %4d of %4d \r",iPoint, totalPoints);

I can observe the message always on the same line: the special character
"\r" put the cursor to the begin of the line but daes not change line.


What I would like to know if it is possible implement a similar effect on a
GtkTextView.

Thank You in Advance
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: The "effect" of carriage return in GtkTextView

2018-03-13 Thread arkkimede
Thank you Lucky B.C.: Your suggestion works great!!
It is exactly what I was looking for.
Obviously if the speed of the incoming messages is to hight, on the
TextView you do not see anything (but this is not my case).

2018-03-13 20:16 GMT+01:00 Lucky B.C :

> Well GtkTextView doesn't do that, and GtkTextBuffer too but it can delete
> the range from GtkTextIter start to GtkTextIter end
> by gtk_text_buffer_delete , then you can insert again your new message
> by gtk_text_buffer_insert!
>
> On Tue, Mar 13, 2018, 23:02 arkkimede  wrote:
>
>> HI!
>> I written an application GTK3 on Ubuntu 16.04 that essentially, by mean a
>> GUI generates an input file used to feed an executable.
>>
>> This executable print out messages that inform the user about the status
>> of
>> the run.
>> At the moment I'm able to catch this messages and redirect them on a
>> GtkTextView.
>>
>> This executable produces messages like:
>>
>> Evaluated point n 1 of 1000
>> Evaluated point n 2 of 1000
>>
>> etc.
>>
>> On a simple xtem, using instruction like:
>>
>> printf("Evaluated point n %4d of %4d \r",iPoint, totalPoints);
>>
>> I can observe the message always on the same line: the special character
>> "\r" put the cursor to the begin of the line but daes not change line.
>>
>>
>> What I would like to know if it is possible implement a similar effect on
>> a
>> GtkTextView.
>>
>> Thank You in Advance
>> ___
>> gtk-app-devel-list mailing list
>> gtk-app-devel-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


compiling glade

2018-03-22 Thread arkkimede
HI!
I want to install the latest version of glade downloaded from git-hub.

I read the instruction.

There is written that configure.ac or configure.in is used to generate the
script configure.
To do that execute the command autoconf.

I executed this command but some macro are missed

Searching I found who write:
to solve the problem run "autoreconf -fvi".

Running this command it ends with this error:

automake: error: cannot open < gtk-doc.make: No such file or directory
autoreconf: automake failed with exit status: 1

consider that I've installed

libgtk-3-doc
gtk-doc-tools.

Please, could you help me?
Thamks
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How to avoid the presence of new line in GtkEntry at the end of input string

2018-04-05 Thread arkkimede
Hi!
In my GTK3 applications, there are some GtkEntry used to input strings
like, e.g., the output directory.

I write a string in the Entry and using the function gtk_entry_get_text() i
read the string insert in the GUI.

Printing on screen this string, <> a "new line"  is present at
the end of the string (obviously I do not put a new line at the end).

How can avoid this issue?
I have to change function or make some operations before the reading?

Thank You.
Daniele
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Dimensions in pixels of a draw Area to obtain a plot on a A4 paper

2018-04-20 Thread arkkimede
HI!
I've realized an App with GTK3 and the library CAIRO to plot results of
measurements.
I use the function "cairo_surface_write_to_png" to obtain a png file that I
put on a paper of format A4 (with usual resolution of 300dpi) to generate
reports.
Consider also that preliminary plot are observed on a screen with
resolution 1920x1080.

The question is:

Could you advice me dimensions in pixels of the draw area in order to
obtain png file to plot on A4 paper and see (more or less) similar pictures
on the screen
(or different dimensions for the plot on png and dimensions for the plot on
screen)?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Dimensions in pixels of a draw Area to obtain a plot on a A4 paper

2018-04-21 Thread arkkimede
Ok! I can use the pdf format but the dimensions of the draw area?

Il Sab 21 Apr 2018, 07:31 Nicola Fontana  ha scritto:

> Il Sat, 21 Apr 2018 04:01:21 +0200 arkkimede 
> scrisse:
>
> > HI!
> > I've realized an App with GTK3 and the library CAIRO to plot results of
> > measurements.
> > I use the function "cairo_surface_write_to_png" to obtain a png file
> that I
> > put on a paper of format A4 (with usual resolution of 300dpi) to generate
> > reports.
> > Consider also that preliminary plot are observed on a screen with
> > resolution 1920x1080.
> >
> > The question is:
> >
> > Could you advice me dimensions in pixels of the draw area in order to
> > obtain png file to plot on A4 paper and see (more or less) similar
> pictures
> > on the screen
> > (or different dimensions for the plot on png and dimensions for the plot
> on
> > screen)?
>
> Hi,
>
> the PNG backend must not be used for serious applications. From
> the doc [1]:
>
> It is a toy API. It only offers very simple support for
> reading and writing PNG files, which is sufficient for testing
> and demonstration purposes.
>
> So my advice is "use the PDF backend".
>
> [1] https://cairographics.org/manual/cairo-PNG-Support.html
>
> Ciao.
> --
> Nicola
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Developing application with GTK3 on WIndows 10

2018-04-26 Thread arkkimede
Following this link https://www.gtk.org/download/windows.php I prepared on
Windows 10/64bit the environment to develop application with GTK3 and Glade
on Windows 10.

(I've installed msys2 / update packages / installing GTK3 libraries /
installing Glade / installing toolchain to develop code ).

I've build a simple application on Ubuntu using GTK3 + glade and it works
perfectly.

Then I ported the same application on Win and I tried to compile like I've
done on UBUNTU.
First of all, during the compilation the option -export-dynamic, suggested
in all the tutorial, is not recognized ad I obtain the following error:

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
warning: --export-dynamic is not supported for PE+ targets, did you mean
--export-all-symbols?

If I substitute with --export-all-symbols I obtain gcc.exe: error:
unrecognized command line option '--export-all-symbols'

Than I erase this option.

The compilation end without errors but if I run the executable I obtain the
following errors:

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.459: Could not find signal
handler 'on_button1_clicked'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.459: Could not find signal
handler 'on_window_main_destroy'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.459: Could not find signal
handler 'on_doPlot_clicked'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.475: Could not find signal
handler 'on_cbox_changed'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.475: Could not find signal
handler 'on_btn_exe_clicked'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.475: Could not find signal
handler 'on_btn_quit_clicked'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.491: Could not find signal
handler 'on_plotWindow_delete_event'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.491: Could not find signal
handler 'on_close_plotWindow_clicked'. Did you compile with -rdynamic?

(LAVORO.exe:5684): Gtk-WARNING **: 08:41:50.506: Could not find signal
handler 'on_plot_draw'. Did you compile with -rdynamic?

Do you understand what is wrong in my installation and do you have an idea
about to solve tis issue?

Could you help me?
Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


IDE to develop app with GTK3 on windows using MSYS2

2018-05-07 Thread arkkimede
Hi!
I need an advice:
I written apps on Linux with GTK3 using essentially vi and Makefile to
build the project splitten in multiple C files with the corresponding H
file.

Now I would migrate on WIndows 10 by means of MSYS2.

There is an IDE (better if open source) that I can use instean to follow to
use vi?
I tried Code Blocks but the wizard to build project with GTK support only
GTK2.
I asked support and I received suggestions but at the moment I'm not able
to using C::B to build an app with GTK3 on WIndows 10.
Thank you for any advice and suggestion.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: IDE to develop app with GTK3 on windows using MSYS2

2018-05-14 Thread arkkimede
I agree with you!.
I started to work in 1991 where my terminal was a VT100 with green phosphors
with input only the keyboard and OS unix.
No graphics, no windows, no mouse.
I worked for several years in this condition using only vi (not vim) and
little bash scripts to compile the source code.
Now, after 27 years, obviously, the first love is never forgotten, and in
linux, more or less, I work like 27 years ago (I use a script to generate a
Makefile).

Considering that GTK3 is supported also in Windows,  I decided, in this OS,
to update myself a bit, and now I'm able to use Code Blocks (googling and
thanks to suggestions I found how configure CB to work with GTK3).

In any case, if I have to work on linux, I come back to the origin :)

Bye Bye




2018-05-14 12:15 GMT+02:00 Lucky B.C :

> Hi,
>
> I only use *vim* + *cmake* + *git* for developing my open source projects.
> There's no reason for me to use IDEs, why? My laptop is not strong enough
> run any IDE.
>
> Tips:
> + *CMake* is a great idea to help us compiling C source files in any
> platform.
> + *Git* is a version control system.
> + *Vim* is my only editor.
>
> On Mon, May 7, 2018 at 6:47 PM, Matthew A. Postiff 
> wrote:
>
> > Have you tried https://www.kdevelop.org/? I have been using it lately
> and
> > like it for code editing and compilation both on Linux and Windows. It
> > provides more info about the source code than emacs tags does.
> >
> > I haven't gotten the hang of debugging with KDevelop, so I still debug in
> > emacs+gud-gdb (which is archaic compared to a good debugging tool, but it
> > works for me).
> >
> >
> > On 5/7/2018 3:30 AM, arkkimede wrote:
> >
> >> Hi!
> >> I need an advice:
> >> I written apps on Linux with GTK3 using essentially vi and Makefile to
> >> build the project splitten in multiple C files with the corresponding H
> >> file.
> >>
> >> Now I would migrate on WIndows 10 by means of MSYS2.
> >>
> >> There is an IDE (better if open source) that I can use instean to follow
> >> to
> >> use vi?
> >> I tried Code Blocks but the wizard to build project with GTK support
> only
> >> GTK2.
> >> I asked support and I received suggestions but at the moment I'm not
> able
> >> to using C::B to build an app with GTK3 on WIndows 10.
> >> Thank you for any advice and suggestion.
> >> ___
> >> gtk-app-devel-list mailing list
> >> gtk-app-devel-list@gnome.org
> >> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> >>
> >>
> > ___
> > gtk-app-devel-list mailing list
> > gtk-app-devel-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> >
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GTK3 + gnuplot

2018-09-18 Thread arkkimede via gtk-app-devel-list
Hi!
I've developed an application in c to make measurements, with a GUI that
manage the inputs and it is able to produce graphical results in terms of
2d plots, realized by mean of the library Cairo.

Now I have the necessity to produce 3d plots (3d radiation pattern of
antennas).

To realize 3d plots by mean of a 2d library, is not impossible but very
hard.
A solution could be using gnuplot that I'he yet used to produce high
quality 3d plots.

The question now is: "How to embed a gnuplot graphic in gtk3?
Could you say, please, where to find a simple example, just to undestand
how it is possible to do that?

Thank you
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list