Changeset 73


Ignore:
Timestamp:
Jan 31, 2006, 3:32:08 AM (15 years ago)
Author:
joshe
Message:

Merge rev 68:72 from trunk.

Location:
branches/joshe/gtk
Files:
4 deleted
3 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/joshe/gtk/Jamfile

    r11 r73  
    11SubDir TOP gtk ;
    22
    3 GTK_SRC = conf.c main.c prefs.c util.c gtkcellrenderertorrent.c ;
     3GTK_SRC = conf.c dialogs.c main.c trcellrenderertorrent.c util.c ;
    44
    55Main          transmission-gtk   : $(GTK_SRC) ;
  • branches/joshe/gtk/conf.c

    r49 r73  
    171171      case G_IO_STATUS_NORMAL:
    172172        if(NULL != line) {
    173           if(NULL != (sep = strchr(line, PREF_SEP_KEYVAL)) && sep > line) {
     173          if(g_utf8_validate(line, len, NULL) &&
     174             NULL != (sep = strchr(line, PREF_SEP_KEYVAL)) && sep > line) {
    174175            *sep = '\0';
    175176            line[termpos] = '\0';
     
    333334      case G_IO_STATUS_NORMAL:
    334335        if(NULL != line) {
    335           ts = g_new0(struct cf_torrentstate, 1);
    336           ptr = line;
    337           while(NULL != (ptr = getstateval(ts, ptr)))
    338             ;
     336          if(g_utf8_validate(line, -1, NULL)) {
     337            ts = g_new0(struct cf_torrentstate, 1);
     338            ptr = line;
     339            while(NULL != (ptr = getstateval(ts, ptr)))
     340              ;
     341            if(NULL != ts->ts_torrent && NULL != ts->ts_directory)
     342              ret = g_list_append(ret, ts);
     343            else
     344              cf_freestate(ts);
     345          }
    339346          g_free(line);
    340           if(NULL != ts->ts_torrent && NULL != ts->ts_directory)
    341             ret = g_list_append(ret, ts);
    342           else
    343             cf_freestate(ts);
    344347        }
    345348        break;
     
    438441  io = g_io_channel_unix_new(fd);
    439442  g_io_channel_set_close_on_unref(io, TRUE);
    440 
    441   /* XXX what the hell should I be doing about unicode? */
    442443
    443444  err = NULL;
  • branches/joshe/gtk/main.c

    r50 r73  
    3737
    3838#include "conf.h"
    39 #include "gtkcellrenderertorrent.h"
    40 #include "prefs.h"
     39#include "dialogs.h"
    4140#include "transmission.h"
     41#include "trcellrenderertorrent.h"
    4242#include "util.h"
    4343
     
    467467  gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
    468468
    469   progrend = gtk_cell_renderer_torrent_new();
     469  progrend = tr_cell_renderer_torrent_new();
    470470  g_object_set(progrend, "label", "<big>  fnord    fnord  </big>", NULL);
    471471  col = gtk_tree_view_column_new_with_attributes("Progress", progrend, NULL);
     
    494494stylekludge(GObject *obj, GParamSpec *spec, gpointer gdata) {
    495495  if(0 == strcmp("style", spec->name)) {
    496     gtk_cell_renderer_torrent_reset_style(GTK_CELL_RENDERER_TORRENT(gdata));
     496    tr_cell_renderer_torrent_reset_style(TR_CELL_RENDERER_TORRENT(gdata));
    497497    gtk_widget_queue_draw(GTK_WIDGET(obj));
    498498  }
Note: See TracChangeset for help on using the changeset viewer.