Re: Strange display problem with gtk-win32 and VC++

2010-11-06 Thread Guy Rouillier

On 11/6/2010 1:03 PM, John Emmas wrote:


If I build the app and link it to the official gnome binaries, it
works perfectly well.  However, if I rebuild those binaries (using
the various Visual Studio projects supplied with gtk / glib etc) the
app doesn't work.  The window and title display correctly but the
label (which is supposed to say Welcome to GTK+) just displays a
sequence of 15 squares.  The number of squares is always related to
the label.  So if I shorten the label text to 10 characters, I get 10
squares etc. I'm not sure if this mailing list supports file
attachments but if there's a way to attach a file, I have a small
screenshot available which illustrates the problem.


If it works with the official GTK binaries (which is what I assume you 
meant when you said gnome binaries), I would just stick with those. 
You don't want to be in the business of supplying GTK binaries.  That's 
a difficult, time-consuming task; just look at all the conversations 
about the Windows GTK libraries involving Tor - no one ever wants to 
volunteer to help.


Since the number of squares equals the number of characters in the label 
you are trying to display, the problem appears to be one of font 
rendering.  Other than that meager observation, I can't really help.


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


Re: How do I unsubscribe??

2009-04-07 Thread Guy Rouillier

John Emmas wrote:

How do I unsubscribe from this list?

I went to this web page:-

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


Correct site, listed at the bottom of every email message.


which contains a section where new users can subscribe.  However, that
section doesn't allow me to unsubscribe.

Further down the page there's an option for unsubscribing - but the text at
the head of that section suggests that it can only be used by
administrators.  Undaunted, I entered my email address and followed the


That only available to the list administrator comment only applies to 
the first item under gtk-app-devel-list Subscribers - View Subscribers 
List.  The second item, To unsubscribe, is for all subscribers.


  During the past week I've tried all my email addresses but no matter 
what

info I enter, I always get a message saying that an email has been sent to
me - but no email ever arrives.


You are entering email addresses that are not subscribed, so it is 
silently ignoring your request.  You should be able to determine which 
of your email addresses is subscribed by the account that receives all 
these list emails.


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


Re: GUI quickly?

2009-02-10 Thread Guy Rouillier

Juhana Sadeharju wrote:

This is related to open source free project, please help.

I have described variables this way:
NPC / Weight, float
NPC / AI Data / Mood, list of choices here

What are possibilities for creating GUI with minimal work?
I may group variables to groups, one per window.
I may group variables to subgroups, one per tab.
I may add widget type IDs if that is not clear.
But, using Glade to built the windows is too time-consuming.

Of course, when a value has been edited in GUI, I should
receive message: NPC / Weight changed to 3.14, etc.


I don't really understand your app, but that isn't necessary.  A quick 
Google search of linux visual builder produces many options: Gambas, 
Mono, WxHatch, Ultimate++, Glade.  Depends on what your target platform 
is and what your language preferences are.  Since you mention quickly 
in the subject, you might want to give Gambas a try.


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


Re: when and where to destroy popup menu?

2007-02-09 Thread Guy Rouillier
Zhang Yang wrote:
 Hello.
 I have created a popup menu in my function(list below). But I have a
 question when and where to destroy it?.

I see in your sample below you are not connecting the popup_menu signal, 
which is the one you want for context menus.  You don't need to destroy 
it, Gtk does that for you, after dispatching the proper event from the 
selected menu item.

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


Re: Windows Vista and GTK+ compatibility

2007-01-30 Thread Guy Rouillier
[EMAIL PROTECTED] wrote:
 I've heard with the new release of vista that the Win32 libraries are 
 effectively being abandoned.  What does this mean for the GTK+ ports 
 to Windows (and most other cross platform GUI toolkits)?

Highly unlikely.  If Vista were not to support the Win32 API, it would 
render all Windows programs inoperable.  Why would Microsoft do that? 
Do you have a reference?

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


Re: run a new application

2006-11-24 Thread Guy Rouillier
Jim George wrote:
 cmd.exe is surprisingly more powerful than a lot of people realize
 though I still personally abhor it.
  -jkl

 
 May be so, but you can't do things that you take for granted in Unix,
 like running multiple commands in sequence with a semicolon. And, as

You can string them together with .  I just tried to string them 
together with semicolons.  It does something, but I don't see a 
consistent behavior (and I don't care enough to figure it out.)

 far as I know, the system function in most Win32 compilers does not
 try to invoke a command interpreter, it just runs the program
 specified, with arguments.

That's true.  But the command you tell it to run can be cmd.exe, then 
you are starting a shell.  Besides, the Windows implementation is no 
more right or wrong than the Unix one, just different.

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


Re: GTK+

2006-11-18 Thread Guy Rouillier
The way this is typically done is to check in main() for any 
already-running processes, and if present just shut down the newly 
started one.  If you want to be user-friendly, you can give focus to the 
already running version so the user is not left wondering why the app 
didn't start.

One tricky part is that the user may have renamed the executable, so 
don't hard-code the name of your app inside main.  Instead, identify the 
name under which it was started in main().  To be even more fool-proof 
(since the user may rename the executable between the first and second 
invocations), you can create some type of signal (e.g., semaphore) when 
the first instance of the app is run.  Subsequent instances can just 
look for the presence of that signal.

natarajan wrote:
 Hi all,
 Is there a way in GTK+ which I can use to stop users from running 
 multiple instances of an application program. I am looking for this as I 
 want my program to work cross platform, in windows as well as in Linux.
 
 Many Thanks for your time and response in advance,
 Kind regards,
 
 Natarajan.
 


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


Re: How to scale Gtk-GUI application

2006-11-18 Thread Guy Rouillier
[EMAIL PROTECTED] wrote:
 Hi;
 
   I want to scale my Gtk-GUI application (which is basically large in
 size, not fitted with the screen) dynamically depending upon screen
 size. I am thinking that can be done by modifying .gtkrc-2.0 file.
 
   Please help me, how can I modify .gtkrc-2.0 file or please tell me any
 other approach to solve this.

Well, you haven't really told us anything about your app, so we can only 
provide generic answers.  One thing you can do so your GUI elements are 
repositioned automatically as a containing window grows or shrinks is to 
put the elements into layout widgets.  See, for example, vbox and hbox. 
  That approach does not do anything with font sizes, so if you want 
those to change as well, you'll need to handle that yourself when you 
get a resize signal.  However, automatically changing fonts is not 
typically done; instead, permit the user to select a desired font.

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


Re: gui for trees

2006-10-21 Thread Guy Rouillier
kiranc wrote:
 hi
 
 I want to maka GUI for redblack trees. Is this possible with GTK+ ? Are
 there any bultin widgets available or should I 
 make a new widget for this purpose?

A red-black tree is a data structure, as is a b-tree and a linked list. 
  You won't find dedicated Gtk widgets for any of them, because 
typically what's beneficial for a data structure may not be for 
graphical widget.

That being said, take a look at GtkTreeView. You may be able to utilize 
that to display the data in your red-black tree data structure.

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


Re: GTK table insert row

2006-10-12 Thread Guy Rouillier
Razvan wrote:
 Hi there
 
 I have the following problem:
 I have a dynamic created table and at a moment I want to insert a whole row
 into the table but I dont know how to do it. I dont want to re-create the
 entire table. Is there any possibilies to do such thing ?
 
 Any help or suggestions are apreciated.


You don't provide much to go on.  Which Gtk widget are you using - 
GtkTable or GtkTreeView with a backing list store?

-- 
Guy Rouillier

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


Re: event handling

2006-10-07 Thread Guy Rouillier
[EMAIL PROTECTED] wrote:
 Hi,
 
 Is there any way we can post an event and handle the event to change the
 GtkWidget.
 I want to pass an object while posting the event and use the object to
 change the widget.
 I'm new to Gtk.
 Any information will be of great help.
 

Sure, what you should look at are signals.  Start with the Gtk+
Reference,  Depending on what version you are running, most of the
signal functions have been moved into glib.

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


Re: GTK+ Draw a Rectangle over other widgets?

2006-08-20 Thread Guy Rouillier
Wolfman wrote:
 Does someone know how can draw a simple rectangle over other widgets  or a
 complete window?
 Cause iam trying to write a window splitting system but i dont know how to
 draw this rectangle...:(
 

You can't just draw a rectangle in order to group widgets. Well, I 
suppose you can but it's not a very good idea.  For example, if the user 
resizes your window, the widgets would then most likely not end up where 
you'd want them with respect to the rectangle.

Gtk provides mechanisms for doing this sort of thing appropriately. 
Take a look at hbox and vbox.  These are layout mechanisms.  Once you've 
placed widgets within a layout, they'll stay there, even if the layout 
is resized.

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


Re: Which widget should I use?

2006-08-08 Thread Guy Rouillier
Fernando ApesteguĂ­a wrote:
 Hi list!
 
 I need to represent some data in my application. The data is actually a
 trace of functions. The size of the list is not fixed, but it has a limit of
 200 elements. When the 200 limit is reached, I clear the older element and
 then add the new one.
 I have the list in a file (from procfs) and now I need to show it. I thought
 about to draw the name of the function inside a rectangle and then an arrow
 pointing to the next element. Something like this:
 
 __
 |func1|   ---   |func2|
 --   
 
 But I don't know what kind of widget I need to use. Maybe this is not the
 best way to represent this... should I use a treeview to show the list?
 Which are the advantages?

Well, unless you have a phenomenally wide screen, 200 boxes pointing to 
each other as you depict above will never fit.  Besides, once you get 
above 5-10 boxes, comprehension begins to plummet.

I'd just put them in a simple list, in whatever order makes sense to 
your audience (first to last or last to first.)  You can do that with a 
tree view backed by a list store.

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


Re: platform support

2006-07-16 Thread Guy Rouillier
ahmet alper parker wrote:
 just to confirm, it is nearly ok on mac osX and ok on linux and windows. how
 about unix (and mostly on solaris)? I think it is ok since most of the linux
 programs run on unix too but I dont know exectly, I am a beginner and I dont
 know wether there is a difference for linux and unix programs.
 Regars...

I would caution you to understand your user community.  I work on an 
open source cross platform product (CvsGui).  The person that maintains 
the Mac port does not use the Gtk implementation, but has written a 
native one.  Serious Mac users disdain most cross-platform tools, 
because most apps end up feeling like Windows applications, and the 
native Mac look and feel is quite different from that.

If your app has a restricted user community and they are okay with Gtk 
apps, then fine.  The old axim holds: know your customer.

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


Re: MySQL + GTK

2006-06-02 Thread Guy Rouillier
[EMAIL PROTECTED] wrote:
 Hi all,
 
 Can somebody learn me how to fill a treeview with the contents of a mysql
 table? We don't know the table number of rows cause the tree may show
 different tables while clicking on the different buttons of my app :)

Have you used a GtkTreeView before?  Not sure if your question is
specific to MySQL or generic to GtkTreeView.  The source of the data is
irrelevant to populating the tree view.  So if you are asking how to
populate a tree view, I'd suggest you read the tutorial in the help.
Once you have a list store associated with the tree view, you just
populate the list store.  You don't need to know the number of rows that
will eventually be put into the list store.  You just keeping appending
a row to the list store for each row you get back from your MySQL table.

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


Re: Retrieving one selected element in a GtkTreeSelection (multiple)?

2006-04-22 Thread Guy Rouillier

Daniel Pekelharing wrote:

Hi all,

What's the best way to retrieve just one of the selected items in a
GtkTreeSelection which has been set to GTK_SELECT_MULTIPLE mode?


Looks like gtk_tree_selection_get_selected_rows() is your available 
alternative.  Just use the first path in the list.


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


Re: interactive buttons inside treeview headings

2006-04-13 Thread Guy Rouillier

Stefan Kost wrote:

hi all,

just tried to set the treeview column 'clickable' property to TRUE. The
effect s not really what I want :(. Now the whole treeview header can be
clicked, but still not the buttons in there.


You are trying to make GtkTreeView do something it wasn't designed to do 
 (clickable buttons inside a clickable header.)  If you really want 
that,  you'll have to figure out a way to do that yourself.  What is the 
purpose of your buttons?  If the columns are not sortable, maybe it 
would be easier if you just put the label into the header, and then put 
the buttons into the first row of the store.


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


Re: Rebooting the System

2006-04-11 Thread Guy Rouillier

Sandeep KS wrote:

Hello everyone,
I am doing a project using GTK which needs rebooting of the system. 
When the code is executed, the user is asked to select some details. After he enters all the details and clicks on the  OK button, i need to save all the details and reboot the system. After rebooting, i need to execute the code again automatically with the next page of the code displayed. I also need to show all the saved details.

Is it possible to achieve this? How can i do it?


What are you doing that requires rebooting the system?  This behavior is 
a Windows-ism that normally isn't required on Unix-type OSes.


Shutdown and reboot are protected operations.  You won't be able to rely 
on them being available to non-root users.


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


Re: GtkTreeView: How do I detect right-click?

2006-04-10 Thread Guy Rouillier

Ang Bodhi wrote:

Hi,

Guy Rouillier wrote:


Ang Bodhi wrote:


Hi,

I have a GtkTreeView widget that I would like to detect the mouse
button right-click, how can I do that? In Gtk 1.2, I used to be able
to connect to a button_press_event signal of a GtkTreeItem widget.




Did you search archives before posting?  I just answered this 5 days ago:



Sorry, I did a quick search with bad choice of keywords.


gtk_menu_new();
gtk_menu_popup();

In order to know to kick this off, you'll have to gtk_signal_connect 
on the popup_menu signal.



Thanks, I didn't realize there's a popup_menu signal. After trying it, 
I find

that the signal popup_menu does not work with the GtkTreeView widget.

I notice the tests/testiconview program use the popup_menu signal
on GtkIconView widget as well, but its popup menu works only by
connecting to the button_press_event signal of GtkIconView widget.
If I comment out the button_press_event signal connection, the program
would fail to popup the menu. It actually rely on the event's position to
determine which icon is chosen.


Ha!  You're right and I'm wrong.  I wrote this code over a year ago and 
obviously I forgot what I did.  In order to detect a button press in a 
GtkTreeView, do this:


gtk_signal_connect (GTK_OBJECT(widget), button_press_event, 
GTK_SIGNAL_FUNC(gtktreeviewbuttonpressed), 
(gpointer)UMAKEINT(GetWidID(), cmd));


Don't worry about the last param, that's just the user_data that's 
specific to our application.


Here is the code from our app that actually does the popup.  This code 
comes from the gCvs member of the CvsGui family.


void UCvsPopupMenu::DisplayPopupMenu(void* info)
{
   if (menu !=  UMENU_NULL)
   {
GdkEventButton *event = (GdkEventButton *) info;
int button, event_time;

if (event)
{
   button = event-button;
   event_time = event-time;
   // printf(UCvsPopupMenu::DisplayPopupMenu called with event\n);
}
else
{
   button = 0;
   event_time = gtk_get_current_event_time ();
   // printf(UCvsPopupMenu::DisplayPopupMenu called without event\n);
}

   gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
button, event_time);
   }
}

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


Re: interactive buttons inside treeview headings

2006-04-10 Thread Guy Rouillier

Stefan Kost wrote:

hi list,

I've added a couple of (toggle)-buttons and a label in a box into each
of my treeview headers. They are shown properly. I can also modify them
programatically (toggle).
My problem is, that I can't click them. Honestly I have no idea how to
debug this. Any idea?


I'm not sure I understand your code, in particular what you mean by 
added a copule buttons and a label in a box into each of my treeview 
headers.  The GtkTreeView widget provides a clickable header for you. 
Where are you putting your button and label in a box?


At any rate, if you are using the standard GtkTreeView, here are the 
statements you need to get a clickable header that sorts:


GtkTreeViewColumn *clmn = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( clmn, Integer);
gtk_tree_view_column_set_resizable( clmn, TRUE);
gtk_tree_view_column_set_reorderable( clmn, TRUE);
gtk_tree_view_column_set_sort_column_id( clmn, INT_COLUMN );
gtk_tree_view_column_set_sort_indicator( clmn, TRUE);
GtkCellRenderer *rndr = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start( clmn, rndr, FALSE);
gtk_tree_view_column_set_attributes(clmn, rndr, text, INT_COLUMN, NULL);
gtk_tree_view_column_set_visible( clmn, TRUE);

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


Re: GtkTreeView: How do I detect right-click?

2006-04-09 Thread Guy Rouillier

Ang Bodhi wrote:

Hi,

I have a GtkTreeView widget that I would like to detect the mouse
button right-click, how can I do that? In Gtk 1.2, I used to be able
to connect to a button_press_event signal of a GtkTreeItem widget.


Did you search archives before posting?  I just answered this 5 days ago:

gtk_menu_new();
gtk_menu_popup();

In order to know to kick this off, you'll have to gtk_signal_connect on 
the popup_menu signal.


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


Re: popup menu

2006-04-03 Thread Guy Rouillier

prabhakar kushwaha wrote:

hi
is it there any widget like popup menu Gtk
which comes when we press third button of mouse..
if not
please tell me the widgets  that we should  use in order to find pop up menu

like facility by clicking third button of mouse.
thanks
with regards..


gtk_menu_new();
gtk_menu_popup();

In order to know to kick this off, you'll have to gtk_signal_connect on 
the popup_menu signal.


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


Sorting GtkListStore date column

2006-03-12 Thread Guy Rouillier
I'm fairly new to GTK programming, and I'm helping out on an open source 
GTK-based project (gcvs, part of the cvsgui project.)  We have a 
GtkListStore with a column containing date.  The column is specified as 
G_TYPE_STRING.  When sorted, it does an alphanumeric sort, so in English 
it puts all the Fridays together first, followed by all the Mondays, 
Saturdays, Sundays, etc.


Obviously, I want to sort this in date sequence.  How do I accomplish 
this?  I searched the archives before posting and couldn't find anything 
applicable.  Thanks.


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


Re: Sorting GtkListStore date column

2006-03-12 Thread Guy Rouillier

Chris Vine wrote:


Obviously, I want to sort this in date sequence.  How do I accomplish
this?  I searched the archives before posting and couldn't find anything
applicable.  Thanks.


You can sort on a hidden column in the list store (that is, one not
displayed in a tree view) which has, say, this format:  MMDDSS



Sorry, that should of course be MMDDHHMMSS (expressed numerically).


Thanks, Chris and Fredderic for the suggestions.  Fredderic, gCvs is is 
a desktop GUI to manage CVS repositories, so the date range for listed 
files can span multiple years.  Hence, a day-of-the-week approach won't 
work.


I'll use the approach of storing the time_t corresponding to each 
displayed date in a hidden column, and use that hidden column as the 
sort column for the date column.  Out of curiosity, would it also be 
possible to do this in a single column by storing just the time_t, and 
using a custom renderer to transform the time_t value into a displayable 
string?  Is sorting done on the rendered text or on the underlying data?


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