Skip to content

Instantly share code, notes, and snippets.

require 'gtk3'
class FileManager
INDEX = 0
COL_PATH, COL_DISPLAY_NAME, COL_IS_DIR, COL_PIXBUF = (0..3).to_a
def initialize
win = Gtk::Window.new
menu = Gtk::Menu.new
swin = Gtk::ScrolledWindow.new
from gi.repository import Gtk
indicator = Gtk.StatusIcon()
indicator.set_from_icon_name("everpad")
indicator.set_visible(True)
Gtk.main()
@ozcan
ozcan / gist:5416471
Created April 18, 2013 21:43
OAuth example with WebKit
from gi.repository import Gtk
from gi.repository import WebKit
import oauth2 as oauth
import urllib
import urlparse
from i18n import _
from common import CONSUMER_KEY, CONSUMER_SECRET, HOST
void capture_screen()
{
Glib::RefPtr<Gdk::Window> root_win = Gdk::Window::get_default_root_window();
int width = root_win->get_width();
int height = root_win->get_height();
int x_orig, y_orig;
root_win->get_origin(x_orig, y_orig);
struct Person {
1: i32 id,
2: string firstName,
3: string lastName,
4: string email,
5: list<Phone> phones
}
struct Course {
1: i32 id,
@ozcan
ozcan / gist:4339060
Created December 19, 2012 18:26
gtk genişleyerek açılma efekti denemesi
import pygtk
pygtk.require('2.0')
import gtk
import time
class Win(gtk.Window):
def __init__(self):
super(Win, self).__init__()
self.move(0,0)
@ozcan
ozcan / keybinder_focus_problem.py
Created December 7, 2012 03:10
keybinder_focus_problem
#!/usr/bin/env python
from gi.repository import Gtk, Keybinder
class Win(Gtk.Window):
def __init__(self):
super(Win, self).__init__()
self.connect('destroy', Gtk.main_quit)