Re: Theme not affecting titlebar on windows xp... help needed

2006-03-18 Thread Gus Koppel
Michael L Torrie wrote:

> On Sat, 2006-03-18 at 00:38 +0100, Gus Koppel wrote:
> > However, then you would have to manage all tasks the window manager
> > takes care of by yourself, i.e. minimizing and maximizing the window on
> > request and providing correct drag behaviour. For resizability of your
> > windows you would still have to rely on the real window manager, since
> > the resizing borders don't (and can't) belong to the interior of a
> > window.
> 
> To do resize, you can just detect a mouse drag that starts in, say the
> lower right-hand corner, and then give the real window manager hints to
> resize the window.  This would work on linux and windows.  This is how
> xmms does it (gtk1 app, though).

This is true if mouse move events are reported to the application even
when the mouse pointer has left the inner area of the window. A long
time ago I was experimenting with this and at that time I didn't
succeed. Not sure whether it was with GTK+ at that time, though. So I
thought mouse move events wouldn't be reported to a GTK+ application
when the pointer is outside its window. But apparently in GTK+ this
should happen, indeed?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Question about GdkColor

2006-03-18 Thread Sven Neumann
Hi,

yeajchao <[EMAIL PROTECTED]> writes:

> In general,the RGB color mode ,the red or green or blue's value
> is from 0 to 255 But ,the GdkColor ,the value is from 0 to 65535
>
>My question is ,how to map (0--255) to (0--65535)

 r = ((r << 8) | r);
 g = ((g << 8) | g);
 b = ((b << 8) | b);


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


treeview, gtk and mysql

2006-03-18 Thread rupert
Hello,

im trying to create an application that uses a mysql database to get its
information,
first a treeview is created from the information stored in one column, than
when I select a row some more information should be displayed
as GTK Labels and a picture is shown for each row.
I have the whole thing working, with a simple treeview generated from data
stored in a textfile.

How should I handle the database connection, i thought i can get the whole
data once and put it into different varibles,
but i havent found a way to extract the data from the rows.
right now im trying to give the select Title to my label display function
and do a query with "Select Info FROM table WHERE Title = "title"",
but i always get Segmentation faults as soon as i try to use a WHERE or
something else in may query.
In the top of my main() i have the connection and i just give the *my to the
functions where the queries are defined.

Please give me some tips how I can solve this problem the best way, I think
having a global structe which i can access via if() or something would be
better than doing a SELECT everytime i need some information.


//__Datenbank___

MYSQL  *my;

   my = mysql_init(NULL);

   if(my == NULL) {

  fprintf(stderr, " Initialisierung fehlgeschlagen\n");
  return EXIT_SUCCESS;
   }
   /* Mit dem Server verbinden */
   if( mysql_real_connect (my, NULL, "root", NULL, "shdf", 0, NULL, 0)  ==
NULL)
   {
  fprintf (stderr, "Fehler mysql_real_connect():"
"%u (%s)\n",mysql_errno (my), mysql_error (my));
   }
   else
  printf("Erfolgreich mit dem MySQL-Server verbunden\n");

   /* Hier befindet sich der Code für die Arbeit mit MySQL */
 mysql_select_db(my, "shdf");
//_


//the function that fills the treeview list

void make_list(GtkListStore *liste, GtkTreeIter iter, MYSQL *my){

MYSQL_ROW  row;
MYSQL_RES  *result;
MYSQL_FIELD *field;

gint i=0;

char *query;
query = "SELECT Title FROM table WHERE nr < 107" ;

mysql_real_query(my, query, strlen(query));
result = mysql_store_result(my);

  while ((row = mysql_fetch_row (result)) != NULL)
{
   mysql_field_seek (result, 0);

   for (i = 0; i < mysql_num_fields(result); i++)
{
 gtk_list_store_append(liste, &iter);
  gtk_list_store_set(liste, &iter, STRING_SPALTE, row[i],-1);
}

}

 free(query);

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


Re: treeview, gtk and mysql

2006-03-18 Thread Daniel Espinosa
If you want you can try the libgda and libgnomedb, in www.gnome-db.org, wich
is a set of providers that allow you to connect, get, edit and show data
from diferent database servers like MySQL, PostgreSQL, Oracle, MS SQL
Server, etc.

2006/3/18, rupert <[EMAIL PROTECTED]>:
>
> Hello,
>
> im trying to create an application that uses a mysql database to get its
> information,
> first a treeview is created from the information stored in one column,
> than
> when I select a row some more information should be displayed
> as GTK Labels and a picture is shown for each row.
> I have the whole thing working, with a simple treeview generated from data
> stored in a textfile.
>
> How should I handle the database connection, i thought i can get the whole
> data once and put it into different varibles,
> but i havent found a way to extract the data from the rows.
> right now im trying to give the select Title to my label display function
> and do a query with "Select Info FROM table WHERE Title = "title"",
> but i always get Segmentation faults as soon as i try to use a WHERE or
> something else in may query.
> In the top of my main() i have the connection and i just give the *my to
> the
> functions where the queries are defined.
>
> Please give me some tips how I can solve this problem the best way, I
> think
> having a global structe which i can access via if() or something would be
> better than doing a SELECT everytime i need some information.
>
>
>
> //__Datenbank___
>
> MYSQL  *my;
>
>my = mysql_init(NULL);
>
>if(my == NULL) {
>
>   fprintf(stderr, " Initialisierung fehlgeschlagen\n");
>   return EXIT_SUCCESS;
>}
>/* Mit dem Server verbinden */
>if( mysql_real_connect (my, NULL, "root", NULL, "shdf", 0, NULL, 0)  ==
> NULL)
>{
>   fprintf (stderr, "Fehler mysql_real_connect():"
> "%u (%s)\n",mysql_errno (my), mysql_error (my));
>}
>else
>   printf("Erfolgreich mit dem MySQL-Server verbunden\n");
>
>/* Hier befindet sich der Code für die Arbeit mit MySQL */
>  mysql_select_db(my, "shdf");
>
> //_
>
>
> //the function that fills the treeview list
>
> void make_list(GtkListStore *liste, GtkTreeIter iter, MYSQL *my){
>
> MYSQL_ROW  row;
> MYSQL_RES  *result;
> MYSQL_FIELD *field;
>
> gint i=0;
>
> char *query;
> query = "SELECT Title FROM table WHERE nr < 107" ;
>
> mysql_real_query(my, query, strlen(query));
> result = mysql_store_result(my);
>
>   while ((row = mysql_fetch_row (result)) != NULL)
> {
>mysql_field_seek (result, 0);
>
>for (i = 0; i < mysql_num_fields(result); i++)
> {
>  gtk_list_store_append(liste, &iter);
>   gtk_list_store_set(liste, &iter, STRING_SPALTE, row[i],-1);
> }
>
> }
>
>  free(query);
>
> greetings
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>



--
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los cuates:
LIBRE)
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list