Re: Ruler Class in GTK+ 3

2015-01-09 Thread Stefan Sauer
On 01/09/2015 05:12 PM, Emmanuele Bassi wrote:
 hi;

 On 9 January 2015 at 16:02, Kamalpreet Grewal grewalkamal...@gmail.com 
 wrote:

 I am trying to add ruler to my application based on GTK+ 3.

 A class namely  is available in GTK2. I havebeen trying to find a
 class serving the purpose of ruler in GTK+ 3.

 What are the possible classes available for this implementation?
 none. GtkRuler was deprecated in GTK+ 2.x and removed in GTK+ 3.x.
 it's a *very* niche widget, and most applications that use one in
 their UI ended up having their own class.

 my suggestion is to look at ruler widgets in GIMP and Inkscape.

 if you want to draw your own, you can use a GtkDrawingArea subclass
 with a custum draw() virtual function.

 ciao,
  Emmanuele.

+1 you essentially need a draw function. This is what I did when porting
to gtk+-3
https://github.com/Buzztrax/buzztrax/blob/master/src/ui/edit/signal-analysis-dialog.c#L552-615
there is a 2nd with a log scale in the same file.

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


Re: gtktreeview: highlighting a cell

2015-01-06 Thread Stefan Sauer
On 12/12/2014 06:57 PM, Allin Cottrell wrote:
 I'm using GtkTreeView to implement a simple spreadsheet.

 With GTK 2, if use gtk_tree_view_set_cursor() to place keyboard focus
 on a given cell, with the last argument set to FALSE so that editing
 mode is not entered immediately, I get a visual indication of which
 cell is focused. It's fairly subtle, but a gray box is drawn around
 the cell content.

 Using the same code with GTK 3, I'm getting no such visual indication.
 The cell is focused OK -- pressing Enter starts editing -- but you get
 no visual clue as to which cell has focus. Is there any way to emulate
 the GTK 2 behavior?

 (In this comparison I'm using the Adwaita theme with gtk 2.24.25 and
 3.14.5.)

 Thanks for any guidance.

I am using cell-data function for this and change the background color :/
https://github.com/Buzztrax/buzztrax/blob/master/src/ui/edit/main-page-sequence.c#L338-370

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


Re: Documenting properties and signals with gtk-doc

2015-01-06 Thread Stefan Sauer
On 12/20/2014 01:39 PM, Wouter Verhelst wrote:
 Hi list,

 I've been pouring over the (fairly scarce) documentation 
https://developer.gnome.org/gtk-doc-manual/unstable/
if anything is unclear, let me know.

... and FYI there also is a gtk-doc mailing list and irc channel.

Stefan
 and trying to
 fix things for several hours last night (until the wee hours of the
 morning, in fact), but so far haven't been able to figure this out:

 I wrote a library to deal with joysticks in a GObject/GTK-like way. It
 works (including a GTK-based tester tool, although the UI could use some
 improvement), and I now want to do the API documentation and also make
 sure that glib-introspection works.

 However, I do not seem to be able to get the documentation that I wrote
 for the few signals and properties to actually show up in the gtk-doc
 output. It just isn't there.

 I'm sure this must be something obvious to someone more experienced with
 gtk-doc than me, but I don't see it.

 Help?

 The code is at https://github.com/yoe/libjoy

 Thanks,


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


Re: Error

2013-12-30 Thread Stefan Sauer
hi,

I don't see anything gtk-doc specific here. You probably want to ask on
the gtk-devel list. In order to fix one of the issues install Xvfb as
the error suggests,

Stefan

On 09/01/2013 09:39 PM, Weiller Ronfini wrote:
 weiller@debian:~/Downloads/gtk+-3.8.4$ make check
 Making check in po
 make[1]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/po'
 make[1]: Nada a ser feito para `check'.
 make[1]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/po'
 Making check in po-properties
 make[1]: Entrando no diretório 
 `/home/weiller/Downloads/gtk+-3.8.4/po-properties'
 make[1]: Nada a ser feito para `check'.
 make[1]: Saindo do diretório 
 `/home/weiller/Downloads/gtk+-3.8.4/po-properties'
 Making check in gdk
 make[1]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
   GEN  gdkconfig.h
 make  check-recursive
 make[2]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 Making check in x11
 make[3]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/x11'
 make  check-local
 make[4]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/x11'
 make[4]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/x11'
 make[3]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/x11'
 Making check in .
 make[3]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
   GEN  gdkconfig.h
 make  check-TESTS check-local
 make[4]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 make[5]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 PASS: abicheck.sh
 make[6]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
   GEN  gdkconfig.h
 make  all-recursive
 make[7]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 Making all in x11
 make[8]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/x11'
 make[8]: Nada a ser feito para `all'.
 make[8]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/x11'
 Making all in .
 make[8]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
   GEN  gdkconfig.h
 make[8]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 Making all in tests
 make[8]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/tests'
 make[8]: Nada a ser feito para `all'.
 make[8]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/tests'
 make[7]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 make[6]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 
 Testsuite summary for gtk+ 3.8.4
 
 # TOTAL: 1
 # PASS:  1
 # SKIP:  0
 # XFAIL: 0
 # FAIL:  0
 # XPASS: 0
 # ERROR: 0
 
 make[5]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 make[4]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 make[3]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 Making check in tests
 make[3]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/tests'
 make  check-local
 make[4]: Entrando no diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/tests'
 Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests.
 make[4]: ** [test-cwd] Erro 1
 make[4]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/tests'
 make[3]: ** [check-am] Erro 2
 make[3]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk/tests'
 make[2]: ** [check-recursive] Erro 1
 make[2]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 make[1]: ** [check] Erro 2
 make[1]: Saindo do diretório `/home/weiller/Downloads/gtk+-3.8.4/gdk'
 make: ** [check-recursive] Erro 1
 weiller@debian:~/Downloads/gtk+-3.8.4$ 


 Weiller Ronfini compartilhou este arquivo do Dropbox:
 gz gtk+-3.8.4.tar.gz   
 ___
 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


Re: one function to go...

2012-12-28 Thread Stefan Sauer
On 12/23/2012 10:39 PM, Gary Kline wrote:

   guys,

   I need one 'quit' button in a small widget that says via the label
   = gtk_label_new(File does not exist);, and displays OK with 
   the Enter key icon.   Instead of having the user click  on a
   Quit or Close button, just hitting Enter would return control
   to the calling function.  I already have the Close  code roughed 
   out.  I want the GTK_BUTTON_OK in there to let hitting Enter
   work.

   thanks for any clues.
gtk_window_set_default()

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


Re: Push button with enter

2012-02-21 Thread Stefan Sauer
On 02/13/2012 03:18 PM, Manuel Ferrero wrote:
 I'd like to have a button pushed every time I press the Enter key,
 even if that button is not selected.
 Let say I click on a text box, I write some text and then when I press
 Enter the button is pressed.
 Is it possible?
 Right now the button is pressed only if it's selected, but the
 GtkButton pressed signal is not triggered.
gtk_window_set_default()

Stefan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: is thaere a way to exit(1)?

2012-01-17 Thread Stefan Sauer
On 01/15/2012 12:51 AM, Gary Kline wrote:
 On Fri, Jan 13, 2012 at 10:09:43PM +0100, David Ne??as wrote:
 On Fri, Jan 13, 2012 at 11:59:45AM -0800, Gary Kline wrote:
 I finally know =where= i want to exit my gtk program, but exit 
 just doesn't break me out of my while() loop.  what's the magin?
 exit() *does* terminate the program no matter what loop or whatever it
 might be running.

 So, most likely, you think your code calls exit() at some point but that
 actually never happens.

 The program might get stuck in the finalisation phase if some exit
 handler (e.g. atexit()-registered) or finaliser gets stuck but I suppose
 if you were registering such things you (a) would have told us (b) did
 not wonder what happened.

 Yeti


 P.S.: Calling exit() while within the Gtk+ main loop is a bit harsh.
 Normally one calls gtk_main_quit() and the program continues execution
 after gtk_main() ??? which typically means it then reaches the end of
 main() and terminates.


   you were abs correct about exit().  i moved it around and
   was able to verify that my code was doing what i had
   thought.  that puts me back to the problem of my gtk
   application going dark/dim;
This usually indicates that an application is busy. Run the app inside
gdb, break into gdb when it is gray and check the backtrace.

Stefan
  it looks like this may be a
   feature of ubuntu linux.  i've posted to unubtuforums and
   waiting.  --at any rate, thanks for your help.

   gary


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


Re: release resource of gtk

2012-01-08 Thread Stefan Sauer
On 01/02/2012 04:09 AM, wenmhappy wrote:
 hi everyone,
  
 I run GtkLauncher(webkit/gtk/directfb), I find gtk/directfb are not 
 released even if gtk_widget_destroy(top_window) has been called before 
 gtk_main() quit.
 I don`t find function such as gtk_term or gtk_deinit() to release gtk 
 .   How to release whole gtk resources when application quit?
This is an FAQ. The static ressources are released when the application
terminates.

Stefan

  
 Thanks.
 Best regards.
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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


Re: GLIB for a webserver

2011-12-11 Thread Stefan Sauer
On 12/08/2011 02:13 PM, Marcelo Elias Del Valle - SYSMAP SOLUTIONS -
Claro MA-SP - wrote:
 Hello,

 I am planning to use glib to write a C application server. I just 
 like the library philosophy a lot and that’s why it is my first choice.
 However, after searching the web for a while, I have found some 
 critics, which I list bellow:

 - On Apache ARP project, they said they created it instead of using glib 
 because the lack of IPC functions like memory mapping.
 - In some forums, people were complaining about the fact glib aborts when 
 memory allocation fails, which is bad for a 24/7 running web server.
There is also g_try_malloc() and friends. This is advisable to use, if
you allocated memory based on a protocol fields you are receiving over
the net. This way you can avoid e.g. trying to allocate 4GB and
terminate and instead reject the request.

Stefan

 I would like to know the opinion of those more experienced with glib. 
 Do you recommend me to use it for writing a web server?
 I really would like to use glib for that and I was thinking in some 
 workaround to avoid this problems, like find some portable way to get the 
 system's free memory before allocating anything and implement IPC functions 
 using posix directly, even using glib thread pools for threads inside a 
 process.
 Anyway, glib's first intention was to be used by visual applications, 
 which is not the case. Would I be going against glib philosophy trying to use 
 it for something like a web server?

 Regards,
 Marcelo.


 Esta mensagem, incluindo seus eventuais anexos, pode conter informações 
 confidenciais, de uso restrito e/ou legalmente protegidas. Se você recebeu 
 esta mensagem por engano, não deve usar, copiar, divulgar, distribuir ou 
 tomar qualquer atitude com base nestas informações. Solicitamos que você 
 elimine a mensagem imediatamente de seu sistema e avise-nos, enviando uma 
 mensagem diretamente para o remetente e para postmas...@claro.com.br. Todas 
 as opiniões, conclusões ou informações contidas nesta mensagem somente serão 
 consideradas como provenientes da Claro ou de suas subsidiárias quando 
 efetivamente confirmadas, formalmente, por um de seus representantes legais, 
 devidamente autorizados para tanto.
 --
 Este mensaje, incluyendo sus eventuales archivos adjuntos, puede contener 
 informaciones confidenciales, de uso restringido y/o legalmente protegidas. 
 Si usted ha recibido este mensaje por error, no debe utilizar, copiar, 
 divulgar, distribuir o tomar cualquier actitud basada en estas informaciones. 
 Solicitamos la inmediata eliminación del mensaje de su sistema y el envío de 
 un informe en forma directa al remitente y a postmas...@claro.com.br. Todas 
 las opiniones, conclusiones o informaciones contenidas en este mensaje 
 solamente serán consideradas como provenientes de Claro o de sus subsidiarias 
 cuando sean efectivamente confirmadas, formalmente, a través de uno de sus 
 representantes legales debidamente autorizados a tal fin.
 --
 This message, including all attachments transmitted with it may include 
 restricted, legally privileged, and/or confidential information. If you 
 received this message by mistake or in error you are hereby notified that you 
 must not use, publicize, copy, distribute, resend, or take any action based 
 on the information contained in the message. We ask you to delete the message 
 immediately from your system and advise us by sending a message directly
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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

Re: Displaying domain objects with GtkTreeView

2011-12-06 Thread Stefan Sauer
On 12/02/2011 03:55 PM, Rafał Krupiński wrote:
 2011/12/1 David Nečas y...@physics.muni.cz:
 What are you talking about?  You can pass any GObject-derived type as
 the column type (not that it matters much, the net result is the same as
 passing G_TYPE_OBJECT).  You get back the objects that you stored there.

 If you store objects of different classes to the same column and want to
 know the precise type use RTTI: type macros such as MY_IS_FOO(),
 G_TYPE_FROM_INSTANCE(), g_type_is_a(), etc.
 Hi
 I rather meant to use my object as a model for a whole, multi-column
 row, somehow binding fields or properties to columns.
If you ave a collection of object of the same type you can do it. See
the code below:
http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/ui/edit/object-list-model.c?revision=3749view=markup
http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/ui/edit/object-list-model.c?revision=3749view=markup
http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/ui/edit/object-list-model.h?revision=3749view=markup
http://buzztard.svn.sourceforge.net/viewvc/buzztard/trunk/buzztard/src/ui/edit/object-list-model.h?revision=3749view=markup

Stefan
 Regards

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

Re: error in compile gtk3 in OSX

2011-12-06 Thread Stefan Sauer
On 12/06/2011 02:47 AM, xiaobo wrote:
 Hi, All

 I got a error when I compile gtk3 in OSX .
 This is log.

 .
 .
   CCLD   libgtk-3.la
   CC queryimmodules.o
   CCLD   gtk-query-immodules-3.0
   GISCAN Gtk-3.0.gir
 Usage: g-ir-scanner [options] sources

 g-ir-scanner: error: no such option: -x
 make[4]: *** [Gtk-3.0.gir] Error 2
 make[3]: *** [all-recursive] Error 1
 make[2]: *** [all] Error 2
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2

 what is g-ir-scanner ? 

pass --enable-introspection=no to configure. gobject-introspection is
a project to extract api metadata from the library to support language
bindings.

Stefan

 I need you help, please  :)
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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


Re: string replace function

2011-12-06 Thread Stefan Sauer
On 12/06/2011 03:56 AM, Kevin Anthony wrote:
 I was thinking of making a g_strrpl and g_strnrpl
 The first one takes (gchar*,gchar*) and returns a gchar* in which the all
 instances of the second gchar* will be found and replaced in the first
 gchar*.
replaced by what? g_strcannon can be used for some of the user cases
maybe. Also g_strrpl is not a good name, it would be better to just call
it g_strreplace.

Stefan
 The second one is the same, but only replaces the first n instances.

 But what i would like to know, is if i write this, and include it in the
 glib/gstrfuncs.c in a patch, would it be included.


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


Re: GTK based media player in C

2011-12-06 Thread Stefan Sauer
On 09/19/2011 07:35 AM, Hitesh_Sharma wrote:
 Dear Team,



 I am looking for a sample code in C for GTK based media player.Kindly let me 
 know from where I can get a sample code showig functionality of media player.
super late reply, but anyway here is a gstreamer example that is a test
app for playbin/playbin2/others stuff:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/seek/seek.c

Stefan


 Regards
 Hitesh Sharma


 

 DISCLAIMER:
 This email (including any attachments) is intended for the sole use of the 
 intended recipient/s and may contain material that is CONFIDENTIAL AND 
 PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
 distribution or forwarding of any or all of the contents in this message is 
 STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
 the sender by email and delete all copies; your cooperation in this regard is 
 appreciated.
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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


Re: error in compile gtk3 in OSX

2011-12-06 Thread Stefan Sauer
On 12/06/2011 11:32 AM, xiaobo wrote:
 在 2011-12-6 下午6:00 時, Stefan Sauer 寫到:

 On 12/06/2011 02:47 AM, xiaobo wrote:
 Hi, All

 I got a error when I compile gtk3 in OSX .
 This is log.

 .
 .
  CCLD   libgtk-3.la
  CC queryimmodules.o
  CCLD   gtk-query-immodules-3.0
  GISCAN Gtk-3.0.gir
 Usage: g-ir-scanner [options] sources

 g-ir-scanner: error: no such option: -x
 make[4]: *** [Gtk-3.0.gir] Error 2
 make[3]: *** [all-recursive] Error 1
 make[2]: *** [all] Error 2
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2

 what is g-ir-scanner ? 
 pass --enable-introspection=no to configure. gobject-introspection is
 a project to extract api metadata from the library to support language
 bindings.

 Stefan

 Hi, stefan.

 I use jhbuild to build gtk3.

 This is the build command : jhbuild build meta-gtk-osx-gtk3

 So, only bulid gtk3 by myself that can solve the problem? 


you can edit $HOME/.jhbuilrc and set

# module specific customisation
module_autogenargs['gtk3'] = '--enable-introspection=no'

'gtk3' nned to be the name of the module.

Stefan

 I need you help, please  :)
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

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

Re: Valgrind questions

2011-11-29 Thread Stefan Sauer
On 10/07/2011 11:09 AM, Andrew Cowie wrote:
 On Tue, 2011-09-20 at 12:48 +0100, jcup...@gmail.com wrote:

 Ooop, thanks. I hadn't realised but I'd not updated the version on the
 website for a while. I've put my current one up now and it includes a
 thing for g_type_add_interface_static(), as you also found.
 Might it be a good idea to put the suppression file directly into the
 GTK sources, and perhaps even distribute it via the -dev / -devel
 packages for libgtk?
+1 and best but the name of the suppression file to a pkg-config
variable so that it is easy to check. if every lib does this one can
generate a valgrind wrapper for the project in configure :)

Stefan
 Might help the FAQ factor a bit if everyone can just be told to find The
 Suppression File in /usr/share/something...

 AfC
 Sydney


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

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