deploy in win

2007-03-12 Thread Hariyanto
I looking for tutorial about deployment application with nsis.
I try to include all dll in /gtk/bin to $INSTDIR but I get error.

thx
Hariyanto
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


change color gtkbutton on winxp

2007-02-13 Thread Hariyanto
Is there tutorial or url about change color gtkbutton in winxp?
I try change color on gtkbutton with gtk_widget_modify_bg and it can work only 
in linux. 

thx
Hariyanto
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: change color gtkbutton on winxp

2007-02-13 Thread Hariyanto
On Wed, 14 Feb 2007 02:47:29 +0200
Tor Lillqvist [EMAIL PROTECTED] wrote:

 Are you using the ms-windows theme? Try without it.

I search on my desktop there are two theme : luna and windows classic.
How I can remove it that default theme or Where I can download another theme? 
I try to search with google gtk theme but still can't get.

thx 
Hariyanto


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


how create model use variable

2007-02-09 Thread Hariyanto
I create model in treeview like this :

GtkTreeModel *create_model_tw(gint ncol)
{
  GtkListStore *model;

  if (ncol == 2)
model = gtk_list_store_new (NUM_COLUMNS,   
  G_TYPE_STRING, 
  G_TYPE_STRING);

  if (ncol == 3)
model = gtk_list_store_new (NUM_COLUMNS,  
  G_TYPE_STRING, 
  G_TYPE_STRING, 
  G_TYPE_STRING);
  .
  .
  . until n col

  return GTK_TREE_MODEL (model);
}

GtkTreeModel *fill_model_tw(GtkTreeModel *model, gint ncol)
{
  gint i = 0;
  GtkTreeIter iter;
  
  if (ncol == 2)
{
  for (i = 0; i  data_tw-len; i++)
 {
   gtk_list_store_append (GTK_LIST_STORE(model), iter);
   gtk_list_store_set(GTK_LIST_STORE(model), iter,
  1,
  g_array_index (data_tw, ColPrefs, i).col1,
  2,
  g_array_index (data_tw, ColPrefs, i).col2,
  -1);
 }
 }
  if (ncol == 3)
 .
 .
 . 
 
  return GTK_TREE_MODEL (model);
}



Is there another way to make it more simple?

thx 
Hariyanto
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


How to get alignment in treeview

2007-01-15 Thread Hariyanto
I using gtktreeview with 3 column to display some data. 
I set alignment Center in header column with 
gtk_tree_view_column_set_alignment().
And I set alignment data with g_object_set (renderer, xalign, 1.0, NULL); 

How I get alignment from data ?
I try using gtk_tree_view_column_get_alignment(), but i can only alignment from 
header.

thx. 
Hariyanto.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


problem on treeview

2006-09-19 Thread Hariyanto
I have treeview with 4 column.
1. First Problem :
   Can I freeze cell B  when I have fill cell A? 
   And freeze cell A when cell B has been fill.
   How I can make this freeze and not editable?
--
A|B|   C  | D
--
  123|   freeze cell   |  50  |A + C
   freeze cell   |  100|  35  |B + C

2. Second Problem :
   How I can fill cell D with automatic calc A + C on start editing cell D ?
   I try with this one but still can't fill cell D.

void cell_d_editing_start(.) 
{

  dbl_d = atof(a) + atof(c);
  str_d = format_num_to_string(dbl_d,3);
  g_print(Str d is %s \n, str_d); OK - I see correct Value.

  g_object_set(cell, text, str_d, NULL);  1st try (Cell D 
still Empty)

/* gtk_list_store_set(GTK_LIST_STORE (model), iter,2nd try (Cell D 
still Empty)
 3, str_d,
-1);
*/
}

void cell_d_edited(.) 
{
 same with code on gtk-demo
  switch (column)
{
case COLUMN_d:
  {
g_array_index (data_tw, JPrefs, i).col4 = g_strdup (new_text);
g_print(Str d is %s \n, g_strdup (new_text));  Still Empty  
???.
  }
}

thx.
Hariyanto

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


GtkCalendar and name of week

2006-04-11 Thread Hariyanto
How I can get name of week from GtkCalendar?

thx
Hariyanto 
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: gtk-demo and editable_cells

2006-02-20 Thread Hariyanto
Sorry about my confuse question. And I have to make button for renderer_combo 
appear  with  g_object_set (G_OBJECT (renderer), 
  model, numbers_model,  
  text-column, 0, 
  has-entry, TRUE,
  editable, TRUE,
  NULL);

thx

On Fri, 17 Feb 2006 06:40:26 +0700
Hariyanto [EMAIL PROTECTED] wrote:

 Can you give me simple code or url to using that GtkComboBox (custom) in 
 gtktreeview. Because i am newbie. 
 
 thx.
 
 
 On Mon, 13 Feb 2006 19:16:50 -0500
 Matthias Clasen [EMAIL PROTECTED] wrote:
 
  On 2/13/06, Hariyanto [EMAIL PROTECTED] wrote:
   My system is ubuntu 5.10 with gtk 2.8.6. I try gtk-demo - Editable Cell.
   I get gtk_cell_renderer_combo picture on attachment.
   How I can set gtk_cell_renderer_combo like in 
   http://people.redhat.com/mclasen/GUADEC05/notes.pdf  - new cell 
   renderers.
   thx
  
  
  http://cvs.gnome.org/viewcvs/gtk%2B/tests/testcombo.c?rev=1.18view=markup
  
  might help you.
  
  Matthias
 ___
 gtk-list mailing list
 gtk-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


gtkrenderercombo and signal

2006-02-20 Thread Hariyanto
I want to display new window when button in gtkrenderercombo pressed. What 
signal I must use?. 
thx.

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


gtkcellrenderercombo

2006-02-07 Thread Hariyanto
I try gtkcellrenderercombo with FC4 and gtk2.6.7-4 but I can't see button from 
combo. I have tried with resizeable column and change width column but can't 
see also. Help me please

thx

Hariyanto 

#include gtk/gtk.h
#include string.h
#include stdlib.h
 
static GtkWidget *window = NULL;
 
typedef struct
{
  gint   number;
  gchar *product;
  gint   yummy;
}
Item;
 
enum
{
  COLUMN_ITEM_NUMBER,
  COLUMN_ITEM_PRODUCT,
  COLUMN_ITEM_YUMMY,
  NUM_ITEM_COLUMNS
};
 
enum
{
  COLUMN_NUMBER_TEXT,
  NUM_NUMBER_COLUMNS
};

static GArray *articles = NULL;
 
static void
add_items (void)
{
Item foo;
 
g_return_if_fail (articles != NULL);

   foo.number = 3;
   foo.product = g_strdup (bottles of coke);
   foo.yummy = 20;
   g_array_append_vals (articles, foo, 1);

   foo.number = 5;
   foo.product = g_strdup (packages of noodles);
   foo.yummy = 50;
   g_array_append_vals (articles, foo, 1);

}
 
static GtkTreeModel *
create_items_model (void)
{
   gint i = 0;
   GtkListStore *model;
   GtkTreeIter iter;
 
   /* create array */
   articles = g_array_sized_new (FALSE, FALSE, sizeof (Item), 1);
 
   add_items ();
 
   /* create list store */
   model = gtk_list_store_new (NUM_ITEM_COLUMNS, G_TYPE_INT, G_TYPE_STRING,
   G_TYPE_INT, G_TYPE_BOOLEAN);
 
   /* add items */
   for (i = 0; i  articles-len; i++)
 {
   gtk_list_store_append (model, iter);
 
   gtk_list_store_set (model, iter,
   COLUMN_ITEM_NUMBER,
   g_array_index (articles, Item, i).number,
   COLUMN_ITEM_PRODUCT,
   g_array_index (articles, Item, i).product,
   COLUMN_ITEM_YUMMY,
   g_array_index (articles, Item, i).yummy,
   -1);
 }
 
   return GTK_TREE_MODEL (model);
 }
 
static GtkTreeModel *
create_numbers_model (void)
 {
#define N_NUMBERS 10
   gint i = 0;
   GtkListStore *model;
   GtkTreeIter iter;
 
   /* create list store */
   model = gtk_list_store_new (NUM_NUMBER_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
 
   /* add numbers */
   for (i = 0; i  N_NUMBERS; i++)
 {
   char str[2] = { '0' + i, '\0' };
 
   gtk_list_store_append (model, iter);
 
   gtk_list_store_set (model, iter,
   COLUMN_NUMBER_TEXT, str,
   -1);
 }
 
   return GTK_TREE_MODEL (model);
 
#undef N_NUMBERS
 }
 
static void
add_item (GtkWidget *button, gpointer data)
 {
   Item foo;
   GtkTreeIter iter;
   GtkTreeModel *model = (GtkTreeModel *)data;
 
   g_return_if_fail (articles != NULL);
 
   foo.number = 0;
   foo.product = g_strdup (Description here);
   foo.yummy = 50;
   g_array_append_vals (articles, foo, 1);
 
   gtk_list_store_append (GTK_LIST_STORE (model), iter);
   gtk_list_store_set (GTK_LIST_STORE (model), iter,
   COLUMN_ITEM_NUMBER, foo.number,
   COLUMN_ITEM_PRODUCT, foo.product,
   COLUMN_ITEM_YUMMY, foo.yummy,
   -1);
}
 
static void
remove_item (GtkWidget *widget, gpointer data)
{
   GtkTreeIter iter;
   GtkTreeView *treeview = (GtkTreeView *)data;
   GtkTreeModel *model = gtk_tree_view_get_model (treeview);
   GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview);
 
   if (gtk_tree_selection_get_selected (selection, NULL, iter))
 {
   gint i;
   GtkTreePath *path;
 
   path = gtk_tree_model_get_path (model, iter);
   i = gtk_tree_path_get_indices (path)[0];
   gtk_list_store_remove (GTK_LIST_STORE (model), iter);
 
   g_array_remove_index (articles, i);

   gtk_tree_path_free (path);
 }
}
 
static gboolean
separator_row (GtkTreeModel *model,
GtkTreeIter  *iter,
gpointer  data)
{
   GtkTreePath *path;
   gint idx;
 
   path = gtk_tree_model_get_path (model, iter);
   idx = gtk_tree_path_get_indices (path)[0];
 
   gtk_tree_path_free (path);
 
   return idx == 5;
 }
 
static void
editing_started (GtkCellRenderer *cell,
  GtkCellEditable *editable,
  const gchar *path,
  gpointer data)
{
   gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable), 
 separator_row, NULL, NULL);
 }
 
static void
cell_edited (GtkCellRendererText *cell,
 const gchar *path_string,
  const gchar *new_text,
 gpointer data)
{
   GtkTreeModel *model = (GtkTreeModel *)data;
   GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
   GtkTreeIter iter;
 
   gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), 
column));
 
   gtk_tree_model_get_iter (model, iter, path);
 
   switch (column)
 {
case COLUMN_ITEM_NUMBER:
   {
 gint i;
 
 i = gtk_tree_path_get_indices (path)[0];
 g_array_index (articles, Item, i).number = atoi (new_text

gtkcellrenderercombo

2006-02-02 Thread Hariyanto
I want to learn about gtkcellrenderercombo. Where I get some tutorial about 
gtkcellrenderercombo. I look for in gtk-demo but i can't find it,
thx 

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


Compile under win

2005-04-30 Thread Hariyanto
I have make program with glade gtk with mysql and run well under linux. And I 
want to run and compile under window. 
1. Can I compile with mingw?
2. What package on list below, I must download.

thx in advance

** Current **
*** GCC ***
1. diff gcc-3.4.2-20040916-1-src.diff.gz 102 kb Sep 22, 2004 02:56
2. other gcc-3.4.2-build.sh 1 kb Sep 22, 2004 14:33
3. other gcc-3.4.2-release_notes.txt 3 kb Sep 22, 2004 01:30
4. src gcc-ada-3.4.2-20040916-1-src.tar.gz 4882 kb Sep 21, 2004 18:00
5. bin gcc-ada-3.4.2-20040916-1.tar.gz 10120 kb Sep 22, 2004 01:28
6. src gcc-core-3.4.2-20040916-1-src.tar.gz 13766 kb Sep 21, 2004 14:35
7. bin gcc-core-3.4.2-20040916-1.tar.gz 3433 kb Sep 21, 2004 14:52
8. src gcc-g++-3.4.2-20040916-1-src.tar.gz 3523 kb Sep 21, 2004 15:10
9. bin gcc-g++-3.4.2-20040916-1.tar.gz 4718 kb Sep 21, 2004 15:34
10. src gcc-g77-3.4.2-20040916-1-src.tar.gz 1172 kb Sep 21, 2004 15:47
11. bin gcc-g77-3.4.2-20040916-1.tar.gz 1989 kb Sep 21, 2004 15:57
12. src gcc-java-3.4.2-20040916-1-src.tar.gz 5960 kb Sep 21, 2004 20:22
13. bin gcc-java-3.4.2-20040916-1.tar.gz 15451 kb Sep 22, 2004 02:49
14. src gcc-objc-3.4.2-20040916-1-src.tar.gz 261 kb Sep 21, 2004 15:59
15. bin gcc-objc-3.4.2-20040916-1.tar.gz 2240 kb Sep 21, 2004 16:11
16. src gcc-testsuite-3.4.2-20040916-1-src.tar.gz 3543 kb Sep 21, 2004 16:30

*** MSYS Developer Tool Kit  ***
17. src msys-autoconf-2.59-src.tar.bz2 895 kb Jan 20, 2004 06:07
18. bin msys-autoconf-2.59.tar.bz2 395 kb Jan 21, 2004 10:10
19. src msys-automake-1.8.2-src.tar.bz2 622 kb Jan 20, 2004 06:07
20. bin msys-automake-1.8.2.tar.bz2 304 kb Jan 21, 2004 10:10
21. bin msysDTK-1.0.1.exe 10058 kb Jan 02, 2003 05:49
22. src msysDTK-1.0.1-src.tar.bz2 17119 kb Jan 02, 2003 05:41
23. src msys-libtool-1.5-src.tar.bz2 1494 kb Jan 20, 2004 06:08
24. bin msys-libtool-1.5.tar.bz2 411 kb Jan 20, 2004 06:00

*** MSYS ***
25. bin MSYS-1.0.10.exe 2742 kb Mar 16, 2004 11:08
26. bin MSYS-1.0.10.odmp.bz2 2030 kb Mar 16, 2004 11:30
27. src msys-1.0.10-src.tar.bz2 17557 kb Mar 17, 2004 04:00

*** MinGW Runtime ***
28. bin mingw-runtime-3.7.tar.gz 336 kb Jan 13, 2005 12:21
29. src mingw-runtime-3.7-src.tar.gz 281 kb Jan 13, 2005 12:21

*** MinGW Utilities ***
30. src mingw-utils-0.3-src.tar.gz 407 kb Feb 21, 2004 14:21
31. bin mingw-utils-0.3.tar.gz 1549 kb Feb 21, 2004 14:21

*** MinGW ***
32. bin MinGW-3.1.0-1.exe 14863 kb Sep 15, 2003 11:14

*** TclTk ***
33. bin tcltk-8.4.1-1.exe 2471 kb Feb 05, 2003 07:08
34. src tcltk-8.4.1-src-1.tar.bz2 5044 kb Feb 05, 2003 07:13

*** Windows API ***
35. src w32api-3.2-src.tar.gz 1057 kb Jan 02, 2005 07:26
36. bin w32api-3.2.tar.gz 1494 kb Jan 02, 2005 07:27

*** binutils ***
37. bin binutils-2.14.90-info-html.tar.gz 533 kb Jan 20, 2004 17:29
38. other binutils-2.15.91-20040904-1-notes.txt 1 kb Sep 05, 2004 03:10
39. diff binutils-2.15.91-20040904-1-src.diff 14 kb Sep 05, 2004 03:10
40. src binutils-2.15.91-20040904-1-src.tar.gz 14167 kb Sep 05, 2004 03:08
41. bin binutils-2.15.91-20040904-1.tar.gz 6016 kb Sep 04, 2004 22:08
42. other binutils-2.15-build.sh 0 kb Jan 25, 2005 11:43

*** gdb ***
43. bin gdb-5.2.1-1.exe 1809 kb Feb 17, 2003 16:03
44. src gdb-5.2.1-1-src.tar.bz2 11459 kb Feb 17, 2003 15:51

*** make ***
45. bin mingw32-make-3.80.0-3.exe 1273 kb Jun 19, 2003 08:42
46. bin mingw32-make-3.80.0-3.odmp.bz2 3131 kb Jun 19, 2003 08:43
47. src mingw32-make-3.80.0-3-src.tar.bz2 886 kb Jun 19, 2003 08:42

*** mingwPORT ***
48. bin emacs-cvs-mingwPORT-1.tar.bz2 2 kb Jan 25, 2005 12:08
49. bin gnupg-1.4.0-mingwPORT-1.tar.bz2 1 kb Jan 10, 2005 10:57

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


how to find mr. matthew stucky.

2005-03-16 Thread Hariyanto
I have buy book about gtk and mysql with title MySql Building User Interface 
with the author Mr. Matthew Stucky. And I see the last page where complete 
source code project can be download at 
http://pages.prodigy.net/stuckym/mysql_book/. But i can't found this address to 
download. 
And the book not came with cdrom source code. 
Help me, where I can download the complete source code or where I can contact 
Mr. Matthew Stucky.
Last email Mr. Matthew Stucky is : [EMAIL PROTECTED]

Thanks in advance.
Hariyanto
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: dateformat

2005-03-09 Thread Hariyanto
There is still problem because sometime I don't get date with same lenght 
string.
I get 7/8/2005 or 12/12/2005 or 7/12/2005.

I get this date with this code :

void
on_btn_get_date_clicked(GtkButton   *button,
gpointer user_data)
{
 GtkWidget *calen,*tentry1;
 gint gyear,gmonth,gday;
 char *str_day,*str_month,*str_year,str_date[16];
 
  calen = lookup_widget(GTK_WIDGET(button),calendar1);
  
  gtk_calendar_get_date(calen,gyear,gmonth,gday);

  str_year = g_strdup_printf(%i, gyear); 
  str_month = g_strdup_printf(%i, gmonth+1); 
  str_day = g_strdup_printf(%i, gday); 
  
  strcpy(str_date,str_day); 
  strcat(str_date,/);  
  strcat(str_date,str_month);   
  strcat(str_date,/);
  strcat(str_date,str_year);
  
  gtk_entry_set_text(GTK_ENTRY(lookup_widget(frm_purchase, 
   entry_date_purchase)), str_date);
}

Then I fill to GTK list after that I want to save to mysql in /mm/dd.

On Wed, 9 Mar 2005 05:43:13 +0100 (CET)
[EMAIL PROTECTED] wrote:

  Is there dateformat function in gtk? I have date dd/mm/ and I want
 to change to /yy/dd Mysql format.
  thx
 
 That would be plain playing
 
 void convert(char *dst, const char *src)
 {
  dst[0]=src[6];
  dst[1]=src[7];
  dst[2]=src[8];
  dst[3]=src[9];
  dst[4]='/';
  dst[5]=src[3];
  dst[6]=src[4];
  dst[7]='/';
  dst[8]=src[0];
  dst[9]=src[1];
  dst[10]=0;
 }
 
 Stian
 

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


dateformat

2005-03-08 Thread Hariyanto
Is there dateformat function in gtk? I have date dd/mm/ and I want to 
change to /yy/dd Mysql format.
thx

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


format number on gtklabel

2005-02-15 Thread Hariyanto
How I want to send string with number like 3456789 to GtkLabel with the output 
3.456.789,00
I try this code :

str_total = g_strdup_printf(%f, dbl_total);
str_total_formatted = g_strndup(str_total, strcspn(str_total, .) +3);

and the output : 3456789.00

How to make the output : 3.456.789,00

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